/* vibeheatmap site styles. Colours come only from brand-core tokens. */
body { background: var(--bg-1); color: var(--text); font-family: var(--font-sans); margin: 0; line-height: 1.5; }
a { color: var(--blue); text-decoration: none; }
a:hover { color: var(--blue-bright); text-decoration: underline; }
.wrap { max-width: 1080px; margin: 0 auto; padding: 0 16px; }
.mute { color: var(--text-dim); }
h1 { font-size: 30px; line-height: 1.2; margin: 0 0 8px; }
h2 { font-size: 19px; margin: 32px 0 10px; }
.ds-card h2 { margin-top: 0; }
h3 { font-size: 17px; margin: 0 0 2px; }

.top { background: var(--surface); border-bottom: 1px solid var(--line); position: sticky; top: 0; z-index: 5; }
.top__row { display: flex; align-items: center; justify-content: space-between; gap: 12px; padding-top: 10px; padding-bottom: 10px; flex-wrap: wrap; }
.brand { display: inline-flex; align-items: center; gap: 8px; }
.brand:hover { text-decoration: none; }
.brand .mark { width: 24px; height: 24px; color: var(--blue); flex: none; }
.ds-wordmark { font-size: 20px; color: var(--text); }
.nav { display: flex; align-items: center; gap: 14px; flex-wrap: wrap; font-size: 14px; }
.nav a { color: var(--text-dim); }
.theme-btn svg { width: 16px; height: 16px; }

.hero { padding: 28px 0 8px; }
.kicker { color: var(--text-dim); font-size: 13px; text-transform: uppercase; letter-spacing: .04em; margin: 0 0 6px; }
.lede { font-size: 17px; color: var(--text-dim); margin: 0 0 8px; max-width: 720px; }
.pager { display: flex; gap: 20px; flex-wrap: wrap; font-size: 14px; }

/* heatmap */
/* How strongly cells take on the heat colour: more on dark backgrounds, where a light mix reads as brown.
   Same theme switch as brand-core's tokens.css (dark is the default). */
:root { --hm-gain: 1.4; --hm-neutral: var(--bg-0); }
@media (prefers-color-scheme: light) { :root:not([data-theme='dark']) { --hm-gain: 0.9; } }
:root[data-theme='light'] { --hm-gain: 0.9; }
.hm-sec { margin-top: 28px; }
.hm-title { font-size: 30px; margin: 0 0 6px; }
.mono, .kicker { font-family: var(--font-mono); }
.hm-bar { display: flex; justify-content: space-between; align-items: center; gap: 12px; flex-wrap: wrap; margin: 16px 0 12px; }
.legend { display: flex; align-items: center; gap: 10px; flex-wrap: wrap; font-size: 15px; font-weight: 500; }
.legend__scale { width: 180px; height: 12px; border-radius: var(--radius-pill);
  background: linear-gradient(90deg, var(--blue), var(--hm-neutral) 50%, oklch(from var(--warn) l calc(c * 1.4) h) 75%, var(--danger)); }
.hot { color: var(--danger); font-weight: 600; }
.cool { color: var(--blue); font-weight: 600; }
.hm-controls { display: flex; gap: 8px; flex-wrap: wrap; }
.seg { display: inline-flex; gap: 2px; padding: 3px; border-radius: var(--radius-md); background: var(--bg-card-2); }
.hm-controls .ds-chip { font-size: 14px; padding: 6px 12px; border-color: transparent; background: none; color: var(--text-dim); }
.hm-controls .ds-chip.is-active { background: var(--bg-1); color: var(--text); border-color: var(--line); box-shadow: 0 1px 2px var(--shadow); }
.hm-controls > .ds-chip { border-color: var(--line-strong); background: var(--bg-1); color: var(--text); }
.hm-controls > .ds-chip.is-active { background: var(--surface-selected); }
.hm-info { display: flex; gap: 8px 22px; flex-wrap: wrap; align-items: baseline; min-height: 24px; margin: 0 0 12px; }
.hm-info b { font-size: 16px; }
.hm-wrap { overflow-x: auto; margin-top: 0; padding: 12px 16px; }
.hm { border-collapse: separate; border-spacing: 0; width: 100%; font-size: 14px; }
.hm th { font-weight: 400; color: var(--text-dim); white-space: nowrap; padding: 2px 4px; }
.hm thead th { font-family: var(--font-mono); font-size: 12px; text-align: center; }
.hm thead th.hm__theme { text-align: left; font-family: var(--font-sans); }
.hm thead th.now { color: var(--text); font-weight: 700; }
.hm .now { background: var(--blue-soft); }
.hm thead th.now { border-radius: var(--radius-sm) var(--radius-sm) 0 0; }
.hm tbody tr:last-child td.now { border-radius: 0 0 var(--radius-sm) var(--radius-sm); }
.now-pill { display: block; width: max-content; margin: 2px auto 0; padding: 0 6px; border-radius: var(--radius-pill);
  background: var(--blue); color: var(--on-accent); font-family: var(--font-sans); font-size: 10px; font-weight: 600; line-height: 16px; }
.hm tbody th { text-align: left; min-width: 200px; padding-right: 12px; }
.hm tbody th a { color: var(--text); }
.hm tr.is-small th a { color: var(--text-mute); }
.hm tr.is-small .hm-cell { opacity: .55; }
.hm td { padding: 3px; min-width: 50px; }
.hm-cell { display: block; height: 30px; border-radius: var(--radius-sm); background: var(--hm-neutral); outline: none; }
.hm-cell.cold {
  --mix: color-mix(in oklab, var(--blue) calc(min(100, var(--h) * 0.95 * var(--hm-gain)) * 1%), var(--hm-neutral));
  background: var(--mix);
  background: oklch(from var(--mix) l calc(c * 1.25) h);
}
.hm-cell.hot {
  --mix: color-mix(in oklab, color-mix(in oklab, var(--danger) calc(var(--h) * 0.8%), var(--warn)) calc(min(100, (22 + var(--h)) * var(--hm-gain)) * 1%), var(--hm-neutral));
  background: var(--mix);
  background: oklch(from var(--mix) l calc(c * 1.9) h); /* tokens mixed with the neutral go muddy; restore the colour */
}
.hm-cell.is-active, .hm-cell:focus-visible { box-shadow: inset 0 0 0 3px var(--text) !important; }
.hm td.hm__n { color: var(--text-dim); text-align: right; padding-left: 12px; font-family: var(--font-mono); white-space: nowrap; }
.hm thead th.hm__n { text-align: right; }
.foot-note { color: var(--text-dim); font-size: 13px; margin: 10px 0 0; }
.hm tbody th, .hm thead th.hm__theme { position: sticky; left: 0; z-index: 1; background: var(--bg-card);
  box-shadow: -16px 0 0 var(--bg-card); /* hide cells scrolling under the card's left padding */ }
@media (max-width: 640px) {
  .hm-wrap { padding: 8px; }
  .hm { font-size: 13px; }
  .hm td { padding: 2px; }
  .hm tbody th { min-width: 120px; max-width: 140px; white-space: normal; line-height: 1.25; }
  .hm td { min-width: 38px; }
  .hm-cell { height: 26px; }
  .hm-title { font-size: 24px; }
}

.grid2 { display: grid; grid-template-columns: 1fr 1fr; gap: 16px; margin-top: 24px; }
@media (max-width: 760px) { .grid2 { grid-template-columns: 1fr; } h1 { font-size: 24px; } }
.ds-card { margin-top: 16px; }
.grid2 > .ds-card, .grid2 > section { margin-top: 0; }
.movers { margin: 0; padding-left: 20px; }
.movers li { margin: 8px 0; }
.mover__n { white-space: nowrap; margin-left: 6px; font-size: 14px; }
.up { color: var(--danger); font-weight: 600; white-space: nowrap; }
.down { color: var(--blue); font-weight: 600; white-space: nowrap; }
.flat { color: var(--text-dim); white-space: nowrap; }

.tbl-wrap { overflow-x: auto; }
.tbl { width: 100%; border-collapse: collapse; font-size: 14px; }
.tbl th, .tbl td { text-align: left; padding: 7px 8px; border-bottom: 1px solid var(--line); }
.tbl th { color: var(--text-dim); font-weight: 600; white-space: nowrap; }
.tbl .num { text-align: right; font-variant-numeric: tabular-nums; }
.sortable th { cursor: pointer; user-select: none; }
.filter { max-width: 360px; margin-top: 8px; }

.theme { border-top: 1px solid var(--line); padding: 20px 0 8px; }
.theme__head { display: flex; justify-content: space-between; gap: 16px; align-items: flex-start; flex-wrap: wrap; }
.theme__head p { margin: 2px 0 0; max-width: 680px; }
.theme__stat { color: var(--text-dim); font-size: 14px; text-align: right; }
.theme__head h3 a { color: var(--text); }
.spark rect { fill: var(--blue); }
.chips-list { list-style: none; padding: 0; margin: 12px 0; display: flex; flex-wrap: wrap; gap: 6px; font-size: 13px; }
.pill { display: inline-flex; align-items: center; gap: 6px; padding: 3px 10px; border: 1px solid var(--line-strong);
  border-radius: var(--radius-pill); color: var(--text); background: var(--bg-card); }
.pill:hover { text-decoration: none; border-color: var(--text-mute); color: var(--text); }
.pill__n { color: var(--text-dim); font-family: var(--font-mono); font-size: 12px; }
.themes-head { display: flex; justify-content: space-between; align-items: center; gap: 12px; flex-wrap: wrap; margin-top: 32px; }
.themes-head h2 { margin: 0; }
.jump { display: inline-flex; align-items: center; gap: 8px; font-size: 14px; }
.theme { scroll-margin-top: 70px; }
.projs { list-style: none; padding: 0; margin: 8px 0; }
.proj { padding: 10px 0; border-bottom: 1px solid var(--line); }
.proj:last-child { border-bottom: 0; }
.proj__head { color: var(--text); }
.proj__head b { font-weight: 600; }
.proj__title { display: block; color: var(--text-dim); font-size: 13px; margin-top: 2px; }
.proj__title:hover { color: var(--text); }
.proj__meta { color: var(--text-dim); font-size: 12px; margin-top: 3px; }
.proj__meta .quiet { color: var(--text-dim); text-decoration: underline; text-decoration-color: var(--line-strong); }
.proj__meta .visit { font-weight: 600; }
.proj__meta .visit span { font-weight: 400; }

.stats { display: flex; gap: 12px; flex-wrap: wrap; }
.stats .ds-card { flex: 1 1 180px; margin-top: 0; }
.stat { font-size: 22px; font-weight: 600; }
.archive li { margin: 6px 0; }
.prose { max-width: 720px; }
.prose li { margin: 6px 0; }
.foot { color: var(--text-mute); font-size: 13px; padding-top: 40px; padding-bottom: 40px; }

/* newsletter signup */
.signup { margin: 18px 0 4px; padding: 14px 16px; border: 1px solid var(--line-strong); border-radius: var(--radius-lg);
  background: var(--bg-card); max-width: 620px; }
.signup--bottom { margin: 40px auto 0; text-align: center; }
.signup__pitch { margin: 0 0 10px; color: var(--text-dim); }
.signup__pitch b { color: var(--text); }
.signup__row { display: flex; gap: 8px; flex-wrap: wrap; }
.signup--bottom .signup__row { justify-content: center; }
.signup__row .ds-field { flex: 1 1 220px; max-width: 360px; }
.signup__msg { margin: 6px 0 0; color: var(--text-dim); }
.signup__msg:empty { display: none; }
.signup.is-done { border-color: var(--success); }
.signup.is-done .signup__msg { color: var(--text); margin: 0; }
.sr-only { position: absolute; width: 1px; height: 1px; padding: 0; margin: -1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; border: 0; }
