/* stx role tokens — override any of these to re-theme by meaning. */
:root {
  --stx-fg: oklch(20.5% 0 0);
  --stx-fg-strong: oklch(37.1% 0 0);
  --stx-fg-muted: oklch(43.9% 0 0);
  --stx-fg-soft: oklch(55.6% 0 0);
  --stx-fg-subtle: oklch(70.8% 0 0);
  --stx-surface: oklch(98.5% 0 0);
  --stx-surface-raised: oklch(97% 0 0);
  --stx-surface-sunken: oklch(92.2% 0 0);
  --stx-panel: #fff;
  --stx-field: #fff;
  --stx-page: oklch(98.5% 0 0);
  --stx-content: #fff;
  --stx-surface-hover: oklch(97% 0 0);
  --stx-surface-raised-hover: oklch(92.2% 0 0);
  --stx-surface-sunken-hover: oklch(87% 0 0);
  --stx-field-hover: oklch(98.5% 0 0);
  --stx-link: oklch(62.3% 0.214 259.815);
  --stx-link-hover: oklch(54.6% 0.245 262.881);
  --stx-inverse: oklch(20.5% 0 0);
  --stx-inverse-ink: #fff;
  --stx-line: oklch(92.2% 0 0);
  --stx-line-strong: oklch(87% 0 0);
  --stx-line-hover: oklch(70.8% 0 0);
  --stx-accent: oklch(54.6% 0.245 262.881);
  --stx-info: oklch(60.9% 0.126 221.723);
  --stx-danger: oklch(57.7% 0.245 27.325);
  --stx-success: oklch(62.7% 0.194 149.214);
  --stx-warning: oklch(68.1% 0.162 75.834);
  --stx-accent-solid: oklch(62.3% 0.214 259.815);
  --stx-info-solid: oklch(71.5% 0.143 215.221);
  --stx-danger-solid: oklch(63.7% 0.237 25.331);
  --stx-success-solid: oklch(72.3% 0.219 149.579);
  --stx-warning-solid: oklch(79.5% 0.184 86.047);
  --stx-accent-solid-hover: oklch(54.6% 0.245 262.881);
  --stx-info-solid-hover: oklch(60.9% 0.126 221.723);
  --stx-danger-solid-hover: oklch(57.7% 0.245 27.325);
  --stx-success-solid-hover: oklch(62.7% 0.194 149.214);
  --stx-warning-solid-hover: oklch(68.1% 0.162 75.834);
  --stx-accent-ink: #fff;
  --stx-info-ink: oklch(20.5% 0 0);
  --stx-danger-ink: #fff;
  --stx-success-ink: oklch(20.5% 0 0);
  --stx-warning-ink: oklch(20.5% 0 0);
  --stx-accent-soft: oklch(93.2% 0.032 255.585);
  --stx-accent-soft-ink: oklch(42.4% 0.199 265.638);
  --stx-info-soft: oklch(95.6% 0.045 203.388);
  --stx-info-soft-ink: oklch(45% 0.085 224.283);
  --stx-danger-soft: oklch(93.6% 0.032 17.717);
  --stx-danger-soft-ink: oklch(44.4% 0.177 26.899);
  --stx-success-soft: oklch(96.2% 0.044 156.743);
  --stx-success-soft-ink: oklch(44.8% 0.119 151.328);
  --stx-warning-soft: oklch(97.3% 0.071 103.193);
  --stx-warning-soft-ink: oklch(47.6% 0.114 61.907);
  --stx-secondary: oklch(55.8% 0.288 302.321);
  --stx-secondary-solid: oklch(62.7% 0.265 303.9);
  --stx-secondary-solid-hover: oklch(55.8% 0.288 302.321);
  --stx-secondary-ink: #fff;
  --stx-secondary-soft: oklch(94.6% 0.033 307.174);
  --stx-secondary-soft-ink: oklch(43.8% 0.218 303.724);
  --stx-danger-fg: oklch(39.6% 0.141 25.723);
  --stx-danger-fg-subtle: oklch(80.8% 0.114 19.571);
  --stx-danger-line: oklch(80.8% 0.114 19.571);
  --stx-danger-focus: oklch(63.7% 0.237 25.331);
}
.dark {
  --stx-fg: oklch(97% 0 0);
  --stx-fg-strong: oklch(87% 0 0);
  --stx-fg-muted: oklch(70.8% 0 0);
  --stx-fg-soft: oklch(70.8% 0 0);
  --stx-fg-subtle: oklch(55.6% 0 0);
  --stx-surface: oklch(26.9% 0 0);
  --stx-surface-raised: oklch(37.1% 0 0);
  --stx-surface-sunken: oklch(37.1% 0 0);
  --stx-panel: oklch(26.9% 0 0);
  --stx-field: oklch(37.1% 0 0);
  --stx-page: oklch(20.5% 0 0);
  --stx-content: oklch(20.5% 0 0);
  --stx-surface-hover: oklch(37.1% 0 0);
  --stx-surface-raised-hover: oklch(43.9% 0 0);
  --stx-surface-sunken-hover: oklch(43.9% 0 0);
  --stx-field-hover: oklch(43.9% 0 0);
  --stx-link: oklch(70.7% 0.165 254.624);
  --stx-link-hover: oklch(80.9% 0.105 251.813);
  --stx-inverse: oklch(37.1% 0 0);
  --stx-inverse-ink: #fff;
  --stx-line: oklch(37.1% 0 0);
  --stx-line-strong: oklch(43.9% 0 0);
  --stx-line-hover: oklch(55.6% 0 0);
  --stx-accent: oklch(70.7% 0.165 254.624);
  --stx-info: oklch(78.9% 0.154 211.53);
  --stx-danger: oklch(70.4% 0.191 22.216);
  --stx-success: oklch(79.2% 0.209 151.711);
  --stx-warning: oklch(85.2% 0.199 91.936);
  --stx-accent-solid: oklch(54.6% 0.245 262.881);
  --stx-info-solid: oklch(60.9% 0.126 221.723);
  --stx-danger-solid: oklch(57.7% 0.245 27.325);
  --stx-success-solid: oklch(62.7% 0.194 149.214);
  --stx-warning-solid: oklch(68.1% 0.162 75.834);
  --stx-accent-solid-hover: oklch(48.8% 0.243 264.376);
  --stx-info-solid-hover: oklch(52% 0.105 223.128);
  --stx-danger-solid-hover: oklch(50.5% 0.213 27.518);
  --stx-success-solid-hover: oklch(52.7% 0.154 150.069);
  --stx-warning-solid-hover: oklch(55.4% 0.135 66.442);
  --stx-accent-ink: #fff;
  --stx-info-ink: oklch(20.5% 0 0);
  --stx-danger-ink: #fff;
  --stx-success-ink: oklch(20.5% 0 0);
  --stx-warning-ink: oklch(20.5% 0 0);
  --stx-accent-soft: oklch(37.9% 0.146 265.522);
  --stx-accent-soft-ink: oklch(88.2% 0.059 254.128);
  --stx-info-soft: oklch(39.8% 0.07 227.392);
  --stx-info-soft-ink: oklch(91.7% 0.08 205.041);
  --stx-danger-soft: oklch(39.6% 0.141 25.723);
  --stx-danger-soft-ink: oklch(88.5% 0.062 18.334);
  --stx-success-soft: oklch(39.3% 0.095 152.535);
  --stx-success-soft-ink: oklch(92.5% 0.084 155.995);
  --stx-warning-soft: oklch(42.1% 0.095 57.708);
  --stx-warning-soft-ink: oklch(94.5% 0.129 101.54);
  --stx-secondary: oklch(71.4% 0.203 305.504);
  --stx-secondary-solid: oklch(55.8% 0.288 302.321);
  --stx-secondary-solid-hover: oklch(49.6% 0.265 301.924);
  --stx-secondary-ink: #fff;
  --stx-secondary-soft: oklch(38.1% 0.176 304.987);
  --stx-secondary-soft-ink: oklch(90.2% 0.063 306.703);
  --stx-danger-fg: oklch(80.8% 0.114 19.571);
  --stx-danger-fg-subtle: oklch(63.7% 0.237 25.331);
  --stx-danger-line: oklch(57.7% 0.245 27.325);
  --stx-danger-focus: oklch(70.4% 0.191 22.216);
}
/* stx shape tokens — a radius by what the thing is. */
:root {
  --stx-radius-control: 0.375rem;
  --stx-radius-panel: 0.5rem;
  --stx-radius-pill: 9999px;
}
/* stx density tokens — how much room a control or a table cell takes. */
:root {
  --stx-control-px: 1rem;
  --stx-control-py: 0.5rem;
  --stx-control-text: 1rem;
  --stx-control-leading: 1.5rem;
  --stx-cell-px: 1.5rem;
  --stx-cell-py: 1rem;
  --stx-cell-text: 0.875rem;
  --stx-cell-leading: 1.25rem;
  --stx-cell-head-py: 0.75rem;
  --stx-cell-head-text: 0.75rem;
  --stx-cell-head-leading: 1rem;
}
@layer tc-base {
/*
! Tailwind CSS Preflight | MIT License | https://tailwindcss.com
*/

/*
  The fallback is a neutral grey, not currentColor.

  currentColor makes every border whose colour was never set take the TEXT
  colour, which is near-black on a light page and near-white on a dark one.
  That is never what an author means by a divider: the divide-* and
  border-width utilities set a width and no colour, so a plain divide-y
  rendered as a heavy black rule instead of a hairline.

  It also punished the obvious workaround. Setting border-color on a parent
  does not reach divide-* children, because divide targets
  "> :not([hidden]) ~ :not([hidden])" and the child declaration from this
  block wins.

  Tailwind preflight resolves this the same way (its default is gray-200).
  --border-color stays the escape hatch: set it once on :root, or per
  theme, and every uncoloured border follows.
*/
*,
::before,
::after {
  box-sizing: border-box;
  border-width: 0;
  border-style: solid;
  border-color: var(--border-color, #e5e7eb);
}

::before,
::after {
  --tc-content: '';
}

html,
:host {
  line-height: 1.5;
  -webkit-text-size-adjust: 100%;
  -moz-tab-size: 4;
  tab-size: 4;
  font-family: ui-sans-serif, system-ui, sans-serif;
  font-feature-settings: normal;
  font-variation-settings: normal;
  -webkit-tap-highlight-color: transparent;
}

body {
  margin: 0;
  line-height: inherit;
}

hr {
  height: 0;
  color: inherit;
  border-top-width: 1px;
}

abbr:where([title]) {
  text-decoration: underline dotted;
}

h1,
h2,
h3,
h4,
h5,
h6 {
  font-size: inherit;
  font-weight: inherit;
}

a {
  color: inherit;
  text-decoration: inherit;
}

b,
strong {
  font-weight: bolder;
}

code,
kbd,
samp,
pre {
  font-family: ui-monospace, SFMono-Regular, Menlo, Monaco, Consolas, "Liberation Mono", "Courier New", monospace;
  font-feature-settings: normal;
  font-variation-settings: normal;
  font-size: 1em;
}

small {
  font-size: 80%;
}

sub,
sup {
  font-size: 75%;
  line-height: 0;
  position: relative;
  vertical-align: baseline;
}

sub {
  bottom: -0.25em;
}

sup {
  top: -0.5em;
}

table {
  text-indent: 0;
  border-color: var(--border-color, inherit);
  border-collapse: collapse;
}

button,
input,
optgroup,
select,
textarea {
  font-family: inherit;
  font-feature-settings: inherit;
  font-variation-settings: inherit;
  font-size: 100%;
  font-weight: inherit;
  line-height: inherit;
  letter-spacing: inherit;
  color: inherit;
  margin: 0;
  padding: 0;
}

button,
select {
  text-transform: none;
}

button,
input:where([type='button']),
input:where([type='reset']),
input:where([type='submit']) {
  -webkit-appearance: button;
  background-color: transparent;
  background-image: none;
}

:-moz-focusring {
  outline: auto;
}

:-moz-ui-invalid {
  box-shadow: none;
}

progress {
  vertical-align: baseline;
}

::-webkit-inner-spin-button,
::-webkit-outer-spin-button {
  height: auto;
}

[type='search'] {
  -webkit-appearance: textfield;
  outline-offset: -2px;
}

::-webkit-search-decoration {
  -webkit-appearance: none;
}

::-webkit-file-upload-button {
  -webkit-appearance: button;
  font: inherit;
}

summary {
  display: list-item;
}

blockquote,
dl,
dd,
h1,
h2,
h3,
h4,
h5,
h6,
hr,
figure,
p,
pre {
  margin: 0;
}

fieldset {
  margin: 0;
  padding: 0;
}

legend {
  padding: 0;
}

ol,
ul,
menu {
  list-style: none;
  margin: 0;
  padding: 0;
}

dialog {
  padding: 0;
}

textarea {
  resize: vertical;
}

input::placeholder,
textarea::placeholder {
  opacity: 1;
  color: color-mix(in oklab, currentColor 50%, transparent);
}

button,
[role="button"] {
  cursor: pointer;
}

:disabled {
  cursor: default;
}

img,
svg,
video,
canvas,
audio,
iframe,
embed,
object {
  display: block;
  vertical-align: middle;
}

img,
video {
  max-width: 100%;
  height: auto;
}

[hidden] {
  display: none;
}
}

@layer tc-base {
html:has(meta[name="stx-layout-group"][content="app"]) { color-scheme: light;
  --bg: #fbfbfc; --panel: #ffffff; --border: rgba(15,23,42,0.08);
  --text: #0b1220; --text-2: #4b5563; --text-3: #667085; --accent: #059669; --accent-ink: #04120d; --bar: rgba(5,150,105,0.16);
  --accent-text: #047857; --good: #047857; --bad: #c93434; --warn: #b45309;
  --sans: 'Geist', ui-sans-serif, system-ui, sans-serif;
  --mono: 'Geist Mono', ui-monospace, SFMono-Regular, Menlo, monospace; }
@media (prefers-color-scheme: dark) { html:has(meta[name="stx-layout-group"][content="app"]) { color-scheme: dark; --bg: #080b12; --panel: #0f131c; --border: rgba(148,163,184,0.12);
  --text: #f2f5f9; --text-2: #b0b9c8; --text-3: #7b879a; --accent: #34d399; --accent-ink: #04120d; --bar: rgba(52,211,153,0.18);
  --accent-text: #34d399; --good: #34d399; --bad: #f87171; --warn: #fbbf24; } }
html:has(meta[name="stx-layout-group"][content="app"])[data-theme="dark"] { color-scheme: dark; --bg: #080b12; --panel: #0f131c; --border: rgba(148,163,184,0.12);
  --text: #f2f5f9; --text-2: #b0b9c8; --text-3: #7b879a; --accent: #34d399; --accent-ink: #04120d; --bar: rgba(52,211,153,0.18);
  --accent-text: #34d399; --good: #34d399; --bad: #f87171; --warn: #fbbf24; }
html:has(meta[name="stx-layout-group"][content="app"])[data-theme="light"] { color-scheme: light;
  --bg: #fbfbfc; --panel: #ffffff; --border: rgba(15,23,42,0.08);
  --text: #0b1220; --text-2: #4b5563; --text-3: #667085; --accent: #059669; --accent-ink: #04120d; --bar: rgba(5,150,105,0.16);
  --accent-text: #047857; --good: #047857; --bad: #c93434; --warn: #b45309;
  --sans: 'Geist', ui-sans-serif, system-ui, sans-serif;
  --mono: 'Geist Mono', ui-monospace, SFMono-Regular, Menlo, monospace; }
html:has(meta[name="stx-layout-group"][content="auth"]) { color-scheme: dark;
  --bg: #0a0c0e; --panel: #101317; --border: rgba(233,238,240,0.12);
  --text: #eef2f3; --text-2: #9aa4a9; --text-3: #7b878c;
  --accent: #46d3c0; --accent-ink: #04201c; --danger: #f87171;
  --sans: 'Geist', ui-sans-serif, system-ui, sans-serif; --mono: 'Geist Mono', ui-monospace, monospace; }
@media (prefers-color-scheme: light) { html:has(meta[name="stx-layout-group"][content="auth"]):not([data-theme="dark"]) { color-scheme: light;
  --bg: #fafbfb; --panel: #ffffff; --border: rgba(12,18,20,0.12);
  --text: #0c1214; --text-2: #4e5a5f; --text-3: #5f6b72;
  --accent: #0f7c72; --accent-ink: #ffffff; --danger: #c93434; } }
html:has(meta[name="stx-layout-group"][content="auth"])[data-theme="light"] { color-scheme: light;
  --bg: #fafbfb; --panel: #ffffff; --border: rgba(12,18,20,0.12);
  --text: #0c1214; --text-2: #4e5a5f; --text-3: #5f6b72;
  --accent: #0f7c72; --accent-ink: #ffffff; --danger: #c93434; }
}

@layer tc-base {
html:has(meta[name="stx-layout-group"][content="app"]) body, html:has(meta[name="stx-layout-group"][content="auth"]) body { background: var(--bg); color: var(--text); font-family: var(--sans); -webkit-font-smoothing: antialiased; }
.wordmark { font-weight: 700; letter-spacing: -0.03em; }
.theme-toggle-btn { display: inline-grid; place-items: center; width: 36px; height: 36px; padding: 0; flex-shrink: 0;
  border: 1px solid var(--border); border-radius: 10px; background: var(--panel); color: var(--text-2); cursor: pointer;
  transition: color 0.15s ease, border-color 0.15s ease; }
.theme-toggle-btn:hover { color: var(--text); border-color: color-mix(in srgb, var(--accent) 45%, var(--border)); }
.theme-toggle-btn:focus-visible { outline: 2px solid var(--accent); outline-offset: 2px; }
.theme-toggle-btn i { width: 1rem; height: 1rem; }
.theme-toggle-btn .ic-moon, :root[data-theme="light"] .theme-toggle-btn .ic-sun { display: none; }
:root[data-theme="light"] .theme-toggle-btn .ic-moon { display: block; }
}

@layer tc-base {
.panel { background: var(--panel); border: 1px solid var(--border); border-radius: 12px; }
.visit + .visit { margin-top: 12px; }
@keyframes skeleton-pulse { 0%, 100% { opacity: 0.5; } 50% { opacity: 0.9; } }
}

@layer tc-base {
.pill { border-radius: 999px; transition: color 0.15s ease, border-color 0.15s ease, background-color 0.15s ease; }

.workspace-header {
  border-bottom: 1px solid var(--border);
}
.workspace-primary,
.workspace-range {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
}
.workspace-primary { padding: 0 0 1.1rem; }
.workspace-range { padding: 0.85rem 0; }
.workspace-brand,
.workspace-actions,
.range-presets,
.range-actions {
  display: flex;
  align-items: center;
  gap: 0.5rem;
}
.workspace-brand { min-width: 0; gap: 0.9rem; }
.workspace-actions { flex-shrink: 0; }
.site-switcher {
  min-width: 11rem;
  max-width: 18rem;
  height: 2.25rem;
  padding: 0 0.75rem;
  font-size: 0.875rem;
  font-weight: 500;
}
.site-static {
  max-width: 18rem;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
  color: var(--text-2);
  font: 500 0.875rem/1 var(--sans, ui-sans-serif);
}
.range-presets {
  gap: 0;
  padding: 0.2rem;
  border: 1px solid var(--border);
  border-radius: 10px;
  background: var(--panel);
}
.range-link {
  min-width: 2.75rem;
  padding: 0.48rem 0.7rem;
  border-radius: 7px;
  color: var(--text-2);
  font: 600 0.8125rem/1 var(--sans, ui-sans-serif);
  text-align: center;
  text-decoration: none;
  transition: color 0.15s ease, background-color 0.15s ease;
}
.range-link:hover { color: var(--text); }
/* "true", not "page": the range links all point at this same page, and the stx
   router's markCurrent() strips aria-current="page" from any link whose href is
   not the current pathname. A query-only href never is, so the active range lost
   its highlight on every load. "true" (the current item in a set) is also the
   accurate value for a picker, and the router leaves it alone. */
.range-link[aria-current="true"] {
  background: var(--accent);
  color: var(--accent-ink);
}
.range-tool {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 0.4rem;
  min-height: 2.25rem;
  padding: 0 0.72rem;
  border: 1px solid var(--border);
  border-radius: 9px;
  background: var(--panel);
  color: var(--text-2);
  font: 600 0.8125rem/1 var(--sans, ui-sans-serif);
  text-decoration: none;
  cursor: pointer;
  transition: color 0.15s ease, border-color 0.15s ease, background-color 0.15s ease, transform 0.15s ease;
}
.range-tool:hover { color: var(--text); border-color: var(--accent); }
.range-tool:active { transform: scale(0.98); }
html:has(meta[name="stx-layout-group"][content="app"]) .range-tool:focus-visible, html:has(meta[name="stx-layout-group"][content="app"]) .range-link:focus-visible, html:has(meta[name="stx-layout-group"][content="app"]) .chrome-btn:focus-visible, html:has(meta[name="stx-layout-group"][content="app"]) .icon-btn:focus-visible, html:has(meta[name="stx-layout-group"][content="app"]) select.panel:focus-visible, html:has(meta[name="stx-layout-group"][content="app"]) input:focus-visible, html:has(meta[name="stx-layout-group"][content="app"]) textarea:focus-visible, html:has(meta[name="stx-layout-group"][content="app"]) summary:focus-visible {
  outline: 2px solid var(--accent);
  outline-offset: 2px;
}
.range-tool.is-active { color: var(--accent-ink); background: var(--accent); border-color: var(--accent); }
.range-tool i { width: 1rem; height: 1rem; }
.date-menu { position: relative; }
.date-menu > summary { list-style: none; }
.date-menu > summary::-webkit-details-marker { display: none; }
.date-popover {
  position: absolute;
  right: 0;
  top: calc(100% + 0.5rem);
  z-index: 40;
  width: min(44rem, calc(100vw - 2.5rem));
  padding: 0.75rem;
  border: 1px solid var(--border);
  border-radius: 12px;
  background: var(--panel);
  box-shadow: 0 18px 50px color-mix(in srgb, var(--text) 10%, transparent);
}
/* Period picker: presets down the left, two months on the right. The range is
   drawn flat with rounded ends, the way Fathom's is, on the --bar wash the KPI
   bars already use so it reads as the same accent at the same strength. */
.drp-backdrop { position: fixed; inset: 0; z-index: 39; background: transparent; cursor: default; }
.drp { display: grid; grid-template-columns: 10.5rem minmax(0, 1fr); gap: 0.75rem; }
.drp-presets { display: flex; flex-direction: column; gap: 0.15rem; padding-right: 0.75rem; border-right: 1px solid var(--border); }
.drp-preset {
  display: block;
  width: 100%;
  padding: 0.5rem 0.7rem;
  border: 0;
  border-radius: 8px;
  background: transparent;
  color: var(--text-2);
  font: 500 0.8125rem/1.2 var(--sans, ui-sans-serif);
  text-align: left;
  cursor: pointer;
}
.drp-preset:hover { color: var(--text); background: color-mix(in srgb, var(--text) 6%, transparent); }
.drp-preset.is-active { color: var(--accent-ink); background: var(--accent); }
.drp-cals { display: grid; grid-template-columns: 1fr 1fr; gap: 1rem; }
.drp-head { display: grid; grid-template-columns: 2rem minmax(0, 1fr) minmax(0, 1fr) 2rem; align-items: center; gap: 0.35rem; margin-bottom: 0.5rem; }
.drp-nav {
  display: inline-grid;
  place-items: center;
  width: 2rem;
  height: 2rem;
  padding: 0;
  border: 1px solid transparent;
  border-radius: 8px;
  background: transparent;
  color: var(--text-2);
  cursor: pointer;
}
.drp-nav:hover { color: var(--text); border-color: var(--border); }
.drp-nav svg { width: 1rem; height: 1rem; }
.drp-nav.is-hidden { visibility: hidden; }
.drp-sel {
  min-width: 0;
  height: 2rem;
  padding: 0 0.5rem;
  border: 1px solid var(--border);
  border-radius: 8px;
  background: var(--bg);
  color: var(--text);
  font: 600 0.8125rem/1 var(--sans, ui-sans-serif);
}
.drp-dow, .drp-grid { display: grid; grid-template-columns: repeat(7, minmax(0, 1fr)); }
.drp-dow span { padding: 0.25rem 0; color: var(--text-3); font: 600 0.7rem/1.2 var(--sans, ui-sans-serif); text-align: center; }
.drp-day {
  height: 2.25rem;
  padding: 0;
  border: 0;
  border-radius: 0;
  background: transparent;
  color: var(--text);
  font: 500 0.8125rem/1 var(--mono, ui-monospace);
  cursor: pointer;
}
.drp-day:hover { background: color-mix(in srgb, var(--accent) 22%, transparent); }
.drp-day.is-out { color: var(--text-3); }
.drp-day.is-today { font-weight: 700; text-decoration: underline; text-underline-offset: 3px; }
.drp-day.is-range { background: var(--bar); }
.drp-day.is-edge { background: var(--accent); color: var(--accent-ink); border-radius: 8px; }
.drp-day.is-disabled { color: var(--text-3); opacity: 0.45; cursor: default; }
.drp-day.is-disabled:hover { background: transparent; }
.drp-day:focus-visible { outline: 2px solid var(--accent); outline-offset: -2px; border-radius: 8px; }
/* Live now strip. A quiet row under the header rather than a panel: it is read
   at a glance and should not compete with the numbers below it. */
.live-strip {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 0.5rem 1rem;
  padding: 0.65rem 0.9rem;
  border: 1px solid var(--border);
  border-radius: 12px;
  background: var(--panel);
}
.live-head { display: inline-flex; align-items: center; gap: 0.5rem; color: var(--text-2); font-size: 0.8125rem; }
.live-head strong { color: var(--text); font-size: 0.9375rem; }
.live-dot-base { position: relative; display: inline-block; width: 8px; height: 8px; border-radius: 999px; }
.live-places { display: flex; flex-wrap: wrap; gap: 0.4rem; margin: 0; padding: 0; list-style: none; }
.live-place {
  display: inline-flex;
  align-items: center;
  gap: 0.4rem;
  padding: 0.25rem 0.6rem;
  border: 1px solid var(--border);
  border-radius: 999px;
  color: var(--text-2);
  font-size: 0.8125rem;
  white-space: nowrap;
}
.live-place b { color: var(--text); font-weight: 600; font-size: 0.75rem; }
.live-flag { font-size: 0.9rem; line-height: 1; }
.live-muted { color: var(--text-3); font-size: 0.8125rem; }

/* Traffic chart. Gridlines and labels are HTML laid over the SVG at the same
   percentages the SVG scale uses, so text stays crisp under preserveAspectRatio="none". */
.chart-head { display: flex; flex-wrap: wrap; align-items: flex-end; justify-content: space-between; gap: 0.75rem; margin-bottom: 1.1rem; }
.chart-sum { margin-top: 0.35rem; color: var(--text-2); font-size: 0.875rem; }
.chart-sum b { color: var(--text); font-size: 1.05rem; font-weight: 600; }
.chart-dot { margin: 0 0.35rem; color: var(--text-3); }
.ga-grid { position: absolute; left: 0; right: 0; border-top: 1px dashed var(--border); pointer-events: none; }
.ga-ylab { position: absolute; left: 0; bottom: 2px; padding-right: 4px; background: var(--panel); color: var(--text-3); font-size: 0.6875rem; line-height: 1; }
.ga-xlab { position: absolute; top: 0; transform: translateX(-50%); white-space: nowrap; }
.ga-x-start { transform: none; }
.ga-x-end { transform: translateX(-100%); }

/* Account menu. Positioned like the date picker's popover; .drp-backdrop (shared)
   covers the page while it is open so a click elsewhere closes it. */
.account-menu { position: relative; }
.account-menu > summary { list-style: none; }
.account-menu > summary::-webkit-details-marker { display: none; }
.account-trigger {
  display: inline-flex;
  align-items: center;
  gap: 0.35rem;
  padding: 0.25rem 0.45rem 0.25rem 0.25rem;
  border: 1px solid var(--border);
  border-radius: 999px;
  background: var(--panel);
  color: var(--text-2);
  cursor: pointer;
  transition: border-color 0.15s ease;
}
.account-trigger:hover,
.account-menu[open] > .account-trigger { border-color: var(--accent); }
.account-trigger:focus-visible { outline: 2px solid var(--accent); outline-offset: 2px; }
.account-avatar {
  display: inline-grid;
  place-items: center;
  width: 1.9rem;
  height: 1.9rem;
  border-radius: 999px;
  background: var(--accent);
  color: var(--accent-ink);
  font: 600 0.8125rem/1 var(--sans, ui-sans-serif);
}
.account-chevron { width: 0.9rem; height: 0.9rem; transition: transform 0.15s ease; }
.account-menu[open] .account-chevron { transform: rotate(180deg); }
.account-pop {
  position: absolute;
  right: 0;
  top: calc(100% + 0.5rem);
  z-index: 40;
  width: 15rem;
  padding: 0.4rem;
  border: 1px solid var(--border);
  border-radius: 12px;
  background: var(--panel);
  box-shadow: 0 12px 32px -12px rgb(0 0 0 / 0.25);
}
.account-who { display: flex; flex-direction: column; gap: 0.15rem; padding: 0.55rem 0.65rem 0.65rem; border-bottom: 1px solid var(--border); margin-bottom: 0.3rem; min-width: 0; }
.account-who strong { color: var(--text); font-size: 0.8125rem; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.account-who span { color: var(--text-3); font-size: 0.75rem; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.account-item {
  display: flex;
  align-items: center;
  gap: 0.6rem;
  width: 100%;
  padding: 0.55rem 0.65rem;
  border: 0;
  border-radius: 8px;
  background: transparent;
  color: var(--text-2);
  font: 500 0.8125rem/1.2 var(--sans, ui-sans-serif);
  text-align: left;
  text-decoration: none;
  cursor: pointer;
}
.account-item:hover,
.account-item:focus-visible { background: color-mix(in srgb, var(--accent) 10%, transparent); color: var(--text); outline: none; }
.account-item i { width: 1rem; height: 1rem; color: var(--text-3); }
.account-sep { height: 1px; margin: 0.3rem 0.2rem; background: var(--border); }
.theme-btn .lbl-light, .theme-btn .lbl-dark { display: none; }
.theme-btn[data-t="light"] .lbl-light { display: inline; }
.theme-btn[data-t="dark"] .lbl-dark { display: inline; }
.range-icon { padding-left: 0; padding-right: 0; min-width: 2.25rem; justify-content: center; }
/* Arrives from the account menu's #site-settings link with room above it. */
#site-settings { scroll-margin-top: 1.25rem; }
.site-settings-shell > summary {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
  width: 100%;
  padding: 0.9rem 1rem;
  border: 0;
  border-radius: inherit;
  background: transparent;
  color: var(--text);
  cursor: pointer;
  text-align: left;
  list-style: none;
}
.site-settings-shell > summary::-webkit-details-marker { display: none; }
.site-settings-title { display: flex; align-items: center; gap: 0.7rem; min-width: 0; }
.site-settings-title i { width: 1.1rem; height: 1.1rem; color: var(--text-2); }
.site-settings-title strong { display: block; font-size: 0.875rem; line-height: 1.25; }
.site-settings-title span { display: block; margin-top: 0.18rem; color: var(--text-3); font-size: 0.75rem; line-height: 1.35; }
.settings-chevron { width: 1rem; height: 1rem; flex-shrink: 0; color: var(--text-3); transition: transform 0.15s ease; }
.site-settings-shell[open] .settings-chevron { transform: rotate(180deg); }
.site-settings-shell:not([open]) ~ .site-settings-panel { display: none; }
.site-settings-panel { margin-bottom: 0.75rem; }

@media (max-width: 1023px) {
  .workspace-primary,
  .workspace-range { align-items: stretch; flex-direction: column; }
  .workspace-brand,
  .workspace-actions,
  .range-actions { width: 100%; flex-wrap: wrap; }
  .workspace-actions { justify-content: flex-start; }
  .site-switcher { min-width: 0; max-width: none; flex: 1; }
  .range-presets { width: 100%; overflow-x: auto; }
  .range-link { flex: 1 0 auto; }
  .range-actions { justify-content: flex-start; }
  .date-menu { position: static; }
  .date-popover { left: 0; right: auto; width: calc(100vw - 2rem); max-height: calc(100dvh - 6rem); overflow-y: auto; overscroll-behavior: contain; }
  .drp { grid-template-columns: minmax(0, 1fr); }
  .drp-presets { flex-direction: row; flex-wrap: wrap; gap: 0.35rem; padding: 0 0 0.6rem; border-right: 0; border-bottom: 1px solid var(--border); }
  .drp-preset { width: auto; padding: 0.45rem 0.65rem; border: 1px solid var(--border); border-radius: 999px; }
  .drp-cals { grid-template-columns: minmax(0, 1fr); }
  .drp-cal.is-right { display: none; }
  .drp-cal.is-left .drp-nav.is-hidden { visibility: visible; }
  .drp-day { height: 2.5rem; }
}

/* Site switcher. Surface, border and radius come from .panel. The native menu remains
  an operating-system control, while the surrounding shell gives it enough room to
  avoid colliding with adjacent actions. */
html:has(meta[name="stx-layout-group"][content="app"]) select.panel {
  cursor: pointer;
  transition: border-color 0.15s ease;
}
html:has(meta[name="stx-layout-group"][content="app"]) select.panel:hover { border-color: var(--accent); }

/* Map tooltips, themed. ts-maps binds and positions these itself, but only its
  own stylesheet makes them work, and it is linked above rather than restated
  here -- a subset is not enough. Two separate things break without it, and only
  one is visible. Every .tsmap-pane defaults to position:static, so the tooltip
  rendered in normal flow under the map, full width and transparent: bound,
  built, unstyled. Less obvious, the pane holding the country polygons is an
  <svg pointer-events="none">, and it is the vendor rule re-enabling
  `path.tsmap-interactive` that lets a pointer reach a country at all -- without
  it nothing on the map is hoverable OR clickable, so the click-to-filter below
  never fired either.
  Loading the whole file is safe: all 88 of its top-level rules are keyed on a
  .tsmap- class, and those exist only inside #country-map.
  What is overridden here is presentation only. The vendor tooltip is a white
  box with #222 text and a white arrow, which is unreadable on this palette;
  these rules restate it in the same chrome as .ga-tip below, so the map and the
  traffic chart answer a hover the same way. */
/* The sea. ts-maps paints its container with --tsmap-tile-bg, a light grey
  matched to a light basemap, so in dark mode the map sat in a pale grey slab.
  (Before 0.3.15 it also removed the inline background:var(--bg) the markup
  sets on the first zoom.) Pointing the engine's own token at ours fixes both
  themes, and a theme flip needs no script because it is plain CSS. */
#country-map.tsmap-container { --tsmap-tile-bg: var(--bg); background: var(--bg); }
/* Land with no visits, and the base every visited country's fill is mixed from
  (styleFor in the map script). A step off the sea toward the text colour, so
  it reads as land on either palette. */
#country-map { --map-land: color-mix(in srgb, var(--text) 8%, var(--bg)); }

#country-map .tsmap-tooltip {
  padding: 6px 9px; border-radius: 8px;
  background: var(--panel); border: 1px solid var(--border); color: var(--text-2);
  font-size: 12px; line-height: 1.4;
  box-shadow: 0 8px 24px rgba(0,0,0,0.28);
}
/* The arrow is drawn as a border triangle, so its colour is set per direction
  and each one has to be re-pointed at the panel token separately. */
#country-map .tsmap-tooltip-top:before { border-top-color: var(--panel); }
#country-map .tsmap-tooltip-bottom:before { border-bottom-color: var(--panel); }
#country-map .tsmap-tooltip-left:before { border-left-color: var(--panel); }
#country-map .tsmap-tooltip-right:before { border-right-color: var(--panel); }

html:has(meta[name="stx-layout-group"][content="app"]) .bar { animation: grow 0.6s cubic-bezier(0.16,1,0.3,1); transform-origin: bottom; }
@keyframes grow { from { transform: scaleY(0); } to { transform: scaleY(1); } }
html:has(meta[name="stx-layout-group"][content="app"]) .reveal { opacity: 0; transform: translateY(10px); animation: reveal 0.5s cubic-bezier(0.16,1,0.3,1) forwards; }
@keyframes reveal { to { opacity: 1; transform: none; } }
@media (prefers-reduced-motion: reduce) { html:has(meta[name="stx-layout-group"][content="app"]) .bar, html:has(meta[name="stx-layout-group"][content="app"]) .reveal { animation: none; opacity: 1; transform: none; } }

/* Live "current visitors" badge: expanding halo ring behind the dot (only when > 0). */
html:has(meta[name="stx-layout-group"][content="app"]) .live-dot::after { content: ''; position: absolute; inset: 0; border-radius: 999px; background: var(--accent); animation: livepulse 2s cubic-bezier(0.16,1,0.3,1) infinite; }
@keyframes livepulse { 0% { transform: scale(1); opacity: 0.55; } 100% { transform: scale(2.8); opacity: 0; } }
@media (prefers-reduced-motion: reduce) { html:has(meta[name="stx-layout-group"][content="app"]) .live-dot::after { animation: none; opacity: 0; } }

/* Live visitors on the map: one dot per country with someone online, the same
   halo as the badge above. Sized by the map script, centred by DivIcon's anchor. */
#country-map .live-pin { position: absolute; pointer-events: auto; }
#country-map .live-pin i { position: absolute; inset: 0; border-radius: 999px; background: var(--accent); box-shadow: 0 0 0 2px var(--panel); }
#country-map .live-pin i::after { content: ''; position: absolute; inset: 0; border-radius: 999px; background: var(--accent); animation: livepulse 2s cubic-bezier(0.16,1,0.3,1) infinite; }
@media (prefers-reduced-motion: reduce) { #country-map .live-pin i::after { animation: none; opacity: 0; } }

/* Timeseries area+line chart: CSS-only hover tooltips + markers. Columns are transparent
  full-height hover targets; dots align to the SVG line via the same (i+0.5)/n center fraction. */
.ga-col:hover::before { content: ''; position: absolute; left: 50%; top: 0; bottom: 0; width: 1px; background: var(--border); pointer-events: none; }
.ga-dot { position: absolute; left: 50%; width: 7px; height: 7px; margin: -3.5px 0 0 -3.5px; border-radius: 999px; box-shadow: 0 0 0 3px var(--panel); opacity: 0; transition: opacity 0.12s ease; pointer-events: none; }
.ga-dot-v { background: var(--accent); }
.ga-dot-u { background: var(--text-3); }
.ga-col:hover .ga-dot { opacity: 1; }
.ga-tip { display: none; position: absolute; left: 50%; transform: translateX(-50%) translateY(calc(-100% - 12px)); min-width: 124px; padding: 8px 10px; border-radius: 9px; background: var(--panel); border: 1px solid var(--border); box-shadow: 0 8px 24px rgba(0,0,0,0.14); pointer-events: none; z-index: 20; }
.ga-col:hover .ga-tip { display: block; }
.ga-tip-day { font-size: 11px; color: var(--text-2); margin-bottom: 5px; }
.ga-tip-row { display: flex; align-items: center; gap: 6px; font-size: 12px; color: var(--text-2); white-space: nowrap; line-height: 1.7; }
.ga-tip-row b { margin-left: auto; color: var(--text); font-weight: 600; }
.ga-sw { display: inline-block; width: 8px; height: 8px; border-radius: 2px; }
@media (max-width: 1023px) {
  .ga-col:hover::before,
  .ga-dot,
  .ga-tip { display: none; }
}

/* Export CSV pill: hover tightens the border to the accent like the range pills. */
#export-csv:hover { color: var(--text); border-color: var(--accent); }

/* Clickable breakdown rows: whole row is a link that adds a filter. Keep the row
  chrome identical; a subtle wash + cursor on hover is the only affordance. The bar
  div uses inset-y-1, so the anchor keeps position: relative as its offset parent. */
.ga-row { display: flex; text-decoration: none; color: inherit; border-radius: 6px; cursor: pointer; transition: background-color 0.12s ease; }
.ga-row:hover { background: color-mix(in srgb, var(--accent) 7%, transparent); }
@supports not (background: color-mix(in srgb, red, blue)) { .ga-row:hover { background: var(--bar); } }
/* The label's base colour is here, not `text-text-2` on the element, because
  the hover rule below has to beat it. Both live in the generated sheet's layer
  now, where the descendant selector outranks this one; an unlayered utility on
  the element would have outranked BOTH and the row would have stopped
  brightening on hover. 11 call sites dropped the utility. */
.ga-row-label { color: var(--text-2); }
.ga-row:hover .ga-row-label { color: var(--text); }

/* Filter-pill bar: active segment filters, each removable; matches the range pills. */
.filter-pill { display: inline-flex; align-items: center; gap: 6px; padding: 4px 6px 4px 11px; border: 1px solid var(--border); background: var(--panel); color: var(--text-2); text-decoration: none; }
.filter-pill:hover { border-color: var(--accent); color: var(--text); }
.filter-pill .fx { display: inline-flex; align-items: center; justify-content: center; width: 16px; height: 16px; border-radius: 999px; font-size: 12px; line-height: 1; color: var(--text-3); }
.filter-pill:hover .fx { color: var(--accent); }
.filter-clear { color: var(--text-3); text-decoration: none; }
.filter-clear:hover { color: var(--text); }

/* Account chrome. Plain CSS rather than utility classes: these controls sat on
   ~700 characters of inline style each, which is why the Upgrade control ended up
   with a client-reactive :style and became the one link on the page that could not
   use the SPA router. Every token here is themed, so the chrome follows light/dark
   with the rest of the app instead of pinning its own colours.

   One variant, not three. .chrome-cta and .chrome-pro existed for the Upgrade/Pro
   button that now lives on /account, and were deleted with it rather than left
   behind — an unused accent style is how the next person ends up reintroducing the
   duplication this removed. */
.chrome-btn { display: inline-flex; align-items: center; justify-content: center; gap: 6px; padding: 7px 12px; border-radius: 9px; border: 1px solid var(--border); background: var(--panel); color: var(--text-2); font: 500 13px/1 var(--sans, ui-sans-serif); text-decoration: none; cursor: pointer; transition: color 0.15s ease, border-color 0.15s ease, background-color 0.15s ease; }
.chrome-btn:hover { color: var(--text); border-color: var(--accent); }
.chrome-icon { padding: 7px 10px; font-size: 14px; line-height: 1; }

/* The desktop size, which was `text-3xl` on the element. It had to come here:
  an unlayered utility beats the clamp in the phone media query below, so the
  number would have stayed at 30px and overflowed its card on a narrow screen.
  Same declarations text-3xl emits. */
.kpi-value { font-size: 1.875rem; line-height: 2.25rem; }

@media (max-width: 767px) {
  .site-switcher,
  .range-tool,
  .account-trigger,
  .account-item,
  .chrome-btn,
  .range-link,
  .ga-row,
  .goal-form input,
  .goal-form select,
  .goal-form button { min-height: 2.75rem; }

  .site-switcher { height: 2.75rem; }
  .range-link { display: inline-flex; align-items: center; justify-content: center; }
  .range-tool { min-width: 2.75rem; }
  /* Wordmark and account button share the first row; the site switcher takes
     the full width under them, instead of the button wrapping onto a row alone. */
  .workspace-primary { flex-direction: row; flex-wrap: wrap; align-items: center; gap: 0.75rem; }
  .workspace-brand { display: contents; }
  .workspace-brand .wordmark { flex: 1 1 auto; }
  .workspace-actions { order: 2; width: auto; }
  .site-switcher, .site-static { order: 3; flex: 1 1 100%; }
  .ga-row { align-items: center; }
  .kpi-label { min-height: 2rem; }
  .kpi-value { font-size: clamp(1.375rem, 7.25vw, 1.875rem); line-height: 1.2; white-space: nowrap; }
}
/* One glyph at a time. `theme.isDark()` writes data-t, and these pick the matching
  icon -- the same contract bughq's header uses, so the two toggles behave alike. */
html:has(meta[name="stx-layout-group"][content="app"]) .theme-btn .ic-sun, html:has(meta[name="stx-layout-group"][content="app"]) .theme-btn .ic-moon { display: none; }
html:has(meta[name="stx-layout-group"][content="app"]) .theme-btn[data-t="light"] .ic-moon { display: block; }
html:has(meta[name="stx-layout-group"][content="app"]) .theme-btn[data-t="dark"] .ic-sun { display: block; }
}

@layer tc-base {

html:has(meta[name="stx-layout-group"][content="marketing"]) {
  color-scheme: dark;
  --void: #0a0c0e;
  --surface: #101317;
  --surface-2: #15191e;
  --ink: #eef2f3;
  --ink-2: #c9cfd2;
  --muted: #9aa4a9;
  --faint: #7b878c;
  --line: rgba(233, 238, 240, 0.09);
  --line-strong: rgba(233, 238, 240, 0.16);
  --accent: #46d3c0;
  --accent-ink: #04201c;
  --accent-soft: rgba(70, 211, 192, 0.10);
  --accent-line: rgba(70, 211, 192, 0.34);
  --accent-glow: rgba(70, 211, 192, 0.18);
  /* Labels drawn ON the translucent accent bars in the SVG illustrations.
    Dark in both themes: the bars fade toward the surface, so white text
    would wash out on the lighter ones. */
  --viz-on-accent: #04201c;
  --nav-bg: rgba(10, 12, 14, 0.72);
  --shadow-pop: 0 24px 60px rgba(0, 0, 0, 0.55);
  --code-ink: #d6deeb;
  --code-str: #b5cea8;
  --danger: #f87171;
}
/* One light set, written twice: the media query covers auto mode (and a
  reader with scripts off), the attribute covers an explicit choice. */
@media (prefers-color-scheme: light) {
  html:has(meta[name="stx-layout-group"][content="marketing"]):not([data-theme="dark"]) {
    color-scheme: light;
    --void: #fafbfb;
    --surface: #ffffff;
    --surface-2: #f3f5f5;
    --ink: #0c1214;
    --ink-2: #2c3538;
    --muted: #4e5a5f;
    --faint: #5f6b72;
    --line: rgba(12, 18, 20, 0.08);
    --line-strong: rgba(12, 18, 20, 0.14);
    --accent: #0f7c72;
    --accent-ink: #ffffff;
    --accent-soft: rgba(15, 124, 114, 0.08);
    --accent-line: rgba(15, 124, 114, 0.32);
    --accent-glow: rgba(15, 124, 114, 0.22);
    --nav-bg: rgba(250, 251, 251, 0.78);
    --shadow-pop: 0 18px 48px rgba(12, 18, 20, 0.14);
    --code-ink: #1f2a2e;
    --code-str: #3b7a2f;
    --danger: #c93434;
  }
}
html:has(meta[name="stx-layout-group"][content="marketing"])[data-theme="light"] {
  color-scheme: light;
  --void: #fafbfb;
  --surface: #ffffff;
  --surface-2: #f3f5f5;
  --ink: #0c1214;
  --ink-2: #2c3538;
  --muted: #4e5a5f;
  --faint: #5f6b72;
  --line: rgba(12, 18, 20, 0.08);
  --line-strong: rgba(12, 18, 20, 0.14);
  --accent: #0f7c72;
  --accent-ink: #ffffff;
  --accent-soft: rgba(15, 124, 114, 0.08);
  --accent-line: rgba(15, 124, 114, 0.32);
  --accent-glow: rgba(15, 124, 114, 0.22);
  --nav-bg: rgba(250, 251, 251, 0.78);
  --shadow-pop: 0 18px 48px rgba(12, 18, 20, 0.14);
  --code-ink: #1f2a2e;
  --code-str: #3b7a2f;
  --danger: #c93434;
}
html:has(meta[name="stx-layout-group"][content="marketing"]) {
  --r: 12px;
  --r-sm: 8px;
  --sans: "Geist", ui-sans-serif, system-ui, -apple-system, sans-serif;
  --wide: "Geist", ui-sans-serif, system-ui, sans-serif;
  --mono: "Geist Mono", ui-monospace, SFMono-Regular, Menlo, monospace;
}

html:has(meta[name="stx-layout-group"][content="marketing"]), html:has(meta[name="stx-layout-group"][content="marketing"]) * { box-sizing: border-box; }

html:has(meta[name="stx-layout-group"][content="marketing"]) {
  background: var(--void);
  scroll-behavior: smooth;
  -webkit-text-size-adjust: 100%;
}

/* Rooted at :root, which IS html, so these cannot nest either. */
html:has(meta[name="stx-layout-group"][content="marketing"])[data-theme="light"] .theme-toggle .ic-sun { display: none; }
html:has(meta[name="stx-layout-group"][content="marketing"])[data-theme="light"] .theme-toggle .ic-moon { display: block; }

/* Spelled out, not nested: `html` is the element the prefix selects, so a
   nested copy would read `html:has(meta[name="stx-layout-group"][content="marketing"]) html`
   and match nothing. */
@media (prefers-reduced-motion: reduce) { html:has(meta[name="stx-layout-group"][content="marketing"]) { scroll-behavior: auto; } }

@keyframes enter-up { to { opacity: 1; transform: none; } }
@keyframes ahq-pulse {
  0% { box-shadow: 0 0 0 0 color-mix(in srgb, var(--accent) 45%, transparent); }
  70% { box-shadow: 0 0 0 8px transparent; }
  100% { box-shadow: 0 0 0 0 transparent; }
}
@keyframes reveal-in {
  from { opacity: 0; transform: translateY(22px); }
  to { opacity: 1; transform: none; }
}

html:has(meta[name="stx-layout-group"][content="marketing"]) {
body {
  margin: 0;
  min-height: 100vh;
  overflow-x: hidden;
  color: var(--ink);
  background: var(--void);
  font-family: var(--sans);
  font-size: 16px;
  line-height: 1.5;
  -webkit-font-smoothing: antialiased;
}

/* single, very subtle ambient glow behind the hero (no mesh, no gradient stack) */
body::before {
  position: fixed;
  inset: 0;
  z-index: -1;
  content: "";
  pointer-events: none;
  background: radial-gradient(58rem 40rem at 82% -8%, color-mix(in srgb, var(--accent) 4.5%, transparent), transparent 62%);
}

a { color: inherit; text-decoration: none; }

/* preserve the coming-soon site-mode wiring */
body[data-site-mode="coming-soon"] .site-content { display: none; }
body[data-site-mode="coming-soon"].site-mode-unlocked .site-content { display: block; }
body[data-site-mode="coming-soon"].site-mode-unlocked .mode-screen,
body:not([data-site-mode="coming-soon"]) .mode-screen { display: none; }

.mode-screen {
  min-height: 100vh;
  display: grid;
  place-items: center;
  padding: clamp(1rem, 4vw, 3rem);
}
.mode-card {
  width: min(720px, 100%);
  border: 1px solid var(--line-strong);
  border-radius: var(--r);
  padding: clamp(2rem, 6vw, 3.5rem);
  background: var(--surface);
}
.mode-card h1 {
  margin: 0;
  font-family: var(--wide);
  font-size: clamp(2rem, 5vw, 3rem);
  letter-spacing: -0.02em;
}
.mode-card p { color: var(--muted); line-height: 1.6; max-width: 46ch; }

/* layout shell */
.shell {
  width: min(1180px, calc(100% - 48px));
  margin: 0 auto;
}
.shell-narrow {
  width: min(920px, calc(100% - 48px));
  margin: 0 auto;
}

/* nav */
.nav {
  position: sticky;
  top: 0;
  z-index: 30;
  border-bottom: 1px solid var(--line);
  background: var(--nav-bg);
  backdrop-filter: blur(16px);
  -webkit-backdrop-filter: blur(16px);
}
.nav-inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1.25rem;
  min-height: 68px;
}
.brand {
  display: inline-flex;
  align-items: center;
  gap: 0.6rem;
}
.brand-mark {
  display: grid;
  place-items: center;
  width: 30px;
  height: 30px;
  border: 1px solid var(--accent-line);
  border-radius: var(--r-sm);
  color: var(--accent);
  font-family: var(--wide);
  font-size: 1rem;
  line-height: 1;
}
.brand-name {
  font-family: var(--wide);
  font-size: 1.12rem;
  letter-spacing: -0.01em;
}
.nav-links {
  display: flex;
  align-items: center;
  gap: 1.6rem;
  margin-left: auto;
  color: var(--muted);
  font-size: 0.9rem;
}
.nav-links a { transition: color 0.16s ease; }
.nav-links a:hover { color: var(--ink); }

/* Current-page state. StxLink adds .nav-current via data-stx-active-class once
   the router resolves the route; before this rule existed the marketing nav had
   no active state at all, which is why nothing in the CSS referenced it. */
.nav-links a.nav-current,
.nav-menu-panel a.nav-current { color: var(--ink); font-weight: 600; }
.mega-panel a.nav-current .mega-t { color: var(--accent); }
.nav-cta { margin-left: 1.6rem; }

/* mobile menu - pure-CSS disclosure (details/summary), no JS */
.nav-menu { display: none; margin-left: auto; position: relative; }
.nav-menu > summary {
  list-style: none;
  display: grid;
  place-items: center;
  width: 40px;
  height: 40px;
  border: 1px solid var(--line-strong);
  border-radius: var(--r-sm);
  cursor: pointer;
}
.nav-menu > summary::-webkit-details-marker { display: none; }
.nav-menu > summary:focus-visible { outline: 2px solid var(--accent); outline-offset: 2px; }
.burger, .burger::before, .burger::after {
  display: block;
  width: 18px;
  height: 1.5px;
  background: var(--ink);
  transition: transform 0.2s ease, opacity 0.2s ease;
}
.burger { position: relative; }
.burger::before { content: ""; position: absolute; top: -5px; }
.burger::after { content: ""; position: absolute; top: 5px; }
.nav-menu[open] .burger { background: transparent; }
.nav-menu[open] .burger::before { transform: translateY(5px) rotate(45deg); }
.nav-menu[open] .burger::after { transform: translateY(-5px) rotate(-45deg); }
.nav-menu-panel {
  position: absolute;
  right: 0;
  top: calc(100% + 12px);
  z-index: 50;
  display: flex;
  flex-direction: column;
  gap: 0.25rem;
  min-width: 232px;
  padding: 0.6rem;
  max-height: calc(100dvh - 92px);
  overflow-y: auto;
  overscroll-behavior: contain;
  background: var(--surface-2);
  border: 1px solid var(--line-strong);
  border-radius: var(--r);
  box-shadow: var(--shadow-pop);
}
.nav-menu-panel a {
  padding: 0.6rem 0.7rem;
  border-radius: var(--r-sm);
  color: var(--muted);
  font-size: 0.95rem;
}
.nav-menu-panel a:hover { color: var(--ink); background: var(--surface); }
.nav-menu-panel .btn { margin-top: 0.35rem; justify-content: center; }

/* buttons */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 0.5rem;
  min-height: 46px;
  padding: 0 1.15rem;
  border: 1px solid var(--line-strong);
  border-radius: var(--r-sm);
  color: var(--ink);
  font-family: var(--sans);
  font-size: 0.92rem;
  letter-spacing: 0.005em;
  white-space: nowrap;
  background: transparent;
  cursor: pointer;
  transition: transform 0.16s ease, box-shadow 0.16s ease, border-color 0.16s ease, background 0.16s ease;
}
.btn.primary {
  border-color: var(--accent);
  color: var(--accent-ink);
  background: var(--accent);
}
.btn.primary:hover {
  transform: translateY(-1px);
  box-shadow: 0 8px 24px var(--accent-glow);
}
.btn.ghost:hover { border-color: var(--accent-line); }
.btn:active { transform: scale(0.985); }
.btn.sm { min-height: 40px; padding: 0 0.95rem; font-size: 0.85rem; }

/* hero */
.hero {
  display: grid;
  grid-template-columns: minmax(0, 1.04fr) minmax(0, 0.96fr);
  align-items: center;
  gap: clamp(2rem, 5vw, 4.5rem);
  padding: clamp(2.75rem, 6vw, 5rem) 0 clamp(3rem, 7vw, 6rem);
}
.eyebrow {
  margin: 0 0 1.1rem;
  color: var(--accent);
  font-size: 0.72rem;
  font-weight: 400;
  letter-spacing: 0.18em;
  text-transform: uppercase;
}
.hero-title {
  margin: 0;
  font-family: var(--wide);
  font-size: clamp(2.55rem, 5.4vw, 4.3rem);
  font-weight: 400;
  line-height: 1.02;
  letter-spacing: -0.025em;
  color: var(--ink);
}
.hero-sub {
  max-width: 46ch;
  margin: 1.5rem 0 0;
  color: var(--muted);
  font-family: var(--sans);
  font-weight: 300;
  font-size: 1.12rem;
  line-height: 1.6;
}
.hero-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 0.75rem;
  margin-top: 2.1rem;
}

/* hero live panel (real product surface: live count + real chart) */
.panel {
  border: 1px solid var(--line-strong);
  border-radius: var(--r);
  background: var(--surface);
  padding: 1.15rem 1.15rem 1rem;
}
.panel-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
}
.live {
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  color: var(--muted);
  font-size: 0.82rem;
}
.live-dot {
  width: 7px;
  height: 7px;
  border-radius: 50%;
  background: var(--accent);
  box-shadow: 0 0 0 0 color-mix(in srgb, var(--accent) 50%, transparent);
  animation: ahq-pulse 2.4s ease-out infinite;
}
.panel-tag {
  color: var(--faint);
  font-family: var(--mono);
  font-size: 0.72rem;
  letter-spacing: 0.02em;
}
.stat-big {
  margin: 1rem 0 0;
  font-family: var(--mono);
  font-size: 2.6rem;
  line-height: 1;
  letter-spacing: -0.01em;
  color: var(--ink);
}
.stat-label {
  margin: 0.35rem 0 0;
  color: var(--muted);
  font-size: 0.85rem;
}
.chart-wrap {
  margin-top: 1.15rem;
  padding-top: 1.1rem;
  border-top: 1px solid var(--line);
}
.chart-cap {
  display: block;
  margin-bottom: 0.6rem;
  color: var(--faint);
  font-family: var(--mono);
  font-size: 0.7rem;
  letter-spacing: 0.04em;
  text-transform: uppercase;
}
.chart { display: block; width: 100%; height: auto; }
.top-pages {
  margin-top: 1.1rem;
  display: grid;
  gap: 0.5rem;
}
.top-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
  font-size: 0.85rem;
}
.top-row .path { color: var(--muted); font-family: var(--mono); font-size: 0.8rem; }
.top-row .count { color: var(--ink); font-family: var(--mono); }

/* generic section */
.section { padding: clamp(4rem, 8vw, 7.5rem) 0; }
.section-head { max-width: 62ch; }
.section-title {
  margin: 0;
  font-family: var(--wide);
  font-size: clamp(1.85rem, 3.1vw, 2.75rem);
  font-weight: 400;
  line-height: 1.08;
  letter-spacing: -0.02em;
  color: var(--ink);
}
.section-intro {
  margin: 1.1rem 0 0;
  color: var(--muted);
  font-weight: 300;
  font-size: 1.08rem;
  line-height: 1.65;
  max-width: 60ch;
}

/* privacy strip */
.chips {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 1rem;
  margin-top: 2.5rem;
}
.chip {
  border: 1px solid var(--line);
  border-top: 2px solid var(--accent-line);
  border-radius: var(--r);
  padding: 1.35rem 1.25rem;
  background: var(--surface);
}
.chip h3 {
  margin: 0 0 0.55rem;
  font-family: var(--sans);
  font-size: 1rem;
  font-weight: 400;
  color: var(--ink);
}
.chip p { margin: 0; color: var(--muted); font-weight: 300; font-size: 0.92rem; line-height: 1.55; }

/* feature bento */
.bento {
  display: grid;
  grid-template-columns: repeat(6, 1fr);
  gap: 0.9rem;
  margin-top: 2.75rem;
}
.cell {
  border: 1px solid var(--line);
  border-radius: var(--r);
  background: var(--surface);
  padding: 1.5rem;
}
.cell h3 {
  margin: 0 0 0.55rem;
  font-family: var(--sans);
  font-size: 1.08rem;
  font-weight: 400;
  color: var(--ink);
}
.cell p { margin: 0; color: var(--muted); font-weight: 300; font-size: 0.95rem; line-height: 1.6; }
.cell.lead {
  grid-column: span 3;
  grid-row: span 2;
  display: flex;
  flex-direction: column;
  background: var(--accent-soft);
  border-color: var(--accent-line);
}
.cell.lead h3 { font-size: 1.3rem; }
.cell.lead p { font-size: 1rem; color: var(--ink); opacity: 0.86; }
.cell.b, .cell.c { grid-column: span 3; }
.cell.d, .cell.e, .cell.f { grid-column: span 2; }
.cell.tint { background: var(--surface-2); }
.lead-spark {
  margin-top: auto;
  padding-top: 1.5rem;
}
.lead-spark svg { display: block; width: 100%; height: auto; }

/* migration banner */
.migrate {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 1.25rem;
  border: 1px solid var(--line-strong);
  border-radius: var(--r);
  padding: clamp(1.5rem, 4vw, 2.25rem);
  background: var(--surface);
}
.migrate p {
  margin: 0;
  max-width: 52ch;
  font-family: var(--wide);
  font-size: clamp(1.15rem, 2vw, 1.5rem);
  letter-spacing: -0.01em;
  color: var(--ink);
}
.migrate a.textlink {
  color: var(--accent);
  font-size: 0.95rem;
  border-bottom: 1px solid var(--accent-line);
  padding-bottom: 2px;
  transition: opacity 0.16s ease;
}
.migrate a.textlink:hover { opacity: 0.78; }

/* install / code */
.code-grid {
  display: grid;
  grid-template-columns: minmax(0, 1fr);
  gap: 1rem;
  margin-top: 2.5rem;
}
.code {
  border: 1px solid var(--line-strong);
  border-radius: var(--r);
  background: var(--surface-2);
  overflow: hidden;
}
.code-bar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
  padding: 0.7rem 1rem;
  border-bottom: 1px solid var(--line);
  color: var(--faint);
  font-family: var(--mono);
  font-size: 0.74rem;
  letter-spacing: 0.03em;
}
.code pre {
  margin: 0;
  padding: 1.15rem 1.25rem;
  overflow-x: auto;
  color: var(--ink);
  font-family: var(--mono);
  font-size: 0.86rem;
  line-height: 1.7;
}
.code pre .tok { color: var(--accent); }
.code pre .str { color: var(--code-str); }
/* Framework picker in the code-bar (HTML / Vue / Nuxt / React / Next). */
.code-lang {
  appearance: none;
  -webkit-appearance: none;
  background-color: transparent;
  border: 1px solid var(--line);
  border-radius: 7px;
  color: var(--ink);
  font-family: var(--mono);
  font-size: 0.72rem;
  letter-spacing: 0.03em;
  padding: 0.15rem 1.5rem 0.15rem 0.6rem;
  cursor: pointer;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='10' height='6' viewBox='0 0 10 6'%3E%3Cpath d='M1 1l4 4 4-4' fill='none' stroke='%23808a9d' stroke-width='1.5'/%3E%3C/svg%3E");
  background-repeat: no-repeat;
  background-position: right 0.55rem center;
}
.code-lang:hover { border-color: var(--line-strong); color: var(--ink); }
.code-lang:focus-visible { outline: none; border-color: var(--accent); }
.code-lang option { background: var(--surface-2); color: var(--ink); }
.code-note {
  margin: 1.5rem 0 0;
  max-width: 66ch;
  color: var(--muted);
  font-weight: 300;
  font-size: 0.95rem;
  line-height: 1.65;
}
.code-note code { font-family: var(--mono); font-size: 0.85em; color: var(--ink); }

/* comparison */
.cmp {
  display: grid;
  grid-template-columns: repeat(5, minmax(0, 1fr));
  gap: 0.9rem;
  margin-top: 2.75rem;
}
.cmp-cell {
  display: flex;
  flex-direction: column;
  gap: 0.85rem;
  border: 1px solid var(--line);
  border-radius: var(--r);
  padding: 1.25rem;
  background: var(--surface);
}
.cmp-dim {
  color: var(--faint);
  font-size: 0.72rem;
  letter-spacing: 0.14em;
  text-transform: uppercase;
}
.cmp-ga, .cmp-ours {
  padding-left: 0.75rem;
  border-left: 2px solid var(--line);
  font-size: 0.92rem;
  line-height: 1.45;
}
.cmp-ga { color: var(--muted); font-weight: 300; }
.cmp-ours { color: var(--ink); border-left-color: var(--accent); }

/* final cta */
.cta-band {
  text-align: center;
  border: 1px solid var(--line-strong);
  border-radius: var(--r);
  padding: clamp(3rem, 7vw, 5rem) clamp(1.5rem, 5vw, 3rem);
  background: var(--surface);
}
.cta-band h2 {
  margin: 0 auto;
  max-width: 20ch;
  font-family: var(--wide);
  font-size: clamp(1.9rem, 3.4vw, 3rem);
  font-weight: 400;
  line-height: 1.08;
  letter-spacing: -0.02em;
  color: var(--ink);
}
.cta-actions {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 0.75rem;
  margin-top: 2rem;
}

/* footer */
.footer {
  border-top: 1px solid var(--line);
  padding: clamp(3rem, 6vw, 4.5rem) 0 2.5rem;
}
.footer-top {
  display: grid;
  grid-template-columns: minmax(0, 1.4fr) repeat(5, minmax(0, 1fr));
  gap: 2rem;
}
.footer-brand .brand { margin-bottom: 0.9rem; }
.footer-brand p {
  margin: 0 0 1.25rem;
  max-width: 34ch;
  color: var(--muted);
  font-weight: 300;
  font-size: 0.92rem;
  line-height: 1.6;
}
.footer-social { display: inline-flex; gap: 0.6rem; }
.footer-social a {
  display: grid;
  place-items: center;
  width: 38px;
  height: 38px;
  border: 1px solid var(--line);
  border-radius: var(--r-sm);
  color: var(--muted);
  transition: color 0.16s ease, border-color 0.16s ease;
}
.footer-social a:hover { color: var(--accent); border-color: var(--accent-line); }
.footer-social svg { width: 18px; height: 18px; fill: currentColor; }
.footer-col h4 {
  margin: 0 0 0.9rem;
  color: var(--ink);
  font-family: var(--sans);
  font-size: 0.82rem;
  font-weight: 400;
  letter-spacing: 0.04em;
  text-transform: uppercase;
}
.footer-col a {
  display: block;
  margin-bottom: 0.6rem;
  color: var(--muted);
  font-weight: 300;
  font-size: 0.9rem;
  transition: color 0.16s ease;
}
.footer-col a:hover { color: var(--ink); }
.footer-bottom {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 0.75rem;
  margin-top: 3rem;
  padding-top: 1.5rem;
  border-top: 1px solid var(--line);
  color: var(--faint);
  font-size: 0.82rem;
}

/* motion: hero entrance (load), reduced-motion gated */
.enter { opacity: 0; transform: translateY(14px); animation: enter-up 0.7s cubic-bezier(0.16, 1, 0.3, 1) forwards; }
.enter.d1 { animation-delay: 0.06s; }
.enter.d2 { animation-delay: 0.12s; }
.enter.d3 { animation-delay: 0.18s; }
.enter.d4 { animation-delay: 0.24s; }




/* motion: scroll reveal via CSS scroll-driven animation, visible fallback if unsupported */
.reveal { opacity: 1; }
@supports (animation-timeline: view()) {
  @media (prefers-reduced-motion: no-preference) {
    .reveal {
      opacity: 0;
      animation: reveal-in 0.8s linear both;
      animation-timeline: view();
      animation-range: entry 4% cover 20%;
    }
  }
}


@media (prefers-reduced-motion: reduce) {
  .enter, .reveal { animation: none !important; opacity: 1 !important; transform: none !important; }
  .live-dot { animation: none; }
  .btn { transition: none; }
}

/* responsive */
@media (max-width: 960px) {
  .hero { grid-template-columns: minmax(0, 1fr); gap: 2.25rem; }
  .cmp { grid-template-columns: repeat(2, 1fr); }
  .footer-top { grid-template-columns: 1fr 1fr; }
  .footer-brand { grid-column: 1 / -1; }
}
@media (max-width: 860px) {
  body:has(.nav-menu[open]) { overflow: hidden; }
  .nav-links { display: none; }
  .nav-cta { display: none; }
  .nav-menu { display: block; }
}
@media (max-width: 780px) {
  .shell, .shell-narrow { width: calc(100% - 32px); }
  .chips { grid-template-columns: 1fr 1fr; }
  .bento { grid-template-columns: 1fr; }
  .cell.lead, .cell.b, .cell.c, .cell.d, .cell.e, .cell.f { grid-column: auto; grid-row: auto; }
  .cmp { grid-template-columns: 1fr; }
  .footer-top { grid-template-columns: 1fr; gap: 1.75rem; }
}
@media (max-width: 480px) {
  .chips { grid-template-columns: 1fr; }
  .hero-actions .btn, .cta-actions .btn { width: 100%; }
}

/* ============================================================
  Feature + use-case page components (added for sub-pages).
  Reuse the tokens above so sub-pages match the landing exactly.
  ============================================================ */

.subnav { display: flex; align-items: center; gap: 0.5rem; padding-top: 1.75rem; color: var(--faint); font-size: 0.88rem; }
.subnav a { color: var(--muted); transition: color 0.16s ease; }
.subnav a:hover { color: var(--ink); }
.subnav .sep { color: var(--faint); }

/* single-column feature/use-case hero (no live panel) */
.feat-hero { padding: 2.5rem 0 1.5rem; max-width: 62ch; }
.feat-hero .kicker {
  display: inline-flex; align-items: center; gap: 0.5rem;
  font-family: var(--mono); font-size: 0.72rem; letter-spacing: 0.14em;
  text-transform: uppercase; color: var(--accent);
}
.feat-hero h1 {
  margin: 1rem 0 0; font-family: var(--wide);
  font-size: clamp(2.1rem, 5vw, 3.1rem); line-height: 1.05; letter-spacing: -0.025em;
}
.feat-hero p { margin: 1.1rem 0 0; color: var(--muted); font-size: 1.05rem; line-height: 1.6; }
.feat-hero .hero-actions { margin-top: 1.75rem; }

/* numbered vertical flow (how it works) */
.flow { display: grid; gap: 1px; background: var(--line); border: 1px solid var(--line); border-radius: var(--r); overflow: hidden; }
.flow-step { display: grid; grid-template-columns: auto 1fr; gap: 1.1rem; padding: 1.4rem 1.5rem; background: var(--surface); }
.flow-num { font-family: var(--mono); font-size: 0.82rem; color: var(--accent); padding-top: 0.15rem; }
.flow-step h3 { margin: 0; font-family: var(--wide); font-size: 1.05rem; letter-spacing: -0.01em; }
.flow-step p { margin: 0.4rem 0 0; color: var(--muted); font-size: 0.95rem; line-height: 1.55; }

/* metric tiles (breathing, no card chrome) */
.metrics { display: grid; grid-template-columns: repeat(3, 1fr); gap: 1.5rem 2.5rem; }
.metric .m-value { font-family: var(--wide); font-size: clamp(1.8rem, 4vw, 2.4rem); letter-spacing: -0.02em; color: var(--ink); }
.metric .m-label { margin-top: 0.35rem; color: var(--muted); font-size: 0.9rem; line-height: 1.5; }

/* prose block for definitions / privacy detail */
.prose { max-width: 66ch; }
.prose p { color: var(--muted); font-size: 1rem; line-height: 1.7; margin: 0 0 1rem; }
.prose strong { color: var(--ink); font-weight: 600; }

/* related features grid at page foot */
.related { display: grid; grid-template-columns: repeat(3, 1fr); gap: 1px; background: var(--line); border: 1px solid var(--line); border-radius: var(--r); overflow: hidden; }
.related a { display: block; padding: 1.3rem 1.4rem; background: var(--surface); transition: background 0.16s ease; }
.related a:hover { background: var(--surface-2); }
/* The 1px gaps show the grid's --line background, so a short last row left a
  solid block of it where the missing cards would be (the 404 has four
  links). The last card stretches to close the row instead. */
.related a:last-child:nth-child(3n + 1) { grid-column: span 3; }
.related a:last-child:nth-child(3n + 2) { grid-column: span 2; }
.related .r-name { font-family: var(--wide); font-size: 1rem; color: var(--ink); letter-spacing: -0.01em; }
.related .r-desc { margin-top: 0.3rem; color: var(--faint); font-size: 0.86rem; line-height: 1.45; }

/* use-case cards: image + label + body, real visual variation */
.usecases { display: grid; grid-template-columns: repeat(2, 1fr); gap: 1.5rem; }
.usecase { border: 1px solid var(--line); border-radius: var(--r); overflow: hidden; background: var(--surface); }
.usecase img { display: block; width: 100%; height: 168px; object-fit: cover; opacity: 0.92; }
.usecase-body { padding: 1.4rem 1.5rem 1.6rem; }
.usecase-body h3 { margin: 0; font-family: var(--wide); font-size: 1.15rem; letter-spacing: -0.015em; }
.usecase-body p { margin: 0.55rem 0 0; color: var(--muted); font-size: 0.94rem; line-height: 1.6; }
.usecase-body .textlink { margin-top: 0.9rem; display: inline-block; }

@media (max-width: 860px) {
  .metrics { grid-template-columns: 1fr 1fr; }
  .related { grid-template-columns: 1fr; }
  .related a:last-child:nth-child(n) { grid-column: auto; }
  .usecases { grid-template-columns: 1fr; }
}
@media (max-width: 560px) {
  .metrics { grid-template-columns: 1fr; }
  .flow-step { grid-template-columns: 1fr; gap: 0.4rem; }
}

/* landing feature cells now link to feature pages */
a.cell { cursor: pointer; }
.cell-more {
  display: inline-flex; align-items: center; gap: 0.35rem; margin-top: 1rem;
  font-family: var(--mono); font-size: 0.74rem; letter-spacing: 0.06em; text-transform: uppercase;
  color: var(--faint); transition: color 0.16s ease, gap 0.16s ease;
}
.cell-more::after { content: "\2192"; }
a.cell:hover .cell-more { color: var(--accent); gap: 0.55rem; }

/* feature-page visuals: trackless bars, vitals tiles, code body */
.code-body { margin: 0; padding: 1.1rem 1.25rem; overflow-x: auto; font-family: var(--mono); font-size: 12.5px; line-height: 1.65; color: var(--code-ink); }
.bar-row { display: grid; grid-template-columns: 132px 1fr 46px; align-items: center; gap: 0.9rem; padding: 0.5rem 0; }
.bar-row + .bar-row { border-top: 1px solid var(--line); }
.bar-label { color: var(--muted); font-size: 0.88rem; }
.bar-track { height: 8px; border-radius: 999px; background: transparent; }
.bar-fill { display: block; height: 100%; border-radius: 999px; background: var(--accent); opacity: 0.82; min-width: 4px; }
.bar-value { font-family: var(--mono); font-size: 0.82rem; color: var(--ink); text-align: right; }
.vitals { display: grid; grid-template-columns: repeat(3, 1fr); gap: 1px; background: var(--line); border: 1px solid var(--line); border-radius: var(--r); overflow: hidden; }
.vital { padding: 1.4rem 1.5rem; background: var(--surface); }
.vital-k { font-family: var(--mono); font-size: 0.78rem; letter-spacing: 0.1em; text-transform: uppercase; color: var(--faint); }
.vital-v { margin-top: 0.5rem; font-family: var(--wide); font-size: 1.9rem; letter-spacing: -0.02em; color: var(--ink); }
.vital-tag { margin-top: 0.4rem; display: inline-flex; font-size: 0.78rem; color: var(--accent); }
.vital.good .vital-tag { color: var(--accent); }
@media (max-width: 560px) { .vitals { grid-template-columns: 1fr; } .bar-row { grid-template-columns: 110px 1fr 40px; } }

/* login link beside the Sign up nav button */
/* Theme toggle. Shows the theme you would switch TO: a sun on dark, a moon
  on light. Keyed off <html data-theme> (set before first paint), with the
  sun as the default because the unset state renders dark. */
.theme-toggle {
  display: inline-grid; place-items: center;
  width: 36px; height: 36px; margin: 0 1.1rem 0 1.4rem; padding: 0;
  border: 1px solid var(--line-strong); border-radius: var(--r-sm);
  background: transparent; color: var(--muted); cursor: pointer;
  transition: color 0.16s ease, border-color 0.16s ease;
}
.theme-toggle:hover { color: var(--ink); border-color: var(--accent-line); }
.theme-toggle:focus-visible { outline: 2px solid var(--accent); outline-offset: 2px; }
.theme-toggle .ic-moon { display: none; }


@media (max-width: 860px) {
  .theme-toggle { margin: 0 0.9rem 0 auto; }
  .nav-menu { margin-left: 0.75rem; }
}
.nav-login { color: var(--muted); font-size: 0.9rem; transition: color 0.16s ease; }
.nav-login:hover { color: var(--ink); }
.nav-cta { margin-left: 0.95rem; }

/* ============================================================
  Mega-menu dropdowns (shared nav partial). CSS-only: reveal on
  pointer hover AND keyboard focus (:focus-within), no JS.
  ============================================================ */
.mega { position: relative; display: inline-flex; align-items: center; }
.mega-trigger { display: inline-flex; align-items: center; gap: 0.34rem; cursor: pointer; transition: color 0.16s ease; }
.mega-trigger:hover { color: var(--ink); }
.mega-trigger::after {
  content: ""; width: 6px; height: 6px; margin-top: -3px;
  border-right: 1.5px solid currentColor; border-bottom: 1.5px solid currentColor;
  transform: rotate(45deg); opacity: 0.65; transition: transform 0.18s ease;
}
.mega:hover .mega-trigger::after,
.mega:focus-within .mega-trigger::after { transform: rotate(225deg); }
.mega:hover .mega-trigger,
.mega:focus-within .mega-trigger { color: var(--ink); }
.mega-panel {
  position: absolute; left: 0; top: calc(100% + 14px); z-index: 50;
  display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 0.2rem;
  width: 528px; padding: 0.6rem;
  background: var(--surface-2); border: 1px solid var(--line-strong);
  border-radius: var(--r); box-shadow: var(--shadow-pop);
  opacity: 0; visibility: hidden; transform: translateY(6px); pointer-events: none;
  transition: opacity 0.16s ease, transform 0.16s ease, visibility 0.16s ease;
}
/* invisible bridge so the panel survives the cursor gap */
.mega-panel::before { content: ""; position: absolute; left: 0; right: 0; top: -14px; height: 14px; }
.mega:hover .mega-panel,
.mega:focus-within .mega-panel {
  opacity: 1; visibility: visible; transform: translateY(0); pointer-events: auto;
}
.mega-panel a {
  display: flex; flex-direction: column; gap: 0.22rem;
  padding: 0.65rem 0.75rem; border-radius: var(--r-sm);
  transition: background 0.16s ease;
}
.mega-panel a:hover { background: var(--surface); }
.mega-panel a:focus-visible { outline: 2px solid var(--accent); outline-offset: 2px; }
.mega-t { color: var(--ink); font-size: 0.92rem; }
.mega-d { color: var(--faint); font-size: 0.8rem; line-height: 1.4; }
@media (max-width: 960px) { .mega-panel { width: 460px; } }

/* group labels inside the mobile disclosure panel */
.nav-menu-group {
  padding: 0.7rem 0.7rem 0.25rem; color: var(--faint);
  font-family: var(--mono); font-size: 0.68rem; letter-spacing: 0.12em; text-transform: uppercase;
}
.nav-menu-group + a { margin-top: 0; }

@media (prefers-reduced-motion: reduce) {
  .mega-panel { transition: none; }
  .mega-trigger::after { transition: none; }
}

/* ============================================================
  Use-case page components (added for the use-case sub-pages).
  Reuse the same tokens so the pages match the landing exactly.
  ============================================================ */

/* two-column: narrative text beside a supporting sample panel */
.split { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 0.92fr); align-items: center; gap: clamp(2rem, 5vw, 4rem); }
.split.rev .split-text { order: 2; }
.split-text h3 {
  margin: 0; font-family: var(--wide); font-weight: 400;
  font-size: clamp(1.5rem, 3vw, 2.15rem); line-height: 1.1; letter-spacing: -0.02em; color: var(--ink);
}
.split-text > p { margin: 1.1rem 0 0; color: var(--muted); font-weight: 300; font-size: 1.05rem; line-height: 1.65; }
.split-text code { font-family: var(--mono); font-size: 0.85em; color: var(--ink); }

/* accent-dotted feature list */
.mini-list { list-style: none; margin: 1.5rem 0 0; padding: 0; display: grid; gap: 0.75rem; }
.mini-list li { display: flex; gap: 0.7rem; color: var(--muted); font-weight: 300; font-size: 0.95rem; line-height: 1.5; }
.mini-list .dot { flex: none; width: 7px; height: 7px; margin-top: 0.5rem; border-radius: 50%; background: var(--accent); }

/* what-teams-track triple grid */
.qa-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 1px; margin-top: 2.75rem; background: var(--line); border: 1px solid var(--line); border-radius: var(--r); overflow: hidden; }
.qa { padding: 1.5rem; background: var(--surface); }
.qa h4 { margin: 0 0 0.5rem; font-family: var(--wide); font-size: 1.05rem; font-weight: 400; letter-spacing: -0.01em; color: var(--ink); }
.qa p { margin: 0; color: var(--muted); font-weight: 300; font-size: 0.92rem; line-height: 1.55; }
.qa code { font-family: var(--mono); font-size: 0.84em; color: var(--ink); }

/* ranking / funnel bars inside panels */
.bar { flex: 1; height: 6px; border-radius: 999px; background: var(--surface-2); overflow: hidden; }
.bar > span { display: block; height: 100%; border-radius: 999px; background: var(--accent); opacity: 0.82; }

/* dim comment token inside code samples */
.code pre .cmt { color: var(--faint); }

@media (max-width: 860px) {
  .split { grid-template-columns: minmax(0, 1fr); gap: 2rem; }
  .split.rev .split-text { order: 0; }
  .qa-grid { grid-template-columns: 1fr; }
}
}

}

.flex {
  display: flex;
}

.flex-wrap {
  flex-wrap: wrap;
}

.gap-\[0\.6rem\] {
  gap: 0.6rem;
}

.max-w-\[30rem\] {
  max-width: 30rem;
}

.min-h-\[46px\] {
  min-height: 46px;
}

.text-\[var\(--ink\)\] {
  color: var(--ink);
}

.bg-\[var\(--surface-2\)\] {
  background-color: var(--surface-2);
}

.border {
  border-width: 1px;
}

.border-\[var\(--line-strong\)\] {
  border-color: var(--line-strong);
}

.rounded-\[var\(--r-sm\)\] {
  border-radius: var(--r-sm);
}

.\[flex\:1_1_15rem\] {
  flex: 1 1 15rem;
}

.\[font\:inherit\] {
  font: inherit;
}

.items-center {
  align-items: center;
}

.gap-2 {
  gap: 0.5rem;
}

.text-sm {
  font-size: 0.875rem;
  line-height: 1.25rem;
}

.block {
  display: block;
}

.h-auto {
  height: auto;
}

.w-\[100\%\] {
  width: 100%;
}

.fill-\[var\(--surface\)\] {
  fill: var(--surface);
}

.stroke-\[var\(--line\)\] {
  stroke: var(--line);
}

.fill-\[var\(--faint\)\] {
  fill: var(--faint);
}

.fill-\[var\(--accent\)\] {
  fill: var(--accent);
}

.fill-\[var\(--ink\)\] {
  fill: var(--ink);
}

.fill-\[var\(--muted\)\] {
  fill: var(--muted);
}

.stroke-\[var\(--accent\)\] {
  stroke: var(--accent);
}

.fill-\[var\(--ink-2\)\] {
  fill: var(--ink-2);
}

.\!\[font-family\:var\(--sans\)\] {
  font-family: var(--sans) !important;
}

.w-\[74\%\] {
  width: 74%;
}

.w-\[58\%\] {
  width: 58%;
}

.w-\[42\%\] {
  width: 42%;
}

.\!gap-\[1\.25rem_1\.5rem\] {
  gap: 1.25rem 1.5rem !important;
}

.\!grid-cols-\[1fr_1fr\] {
  grid-template-columns: 1fr 1fr !important;
}

.px-\[0\.9rem\] {
  padding-left: 0.9rem;
  padding-right: 0.9rem;
}

.py-0 {
  padding-top: 0;
  padding-bottom: 0;
}

.mt-\[1\.25rem\] {
  margin-top: 1.25rem;
}

.mt-\[1\.1rem\] {
  margin-top: 1.1rem;
}

.\!mt-\[1\.1rem\] {
  margin-top: 1.1rem !important;
}