/* azuredata.dev — a dense, quiet reading surface. One accent, status colours carry meaning. */

:root {
  --bg: #f6f5f1;
  --surface: #ffffff;
  --ink: #14181d;
  --ink-2: #3b434d;
  --muted: #5d6672;
  --line: #dfdcd4;
  --accent: #0a5cad;
  --accent-soft: #e2edf9;
  --ga: #17703f;
  --ga-soft: #dff2e6;
  --preview: #8a5600;
  --preview-soft: #fbeccb;
  --retirement: #b3261e;
  --retirement-soft: #fbe2df;
  --dev: #5d44b8;
  --dev-soft: #e9e4fa;
  --neutral-soft: #ebe9e2;
  --sans: system-ui, -apple-system, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
  --mono: ui-monospace, "SF Mono", "Cascadia Mono", "Segoe UI Mono", Menlo, Consolas, monospace;
  --gutter: 5.75rem;
  /* Header geometry: two rows at the top of the page, one compact row once the reader scrolls. */
  --row-h: 3.4rem;
  --nav-h: 2.5rem;
  --compact-h: 3rem;
  --header-h: calc(var(--row-h) + var(--nav-h) + 1px);
  --pinned: var(--header-h);
}
:root[data-scrolled] { --pinned: calc(var(--compact-h) + 1px); }

@media (prefers-color-scheme: dark) {
  :root:not([data-theme="light"]) {
    --bg: #0d1013;
    --surface: #15191e;
    --ink: #e9ebee;
    --ink-2: #c3c9d1;
    --muted: #96a0ad;
    --line: #272d35;
    --accent: #72b5ff;
    --accent-soft: #13283e;
    --ga: #62d394;
    --ga-soft: #10301f;
    --preview: #f0b54a;
    --preview-soft: #3a2a08;
    --retirement: #ff8a80;
    --retirement-soft: #401512;
    --dev: #b3a1ff;
    --dev-soft: #251d4a;
    --neutral-soft: #20252c;
  }
}
:root[data-theme="dark"] {
  --bg: #0d1013;
  --surface: #15191e;
  --ink: #e9ebee;
  --ink-2: #c3c9d1;
  --muted: #96a0ad;
  --line: #272d35;
  --accent: #72b5ff;
  --accent-soft: #13283e;
  --ga: #62d394;
  --ga-soft: #10301f;
  --preview: #f0b54a;
  --preview-soft: #3a2a08;
  --retirement: #ff8a80;
  --retirement-soft: #401512;
  --dev: #b3a1ff;
  --dev-soft: #251d4a;
  --neutral-soft: #20252c;
}

*, *::before, *::after { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; scroll-padding-top: calc(var(--compact-h) + 1rem); }
body {
  margin: 0;
  background: var(--bg);
  color: var(--ink);
  font: 16px/1.5 var(--sans);
  overflow-wrap: break-word;
}
a { color: var(--accent); text-decoration-thickness: 1px; text-underline-offset: 2px; }
a:focus-visible, button:focus-visible, input:focus-visible {
  outline: 2px solid var(--accent);
  outline-offset: 2px;
  border-radius: 3px;
}
[hidden] { display: none !important; }
.vh { position: absolute; width: 1px; height: 1px; overflow: hidden; clip-path: inset(50%); white-space: nowrap; }
.skip { position: absolute; left: -999px; top: 0; background: var(--surface); padding: .5rem 1rem; z-index: 10; }
.skip:focus { left: 1rem; top: 1rem; }

.wrap { max-width: 71rem; margin: 0 auto; padding: 0 1rem; }

/* ---- header */
/* The header keeps its full height in the page flow, so shrinking it never moves the content.
   Only the surface inside is painted, and only that shrinks. */
.site-header { position: sticky; top: 0; z-index: 5; height: var(--header-h); pointer-events: none; }
.header-surface { pointer-events: auto; background: var(--surface); border-bottom: 1px solid var(--line); }
.header-bar {
  display: grid; align-items: center; column-gap: .75rem;
  grid-template-columns: auto minmax(0, 1fr) auto auto;
  grid-template-rows: var(--row-h) var(--nav-h);
  grid-template-areas: "brand . search theme" "nav nav nav nav";
}
.wordmark { grid-area: brand; }
.site-nav { grid-area: nav; align-self: stretch; }
.search { grid-area: search; width: 15rem; max-width: 42vw; }
.theme { grid-area: theme; }

:root[data-scrolled] .header-surface { box-shadow: 0 1px 8px rgb(0 0 0 / .06); }
:root[data-scrolled] .header-bar {
  grid-template-rows: var(--compact-h);
  grid-template-areas: "brand nav search theme";
  column-gap: 1.25rem;
}
:root[data-scrolled] .wordmark { font-size: 1rem; }
:root[data-scrolled] .wordmark svg { width: 18px; height: 18px; }
:root[data-scrolled] .site-nav a { font-size: .88rem; padding: 0 .5rem; }
:root[data-scrolled] .search { width: 11rem; }
:root[data-scrolled] .search input { padding-top: .28rem; padding-bottom: .28rem; }
:root[data-scrolled] .theme { width: 1.9rem; height: 1.9rem; }
@media (max-width: 60rem) {
  /* Not enough room for everything on one row: keep the mark and the nav. */
  :root[data-scrolled] .wordmark span, :root[data-scrolled] .search, :root[data-scrolled] .theme { display: none; }
  :root[data-scrolled] .header-bar { grid-template-columns: auto minmax(0, 1fr); grid-template-areas: "brand nav"; column-gap: .75rem; }
}
@media (prefers-reduced-motion: no-preference) {
  .wordmark, .site-nav a { transition: font-size .15s; }
  .tl-month-head { transition: top .15s; }
}

.wordmark {
  display: inline-flex; align-items: center; gap: .5rem;
  font: 700 1.15rem/1 var(--mono); letter-spacing: -.02em;
  color: var(--ink); text-decoration: none; margin-right: auto;
}
.wordmark b { color: var(--accent); font-weight: 700; }
.wordmark svg { fill: none; stroke: var(--accent); stroke-width: 1.7; }
.search input {
  width: 100%;
  font: inherit; font-size: .9rem;
  padding: .4rem .7rem;
  color: var(--ink); background: var(--bg);
  border: 1px solid var(--line); border-radius: 6px;
}
.search input::placeholder { color: var(--muted); }
.theme {
  display: inline-grid; place-items: center; width: 2.1rem; height: 2.1rem;
  background: none; border: 1px solid var(--line); border-radius: 6px; color: var(--ink-2); cursor: pointer;
}
.theme svg { fill: none; stroke: currentColor; stroke-width: 1.6; }
.theme .half { fill: currentColor; stroke: none; }
.site-nav { display: flex; gap: .25rem; min-width: 0; overflow-x: auto; scrollbar-width: none; }
.site-nav::-webkit-scrollbar { display: none; }
.site-nav a {
  flex: none; display: flex; align-items: center; padding: 0 .6rem;
  color: var(--muted); text-decoration: none; font-size: .92rem; font-weight: 500;
  border-bottom: 2px solid transparent;
}
.site-nav a:first-child { padding-left: 0; }
.site-nav a:hover { color: var(--ink); }
.site-nav a[aria-current] { color: var(--ink); border-bottom-color: var(--accent); }

/* ---- layout */
.layout { display: grid; grid-template-columns: minmax(0, 1fr); gap: 0; padding-top: 1rem; padding-bottom: 3rem; }
main { min-width: 0; }
@media (min-width: 60rem) {
  .layout { grid-template-columns: 13.5rem minmax(0, 1fr); gap: 2.5rem; padding-top: 1.75rem; }
  .layout-wide { grid-template-columns: minmax(0, 1fr); }
}

/* ---- sidebar: a horizontal strip on small screens, a sticky rail on large ones */
.sidebar-title { display: none; }
.sidebar nav { display: flex; gap: .4rem; overflow-x: auto; padding-bottom: .75rem; scrollbar-width: none; }
.sidebar nav::-webkit-scrollbar { display: none; }
.svc-group, .svc-group ul { display: contents; }
.svc-group h2 { display: none; }
.svc-group-events a { border-style: dashed; }
.svc-group li { list-style: none; flex: none; }
.svc-group a {
  display: inline-flex; align-items: center; gap: .4rem;
  padding: .28rem .65rem; font-size: .85rem; white-space: nowrap;
  color: var(--ink-2); text-decoration: none;
  background: var(--surface); border: 1px solid var(--line); border-radius: 999px;
}
.svc-group a[aria-current] { color: var(--accent); border-color: var(--accent); background: var(--accent-soft); }
.svc-group .n { font: .72rem var(--mono); color: var(--muted); }
@media (min-width: 60rem) {
  .sidebar { position: sticky; top: calc(var(--pinned) + 1rem); align-self: start; max-height: calc(100vh - var(--pinned) - 2rem); overflow-y: auto; scrollbar-width: thin; }
  .sidebar-title {
    display: block; margin: 0 0 .9rem; font: 600 .72rem var(--mono); text-transform: uppercase; letter-spacing: .08em; color: var(--ink);
  }
  .sidebar-title span { display: block; margin-top: .15rem; font-weight: 400; text-transform: none; letter-spacing: 0; color: var(--muted); }
  .sidebar nav { display: block; overflow: visible; padding: 0; }
  .svc-group { display: block; margin-bottom: 1.1rem; }
  .svc-group ul { display: block; margin: 0; padding: 0; }
  .svc-group h2 { display: block; margin: 0 0 .25rem; font: 400 .72rem var(--mono); color: var(--muted); text-transform: uppercase; letter-spacing: .06em; }
  .svc-group a {
    display: flex; justify-content: space-between; padding: .2rem .5rem; margin-left: -.5rem;
    font-size: .9rem; background: none; border: 0; border-radius: 5px;
  }
  .svc-group a:hover { background: var(--neutral-soft); }
  .svc-group a[aria-current] { background: var(--accent-soft); font-weight: 600; }
  .svc-group-events { margin-top: 1.5rem; padding-top: 1.1rem; border-top: 1px solid var(--line); }
  .svc-group-events a { border: 0; }
  .svc-group h2 span { text-transform: none; letter-spacing: 0; }
}

/* ---- page intros */
.intro h1, .page-head h1, .prose h1 { margin: 0; font-size: clamp(1.5rem, 1.1rem + 1.6vw, 2.1rem); line-height: 1.15; letter-spacing: -.02em; text-wrap: balance; }
.lede { margin: .5rem 0 0; max-width: 42rem; color: var(--ink-2); font-size: 1.02rem; text-wrap: pretty; }
.page-head { margin-bottom: 1.25rem; }
.page-meta, .crumb { margin: .6rem 0 0; font: .8rem var(--mono); color: var(--muted); }
.crumb { margin: 0 0 .4rem; }
.intro { margin-bottom: 1.5rem; }
.stats {
  display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 1px;
  margin: 1.25rem 0 0; background: var(--line); border: 1px solid var(--line); border-radius: 8px; overflow: hidden;
}
.stats div { display: flex; flex-direction: column-reverse; padding: .7rem .85rem .75rem; background: var(--surface); }
.stats div:last-child:nth-child(odd) { grid-column: 1 / -1; }
@media (min-width: 40rem) {
  .stats { grid-template-columns: repeat(5, minmax(0, 1fr)); }
  .stats div:last-child:nth-child(odd) { grid-column: auto; }
}
.stats dd { margin: 0; font: 600 1.6rem/1.1 var(--mono); letter-spacing: -.03em; font-variant-numeric: tabular-nums; }
.stats dt { margin-top: .2rem; font-size: .8rem; line-height: 1.3; }
.stats dt a { color: var(--muted); text-decoration: none; }
.stats dt a:hover { color: var(--accent); text-decoration: underline; }
.stat-ga { color: var(--ga); }
.stat-preview { color: var(--preview); }
.stat-retirement { color: var(--retirement); }
.stats-caption { margin: .4rem 0 0; font: .72rem var(--mono); color: var(--muted); text-transform: uppercase; letter-spacing: .06em; }

/* ---- filters */
.filter-bar { display: grid; gap: .5rem; margin: 0 0 .5rem; }
.filters { display: flex; flex-wrap: wrap; gap: .4rem; }
.filters + .filters .chip { font-size: .8rem; padding: .2rem .7rem; }

/* ---- events */
.spotlight {
  display: flex; align-items: center; gap: .75rem; margin: 0 0 1.25rem; padding: .7rem .9rem;
  color: var(--ink); text-decoration: none;
  background: var(--accent-soft); border: 1px solid var(--accent); border-radius: 8px;
}
.spotlight:hover .spotlight-text { text-decoration: underline; }
.spotlight-label { flex: none; font: 600 .68rem var(--mono); text-transform: uppercase; letter-spacing: .07em; color: var(--accent); }
.spotlight-text { font-size: .95rem; line-height: 1.35; }
.spotlight-go { margin-left: auto; color: var(--accent); }
.event-cards { list-style: none; margin: 0; padding: 0; display: grid; grid-template-columns: repeat(auto-fill, minmax(17rem, 1fr)); gap: 1rem; }
.event-card { padding: 1rem 1.1rem 1.05rem; background: var(--surface); border: 1px solid var(--line); border-radius: 8px; }
.event-card h2 { margin: 0; font-size: 1.1rem; letter-spacing: -.01em; }
.event-card h2 a { color: var(--ink); text-decoration: none; }
.event-card h2 a:hover { color: var(--accent); text-decoration: underline; }
.event-card p { margin: .5rem 0 0; font-size: .92rem; color: var(--ink-2); }
.event-card .event-when, .event-card .event-count { font: .74rem var(--mono); color: var(--muted); }
.event-card .event-when { margin-top: .25rem; }
.section-title { margin: 2.5rem 0 0; font-size: 1.3rem; letter-spacing: -.01em; }
.calendar { list-style: none; margin: 1rem 0 0; padding: 0; max-width: 40rem; }
.calendar li { display: grid; grid-template-columns: 7.5rem minmax(0, 1fr); gap: .75rem; padding: .55rem 0; border-bottom: 1px solid var(--line); }
.calendar time { font: .8rem/1.9 var(--mono); color: var(--muted); }
.calendar a { font-weight: 600; text-decoration: none; }
.calendar a:hover { text-decoration: underline; }
.resources { margin: 0 0 1.5rem; padding: .9rem 1.1rem 1rem; background: var(--surface); border: 1px solid var(--line); border-radius: 8px; }
.resources h2 { margin: 0 0 .4rem; font: 600 .72rem var(--mono); text-transform: uppercase; letter-spacing: .07em; }
.resources ul { list-style: none; margin: 0; padding: 0; }
.resources li { display: flex; flex-wrap: wrap; align-items: baseline; gap: .1rem .7rem; padding: .3rem 0; }
.resources a { font-weight: 600; }
.resources span { font: .74rem var(--mono); color: var(--muted); }
.chip {
  font: 500 .85rem var(--sans); padding: .3rem .8rem; cursor: pointer;
  color: var(--ink-2); background: var(--surface); border: 1px solid var(--line); border-radius: 999px;
}
.chip:hover { border-color: var(--muted); }
.chip[aria-pressed="true"] { color: var(--bg); background: var(--ink); border-color: var(--ink); }

/* ---- item lists */
.day > h2 {
  display: flex; align-items: baseline; gap: .6rem;
  margin: 1.75rem 0 0; padding-bottom: .45rem;
  font: 600 .78rem var(--mono); text-transform: uppercase; letter-spacing: .07em;
  border-bottom: 1px solid var(--ink);
}
.count { font: 400 .75rem var(--mono); color: var(--muted); letter-spacing: 0; }
.items { list-style: none; margin: 0; padding: 0; }
.item { display: grid; grid-template-columns: var(--gutter) minmax(0, 1fr); gap: 0 .75rem; padding: .85rem 0 .9rem; border-bottom: 1px solid var(--line); }
.item h3 { margin: 0; font-size: 1.03rem; line-height: 1.32; font-weight: 600; letter-spacing: -.005em; text-wrap: pretty; }
.item h3 a { color: var(--ink); text-decoration: none; }
.item h3 a:hover { color: var(--accent); text-decoration: underline; }
.item h3 a:visited { color: var(--muted); }
.sum { margin: .25rem 0 0; color: var(--ink-2); font-size: .92rem; line-height: 1.45; max-width: 46rem;
  display: -webkit-box; -webkit-line-clamp: 2; line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; }
.meta { display: flex; flex-wrap: wrap; align-items: center; gap: .3rem .65rem; margin: .45rem 0 0; font: .74rem var(--mono); color: var(--muted); }
.meta .src { color: var(--ink-2); }
.host::before { content: "↗ "; opacity: .7; }
.svcs { display: inline-flex; flex-wrap: wrap; gap: .3rem; }
.svc { padding: .05rem .45rem; color: var(--accent); background: var(--accent-soft); border-radius: 4px; text-decoration: none; }
.svc:hover, .evt:hover { text-decoration: underline; }
.evt { padding: 0 .45rem; color: var(--ink-2); border: 1px solid var(--muted); border-radius: 999px; text-decoration: none; }

.tag {
  justify-self: start; align-self: start; margin-top: .12rem;
  padding: .14rem .45rem; border-radius: 4px;
  font: 600 .68rem/1.3 var(--mono); text-transform: uppercase; letter-spacing: .05em; white-space: nowrap;
  color: var(--ink-2); background: var(--neutral-soft);
}
.tag-ga { color: var(--ga); background: var(--ga-soft); }
.tag-preview { color: var(--preview); background: var(--preview-soft); }
.tag-retirement { color: var(--retirement); background: var(--retirement-soft); }
.tag-dev { color: var(--dev); background: var(--dev-soft); }
.tag-blog, .tag-news, .tag-video, .tag-community, .tag-release, .tag-update { color: var(--muted); background: none; padding-left: 0; font-weight: 500; }

@media (max-width: 34rem) {
  .item { grid-template-columns: minmax(0, 1fr); }
  .tag { margin: 0 0 .3rem; }
  .tag-blog, .tag-news, .tag-video, .tag-community, .tag-release, .tag-update { padding: 0; }
}

.empty { margin: 2rem 0; color: var(--muted); }
.more { margin: 1.5rem 0 0; font-weight: 500; }

/* ---- search results */
#search-results > h2 { margin: 0 0 .25rem; font-size: 1.25rem; letter-spacing: -.01em; }
#search-results > p { margin: 0; font: .8rem var(--mono); color: var(--muted); }

/* ---- archive, sources, prose */
.months { list-style: none; margin: 0; padding: 0; max-width: 28rem; }
.months li { display: flex; justify-content: space-between; align-items: baseline; padding: .6rem 0; border-bottom: 1px solid var(--line); }
.months a { font-weight: 600; text-decoration: none; }
.months a:hover { text-decoration: underline; }

.table-scroll { overflow-x: auto; }
.sources { width: 100%; min-width: 36rem; border-collapse: collapse; font-size: .92rem; }
.sources th { text-align: left; padding: .5rem .75rem .5rem 0; font: 600 .72rem var(--mono); text-transform: uppercase; letter-spacing: .06em; border-bottom: 1px solid var(--ink); white-space: nowrap; }
.sources td { padding: .6rem .75rem .6rem 0; border-bottom: 1px solid var(--line); vertical-align: top; }
.sources .num { text-align: right; font-variant-numeric: tabular-nums; }
.sources .pub { display: block; font: .74rem var(--mono); color: var(--muted); }
.sources time { white-space: nowrap; }
.warn { color: var(--retirement); font: .74rem var(--mono); }

.prose { max-width: 40rem; }
.prose h2 { margin: 2rem 0 .4rem; font-size: 1.15rem; letter-spacing: -.01em; }
.prose p, .prose li { color: var(--ink-2); }
.prose p { margin: .6rem 0; }
.prose ul { padding-left: 1.2rem; }
.prose li { margin: .35rem 0; }

/* ---- footer */
.site-footer { border-top: 1px solid var(--line); padding: 1.5rem 0 2.5rem; font-size: .84rem; color: var(--muted); }
.site-footer p { margin: 0 0 .5rem; max-width: 46rem; }

@media (prefers-reduced-motion: no-preference) {
  .svc-group a, .chip, .item h3 a { transition: color .12s, background-color .12s, border-color .12s; }
}

/* ---- timeline: a rail down the left, a dot per item coloured by what it is */
.tl-rail .yr { display: inline; }
@media (min-width: 60rem) { .tl-rail .yr { display: none; } }
.tl-month { scroll-margin-top: .5rem; }
.tl-month-head {
  position: sticky; top: var(--pinned); z-index: 2;
  display: flex; align-items: flex-end; justify-content: space-between; gap: 1rem;
  margin-top: 2rem; padding: .6rem 0 .5rem;
  background: var(--bg); border-bottom: 1px solid var(--ink);
}
.tl-month:first-child .tl-month-head { margin-top: 1rem; }
.tl-month-head h2 { display: flex; align-items: baseline; gap: .6rem; margin: 0; font-size: 1.25rem; letter-spacing: -.015em; white-space: nowrap; }
.tl-spark { flex: 0 1 auto; min-width: 0; max-width: 55%; height: 30px; overflow: visible; }
.tl-spark rect { fill: var(--accent); }
.tl-spark rect.none { fill: var(--line); }
.tl-spark a:hover rect, .tl-spark a:focus rect { fill: var(--ink); }

.tl-day { position: relative; scroll-margin-top: 3rem; }
.tl-day > h3 {
  display: flex; align-items: baseline; gap: .5rem;
  margin: 0; padding: 1.1rem 0 .35rem;
  font: 600 .78rem var(--mono); text-transform: uppercase; letter-spacing: .07em;
}
.tl-items { position: relative; }
.tl-items::before {
  content: ""; position: absolute; top: .3rem; bottom: .3rem; left: calc(3.4rem + .3rem); width: 1px; background: var(--line);
}
.item.tl-item {
  grid-template-columns: 3.4rem .7rem minmax(0, 1fr); gap: 0 .7rem;
  padding: .42rem 0; border-bottom: 0;
}
.tl-item > time { font: .72rem/1.75 var(--mono); color: var(--muted); text-align: right; font-variant-numeric: tabular-nums; }
.tl-dot {
  position: relative; z-index: 1; justify-self: center; margin-top: .42rem;
  width: .6rem; height: .6rem; border-radius: 50%;
  background: var(--bg); border: 2px solid var(--muted);
}
.tl-dot.tl-ga { background: var(--ga); border-color: var(--ga); }
.tl-dot.tl-preview { background: var(--preview); border-color: var(--preview); }
.tl-dot.tl-retirement { background: var(--retirement); border-color: var(--retirement); }
.tl-dot.tl-dev { background: var(--dev); border-color: var(--dev); }
.tl-dot.tl-update, .tl-dot.tl-news { background: var(--accent); border-color: var(--accent); }
.tl-dot.tl-release { border-radius: 2px; }
.tl-title { margin: 0; font-size: .97rem; line-height: 1.35; font-weight: 600; text-wrap: pretty; }
.tl-title .tag { display: inline-block; margin: 0 .5rem 0 0; vertical-align: .08em; }
.tl-title .tag-blog, .tl-title .tag-news, .tl-title .tag-video, .tl-title .tag-community, .tl-title .tag-release, .tl-title .tag-update { padding: 0; }
.tl-title a { color: var(--ink); text-decoration: none; }
.tl-title a:hover { color: var(--accent); text-decoration: underline; }
.tl-title a:visited { color: var(--muted); }
.tl-sum { margin: .12rem 0 0; font-size: .86rem; line-height: 1.4; color: var(--muted); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.tl-item .meta { margin-top: .2rem; }
.tl-pager { display: flex; flex-wrap: wrap; justify-content: space-between; gap: .5rem 1.5rem; }
@media (max-width: 34rem) {
  .item.tl-item { grid-template-columns: 2.6rem .7rem minmax(0, 1fr); gap: 0 .5rem; }
  .tl-items::before { left: calc(2.6rem + .3rem - .1rem); }
  .tl-title .tag { margin-bottom: 0; }
  .tl-spark { max-width: 48%; }
}
