@import url('https://fonts.googleapis.com/css2?family=DM+Sans:ital,opsz,wght@0,9..40,400;0,9..40,500;0,9..40,600;0,9..40,700;1,9..40,400&family=JetBrains+Mono:wght@400;500&family=Manrope:wght@500;600;700;800&display=swap');
:root {
  --workspace-max-width: 1520px;
  --workspace-padding-x: clamp(16px, 2.4vw, 36px);
  --workspace-padding-top: 18px;
  --workspace-padding-bottom: 48px;

  --spring-snappy: cubic-bezier(0.32, 0.72, 0, 1);
  --spring-bounce: cubic-bezier(0.34, 1.45, 0.64, 1);

  --glass-blur: blur(36px) saturate(1.65);
  --glass-blur-heavy: blur(56px) saturate(1.75);
  --glass-radius-panel: 28px;
  --glass-radius-inner: 22px;
  --glass-radius-chip: 999px;

  --space-1: 4px;
  --space-2: 8px;
  --space-3: 12px;
  --space-4: 16px;
  --space-5: 20px;
  --space-6: 24px;
  --space-8: 32px;
  --space-10: 40px;
  --space-12: 48px;
  --radius-control: 14px;
  --radius-card: 20px;
  --radius-panel: 26px;
  --text-caption: 0.72rem;
  --text-body: 0.94rem;
  --text-title: clamp(2.35rem, 4.2vw, 4.5rem);
  --shadow-card: 0 1px 0 rgb(255 255 255 / 0.75), 0 12px 30px rgb(26 33 50 / 0.07);
  --shadow-card-hover: 0 22px 48px rgb(26 33 50 / 0.12);

  --font-display: "Manrope", "DM Sans", sans-serif;
  --font-sans: "DM Sans", "Segoe UI", sans-serif;
  --font-mono: "JetBrains Mono", "SF Mono", ui-monospace, monospace;

  --ink: #0a0c10;
  --ink-soft: #3a4150;
  --ink-faint: #5c6578;
  --line: rgb(10 12 16 / 0.12);
  --line-strong: rgb(10 12 16 / 0.18);

  --accent: #c2410c;
  --accent-hot: #ea580c;
  --accent-dim: rgb(194 65 12 / 0.12);
  --accent-glow: rgb(194 65 12 / 0.25);

  --ok: #1f7a4c;
  --warn: #9a6700;
  --danger: #b42318;

  --bg-0: #dce1ea;
  --bg-1: #cdd5e2;
  --bg-deep: #bdc8d9;
  --surface-solid: #ffffff;
  --surface-raised: #ffffff;
  --surface-muted: #eef1f6;
  --surface-subtle: rgb(255 255 255 / 0.46);

  --glass-fill: linear-gradient(
    155deg,
    rgb(255 255 255 / 0.62) 0%,
    rgb(255 255 255 / 0.28) 100%
  );
  --glass-border: rgb(255 255 255 / 0.62);
  --glass-inset: rgb(255 255 255 / 0.8);
  --glass-inner: rgb(255 255 255 / 0.52);
  --glass-shadow:
    0 1px 0 rgb(255 255 255 / 0.55),
    0 14px 36px rgb(24 30 48 / 0.12),
    0 2px 6px rgb(24 30 48 / 0.06);
  --chip-fill: rgb(255 255 255 / 0.5);
  --text-on-glass: var(--ink);
  --hud-fill: rgb(255 255 255 / 0.22);

  --scrollbar-size: 10px;
  --scrollbar-track: transparent;
  --scrollbar-thumb: rgb(10 12 16 / 0.22);
  --scrollbar-thumb-hover: rgb(194 65 12 / 0.55);
  --scrollbar-thumb-active: rgb(194 65 12 / 0.75);
  --scrollbar-thumb-border: rgb(255 255 255 / 0.35);

  color-scheme: light;
}

html[data-theme='dark'] {
  --ink: #eef0f5;
  --ink-soft: #9aa3b5;
  --ink-faint: #6d768a;
  --line: rgb(255 255 255 / 0.08);
  --line-strong: rgb(255 255 255 / 0.14);

  --accent: #f27a31;
  --accent-hot: #ff9554;
  --accent-dim: rgb(242 122 49 / 0.14);
  --accent-glow: rgb(242 122 49 / 0.28);

  --bg-0: #0b0d12;
  --bg-1: #12151d;
  --bg-deep: #181c27;
  --surface-solid: #151922;
  --surface-raised: #1b2030;
  --surface-muted: #10141c;
  --surface-subtle: rgb(255 255 255 / 0.045);
  --shadow-card: 0 1px 0 rgb(255 255 255 / 0.06), 0 18px 44px rgb(0 0 0 / 0.2);
  --shadow-card-hover: 0 24px 56px rgb(0 0 0 / 0.32);

  --glass-fill: linear-gradient(
    155deg,
    rgb(255 255 255 / 0.1) 0%,
    rgb(255 255 255 / 0.03) 100%
  );
  --glass-border: rgb(255 255 255 / 0.12);
  --glass-inset: rgb(255 255 255 / 0.18);
  --glass-inner: rgb(10 12 18 / 0.45);
  --glass-shadow:
    0 1px 0 rgb(255 255 255 / 0.06),
    0 18px 48px rgb(0 0 0 / 0.45);
  --chip-fill: rgb(255 255 255 / 0.06);
  --hud-fill: rgb(8 10 16 / 0.4);

  --scrollbar-track: transparent;
  --scrollbar-thumb: rgb(255 255 255 / 0.18);
  --scrollbar-thumb-hover: rgb(240 163 90 / 0.55);
  --scrollbar-thumb-active: rgb(240 163 90 / 0.75);
  --scrollbar-thumb-border: rgb(255 255 255 / 0.08);

  color-scheme: dark;
}

@media (prefers-reduced-transparency: reduce) {
  :root,
  html[data-theme='dark'] {
    --glass-blur: none;
    --glass-blur-heavy: none;
    --glass-fill: var(--surface-raised);
    --glass-inner: var(--surface-solid);
    --chip-fill: var(--surface-muted);
    --hud-fill: var(--surface-raised);
  }
}

*,
*::before,
*::after {
  box-sizing: border-box;
}

html,
body {
  margin: 0;
  min-height: 100%;
}

body {
  font-family: var(--font-sans);
  color: var(--ink);
  background: var(--bg-0);
  line-height: 1.5;
  letter-spacing: -0.012em;
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
}

/* Quiet instrument field: content stays legible, chrome gets the material. */
body::before {
  content: '';
  position: fixed;
  inset: 0;
  z-index: -2;
  background:
    radial-gradient(960px 520px at 4% -10%, rgb(194 65 12 / 0.12), transparent 58%),
    radial-gradient(900px 620px at 100% 0%, rgb(71 91 140 / 0.16), transparent 56%),
    radial-gradient(760px 520px at 68% 110%, rgb(44 57 92 / 0.08), transparent 58%),
    linear-gradient(168deg, var(--bg-0), var(--bg-1) 42%, var(--bg-deep));
}

body::after {
  content: '';
  position: fixed;
  inset: 0;
  z-index: -1;
  pointer-events: none;
  opacity: 0.24;
  background-image:
    linear-gradient(rgb(18 20 28 / 0.04) 1px, transparent 1px),
    linear-gradient(90deg, rgb(18 20 28 / 0.04) 1px, transparent 1px);
  background-size: 56px 56px;
  mask-image: radial-gradient(ellipse 80% 70% at 50% 30%, #000 20%, transparent 75%);
}

html[data-theme='dark'] body::after {
  opacity: 0.22;
  background-image:
    linear-gradient(rgb(255 255 255 / 0.04) 1px, transparent 1px),
    linear-gradient(90deg, rgb(255 255 255 / 0.04) 1px, transparent 1px);
}

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

button,
input,
select {
  font: inherit;
}

:focus-visible {
  outline: 2px solid var(--accent);
  outline-offset: 3px;
}

.mono {
  font-family: var(--font-mono);
  font-variant-numeric: tabular-nums;
}

.sr-only {
  position: absolute;
  width: 1px;
  height: 1px;
  padding: 0;
  margin: -1px;
  overflow: hidden;
  clip: rect(0, 0, 0, 0);
  border: 0;
}

/* Native scrollbar — site-wide (Firefox + Chromium/WebKit) */
html {
  scrollbar-width: thin;
  scrollbar-color: var(--scrollbar-thumb) var(--scrollbar-track);
  scrollbar-gutter: stable;
}

* {
  scrollbar-width: thin;
  scrollbar-color: var(--scrollbar-thumb) var(--scrollbar-track);
}

*::-webkit-scrollbar {
  width: var(--scrollbar-size);
  height: var(--scrollbar-size);
}

*::-webkit-scrollbar-track {
  background: var(--scrollbar-track);
  border-radius: 999px;
}

*::-webkit-scrollbar-thumb {
  background-color: var(--scrollbar-thumb);
  background-clip: padding-box;
  border: 2px solid transparent;
  border-radius: 999px;
  box-shadow: inset 0 0 0 1px var(--scrollbar-thumb-border);
  transition: background-color 0.2s var(--spring-snappy);
}

*::-webkit-scrollbar-thumb:hover {
  background-color: var(--scrollbar-thumb-hover);
  background-clip: padding-box;
  border: 2px solid transparent;
}

*::-webkit-scrollbar-thumb:active {
  background-color: var(--scrollbar-thumb-active);
  background-clip: padding-box;
  border: 2px solid transparent;
}

*::-webkit-scrollbar-corner {
  background: transparent;
}

*::-webkit-scrollbar-button {
  display: none;
  width: 0;
  height: 0;
}

@media (prefers-contrast: more) {
  :root,
  html[data-theme='dark'] {
    --line: currentColor;
    --line-strong: currentColor;
    --glass-border: currentColor;
  }
}

@media (forced-colors: active) {
  *,
  *::before,
  *::after {
    box-shadow: none !important;
  }

  body::before,
  body::after {
    display: none;
  }
}
.glass-group {
  display: flex;
  align-items: center;
  gap: 6px;
}

.glass-bar,
.glass-panel,
.glass-chip,
.glass-tabbar,
.glass-hud,
.glass-btn {
  position: relative;
  isolation: isolate;
  border: 1px solid var(--glass-border);
  background: var(--glass-fill);
  backdrop-filter: var(--glass-blur);
  -webkit-backdrop-filter: var(--glass-blur);
  box-shadow: var(--glass-shadow);
  color: var(--text-on-glass);
}

.glass-bar::before,
.glass-panel::before,
.glass-chip::before,
.glass-tabbar::before,
.glass-hud::before,
.glass-btn::before {
  content: '';
  position: absolute;
  inset: 0;
  border-radius: inherit;
  background: linear-gradient(
    115deg,
    rgb(255 255 255 / 0.5) 0%,
    transparent 36%,
    transparent 70%,
    rgb(255 255 255 / 0.08) 100%
  );
  mix-blend-mode: soft-light;
  pointer-events: none;
}

.glass-bar {
  border-radius: 24px;
  padding: 5px;
}

.glass-bar__inner,
.glass-panel__inner,
.glass-hud__inner {
  position: relative;
  z-index: 1;
  border-radius: 15px;
  background: var(--glass-inner);
  box-shadow: inset 0 1px 0 var(--glass-inset);
}

.glass-bar__inner {
  display: flex;
  align-items: center;
  gap: 8px;
  min-height: 52px;
  padding: 4px 8px 4px 6px;
}

.glass-panel {
  border-radius: var(--glass-radius-panel);
  padding: 5px;
}

.glass-panel__inner {
  border-radius: var(--glass-radius-inner);
  padding: 14px 12px 12px;
}

.glass-chip,
.glass-btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 7px;
  min-height: 40px;
  padding: 0 15px;
  border-radius: var(--glass-radius-chip);
  background: var(--chip-fill);
  cursor: pointer;
  font-size: 0.86rem;
  font-weight: 500;
  letter-spacing: -0.01em;
  transition:
    transform 0.28s var(--spring-snappy),
    background 0.22s var(--spring-snappy),
    box-shadow 0.28s var(--spring-snappy),
    color 0.22s var(--spring-snappy);
}

.glass-chip:hover,
.glass-btn:hover {
  transform: translateY(-1px);
  background: rgb(255 255 255 / 0.58);
}

html[data-theme='dark'] .glass-chip:hover,
html[data-theme='dark'] .glass-btn:hover {
  background: rgb(255 255 255 / 0.1);
}

.glass-chip:active,
.glass-btn:active {
  transform: scale(0.98);
  transition-duration: 0.1s;
}

.glass-chip.is-active,
.glass-nav-item.is-active {
  background: var(--accent-dim);
  color: var(--accent);
  box-shadow: inset 0 0 0 1px color-mix(in srgb, var(--accent) 35%, transparent);
}

html[data-theme='dark'] .glass-chip.is-active,
html[data-theme='dark'] .glass-nav-item.is-active {
  color: var(--accent-hot);
  box-shadow: inset 0 0 0 1px color-mix(in srgb, var(--accent-hot) 40%, transparent);
}

.glass-btn--prominent {
  background: linear-gradient(180deg, var(--accent-hot), var(--accent));
  color: #fff8f3;
  border-color: rgb(255 255 255 / 0.2);
  box-shadow:
    inset 0 1px 0 rgb(255 255 255 / 0.28),
    0 8px 22px var(--accent-glow);
}

.glass-btn--prominent:hover {
  filter: brightness(1.05);
  background: linear-gradient(180deg, var(--accent-hot), var(--accent));
}

.glass-btn--ghost {
  background: transparent;
}

.glass-nav-item {
  display: flex;
  align-items: center;
  gap: 10px;
  width: 100%;
  min-height: 42px;
  padding: 7px 10px;
  border: 0;
  border-radius: 12px;
  background: transparent;
  color: var(--ink);
  cursor: pointer;
  text-align: left;
  font-size: 0.88rem;
  font-weight: 500;
  letter-spacing: -0.01em;
  opacity: 0.78;
  transition:
    background 0.2s var(--spring-snappy),
    color 0.2s var(--spring-snappy),
    opacity 0.2s var(--spring-snappy);
}

.glass-nav-item__icon {
  display: grid;
  place-items: center;
  width: 26px;
  height: 26px;
  flex: 0 0 auto;
  border-radius: 9px;
  background: rgb(255 255 255 / 0.34);
  color: var(--ink-soft);
  font-family: var(--font-mono);
  font-size: 0.72rem;
}

.glass-nav-item.is-active .glass-nav-item__icon {
  background: var(--accent);
  color: white;
  box-shadow: 0 5px 12px var(--accent-glow);
}

.glass-nav-item:hover {
  background: rgb(255 255 255 / 0.42);
  color: var(--ink);
  opacity: 1;
}

html[data-theme='dark'] .glass-nav-item:hover {
  background: rgb(255 255 255 / 0.06);
}

.glass-nav-item.is-active {
  color: var(--accent);
  font-weight: 600;
  opacity: 1;
}

.glass-tabbar {
  border-radius: 22px;
  padding: 6px;
}

.glass-tabbar__inner {
  position: relative;
  z-index: 1;
  display: grid;
  grid-template-columns: repeat(5, 1fr);
  gap: 2px;
  border-radius: 16px;
  background: var(--glass-inner);
  padding: 3px;
  box-shadow: inset 0 1px 0 var(--glass-inset);
}

.glass-tab {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 2px;
  min-height: 46px;
  padding: 6px 2px;
  border: 0;
  border-radius: 13px;
  background: transparent;
  color: var(--ink-faint);
  font-size: 0.62rem;
  cursor: pointer;
}

.glass-tab strong {
  font-size: 0.7rem;
  font-weight: 600;
  color: var(--ink-soft);
}

.glass-tab.is-active {
  background: var(--accent-dim);
}

.glass-tab.is-active strong {
  color: var(--accent);
}

.glass-hud {
  border-radius: 22px;
  padding: 5px;
  background: var(--hud-fill);
  backdrop-filter: var(--glass-blur-heavy);
  -webkit-backdrop-filter: var(--glass-blur-heavy);
}

.glass-hud__inner {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 6px;
  padding: 6px;
}

.glass-hud .glass-btn {
  min-height: 42px;
  border-color: transparent;
  background: transparent;
  backdrop-filter: none;
  -webkit-backdrop-filter: none;
  box-shadow: none;
}

.glass-hud .glass-btn:hover {
  background: rgb(255 255 255 / 0.18);
}

.glass-menu {
  position: absolute;
  top: calc(100% + 8px);
  right: 0;
  z-index: 40;
  min-width: 176px;
  padding: 5px;
  border-radius: 20px;
  border: 1px solid var(--glass-border);
  background: var(--glass-fill);
  backdrop-filter: var(--glass-blur-heavy);
  -webkit-backdrop-filter: var(--glass-blur-heavy);
  box-shadow: var(--glass-shadow);
}

@media (max-width: 760px) {
  .glass-chip,
  .glass-btn {
    min-height: 44px;
  }

  .glass-hud .glass-btn {
    min-width: 44px;
    min-height: 44px;
    padding: 0 12px;
  }
}

.glass-menu[hidden] {
  display: none;
}

.glass-menu button {
  display: block;
  width: 100%;
  padding: 9px 11px;
  border: 0;
  border-radius: 11px;
  background: transparent;
  color: var(--ink);
  text-align: left;
  cursor: pointer;
  font-size: 0.88rem;
}

.glass-menu button:hover,
.glass-menu button.is-active {
  background: var(--accent-dim);
  color: var(--accent);
}

@media (prefers-reduced-motion: reduce) {
  .glass-chip,
  .glass-btn,
  .glass-nav-item {
    transition: none !important;
  }

  .glass-chip:hover,
  .glass-btn:hover {
    transform: none;
  }
}
.app-shell {
  display: grid;
  grid-template-rows: auto 1fr;
  min-height: 100dvh;
  max-width: var(--workspace-max-width);
  margin: 0 auto;
  padding: var(--workspace-padding-top) var(--workspace-padding-x) var(--workspace-padding-bottom);
}

.app-top {
  position: sticky;
  top: 12px;
  z-index: 30;
}

.app-brand {
  display: inline-flex;
  align-items: center;
  gap: 9px;
  padding: 0 6px 0 2px;
  font-family: var(--font-display);
  font-weight: 700;
  letter-spacing: -0.04em;
  white-space: nowrap;
}

.app-brand__text {
  display: grid;
  gap: 1px;
}

.app-brand__text strong {
  font-size: 0.92rem;
  line-height: 1;
}

.app-brand__text small {
  color: var(--ink-faint);
  font-family: var(--font-mono);
  font-size: 0.5rem;
  font-weight: 500;
  letter-spacing: 0.11em;
  line-height: 1;
}

.app-brand__mark {
  width: 26px;
  height: 26px;
  border-radius: 8px;
  background:
    url('/favicon.svg') center / cover no-repeat;
  box-shadow:
    0 4px 12px var(--accent-glow);
}

.app-brand span {
  font-size: 0.98rem;
}

.app-top__spacer {
  flex: 1;
}

.app-top__actions {
  display: flex;
  align-items: center;
  gap: 5px;
  position: relative;
}

.app-body {
  display: grid;
  grid-template-columns: 224px minmax(0, 1fr);
  gap: var(--space-6);
  margin-top: var(--space-6);
  min-height: 0;
}

.app-sidebar {
  position: sticky;
  top: 88px;
  align-self: start;
  max-height: calc(100dvh - 100px);
  overflow: auto;
}

.app-sidebar__group + .app-sidebar__group {
  margin-top: 16px;
  padding-top: 14px;
  border-top: 1px solid var(--line);
}

.app-sidebar__intro {
  margin-bottom: var(--space-5);
  padding: 2px 5px var(--space-4);
  border-bottom: 1px solid var(--line);
}

.app-sidebar__intro .status-pill {
  width: 100%;
  height: auto;
  min-height: 34px;
  padding: 8px 10px;
  line-height: 1.35;
}

.app-sidebar__label {
  margin: 0 0 6px 10px;
  color: var(--ink-faint);
  font-size: 0.65rem;
  font-weight: 700;
  letter-spacing: 0.12em;
  text-transform: uppercase;
}

.app-main {
  min-width: 0;
  padding: 8px 0 var(--space-8);
}

/* Asymmetric hero — instrument readout */
.page-hero {
  display: grid;
  grid-template-columns: minmax(0, 1.15fr) minmax(280px, 0.85fr);
  gap: var(--space-6) var(--space-10);
  align-items: center;
  min-height: 214px;
  margin-bottom: var(--space-6);
  padding: clamp(24px, 3vw, 42px);
  border: 1px solid var(--line);
  border-radius: var(--radius-panel);
  background:
    linear-gradient(120deg, color-mix(in srgb, var(--accent) 9%, transparent), transparent 46%),
    var(--surface-raised);
  box-shadow: var(--shadow-card);
  overflow: hidden;
}

.page-hero:not(:has(.page-hero__readout)) {
  grid-template-columns: minmax(0, 1fr) auto;
  max-width: none;
}

.page-hero__copy {
  display: grid;
  gap: 12px;
  padding-bottom: 4px;
}

.page-hero__eyebrow {
  margin: 0;
  color: var(--accent);
  font-size: var(--text-caption);
  font-weight: 700;
  letter-spacing: 0.14em;
  text-transform: uppercase;
}

.page-hero h1 {
  margin: 0;
  max-width: 18ch;
  font-family: var(--font-display);
  font-size: var(--text-title);
  line-height: 0.98;
  letter-spacing: -0.055em;
  font-weight: 800;
  color: var(--ink);
}

.page-hero p {
  margin: 0;
  max-width: 42rem;
  color: var(--ink-soft);
  font-size: 1.02rem;
  line-height: 1.55;
  font-weight: 500;
}

.page-hero__readout {
  justify-self: end;
  width: min(100%, 320px);
  padding: 18px 18px 16px;
  border-radius: var(--radius-card);
  border: 1px solid var(--line-strong);
  background:
    linear-gradient(160deg, var(--surface-raised), var(--surface-solid));
  box-shadow: 0 10px 28px rgb(24 30 48 / 0.06);
}

.page-hero__readout-label {
  color: var(--ink-faint);
  font-size: 0.7rem;
  font-weight: 600;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}

.page-hero__readout-value {
  margin-top: 8px;
  font-family: var(--font-mono);
  font-size: clamp(1.35rem, 2.4vw, 1.75rem);
  font-weight: 500;
  letter-spacing: -0.04em;
  line-height: 1.1;
}

.page-hero__readout-meta {
  margin-top: 10px;
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
}

.tag {
  display: inline-flex;
  align-items: center;
  min-height: 24px;
  padding: 0 9px;
  border-radius: 999px;
  background: var(--surface-muted);
  color: var(--ink-soft);
  font-size: 0.72rem;
  font-weight: 500;
  font-family: var(--font-mono);
}

.tag--accent {
  background: var(--accent-dim);
  color: var(--accent);
}

/* Broken rhythm metric board */
.metric-board {
  display: grid;
  grid-template-columns: 1.4fr 1fr 1fr 1fr;
  grid-template-rows: auto;
  gap: 10px;
  margin-bottom: 18px;
}

.metric-card {
  position: relative;
  border-radius: 16px;
  border: 1px solid var(--line-strong);
  background: var(--surface-raised);
  padding: 14px 15px 12px;
  overflow: hidden;
  box-shadow: 0 1px 0 rgb(255 255 255 / 0.8), 0 8px 20px rgb(24 30 48 / 0.04);
}

.metric-card__value {
  margin-top: 6px;
  font-family: var(--font-mono);
  font-size: 1.08rem;
  font-weight: 600;
  letter-spacing: -0.03em;
  color: var(--ink);
}

.surface-card {
  border-radius: 18px;
  border: 1px solid var(--line-strong);
  background: var(--surface-raised);
  padding: 18px 18px 16px;
  box-shadow: 0 1px 0 rgb(255 255 255 / 0.85), 0 10px 24px rgb(24 30 48 / 0.045);
}

.metric-card--lead {
  background:
    linear-gradient(145deg, color-mix(in srgb, var(--accent) 12%, transparent), transparent 55%),
    var(--surface-raised);
  border-color: color-mix(in srgb, var(--accent) 28%, transparent);
  padding: 18px 18px 16px;
}

.metric-card--lead .metric-card__value {
  font-size: clamp(1.35rem, 2vw, 1.7rem);
  margin-top: 10px;
}

.metric-card__label {
  color: var(--ink-faint);
  font-size: 0.72rem;
  font-weight: 600;
  letter-spacing: 0.04em;
  text-transform: uppercase;
}

.metric-card__hint {
  margin-top: 6px;
  color: var(--ink-faint);
  font-size: 0.72rem;
}

.panel-grid {
  display: grid;
  grid-template-columns: 1.15fr 0.85fr;
  gap: 12px;
}

.surface-card h2 {
  margin: 0 0 6px;
  font-family: var(--font-display);
  font-size: 1.15rem;
  font-weight: 700;
  letter-spacing: -0.035em;
}

.surface-card p {
  margin: 0;
  color: var(--ink-soft);
  font-size: 0.9rem;
  line-height: 1.55;
}

.kv-list {
  display: grid;
  gap: 0;
  margin: 14px 0 0;
  padding: 0;
  list-style: none;
}

.kv-list li {
  display: flex;
  justify-content: space-between;
  align-items: baseline;
  gap: 14px;
  padding: 9px 0;
  border-bottom: 1px solid var(--line);
  font-size: 0.88rem;
}

.kv-list li:last-child {
  border-bottom: 0;
  padding-bottom: 0;
}

.kv-list span {
  color: var(--ink-soft);
}

.kv-list strong {
  font-family: var(--font-mono);
  font-weight: 500;
  font-size: 0.84rem;
  text-align: right;
  letter-spacing: -0.02em;
}

.section-head {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  gap: 12px;
  margin: 28px 0 12px;
}

.section-head h2 {
  margin: 0;
  font-family: var(--font-display);
  font-size: 1.25rem;
  font-weight: 700;
  letter-spacing: -0.04em;
}

.section-head span {
  color: var(--ink-faint);
  font-size: 0.78rem;
}

/* Tool lanes — not equal card grid */
.tool-grid {
  display: grid;
  grid-template-columns: 1fr;
  gap: 8px;
  margin-top: 0;
}

@media (min-width: 900px) {
  .tool-grid {
    grid-template-columns: 1.2fr 1fr;
    grid-auto-rows: minmax(88px, auto);
  }

  .tool-link:first-child {
    grid-row: span 2;
    min-height: 100%;
    padding: 22px;
  }

  .tool-link:first-child h3 {
    font-size: 1.35rem;
  }

  .tool-link:first-child p {
    font-size: 0.95rem;
    max-width: 28ch;
  }
}

.tool-link {
  display: grid;
  align-content: start;
  gap: 8px;
  min-height: 88px;
  padding: 16px 17px;
  border-radius: 16px;
  border: 1px solid var(--line);
  background: var(--surface-solid);
  transition:
    transform 0.28s var(--spring-snappy),
    border-color 0.28s var(--spring-snappy),
    background 0.28s var(--spring-snappy),
    box-shadow 0.28s var(--spring-snappy);
}

.tool-link:hover {
  transform: translateY(-2px);
  border-color: color-mix(in srgb, var(--accent) 40%, transparent);
  background: var(--surface-raised);
  box-shadow: 0 12px 28px rgb(24 30 48 / 0.07);
}

.tool-link h3 {
  margin: 0;
  font-family: var(--font-display);
  font-size: 1.02rem;
  font-weight: 700;
  letter-spacing: -0.03em;
}

.tool-link p {
  margin: 0;
  color: var(--ink-soft);
  font-size: 0.84rem;
  line-height: 1.45;
}

.tool-link__index {
  color: var(--accent);
  font-family: var(--font-mono);
  font-size: 0.7rem;
  font-weight: 500;
  letter-spacing: 0.06em;
}

.faq {
  margin-top: 22px;
}

.faq details {
  border-bottom: 1px solid var(--line);
  padding: 12px 0;
}

.faq summary {
  cursor: pointer;
  font-weight: 600;
  letter-spacing: -0.015em;
}

.faq p {
  margin: 8px 0 2px;
  color: var(--ink-soft);
  font-size: 0.9rem;
}

.app-mobile-tab {
  position: fixed;
  left: 10px;
  right: 10px;
  bottom: 10px;
  z-index: 30;
  display: none;
}

.app-footer {
  margin-top: var(--space-8);
  padding: var(--space-5) 2px 0;
  border-top: 1px solid var(--line);
  color: var(--ink-faint);
  font-size: 0.75rem;
  letter-spacing: 0.02em;
}

.app-footer a {
  color: inherit;
  text-decoration: underline;
  text-underline-offset: 0.18em;
  text-decoration-color: color-mix(in srgb, var(--ink-faint) 55%, transparent);
}

.app-footer a:hover {
  color: var(--ink-soft);
  text-decoration-color: currentColor;
}

.stage-root {
  position: fixed;
  inset: 0;
  z-index: 80;
  background: #000;
}

.stage-root[hidden] {
  display: none;
}

.stage-canvas {
  position: relative;
  width: 100%;
  height: 100%;
  overflow: hidden;
}

.stage-hud {
  position: fixed;
  left: 50%;
  bottom: max(16px, env(safe-area-inset-bottom));
  transform: translateX(-50%);
  z-index: 90;
  width: min(720px, calc(100% - 20px));
  transition: opacity 0.28s var(--spring-snappy), transform 0.28s var(--spring-snappy);
}

.stage-hud.is-hidden {
  opacity: 0;
  pointer-events: none;
  transform: translate(-50%, 10px);
}

.stage-hud [data-stage-label] {
  margin-left: auto;
  padding: 0 10px;
  color: var(--ink-soft);
  font-size: 0.74rem;
  white-space: nowrap;
}

.toolbar-row {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin-top: 16px;
}

.swatch-row {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin-top: 12px;
}

.swatch {
  width: 34px;
  height: 34px;
  border-radius: 11px;
  border: 1px solid rgb(18 20 28 / 0.12);
  cursor: pointer;
  box-shadow: inset 0 1px 0 rgb(255 255 255 / 0.25);
  transition: transform 0.2s var(--spring-snappy);
}

.swatch:hover {
  transform: translateY(-1px);
}

.swatch.is-active {
  transform: translateY(-2px) scale(1.08);
  box-shadow: 0 0 0 3px var(--surface-raised), 0 0 0 5px var(--accent), 0 8px 18px rgb(24 30 48 / 0.16);
}

.note {
  margin-top: 10px;
  color: var(--ink-faint);
  font-size: 0.8rem;
}

html.boot-pending [data-page-content] {
  visibility: hidden;
}

html.boot-pending body {
  overflow: hidden;
}

.scrollbar-custom {
  scrollbar-width: thin;
  scrollbar-color: var(--scrollbar-thumb) var(--scrollbar-track);
}

.scrollbar-custom::-webkit-scrollbar {
  width: 8px;
  height: 8px;
}

.scrollbar-custom::-webkit-scrollbar-track {
  background: var(--scrollbar-track);
  border-radius: 999px;
  margin: 4px 0;
}

.scrollbar-custom::-webkit-scrollbar-thumb {
  background: var(--scrollbar-thumb);
  border-radius: 999px;
  border: 2px solid transparent;
  background-clip: padding-box;
  box-shadow: inset 0 0 0 1px var(--scrollbar-thumb-border);
}

.scrollbar-custom::-webkit-scrollbar-thumb:hover {
  background: var(--scrollbar-thumb-hover);
  background-clip: padding-box;
  border: 2px solid transparent;
}

.scrollbar-custom::-webkit-scrollbar-corner {
  background: transparent;
}

.enter-fade {
  animation: enter-fade 0.4s var(--spring-snappy) both;
}

@keyframes enter-fade {
  from {
    opacity: 0;
    transform: translateY(10px);
  }
  to {
    opacity: 1;
    transform: none;
  }
}

@media (max-width: 1120px) {
  .app-top .seg-desktop {
    display: none;
  }
}

@media (max-width: 980px) {
  .app-shell {
    padding-bottom: calc(92px + env(safe-area-inset-bottom));
  }

  .app-body {
    grid-template-columns: 1fr;
  }

  .app-sidebar {
    display: none;
  }

  .app-mobile-tab {
    display: block;
    bottom: max(10px, env(safe-area-inset-bottom));
  }

  .page-hero {
    grid-template-columns: 1fr;
  }

  .page-hero__readout {
    justify-self: stretch;
    width: auto;
  }

  .metric-board {
    grid-template-columns: 1fr 1fr;
  }

  .metric-card--lead {
    grid-column: 1 / -1;
  }

  .panel-grid,
  .tool-grid {
    grid-template-columns: 1fr;
  }

  .app-top .seg-desktop {
    display: none;
  }
}

@media (max-width: 640px) {
  .app-shell {
    padding-left: 12px;
    padding-right: 12px;
  }

  .app-brand span {
    display: grid;
  }

  .app-brand__text small {
    display: none;
  }

  .app-top__actions .top-cta-chip,
  .app-top__actions [data-action='theme'] {
    display: none;
  }

  .page-hero h1 {
    max-width: none;
  }

  .page-hero {
    min-height: 0;
    padding: 24px 20px;
    border-radius: 22px;
  }

  .stage-hud {
    width: calc(100% - 16px);
    bottom: max(8px, env(safe-area-inset-bottom));
  }

  .stage-hud [data-stage-label] {
    order: -1;
    width: 100%;
    margin: 0;
    overflow: hidden;
    padding: 4px 8px 2px;
    text-align: center;
    text-overflow: ellipsis;
  }

  .stage-hud .glass-hud__inner {
    justify-content: center;
  }
}

@media (prefers-reduced-motion: reduce) {
  .enter-fade,
  .tool-link,
  .swatch {
    animation: none !important;
    transition: none !important;
  }
}
/* Solid instrument surfaces — readable content never sits on blur. */
.surface-card,
.metric-card,
.page-hero__readout {
  border: 1px solid var(--line);
  background: var(--surface-raised);
  box-shadow: var(--shadow-card);
}

.surface-card {
  position: relative;
  overflow: hidden;
  border-radius: var(--radius-panel);
  padding: clamp(20px, 2.5vw, 32px);
}

.instrument-surface {
  animation: instrument-enter 0.55s var(--spring-snappy) both;
  animation-delay: var(--stagger, 0ms);
}

.surface-card::before {
  content: '';
  position: absolute;
  inset: 0 0 auto;
  height: 1px;
  background: rgb(255 255 255 / 0.85);
  pointer-events: none;
}

html[data-theme='dark'] .surface-card::before {
  background: rgb(255 255 255 / 0.08);
}

.surface-card + .surface-card,
.faq.surface-card {
  margin-top: var(--space-4) !important;
}

.surface-card h2 {
  margin: 0 0 var(--space-2);
  font-size: 1.22rem;
}

.instrument-grid {
  display: grid;
  grid-template-columns: repeat(12, minmax(0, 1fr));
  gap: var(--space-4);
}

.instrument-grid > .surface-card {
  grid-column: span 6;
  margin-top: 0 !important;
}

.instrument-grid > .surface-card--wide {
  grid-column: 1 / -1;
}

.metric-board {
  gap: var(--space-3);
  margin-bottom: var(--space-4);
}

.metric-board--equal {
  grid-template-columns: 1.35fr 1fr 1fr;
}

.metric-card {
  min-height: 112px;
  border-radius: var(--radius-card);
  padding: var(--space-5);
}

.metric-card__label {
  font-size: var(--text-caption);
}

.metric-card__value {
  margin-top: var(--space-3);
  font-size: clamp(1.25rem, 2vw, 1.75rem);
}

.kv-list {
  overflow: hidden;
  margin-top: var(--space-4);
  border: 1px solid var(--line);
  border-radius: var(--radius-card);
  background: var(--surface-muted);
}

.kv-list li {
  min-height: 54px;
  padding: 12px 16px;
  border-bottom-color: var(--line);
}

.kv-list strong {
  color: var(--ink);
}

.toolbar-row {
  align-items: center;
  gap: var(--space-2);
  margin-top: var(--space-5);
}

.note {
  max-width: 58rem;
  margin-top: var(--space-3);
  line-height: 1.55;
}

.report-output {
  max-height: 520px;
  overflow: auto;
  margin: 0;
  padding: var(--space-5);
  border: 1px solid var(--line);
  border-radius: var(--radius-card);
  background: var(--surface-muted);
  color: var(--ink-soft);
  font-size: 0.8rem;
  line-height: 1.7;
  white-space: pre-wrap;
}

.raw-data {
  margin-top: var(--space-6);
  border-top: 1px solid var(--line);
  padding-top: var(--space-4);
}

.raw-data summary {
  padding: 8px 0;
  color: var(--ink-faint);
  cursor: pointer;
  font-family: var(--font-mono);
  font-size: var(--text-caption);
  font-weight: 600;
  letter-spacing: 0.08em;
}

.raw-data .report-output {
  margin-top: var(--space-3);
}

.wizard-head {
  display: grid;
  gap: var(--space-3);
}

.wizard-head > div:first-child {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: var(--space-4);
}

.wizard-progress {
  height: 8px;
  overflow: hidden;
  border-radius: 999px;
  background: var(--surface-muted);
}

.wizard-progress span {
  display: block;
  width: 0;
  height: 100%;
  border-radius: inherit;
  background: var(--accent);
  transition: width 0.5s var(--spring-snappy);
}

[data-wizard-steps] li {
  position: relative;
  transition: background 0.25s var(--spring-snappy), color 0.25s var(--spring-snappy);
}

[data-wizard-steps] li.is-current {
  background: var(--accent-dim);
}

[data-wizard-steps] li.is-current::before {
  content: '';
  position: absolute;
  inset: 10px auto 10px 0;
  width: 3px;
  border-radius: 99px;
  background: var(--accent);
}

[data-wizard-steps] li[data-state='pass'] strong {
  color: var(--ok);
}

[data-wizard-steps] li[data-state='fail'] strong {
  color: var(--danger);
}

.settings-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: var(--space-4);
  margin-top: var(--space-5);
}

.settings-group {
  padding: var(--space-4);
  border: 1px solid var(--line);
  border-radius: var(--radius-card);
  background: var(--surface-muted);
}

.segmented-control {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
  margin-top: var(--space-3);
}

.segmented-control button {
  min-height: 38px;
  padding: 0 13px;
  border: 1px solid var(--line);
  border-radius: 12px;
  background: var(--surface-raised);
  color: var(--ink-soft);
  cursor: pointer;
  font-size: 0.8rem;
  font-weight: 600;
}

.segmented-control button:hover {
  border-color: color-mix(in srgb, var(--accent) 36%, transparent);
  color: var(--accent);
}

.segmented-control button.is-active {
  border-color: var(--accent);
  background: var(--accent);
  color: white;
  box-shadow: 0 7px 16px var(--accent-glow);
}

.status-pill {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  min-height: 28px;
  padding: 0 11px;
  border-radius: 999px;
  background: var(--surface-muted);
  color: var(--ink-soft);
  font-size: var(--text-caption);
  font-weight: 600;
}

.status-pill::before {
  content: '';
  width: 7px;
  height: 7px;
  border-radius: 50%;
  background: var(--ok);
}

.mq-state {
  display: inline-flex;
  align-items: center;
  gap: 7px;
  min-width: 70px;
  color: var(--ink-faint) !important;
  font-family: var(--font-mono);
  font-size: 0.7rem !important;
  letter-spacing: 0.04em;
}

.mq-state i {
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background: currentColor;
}

.mq-state.is-true {
  color: var(--ok) !important;
}

.measure-progress {
  height: 7px;
  margin-top: var(--space-5);
  overflow: hidden;
  border-radius: 999px;
  background: var(--surface-muted);
}

.measure-progress[hidden] {
  display: none;
}

.measure-progress span {
  display: block;
  width: 0;
  height: 100%;
  border-radius: inherit;
  background: var(--accent);
  box-shadow: 0 0 14px var(--accent-glow);
  transition: width 0.1s linear;
}

@media (max-width: 760px) {
  .instrument-grid {
    grid-template-columns: 1fr;
  }

  .instrument-grid > .surface-card,
  .instrument-grid > .surface-card--wide {
    grid-column: 1;
  }

  .surface-card {
    padding: 18px;
    border-radius: 22px;
  }

  .kv-list li {
    align-items: flex-start;
  }

  .metric-board--equal {
    grid-template-columns: 1fr 1fr;
  }

  .metric-board--equal .metric-card--lead {
    grid-column: 1 / -1;
  }

  .settings-grid {
    grid-template-columns: 1fr;
  }
}

@keyframes instrument-enter {
  from {
    opacity: 0;
    transform: translateY(12px) scale(0.985);
  }
  to {
    opacity: 1;
    transform: none;
  }
}

@media (prefers-reduced-motion: reduce) {
  .instrument-surface {
    animation: none;
  }
}
/* Home landing — visual product story, not a card directory */
.app-shell--home {
  max-width: var(--workspace-max-width);
  padding-bottom: 48px;
}

.app-shell--home .app-body {
  display: block;
  margin-top: 28px;
}

.app-shell--home .app-sidebar,
.app-shell--home .app-mobile-tab {
  display: none;
}

.home-hero {
  display: grid;
  grid-template-columns: minmax(380px, 0.86fr) minmax(520px, 1.14fr);
  gap: clamp(56px, 7vw, 112px);
  align-items: center;
  min-height: clamp(520px, 36vw, 640px);
  padding: 54px clamp(18px, 3vw, 44px) 38px;
}

.home-hero__copy {
  position: relative;
  z-index: 2;
}

.home-eyebrow {
  display: inline-flex;
  align-items: center;
  gap: 9px;
  margin-bottom: 20px;
  color: var(--ink-soft);
  font-size: 0.74rem;
  font-weight: 700;
  letter-spacing: 0.04em;
}

.home-eyebrow__pulse {
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background: #27a269;
  box-shadow: 0 0 0 5px rgb(39 162 105 / 0.12);
}

.home-hero__brand {
  margin: 0;
  font-family: var(--font-display);
  font-size: clamp(4.6rem, 8.5vw, 7.6rem);
  font-weight: 800;
  letter-spacing: -0.085em;
  line-height: 0.82;
  color: var(--ink);
}

.home-hero__lead {
  margin: 30px 0 0;
  max-width: 34rem;
  color: var(--ink-soft);
  font-size: clamp(1rem, 1.5vw, 1.16rem);
  font-weight: 500;
  line-height: 1.7;
}

.home-hero__cta {
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  gap: 12px;
  margin-top: 28px;
}

.home-cta {
  display: inline-flex;
  align-items: center;
  justify-content: space-between;
  gap: 34px;
  min-height: 58px;
  min-width: 230px;
  padding: 0 9px 0 24px;
  border-radius: 18px;
  border: 1px solid rgb(255 255 255 / 0.24);
  background: var(--accent);
  color: #fff8f3;
  font-family: var(--font-display);
  font-size: 1rem;
  font-weight: 700;
  letter-spacing: -0.02em;
  box-shadow: inset 0 1px 0 rgb(255 255 255 / 0.28), 0 18px 38px var(--accent-glow);
  transition: transform 0.28s var(--spring-snappy), box-shadow 0.28s var(--spring-snappy);
}

.home-cta__arrow {
  display: grid;
  place-items: center;
  width: 40px;
  height: 40px;
  border-radius: 12px;
  background: rgb(255 255 255 / 0.18);
  font-size: 1.1rem;
  transition: transform 0.28s var(--spring-snappy);
}

.home-cta:hover {
  transform: translateY(-3px);
  box-shadow: inset 0 1px 0 rgb(255 255 255 / 0.32), 0 22px 48px var(--accent-glow);
}

.home-cta:hover .home-cta__arrow {
  transform: rotate(8deg);
}

.home-cta:active {
  transform: scale(0.98);
}

.home-cta__hint {
  margin: 0;
  max-width: 25rem;
  color: var(--ink-faint);
  font-size: 0.78rem;
}

.home-visual {
  position: relative;
  min-height: clamp(410px, 29vw, 500px);
  perspective: 1200px;
}

.home-visual__halo {
  position: absolute;
  inset: 3% -8% -8%;
  border-radius: 50%;
  background: radial-gradient(circle, rgb(234 88 12 / 0.24), rgb(86 105 150 / 0.09) 48%, transparent 70%);
  filter: blur(8px);
}

.home-display {
  position: absolute;
  inset: 35px 3% 20px;
  overflow: hidden;
  border: 7px solid #111318;
  border-radius: 30px;
  background: #111318;
  box-shadow: 0 42px 75px rgb(24 30 48 / 0.28), 0 10px 22px rgb(24 30 48 / 0.18);
  transform: rotateY(-7deg) rotateX(2deg) rotateZ(1deg);
}

.home-display__bar {
  display: flex;
  align-items: center;
  gap: 5px;
  height: 32px;
  padding: 0 11px;
  background: #1d2027;
}

.home-display__bar span {
  width: 6px;
  height: 6px;
  border-radius: 50%;
  background: #535967;
}

.home-display__bar i {
  width: 40%;
  height: 6px;
  margin-left: auto;
  border-radius: 99px;
  background: #30343d;
}

.home-display__canvas {
  position: relative;
  display: grid;
  grid-template-columns: 1fr 1fr;
  height: calc(100% - 32px);
  overflow: hidden;
}

.home-display__tile {
  display: block;
}

.home-display__tile--red { background: #f04a37; }
.home-display__tile--blue { background: #3478f6; }
.home-display__tile--white { background: #f4f1e9; }
.home-display__tile--green { background: #30a46c; }

.home-display__target {
  position: absolute;
  top: 50%;
  left: 50%;
  width: 72px;
  height: 72px;
  border: 1px solid rgb(255 255 255 / 0.85);
  border-radius: 50%;
  box-shadow: 0 0 0 14px rgb(255 255 255 / 0.12);
  transform: translate(-50%, -50%);
}

.home-display__target::before,
.home-display__target::after {
  content: '';
  position: absolute;
  background: rgb(255 255 255 / 0.85);
}

.home-display__target::before {
  top: 50%;
  left: -16px;
  right: -16px;
  height: 1px;
}

.home-display__target::after {
  top: -16px;
  bottom: -16px;
  left: 50%;
  width: 1px;
}

.home-display__scan {
  position: absolute;
  inset: 32px 0 auto;
  height: 2px;
  background: rgb(255 255 255 / 0.75);
  box-shadow: 0 0 16px rgb(255 255 255 / 0.9);
  animation: home-scan 4s ease-in-out infinite;
}

.home-visual__chip {
  position: absolute;
  z-index: 3;
  display: flex;
  align-items: center;
  gap: 9px;
  padding: 11px 14px;
  border: 1px solid rgb(255 255 255 / 0.65);
  border-radius: 14px;
  background: rgb(255 255 255 / 0.74);
  backdrop-filter: blur(18px) saturate(1.4);
  color: #20242d;
  box-shadow: 0 14px 32px rgb(24 30 48 / 0.17);
  font-family: var(--font-mono);
  font-size: 0.7rem;
}

.home-visual__chip b {
  font-weight: 600;
}

.home-visual__chip--top {
  top: 6px;
  right: -12px;
}

.home-visual__chip--bottom {
  bottom: 0;
  left: -18px;
}

.home-visual__dot {
  width: 7px;
  height: 7px;
  border-radius: 50%;
  background: var(--accent-hot);
  box-shadow: 0 0 0 4px rgb(234 88 12 / 0.12);
}

html[data-theme='dark'] .home-visual__chip {
  border-color: rgb(255 255 255 / 0.14);
  background: rgb(24 28 38 / 0.78);
  color: #eef0f5;
}

.home-status {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  margin: 4px 0 14px;
  border-top: 1px solid var(--line-strong);
  border-bottom: 1px solid var(--line-strong);
}

.home-status > div {
  display: grid;
  gap: 5px;
  padding: 21px 28px;
}

.home-status > div + div {
  border-left: 1px solid var(--line-strong);
}

.home-status small {
  color: var(--ink-faint);
  font-size: 0.65rem;
  font-weight: 700;
  letter-spacing: 0.11em;
  text-transform: uppercase;
}

.home-status strong {
  color: var(--ink);
  font-size: 0.94rem;
  font-weight: 600;
}

.home-paths {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 12px;
  margin-top: 40px;
}

.home-path {
  display: flex;
  min-height: 270px;
  flex-direction: column;
  justify-content: space-between;
  padding: 20px;
  border: 1px solid var(--line-strong);
  border-radius: 24px;
  background: var(--surface-raised);
  text-align: left;
  box-shadow: 0 1px 0 rgb(255 255 255 / 0.65), 0 12px 30px rgb(24 30 48 / 0.05);
  transition: transform 0.28s var(--spring-snappy), border-color 0.28s var(--spring-snappy), box-shadow 0.28s var(--spring-snappy);
}

.home-path:hover {
  transform: translateY(-5px);
  border-color: color-mix(in srgb, var(--accent) 42%, transparent);
  box-shadow: 0 20px 42px rgb(24 30 48 / 0.11);
}

.home-path__top {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
}

.home-path__arrow {
  color: var(--ink-faint);
  font-size: 1.1rem;
  transition: transform 0.28s var(--spring-snappy), color 0.28s var(--spring-snappy);
}

.home-path:hover .home-path__arrow {
  color: var(--accent);
  transform: translate(2px, -2px);
}

.home-path__icon {
  position: relative;
  display: block;
  width: 62px;
  height: 62px;
  border: 1px solid var(--line);
  border-radius: 18px;
  background: var(--surface-muted);
}

.home-path__icon--pixel {
  background:
    linear-gradient(90deg, transparent 48%, rgb(255 255 255 / 0.7) 48% 52%, transparent 52%),
    linear-gradient(transparent 48%, rgb(255 255 255 / 0.7) 48% 52%, transparent 52%),
    var(--accent);
}

.home-path__icon--pixel::after {
  content: '';
  position: absolute;
  right: 12px;
  bottom: 12px;
  width: 9px;
  height: 9px;
  border: 3px solid #fff;
  border-radius: 50%;
}

.home-path__icon--bleed {
  background: #171a21;
  box-shadow: inset 0 0 20px 7px rgb(255 255 255 / 0.17);
}

.home-path__icon--bleed::after {
  content: '';
  position: absolute;
  inset: 17px;
  border: 1px solid rgb(255 255 255 / 0.55);
  border-radius: 7px;
}

.home-path__icon--touch::before,
.home-path__icon--touch::after {
  content: '';
  position: absolute;
  border: 2px solid var(--accent);
  border-radius: 50%;
}

.home-path__icon--touch::before {
  inset: 13px;
}

.home-path__icon--touch::after {
  inset: 23px;
  background: var(--accent);
}

.home-path__kicker {
  margin: 0 0 8px;
  color: var(--accent);
  font-family: var(--font-mono);
  font-size: 0.64rem;
  font-weight: 600;
  letter-spacing: 0.08em;
}

.home-path h2 {
  margin: 0;
  font-family: var(--font-display);
  font-size: 1.45rem;
  font-weight: 700;
  letter-spacing: -0.04em;
}

.home-path p:not(.home-path__kicker) {
  margin: 7px 0 0;
  color: var(--ink-soft);
  font-size: 0.9rem;
  line-height: 1.5;
}

.home-more {
  margin-top: 16px;
  overflow: hidden;
  border: 1px solid var(--line);
  border-radius: 24px;
  background: color-mix(in srgb, var(--surface-raised) 82%, transparent);
}

.home-more summary {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 20px 22px 16px;
  cursor: pointer;
  list-style: none;
  font-weight: 600;
  letter-spacing: -0.015em;
}

.home-more summary::after {
  content: '+';
  color: var(--ink-faint);
  font-family: var(--font-mono);
  font-size: 1.1rem;
  font-weight: 400;
}

.home-more[open] summary::after {
  content: '−';
}

.home-more summary::-webkit-details-marker {
  display: none;
}

.home-more__grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 10px;
  padding: 0 14px 14px;
}

.home-more__grid a {
  position: relative;
  display: grid;
  grid-template-columns: 42px minmax(0, 1fr) auto;
  align-items: center;
  gap: 12px;
  min-height: 72px;
  padding: 11px 14px 11px 11px;
  border: 1px solid var(--line);
  border-radius: 16px;
  background: var(--surface-muted);
  color: var(--ink);
  font-size: 0.84rem;
  font-weight: 600;
  transition:
    transform 0.24s var(--spring-snappy),
    background 0.2s var(--spring-snappy),
    border-color 0.2s var(--spring-snappy);
}

.home-more__grid a::after {
  content: '↗';
  color: var(--ink-faint);
  font-size: 0.88rem;
  font-weight: 400;
  transition: transform 0.24s var(--spring-snappy), color 0.2s var(--spring-snappy);
}

.home-more__icon {
  display: grid;
  place-items: center;
  width: 42px;
  height: 42px;
  border: 1px solid var(--line);
  border-radius: 13px;
  background: var(--surface-raised);
  color: var(--accent);
  font-family: var(--font-mono);
  font-size: 1.05rem;
  font-weight: 500;
  box-shadow: 0 4px 10px rgb(24 30 48 / 0.05);
}

.home-more__grid a:hover {
  border-color: color-mix(in srgb, var(--accent) 24%, transparent);
  background: var(--accent-dim);
  color: var(--accent);
  transform: translateY(-2px);
}

.home-more__grid a:hover::after {
  color: var(--accent);
  transform: translate(2px, -2px);
}

.home-faq {
  margin-top: 22px;
}

.home-qa-head {
  display: flex;
  align-items: flex-end;
  justify-content: space-between;
  gap: 20px;
}

.home-qa-head h2 {
  margin: 0;
  font-size: 1.55rem;
}

.home-qa-head > a {
  color: var(--accent);
  font-size: 0.82rem;
  font-weight: 700;
}

.home-qa-list {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 10px;
  margin-top: 18px;
}

.home-qa-list a {
  display: grid;
  grid-template-columns: auto minmax(0, 1fr) auto;
  align-items: center;
  gap: 12px;
  min-height: 82px;
  padding: 14px;
  border: 1px solid var(--line);
  border-radius: 16px;
  background: var(--surface-muted);
  transition:
    transform 0.25s var(--spring-snappy),
    border-color 0.25s var(--spring-snappy);
}

.home-qa-list a:hover {
  transform: translateY(-2px);
  border-color: color-mix(in srgb, var(--accent) 34%, transparent);
}

.home-qa-list span {
  color: var(--accent);
  font-family: var(--font-mono);
  font-size: 0.68rem;
  font-weight: 600;
}

.home-qa-list strong {
  font-size: 0.88rem;
  line-height: 1.4;
}

.home-qa-list i {
  color: var(--ink-faint);
  font-style: normal;
}

.top-cta-chip {
  background: var(--accent) !important;
  color: #fff8f3 !important;
  border-color: rgb(255 255 255 / 0.2) !important;
  box-shadow: inset 0 1px 0 rgb(255 255 255 / 0.28), 0 8px 20px var(--accent-glow);
  font-weight: 700;
}

@keyframes home-scan {
  0%, 10% { transform: translateY(0); opacity: 0; }
  20% { opacity: 1; }
  80% { opacity: 1; }
  90%, 100% { transform: translateY(292px); opacity: 0; }
}

@media (min-width: 1500px) {
  .app-shell--home {
    padding-left: 34px;
    padding-right: 34px;
  }

  .home-hero__brand {
    font-size: clamp(7rem, 7.2vw, 8.6rem);
  }

  .home-paths {
    gap: 16px;
  }

  .home-path {
    min-height: 292px;
    padding: 24px;
  }

  .home-path__icon {
    width: 68px;
    height: 68px;
  }
}

@media (max-width: 820px) {
  .home-hero {
    grid-template-columns: 1fr;
    gap: 22px;
    padding: 44px 8px 28px;
  }

  .home-hero__copy {
    max-width: 34rem;
  }

  .home-visual {
    min-height: 330px;
  }

  .home-display {
    inset: 20px 5% 16px;
  }
}

@media (max-width: 640px) {
  .app-shell--home {
    padding-bottom: 34px;
  }

  .app-shell--home .app-brand span {
    display: grid;
  }

  .app-shell--home .app-brand__text small {
    display: none;
  }

  .app-shell--home .app-top__actions .top-cta-chip,
  .app-shell--home .app-top__actions [data-action='theme'] {
    display: none;
  }

  .home-hero {
    min-height: auto;
    padding-top: 40px;
  }

  .home-hero__brand {
    font-size: clamp(4rem, 22vw, 6rem);
  }

  .home-hero__lead {
    margin-top: 24px;
  }

  .home-cta {
    width: 100%;
  }

  .home-visual {
    min-height: 255px;
  }

  .home-display {
    inset: 20px 2px 10px;
    border-width: 5px;
    border-radius: 23px;
    transform: none;
  }

  .home-visual__chip--top {
    right: -2px;
  }

  .home-visual__chip--bottom {
    bottom: -12px;
    left: -2px;
  }

  .home-status {
    grid-template-columns: 1fr;
    margin-top: 28px;
  }

  .home-status > div {
    grid-template-columns: 1fr auto;
    align-items: center;
    padding: 14px 6px;
  }

  .home-status > div + div {
    border-top: 1px solid var(--line);
    border-left: 0;
  }

  .home-paths,
  .home-more__grid,
  .home-qa-list {
    grid-template-columns: 1fr;
  }

  .home-qa-head {
    align-items: flex-start;
    flex-direction: column;
    gap: 8px;
  }

  .home-paths {
    margin-top: 28px;
  }

  .home-path {
    min-height: 210px;
  }
}

@media (prefers-reduced-motion: reduce) {
  .home-display__scan {
    display: none;
  }

  .home-cta,
  .home-cta__arrow,
  .home-path,
  .home-path__arrow {
    transition: none;
  }
}
.content-page {
  width: 100%;
}

.content-hero {
  position: relative;
  overflow: hidden;
  padding: clamp(28px, 5vw, 64px);
  border: 1px solid var(--line);
  border-radius: var(--radius-panel);
  background:
    radial-gradient(480px 240px at 88% 8%, var(--accent-dim), transparent 70%),
    var(--surface-raised);
  box-shadow: var(--shadow-card);
}

.content-hero__eyebrow,
.article-kicker {
  margin: 0 0 12px;
  color: var(--accent);
  font-family: var(--font-mono);
  font-size: var(--text-caption);
  font-weight: 700;
  letter-spacing: 0.11em;
  text-transform: uppercase;
}

.content-hero h1,
.article-header h1 {
  max-width: 16ch;
  margin: 0;
  font-family: var(--font-display);
  font-size: clamp(2.6rem, 5vw, 5.4rem);
  font-weight: 800;
  letter-spacing: -0.065em;
  line-height: 0.98;
}

.content-hero__lead,
.article-header__lead {
  max-width: 46rem;
  margin: 20px 0 0;
  color: var(--ink-soft);
  font-size: clamp(1rem, 1.4vw, 1.14rem);
  line-height: 1.7;
}

.content-filter {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin-top: 24px;
}

.content-filter span,
.article-meta span {
  display: inline-flex;
  align-items: center;
  min-height: 30px;
  padding: 0 11px;
  border: 1px solid var(--line);
  border-radius: 999px;
  background: var(--surface-muted);
  color: var(--ink-soft);
  font-size: 0.74rem;
  font-weight: 600;
}

.qa-list,
.article-list {
  display: grid;
  gap: 12px;
  margin-top: 20px;
}

.qa-card,
.article-card {
  position: relative;
  display: grid;
  grid-template-columns: auto minmax(0, 1fr) auto;
  align-items: center;
  gap: 18px;
  min-height: 116px;
  padding: 20px 22px;
  border: 1px solid var(--line);
  border-radius: var(--radius-card);
  background: var(--surface-raised);
  box-shadow: var(--shadow-card);
  transition:
    transform 0.28s var(--spring-snappy),
    border-color 0.28s var(--spring-snappy),
    box-shadow 0.28s var(--spring-snappy);
}

.qa-card:hover,
.article-card:hover {
  transform: translateY(-3px);
  border-color: color-mix(in srgb, var(--accent) 36%, transparent);
  box-shadow: var(--shadow-card-hover);
}

.qa-card__index,
.article-card__index {
  display: grid;
  place-items: center;
  width: 56px;
  height: 56px;
  border-radius: 17px;
  background: var(--accent-dim);
  color: var(--accent);
  font-family: var(--font-mono);
  font-size: 0.82rem;
  font-weight: 700;
}

.qa-card h2,
.article-card h2 {
  margin: 0;
  font-family: var(--font-display);
  font-size: 1.12rem;
  letter-spacing: -0.025em;
}

.qa-card p,
.article-card p {
  margin: 7px 0 0;
  color: var(--ink-soft);
  font-size: 0.87rem;
  line-height: 1.55;
}

.qa-card__arrow,
.article-card__arrow {
  color: var(--ink-faint);
  font-size: 1.1rem;
}

.content-section-head {
  display: flex;
  align-items: end;
  justify-content: space-between;
  gap: 20px;
  margin: 40px 2px 14px;
}

.content-section-head h2 {
  margin: 0;
  font-family: var(--font-display);
  font-size: 1.55rem;
  letter-spacing: -0.04em;
}

.content-section-head p {
  margin: 0;
  color: var(--ink-faint);
  font-size: 0.8rem;
}

.article-shell {
  position: relative;
  max-width: 940px;
  margin: 0 auto;
}

.reading-progress {
  position: fixed;
  inset: 0 auto auto 0;
  z-index: 80;
  width: 0;
  height: 3px;
  background: var(--accent);
  box-shadow: 0 0 12px var(--accent-glow);
}

.article-back {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  margin: 4px 0 18px;
  color: var(--ink-soft);
  font-size: 0.84rem;
  font-weight: 600;
}

.article-header {
  padding: clamp(28px, 5vw, 58px);
  border: 1px solid var(--line);
  border-radius: var(--radius-panel);
  background: var(--surface-raised);
  box-shadow: var(--shadow-card);
}

.article-header h1 {
  max-width: 18ch;
  font-size: clamp(2.35rem, 4.7vw, 4.7rem);
}

.article-meta {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin-top: 22px;
}

.article-visual {
  position: relative;
  display: grid;
  place-items: center;
  min-height: 300px;
  margin-top: 18px;
  overflow: hidden;
  border: 1px solid var(--line);
  border-radius: var(--radius-panel);
  background:
    linear-gradient(90deg, #f44336 0 25%, #3069e8 25% 50%, #f4f1e9 50% 75%, #2b9d65 75%),
    var(--surface-raised);
  box-shadow: var(--shadow-card);
}

.article-visual::before {
  content: '';
  width: 104px;
  height: 104px;
  border: 1px solid rgb(255 255 255 / 0.85);
  border-radius: 50%;
  box-shadow: 0 0 0 22px rgb(255 255 255 / 0.13);
}

.article-visual--dark {
  background:
    radial-gradient(circle at 20% 20%, rgb(255 255 255 / 0.2), transparent 20%),
    radial-gradient(circle at 82% 78%, rgb(255 255 255 / 0.12), transparent 18%),
    #080a0e;
}

.article-visual--pixels {
  background:
    linear-gradient(rgb(255 255 255 / 0.08) 1px, transparent 1px),
    linear-gradient(90deg, rgb(255 255 255 / 0.08) 1px, transparent 1px),
    #111722;
  background-size: 24px 24px;
}

.article-visual--motion {
  background:
    repeating-linear-gradient(90deg, transparent 0 42px, rgb(255 255 255 / 0.2) 42px 44px),
    linear-gradient(110deg, #111722, #394664);
}

.article-body {
  margin-top: 18px;
  padding: clamp(24px, 4vw, 52px);
  border: 1px solid var(--line);
  border-radius: var(--radius-panel);
  background: var(--surface-raised);
  box-shadow: var(--shadow-card);
}

.article-body h2 {
  margin: 42px 0 12px;
  font-family: var(--font-display);
  font-size: 1.55rem;
  letter-spacing: -0.035em;
}

.article-body h2:first-child {
  margin-top: 0;
}

.article-body h3 {
  margin: 28px 0 10px;
  font-size: 1.05rem;
}

.article-body p,
.article-body li {
  color: var(--ink-soft);
  font-size: 0.97rem;
  line-height: 1.85;
}

.article-body a {
  color: var(--accent);
  font-weight: 600;
  text-decoration: underline;
  text-decoration-color: color-mix(in srgb, var(--accent) 38%, transparent);
  text-underline-offset: 0.18em;
}

.article-body ul,
.article-body ol {
  padding-left: 1.4rem;
}

.article-callout {
  margin: 24px 0;
  padding: 18px 20px;
  border-left: 4px solid var(--accent);
  border-radius: 0 var(--radius-control) var(--radius-control) 0;
  background: var(--accent-dim);
}

.article-callout strong {
  display: block;
  margin-bottom: 5px;
  color: var(--ink);
}

.article-next {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 12px;
  margin-top: 18px;
}

.article-next a {
  padding: 18px;
  border: 1px solid var(--line);
  border-radius: var(--radius-card);
  background: var(--surface-raised);
  font-weight: 600;
  box-shadow: var(--shadow-card);
}

.consent-banner {
  position: fixed;
  right: 18px;
  bottom: 18px;
  left: 18px;
  z-index: 120;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 24px;
  max-width: 920px;
  margin: 0 auto;
  padding: 18px 20px;
  border: 1px solid var(--line);
  border-radius: var(--radius-card);
  background: color-mix(in srgb, var(--surface-raised) 92%, transparent);
  box-shadow: 0 20px 60px rgb(0 0 0 / 0.24);
  backdrop-filter: blur(22px) saturate(145%);
}

.consent-banner[hidden] {
  display: none;
}

.consent-banner__copy strong {
  display: block;
  margin-bottom: 4px;
  font-family: var(--font-display);
  font-size: 1rem;
}

.consent-banner__copy p {
  margin: 0;
  color: var(--ink-soft);
  font-size: 0.84rem;
  line-height: 1.55;
}

.consent-banner__copy a {
  color: var(--accent);
  font-weight: 600;
}

.consent-banner__actions {
  display: flex;
  flex: 0 0 auto;
  gap: 8px;
}

.consent-button {
  min-height: 40px;
  padding: 0 14px;
  border: 1px solid var(--line);
  border-radius: 999px;
  font: inherit;
  font-size: 0.8rem;
  font-weight: 700;
  cursor: pointer;
}

.consent-button--secondary {
  background: var(--surface-muted);
  color: var(--ink);
}

.consent-button--primary {
  border-color: var(--accent);
  background: var(--accent);
  color: white;
}

.privacy-table {
  display: grid;
  gap: 1px;
  overflow: hidden;
  margin: 20px 0;
  border: 1px solid var(--line);
  border-radius: var(--radius-control);
  background: var(--line);
}

.privacy-table > div {
  display: grid;
  grid-template-columns: minmax(130px, 0.35fr) 1fr;
  gap: 18px;
  padding: 14px 16px;
  background: var(--surface-muted);
}

.privacy-table strong {
  color: var(--ink);
}

@media (max-width: 760px) {
  .content-hero h1,
  .article-header h1 {
    max-width: none;
  }

  .qa-card,
  .article-card {
    grid-template-columns: auto minmax(0, 1fr);
    min-height: 100px;
    padding: 16px;
  }

  .qa-card__index,
  .article-card__index {
    width: 44px;
    height: 44px;
    border-radius: 14px;
  }

  .qa-card__arrow,
  .article-card__arrow {
    display: none;
  }

  .content-section-head {
    align-items: flex-start;
    flex-direction: column;
    gap: 4px;
  }

  .article-visual {
    min-height: 220px;
  }

  .article-next {
    grid-template-columns: 1fr;
  }

  .consent-banner {
    align-items: stretch;
    flex-direction: column;
    gap: 14px;
  }

  .consent-banner__actions {
    display: grid;
    grid-template-columns: 1fr 1fr;
  }

  .privacy-table > div {
    grid-template-columns: 1fr;
    gap: 4px;
  }
}
