/*
  Nico Epoch website.
  Shared styles and self-hosted assets for every page.
  Theme: "Orchard Night" (dark), from the brand spec v0.1.
*/

/* ---------- Fonts: self-hosted Latin subsets. CJK text uses system fonts. ---------- */

@font-face {
  font-family: "Bricolage Grotesque";
  font-style: normal;
  font-weight: 200 800;
  font-display: swap;
  src: url("fonts/bricolage-grotesque-latin-wght-normal.woff2") format("woff2");
  unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA, U+02DC, U+0304, U+0308, U+0329, U+2000-206F, U+20AC, U+2122, U+2191, U+2193, U+2212, U+2215, U+FEFF, U+FFFD;
}

@font-face {
  font-family: "Geist";
  font-style: normal;
  font-weight: 100 900;
  font-display: swap;
  src: url("fonts/geist-latin-wght-normal.woff2") format("woff2");
  unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA, U+02DC, U+0304, U+0308, U+0329, U+2000-206F, U+20AC, U+2122, U+2191, U+2193, U+2212, U+2215, U+FEFF, U+FFFD;
}

@font-face {
  font-family: "JetBrains Mono";
  font-style: normal;
  font-weight: 500;
  font-display: swap;
  src: url("fonts/jetbrains-mono-latin-500-normal.woff2") format("woff2");
  unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA, U+02DC, U+0304, U+0308, U+0329, U+2000-206F, U+20AC, U+2122, U+2191, U+2193, U+2212, U+2215, U+FEFF, U+FFFD;
}

/* ---------- Tokens ---------- */

:root {
  color-scheme: dark;

  /* Surfaces */
  --bg: #0A0E0B;
  --s1: #101611;
  --s2: #151C16;
  --s3: #1C251D;
  --well: #0C110D;
  --line: rgba(214, 255, 190, 0.09);
  --line2: rgba(214, 255, 190, 0.16);
  --line3: rgba(214, 255, 190, 0.28);

  /* Text */
  --tx: #EAF3E5;
  --tx2: #B9C7B3;
  --tx3: #8B9B86;

  /* Brand: green apple (primary), grape (Nico itself) */
  --apple: #9BDC4F;
  --apple-hi: #B2E970;
  --apple-ink: #0E1A06;
  --apple-tx: #A9E262;
  --apple-soft: rgba(155, 220, 79, 0.14);
  --grape: #A08CFF;
  --grape-tx: #B6A8FF;
  --grape-soft: rgba(160, 140, 255, 0.16);

  /* Semantic: amber = waiting for you, coral = danger, sky = calendar and links */
  --amber: #F2B84B;
  --amber-tx: #F5C66B;
  --amber-soft: rgba(242, 184, 75, 0.15);
  --coral: #F07B6E;
  --coral-tx: #F59488;
  --coral-soft: rgba(240, 123, 110, 0.15);
  --sky: #6FB6F2;
  --sky-tx: #8CC5F5;
  --sky-soft: rgba(111, 182, 242, 0.15);

  --shadow: 0 12px 40px rgba(0, 0, 0, 0.45);

  /* Type */
  --cjk: "PingFang SC", "Hiragino Sans GB", "Microsoft YaHei", "Noto Sans SC";
  --font-display: "Bricolage Grotesque", var(--cjk), system-ui, sans-serif;
  --font-body: "Geist", var(--cjk), system-ui, sans-serif;
  --font-mono: "JetBrains Mono", ui-monospace, "SF Mono", Menlo, Consolas, monospace;

  --fs-hero: clamp(2.75rem, 1.4rem + 4.6vw, 4.5rem);
  --fs-h2: clamp(1.875rem, 1.35rem + 1.7vw, 2.5rem);
  --fs-h3: 1.25rem;
  --fs-lead: clamp(1.0625rem, 1rem + 0.25vw, 1.1875rem);
  --fs-sm: 0.875rem;
  --fs-xs: 0.8125rem;
  --fs-2xs: 0.75rem;

  /* Layout */
  --page: 1200px;
  --gutter: 24px;
  --section: clamp(56px, 2.5rem + 4vw, 96px);
  --r-sm: 8px;
  --r: 12px;
  --r-lg: 16px;
  --dur: 150ms;

  /* Icon masks: same-origin files, because the CSP (img-src 'self') blocks data: URIs */
  --i-check: url("/assets/icons/check.svg");
  --i-cross: url("/assets/icons/cross.svg");
}

:root:lang(ja) {
  --cjk: "Hiragino Sans", "Yu Gothic", "Meiryo", "Noto Sans JP";
}

@media (max-width: 640px) {
  :root {
    --gutter: 16px;
  }
}

/* ---------- Base ---------- */

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

html {
  -webkit-text-size-adjust: 100%;
  text-size-adjust: 100%;
  scroll-padding-top: 16px;
}

@media (prefers-reduced-motion: no-preference) {
  html {
    scroll-behavior: smooth;
  }
}

body {
  margin: 0;
  min-height: 100vh;
  display: flex;
  flex-direction: column;
  background: var(--bg);
  color: var(--tx);
  font-family: var(--font-body);
  font-size: 1rem;
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
  overflow-wrap: break-word;
}

html:lang(zh) body,
html:lang(ja) body {
  line-height: 1.75;
}

main {
  flex: 1 0 auto;
}

h1,
h2,
h3,
h4 {
  margin: 0;
  font-family: var(--font-display);
  color: var(--tx);
  text-wrap: balance;
}

p,
ul,
ol,
dl,
dd,
figure {
  margin: 0;
}

ul,
ol {
  padding: 0;
}

a {
  color: inherit;
}

code,
kbd,
.mono {
  font-family: var(--font-mono);
  font-weight: 500;
}

svg {
  flex-shrink: 0;
}

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

::selection {
  background: rgba(155, 220, 79, 0.32);
  color: var(--tx);
}

.sprite {
  position: absolute;
  width: 0;
  height: 0;
  overflow: hidden;
}

.visually-hidden {
  position: absolute;
  width: 1px;
  height: 1px;
  margin: -1px;
  padding: 0;
  overflow: hidden;
  clip: rect(0 0 0 0);
  white-space: nowrap;
  border: 0;
}

.skip-link {
  position: absolute;
  left: 16px;
  top: -80px;
  z-index: 10;
  display: inline-flex;
  align-items: center;
  min-height: 44px;
  padding: 0 16px;
  border-radius: var(--r-sm);
  background: var(--apple);
  color: var(--apple-ink);
  font-weight: 600;
  text-decoration: none;
}

.skip-link:focus {
  top: 12px;
}

.wrap {
  width: 100%;
  max-width: var(--page);
  margin-inline: auto;
  padding-inline: var(--gutter);
}

.ic {
  width: 18px;
  height: 18px;
  fill: none;
  stroke: currentColor;
  stroke-width: 1.6;
  stroke-linecap: round;
  stroke-linejoin: round;
}

.ic-sm {
  width: 14px;
  height: 14px;
}

.logo {
  width: 28px;
  height: 28px;
}

/* ---------- Text helpers ---------- */

.eyebrow {
  font-family: var(--font-mono);
  font-size: var(--fs-2xs);
  font-weight: 500;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--apple-tx);
}

:lang(zh) .eyebrow,
:lang(ja) .eyebrow {
  letter-spacing: 0.06em;
  text-transform: none;
}

.eyebrow.is-grape {
  color: var(--grape-tx);
}

.h2 {
  font-size: var(--fs-h2);
  font-weight: 650;
  line-height: 1.12;
  letter-spacing: -0.015em;
}

.h3 {
  font-size: var(--fs-h3);
  font-weight: 650;
  line-height: 1.3;
  letter-spacing: -0.01em;
}

:lang(zh) .h2,
:lang(zh) .h3,
:lang(zh) h1,
:lang(ja) .h2,
:lang(ja) .h3,
:lang(ja) h1 {
  letter-spacing: 0;
}

/* Break Chinese headings only at spaces and punctuation, not inside a phrase. Not for
   Japanese: it has no spaces between words, so keep-all would leave almost no break points. */
:lang(zh) h1,
:lang(zh) .h2,
:lang(zh) .h3 {
  word-break: keep-all;
  overflow-wrap: anywhere;
}

/* Avoid a single character alone on the last line (browsers without support ignore it). */
:lang(zh) p,
:lang(zh) li,
:lang(zh) dd,
:lang(ja) p,
:lang(ja) li,
:lang(ja) dd {
  text-wrap: pretty;
}

.lead {
  max-width: 34em;
  font-size: var(--fs-lead);
  line-height: 1.65;
  color: var(--tx2);
}

.lead strong {
  font-weight: 500;
  color: var(--tx);
}

.muted {
  color: var(--tx2);
}

.grape {
  color: var(--grape-tx);
}

.text-link {
  color: var(--sky-tx);
  text-decoration: underline;
  text-decoration-color: rgba(140, 197, 245, 0.45);
  text-underline-offset: 3px;
  transition: text-decoration-color var(--dur);
}

.text-link:hover {
  text-decoration-color: var(--sky-tx);
}

.arrow-link {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  min-height: 44px;
  color: var(--sky-tx);
  font-weight: 600;
  font-size: var(--fs-sm);
  text-decoration: none;
}

.arrow-link:hover {
  text-decoration: underline;
  text-underline-offset: 3px;
}

/* ---------- Header ---------- */

.site-header {
  border-bottom: 1px solid var(--line);
  background: var(--bg);
}

.header-row {
  display: grid;
  grid-template-columns: auto 1fr auto;
  align-items: center;
  gap: 4px 24px;
  min-height: 72px;
  padding-block: 12px;
}

.brand {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  min-height: 44px;
  border-radius: var(--r-sm);
  text-decoration: none;
}

.wordmark {
  display: inline-flex;
  gap: 0.28em;
  font-family: var(--font-display);
  font-size: 1.125rem;
  font-weight: 650;
  line-height: 1;
  letter-spacing: -0.02em;
  white-space: nowrap;
}


.main-nav {
  justify-self: center;
  display: flex;
  flex-wrap: wrap;
  gap: 4px;
}

.main-nav a {
  display: inline-flex;
  align-items: center;
  min-height: 44px;
  padding: 0 12px;
  border-radius: 10px;
  color: var(--tx2);
  font-size: var(--fs-sm);
  font-weight: 500;
  text-decoration: none;
  transition: color var(--dur), background-color var(--dur);
}

.main-nav a:hover {
  color: var(--tx);
  background: var(--s2);
}

.lang {
  display: inline-flex;
  align-items: center;
  border: 1px solid var(--line2);
  border-radius: 12px;
}

.lang a,
.lang span {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-width: 48px;
  min-height: 44px;
  padding: 0 12px;
  border-radius: 11px;
  font-size: var(--fs-xs);
  font-weight: 500;
  text-decoration: none;
  white-space: nowrap;
}

.lang a {
  color: var(--tx2);
  transition: color var(--dur), background-color var(--dur);
}

.lang a:hover {
  color: var(--tx);
  background: var(--s2);
}

.lang [aria-current] {
  background: var(--s3);
  color: var(--tx);
}

@media (max-width: 760px) {
  .header-row {
    grid-template-columns: 1fr auto;
    min-height: 0;
  }

  .main-nav {
    grid-column: 1 / -1;
    grid-row: 2;
    justify-self: start;
    margin-inline: -12px;
  }
}

@media (max-width: 360px) {
  .header-row {
    grid-template-columns: 1fr;
  }

  .header-row .lang {
    justify-self: start;
    grid-row: 2;
  }

  .main-nav {
    grid-row: 3;
  }
}

/* ---------- Buttons ---------- */

.cta-row {
  display: flex;
  flex-wrap: wrap;
  gap: 12px;
}

.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  min-height: 48px;
  padding: 0 20px;
  border: 1px solid transparent;
  border-radius: 10px;
  font-size: 0.9375rem;
  font-weight: 600;
  line-height: 1.2;
  text-align: center;
  text-decoration: none;
  transition: background-color var(--dur), border-color var(--dur), color var(--dur);
}

.btn-primary {
  background: var(--apple);
  color: var(--apple-ink);
}

.btn-primary:hover {
  background: var(--apple-hi);
}

.btn-ghost {
  background: var(--s2);
  border-color: var(--line2);
  color: var(--tx);
  font-weight: 500;
}

.btn-ghost:hover {
  background: var(--s3);
  border-color: var(--line3);
}

/* Not a link: a placeholder for something that is not available yet. */
.btn-soon {
  border: 1px dashed var(--line3);
  color: var(--tx2);
  font-weight: 500;
  cursor: default;
}

.soon {
  padding: 2px 8px;
  border-radius: 999px;
  background: var(--amber-soft);
  color: var(--amber-tx);
  font-family: var(--font-mono);
  font-size: var(--fs-2xs);
  font-weight: 500;
  white-space: nowrap;
}

/* ---------- Chips, dots, mock controls ---------- */

.chip {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 2px 8px;
  border-radius: 999px;
  font-size: var(--fs-2xs);
  font-weight: 600;
  line-height: 1.5;
  white-space: nowrap;
}

.chip-apple { background: var(--apple-soft); color: var(--apple-tx); }
.chip-grape { background: var(--grape-soft); color: var(--grape-tx); }
.chip-amber { background: var(--amber-soft); color: var(--amber-tx); }
.chip-coral { background: var(--coral-soft); color: var(--coral-tx); }
.chip-sky { background: var(--sky-soft); color: var(--sky-tx); }
.chip-plain { background: var(--s3); color: var(--tx2); }

.chip-line {
  border: 1px solid var(--line2);
  border-radius: 6px;
  color: var(--tx2);
  font-weight: 500;
}

.chip-dashed {
  border: 1px dashed var(--amber);
  color: var(--amber-tx);
  font-weight: 500;
}

.dot {
  display: inline-block;
  flex: none;
  width: 6px;
  height: 6px;
  border-radius: 999px;
  background: currentColor;
}

.dot-apple { background: var(--apple); }
.dot-amber { background: var(--amber); }
.dot-grape { background: var(--grape); }
.dot-sky { background: var(--sky); }

.mbtn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 6px;
  height: 28px;
  padding: 0 10px;
  border-radius: var(--r-sm);
  font-size: var(--fs-2xs);
  white-space: nowrap;
}

.mbtn-apple {
  background: var(--apple);
  color: var(--apple-ink);
  font-weight: 600;
}

.mbtn-line {
  border: 1px solid var(--line2);
  color: var(--tx);
}

.mbtn-text {
  color: var(--tx2);
}

.check-list {
  list-style: none;
  display: flex;
  flex-wrap: wrap;
  gap: 8px 20px;
  font-size: var(--fs-xs);
  color: var(--tx2);
}

.check-list li,
.ticks li {
  position: relative;
  padding-left: 24px;
}

.check-list li::before,
.ticks li::before {
  content: "";
  position: absolute;
  left: 0;
  top: 0.2em;
  width: 16px;
  height: 16px;
  background: var(--apple-tx);
  -webkit-mask: var(--i-check) center / contain no-repeat;
  mask: var(--i-check) center / contain no-repeat;
}

.ticks {
  list-style: none;
  display: grid;
  gap: 10px;
}

.ticks li.is-no::before {
  background: var(--coral-tx);
  -webkit-mask-image: var(--i-cross);
  mask-image: var(--i-cross);
}

/* ---------- Cards and sections ---------- */

.card {
  min-width: 0;
  padding: 28px;
  border: 1px solid var(--line);
  border-radius: var(--r-lg);
  background: var(--s1);
}

.section {
  border-bottom: 1px solid var(--line);
}

.section > .wrap {
  padding-block: var(--section);
}

.section-head {
  display: flex;
  flex-wrap: wrap;
  align-items: flex-end;
  justify-content: space-between;
  gap: 16px 48px;
  margin-bottom: 40px;
}

.section-head > div {
  flex: 1 1 420px;
  min-width: 0;
  display: flex;
  flex-direction: column;
  gap: 12px;
}

.section-head > p {
  flex: 1 1 340px;
  min-width: 0;
  max-width: 34em;
  color: var(--tx2);
  line-height: 1.65;
}

.stack {
  display: flex;
  flex-direction: column;
  gap: 12px;
}

.grid-2,
.grid-3,
.grid-4 {
  display: grid;
  gap: 16px;
}

.grid-2 { grid-template-columns: repeat(auto-fit, minmax(min(420px, 100%), 1fr)); gap: 20px; }
.grid-3 { grid-template-columns: repeat(3, minmax(0, 1fr)); }
.grid-4 { grid-template-columns: repeat(4, minmax(0, 1fr)); }

/* Fixed steps instead of auto-fit, so no row ends with a single orphan card. */
@media (max-width: 1100px) {
  .grid-4 { grid-template-columns: repeat(2, minmax(0, 1fr)); }
}

@media (max-width: 960px) {
  .grid-3 { grid-template-columns: minmax(0, 1fr); }
}

@media (max-width: 600px) {
  .grid-4 { grid-template-columns: minmax(0, 1fr); }
}

.split {
  display: grid;
  grid-template-columns: minmax(0, 0.9fr) minmax(0, 1.1fr);
  align-items: center;
  gap: 48px 56px;
}

.split.is-flipped {
  grid-template-columns: minmax(0, 1.1fr) minmax(0, 0.9fr);
}

@media (max-width: 960px) {
  .split,
  .split.is-flipped {
    grid-template-columns: minmax(0, 1fr);
  }

  .split.is-flipped > :first-child {
    order: 2;
  }
}

.ic-box {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  flex: none;
  width: 36px;
  height: 36px;
  border: 1px solid var(--line);
  border-radius: 10px;
  background: var(--s2);
  color: var(--apple-tx);
}

.ic-box.is-sky { background: var(--sky-soft); border-color: transparent; color: var(--sky-tx); }
.ic-box.is-grape { background: var(--grape-soft); border-color: transparent; color: var(--grape-tx); }
.ic-box.is-amber { background: var(--amber-soft); border-color: transparent; color: var(--amber-tx); }

.card-head {
  display: flex;
  align-items: center;
  gap: 14px;
}

.card-head .h3 {
  font-size: 1.375rem;
}

.feature-list {
  list-style: none;
  display: grid;
  gap: 22px;
}

.feature-list li {
  display: grid;
  grid-template-columns: 36px minmax(0, 1fr);
  gap: 14px;
}

.feature-list h3 {
  font-family: var(--font-body);
  font-size: 1rem;
  font-weight: 600;
  line-height: 1.4;
}

.feature-list p {
  margin-top: 2px;
  color: var(--tx2);
  font-size: 0.9375rem;
  line-height: 1.6;
}

.well {
  border: 1px solid var(--line);
  border-radius: var(--r);
  background: var(--well);
}

/* ---------- Hero ---------- */

.hero {
  position: relative;
  overflow: hidden;
  border-bottom: 1px solid var(--line);
}

.hero::before {
  content: "";
  position: absolute;
  inset: 0;
  background-image:
    linear-gradient(var(--line) 1px, transparent 1px),
    linear-gradient(90deg, var(--line) 1px, transparent 1px);
  background-size: 48px 48px;
  -webkit-mask-image: radial-gradient(ellipse 70% 80% at 70% 40%, #000 0%, transparent 72%);
  mask-image: radial-gradient(ellipse 70% 80% at 70% 40%, #000 0%, transparent 72%);
  pointer-events: none;
}

.hero-inner {
  position: relative;
  display: grid;
  grid-template-columns: minmax(0, 0.95fr) minmax(0, 1.35fr);
  align-items: center;
  gap: 56px 48px;
  padding-block: 72px 96px;
}

.hero-copy {
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  gap: 24px;
}

.hero h1 {
  font-size: var(--fs-hero);
  font-weight: 700;
  line-height: 1.04;
  letter-spacing: -0.02em;
}

:lang(zh) .hero h1,
:lang(ja) .hero h1 {
  line-height: 1.12;
}

:lang(ja) .hero h1 .grape {
  display: inline-block;
}

.pill {
  display: inline-flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 8px;
  min-height: 32px;
  padding: 4px 12px 4px 6px;
  border: 1px solid var(--line2);
  border-radius: 999px;
  background: var(--s1);
  color: var(--tx2);
  font-size: var(--fs-xs);
}

@media (max-width: 1040px) {
  .hero-inner {
    grid-template-columns: minmax(0, 1fr);
    padding-block: 48px 64px;
  }
}

/* Hero product illustration */

.hero-visual {
  position: relative;
  min-width: 0;
  padding: 0 104px 72px 0;
}

.hero-visual::before {
  content: "";
  position: absolute;
  left: 50%;
  top: 46%;
  width: 640px;
  max-width: 120%;
  aspect-ratio: 1;
  transform: translate(-50%, -50%);
  border-radius: 50%;
  background: radial-gradient(circle, var(--apple-soft) 0%, transparent 62%);
  pointer-events: none;
}

.mock-window {
  position: relative;
  display: flex;
  flex-direction: column;
  overflow: hidden;
  border: 1px solid var(--line2);
  border-radius: 14px;
  background: var(--s1);
  box-shadow: var(--shadow);
  font-size: var(--fs-2xs);
}

.mw-bar {
  display: flex;
  align-items: center;
  gap: 12px;
  height: 40px;
  padding: 0 12px;
  border-bottom: 1px solid var(--line);
  background: var(--s2);
  color: var(--tx2);
}

.mw-bar .logo {
  width: 16px;
  height: 16px;
}

.mw-search {
  flex: 1;
  min-width: 0;
  max-width: 280px;
  margin-inline: auto;
  display: flex;
  align-items: center;
  gap: 8px;
  height: 26px;
  padding: 0 8px;
  border: 1px solid var(--line);
  border-radius: var(--r-sm);
  background: var(--well);
  color: var(--tx3);
}

.mw-search span {
  flex: 1;
  min-width: 0;
  overflow: hidden;
  white-space: nowrap;
  text-overflow: ellipsis;
}

.mw-search kbd {
  font-size: 11px;
}

.mw-sync {
  display: flex;
  align-items: center;
  gap: 6px;
  white-space: nowrap;
}

.mw-body {
  display: flex;
  min-height: 360px;
}

.mw-side {
  flex: 0 0 140px;
  display: flex;
  flex-direction: column;
  gap: 2px;
  padding: 10px 8px;
  border-right: 1px solid var(--line);
  color: var(--tx2);
}

.mw-side > span {
  display: flex;
  align-items: center;
  gap: 8px;
  height: 30px;
  padding: 0 8px;
  border-radius: var(--r-sm);
}

.mw-side > span.is-on {
  background: var(--s3);
  color: var(--tx);
  font-weight: 500;
}

.mw-side .count {
  margin-left: auto;
  padding: 0 6px;
  border-radius: 6px;
  background: var(--amber-soft);
  color: var(--amber-tx);
  font-weight: 600;
}

.mw-machines {
  margin-top: auto;
  display: flex;
  flex-direction: column;
  gap: 6px;
  padding: 8px;
  border: 1px solid var(--line);
  border-radius: var(--r-sm);
}

.mw-machines span {
  display: flex;
  align-items: center;
  gap: 6px;
}

.mw-main {
  flex: 1;
  min-width: 0;
  display: flex;
  flex-direction: column;
  gap: 10px;
  padding: 14px;
  background: var(--bg);
}

.mw-title {
  display: flex;
  align-items: baseline;
  gap: 8px;
}

.mw-title b {
  font-family: var(--font-display);
  font-size: 1rem;
  font-weight: 600;
}

.mw-title span {
  color: var(--amber-tx);
}

.mw-tabs {
  display: flex;
  gap: 6px;
  overflow: hidden;
  white-space: nowrap;
}

.mw-tabs span {
  padding: 3px 10px;
  border: 1px solid var(--line);
  border-radius: 999px;
  color: var(--tx2);
}

.mw-tabs span:first-child {
  border-color: transparent;
  background: var(--s3);
  color: var(--tx);
  font-weight: 500;
}

.mcard {
  display: flex;
  flex-direction: column;
  gap: 8px;
  min-width: 0;
  padding: 12px;
  border: 1px solid var(--line);
  border-radius: var(--r);
  background: var(--s2);
}

.mcard-tags {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 6px;
  color: var(--tx2);
}

.mcard-title {
  font-size: var(--fs-sm);
  font-weight: 600;
  line-height: 1.4;
  color: var(--tx);
}

.mcard-meta {
  overflow: hidden;
  color: var(--tx3);
  white-space: nowrap;
  text-overflow: ellipsis;
}

.mcard-quote {
  padding: 8px 10px;
  border-radius: var(--r-sm);
  background: var(--well);
  color: var(--tx2);
  line-height: 1.5;
}

.mcard-code {
  overflow: hidden;
  padding: 8px 10px;
  border-radius: var(--r-sm);
  background: var(--well);
  white-space: nowrap;
  text-overflow: ellipsis;
}

.mcard-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
}

.mock-phone {
  position: absolute;
  right: 0;
  bottom: 0;
  width: 220px;
  padding: 7px;
  border: 1px solid var(--line2);
  border-radius: 36px;
  background: var(--s3);
  box-shadow: var(--shadow);
  font-size: var(--fs-2xs);
}

.mp-screen {
  display: flex;
  flex-direction: column;
  gap: 8px;
  overflow: hidden;
  padding: 18px 10px 14px;
  border-radius: 29px;
  background: var(--bg);
}

.mp-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 0 4px 2px;
}

.mp-head b {
  font-family: var(--font-display);
  font-size: 1.25rem;
  font-weight: 700;
}

.mp-avatar {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 28px;
  height: 28px;
  border-radius: 999px;
  background: var(--grape-soft);
  color: var(--grape-tx);
  font-weight: 600;
}

.mp-card {
  border-color: var(--line2);
  border-radius: 14px;
}

.mp-card .mbtn {
  height: 34px;
  border-radius: 10px;
  font-size: var(--fs-xs);
}

@media (max-width: 640px) {
  .hero-visual {
    padding: 0;
  }

  .mock-phone,
  .mw-side {
    display: none;
  }

  .mw-body {
    min-height: 0;
  }
}

/* ---------- Two parts ---------- */

.parts {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto minmax(0, 1fr);
  align-items: stretch;
  gap: 16px;
}

.part {
  display: flex;
  flex-direction: column;
  gap: 16px;
}

.part-tag {
  font-family: var(--font-mono);
  font-size: var(--fs-2xs);
  color: var(--tx3);
}

.part p {
  color: var(--tx2);
}

.part ul {
  list-style: none;
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin-top: auto;
}

.part li {
  padding: 4px 10px;
  border: 1px solid var(--line2);
  border-radius: var(--r-sm);
  background: var(--s2);
  color: var(--tx);
  font-size: var(--fs-xs);
}

.part-link {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 6px;
  min-width: 112px;
  color: var(--tx3);
  font-size: var(--fs-2xs);
  text-align: center;
}

.part-link .mono {
  color: var(--apple-tx);
}

.part-link svg {
  width: 72px;
  height: 14px;
  stroke: var(--apple);
}

@media (max-width: 860px) {
  .parts {
    grid-template-columns: minmax(0, 1fr);
  }

  .part-link {
    flex-direction: row;
    min-height: 40px;
  }

  .part-link svg {
    width: 14px;
    height: 40px;
    transform: none;
  }

  .part-link .arrow-h {
    display: none;
  }
}

@media (min-width: 861px) {
  .part-link .arrow-v {
    display: none;
  }
}

/* ---------- Shells: one card, four places ---------- */

.shell {
  display: flex;
  flex-direction: column;
  gap: 14px;
  padding: 16px;
}

.shell-head {
  display: flex;
  align-items: center;
  gap: 12px;
}

.shell-head b {
  display: block;
  font-family: var(--font-display);
  font-size: 1rem;
  font-weight: 650;
}

.shell-head small {
  display: block;
  color: var(--tx3);
  font-size: var(--fs-2xs);
}

.shell-mock {
  display: flex;
  flex-direction: column;
  justify-content: center;
  gap: 8px;
  min-height: 150px;
  padding: 12px;
  font-size: var(--fs-2xs);
}

.shell p {
  color: var(--tx2);
  font-size: var(--fs-xs);
  line-height: 1.6;
}

.term {
  font-family: var(--font-mono);
  font-size: 11.5px;
  line-height: 1.75;
  color: var(--tx2);
}

.term .k {
  color: var(--apple-tx);
}

.term .w {
  color: var(--amber-tx);
}

.term .t {
  color: var(--tx);
}

.term .d {
  color: var(--tx3);
}

.discord {
  display: grid;
  grid-template-columns: 24px minmax(0, 1fr);
  gap: 10px;
}

.discord .logo {
  width: 24px;
  height: 24px;
}

.discord-name {
  display: flex;
  align-items: center;
  gap: 6px;
  color: var(--tx3);
}

.discord-name b {
  color: var(--tx);
}

.first-answer {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 8px 14px;
  margin-top: 16px;
  padding: 12px 16px;
  border: 1px solid var(--line);
  border-radius: var(--r);
  background: var(--s1);
  font-size: var(--fs-xs);
  color: var(--tx2);
}

.first-answer .ic {
  color: var(--apple-tx);
}

.first-answer strong {
  color: var(--tx);
  font-weight: 500;
}

.first-answer .end {
  margin-left: auto;
  color: var(--tx3);
}

.first-answer .fa-arrow {
  color: var(--tx3);
}

/* On narrow screens the strip wraps: put the result under the action and point the arrow down. */
@media (max-width: 640px) {
  .first-answer {
    display: grid;
    grid-template-columns: 18px minmax(0, 1fr);
    align-items: start;
  }

  .first-answer .fa-arrow {
    transform: rotate(90deg);
  }

  .first-answer .end {
    grid-column: 2;
    margin-left: 0;
  }
}

/* ---------- Epoch calendar ---------- */

.dayview {
  padding: 20px;
  border: 1px solid var(--line2);
  border-radius: var(--r-lg);
  background: var(--s1);
  box-shadow: var(--shadow);
  font-size: var(--fs-xs);
}

.dayview-head {
  display: flex;
  flex-wrap: wrap;
  align-items: baseline;
  justify-content: space-between;
  gap: 8px 16px;
  margin-bottom: 16px;
}

.dayview-head b {
  font-family: var(--font-display);
  font-size: 1.25rem;
  font-weight: 650;
}

.dayview-head b span {
  margin-left: 8px;
  color: var(--tx2);
  font-family: var(--font-body);
  font-size: var(--fs-xs);
  font-weight: 500;
}

.dayview-body {
  display: grid;
  grid-template-columns: minmax(0, 1.25fr) minmax(0, 1fr);
  gap: 16px;
}

.timeline {
  list-style: none;
  display: flex;
  flex-direction: column;
  gap: 10px;
}

.timeline li {
  display: grid;
  grid-template-columns: 88px minmax(0, 1fr);
  align-items: start;
  gap: 10px;
}

.timeline time {
  padding-top: 9px;
  color: var(--tx3);
  font-family: var(--font-mono);
  font-size: 11.5px;
}

.ev {
  display: flex;
  flex-direction: column;
  gap: 4px;
  padding: 9px 12px;
  border: 1px solid var(--line);
  border-radius: 10px;
  background: var(--s2);
}

.ev b {
  display: flex;
  align-items: center;
  gap: 8px;
  font-weight: 600;
  color: var(--tx);
}

.ev small {
  color: var(--tx3);
  font-size: var(--fs-2xs);
}

.ev.is-epoch {
  border-color: rgba(111, 182, 242, 0.35);
}

.now-line {
  display: flex;
  align-items: center;
  gap: 8px;
  color: var(--apple-tx);
  font-size: var(--fs-2xs);
}

.now-line::before {
  content: "";
  flex: 1;
  height: 1px;
  background: var(--apple);
}

.timeline li.is-now time {
  padding-top: 0;
  color: var(--apple-tx);
}

.side-box {
  border: 1px solid var(--line);
  border-radius: var(--r);
  background: var(--s2);
}

.side-box + .side-box {
  margin-top: 12px;
}

.side-box h4 {
  display: flex;
  justify-content: space-between;
  padding: 10px 12px;
  border-bottom: 1px solid var(--line);
  font-family: var(--font-body);
  font-size: var(--fs-xs);
  font-weight: 600;
}

.side-box h4 span {
  color: var(--tx3);
  font-weight: 500;
}

.side-box ul {
  list-style: none;
}

.side-box li {
  display: grid;
  grid-template-columns: 16px minmax(0, 1fr);
  gap: 10px;
  padding: 9px 12px;
}

.side-box li + li {
  border-top: 1px solid var(--line);
}

.side-box li small {
  display: block;
  color: var(--tx3);
  font-size: var(--fs-2xs);
}

.side-box li small em {
  color: var(--amber-tx);
  font-style: normal;
}

.box {
  width: 14px;
  height: 14px;
  margin-top: 3px;
  border: 1.5px solid var(--tx3);
  border-radius: 4px;
}

.briefs li {
  display: flex;
  justify-content: space-between;
  gap: 12px;
}

.briefs .mono {
  color: var(--tx2);
}

@media (max-width: 560px) {
  .dayview {
    padding: 14px;
  }

  .dayview-body {
    grid-template-columns: minmax(0, 1fr);
  }

  .timeline li {
    grid-template-columns: 76px minmax(0, 1fr);
  }
}

/* ---------- Google account ---------- */

.perm {
  display: flex;
  flex-direction: column;
  gap: 18px;
  padding: 24px;
}

.perm-head {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 12px;
}

.perm-head .h3 {
  font-size: 1.125rem;
}

.perm-head .chip {
  margin-left: auto;
}

.perm-dl {
  display: grid;
  gap: 12px;
}

.perm-dl > div {
  display: grid;
  grid-template-columns: 76px minmax(0, 1fr);
  gap: 12px;
  font-size: var(--fs-sm);
}

:lang(zh) .perm-dl > div {
  grid-template-columns: 56px minmax(0, 1fr);
}

.perm-dl dt {
  color: var(--tx3);
  font-family: var(--font-mono);
  font-size: var(--fs-2xs);
  line-height: 1.9;
  text-transform: uppercase;
  letter-spacing: 0.06em;
}

:lang(zh) .perm-dl dt {
  text-transform: none;
  letter-spacing: 0.04em;
}

/* Japanese labels run to six full-width characters; without tracking they fit the 76px column. */
:lang(ja) .perm-dl dt {
  text-transform: none;
  letter-spacing: 0;
}

.perm-dl dd {
  color: var(--tx);
  line-height: 1.55;
}

.perm-dl dt.is-never {
  color: var(--coral-tx);
}

.steps {
  list-style: none;
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 0;
  margin-top: 20px;
  overflow: hidden;
  border: 1px solid var(--line);
  border-radius: var(--r-lg);
  background: var(--s1);
}

.steps li {
  display: flex;
  flex-direction: column;
  gap: 8px;
  padding: 22px 24px;
  border-left: 1px solid var(--line);
  margin-left: -1px;
  border-top: 1px solid var(--line);
  margin-top: -1px;
}

@media (max-width: 1000px) {
  .steps { grid-template-columns: repeat(2, minmax(0, 1fr)); }
}

@media (max-width: 560px) {
  .steps { grid-template-columns: minmax(0, 1fr); }
}

.steps .num {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 28px;
  height: 28px;
  border-radius: 999px;
  background: var(--apple-soft);
  color: var(--apple-tx);
  font-family: var(--font-mono);
  font-size: var(--fs-2xs);
}

.steps li:nth-child(3) .num {
  background: var(--amber-soft);
  color: var(--amber-tx);
}

.steps li:nth-child(4) .num {
  background: var(--sky-soft);
  color: var(--sky-tx);
}

.steps b {
  font-weight: 600;
}

.steps p {
  color: var(--tx2);
  font-size: var(--fs-sm);
  line-height: 1.6;
}

.promise {
  display: grid;
  grid-template-columns: minmax(0, 1.2fr) minmax(0, 1fr);
  gap: 24px 48px;
  margin-top: 20px;
  border-color: rgba(155, 220, 79, 0.35);
}

.promise .ticks {
  font-size: 0.9375rem;
  color: var(--tx);
}

.promise-side {
  display: flex;
  flex-direction: column;
  gap: 12px;
  color: var(--tx2);
  font-size: var(--fs-xs);
  line-height: 1.65;
}

@media (max-width: 860px) {
  .promise {
    grid-template-columns: minmax(0, 1fr);
  }
}

/* ---------- Safety ---------- */

.qa {
  display: flex;
  flex-direction: column;
  gap: 18px;
}

.qa > p {
  color: var(--tx2);
  line-height: 1.65;
}

.qa > p strong {
  color: var(--tx);
  font-weight: 600;
}

.risk {
  list-style: none;
  overflow: hidden;
}

.risk li {
  display: grid;
  grid-template-columns: 104px minmax(0, 1fr) auto;
  align-items: center;
  gap: 8px 14px;
  padding: 10px 14px;
  font-size: var(--fs-xs);
}

:lang(zh) .risk li {
  grid-template-columns: 80px minmax(0, 1fr) auto;
}

.risk li + li {
  border-top: 1px solid var(--line);
}

.risk li > span:first-child {
  justify-self: start;
}

.risk li > span:last-child {
  color: var(--tx2);
  text-align: right;
}

.risk-gate {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 4px 12px;
  padding: 12px 14px;
  border-top: 1px solid var(--line);
  color: var(--tx2);
  font-size: var(--fs-2xs);
}

.bar {
  flex: 1 0 100%;
  height: 4px;
  overflow: hidden;
  border-radius: 999px;
  background: var(--s3);
}

.bar i {
  display: block;
  height: 100%;
  border-radius: 999px;
  background: var(--apple);
}

@media (max-width: 480px) {
  /* Fixed first column so every row's text starts at the same x (widest chip: 84px EN, 67px ZH). */
  .risk li {
    grid-template-columns: 92px minmax(0, 1fr);
    align-items: start;
  }

  :lang(zh) .risk li {
    grid-template-columns: 76px minmax(0, 1fr);
  }

  .risk li > span:last-child {
    grid-column: 2;
    text-align: left;
    color: var(--tx3);
  }
}

.mask-demo {
  display: grid;
  gap: 2px;
  padding: 12px 14px;
  font-family: var(--font-mono);
  font-size: var(--fs-2xs);
}

.mask-demo div {
  display: flex;
  flex-wrap: wrap;
  gap: 2px 12px;
}

.mask-demo .k {
  min-width: 108px;
  color: var(--tx3);
  font-family: var(--font-body);
}

:lang(zh) .mask-demo .k {
  min-width: 56px;
}

.mask-demo code {
  overflow-wrap: anywhere;
  color: var(--tx);
}

@media (max-width: 480px) {
  .mask-demo div {
    flex-direction: column;
  }
}

.mask-demo .secret {
  color: var(--coral-tx);
}

.mask-demo .masked {
  color: var(--grape-tx);
}

.toggle-row {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 10px 16px;
  font-size: var(--fs-xs);
  color: var(--tx2);
}

.seg {
  display: inline-flex;
  padding: 3px;
  border: 1px solid var(--line2);
  border-radius: 10px;
  background: var(--well);
}

.seg span {
  padding: 4px 10px;
  border-radius: 7px;
  font-size: var(--fs-2xs);
  color: var(--tx2);
}

.seg span:first-child {
  background: var(--s3);
  color: var(--tx);
  font-weight: 600;
}

.groups {
  display: grid;
  gap: 14px;
}

.groups h4 {
  margin-bottom: 8px;
  color: var(--tx3);
  font-family: var(--font-body);
  font-size: var(--fs-2xs);
  font-weight: 600;
}

.groups ul {
  list-style: none;
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}

.groups li {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 6px 10px;
  border: 1px solid var(--line2);
  border-radius: var(--r-sm);
  background: var(--s2);
  font-size: var(--fs-xs);
}

.groups li small {
  color: var(--tx3);
  font-size: var(--fs-2xs);
}

.groups li.is-grape {
  border-color: transparent;
  background: var(--grape-soft);
  color: var(--grape-tx);
  font-weight: 500;
}

.audit {
  overflow: hidden;
}

.audit-tabs {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 4px;
  padding: 8px;
  border-bottom: 1px solid var(--line);
  font-size: var(--fs-2xs);
  color: var(--tx2);
}

.audit-tabs span {
  padding: 4px 10px;
  border-radius: 6px;
}

.audit-tabs .is-on {
  background: var(--s3);
  color: var(--tx);
  font-weight: 600;
}

.audit-tabs code {
  margin-left: auto;
  padding: 0 6px;
  overflow-wrap: anywhere;
  color: var(--tx2);
}

.audit dl {
  display: grid;
  gap: 10px;
  padding: 14px;
}

.audit dl > div {
  display: grid;
  grid-template-columns: 112px minmax(0, 1fr);
  gap: 12px;
  font-size: var(--fs-xs);
}

:lang(zh) .audit dl > div {
  grid-template-columns: 76px minmax(0, 1fr);
}

.audit dt {
  color: var(--tx3);
}

.audit dd {
  color: var(--tx);
  line-height: 1.55;
}

@media (max-width: 480px) {
  .audit dl > div,
  :lang(zh) .audit dl > div {
    grid-template-columns: minmax(0, 1fr);
    gap: 2px;
  }
}

/* ---------- Coding ---------- */

.session {
  overflow: hidden;
  border: 1px solid var(--line2);
  border-radius: var(--r-lg);
  background: var(--s1);
  box-shadow: var(--shadow);
  font-size: var(--fs-xs);
}

.session-top {
  display: flex;
  flex-direction: column;
  gap: 12px;
  padding: 18px;
  border-bottom: 1px solid var(--line);
}

.session-title {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 8px 10px;
}

.session-title b {
  font-family: var(--font-display);
  font-size: 1.125rem;
  font-weight: 650;
}

.session-title .route {
  margin-left: auto;
  font-family: var(--font-mono);
  font-weight: 500;
}

.session-meta {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 6px 12px;
  color: var(--tx2);
  font-family: var(--font-mono);
  font-size: var(--fs-2xs);
}

.stats {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 8px;
}

.stats > div {
  display: flex;
  flex-direction: column;
  gap: 4px;
  padding: 10px;
  border: 1px solid var(--line);
  border-radius: 10px;
  background: var(--s2);
}

.stats small {
  color: var(--tx3);
  font-size: var(--fs-2xs);
}

.stats b {
  font-family: var(--font-mono);
  font-weight: 500;
}

.stats .bar {
  flex: none;
  margin-top: 2px;
}

@media (max-width: 560px) {
  .stats {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
}

.ledger {
  list-style: none;
  display: grid;
  gap: 8px;
  padding: 14px 18px;
  border-bottom: 1px solid var(--line);
  font-family: var(--font-mono);
  font-size: var(--fs-2xs);
}

.ledger-label {
  color: var(--tx3);
  font-family: var(--font-body);
  font-weight: 600;
}

.ledger li {
  display: grid;
  grid-template-columns: 14px minmax(0, 1fr) auto;
  align-items: center;
  gap: 10px;
  color: var(--tx);
}

.ledger li.ledger-label {
  display: block;
}

.ledger li .d {
  color: var(--tx3);
}

.ledger li code {
  overflow: hidden;
  white-space: nowrap;
  text-overflow: ellipsis;
}

.ledger .ic {
  width: 14px;
  height: 14px;
  color: var(--apple-tx);
}

.ledger .ring {
  width: 9px;
  height: 9px;
  margin-inline: auto;
  border: 1.5px solid var(--tx3);
  border-radius: 999px;
}

.add {
  color: var(--apple-tx);
}

.del {
  color: var(--coral-tx);
}

.sessions {
  list-style: none;
  padding: 6px 18px 10px;
}

.sessions li {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 4px 10px;
  padding: 10px 0;
}

.sessions li + li {
  border-top: 1px solid var(--line);
}

.sessions b {
  font-weight: 600;
}

.sessions small {
  margin-left: auto;
  color: var(--tx2);
  font-size: var(--fs-2xs);
}

.modes {
  list-style: none;
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
}

.modes li {
  padding: 4px 10px;
  border-radius: var(--r-sm);
  color: var(--tx2);
  font-size: var(--fs-xs);
  font-weight: 500;
}

.modes li.is-on {
  background: var(--apple);
  color: var(--apple-ink);
  font-weight: 600;
}

.modes li.is-hot {
  color: var(--coral-tx);
}

.modes-label {
  margin-bottom: 8px;
  font-weight: 600;
  font-size: var(--fs-sm);
}

/* ---------- Memory and open source ---------- */

.feature-card {
  display: flex;
  flex-direction: column;
  gap: 18px;
}

.feature-card > p {
  color: var(--tx2);
  line-height: 1.65;
}

.mem {
  list-style: none;
  overflow: hidden;
}

.mem li {
  display: grid;
  grid-template-columns: 92px minmax(0, 1fr);
  align-items: start;
  gap: 12px;
  padding: 11px 14px;
  font-size: var(--fs-xs);
}

.mem li + li {
  border-top: 1px solid var(--line);
}

.mem li > .chip {
  justify-self: start;
  margin-top: 1px;
}

.mem small {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 4px 8px;
  margin-top: 4px;
  color: var(--tx3);
  font-size: var(--fs-2xs);
}

.mem .box {
  display: inline-block;
  margin: 0;
  vertical-align: -2px;
}

.flow-chips {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 8px;
  font-size: var(--fs-2xs);
  color: var(--tx2);
}

.flow-chips span {
  padding: 4px 10px;
  border: 1px solid var(--line2);
  border-radius: var(--r-sm);
  color: var(--tx);
}

.flow-chips span.is-gate {
  border-color: transparent;
  background: var(--grape-soft);
  color: var(--grape-tx);
  font-weight: 600;
}

.flow-chips span.is-opt {
  border-style: dashed;
  color: var(--tx2);
}

.flow-chips .ic {
  width: 14px;
  height: 14px;
  color: var(--tx3);
}

.repo {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 10px 12px;
  padding: 12px 14px;
  font-size: var(--fs-sm);
}

.repo .ic {
  color: var(--tx2);
}

.repo b {
  font-weight: 500;
}

.repo .end {
  display: flex;
  gap: 8px;
  margin-left: auto;
}

.crates {
  list-style: none;
  overflow: hidden;
}

.crates li {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(0, 1fr);
  gap: 4px 16px;
  padding: 10px 14px;
  font-size: var(--fs-xs);
}

.crates li + li {
  border-top: 1px solid var(--line);
}

.crates code {
  font-size: var(--fs-2xs);
  color: var(--tx);
}

.crates span {
  color: var(--tx2);
}

@media (max-width: 480px) {
  .crates li {
    grid-template-columns: minmax(0, 1fr);
  }
}

/* ---------- Status band ---------- */

.status-band {
  position: relative;
  overflow: hidden;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 20px;
  padding: clamp(40px, 2rem + 3vw, 72px) clamp(20px, 1rem + 3vw, 56px);
  border: 1px solid var(--line);
  border-radius: 20px;
  background: var(--s1);
  text-align: center;
}

.status-band::before {
  content: "";
  position: absolute;
  left: 50%;
  top: 0;
  width: 760px;
  max-width: 160%;
  aspect-ratio: 1;
  transform: translate(-50%, -55%);
  border-radius: 50%;
  background: radial-gradient(circle, rgba(155, 220, 79, 0.16) 0%, transparent 62%);
  pointer-events: none;
}

.status-band > * {
  position: relative;
}

.status-band .logo {
  width: 56px;
  height: 56px;
}

.status-band .lead {
  max-width: 40em;
}

.status-band .cta-row {
  justify-content: center;
}

.status-facts {
  list-style: none;
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 8px;
  max-width: 760px;
}

.status-facts li {
  padding: 6px 12px;
  border: 1px solid var(--line2);
  border-radius: 999px;
  background: var(--s2);
  color: var(--tx2);
  font-size: var(--fs-xs);
}

.contact-line {
  color: var(--tx2);
  font-size: var(--fs-sm);
}

/* ---------- Legal documents ---------- */

.doc-layout {
  display: grid;
  grid-template-columns: 220px minmax(0, 720px);
  justify-content: center;
  gap: 64px;
  padding-block: 56px 96px;
}

.doc-toc nav {
  position: sticky;
  top: 24px;
  display: flex;
  flex-direction: column;
  gap: 10px;
}

.doc-toc ol {
  list-style: none;
  display: grid;
  border-left: 1px solid var(--line2);
}

.doc-toc a {
  display: block;
  margin-left: -1px;
  padding: 5px 0 5px 14px;
  border-left: 1px solid transparent;
  color: var(--tx2);
  font-size: var(--fs-xs);
  line-height: 1.45;
  text-decoration: none;
  transition: color var(--dur), border-color var(--dur);
}

.doc-toc a:hover {
  border-left-color: var(--apple);
  color: var(--tx);
}

@media (max-width: 960px) {
  .doc-layout {
    grid-template-columns: minmax(0, 1fr);
    gap: 0;
    padding-block: 40px 72px;
  }

  .doc-toc {
    display: none;
  }
}

.doc-head {
  display: flex;
  flex-direction: column;
  gap: 12px;
  margin-bottom: 32px;
}

.doc-head h1 {
  font-size: clamp(2.25rem, 1.6rem + 2.4vw, 3.25rem);
  font-weight: 700;
  line-height: 1.08;
  letter-spacing: -0.02em;
}

.doc-meta {
  color: var(--tx3);
  font-size: var(--fs-sm);
}

.summary {
  display: flex;
  flex-direction: column;
  gap: 14px;
  padding: 24px;
  border-color: rgba(155, 220, 79, 0.3);
}

.summary h2 {
  font-size: 1.125rem;
  font-weight: 650;
}

.summary .ticks {
  font-size: 0.9375rem;
  color: var(--tx);
}

.prose {
  color: var(--tx2);
  font-size: 1rem;
  line-height: 1.75;
}

.prose section {
  scroll-margin-top: 24px;
}

.prose h2 {
  margin: 56px 0 16px;
  font-size: 1.5rem;
  font-weight: 650;
  line-height: 1.25;
  letter-spacing: -0.01em;
}

.prose h3 {
  margin: 28px 0 8px;
  font-family: var(--font-body);
  font-size: 1.0625rem;
  font-weight: 600;
  line-height: 1.4;
}

.prose p + p,
.prose p + ul,
.prose ul + p,
.prose p + .defs,
.prose .defs + p,
.prose p + .callout,
.prose .callout + p,
.prose ul + .callout {
  margin-top: 14px;
}

.prose ul {
  padding-left: 1.25em;
}

.prose ul li + li {
  margin-top: 8px;
}

.prose ul li::marker {
  color: var(--apple-tx);
}

.prose strong {
  color: var(--tx);
  font-weight: 600;
}

.prose a {
  color: var(--sky-tx);
  text-decoration: underline;
  text-decoration-color: rgba(140, 197, 245, 0.45);
  text-underline-offset: 3px;
  overflow-wrap: anywhere;
}

.prose a:hover {
  text-decoration-color: var(--sky-tx);
}

.prose .summary h2 {
  margin: 0;
  font-size: 1.125rem;
}

.prose .ticks {
  padding-left: 0;
}

.prose code {
  padding: 1px 6px;
  border: 1px solid var(--line);
  border-radius: 6px;
  background: var(--s2);
  color: var(--tx);
  font-size: 0.875em;
}

.defs {
  overflow: hidden;
  border: 1px solid var(--line);
  border-radius: var(--r);
  background: var(--s1);
}

.defs > div {
  display: grid;
  grid-template-columns: 190px minmax(0, 1fr);
  gap: 16px;
  padding: 14px 18px;
}

.defs > div + div {
  border-top: 1px solid var(--line);
}

.defs dt {
  color: var(--tx);
  font-weight: 600;
  line-height: 1.55;
}

.defs dd {
  line-height: 1.65;
}

@media (max-width: 600px) {
  .defs > div {
    grid-template-columns: minmax(0, 1fr);
    gap: 4px;
  }
}

.callout {
  padding: 16px 20px;
  border-left: 3px solid var(--apple);
  border-radius: 0 var(--r) var(--r) 0;
  background: var(--s1);
  color: var(--tx);
}

/* ---------- 404 ---------- */

.not-found {
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  gap: 20px;
  max-width: 640px;
  padding-block: clamp(64px, 3rem + 6vw, 128px);
}

.not-found h1 {
  font-size: var(--fs-hero);
  font-weight: 700;
  line-height: 1.05;
  letter-spacing: -0.02em;
}

/* ---------- Footer ---------- */

.site-footer {
  border-top: 1px solid var(--line);
  background: var(--bg);
}

.footer-row {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 8px 24px;
  padding-block: 20px;
  color: var(--tx2);
  font-size: var(--fs-sm);
}

.footer-brand {
  display: flex;
  align-items: center;
  gap: 10px;
  margin-right: auto;
}

.footer-brand .logo {
  width: 20px;
  height: 20px;
}

.footer-nav {
  display: flex;
  flex-wrap: wrap;
  gap: 4px;
}

.footer-nav a {
  display: inline-flex;
  align-items: center;
  min-height: 44px;
  padding: 0 10px;
  border-radius: var(--r-sm);
  color: var(--tx2);
  text-decoration: none;
  transition: color var(--dur), background-color var(--dur);
}

.footer-nav a:hover {
  background: var(--s2);
  color: var(--tx);
}

.footer-nav a[aria-current] {
  color: var(--tx);
}

@media (max-width: 640px) {
  .footer-brand {
    flex: 1 0 100%;
  }

  .footer-nav {
    margin-left: -10px;
  }
}

/* ---------- One-off adjustments (the CSP blocks inline style attributes) ---------- */

.c-apple { color: var(--apple); }
.c-apple-tx { color: var(--apple-tx); }
.c-amber-tx { color: var(--amber-tx); }
.c-tx3 { color: var(--tx3); }

.stack.gap-6 { gap: 6px; }
.stack.gap-24 { gap: 24px; }

.bar .w-70 { width: 70%; }
.bar .w-43 { width: 43%; }
.bar .w-37 { width: 37%; }

.ticks.is-sm {
  font-size: var(--fs-sm);
}

.ev .chip {
  align-self: flex-start;
}

.session-meta .chip,
.ledger .note,
.stats .is-text {
  font-family: var(--font-body);
}

.stats .is-text {
  font-weight: 600;
}

.ledger .dot {
  margin-inline: auto;
}

.modes + p {
  margin-top: 10px;
  font-size: var(--fs-sm);
}

main > .section:last-child {
  border-bottom: 0;
}

/* ---------- Motion preferences ---------- */

@media (prefers-reduced-motion: reduce) {
  *,
  *::before,
  *::after {
    transition: none !important;
    animation: none !important;
    scroll-behavior: auto !important;
  }
}
