/* Flecha landing · Blueprint identity.
   Layout: solid paper, one 1200px column. The drafting grid appears only inside the
   hero's drawing sheet, never behind text. Light and dark bands alternate for rhythm.
   Text colours are checked against WCAG AA (4.5:1) on every surface they sit on. */

:root {
  --paper: #f4f6f9;
  --sheet: #fbfcfd;
  --panel: #ffffff;
  --tint: #e9eef4;
  --ink: #0b2545;
  --text: #1c2b40;
  --muted: #46566b;
  --edge: #d3dbe5;
  --rule: #b9c5d3;
  --grid: rgba(58, 166, 217, 0.12);
  --grid-major: rgba(58, 166, 217, 0.24);
  --mark: #e4572e;
  --mark-text: #b13d16;

  --night: #0b2545;
  --night-panel: #102f57;
  --night-edge: #234675;
  --night-text: #e8eef5;
  --night-muted: #a9bad0;
  --night-mark: #ff8a63;

  --btn-bg: #0b2545;
  --btn-fg: #f4f6f9;
  --code-bg: #071a33;
  --code-fg: #e0e8f2;
  --code-dim: #8fa3bc;

  --display: 'Archivo', -apple-system, BlinkMacSystemFont, 'Helvetica Neue', sans-serif;
  --mono: 'JetBrains Mono', ui-monospace, 'SF Mono', Menlo, monospace;
  --apple: -apple-system, BlinkMacSystemFont, 'Inter', sans-serif;

  --step--1: 0.875rem;
  --step-0: 1.0625rem;
  --step-1: 1.35rem;
  --step-2: clamp(2rem, 3.6vw, 3rem);
  --step-3: clamp(2.5rem, 6.4vw, 5.6rem);
  --col: 1200px;
}

@media (prefers-color-scheme: dark) {
  :root:not([data-theme='light']) {
    --paper: #071426;
    --sheet: #0a1b31;
    --panel: #0d213c;
    --tint: #0a1a2f;
    --ink: #eef2f6;
    --text: #d8e1ec;
    --muted: #a3b2c6;
    --edge: #1d3657;
    --rule: #2b4a72;
    --grid: rgba(58, 166, 217, 0.1);
    --grid-major: rgba(58, 166, 217, 0.2);
    --mark-text: #ff8a63;
    --night: #0e2a4d;
    --night-panel: #133763;
    --btn-bg: #eef2f6;
    --btn-fg: #0b2545;
    --code-bg: #04101f;
    color-scheme: dark;
  }
}
:root[data-theme='dark'] {
  --paper: #071426;
  --sheet: #0a1b31;
  --panel: #0d213c;
  --tint: #0a1a2f;
  --ink: #eef2f6;
  --text: #d8e1ec;
  --muted: #a3b2c6;
  --edge: #1d3657;
  --rule: #2b4a72;
  --grid: rgba(58, 166, 217, 0.1);
  --grid-major: rgba(58, 166, 217, 0.2);
  --mark-text: #ff8a63;
  --night: #0e2a4d;
  --night-panel: #133763;
  --btn-bg: #eef2f6;
  --btn-fg: #0b2545;
  --code-bg: #04101f;
  color-scheme: dark;
}

* { box-sizing: border-box; }

html { scroll-behavior: smooth; scroll-padding-top: 72px; }
@media (prefers-reduced-motion: reduce) { html { scroll-behavior: auto; } }

body {
  margin: 0;
  background: var(--paper);
  color: var(--text);
  font: 400 var(--step-0)/1.6 var(--display);
  -webkit-font-smoothing: antialiased;
}

a { color: inherit; }
code, kbd, pre { font-family: var(--mono); }
p code, li code, dd code, h3 code {
  font-size: 0.86em;
  padding: 0.08em 0.35em;
  border-radius: 4px;
  background: var(--tint);
  border: 1px solid var(--edge);
  white-space: nowrap;
}
kbd {
  display: inline-block;
  font-size: 0.8em;
  line-height: 1.5;
  padding: 0 0.45em;
  border-radius: 5px;
  border: 1px solid var(--rule);
  border-bottom-width: 2px;
  background: var(--panel);
  color: var(--ink);
  white-space: nowrap;
}
:focus-visible { outline: 2px solid var(--mark); outline-offset: 3px; border-radius: 4px; }

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

/* ---- layout primitives ------------------------------------------------- */

.inner {
  max-width: var(--col);
  margin: 0 auto;
  padding-left: max(20px, env(safe-area-inset-left, 0px));
  padding-right: max(20px, env(safe-area-inset-right, 0px));
}
.band { padding-block: clamp(64px, 8vw, 104px); }
.band.tint { background: var(--tint); }
.band.dark {
  background: var(--night);
  color: var(--night-text);
  --ink: #ffffff;
  --text: var(--night-text);
  --muted: var(--night-muted);
  --mark-text: var(--night-mark);
  --edge: var(--night-edge);
  --rule: var(--night-edge);
  --panel: var(--night-panel);
  --tint: var(--night-panel);
}

.eyebrow {
  margin: 0;
  display: flex;
  align-items: center;
  gap: 10px;
  font: 500 0.78rem/1 var(--mono);
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--muted);
}
.eyebrow kbd { letter-spacing: 0; text-transform: none; }

h1, h2, h3 { color: var(--ink); text-wrap: balance; margin: 0; }
h1 {
  font: 700 var(--step-3)/0.95 var(--display);
  font-variation-settings: 'wdth' 118;
  letter-spacing: -0.045em;
}
h2 {
  font: 650 var(--step-2)/1.04 var(--display);
  font-variation-settings: 'wdth' 114;
  letter-spacing: -0.035em;
}
h3 {
  font: 650 var(--step-1)/1.18 var(--display);
  font-variation-settings: 'wdth' 108;
  letter-spacing: -0.02em;
}
.section-head { display: grid; gap: 16px; max-width: 60ch; margin-bottom: 48px; }
.section-head p:not(.eyebrow) { margin: 0; color: var(--muted); }
.section-head.split {
  max-width: none;
  grid-template-columns: minmax(0, 1.4fr) minmax(0, 1fr);
  align-items: end;
  gap: 24px 48px;
}
.section-head.split > div { display: grid; gap: 16px; }
@media (max-width: 860px) { .section-head.split { grid-template-columns: 1fr; } }

.btn {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  height: 48px;
  padding: 0 22px;
  border-radius: 8px;
  background: var(--btn-bg);
  color: var(--btn-fg);
  font: 600 0.97rem/1 var(--display);
  font-variation-settings: 'wdth' 108;
  text-decoration: none;
  border: 1.5px solid var(--btn-bg);
  white-space: nowrap;
  transition: opacity 0.12s ease;
}
.btn:hover { opacity: 0.88; }
.btn-ghost { background: transparent; color: var(--ink); border-color: var(--rule); }
.btn-light { background: #ffffff; color: #0b2545; border-color: #ffffff; }
.btn-ghost-light { background: transparent; color: #ffffff; border-color: rgba(255, 255, 255, 0.4); }
.btn-small { height: 36px; padding: 0 14px; font-size: 0.86rem; }
.btn svg { width: 16px; height: 16px; }
.btn .gh { fill: currentColor; }
.cta-row { display: flex; flex-wrap: wrap; gap: 12px; }

.status {
  display: inline-block;
  font: 600 0.68rem/1 var(--mono);
  letter-spacing: 0.08em;
  text-transform: uppercase;
  padding: 6px 9px;
  border-radius: 99px;
  white-space: nowrap;
}
.status.shipped { color: var(--paper); background: var(--ink); border: 1.5px solid var(--ink); }
.status.next { color: var(--mark-text); border: 1.5px dashed var(--mark); }
.tag { font: 600 0.68rem/1 var(--mono); padding: 6px 8px; border-radius: 6px; border: 1px solid var(--rule); color: var(--muted); }

/* ---- nav --------------------------------------------------------------- */

body::before {
  content: '';
  position: fixed;
  inset: 0 0 auto;
  height: env(safe-area-inset-top, 0px);
  z-index: 11;
  background: var(--paper);
}
.nav {
  position: sticky;
  top: env(safe-area-inset-top, 0px);
  z-index: 10;
  background: color-mix(in srgb, var(--paper) 92%, transparent);
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
  border-bottom: 1px solid var(--edge);
}
.nav-inner {
  max-width: var(--col);
  margin: 0 auto;
  height: 64px;
  display: flex;
  align-items: center;
  gap: 24px;
  padding-left: max(20px, env(safe-area-inset-left, 0px));
  padding-right: max(20px, env(safe-area-inset-right, 0px));
}
.brand { display: flex; align-items: center; gap: 10px; text-decoration: none; color: var(--ink); }
.brand-mark { width: 30px; height: 30px; flex: none; display: block; }
.wordmark {
  font: 650 1.5rem/1 var(--display);
  font-variation-settings: 'wdth' 120;
  letter-spacing: -0.04em;
}
.wordmark.small { font-size: 1.15rem; }
.nav-links { display: flex; gap: 26px; margin-left: auto; font: 500 0.82rem/1 var(--mono); }
.nav-links a { text-decoration: none; color: var(--muted); }
.nav-links a:hover { color: var(--ink); }
.lang { white-space: nowrap; font: 600 0.75rem/1 var(--mono); letter-spacing: 0.06em; color: var(--ink); text-decoration: none; padding: 8px 10px; border: 1px solid var(--rule); border-radius: 8px; }
.lang:hover { border-color: var(--ink); }
@media (max-width: 760px) { .nav-links { display: none; } .nav .lang { margin-left: auto; } .nav-inner { gap: 10px; } }

/* ---- hero -------------------------------------------------------------- */

.hero { padding-block: clamp(48px, 7vw, 88px) clamp(56px, 7vw, 88px); }
.hero-head {
  display: grid;
  grid-template-columns: minmax(0, 1.7fr) minmax(0, 1fr);
  gap: 28px 56px;
  align-items: end;
  margin-bottom: clamp(40px, 5vw, 64px);
}
@media (max-width: 960px) { .hero-head { grid-template-columns: 1fr; } }
.hero-copy { display: grid; gap: 24px; min-width: 0; }
.hero-side { display: grid; gap: 26px; min-width: 0; }
.lede { margin: 0; font-size: 1.2rem; line-height: 1.55; color: var(--muted); }

/* The drawing sheet: frame, zone markers, grid and title block, like an engineering drawing. */
.sheet {
  margin: 0;
  display: grid;
  grid-template-columns: 22px minmax(0, 1fr);
  grid-template-rows: 22px minmax(0, 1fr) auto;
  border: 1.5px solid var(--ink);
  background: var(--sheet);
  box-shadow: 0 1px 0 var(--edge), 0 30px 60px -30px rgba(11, 37, 69, 0.25);
}
.sheet-zones { display: flex; font: 500 10px/1 var(--mono); color: var(--muted); }
.sheet-zones span { flex: 1; display: grid; place-items: center; }
.sheet-zones.top { grid-column: 2; grid-row: 1; border-bottom: 1px solid var(--rule); }
.sheet-zones.top span + span { border-left: 1px solid var(--rule); }
.sheet-zones.left { grid-column: 1; grid-row: 2; flex-direction: column; border-right: 1px solid var(--rule); }
.sheet-zones.left span + span { border-top: 1px solid var(--rule); }
.sheet-body {
  grid-column: 2;
  grid-row: 2;
  padding: 24px;
  min-width: 0;
  background-image:
    linear-gradient(var(--grid-major) 1px, transparent 1px),
    linear-gradient(90deg, var(--grid-major) 1px, transparent 1px),
    linear-gradient(var(--grid) 1px, transparent 1px),
    linear-gradient(90deg, var(--grid) 1px, transparent 1px);
  background-size: 80px 80px, 80px 80px, 16px 16px, 16px 16px;
}
.title-block {
  grid-column: 1 / -1;
  grid-row: 3;
  display: grid;
  grid-template-columns: 1fr 2.2fr 1.2fr 0.6fr;
  border-top: 1.5px solid var(--ink);
  font: 500 0.82rem/1.3 var(--mono);
  color: var(--ink);
  background: var(--sheet);
}
.title-block span { padding: 10px 14px; display: grid; gap: 4px; min-width: 0; }
.title-block span + span { border-left: 1px solid var(--rule); }
.title-block em { font-style: normal; font-size: 0.66rem; letter-spacing: 0.12em; text-transform: uppercase; color: var(--muted); }
@media (max-width: 640px) {
  .sheet { grid-template-columns: 0 minmax(0, 1fr); }
  .sheet-zones { display: none; }
  .sheet-body { padding: 12px; }
  .title-block { grid-template-columns: 1fr 1fr; }
  .title-block span:nth-child(3) { border-left: 0; border-top: 1px solid var(--rule); }
  .title-block span:nth-child(4) { border-top: 1px solid var(--rule); }
}

/* The window is drawn at a fixed size (1200 × 712 canvas) and scaled to fit by main.js. */
.mock-frame { position: relative; width: 100%; overflow: hidden; }
.mock-canvas {
  position: relative;
  width: 1200px;
  height: 712px;
  transform-origin: 0 0;
  transform: scale(var(--s, 1));
}

.dim {
  position: absolute;
  left: 10px;
  top: 4px;
  width: 280px;
  height: 18px;
  display: flex;
  align-items: center;
  font: 600 12px/1 var(--mono);
  color: var(--mark-text);
  border-left: 1.5px solid var(--mark);
  border-right: 1.5px solid var(--mark);
}
.dim::before, .dim::after { content: ''; flex: 1; height: 1.5px; background: var(--mark); }
.dim span { padding: 2px 8px; }

.callout {
  position: absolute;
  left: 1036px;
  width: 164px;
  display: flex;
  gap: 10px;
  font: 600 13px/1.35 var(--display);
  color: var(--ink);
}
.callout b, .balloon {
  display: grid;
  place-items: center;
  width: 26px;
  height: 26px;
  flex: none;
  border-radius: 50%;
  border: 1.5px solid var(--mark);
  background: var(--sheet);
  color: var(--mark-text);
  font: 700 12px/1 var(--mono);
}
.callout small { font: 400 12px/1.4 var(--display); color: var(--muted); }
.callout small code { font-size: 11px; }
.callout kbd { font-size: 11px; }
.c1 { top: 60px; }
.c2 { top: 150px; }
.c3 { top: 240px; }

/* ---- app mockup: mirrors src/renderer/styles.css -------------------------- */

.mock {
  --m-text: #1d1d1f;
  --m-muted: rgba(29, 29, 31, 0.55);
  --m-line: rgba(29, 29, 31, 0.12);
  position: absolute;
  left: 10px;
  top: 36px;
  width: 1000px;
  height: 620px;
  border-radius: 12px;
  overflow: hidden;
  background: var(--space-color);
  color: var(--m-text);
  font: 13px/1.3 var(--apple);
  box-shadow: 0 30px 70px rgba(11, 37, 69, 0.28), 0 0 0 0.5px rgba(11, 37, 69, 0.45);
}
.mock svg {
  width: 16px; height: 16px; fill: none; stroke: currentColor;
  stroke-width: 1.5; stroke-linecap: round; stroke-linejoin: round; flex: none;
}
.m-sidebar {
  position: absolute;
  inset: 0 auto 0 0;
  width: 280px;
  display: flex;
  flex-direction: column;
  gap: 8px;
  padding: 10px 6px 8px 10px;
}
.m-toolbar { display: flex; align-items: center; gap: 12px; height: 28px; color: var(--m-muted); padding-right: 6px; }
.m-toolbar .off { opacity: 0.35; }
.m-lights { display: flex; gap: 8px; width: 58px; padding-left: 4px; }
.m-lights i { width: 12px; height: 12px; border-radius: 50%; background: #ff5f57; }
.m-lights i:nth-child(2) { background: #febc2e; }
.m-lights i:nth-child(3) { background: #28c840; }
.m-spacer { flex: 1; }
.m-urlbar {
  height: 36px; line-height: 36px; padding: 0 12px; border-radius: 10px;
  background: rgba(255, 255, 255, 0.45); white-space: nowrap; overflow: hidden; text-overflow: ellipsis;
}
.m-favs { display: grid; grid-template-columns: repeat(4, 1fr); gap: 6px; }
.m-fav { display: grid; place-items: center; height: 48px; border-radius: 10px; background: rgba(255, 255, 255, 0.3); }
.m-fav.active { background: rgba(255, 255, 255, 0.85); box-shadow: 0 1px 3px rgba(0, 0, 0, 0.1); }
.m-fav .fi { width: 20px; height: 20px; font-size: 12px; }
.m-space { padding: 6px 8px 0; font-weight: 600; color: var(--m-muted); }
.m-rows { flex: 1; display: flex; flex-direction: column; }
.m-row { display: flex; align-items: center; gap: 8px; height: 34px; padding: 0 6px 0 8px; border-radius: 8px; white-space: nowrap; }
.m-row span { flex: 1; overflow: hidden; text-overflow: ellipsis; }
.m-row.indent { margin-left: 14px; }
.m-row.active { background: rgba(255, 255, 255, 0.85); box-shadow: 0 1px 3px rgba(0, 0, 0, 0.08); }
.m-row.muted { color: var(--m-muted); }
.m-row .chev { color: var(--m-muted); transform: rotate(90deg); }
.m-row .plus { width: 16px; text-align: center; font-size: 16px; font-weight: 400; }
.m-badge {
  min-width: 16px; height: 16px; padding: 0 4px; border-radius: 8px;
  background: #e5484d; color: #fff; font: 700 10px/16px var(--apple); text-align: center;
}
.m-divider { display: flex; align-items: center; gap: 8px; margin: 8px 0 4px; padding: 0 4px 0 8px; }
.m-divider span { flex: 1; height: 1px; background: var(--m-line); }
.m-divider em { font-style: normal; font-size: 11px; color: var(--m-muted); }
.fi {
  display: grid; place-items: center; width: 16px; height: 16px; flex: none; border-radius: 3px;
  background: var(--c, rgba(29, 29, 31, 0.45)); color: #fff; font: 700 10px/1 var(--apple); font-style: normal;
}
.fi.local { background: #0b2545; }
.m-footer { display: flex; align-items: center; gap: 4px; height: 28px; color: var(--m-muted); }
.m-footer svg { margin: 0 6px; }
.m-dots { flex: 1; display: flex; justify-content: center; gap: 2px; }
.m-dots i { display: grid; place-items: center; width: 28px; height: 28px; border-radius: 6px; font-size: 14px; font-style: normal; opacity: 0.55; }
.m-dots i.on { opacity: 1; background: rgba(255, 255, 255, 0.4); }

.m-page {
  position: absolute;
  top: 8px; right: 8px; bottom: 8px; left: 284px;
  border-radius: 8px;
  background: #fff;
  box-shadow: 0 1px 4px rgba(0, 0, 0, 0.12);
  padding: 36px 44px;
}
.m-pr { display: flex; flex-direction: column; gap: 14px; max-width: 560px; }
.m-pr-state { align-self: flex-start; padding: 4px 10px; border-radius: 99px; background: #1f883d; color: #fff; font-weight: 600; font-size: 12px; }
.m-pr-title { font: 600 26px/1.2 var(--apple); color: #1f2328; }
.m-line { height: 10px; border-radius: 5px; background: #eaeef2; }
.w50 { width: 50%; } .w60 { width: 60%; } .w70 { width: 70%; } .w80 { width: 80%; } .w90 { width: 90%; }
.m-code { height: 120px; border-radius: 6px; background: #f6f8fa; border: 1px solid #d1d9e0; margin: 6px 0; }
.m-scrim { position: absolute; inset: 0; background: rgba(0, 0, 0, 0.18); }
.m-palette {
  position: absolute;
  left: 180px;
  top: 112px;
  width: 640px;
  border-radius: 14px;
  background: rgba(255, 255, 255, 0.97);
  box-shadow: 0 24px 70px rgba(0, 0, 0, 0.3), 0 0 0 0.5px rgba(0, 0, 0, 0.15);
  overflow: hidden;
}
.m-input { height: 54px; display: flex; align-items: center; padding: 0 18px; font: 17px var(--apple); }
.caret { width: 1.5px; height: 20px; background: #3478f6; margin-left: 1px; animation: blink 1.1s steps(1) infinite; }
@keyframes blink { 50% { opacity: 0; } }
@media (prefers-reduced-motion: reduce) { .caret { animation: none; } }
.m-results { list-style: none; margin: 0; padding: 0 6px 6px; }
.m-results li { display: flex; align-items: center; gap: 10px; height: 40px; padding: 0 12px; border-radius: 8px; }
.m-results li.selected { background: #3478f6; color: #fff; }
.m-results .label, .palette-results .label { flex: 1; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.m-results .sub, .palette-results .sub { font-size: 12px; opacity: 0.7; white-space: nowrap; }
.m-results li.selected .sub, .palette-results li.selected .sub { opacity: 0.9; }

/* Balloons pin the callouts to the drawing. */
.mock-canvas .balloon { position: absolute; }
.b1 { left: 818px; top: 136px; }
.b2 { left: 290px; top: 290px; }
.b3 { left: 140px; top: 668px; }
.b3::before { content: ''; position: absolute; left: 11px; bottom: 26px; width: 1.5px; height: 18px; background: var(--mark); }

/* ---- facts strip ------------------------------------------------------- */

.facts {
  list-style: none;
  margin: 28px 0 0;
  padding: 0;
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  border-top: 1.5px solid var(--ink);
  border-bottom: 1px solid var(--rule);
}
.facts li { display: grid; gap: 2px; padding: 18px 20px 18px 0; min-width: 0; }
.facts li + li { padding-left: 20px; border-left: 1px solid var(--rule); }
.facts strong { color: var(--ink); font: 650 1.1rem/1.2 var(--display); font-variation-settings: 'wdth' 110; }
.facts span { color: var(--muted); font-size: 0.92rem; }
@media (max-width: 860px) {
  .facts { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .facts li:nth-child(3) { padding-left: 0; border-left: 0; }
  .facts li:nth-child(n + 3) { border-top: 1px solid var(--rule); }
}

/* ---- try the command bar --------------------------------------------- */

.try-grid { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1.2fr); gap: 40px 64px; align-items: center; }
.try-grid .section-head { margin-bottom: 0; }
@media (max-width: 960px) { .try-grid { grid-template-columns: 1fr; } }
.grammar { margin: 8px 0 0; display: grid; gap: 0; }
.grammar div { display: flex; gap: 12px; align-items: baseline; padding: 10px 0; border-top: 1px solid var(--edge); min-width: 0; }
.grammar dt { flex: none; width: 96px; }
.grammar dt code { font-size: 0.85rem; color: var(--night-mark); background: none; border: 0; padding: 0; }
.grammar dd { margin: 0; color: var(--muted); font-size: 0.92rem; }

.try-stage { display: grid; gap: 18px; min-width: 0; }
.palette {
  border-radius: 14px;
  background: #fff;
  color: #1d1d1f;
  box-shadow: 0 30px 80px rgba(0, 0, 0, 0.45), 0 0 0 1px rgba(255, 255, 255, 0.08);
  overflow: hidden;
  font: 13px/1.3 var(--apple);
  min-width: 0;
}
.palette-input {
  width: 100%;
  height: 58px;
  padding: 0 20px;
  border: 0;
  outline: none;
  font: 18px var(--apple);
  background: transparent;
  color: #1d1d1f;
  caret-color: #3478f6;
}
.palette-input::placeholder { color: #6e6e73; }
.palette:focus-within { box-shadow: 0 30px 80px rgba(0, 0, 0, 0.45), 0 0 0 2px var(--night-mark); }
.palette-results { list-style: none; margin: 0; padding: 0 6px 6px; min-height: 92px; }
.palette-results li { display: flex; align-items: center; gap: 10px; min-height: 40px; padding: 0 12px; border-radius: 8px; }
.palette-results li.selected { background: #3478f6; color: #fff; }
.palette-results li.empty, .palette-results li.web { color: #5f5f64; }
.palette-results li.web .sub { opacity: 1; }
.palette-results a { color: inherit; text-decoration: none; display: contents; }
.palette-detail {
  margin: 0;
  padding: 12px 20px 16px;
  border-top: 0.5px solid rgba(29, 29, 31, 0.12);
  font: 12px/1.5 ui-monospace, 'SF Mono', Menlo, monospace;
  white-space: pre-wrap;
  word-break: break-all;
  color: #1d1d1f;
}
.chips { display: flex; flex-wrap: wrap; gap: 8px; }
.chips button {
  font: 500 0.82rem/1 var(--mono);
  color: var(--night-text);
  padding: 9px 12px;
  border-radius: 8px;
  border: 1px solid var(--night-edge);
  background: var(--night-panel);
  cursor: pointer;
}
.chips button:hover, .chips button[aria-pressed='true'] { border-color: var(--night-mark); color: #ffffff; }
.try-note { margin: 0; font-size: var(--step--1); color: var(--muted); }

/* ---- dev loop bento ---------------------------------------------------- */

.legend { display: flex; flex-wrap: wrap; align-items: center; gap: 8px 10px; justify-self: end; font-size: 0.9rem; }
@media (max-width: 860px) { .legend { justify-self: start; } }
.bento { display: grid; grid-template-columns: repeat(6, minmax(0, 1fr)); gap: 16px; }
.tile {
  display: flex;
  flex-direction: column;
  gap: 12px;
  padding: 28px;
  border-radius: 12px;
  background: var(--panel);
  border: 1px solid var(--edge);
  min-width: 0;
}
.tile-meta { font: 500 0.8rem/1 var(--mono); color: var(--muted); }
.tile-meta kbd { border: 0; background: none; padding: 0; color: var(--muted); font-size: 1em; }
.tile p { margin: 0; color: var(--muted); font-size: 0.98rem; }
.tile-text { display: flex; flex-direction: column; gap: 12px; }
.tile-meta { display: flex; align-items: center; gap: 10px; }
.t-env { grid-column: span 4; display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1.3fr); gap: 28px; align-items: center; }
.t-split { grid-column: span 2; }
.t-spaces, .t-servers { grid-column: span 3; }
.t-boosts, .t-mcp { grid-column: span 6; display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1.25fr); gap: 36px; align-items: center; }
.t-mcp { background: var(--night); border-color: var(--night); --ink: #ffffff; --muted: var(--night-muted); --tint: var(--night-panel); --edge: var(--night-edge); --mark-text: var(--night-mark); --rule: var(--night-edge); }
.t-mcp p { color: var(--night-muted); }
@media (max-width: 960px) {
  .bento { grid-template-columns: 1fr; }
  .bento > .tile { grid-column: auto; }
  .t-env, .t-boosts, .t-mcp { grid-template-columns: 1fr; gap: 22px; }
}

.env { display: grid; gap: 8px; }
.env-row {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 12px 14px;
  border-radius: 10px;
  border: 1px solid var(--edge);
  background: var(--paper);
  font-size: 0.8rem;
  min-width: 0;
}
.env-row code { flex: 1; min-width: 0; overflow-wrap: anywhere; color: var(--ink); }
.env-row b { font-weight: 400; color: var(--muted); }
.env-row:not(.on) code { color: var(--muted); }
.env-row.on { border-color: var(--ink); box-shadow: 0 0 0 1px var(--ink); background: var(--panel); }
.env-tag { font: 600 0.66rem/1 var(--mono); text-transform: uppercase; letter-spacing: 0.08em; padding: 6px 0; border-radius: 5px; width: 84px; text-align: center; flex: none; }
.env-tag.local { background: #46566b; color: #ffffff; }
.env-tag.staging { background: #3aa6d9; color: #0b2545; }
.env-tag.prod { background: #c4461f; color: #ffffff; }

.devices { margin-top: auto; padding-top: 12px; display: flex; gap: 10px; align-items: flex-end; height: 150px; }
.devices > div { display: flex; flex-direction: column; gap: 6px; padding: 8px; border: 1.5px solid var(--ink); border-radius: 8px; height: 100%; background: var(--paper); }
.d-desk { flex: 1; }
.d-phone { width: 58px; border-radius: 14px !important; }
.d-bar { height: 6px; width: 40%; border-radius: 3px; background: var(--rule); }
.d-hero { height: 40px; border-radius: 4px; background: #cdd9f7; }
.d-cols { display: grid; grid-template-columns: repeat(3, 1fr); gap: 6px; flex: 1; }
.d-cols i, .d-phone > i { display: block; border-radius: 4px; background: var(--tint); border: 1px solid var(--edge); }
.d-phone > i { height: 22px; }

.spaces-demo { margin-top: auto; padding-top: 8px; display: grid; gap: 8px; }
.spaces-demo span { display: flex; align-items: center; gap: 10px; padding: 12px 14px; border-radius: 10px; font-weight: 600; color: #1d1d1f; }
.spaces-demo .s-work { background: #cdd9f7; }
.spaces-demo .s-client { background: #d3eed8; }
.spaces-demo i { font-style: normal; }
.spaces-demo code { margin-left: auto; font-size: 0.8rem; font-weight: 500; color: #3a4656; }

.servers { margin-top: auto; padding-top: 8px; display: grid; gap: 6px; font: 0.86rem/1 var(--mono); }
.servers span { display: flex; align-items: center; gap: 10px; padding: 11px 12px; border-radius: 8px; border: 1px solid var(--edge); background: var(--paper); color: var(--ink); }
.servers em { font-style: normal; color: var(--muted); }
.servers .dot { width: 8px; height: 8px; border-radius: 50%; background: #1f9d3a; }
.servers b { margin-left: auto; min-width: 20px; height: 20px; border-radius: 10px; background: #d93036; color: #fff; font: 700 11px/20px var(--apple); text-align: center; }

.code, .term {
  margin: 0;
  padding: 22px 24px;
  border-radius: 12px;
  background: var(--code-bg);
  color: var(--code-fg);
  font: 0.85rem/1.7 var(--mono);
  white-space: pre-wrap;
  overflow-wrap: anywhere;
  min-width: 0;
}
.code code { white-space: inherit; }
.code .c { color: var(--code-dim); }
.code .k { color: #7cc7ec; }
.code .s { color: #ffb59a; }
.term { padding-top: 0; border: 1px solid var(--night-edge); }
.term-bar { display: flex; align-items: center; gap: 6px; margin: 0 -24px 14px; padding: 12px 16px; border-bottom: 1px solid var(--night-edge); color: var(--code-dim); font-size: 0.75rem; }
.term-bar i { width: 10px; height: 10px; border-radius: 50%; background: #2b4a72; }
.term-bar span { margin-left: 8px; }
.term p { margin: 0; color: var(--code-fg); font-size: inherit; }
.term .p { color: var(--night-mark); }
.term .t { color: #7cc7ec; }
.term .t span { color: var(--code-dim); margin-left: 6px; }
.term .a { margin-top: 10px; color: var(--code-fg); }
.term .a code { background: rgba(255, 255, 255, 0.08); border-color: transparent; color: #ffffff; }

/* ---- privacy ----------------------------------------------------------- */

.privacy { border-top: 1px solid var(--edge); }
.privacy-grid { display: grid; grid-template-columns: minmax(0, 0.9fr) minmax(0, 1.5fr); gap: 40px; align-items: start; }
@media (max-width: 960px) { .privacy-grid { grid-template-columns: 1fr; } }
.ledger {
  padding: 26px 26px 22px;
  border-radius: 4px;
  background: var(--panel);
  border: 1px solid var(--edge);
  font-family: var(--mono);
}
.ledger-head { margin: 0 0 6px; display: flex; justify-content: space-between; font-size: 0.72rem; letter-spacing: 0.12em; text-transform: uppercase; color: var(--muted); }
.ledger ul { list-style: none; margin: 0; padding: 0; }
.ledger li { display: flex; justify-content: space-between; gap: 16px; padding: 14px 0; border-bottom: 1px dashed var(--rule); color: var(--ink); font-size: 0.95rem; }
.ledger li b { font-size: 1.5rem; line-height: 1; font-weight: 700; color: var(--ink); }
.ledger-foot { margin: 14px 0 0; font-size: 0.8rem; line-height: 1.55; color: var(--muted); }
.privacy-points { list-style: none; margin: 0; padding: 0; display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 0 32px; }
.privacy-points li { display: grid; gap: 8px; padding: 22px 0; border-top: 1.5px solid var(--ink); align-content: start; }
.privacy-points li:nth-child(n + 3) { border-top-width: 1px; border-top-color: var(--rule); }
.privacy-points h3 { font-size: 1.15rem; }
.privacy-points p { margin: 0; color: var(--muted); font-size: 0.97rem; }
@media (max-width: 640px) {
  .privacy-points { grid-template-columns: 1fr; }
  .privacy-points li:nth-child(2) { border-top-width: 1px; border-top-color: var(--rule); }
}
.aside { margin: 0; color: var(--muted); }

/* ---- shortcuts --------------------------------------------------------- */

.keys { list-style: none; margin: 0; padding: 0; display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 10px; }
.keys li {
  display: flex;
  align-items: center;
  gap: 14px;
  padding: 14px 16px;
  border-radius: 10px;
  background: var(--panel);
  border: 1px solid var(--edge);
  color: var(--ink);
  font-weight: 500;
  font-size: 0.95rem;
  min-width: 0;
}

.kc { display: flex; gap: 4px; flex: none; }
.kc kbd { min-width: 30px; height: 30px; display: grid; place-items: center; font-size: 0.85rem; border-radius: 7px; background: var(--paper); }
@media (max-width: 1000px) { .keys { grid-template-columns: repeat(3, minmax(0, 1fr)); } }
@media (max-width: 760px) { .keys { grid-template-columns: repeat(2, minmax(0, 1fr)); } }
@media (max-width: 480px) { .keys { grid-template-columns: 1fr; } }

/* ---- Arc --------------------------------------------------------------- */

.arc-grid { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1.1fr); gap: 48px 64px; align-items: center; }
.arc-grid .section-head { margin-bottom: 0; }
@media (max-width: 960px) { .arc-grid { grid-template-columns: 1fr; } }
.import-path { display: flex; align-items: center; gap: 8px; color: var(--muted); }
.import-path kbd { font-size: 0.85rem; padding: 2px 8px; }
.migrate {
  display: grid;
  grid-template-columns: minmax(0, 1fr) 64px minmax(0, 1fr);
  align-items: center;
  gap: 16px;
  padding: 28px;
  border-radius: 12px;
  background: var(--panel);
  border: 1px solid var(--edge);
}
.mig-col ul { list-style: none; margin: 0; padding: 0; display: grid; gap: 6px; }
.mig-col li { display: flex; align-items: center; gap: 10px; padding: 10px 12px; border-radius: 8px; background: var(--tint); color: var(--ink); font-size: 0.92rem; min-width: 0; }
.mig-col li i { font-style: normal; width: 18px; text-align: center; flex: none; }
.mig-col.flecha li { background: #cdd9f7; color: #0b2545; }
.mig-head { margin: 0 0 10px; font: 600 0.75rem/1 var(--mono); letter-spacing: 0.12em; text-transform: uppercase; color: var(--muted); }
.mig-arrow { width: 64px; height: 24px; fill: none; stroke: var(--mark); stroke-width: 2; }
.mig-arrow .fill { fill: var(--mark); stroke: none; }
.mig-note { grid-column: 1 / -1; margin: 6px 0 0; font-size: 0.85rem; color: var(--muted); }
@media (max-width: 520px) {
  .migrate { grid-template-columns: 1fr; padding: 20px; }
  .mig-arrow { transform: rotate(90deg); justify-self: center; }
}

/* ---- open source ------------------------------------------------------- */

.source-grid { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); gap: 48px 64px; align-items: center; }
.source-copy { display: grid; gap: 20px; }
.source-copy p:not(.eyebrow) { margin: 0; color: var(--muted); max-width: 46ch; }
@media (max-width: 960px) { .source-grid { grid-template-columns: 1fr; } }
.shell { border-radius: 14px; background: var(--code-bg); color: var(--code-fg); overflow: hidden; min-width: 0; border: 1px solid var(--night-edge); box-shadow: 0 30px 80px rgba(0, 0, 0, 0.35); }
.shell-bar { display: flex; align-items: center; justify-content: space-between; padding: 10px 14px; border-bottom: 1px solid var(--night-edge); font: 0.75rem/1 var(--mono); color: var(--code-dim); }
.copy { font: 600 0.75rem/1 var(--mono); color: var(--code-fg); background: rgba(255, 255, 255, 0.1); border: 0; padding: 7px 11px; border-radius: 6px; cursor: pointer; }
.copy:hover { background: rgba(255, 255, 255, 0.18); }
.shell pre { margin: 0; padding: 20px 20px 8px; font: 0.9rem/1.75 var(--mono); white-space: pre-wrap; overflow-wrap: anywhere; }
.shell .shell-note { margin: 0; padding: 0 20px 18px; font-size: 0.8rem; color: var(--code-dim); }

/* ---- footer ------------------------------------------------------------ */

.foot { border-top: 1px solid var(--edge); }
.foot-inner { display: flex; flex-wrap: wrap; align-items: center; gap: 12px 28px; padding-block: 28px calc(28px + env(safe-area-inset-bottom, 0px)); font: 0.8rem/1 var(--mono); color: var(--muted); }
.foot-inner .brand-mark { width: 24px; height: 24px; }
.foot-inner > a:last-child { margin-left: auto; text-decoration: none; }
.foot-inner > a:last-child:hover { color: var(--ink); }

/* ---- local architecture diagram --------------------------------------- */

.arch {
  margin: 0 0 48px;
  display: grid;
  grid-template-columns: minmax(0, 2.1fr) 120px minmax(0, 1fr);
  align-items: stretch;
}
.arch-mac {
  position: relative;
  display: grid;
  grid-template-columns: minmax(0, 1.25fr) minmax(0, 1fr);
  gap: 16px;
  padding: 36px 20px 20px;
  border: 1.5px dashed var(--ink);
  border-radius: 18px;
  background: var(--tint);
}
.arch-label {
  position: absolute;
  top: -11px;
  left: 18px;
  padding: 0 8px;
  background: var(--paper);
  font: 600 0.72rem/22px var(--mono);
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--ink);
}
.node {
  padding: 16px 18px;
  border-radius: 12px;
  background: var(--panel);
  border: 1px solid var(--edge);
  display: grid;
  gap: 6px;
  align-content: start;
  min-width: 0;
}
.node-title { margin: 0; display: flex; align-items: center; gap: 8px; font: 650 1rem/1.25 var(--display); color: var(--ink); }
.node-title .node-mark { width: 22px; height: 22px; display: block; }
.node-sub { margin: 0; font-size: 0.88rem; color: var(--muted); }
.node-main ul { list-style: none; margin: 4px 0 0; padding: 0; display: grid; gap: 0; }
.node-main li { display: flex; flex-wrap: wrap; justify-content: space-between; gap: 2px 12px; padding: 9px 0; border-top: 1px solid var(--edge); font-size: 0.9rem; color: var(--text); }
.node-main li code { font-size: 0.78rem; color: var(--muted); }
.arch-locals { display: grid; gap: 16px; align-content: start; }
.arch-wire {
  position: relative;
  display: grid;
  place-items: center;
  align-self: center;
  height: 60px;
}
.arch-wire::before { content: ''; position: absolute; left: 0; right: 8px; top: 50%; height: 1.5px; background: var(--ink); }
.arch-wire::after { content: ''; position: absolute; right: 0; top: calc(50% - 6px); border: 6px solid transparent; border-left: 10px solid var(--ink); border-right: 0; }
.arch-wire em { position: relative; top: 20px; font: 500 0.7rem/1.2 var(--mono); font-style: normal; color: var(--muted); text-align: center; }
.packets { position: absolute; left: 0; right: 12px; top: calc(50% - 3px); height: 6px; overflow: hidden; }
.packets::before {
  content: '';
  position: absolute;
  inset: 0 auto 0 0;
  width: 200%;
  background: radial-gradient(circle at 3px 3px, var(--mark) 2.5px, transparent 3px) 0 0 / 30px 6px repeat-x;
}
@keyframes packets { to { transform: translateX(30px); } }
.arch-out { display: grid; gap: 16px; align-content: center; }
.node-web { border-color: var(--ink); }
.node-none { border-style: dashed; background: transparent; }
.node-none .node-title { text-decoration: line-through; text-decoration-color: var(--mark); text-decoration-thickness: 2px; }
@media (max-width: 960px) {
  .arch { grid-template-columns: 1fr; }
  .arch-wire { height: 72px; }
  .arch-wire::before { left: 50%; right: auto; top: 0; bottom: 8px; width: 1.5px; height: auto; }
  .arch-wire::after { left: calc(50% - 6px); right: auto; top: auto; bottom: 0; border: 6px solid transparent; border-top: 10px solid var(--ink); border-bottom: 0; }
  .arch-wire { width: 100%; }
  .arch-wire em { position: absolute; top: 50%; transform: translateY(-50%); left: calc(50% + 16px); right: 0; text-align: left; }
  .packets { display: none; }
}
@media (max-width: 640px) { .arch-mac { grid-template-columns: 1fr; } }

.source-icon { width: 132px; height: 132px; filter: drop-shadow(0 18px 30px rgba(0, 0, 0, 0.35)); }

/* ---- motion ------------------------------------------------------------- */

.d-desk > *, .d-phone > * { animation: synced-scroll 7s ease-in-out infinite; }
@keyframes synced-scroll {
  0%, 20% { transform: translateY(0); }
  45%, 70% { transform: translateY(-26px); }
  95%, 100% { transform: translateY(0); }
}
.devices > div { overflow: hidden; }

@keyframes badge {
  0% { box-shadow: 0 0 0 0 rgba(217, 48, 54, 0.55); }
  70%, 100% { box-shadow: 0 0 0 7px rgba(217, 48, 54, 0); }
}

.env-row { transition: border-color 0.3s, box-shadow 0.3s, background-color 0.3s; }
.env-row kbd { transition: opacity 0.3s; }
.env-row:not(.on) kbd { opacity: 0; }

.mig-arrow .dot { display: none; }
@keyframes travel {
  0% { transform: translateX(0); opacity: 0; }
  15% { opacity: 1; }
  80% { opacity: 1; }
  100% { transform: translateX(40px); opacity: 0; }
}

.m-results li { transition: opacity 0.2s; }
.m-results.swapping li { opacity: 0; }

@media (prefers-reduced-motion: reduce) {
  .d-desk > *, .d-phone > *, .servers b, .m-badge, .mig-arrow .dot, .packets::before { animation: none; }
  .mig-arrow .dot { opacity: 0; }
}

.credit { color: var(--ink); }
.heart { display: inline-block; }
@keyframes beat { 50% { transform: scale(1.25); } }
@media (prefers-reduced-motion: reduce) { .credit:hover .heart { animation: none; } }
@media (max-width: 480px) { .hide-sm { display: none; } }

/* ---- round 4: download, browser bento, Chromium layers, repo tree, legal --- */

.btn .dl { fill: none; stroke: currentColor; stroke-width: 1.6; stroke-linecap: round; stroke-linejoin: round; }
.cta-note { margin: -10px 0 0; font: 500 0.78rem/1.4 var(--mono); color: var(--muted); }

.t-third { grid-column: span 2; }
@media (max-width: 960px) { .t-third { grid-column: auto; } }
.ill { height: 150px; border-radius: 12px; background: var(--paper); border: 1px solid var(--edge); position: relative; overflow: hidden; margin-bottom: 6px; }

.ill-flechinha { display: grid; place-items: center; background: linear-gradient(135deg, var(--tint), var(--paper)); }
.fl-win { width: 74%; border-radius: 10px; background: var(--panel); border: 1px solid var(--rule); box-shadow: 0 14px 30px -12px rgba(11, 37, 69, 0.35); overflow: hidden; }
.fl-bar { display: flex; align-items: center; gap: 6px; padding: 7px 8px; border-bottom: 1px solid var(--edge); font: 500 9px/1 var(--mono); color: var(--muted); }
.fl-lights { display: flex; gap: 3px; }
.fl-lights i { width: 6px; height: 6px; border-radius: 50%; background: #ff5f57; }
.fl-lights i:nth-child(2) { background: #febc2e; }
.fl-lights i:nth-child(3) { background: #28c840; }
.fl-url { flex: 1; overflow: hidden; white-space: nowrap; text-overflow: ellipsis; }
.fl-btn { padding: 3px 6px; border-radius: 5px; background: var(--ink); color: var(--paper); font-weight: 600; white-space: nowrap; }
.fl-page { display: grid; gap: 6px; padding: 10px; }
.fl-page i { display: block; height: 8px; border-radius: 4px; background: var(--tint); }
.fl-page i:first-child { height: 28px; background: #cdd9f7; }
@keyframes float { 50% { transform: translateY(-5px); } }

.pk-page { position: absolute; inset: 12px; display: grid; gap: 8px; align-content: start; }
.pk-page i { display: block; height: 10px; border-radius: 5px; background: var(--tint); }
.pk-page i:first-child { height: 34px; }
.pk-card { position: absolute; left: 22%; right: 12%; top: 26px; bottom: -6px; border-radius: 12px; background: var(--panel); border: 1px solid var(--rule); box-shadow: 0 18px 40px -10px rgba(11, 37, 69, 0.4); display: grid; gap: 8px; align-content: start; padding: 10px; animation: peek 6s ease-in-out infinite; }
.pk-bar { height: 12px; width: 60%; border-radius: 6px; background: var(--rule); }
.pk-card i { display: block; height: 30px; border-radius: 6px; background: #d3eed8; }
.pk-card i + i { height: 8px; background: var(--tint); }
@keyframes peek { 0%, 12% { transform: translateY(110%); } 28%, 80% { transform: translateY(0); } 96%, 100% { transform: translateY(110%); } }

.ill-split { display: grid; grid-template-columns: 1.3fr 1fr; grid-template-rows: 1fr 1fr; gap: 6px; padding: 8px; }
.ill-split span { border-radius: 8px; background: var(--panel); border: 1px solid var(--rule); }
.ill-split span:first-child { grid-row: span 2; background: #cdd9f7; border-color: transparent; animation: divider 6s ease-in-out infinite; }
@keyframes divider { 50% { margin-right: -22px; } }

#browser .basics-list { margin-top: 32px; }
.basics-list kbd { font-size: 0.75em; }

.chromium-grid { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); gap: 40px 64px; align-items: center; }
.chromium-grid .section-head { margin-bottom: 0; }
@media (max-width: 960px) { .chromium-grid { grid-template-columns: 1fr; } }
.stack { margin: 0; display: grid; gap: 10px; }
.layer { padding: 20px 22px; border-radius: 12px; border: 1px solid var(--night-edge); display: grid; gap: 6px; }
.layer-name { margin: 0; display: flex; flex-wrap: wrap; align-items: baseline; gap: 6px 12px; font: 650 1.1rem/1.2 var(--display); color: #ffffff; }
.layer-name code { font-size: 0.75rem; color: var(--night-muted); background: none; border: 0; padding: 0; }
.layer-sub { margin: 0; font: 0.84rem/1.5 var(--mono); color: var(--night-muted); }
.l-shell { background: #eef2f6; border-color: #eef2f6; }
.l-shell .layer-name { color: #0b2545; }
.l-shell .layer-name code, .l-shell .layer-sub { color: #46566b; }
.l-patches { border-style: dashed; border-color: var(--night-mark); margin-inline: 14px; }
.l-patches .layer-name code { color: var(--night-mark); }
.l-chromium { background: var(--night-panel); margin-inline: 28px; }

.files { display: grid; gap: 10px; min-width: 0; }
.files-path { margin: 0; font: 600 0.8rem/1 var(--mono); color: var(--muted); }

.tools { list-style: none; margin: 4px 0 0; padding: 0; display: flex; flex-wrap: wrap; gap: 6px; }
.tools li { font: 500 0.75rem/1 var(--mono); padding: 6px 8px; border-radius: 6px; border: 1px solid var(--night-edge); color: var(--night-text); }
.term .dim-line { color: var(--code-dim); margin-bottom: 10px; overflow-wrap: anywhere; }

.shell-bar span + span { padding: 4px 8px; border-radius: 6px; background: rgba(255, 255, 255, 0.08); }
.tree { margin: 0; padding: 20px; font: 0.88rem/1.75 var(--mono); white-space: pre-wrap; overflow-wrap: anywhere; color: var(--code-fg); }
.tree .d { color: #7cc7ec; }
.tree .c { color: var(--code-dim); }

.mig-col li span b { color: var(--ink); font-weight: 650; }
.mig-col.flecha li span b { color: #0b2545; }
.mig-col li { align-items: flex-start; line-height: 1.45; }

.aside a, .legal a { color: var(--ink); text-decoration-color: var(--mark); text-underline-offset: 3px; }
.foot-links { display: flex; flex-wrap: wrap; gap: 8px 20px; margin-left: auto; }
.foot-links a { text-decoration: none; }
.foot-links a:hover { color: var(--ink); }

@media (prefers-reduced-motion: reduce) {
  .fl-win, .pk-card, .ill-split span:first-child { animation: none; }
}

.term { white-space: normal; }
.basics-list { list-style: none; margin: 0; padding: 0; display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 0 32px; }
.basics-list li { display: grid; gap: 4px; align-content: start; padding: 18px 0; border-top: 1px solid var(--rule); }
.basics-list strong { color: var(--ink); font-weight: 650; }
.basics-list span { color: var(--muted); font-size: 0.95rem; }
@media (max-width: 860px) { .basics-list { grid-template-columns: repeat(2, minmax(0, 1fr)); } }
@media (max-width: 520px) { .basics-list { grid-template-columns: 1fr; } }

/* ---- legal pages -------------------------------------------------------- */

.legal-page { padding-block: clamp(48px, 7vw, 88px) clamp(64px, 8vw, 104px); }
.legal-grid { display: grid; gap: 40px; max-width: 820px; }
.legal-head { display: grid; gap: 16px; }
.legal-head h1 { font-size: clamp(2.4rem, 5vw, 3.6rem); }
.legal-updated { margin: 0; font: 500 0.8rem/1 var(--mono); color: var(--muted); }
.legal { color: var(--text); font-size: 1.02rem; line-height: 1.7; }
.legal > * + * { margin-top: 16px; }
.legal h2 { margin-top: 48px; padding-top: 20px; border-top: 1.5px solid var(--ink); font-size: 1.45rem; scroll-margin-top: 80px; }
.legal h3 { margin-top: 28px; font-size: 1.1rem; }
.legal p, .legal ul { margin-block: 0; max-width: 68ch; }
.legal h2 + p, .legal h3 + p, .legal p + ul, .legal h2 + ul { margin-top: 12px; }
.legal ul { padding-left: 1.2em; display: grid; gap: 8px; }
.legal li::marker { color: var(--mark); }
.legal strong { color: var(--ink); }
.legal-summary { padding: 24px 28px; border-radius: 14px; background: var(--panel); border: 1px solid var(--edge); }
.legal-summary h2 { margin: 0 0 12px; padding: 0; border: 0; font-size: 1.1rem; }

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

.not-found { min-height: 100vh; display: grid; align-items: center; padding-block: 64px; }
.nf-inner { display: grid; gap: 20px; justify-items: start; }
.nf-mark { width: 88px; height: 88px; display: block; }

/* ---- product footer ----------------------------------------------------- */

.foot { border-top: 1px solid var(--edge); background: var(--paper); }
.foot-grid {
  display: grid;
  grid-template-columns: minmax(0, 1.4fr) minmax(0, 2fr);
  gap: 40px 64px;
  padding-block: 56px 40px;
}
.foot-brand { display: grid; gap: 12px; align-content: start; }
.foot-brand p { margin: 0; color: var(--muted); font-size: 0.95rem; }
.foot-brand .credit { display: flex; align-items: center; gap: 6px; color: var(--muted); font-size: 0.9rem; }
.credit a { color: var(--ink); font-weight: 600; text-decoration: underline; text-decoration-color: var(--rule); text-underline-offset: 3px; }
.credit a:hover { text-decoration-color: var(--ink); }
.heart { width: 14px; height: 14px; fill: var(--mark); flex: none; }
.foot-cols { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 24px; }
.foot-head { margin: 0 0 12px; font: 600 0.75rem/1 var(--mono); letter-spacing: 0.1em; text-transform: uppercase; color: var(--ink); }
.foot-col ul { list-style: none; margin: 0; padding: 0; display: grid; gap: 10px; }
.foot-col a { color: var(--muted); text-decoration: none; font-size: 0.93rem; }
.foot-col a:hover { color: var(--ink); }
.foot-base {
  display: flex;
  flex-wrap: wrap;
  justify-content: space-between;
  gap: 8px 24px;
  padding-block: 20px calc(24px + env(safe-area-inset-bottom, 0px));
  border-top: 1px solid var(--edge);
  font-size: 0.82rem;
  color: var(--muted);
}
@media (max-width: 760px) {
  .foot-grid { grid-template-columns: 1fr; }
  .foot-cols { grid-template-columns: repeat(2, minmax(0, 1fr)); }
}

.packets { display: none; }

/* ---- import table ------------------------------------------------------- */

.migrate { display: block; }
.import-table { width: 100%; border-collapse: collapse; font-size: 0.92rem; table-layout: fixed; }
.import-table th, .import-table td { padding: 14px 8px; border-bottom: 1px solid var(--edge); text-align: center; vertical-align: middle; }
.import-table thead th { font: 600 0.7rem/1.3 var(--mono); letter-spacing: 0.06em; text-transform: uppercase; color: var(--muted); border-bottom-color: var(--rule); }
.import-table th:first-child { text-align: left; width: 34%; padding-left: 0; }
.import-table tbody th { font-weight: 600; color: var(--ink); }
.import-table .yes { width: 18px; height: 18px; fill: none; stroke: var(--ink); stroke-width: 2; stroke-linecap: round; stroke-linejoin: round; }
.import-table .no { color: var(--rule); }
.migrate .mig-note { margin-top: 16px; }
@media (max-width: 520px) {
  .import-table { font-size: 0.82rem; }
  .import-table thead th { font-size: 0.6rem; letter-spacing: 0; }
  .import-table th, .import-table td { padding: 12px 4px; }
}

/* ---- reveal ------------------------------------------------------------- */

.reveal { opacity: 0; transform: translateY(14px); transition: opacity 0.6s ease var(--delay, 0ms), transform 0.6s cubic-bezier(0.2, 0.7, 0.2, 1) var(--delay, 0ms); }
.reveal.in { opacity: 1; transform: none; }

/* ---- hover reactions ---------------------------------------------------- */

.tile, .keys li, .node, .layer, .env-row, .chips button, .ledger, .migrate, .shell, .ill > *, .foot-col a, .nav-links a, .lang, .btn svg, .brand-mark, .import-table tbody tr, .basics-list li, .facts li {
  transition: transform 0.25s cubic-bezier(0.2, 0.7, 0.2, 1), box-shadow 0.25s ease, border-color 0.2s ease, background-color 0.2s ease, color 0.2s ease, opacity 0.2s ease;
}
.ill { transition: transform 0.4s cubic-bezier(0.2, 0.7, 0.2, 1); }

@media (hover: hover) {
  .tile:hover { transform: translateY(-3px); border-color: var(--rule); box-shadow: 0 18px 40px -22px rgba(11, 37, 69, 0.35); }
  .t-mcp:hover { box-shadow: 0 24px 50px -24px rgba(0, 0, 0, 0.6); }
  .tile:hover .ill { transform: scale(1.02); }
  .tile:hover .fl-win { transform: translateY(-4px); }
  .tile:hover .ill-split span:first-child { animation-play-state: paused; }

  .btn:hover { opacity: 1; }
  .btn:not(.btn-ghost):not(.btn-ghost-light):hover { box-shadow: 0 8px 22px -10px rgba(11, 37, 69, 0.55); }
  .btn-ghost:hover { border-color: var(--ink); }
  .btn-ghost-light:hover { border-color: #ffffff; }
  .btn:hover .dl { animation: nudge 0.6s ease; }

  .nav-links a, .foot-col a { background: linear-gradient(currentColor, currentColor) 0 100% / 0 1px no-repeat; transition: background-size 0.25s ease, color 0.2s ease; padding-bottom: 2px; }
  .nav-links a:hover, .foot-col a:hover { background-size: 100% 1px; }

  .brand:hover .brand-mark { transform: rotate(-8deg) scale(1.05); }

  .keys li:hover { border-color: var(--rule); }
  .keys li:hover .kc kbd { transform: translateY(1px); border-bottom-width: 1px; margin-bottom: 1px; }
  .kc kbd { transition: transform 0.12s ease, border-bottom-width 0.12s ease; }

  .env-row:hover { border-color: var(--rule); }
  .node:hover { border-color: var(--ink); transform: translateY(-2px); }
  .node-none:hover { border-color: var(--mark); }
  .layer:hover { transform: translateX(6px); }
  .chips button:hover { transform: translateY(-2px); }
  .import-table tbody tr:hover { background: var(--tint); }
  .basics-list li:hover { border-top-color: var(--ink); }
  .facts li:hover strong { color: var(--mark-text); }
  .privacy-points li:hover h3 { color: var(--mark-text); }
  .privacy-points h3 { transition: color 0.2s ease; }
  .facts strong { transition: color 0.2s ease; }

  /* The drawing: hovering a note lights up its balloon. */
  .mock-canvas .balloon { transition: transform 0.25s ease, background-color 0.25s ease, color 0.25s ease; }
  .mock-canvas:has(.c1:hover) .b1,
  .mock-canvas:has(.c2:hover) .b2,
  .mock-canvas:has(.c3:hover) .b3 { transform: scale(1.35); background: var(--mark); color: #ffffff; }
  .callout { cursor: default; }
  .callout b { transition: background-color 0.2s ease, color 0.2s ease; }
  .callout:hover b { background: var(--mark); color: #ffffff; }

  .source-icon { transition: transform 0.6s cubic-bezier(0.2, 0.7, 0.2, 1); }
  .source-icon:hover { transform: rotate(-6deg) scale(1.04); }
}

@keyframes nudge { 40% { transform: translateY(2px); } }

@media (prefers-reduced-motion: reduce) {
  .tile:hover, .node:hover, .layer:hover, .chips button:hover, .source-icon:hover, .brand:hover .brand-mark { transform: none; }
  .btn:hover .dl { animation: none; }
}
