/* Mythicmind - site styles. System fonts only, no external loads.
   Tech direction (10-09 v3): always-dark night navy, faint grid + glow, electric cobalt; HDB at night kept in the hero. Previous light version: _before-tech/
   Lit-window amber (--lit) is reserved for "a window with the light on": the mark, the hero, the status chip.
   No green anywhere. Previous version: _before-hdb/assets/style.css */

:root {
  /* surfaces: deep night navy, always dark (tech direction, 10-09) */
  --paper: #070B16;
  --paper-2: #0B1120;
  --card: rgba(20, 30, 54, .55);
  --card-solid: #111A2E;
  /* text */
  --ink: #EEF1F7;
  --ink-2: #B3BCCD;
  --ink-3: #8E99AE;
  /* lines */
  --line: rgba(160, 180, 230, .12);
  --line-2: rgba(160, 180, 230, .22);
  /* accents: electric cobalt + violet edge; amber = the lit window */
  --cobalt: #8FA8FF;
  --cobalt-2: #B79CFF;
  --cobalt-soft: rgba(120, 150, 255, .12);
  --glow: rgba(90, 120, 255, .35);
  --brick: #E39A86;
  --lit: #F2C46B;
  --lit-edge: rgba(242, 196, 107, .55);
  --jade: var(--brick); /* legacy alias */
  --focus: #8FA8FF;
  /* mark */
  --mark-bg: #1A2747;
  --mark-fg: #F5F1E8;
  --mark-win: #1A2747;
  --mark-ring: rgba(160, 180, 230, .25);
  /* hero illustration */
  --sky-a: #0B1324;
  --sky-b: #1E3263;
  --hdb-front: #A9A397;
  --hdb-side: #8D877C;
  --hdb-slab: #9A9488;
  --hdb-win: #1B2640;
  --hdb-far: #18294D;
  --hdb-far-line: #1E3157;
  --shadow: 0 1px 2px rgba(0, 0, 0, .3), 0 24px 60px -24px rgba(0, 0, 0, .7);

  --display: "Avenir Next", Avenir, "Segoe UI", "Helvetica Neue", sans-serif;
  --body: -apple-system, BlinkMacSystemFont, "Segoe UI", "Helvetica Neue", sans-serif,
          "PingFang SC", "Hiragino Sans GB", "Microsoft YaHei", "Noto Sans CJK SC";
  --mono: ui-monospace, "SF Mono", Menlo, Consolas, "Liberation Mono", monospace;
  --zh-display: "PingFang SC", "Hiragino Sans GB", "Microsoft YaHei", "Noto Sans CJK SC", sans-serif;

  --wrap: 1180px;
  --gutter: clamp(16px, 4.5vw, 48px);
  --rail: 210px;
  --ease: cubic-bezier(.22, .8, .24, 1);
  --header-h: 68px;
  color-scheme: dark;
}

html[data-lang="zh"] { --display: var(--zh-display); }

/* language switching */
html[data-lang="zh"] [data-l="en"],
html:not([data-lang="zh"]) [data-l="zh"] { display: none !important; }

*, *::before, *::after { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; scroll-behavior: smooth; scroll-padding-top: calc(var(--header-h) + 24px); }
@media (prefers-reduced-motion: reduce) { html { scroll-behavior: auto; } }

body {
  margin: 0;
  background: var(--paper);
  color: var(--ink);
  font-family: var(--body);
  font-size: 17px;
  line-height: 1.65;
  text-rendering: optimizeLegibility;
  -webkit-font-smoothing: antialiased;
  overflow-x: clip;
}
html[data-lang="zh"] body { line-height: 1.85; }

a {
  color: var(--cobalt);
  text-decoration-line: underline;
  text-decoration-thickness: 1px;
  text-underline-offset: 3px;
  text-decoration-color: color-mix(in srgb, currentColor 35%, transparent);
  transition: color .25s var(--ease), text-decoration-color .25s var(--ease);
}
a:hover { text-decoration-color: currentColor; }
:focus-visible { outline: 2px solid var(--focus); outline-offset: 3px; border-radius: 4px; }
img, svg { display: block; max-width: 100%; }
::selection { background: var(--cobalt-soft); }

.wrap { max-width: var(--wrap); margin: 0 auto; padding: 0 var(--gutter); }

.skip {
  position: absolute; left: -9999px; top: 10px; z-index: 30;
  background: var(--ink); color: var(--paper); padding: 10px 16px; border-radius: 999px;
}
.skip:focus { left: 10px; }

/* ---------- brand mark ---------- */
.mark { width: 32px; height: 32px; flex: none; border-radius: 22%; box-shadow: 0 0 0 1px var(--mark-ring); }
.mark-bg { fill: var(--mark-bg); }
.mark-fg { fill: var(--mark-fg); }
.mark-win { fill: var(--mark-win); }
.mark-lit { fill: var(--lit); }

/* ---------- header ---------- */
.site-header {
  position: sticky; top: 0; z-index: 20;
  background: color-mix(in srgb, var(--paper) 86%, transparent);
  -webkit-backdrop-filter: saturate(1.4) blur(14px);
  backdrop-filter: saturate(1.4) blur(14px);
  border-bottom: 1px solid var(--line);
}
@media (prefers-reduced-transparency: reduce) {
  .site-header { background: var(--paper); -webkit-backdrop-filter: none; backdrop-filter: none; }
}
.site-header .wrap {
  display: flex; align-items: center; gap: 28px;
  min-height: var(--header-h); flex-wrap: wrap;
}
.brand {
  display: inline-flex; align-items: center; gap: 11px;
  color: var(--ink); text-decoration: none; margin-right: auto;
}
.brand:hover { color: var(--ink); }
.brand-name {
  font-family: var(--display);
  font-size: 19px; font-weight: 600; letter-spacing: -.005em;
}
.site-nav { display: flex; gap: 4px; align-items: center; }
.site-nav a {
  position: relative; color: var(--ink-2); text-decoration: none; font-size: 15px;
  padding: 8px 12px; border-radius: 999px;
  transition: color .25s var(--ease), background-color .25s var(--ease);
}
.site-nav a:hover { color: var(--ink); background: var(--cobalt-soft); }
.site-nav a[aria-current="page"] { color: var(--ink); font-weight: 600; }
.site-nav a[aria-current="page"]::after {
  content: ""; position: absolute; left: 12px; right: 12px; bottom: 3px; height: 1.5px;
  border-radius: 2px; background: var(--cobalt);
}

.lang-toggle {
  font: 500 14px/1 var(--body);
  color: var(--ink); background: var(--card);
  border: 1px solid var(--line-2); border-radius: 999px;
  padding: 0 16px; cursor: pointer; min-height: 38px;
  transition: border-color .25s var(--ease), transform .2s var(--ease);
}
.lang-toggle:hover { border-color: var(--ink); }
.lang-toggle:active { transform: scale(.97); }

@media (max-width: 760px) {
  :root { --header-h: 58px; }
  .site-header { position: static; }
  .site-header .wrap { gap: 6px 12px; padding-top: 10px; padding-bottom: 6px; }
  .site-nav { order: 3; width: calc(100% + 2 * var(--gutter)); margin: 0 calc(-1 * var(--gutter));
    padding: 0 calc(var(--gutter) - 12px) 4px; overflow-x: auto; scrollbar-width: none; }
  .site-nav a { font-size: 14.5px; white-space: nowrap; }
  .brand-name { font-size: 19px; }
}

/* ---------- type ---------- */
h1, h2, h3 { font-family: var(--display); color: var(--ink); margin: 0; }
h1 { font-weight: 600; letter-spacing: -0.028em; line-height: 1.06; }
h2 { font-weight: 600; font-size: clamp(30px, 3.3vw, 44px); line-height: 1.1; letter-spacing: -0.014em; text-wrap: balance; }
h3 { font-weight: 600; font-size: 19.5px; line-height: 1.3; letter-spacing: -0.003em; }
html[data-lang="zh"] h1, html[data-lang="zh"] h2 { font-weight: 600; letter-spacing: .02em; line-height: 1.3; }
html[data-lang="zh"] h3 { font-weight: 600; font-family: var(--body); }
p { margin: 0 0 1em; }

.eyebrow {
  font: 600 12px/1.4 var(--body); letter-spacing: .16em;
  text-transform: uppercase; color: var(--ink-3); margin: 0 0 20px;
  display: flex; align-items: center; gap: 12px;
}
html[data-lang="zh"] .eyebrow { letter-spacing: .1em; font-size: 13px; }

/* ---------- buttons ---------- */
.actions { display: flex; flex-wrap: wrap; gap: 12px; }
.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 12px;
  font: 500 15.5px/1 var(--body); text-decoration: none; white-space: nowrap;
  padding: 0 22px; border-radius: 999px; min-height: 50px;
  border: 1px solid var(--line-2); color: var(--ink); background: transparent; cursor: pointer;
  transition: background-color .3s var(--ease), border-color .3s var(--ease), color .3s var(--ease), transform .2s var(--ease);
}
.btn:hover { color: var(--ink); border-color: var(--ink); }
.btn:active { transform: scale(.98); }
.btn-solid {
  background: var(--ink); color: var(--paper); border-color: var(--ink);
}
.btn-solid:hover { background: var(--cobalt); border-color: var(--cobalt); color: #070B16; box-shadow: 0 0 0 6px var(--cobalt-soft), 0 10px 40px -10px var(--glow); }

.btn:has(.btn-ico) { padding-right: 7px; }
.btn-ico {
  width: 36px; height: 36px; border-radius: 50%; display: grid; place-items: center;
  background: color-mix(in srgb, var(--paper) 14%, transparent);
  transition: transform .35s var(--ease);
}
.btn-ico svg { width: 16px; height: 16px; fill: none; stroke: currentColor; stroke-width: 1.5; stroke-linecap: round; stroke-linejoin: round; vector-effect: non-scaling-stroke; }
.btn-ico svg path { vector-effect: non-scaling-stroke; }
.btn:hover .btn-ico { transform: translateX(3px); }

/* ---------- hero ---------- */
.hero { padding: clamp(40px, 6.5vw, 88px) 0 clamp(56px, 7vw, 96px); }
.hero .wrap {
  display: grid; grid-template-columns: minmax(0, 1.1fr) minmax(0, .9fr);
  gap: clamp(36px, 6vw, 88px); align-items: center;
}
.hero h1 { font-size: clamp(42px, 5.6vw, 74px); margin-bottom: 28px; text-wrap: balance; }
html[data-lang="zh"] .hero h1 { font-size: clamp(32px, 4.4vw, 56px); line-height: 1.32; }
.nw { white-space: nowrap; }
.hero h1 em { font-style: normal; font-weight: 600; color: var(--cobalt); }
html[data-lang="zh"] .hero h1 em { font-style: normal; font-weight: 600; }
.lede { font-size: clamp(17.5px, 1.5vw, 19.5px); line-height: 1.6; color: var(--ink-2); max-width: 31em; margin-bottom: 36px; }

.hero-art { margin: 0; }
.hero-frame {
  width: 100%; max-width: 480px; margin-left: auto; aspect-ratio: 480 / 560;
  border-radius: 4px; overflow: hidden; background: var(--sky-a);
}
.hero-frame svg { width: 100%; height: 100%; }
.hero-art figcaption {
  font-size: 13.5px; color: var(--ink-3);
  margin-top: 16px; text-align: right; max-width: 480px; margin-left: auto;
}
/* hero illustration v2 (blue hour): drawn with a real two-point camera, see _before-hdb2 for v1.
   Most paint lives in the SVG; CSS only carries the sky stops, the dark-mode veil and the grain. */
.hdb .s0 { stop-color: #0E1830; }
.hdb .s1 { stop-color: #233A6E; }
.hdb .s2 { stop-color: #4F6194; }
.hdb .s3 { stop-color: #7E819C; }
.hdb .veil { opacity: .4; }
.hdb .grain { opacity: .2; mix-blend-mode: overlay; pointer-events: none; }


@media (prefers-reduced-motion: no-preference) {
  .hero .wrap > div > * { animation: rise .9s var(--ease) both; }
  .hero .wrap > div > :nth-child(2) { animation-delay: .06s; }
  .hero .wrap > div > :nth-child(n+3) { animation-delay: .14s; }
  .hdb .hero-win { animation: light-on 1.2s ease-out .5s both; }
}
@keyframes light-on { from { opacity: .3; } to { opacity: 1; } }
@keyframes rise { from { opacity: 0; transform: translateY(14px); } to { opacity: 1; transform: none; } }

@media (max-width: 900px) {
  .hero .wrap { grid-template-columns: 1fr; }
  /* show the upper block and the lit window, not a screen of navy */
  .hero-frame { aspect-ratio: 4 / 3; max-height: 300px; max-width: 400px; margin: 0; }
  .hero-frame svg { height: auto; margin-top: -15%; }
  .hero-art figcaption { text-align: left; margin: 12px 0 0; }
}

/* ---------- sections: label rail + content ---------- */
.section { padding: clamp(64px, 9vw, 120px) 0; }
.section + .section:not(.section-alt) { border-top: 1px solid var(--line); }
.section-alt { background: var(--paper-2); }
.section > .wrap { display: grid; grid-template-columns: var(--rail) minmax(0, 1fr); column-gap: clamp(32px, 5vw, 72px); }
.section-head { display: contents; }
.section-head > .eyebrow { grid-column: 1; grid-row: 1 / span 2; align-self: start; padding-top: 14px; white-space: nowrap; }
.section-head > h2, .section-head > p, .section > .wrap > :not(.section-head) { grid-column: 2; }
.section-head > h2 { max-width: 20em; margin-bottom: 20px; }
.section-head > p { color: var(--ink-2); font-size: 18px; max-width: 36em; margin: 0 0 8px; }
.section-head + * { margin-top: 36px; }
@media (max-width: 900px) {
  .section > .wrap { grid-template-columns: minmax(0, 1fr); }
  .section-head > .eyebrow { grid-row: auto; padding-top: 0; }
  .section-head > h2, .section-head > p, .section > .wrap > :not(.section-head) { grid-column: 1; }
}

/* what we do: an index of three rows */
.pillars { display: grid; }
.pillar {
  display: grid; grid-template-columns: 44px minmax(0, 15em) minmax(0, 1fr);
  column-gap: 28px; align-items: start; padding: 28px 0;
  border-top: 1px solid var(--line-2);
}
.pillar:last-child { border-bottom: 1px solid var(--line-2); }
.pillar h3 { padding-top: 6px; }
.pillar p { grid-column: 3; color: var(--ink-2); font-size: 16.5px; margin: 0; padding-top: 4px; max-width: 34em; }
/* one line-icon set: 24px grid, 1.5px stroke, round caps and joins */
.icon {
  width: 32px; height: 32px; fill: none; stroke: var(--cobalt); stroke-width: 1.5;
  stroke-linecap: round; stroke-linejoin: round;
}
.icon path { vector-effect: non-scaling-stroke; }
@media (max-width: 760px) {
  .pillar { grid-template-columns: 40px minmax(0, 1fr); row-gap: 6px; padding: 24px 0; }
  .pillar h3 { grid-column: 2; padding-top: 4px; }
  .pillar p { grid-column: 2; padding-top: 0; }
}

/* principles: four plain blocks */
.tiles { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 16px; }
.tile {
  background: var(--card); border: 1px solid var(--line);
  padding: 30px 32px 18px; border-radius: 16px;
}
.tile h3 { margin-bottom: 10px; }
.tile .icon { margin-bottom: 18px; }
.tile p { color: var(--ink-2); font-size: 16px; }
@media (max-width: 760px) {
  .tiles { grid-template-columns: 1fr; }
  .tile { padding: 26px 22px 14px; }
}

/* apps */
.apps-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(260px, 1fr)); gap: 16px; }
.app-card {
  position: relative; background: var(--card); border: 1px solid var(--line); border-radius: 16px;
  padding: 28px; display: flex; flex-direction: column; gap: 10px;
  transition: transform .4s var(--ease), box-shadow .4s var(--ease);
}
.app-card:not(.app-slot):hover { transform: translateY(-3px); box-shadow: var(--shadow); }
.app-card img { width: 64px; height: 64px; border-radius: 15px; box-shadow: 0 0 0 1px var(--line); }
.app-card p { color: var(--ink-2); font-size: 16px; margin: 0; }
.app-card .links { display: flex; gap: 18px; flex-wrap: wrap; font-size: 15px; margin-top: auto; padding-top: 10px; }
.app-slot { min-height: 220px; justify-content: flex-end; }
.app-slot .status {
  position: absolute; top: 24px; left: 28px;
  font: 600 12px/1 var(--body); letter-spacing: .06em;
  color: var(--ink-2); display: inline-flex; align-items: center; gap: 9px;
  background: var(--paper); border: 1px solid var(--line); border-radius: 999px; padding: 8px 13px 8px 11px;
}
html[data-lang="zh"] .app-slot .status { letter-spacing: .04em; font-size: 12.5px; }
/* a small lit window: "the light is on, someone is working on it" */
.app-slot .status::before {
  content: ""; width: 10px; height: 7px; border-radius: 1.5px; background: var(--lit);
  box-shadow: inset 0 0 0 1px var(--lit-edge);
}
.app-slot-ghost { background: transparent; border: 1px dashed var(--line-2); }
.app-slot-ghost .status::before { background: transparent; box-shadow: inset 0 0 0 1px var(--line-2); }

/* company registry card */
.registry {
  display: grid; grid-template-columns: minmax(0, .85fr) minmax(0, 1.15fr);
  gap: clamp(32px, 6vw, 80px); align-items: start;
}
.registry-card {
  background: var(--card); border: 1px solid var(--line); border-radius: 16px;
  padding: 10px 32px; position: relative;
}
.registry-card dl { margin: 0; position: relative; }
.registry-card .row {
  display: grid; grid-template-columns: 11em minmax(0, 1fr); gap: 20px;
  padding: 17px 0; border-bottom: 1px solid var(--line);
}
.registry-card .row:last-child { border-bottom: 0; }
.registry-card dt {
  font: 600 11.5px/1.4 var(--body); letter-spacing: .14em; text-transform: uppercase;
  color: var(--ink-3); padding-top: 4px;
}
html[data-lang="zh"] .registry-card dt { font-size: 14px; letter-spacing: .06em; padding-top: 1px; }
.registry-card dd { margin: 0; font-size: 16.5px; overflow-wrap: anywhere; }
.registry-card .mono { font-family: var(--mono); font-size: 15.5px; letter-spacing: .03em; }
.registry h2 { margin-bottom: 20px; }
.registry p { color: var(--ink-2); max-width: 28em; }
.section > .wrap.registry { grid-template-columns: minmax(0, .85fr) minmax(0, 1.15fr); }
.section > .wrap.registry > * { grid-column: auto; }
@media (max-width: 900px) { .registry, .section > .wrap.registry { grid-template-columns: minmax(0, 1fr); } }
@media (max-width: 520px) {
  .registry-card { padding: 6px 20px; }
  .registry-card .row { grid-template-columns: minmax(0, 1fr); gap: 4px; padding: 14px 0; }
}

/* ---------- footer (ink block; tokens flipped locally) ---------- */
.site-footer {
  --ink: #F2EEE6; --ink-2: #B9C2D0; --ink-3: #9AA5B7;
  --line: rgba(242, 238, 230, .12); --cobalt: #B3C3F2;
  --mark-bg: #1A2747; --mark-ring: rgba(242, 238, 230, .22); --mark-win: #1A2747;
  --focus: #B3C3F2;
  background: #04060D; color: var(--ink-2); border-top: 1px solid var(--line);
  padding: 72px 0 40px; font-size: 15px;
}

.site-footer .wrap { display: grid; grid-template-columns: minmax(0, 1fr) auto; gap: 36px 64px; }
.site-footer .brand { margin-bottom: 18px; }
.site-footer .brand-name { color: var(--ink); }
.site-footer p { margin: 0 0 6px; }
.site-footer .wrap > div > p:first-of-type { color: var(--ink); font-size: 16.5px; margin-bottom: 18px; max-width: 26em; }
.site-footer a { color: var(--ink); }
.footer-links { display: grid; grid-template-columns: repeat(2, auto); gap: 12px 48px; align-content: start; }
.footer-links a { text-decoration: none; color: var(--ink-2); transition: color .25s var(--ease); }
.footer-links a:hover { color: var(--ink); }
.footer-legal {
  grid-column: 1 / -1; font-size: 13px; letter-spacing: .02em; color: var(--ink-3);
  padding-top: 24px; border-top: 1px solid var(--line); margin-top: 16px;
}
@media (max-width: 760px) {
  .site-footer { padding-top: 56px; }
  .site-footer .wrap { grid-template-columns: minmax(0, 1fr); }
}

/* ---------- document pages (privacy, terms, support) ---------- */
.doc-hero { padding: clamp(48px, 7vw, 88px) 0 clamp(36px, 5vw, 56px); max-width: 46em; }
.doc-hero h1 { font-size: clamp(38px, 5vw, 60px); margin-bottom: 18px; }
html[data-lang="zh"] .doc-hero h1 { font-size: clamp(32px, 4.2vw, 50px); }
.doc-meta {
  display: inline-block; font-size: 13.5px; color: var(--ink-2);
  border: 1px solid var(--line-2); border-radius: 999px; padding: 5px 14px; margin: 0;
}
.doc-intro { font-size: clamp(17.5px, 1.6vw, 19.5px); color: var(--ink-2); max-width: 36em; margin-top: 22px; }

.doc {
  display: grid; grid-template-columns: 236px minmax(0, 1fr);
  gap: clamp(32px, 6vw, 88px); padding-bottom: 104px; border-top: 1px solid var(--line); padding-top: 48px;
}
.toc { position: sticky; top: calc(var(--header-h) + 28px); align-self: start; font-size: 14.5px; }
.toc p { font: 600 12px/1.4 var(--body); letter-spacing: .16em; text-transform: uppercase; color: var(--ink-3); margin-bottom: 14px; }
.toc ol { list-style: none; margin: 0; padding: 0; counter-reset: toc; border-left: 1px solid var(--line-2); }
.toc li { counter-increment: toc; }
.toc a {
  color: var(--ink-2); text-decoration: none; display: flex; gap: 12px; line-height: 1.4;
  padding: 7px 0 7px 16px; margin-left: -1px; border-left: 2px solid transparent;
  transition: color .2s var(--ease), border-color .2s var(--ease);
}
.toc a::before { content: counter(toc, decimal-leading-zero); font: 500 11.5px/1.9 var(--mono); color: var(--ink-3); font-variant-numeric: tabular-nums; }
.toc a:hover { color: var(--ink); }
.toc a.is-active { color: var(--ink); border-left-color: var(--cobalt); font-weight: 600; }
.toc a.is-active::before { color: var(--cobalt); }

.prose { max-width: 40em; counter-reset: sec; font-size: 17px; line-height: 1.75; }
.prose section { scroll-margin-top: calc(var(--header-h) + 24px); }
.prose section + section { margin-top: 48px; padding-top: 40px; border-top: 1px solid var(--line); }
.prose h2 {
  font-size: clamp(23px, 2.3vw, 28px); line-height: 1.2; margin: 0 0 18px;
  counter-increment: sec; display: flex; flex-direction: column; gap: 8px;
}
.prose h2::before {
  content: counter(sec, decimal-leading-zero); font: 500 12px/1 var(--mono);
  color: var(--cobalt); letter-spacing: .08em;
}
.prose h3 { font: 600 16.5px/1.4 var(--body); margin: 28px 0 8px; color: var(--ink); }
.prose p, .prose li { color: color-mix(in srgb, var(--ink) 86%, var(--paper)); }
.prose ul { padding-left: 1.25em; margin: 0 0 1.1em; }
.prose li { margin-bottom: .5em; padding-left: .2em; }
.prose li::marker { color: var(--ink-3); }
.prose strong { color: var(--ink); font-weight: 650; }
.note {
  position: relative; background: var(--card); border: 1px solid var(--line);
  border-left: 3px solid var(--cobalt); border-radius: 4px 14px 14px 4px;
  padding: 18px 22px; margin: 6px 0 1.4em; font-size: 16px; line-height: 1.65;
}
@media (max-width: 900px) {
  .doc { grid-template-columns: minmax(0, 1fr); padding-top: 32px; }
  .toc { position: static; background: var(--card); border: 1px solid var(--line); border-radius: 16px; padding: 20px 20px 12px; }
  .toc ol { border-left: 0; columns: 2; column-gap: 20px; }
  .toc li { break-inside: avoid; }
  .toc a { padding-left: 0; border-left: 0; }
}
@media (max-width: 520px) { .toc ol { columns: 1; } }

/* support */
.support-grid { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); gap: 16px; margin-bottom: clamp(56px, 7vw, 96px); }
.support-grid .tile .big { font-family: var(--display); font-size: clamp(20px, 2.1vw, 26px); line-height: 1.3; overflow-wrap: anywhere; color: var(--ink); }
.support-grid .tile .big a { text-decoration-color: color-mix(in srgb, currentColor 30%, transparent); }
@media (max-width: 760px) { .support-grid { grid-template-columns: minmax(0, 1fr); } }

/* support/doc sections reuse .doc as a two-column layout */
.section > .wrap.doc { display: grid; grid-template-columns: 236px minmax(0, 1fr); }
.section > .wrap.doc > * { grid-column: auto; }
@media (max-width: 900px) { .section > .wrap.doc { grid-template-columns: minmax(0, 1fr); } }

.faq { max-width: 44em; }
.faq details { border-bottom: 1px solid var(--line-2); }
.faq details:first-of-type { border-top: 1px solid var(--line-2); }
.faq summary {
  cursor: pointer; list-style: none; padding: 20px 44px 20px 0; position: relative;
  font-weight: 600; font-size: 17px; line-height: 1.45; border-radius: 6px;
  transition: color .2s var(--ease);
}
.faq summary:hover { color: var(--cobalt); }
.faq summary::-webkit-details-marker { display: none; }
.faq summary::before, .faq summary::after {
  content: ""; position: absolute; right: 8px; top: 50%; width: 13px; height: 1.5px;
  background: currentColor; border-radius: 2px; transition: transform .35s var(--ease);
}
.faq summary::after { transform: rotate(90deg); }
.faq details[open] summary::after { transform: rotate(0deg); }
.faq details > div { padding: 0 44px 22px 0; color: var(--ink-2); }

.composer {
  display: grid; gap: 20px; max-width: 38em;
  background: var(--card); border: 1px solid var(--line); border-radius: 20px;
  padding: clamp(22px, 3vw, 36px);
}
.field label { display: block; font-weight: 600; font-size: 15px; margin-bottom: 8px; }
.field .hint { font-weight: 400; color: var(--ink-3); }
.field input, .field select, .field textarea {
  width: 100%; font: 16px/1.5 var(--body); color: var(--ink); background: var(--paper);
  border: 1px solid var(--line-2); border-radius: 12px; padding: 12px 14px;
  transition: border-color .2s var(--ease), box-shadow .2s var(--ease);
}
.field select {
  appearance: none; -webkit-appearance: none; padding-right: 40px;
  background-image: linear-gradient(45deg, transparent 50%, var(--ink-2) 50%), linear-gradient(135deg, var(--ink-2) 50%, transparent 50%);
  background-position: calc(100% - 20px) 52%, calc(100% - 15px) 52%;
  background-size: 5px 5px; background-repeat: no-repeat;
}
.field input:hover, .field select:hover, .field textarea:hover { border-color: var(--ink-3); }
.field input:focus, .field select:focus, .field textarea:focus {
  outline: none; border-color: var(--cobalt); box-shadow: 0 0 0 4px var(--cobalt-soft);
}
.field textarea { min-height: 150px; resize: vertical; }
.field textarea::placeholder { color: var(--ink-3); }
.composer .small { font-size: 14.5px; color: var(--ink-2); margin: 0; }

/* 404 */
.lost { padding: clamp(72px, 12vw, 152px) var(--gutter); text-align: center; }
.mark-lg { width: 88px; height: 88px; margin: 0 auto 32px; }
.lost .eyebrow::before { display: none; }
.lost h1 { font-size: clamp(36px, 5vw, 56px); margin-bottom: 16px; }
.lost p { color: var(--ink-2); margin-bottom: 32px; }
.lost .actions { justify-content: center; }

/* =====================================================================
   TECH LAYER (10-09 v3): grid + glow, glass cards, phones, AI demo, how-it-works
   ===================================================================== */

/* night grid that fades out down the page, plus a cobalt glow behind the hero */
body {
  background:
    radial-gradient(900px 520px at 78% -6%, rgba(84, 110, 255, .22), transparent 70%),
    radial-gradient(700px 480px at 4% 8%, rgba(150, 110, 255, .10), transparent 70%),
    var(--paper);
  background-repeat: no-repeat;
}
body::before {
  content: ""; position: absolute; inset: 0 0 auto 0; height: 1400px; z-index: -1; pointer-events: none;
  background-image:
    linear-gradient(rgba(160, 180, 230, .07) 1px, transparent 1px),
    linear-gradient(90deg, rgba(160, 180, 230, .07) 1px, transparent 1px);
  background-size: 56px 56px;
  -webkit-mask-image: linear-gradient(#000 0%, transparent 85%);
  mask-image: linear-gradient(#000 0%, transparent 85%);
}
body { position: relative; isolation: isolate; }

.site-header { background: color-mix(in srgb, var(--paper) 72%, transparent); }
.lang-toggle { background: transparent; }
.lang-toggle:hover { border-color: var(--cobalt); color: var(--cobalt); }

/* gradient accent on the key words */
.hero h1 em, .grad {
  background: linear-gradient(100deg, #9FB4FF 0%, #B79CFF 55%, #F2C46B 120%);
  -webkit-background-clip: text; background-clip: text; color: transparent;
}
.eyebrow { color: var(--cobalt); }
.eyebrow.dot::before {
  content: ""; width: 7px; height: 7px; border-radius: 50%; background: var(--lit);
  box-shadow: 0 0 0 4px rgba(242, 196, 107, .15), 0 0 14px var(--lit);
}

/* glass cards everywhere (tiles, apps, registry, composer, notes) */
.tile, .app-card, .registry-card, .composer, .note, .toc {
  background: linear-gradient(180deg, rgba(28, 40, 72, .55), rgba(16, 24, 44, .55));
  border-color: var(--line);
  -webkit-backdrop-filter: blur(8px); backdrop-filter: blur(8px);
}
.tile { position: relative; overflow: hidden; transition: border-color .35s var(--ease), transform .35s var(--ease); }
.tile::after {
  content: ""; position: absolute; inset: -1px; border-radius: inherit; pointer-events: none;
  background: radial-gradient(400px 160px at 0% 0%, rgba(120, 150, 255, .14), transparent 70%);
}
.tile:hover { border-color: var(--line-2); transform: translateY(-2px); }
.tile .icon { margin-bottom: 18px; }
.section-alt { background: linear-gradient(180deg, rgba(14, 21, 40, .7), rgba(9, 14, 28, .7)); border-top: 1px solid var(--line); border-bottom: 1px solid var(--line); }
.field input, .field select, .field textarea { background: rgba(5, 8, 16, .6); }
.app-slot .status { background: rgba(5, 8, 16, .6); }

/* ---------- hero: HDB panel + phone in front ---------- */
.hero-art { position: relative; }
.hero-frame { border-radius: 20px; box-shadow: 0 0 0 1px var(--line), 0 40px 120px -40px var(--glow); }
.hero-art figcaption { padding-right: 4px; padding-left: 170px; }
.hero-phone {
  position: absolute; left: -64px; bottom: 34px; width: 212px; z-index: 2;
}
@media (max-width: 1100px) { .hero-phone { left: -24px; width: 196px; } }
@media (max-width: 900px) {
  .hero-art { padding-bottom: 8px; }
  .hero-frame { max-width: none; max-height: 340px; }
  .hero-phone { left: auto; right: 4%; bottom: -26px; width: 168px; }
  .hero-art figcaption { margin-top: 14px; padding-left: 0; max-width: calc(96% - 180px); font-size: 12.5px; }
}

/* ---------- phone frame ---------- */
.phone {
  position: relative; aspect-ratio: 9 / 19.2; border-radius: 15% / 7.2%;
  background: #05070D; padding: 3.6%;
  box-shadow:
    0 0 0 1.5px rgba(200, 210, 240, .28), inset 0 0 0 1px rgba(255, 255, 255, .06),
    0 30px 80px -20px rgba(0, 0, 0, .85), 0 0 60px -10px var(--glow);
}
.phone .screen {
  position: relative; height: 100%; border-radius: 12% / 5.8%; overflow: hidden;
  background: linear-gradient(180deg, #101A33, #0A1124);
  font-family: var(--body); color: #E8ECF6; font-size: 10.5px; line-height: 1.4;
  padding: 34px 10px 12px; display: flex; flex-direction: column; gap: 8px;
}
.phone .island { position: absolute; top: 9px; left: 50%; transform: translateX(-50%); width: 30%; height: 15px; border-radius: 10px; background: #000; z-index: 3; }
.phone .bar { display: flex; align-items: center; gap: 6px; font-weight: 600; font-size: 11px; color: #fff; }
.phone .bar i { width: 16px; height: 16px; border-radius: 5px; background: linear-gradient(135deg, #8FA8FF, #B79CFF); flex: none; }
.sk { height: 6px; border-radius: 4px; background: rgba(170, 185, 230, .18); }
.sk.w9 { width: 90%; } .sk.w7 { width: 70%; } .sk.w5 { width: 50%; } .sk.w8 { width: 82%; } .sk.w6 { width: 62%; }

/* ---------- AI demo inside the hero phone (10s loop) ---------- */
.demo .demo-doc {
  position: relative; background: #F4F2EC; color: #1B2235; border-radius: 9px; padding: 9px 9px 10px;
  display: grid; gap: 5px; overflow: hidden;
}
.demo .demo-doc .sk { background: rgba(27, 34, 53, .14); height: 5px; }
.demo .demo-doc b { font-size: 8.5px; letter-spacing: .08em; text-transform: uppercase; color: #6A7287; font-weight: 600; }
.demo .hit { font-size: 9.5px; line-height: 1.35; font-weight: 600; border-radius: 3px; padding: 1px 2px; margin: 0 -2px; }
.demo .scan {
  position: absolute; left: 0; right: 0; height: 26px; top: -30px;
  background: linear-gradient(180deg, transparent, rgba(110, 140, 255, .35), transparent);
  border-bottom: 1.5px solid rgba(90, 120, 255, .8);
}
.demo .q, .demo .a { border-radius: 12px; padding: 7px 9px; max-width: 88%; }
.demo .q { align-self: flex-end; background: #3D5BD9; color: #fff; border-bottom-right-radius: 4px; }
.demo .a { align-self: flex-start; background: rgba(255, 255, 255, .08); border: 1px solid rgba(170, 185, 230, .2); border-bottom-left-radius: 4px; }
.demo .a strong { color: #fff; }
.demo .src {
  display: inline-flex; align-items: center; gap: 4px; margin-top: 5px;
  font: 600 8.5px/1 var(--mono); color: #F2C46B; background: rgba(242, 196, 107, .12);
  border: 1px solid rgba(242, 196, 107, .35); border-radius: 99px; padding: 3px 6px;
}
.demo .typing { display: inline-flex; gap: 3px; }
.demo .typing span { width: 4px; height: 4px; border-radius: 50%; background: #9FB4FF; }
.demo .tag { margin-top: auto; text-align: center; font-size: 8.5px; color: rgba(200, 210, 235, .55); }
/* final state = static fallback (reduced motion) */
.demo .hit { background: rgba(242, 196, 107, .55); }
.demo .typing { display: none; }
@media (prefers-reduced-motion: no-preference) {
  .demo .q     { animation: d-q 10s var(--ease) infinite; }
  .demo .scan  { animation: d-scan 10s linear infinite; }
  .demo .hit   { animation: d-hit 10s ease infinite; }
  .demo .typing { display: inline-flex; animation: d-typing 10s linear infinite; }
  .demo .typing span { animation: d-dot .9s ease-in-out infinite; }
  .demo .typing span:nth-child(2) { animation-delay: .15s; }
  .demo .typing span:nth-child(3) { animation-delay: .3s; }
  .demo .a     { animation: d-a 10s var(--ease) infinite; }
  .demo .src   { animation: d-src 10s var(--ease) infinite; }
}
@keyframes d-q      { 0%, 3% { opacity: 0; transform: translateY(8px); } 8%, 92% { opacity: 1; transform: none; } 100% { opacity: 0; } }
@keyframes d-scan   { 0%, 12% { top: -30px; opacity: 0; } 14% { opacity: 1; } 42% { top: 100%; opacity: 1; } 44%, 100% { top: 100%; opacity: 0; } }
@keyframes d-hit    { 0%, 30% { background: transparent; } 36%, 92% { background: rgba(242, 196, 107, .55); } 100% { background: transparent; } }
@keyframes d-typing { 0%, 40% { opacity: 0; } 42%, 52% { opacity: 1; } 54%, 100% { opacity: 0; } }
@keyframes d-dot    { 0%, 100% { opacity: .3; transform: none; } 50% { opacity: 1; transform: translateY(-2px); } }
@keyframes d-a      { 0%, 52% { opacity: 0; transform: translateY(8px); } 58%, 92% { opacity: 1; transform: none; } 100% { opacity: 0; } }
@keyframes d-src    { 0%, 62% { opacity: 0; transform: scale(.85); } 67%, 92% { opacity: 1; transform: none; } 100% { opacity: 0; } }
.demo .stack { display: flex; flex-direction: column; gap: 7px; position: relative; }
.demo .stack .typing { position: absolute; left: 2px; bottom: 6px; }

/* ---------- how it works ---------- */
.flow { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 16px; position: relative; }
.flow::before {
  content: ""; position: absolute; left: 8%; right: 8%; top: 46px; height: 1.5px; z-index: 0;
  background: repeating-linear-gradient(90deg, rgba(143, 168, 255, .55) 0 6px, transparent 6px 14px);
  background-size: 28px 1.5px;
}
@media (prefers-reduced-motion: no-preference) { .flow::before { animation: flow-run 1.2s linear infinite; } }
@keyframes flow-run { to { background-position: 28px 0; } }
.step { position: relative; z-index: 1; padding: 26px 26px 20px; }
.step .num {
  display: inline-grid; place-items: center; width: 42px; height: 42px; border-radius: 12px; margin-bottom: 20px;
  font: 600 13px/1 var(--mono); color: #070B16;
  background: linear-gradient(135deg, #9FB4FF, #B79CFF);
  box-shadow: 0 0 0 6px rgba(120, 150, 255, .12), 0 0 30px -4px var(--glow);
}
.step:last-child .num { background: linear-gradient(135deg, #F7D58E, #F2C46B); box-shadow: 0 0 0 6px rgba(242, 196, 107, .12), 0 0 30px -4px rgba(242, 196, 107, .5); }
.step h3 { margin-bottom: 8px; }
.step p { color: var(--ink-2); font-size: 15.5px; }
@media (max-width: 900px) {
  .flow { grid-template-columns: minmax(0, 1fr); }
  .flow::before { left: 46px; right: auto; top: 8%; bottom: 8%; width: 1.5px; height: auto;
    background: repeating-linear-gradient(180deg, rgba(143, 168, 255, .55) 0 6px, transparent 6px 14px); }
}

/* trace card: what one answer looks like under the hood */
.trace {
  margin-top: 16px; border-radius: 16px; border: 1px solid var(--line); overflow: hidden;
  background: rgba(4, 6, 13, .75); font: 13.5px/1.75 var(--mono);
}
.trace .top { display: flex; align-items: center; gap: 7px; padding: 11px 16px; border-bottom: 1px solid var(--line); color: var(--ink-3); font-size: 12px; }
.trace .top i { width: 10px; height: 10px; border-radius: 50%; background: rgba(160, 180, 230, .25); }
.trace .top span { margin-left: 8px; }
.trace dl { margin: 0; padding: 16px 20px 18px; display: grid; grid-template-columns: 7.5em minmax(0, 1fr); gap: 2px 16px; }
.trace dt { color: var(--ink-3); }
.trace dd { margin: 0; color: var(--ink); overflow-wrap: anywhere; }
.trace .k-src { color: #9FB4FF; }
.trace .k-hit { color: #F2C46B; }
.trace .k-ok { color: #9FE3C1; }
.trace .caret { display: inline-block; width: .55em; height: 1.05em; vertical-align: -2px; background: var(--cobalt); margin-left: 3px; }
@media (prefers-reduced-motion: no-preference) { .trace .caret { animation: blink 1.1s steps(1) infinite; } }
@keyframes blink { 50% { opacity: 0; } }
@media (max-width: 520px) { .trace dl { grid-template-columns: minmax(0, 1fr); } .trace dt { margin-top: 8px; } }

/* ---------- apps: three concept phones ---------- */
.phone-row {
  display: grid; grid-template-columns: repeat(3, minmax(0, 210px)); justify-content: center; gap: clamp(16px, 4vw, 48px);
  padding: 40px 0 8px; margin-bottom: 28px; position: relative;
}
.phone-row::before {
  content: ""; position: absolute; inset: 10% 15%; z-index: -1; filter: blur(60px);
  background: radial-gradient(closest-side, rgba(90, 120, 255, .35), transparent);
}
.phone-row .phone:nth-child(2) { transform: translateY(-24px); }
.phone-row figcaption { grid-column: 1 / -1; text-align: center; font-size: 13.5px; color: var(--ink-3); margin-top: 6px; }
.ui-card { background: rgba(255, 255, 255, .06); border: 1px solid rgba(170, 185, 230, .14); border-radius: 10px; padding: 9px; display: grid; gap: 6px; }
.ui-row { display: flex; align-items: center; gap: 7px; }
.ui-row .sk { flex: 1; }
.ui-check { width: 12px; height: 12px; border-radius: 50%; border: 1.5px solid rgba(170, 185, 230, .4); flex: none; }
.ui-check.on { background: #F2C46B; border-color: #F2C46B; box-shadow: 0 0 10px rgba(242, 196, 107, .6); }
.ui-prog { height: 6px; border-radius: 6px; background: rgba(170, 185, 230, .15); overflow: hidden; }
.ui-prog i { display: block; height: 100%; width: 62%; background: linear-gradient(90deg, #8FA8FF, #B79CFF); border-radius: inherit; }
.ui-bars { display: flex; align-items: flex-end; gap: 6px; height: 70px; padding-top: 6px; }
.ui-bars i { flex: 1; border-radius: 4px 4px 2px 2px; background: linear-gradient(180deg, #9FB4FF, rgba(120, 140, 255, .25)); }
.ui-bars i.hi { background: linear-gradient(180deg, #F2C46B, rgba(242, 196, 107, .25)); }
.ui-pair { display: grid; grid-template-columns: 1fr 1fr; gap: 6px; }
.ui-big { font: 600 15px/1 var(--display); color: #fff; }
.ui-time { display: grid; gap: 0; padding-left: 6px; }
.ui-time .ui-row { position: relative; padding: 7px 0 7px 12px; border-left: 1.5px solid rgba(170, 185, 230, .25); }
.ui-time .ui-row::before { content: ""; position: absolute; left: -5px; top: 50%; width: 8px; height: 8px; margin-top: -4px; border-radius: 50%; background: #0A1124; border: 1.5px solid #8FA8FF; }
.ui-time .ui-row.now::before { background: #F2C46B; border-color: #F2C46B; box-shadow: 0 0 10px rgba(242, 196, 107, .7); }
.ui-chip { font: 600 8.5px/1 var(--mono); padding: 3px 6px; border-radius: 99px; background: rgba(143, 168, 255, .15); color: #B9C8FF; }
@media (max-width: 760px) {
  .phone-row { grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 10px; padding-top: 28px; }
  .phone-row .phone { padding: 4%; }
  .phone-row .screen { font-size: 8px; padding: 22px 6px 8px; gap: 5px; }
  .phone-row .island { height: 10px; top: 6px; }
  .phone-row .ui-bars { height: 44px; }
  .phone-row .phone:nth-child(2) { transform: translateY(-14px); }
}

@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { transition-duration: .01ms !important; animation: none !important; }
}
