/* MailLama website on Meridian: islands on a neutral ground, violet spent on
   intent, Inter for chrome and a serif for message bodies, as in the app.
   Colours are Meridian's tokens with the `crossproton` brand (light and dark).
   The ivory Lama only ever sits on the brand ground (--brand); everywhere
   else the family signature is painted in ink-faint. Pages work without
   JavaScript; site.js adds the hero scene and the interactive models. */

:root,
.window[data-theme="light"] {
  --ground: #E8ECEE;
  --ground-hover: #DCE2E5;
  --pane: #FFFFFF;
  --pane-alt: #F6F8F9;
  --pane-hover: #EEF2F4;
  --raised: #FFFFFF;
  --ink: #0F1B21;
  --ink-muted: #52616A;
  --ink-faint: #8795A0;
  --line: #D8DFE3;
  --line-strong: #C3CCD1;
  --control-edge: #85929A;
  --accent: #6D4AFF;
  --accent-hover: #5B38F0;
  --on-accent: #FFFFFF;
  --accent-soft: #EEEAFF;
  --accent-ink: #5636DC;
  --focus: #6D4AFF;
  --unread: rgba(109, 74, 255, 0.05);
  --spark: #DDE300;
  --success: #16733A;
  --success-bg: #E6F4EA;
  --warning: #9A5B00;
  --warning-bg: #FDF1DC;
  --danger: #B42318;
  --danger-bg: #FCEBEA;
  --series-1: #1F6FD6;
  --series-2: #0B8A7A;
  --series-3: #B26A00;
  --series-4: #D4521E;
  --series-5: #C7306B;
  --series-6: #7A55D3;
  --series-7: #0784A8;
  --series-8: #5D8A12;
  --shadow-pane: 0 0 0 1px rgba(15, 27, 33, 0.07), 0 1px 2px rgba(15, 27, 33, 0.05);
  --shadow-float: 0 0 0 1px rgba(15, 27, 33, 0.09), 0 16px 40px -12px rgba(15, 27, 33, 0.28);
  --shadow-control: 0 1px 0 rgba(15, 27, 33, 0.06);
  color-scheme: light;
}

:root {
  color-scheme: light dark;
  --brand: #6D4AFF;
  --ivory: #FFF8EB;
  --graphite: #17171E;
  --sans: "Inter", -apple-system, BlinkMacSystemFont, "Segoe UI", system-ui, sans-serif;
  --reading: ui-serif, Georgia, "Times New Roman", serif;
  --mono: "JetBrains Mono", ui-monospace, Menlo, Consolas, monospace;
  --radius-xs: 4px;
  --radius-sm: 6px;
  --radius-md: 10px;
  --radius-lg: 14px;
  --radius-xl: 22px;
  --ease-standard: cubic-bezier(0.2, 0, 0, 1);
  --ease-enter: cubic-bezier(0.05, 0.7, 0.1, 1);
  --ease-exit: cubic-bezier(0.3, 0, 0.8, 0.15);
}

@media (prefers-color-scheme: dark) {
  :root {
    --ground: #0B151A;
    --ground-hover: #13222A;
    --pane: #122027;
    --pane-alt: #0F1B21;
    --pane-hover: #1A2B34;
    --raised: #1A2A32;
    --ink: #E4ECEF;
    --ink-muted: #93A5AE;
    --ink-faint: #5E717B;
    --line: #21323B;
    --line-strong: #2C414B;
    --control-edge: #667A84;
    --accent: #9B83FF;
    --accent-hover: #AE9BFF;
    --on-accent: #120B2B;
    --accent-soft: #312657;
    --accent-ink: #B7A6FF;
    --focus: #B7A6FF;
    --unread: rgba(155, 131, 255, 0.07);
    --spark: #F0EF52;
    --success: #4AC26B;
    --success-bg: #0F2E1C;
    --warning: #E3A948;
    --warning-bg: #3A2A10;
    --danger: #FF6B61;
    --danger-bg: #3A1A1B;
    --series-1: #6AAEFF;
    --series-2: #3DD6C0;
    --series-3: #F2C14E;
    --series-4: #FF8A5B;
    --series-5: #FF6B9A;
    --series-6: #B49BFF;
    --series-7: #4CC9F0;
    --series-8: #A3D65C;
    --shadow-pane: 0 0 0 1px rgba(255, 255, 255, 0.05), 0 1px 2px rgba(0, 0, 0, 0.35);
    --shadow-float: 0 0 0 1px rgba(255, 255, 255, 0.08), 0 16px 40px -12px rgba(0, 0, 0, 0.7);
    --shadow-control: 0 1px 0 rgba(0, 0, 0, 0.3);
  }
}

.window[data-theme="dark"] {
  --ground: #0B151A;
  --ground-hover: #13222A;
  --pane: #122027;
  --pane-alt: #0F1B21;
  --pane-hover: #1A2B34;
  --raised: #1A2A32;
  --ink: #E4ECEF;
  --ink-muted: #93A5AE;
  --ink-faint: #5E717B;
  --line: #21323B;
  --line-strong: #2C414B;
  --control-edge: #667A84;
  --accent: #9B83FF;
  --accent-hover: #AE9BFF;
  --on-accent: #120B2B;
  --accent-soft: #312657;
  --accent-ink: #B7A6FF;
  --focus: #B7A6FF;
  --unread: rgba(155, 131, 255, 0.07);
  --spark: #F0EF52;
  --success: #4AC26B;
  --success-bg: #0F2E1C;
  --series-1: #6AAEFF;
  --series-2: #3DD6C0;
  --series-3: #F2C14E;
  --series-4: #FF8A5B;
  --series-5: #FF6B9A;
  --series-6: #B49BFF;
  --series-7: #4CC9F0;
  --shadow-pane: 0 0 0 1px rgba(255, 255, 255, 0.05), 0 1px 2px rgba(0, 0, 0, 0.35);
  --shadow-float: 0 0 0 1px rgba(255, 255, 255, 0.08), 0 16px 40px -12px rgba(0, 0, 0, 0.7);
  color-scheme: dark;
}

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

*, *::before, *::after { box-sizing: border-box; }
html { scroll-behavior: smooth; scroll-padding-top: 84px; }
body {
  margin: 0;
  background: var(--ground);
  color: var(--ink);
  font: 400 16px/1.6 var(--sans);
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
}
img, svg, canvas { display: block; max-width: 100%; }
a { color: var(--accent-ink); text-underline-offset: 0.2em; }
a:hover { color: var(--accent); }
h1, h2, h3, h4 { margin: 0; line-height: 1.15; letter-spacing: -0.02em; }
p { margin: 0; }
button { font: inherit; color: inherit; }
code, kbd, pre { font-family: var(--mono); }
kbd {
  display: inline-block;
  min-width: 1.6em;
  padding: 0 0.35em;
  margin: 0 0.1em;
  border: 1px solid var(--line-strong);
  border-bottom-width: 2px;
  border-radius: var(--radius-xs);
  background: var(--pane);
  font-size: 0.82em;
  line-height: 1.5;
  text-align: center;
}
:focus-visible { outline: 2px solid var(--focus); outline-offset: 3px; border-radius: var(--radius-xs); }
::selection { background: var(--accent-soft); }

.sr-only {
  position: absolute; width: 1px; height: 1px; padding: 0; margin: -1px;
  overflow: hidden; clip: rect(0, 0, 0, 0); white-space: nowrap; border: 0;
}
.skip-link {
  position: absolute; left: 16px; top: -60px; z-index: 30;
  padding: 10px 16px; border-radius: var(--radius-md);
  background: var(--raised); box-shadow: var(--shadow-float); color: var(--ink);
}
.skip-link:focus { top: 12px; }

.wrap { width: min(1180px, 100% - 48px); margin-inline: auto; }

.icon {
  display: inline-block;
  flex: none;
  width: 1.15em;
  height: 1.15em;
  background: currentColor;
  -webkit-mask: var(--icon) center / contain no-repeat;
  mask: var(--icon) center / contain no-repeat;
}
.icon.mini { width: 13px; height: 13px; }
.icon.flip { transform: scaleX(-1); }
.os-icon {
  display: inline-block;
  flex: none;
  width: 22px;
  height: 22px;
  background: currentColor;
  -webkit-mask: var(--icon) center / contain no-repeat;
  mask: var(--icon) center / contain no-repeat;
}
.signature {
  display: inline-block;
  flex: none;
  width: 17px;
  height: 16px;
  background: var(--ink-faint);
  -webkit-mask: url(assets/lama/lama-signature.svg) center / contain no-repeat;
  mask: url(assets/lama/lama-signature.svg) center / contain no-repeat;
}
.mono { font-family: var(--mono); }

.eyebrow {
  color: var(--accent-ink);
  font-size: 13px;
  font-weight: 600;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}

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

.button {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  min-height: 44px;
  padding: 0 18px;
  border: 1px solid transparent;
  border-radius: var(--radius-md);
  font-size: 15px;
  font-weight: 600;
  line-height: 1;
  text-decoration: none;
  white-space: nowrap;
  cursor: pointer;
  transition: background-color 150ms var(--ease-standard), transform 120ms var(--ease-standard), border-color 150ms var(--ease-standard);
}
.button:active { transform: scale(0.97); }
.button.primary { background: var(--accent); color: var(--on-accent); }
.button.primary:hover { background: var(--accent-hover); color: var(--on-accent); }
.button.secondary { background: var(--pane); color: var(--ink); border-color: var(--line-strong); box-shadow: var(--shadow-control); }
.button.secondary:hover { background: var(--pane-hover); color: var(--ink); }
.button.small { min-height: 32px; padding: 0 12px; font-size: 13px; gap: 6px; border-radius: 8px; }

.tool {
  display: inline-grid;
  place-items: center;
  width: 32px;
  height: 32px;
  border: 0;
  border-radius: 8px;
  background: transparent;
  color: var(--ink-muted);
  cursor: pointer;
  transition: background-color 150ms var(--ease-standard), color 150ms var(--ease-standard);
}
.tool:hover { background: var(--pane-hover); color: var(--ink); }
.tool[aria-pressed="true"] { color: var(--series-3); }

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

.site-header {
  position: sticky;
  top: 0;
  z-index: 20;
  display: flex;
  align-items: center;
  gap: 24px;
  width: min(1180px, 100% - 48px);
  margin-inline: auto;
  padding: 14px 0;
}
.site-header::before {
  content: "";
  position: absolute;
  inset: 0 calc(50% - 50vw);
  z-index: -1;
  background: color-mix(in srgb, var(--ground) 82%, transparent);
  -webkit-backdrop-filter: saturate(1.4) blur(14px);
  backdrop-filter: saturate(1.4) blur(14px);
}
.brand {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  color: var(--ink);
  font-size: 17px;
  font-weight: 700;
  letter-spacing: -0.01em;
  text-decoration: none;
}
.brand:hover { color: var(--ink); }
.brand img { border-radius: 8px; }
.site-nav {
  display: flex;
  gap: 2px;
  margin-inline: auto;
  padding: 4px;
  border-radius: 999px;
  background: var(--pane);
  box-shadow: var(--shadow-pane);
}
.site-nav a {
  padding: 6px 14px;
  border-radius: 999px;
  color: var(--ink-muted);
  font-size: 14px;
  font-weight: 500;
  text-decoration: none;
  transition: background-color 150ms var(--ease-standard), color 150ms var(--ease-standard);
}
.site-nav a:hover { background: var(--pane-hover); color: var(--ink); }
.header-end { display: flex; align-items: center; gap: 14px; }
.header-status {
  padding: 4px 10px;
  border-radius: 999px;
  background: var(--accent-soft);
  color: var(--accent-ink);
  font-size: 12px;
  font-weight: 600;
  text-decoration: none;
}
.lang { color: var(--ink-muted); font-size: 14px; text-decoration: none; }
.lang:hover { color: var(--ink); }

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

.hero { width: min(1340px, 100% - 32px); margin: 8px auto 0; }
.stage {
  position: relative;
  display: grid;
  grid-template-columns: minmax(0, 1.05fr) minmax(0, 1fr);
  align-items: center;
  gap: 24px;
  min-height: 580px;
  padding: 72px clamp(28px, 6vw, 88px);
  overflow: hidden;
  border-radius: 28px;
  background: var(--brand);
  color: var(--ivory);
  isolation: isolate;
}
.routes { position: absolute; inset: 0; z-index: -1; width: 100%; height: 100%; pointer-events: none; }
.hero-copy { min-width: 0; }
.hero .eyebrow { color: var(--ivory); }
.hero h1 {
  margin: 18px 0 22px;
  font-size: clamp(40px, 5.6vw, 72px);
  font-weight: 700;
  line-height: 1.02;
  letter-spacing: -0.045em;
}
.hero .intro { max-width: 34em; font-size: 18px; line-height: 1.6; }
.actions { display: flex; flex-wrap: wrap; gap: 12px; margin-top: 32px; }
.hero .button.primary { background: var(--ivory); color: var(--graphite); }
.hero .button.primary:hover { background: #FFFFFF; color: var(--graphite); }
.button.ghost { border-color: rgba(255, 248, 235, 0.55); color: var(--ivory); }
.button.ghost:hover { background: rgba(255, 248, 235, 0.12); color: var(--ivory); }
.hero :focus-visible { outline-color: var(--ivory); }
.hero-note { margin-top: 24px; font-size: 14px; }
.hero-note .mono { margin-right: 10px; padding: 2px 8px; border-radius: 6px; background: rgba(23, 23, 30, 0.28); font-size: 12px; }

.hero-scene { min-width: 0; justify-self: end; width: min(100%, 560px); margin-right: -2%; }
.hero-scene svg { width: 100%; height: auto; overflow: visible; }
.flight { fill: none; stroke: rgba(255, 248, 235, 0.5); stroke-width: 1.3; stroke-dasharray: 2.5 4.5; stroke-linecap: round; }
.envelope rect { fill: var(--ivory); }
.envelope path { fill: none; stroke: var(--brand); stroke-width: 7; stroke-linecap: round; stroke-linejoin: round; }
.envelope { transform-box: fill-box; transform-origin: 50% 100%; }
.envelope.is-gulp { animation: gulp 420ms var(--ease-standard); }
.letter { opacity: 0; }
.letter rect { fill: var(--ivory); }
.letter path { fill: none; stroke: var(--brand); stroke-width: 1.5; stroke-linecap: round; stroke-linejoin: round; }
/* A tracking mail in the hero (site.js): the Lama sends it back. */
.letter.is-tracker rect { fill: #FFB4A8; }
.letter.is-tracker path { stroke: #8C1D18; }
.badge { opacity: 0; transform-box: fill-box; transform-origin: center; transition: opacity 200ms var(--ease-standard); }
.badge.is-on { opacity: 1; }
.badge.is-pop { animation: pop 380ms var(--ease-standard); }
.badge circle { fill: var(--graphite); }
.badge text { fill: var(--ivory); font: 700 10px var(--sans); }
.hero-lama { transition: transform 900ms var(--ease-enter); }
.js .hero-lama:not(.is-up) { transform: translateY(40px); }
.hero-lama.is-hop { animation: hop 460ms var(--ease-standard); }
.pose { transition: opacity 220ms var(--ease-standard); }
.hero-lama.is-hello .proud,
.hero-lama:not(.is-hello) .hello { opacity: 0; }

@keyframes gulp { 40% { transform: scale(1.05, 0.95); } }
@keyframes pop { 45% { transform: scale(1.25); } }
@keyframes hop { 40% { transform: translateY(-6px); } }

/* ---------- Sections ---------- */

.section { padding: 112px 0 0; }
.section-heading { max-width: 720px; }
.section-heading h2,
.story-copy h2 { margin: 12px 0 16px; font-size: clamp(32px, 4.2vw, 50px); font-weight: 700; letter-spacing: -0.035em; }
.section-heading h2 span { color: var(--ink-muted); }
.section-heading > p:last-child { color: var(--ink-muted); font-size: 18px; }

.js .reveal { opacity: 0; transform: translateY(14px); }
.js .reveal.is-in {
  opacity: 1;
  transform: none;
  transition: opacity 600ms var(--ease-enter), transform 700ms var(--ease-enter);
  transition-delay: calc(var(--i, 0) * 80ms);
}

.demo-note { margin-top: 12px; color: var(--ink-muted); font-size: 13px; text-align: center; }

/* ---------- Window model ---------- */

.sketch { margin: 44px 0 0; }
.window {
  position: relative;
  overflow: hidden;
  border-radius: var(--radius-lg);
  background: var(--ground);
  box-shadow: var(--shadow-float);
  color: var(--ink);
  font-size: 13px;
  line-height: 1.4;
  transition: background-color 250ms var(--ease-standard), color 250ms var(--ease-standard);
}
.win-bar {
  display: grid;
  grid-template-columns: 1fr auto 1fr;
  align-items: center;
  gap: 12px;
  height: 46px;
  padding: 0 12px 0 16px;
}
.lights { display: flex; gap: 8px; }
.lights i { width: 12px; height: 12px; border-radius: 50%; background: #FF5F57; }
.lights i:nth-child(2) { background: #FEBC2E; }
.lights i:nth-child(3) { background: #28C840; }
.win-search {
  display: flex;
  align-items: center;
  gap: 8px;
  width: min(320px, 38vw);
  height: 30px;
  padding: 0 6px 0 10px;
  border-radius: 8px;
  background: var(--pane);
  box-shadow: var(--shadow-pane);
  color: var(--ink-faint);
}
.win-search kbd { margin-left: auto; font-size: 10px; color: var(--ink-muted); background: var(--pane-alt); }
.segmented {
  justify-self: end;
  display: inline-flex;
  padding: 2px;
  border-radius: 8px;
  background: var(--ground-hover);
}
.segmented button {
  min-height: 26px;
  padding: 0 12px;
  border: 0;
  border-radius: 6px;
  background: transparent;
  color: var(--ink-muted);
  font-size: 12px;
  font-weight: 500;
  cursor: pointer;
}
.segmented button[aria-pressed="true"] { background: var(--pane); color: var(--ink); box-shadow: var(--shadow-control), var(--shadow-pane); }

.win-body {
  display: grid;
  grid-template-columns: 208px minmax(0, 340px) minmax(0, 1fr);
  gap: 8px;
  height: 540px;
  padding: 0 8px 8px;
}
.win-side { display: flex; flex-direction: column; min-width: 0; padding: 4px 4px 6px; }
.compose {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  height: 36px;
  margin-bottom: 12px;
  border-radius: var(--radius-md);
  background: var(--accent);
  color: var(--on-accent);
  font-weight: 600;
}
.win-side ul { margin: 0; padding: 0; list-style: none; }
.nav-item {
  position: relative;
  display: flex;
  align-items: center;
  gap: 10px;
  height: 30px;
  padding: 0 8px;
  border-radius: var(--radius-sm);
  color: var(--ink);
  white-space: nowrap;
}
.nav-item .icon { color: var(--ink-muted); }
.nav-item span { overflow: hidden; text-overflow: ellipsis; }
.nav-item.nested { padding-left: 30px; }
.nav-item.is-active { background: var(--pane); box-shadow: var(--shadow-pane); font-weight: 600; }
.nav-item.is-active .icon { color: var(--accent-ink); }
.nav-item.is-active::after {
  content: "";
  position: absolute;
  left: 34px;
  bottom: 3px;
  width: 18px;
  height: 2px;
  border-radius: 2px;
  background: var(--spark);
}
.count {
  margin-left: auto;
  padding: 0 7px;
  border-radius: 999px;
  background: var(--accent-soft);
  color: var(--accent-ink);
  font-size: 11px;
  line-height: 18px;
}
.side-title { margin: 14px 8px 4px; color: var(--ink-muted); font-size: 11px; font-weight: 600; letter-spacing: 0.06em; text-transform: uppercase; }
.label-dot { width: 9px; height: 9px; margin: 0 3px; border-radius: 3px; background: var(--tone); }
.win-side .signature { margin: auto 0 0 8px; }

.win-list, .win-reader {
  position: relative;
  min-width: 0;
  overflow: hidden;
  border-radius: var(--radius-md);
  background: var(--pane);
  box-shadow: var(--shadow-pane);
}
.win-list { display: flex; flex-direction: column; }
.list-head {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 4px 10px;
  padding: 14px 14px 10px;
  border-bottom: 1px solid var(--line);
}
.list-head h3 { font-size: 15px; font-weight: 600; letter-spacing: -0.01em; }
.list-count { color: var(--ink-muted); font-size: 12px; }
.pills { display: flex; gap: 4px; margin-left: auto; }
.pills button {
  min-height: 24px;
  padding: 0 10px;
  border: 1px solid var(--line-strong);
  border-radius: 999px;
  background: transparent;
  color: var(--ink-muted);
  font-size: 12px;
  cursor: pointer;
}
.pills button[aria-pressed="true"] { border-color: transparent; background: var(--accent-soft); color: var(--accent-ink); font-weight: 600; }
.rows { flex: 1; margin: 0; padding: 6px; overflow: auto; list-style: none; }
.rows li + li { margin-top: 2px; }
.row, .sd-results li {
  display: grid;
  grid-template-columns: 34px minmax(0, 1fr) auto;
  gap: 10px;
  width: 100%;
  padding: 10px;
  border: 0;
  border-radius: 8px;
  background: transparent;
  text-align: left;
  cursor: pointer;
  transition: background-color 150ms var(--ease-standard), opacity 220ms var(--ease-exit), transform 220ms var(--ease-exit);
}
.row:hover { background: var(--pane-hover); }
.row.is-unread { background: var(--unread); }
.row.is-selected { background: var(--accent-soft); box-shadow: inset 3px 0 0 var(--accent); }
.row.is-leaving { opacity: 0; transform: translateX(24px); }
.avatar {
  display: inline-grid;
  place-items: center;
  flex: none;
  width: 34px;
  height: 34px;
  border-radius: 11px;
  background: color-mix(in srgb, var(--tone) 16%, var(--pane));
  color: var(--tone);
  font-size: 12px;
  font-weight: 700;
}
.row-main { display: grid; min-width: 0; gap: 1px; }
.row-top { display: flex; align-items: baseline; gap: 8px; min-width: 0; }
.sender, .subject, .snippet { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.sender { flex: 1; font-weight: 500; }
.time { color: var(--ink-muted); font-size: 11px; }
.snippet { color: var(--ink-muted); font-size: 12px; }
.is-unread .sender { font-weight: 700; }
.is-unread .subject { font-weight: 600; }
.is-unread .time { color: var(--accent-ink); font-weight: 600; }
.row-icons { display: flex; flex-direction: column; align-items: center; gap: 6px; padding-top: 22px; color: var(--ink-muted); }
.row-icons .star { color: var(--series-3); }

.list-empty {
  display: flex;
  flex: 1;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 8px;
  padding: 24px;
  text-align: center;
}
.list-empty[hidden] { display: none; }
.list-empty strong { margin-top: 8px; font-size: 17px; }
.list-empty p { max-width: 24em; margin-bottom: 8px; color: var(--ink-muted); }
.lama-tile { display: inline-grid; place-items: center; padding: 8px; border-radius: 20px; background: var(--brand); }
.lama-tile.small { padding: 6px; border-radius: 16px; }

.win-reader { padding: 12px 26px 24px; overflow: auto; }
.r-tools { display: flex; justify-content: flex-end; gap: 2px; margin: 0 -14px 6px 0; }
.win-reader h3 { font-size: 21px; font-weight: 600; letter-spacing: -0.02em; }
.r-chips { display: flex; gap: 6px; min-height: 8px; margin: 10px 0 14px; }
.label-chip {
  padding: 1px 9px;
  border-radius: 999px;
  background: color-mix(in srgb, var(--tone) 15%, var(--pane));
  color: var(--tone);
  font-size: 11px;
  font-weight: 600;
}
.r-from { display: flex; align-items: center; gap: 10px; padding-bottom: 16px; border-bottom: 1px solid var(--line); }
.r-meta { display: grid; min-width: 0; }
.r-meta span { color: var(--ink-muted); font-size: 12px; }
.shield-chip {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  margin-left: auto;
  padding: 3px 10px;
  border-radius: 999px;
  background: var(--success-bg);
  color: var(--success);
  font-size: 12px;
  font-weight: 600;
  white-space: nowrap;
}
.shield-chip[hidden] { display: none; }
.r-body { padding-top: 18px; font: 16px/1.65 var(--reading); }
.r-body p + p { margin-top: 12px; }
.r-attach {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  margin-top: 20px;
  padding: 8px 12px;
  border: 1px solid var(--line);
  border-radius: var(--radius-md);
  color: var(--ink-muted);
  font-size: 12px;
}
.r-attach[hidden] { display: none; }
.win-reader.is-swapping > * { animation: swap 260ms var(--ease-enter); }
@keyframes swap { from { opacity: 0; transform: translateY(6px); } }

.toast {
  position: absolute;
  left: 50%;
  bottom: 22px;
  display: flex;
  align-items: center;
  gap: 14px;
  padding: 8px 8px 8px 16px;
  border-radius: var(--radius-md);
  background: var(--raised);
  box-shadow: var(--shadow-float);
  transform: translateX(-50%);
  animation: rise 260ms var(--ease-enter);
}
.toast[hidden] { display: none; }
.toast button, .cd-toast button {
  padding: 4px 10px;
  border: 0;
  border-radius: 6px;
  background: transparent;
  color: var(--accent-ink);
  font-weight: 600;
  cursor: pointer;
}
.toast button:hover, .cd-toast button:hover { background: var(--accent-soft); }
@keyframes rise { from { opacity: 0; transform: translate(-50%, 6px) scale(0.98); } }

/* ---------- Features ---------- */

.feature-grid { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 16px; margin-top: 44px; }
.feature {
  padding: 26px;
  border-radius: var(--radius-lg);
  background: var(--pane);
  box-shadow: var(--shadow-pane);
  transition: box-shadow 200ms var(--ease-standard), transform 200ms var(--ease-standard);
}
.feature:hover { box-shadow: var(--shadow-float); transform: translateY(-2px); }
.feature-icon {
  display: inline-grid;
  place-items: center;
  width: 42px;
  height: 42px;
  margin-bottom: 18px;
  border-radius: 12px;
  background: var(--accent-soft);
  color: var(--accent-ink);
  font-size: 20px;
}
.feature h3 { margin-bottom: 8px; font-size: 18px; font-weight: 600; }
.feature p { color: var(--ink-muted); font-size: 15px; }
.feature code { font-size: 0.88em; }

/* ---------- Stories ---------- */

.stories { display: grid; gap: 112px; }
.story { display: grid; grid-template-columns: minmax(0, 0.9fr) minmax(0, 1.1fr); align-items: center; gap: clamp(32px, 6vw, 80px); }
.story.flip .story-copy { order: 2; }
.story-copy > p:not(.eyebrow) { color: var(--ink-muted); font-size: 18px; }
.checks { display: grid; gap: 10px; margin: 24px 0 0; padding: 0; list-style: none; }
.checks li { display: flex; gap: 10px; }
.checks .icon { margin-top: 0.25em; color: var(--accent-ink); }
.story-demo {
  position: relative;
  padding: 20px;
  border-radius: var(--radius-xl);
  background: var(--pane-alt);
  box-shadow: var(--shadow-pane);
}
.story-demo > div:first-child {
  position: relative;
  padding: 18px;
  border-radius: var(--radius-lg);
  background: var(--pane);
  box-shadow: var(--shadow-pane);
  font-size: 14px;
}

/* Privacy model */
.pd-head { display: flex; align-items: center; gap: 12px; }
.pd-head .r-meta span { font-size: 13px; }
.shield-btn {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  margin-left: auto;
  padding: 6px 12px;
  border: 0;
  border-radius: 999px;
  background: var(--success-bg);
  color: var(--success);
  font-weight: 700;
  cursor: pointer;
  transition: box-shadow 150ms var(--ease-standard);
}
.shield-btn[aria-expanded="true"], .shield-btn:hover { box-shadow: 0 0 0 2px var(--success); }
.pd-pop {
  position: absolute;
  top: 66px;
  right: 18px;
  z-index: 2;
  width: min(360px, calc(100% - 36px));
  padding: 16px;
  border-radius: var(--radius-md);
  background: var(--raised);
  box-shadow: var(--shadow-float);
  font-size: 13px;
  animation: pop-in 200ms var(--ease-enter);
}
.pd-pop[hidden] { display: none; }
@keyframes pop-in { from { opacity: 0; transform: translateY(-4px) scale(0.98); } }
.pd-pop > strong { display: block; margin-bottom: 10px; font-size: 14px; }
.pd-line { display: flex; align-items: center; gap: 8px; margin-top: 8px; font-weight: 600; }
.pd-line .icon { color: var(--success); }
.pd-hosts { margin: 6px 0 0 26px; padding: 0; list-style: none; color: var(--ink-muted); }
.pd-hosts code, .pd-pop dd code { font-size: 11.5px; }
.pd-pop dl { margin: 12px 0 0; padding-top: 12px; border-top: 1px solid var(--line); }
.pd-pop dt { color: var(--ink-muted); font-size: 11px; font-weight: 600; letter-spacing: 0.04em; text-transform: uppercase; }
.pd-pop dd { margin: 2px 0 10px; overflow-wrap: anywhere; }
.pd-pop mark { background: var(--danger-bg); color: var(--danger); text-decoration: line-through; }
.pd-banner {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 8px 10px;
  margin: 16px 0;
  padding: 10px 12px;
  border-radius: var(--radius-md);
  background: var(--pane-alt);
  box-shadow: inset 0 0 0 1px var(--line);
  color: var(--ink-muted);
  font-size: 13px;
}
.pd-banner > span:not(.icon) { flex: 1; min-width: 12em; }
.pd-picture {
  position: relative;
  aspect-ratio: 16 / 6;
  overflow: hidden;
  border-radius: var(--radius-md);
  background: repeating-linear-gradient(135deg, var(--pane-alt) 0 10px, var(--pane-hover) 10px 20px);
}
.pd-picture > span { position: absolute; transition: opacity 400ms var(--ease-standard), transform 600ms var(--ease-enter); }
.pd-picture .blocked { inset: 0; display: grid; place-items: center; color: var(--ink-faint); font-size: 28px; }
.pd-picture .sun, .pd-picture .hill { opacity: 0; transform: translateY(16px); }
.pd-picture .sun { top: 22%; right: 18%; width: 15%; aspect-ratio: 1; border-radius: 50%; background: #FFD27A; }
.pd-picture .hill { left: -10%; right: 20%; bottom: -55%; height: 100%; border-radius: 50%; background: var(--series-2); }
.pd-picture .hill.back { left: 30%; right: -20%; bottom: -45%; background: var(--series-7); }
.pd-picture.is-shown { background: linear-gradient(#BFD9FF, #EEF4FF); }
.pd-picture.is-shown .blocked { opacity: 0; }
.pd-picture.is-shown .sun, .pd-picture.is-shown .hill { opacity: 1; transform: none; }
.pd-body h4 { margin: 16px 0 6px; font: 600 20px/1.25 var(--reading); letter-spacing: 0; }
.pd-body p { font: 15px/1.6 var(--reading); color: var(--ink-muted); }
.pd-cta { display: inline-block; margin-top: 14px; padding: 8px 14px; border-radius: 8px; background: var(--series-4); color: #FFFFFF; font-size: 13px; font-weight: 600; }

/* Search model */
.sd-field {
  display: flex;
  align-items: center;
  gap: 8px;
  height: 42px;
  padding: 0 12px;
  border-radius: var(--radius-md);
  background: var(--pane);
  box-shadow: inset 0 0 0 1px var(--control-edge);
  color: var(--ink-muted);
}
.sd-field:focus-within { box-shadow: inset 0 0 0 2px var(--focus); }
.sd-field input { flex: 1; min-width: 0; height: 100%; border: 0; outline: 0; background: transparent; color: var(--ink); font: 15px var(--sans); }
.sd-field input::placeholder { color: var(--ink-faint); }
.sd-filters { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 8px; margin: 12px 0 8px; }
.sd-check { display: inline-flex; align-items: center; gap: 8px; font-size: 13px; cursor: pointer; }
.sd-check > span { display: inline-flex; align-items: center; gap: 6px; }
.sd-check input { width: 16px; height: 16px; margin: 0; accent-color: var(--accent); }
.sd-count { color: var(--ink-muted); font-size: 12px; font-weight: 600; }
.sd-results { display: grid; gap: 2px; margin: 0; padding: 0; list-style: none; }
.sd-results li { grid-template-columns: 34px minmax(0, 1fr); cursor: default; animation: swap 220ms var(--ease-enter); }
.sd-results li[hidden] { display: none; }
.sd-results .row-top .icon { color: var(--ink-muted); }
.sd-results mark { border-radius: 3px; background: var(--accent-soft); color: var(--accent-ink); font-weight: 600; }
.sd-empty { display: grid; justify-items: center; gap: 6px; padding: 18px 0 8px; text-align: center; }
.sd-empty[hidden] { display: none; }
.sd-empty p { color: var(--ink-muted); font-size: 13px; }

/* Composer model */
.cd-sheet { transform-origin: 80% 0; }
.cd-sheet.is-flying { animation: send-flight 520ms var(--ease-exit) forwards; }
.cd-sheet.is-back { animation: swap 320ms var(--ease-enter); }
@keyframes send-flight { to { opacity: 0; transform: translate(60px, -36px) scale(0.86) rotate(-3deg); } }
.cd-row { display: flex; align-items: center; gap: 12px; min-height: 40px; border-bottom: 1px solid var(--line); }
.cd-label { width: 64px; color: var(--ink-muted); font-size: 13px; }
.recipient {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 2px 10px 2px 2px;
  border-radius: 999px;
  background: var(--accent-soft);
  color: var(--accent-ink);
  font-size: 13px;
  font-weight: 600;
}
.recipient .avatar { width: 22px; height: 22px; border-radius: 50%; font-size: 9px; background: var(--pane); }
.cd-body { margin: 16px 0; font: 16px/1.6 var(--reading); }
.cd-attach {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 7px 12px;
  border-radius: var(--radius-md);
  box-shadow: inset 0 0 0 1px var(--line);
  color: var(--ink-muted);
  font-size: 12px;
}
.cd-size { color: var(--ink-faint); }
.cd-actions { position: relative; margin-top: 18px; }
.split { display: inline-flex; }
.split .button { border-radius: 8px 0 0 8px; }
.split .split-end { padding: 0 10px; border-left: 1px solid color-mix(in srgb, var(--on-accent) 30%, transparent); border-radius: 0 8px 8px 0; }
.cd-menu {
  position: absolute;
  bottom: calc(100% + 8px);
  left: 0;
  z-index: 2;
  width: min(300px, 100%);
  padding: 6px;
  border-radius: var(--radius-md);
  background: var(--raised);
  box-shadow: var(--shadow-float);
  animation: pop-in 180ms var(--ease-enter);
}
.cd-menu[hidden] { display: none; }
.cd-menu-title { padding: 6px 10px 4px; color: var(--ink-muted); font-size: 11px; font-weight: 600; letter-spacing: 0.05em; text-transform: uppercase; }
.cd-menu button {
  display: flex;
  justify-content: space-between;
  gap: 12px;
  width: 100%;
  padding: 8px 10px;
  border: 0;
  border-radius: 6px;
  background: transparent;
  font-size: 13px;
  text-align: left;
  cursor: pointer;
}
.cd-menu button:hover, .cd-menu button:focus-visible { background: var(--accent-soft); color: var(--accent-ink); outline: 0; }
.cd-date { color: var(--ink-muted); }
.cd-toast {
  display: flex;
  align-items: center;
  gap: 10px;
  margin-top: 14px;
  padding: 8px 8px 8px 12px;
  border-radius: var(--radius-md);
  background: var(--success-bg);
  color: var(--success);
  font-size: 13px;
  font-weight: 600;
  animation: swap 260ms var(--ease-enter);
}
.cd-toast[hidden] { display: none; }
.cd-toast span:not(.icon) { flex: 1; }

/* ---------- Under the hood ---------- */

.core-grid { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 16px; margin: 44px 0 0; padding: 0; list-style: none; }
.core-grid li { padding: 22px; border-radius: var(--radius-lg); background: var(--pane); box-shadow: var(--shadow-pane); }
.core-grid .icon { color: var(--accent-ink); font-size: 22px; }
.core-grid strong { display: block; margin: 14px 0 6px; font-size: 16px; }
.core-grid p { color: var(--ink-muted); font-size: 14px; }

/* ---------- Download ---------- */

.download-stage {
  display: flex;
  align-items: center;
  gap: clamp(20px, 4vw, 44px);
  padding: 36px clamp(24px, 5vw, 56px);
  border-radius: 28px;
  background: var(--brand);
  color: var(--ivory);
}
.download-lama { flex: none; }
.download-stage .eyebrow { color: var(--ivory); }
.download-stage h2 { margin: 8px 0 10px; font-size: clamp(30px, 4vw, 46px); font-weight: 700; letter-spacing: -0.035em; }
.download-stage p { max-width: 40em; font-size: 17px; }
.download-stage .account { margin-top: 8px; font-size: 14px; }
.release-status {
  display: flex;
  align-items: center;
  gap: 12px;
  margin-top: 20px;
  padding: 18px 22px;
  border-radius: var(--radius-lg);
  background: var(--pane);
  box-shadow: var(--shadow-pane);
  color: var(--ink-muted);
}
.release-status .icon { color: var(--accent-ink); }
.release-bar { display: flex; align-items: center; justify-content: space-between; gap: 12px; margin: 24px 0 12px; font-size: 14px; }
.pill { padding: 3px 10px; border-radius: 999px; background: var(--accent-soft); color: var(--accent-ink); font-family: var(--mono); font-size: 12px; }
.download-grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 16px; }
.platform-card { padding: 22px; border-radius: var(--radius-lg); background: var(--pane); box-shadow: var(--shadow-pane); }
.platform-card > .os-icon { width: 28px; height: 28px; }
.platform-card h3 { margin-top: 12px; font-size: 19px; }
.platform-card > p { color: var(--ink-muted); font-size: 14px; }
.platform-card ul { display: grid; gap: 10px; margin: 16px 0 0; padding: 0; list-style: none; }
.package {
  display: grid;
  grid-template-columns: auto minmax(0, 1fr) auto auto auto;
  align-items: center;
  gap: 4px 12px;
  padding: 12px;
  border-radius: var(--radius-md);
  background: var(--pane-alt);
}
.package .os-icon { width: 18px; height: 18px; color: var(--ink-muted); }
.pkg-text { display: grid; min-width: 0; }
.pkg-text span, .pkg-size { color: var(--ink-muted); font-size: 12px; }
.pkg-size { font-family: var(--mono); }
.tool.is-copied { color: var(--success); }
.sha { grid-column: 1 / -1; color: var(--ink-faint); font-size: 11px; overflow-wrap: anywhere; }
.verify { margin-top: 16px; padding: 14px 18px; border-radius: var(--radius-lg); background: var(--pane); box-shadow: var(--shadow-pane); font-size: 14px; }
.verify summary { cursor: pointer; font-weight: 600; }
.verify p { margin-top: 10px; color: var(--ink-muted); }
.verify pre { margin: 10px 0 0; padding: 12px; overflow: auto; border-radius: 8px; background: var(--pane-alt); font-size: 12px; }
.independent {
  display: flex;
  gap: 14px;
  margin-top: 20px;
  padding: 20px 22px;
  border-radius: var(--radius-lg);
  box-shadow: inset 0 0 0 1px var(--line-strong);
  font-size: 14px;
}
.independent > .icon { margin-top: 2px; color: var(--ink-muted); font-size: 20px; }
.independent h3 { margin-bottom: 6px; font-size: 15px; }
.independent p { margin-bottom: 8px; color: var(--ink-muted); }

/* ---------- Footer and pages ---------- */

.site-footer {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  align-items: start;
  gap: 20px 32px;
  width: min(1180px, 100% - 48px);
  margin: 112px auto 0;
  padding: 32px 0 48px;
  border-top: 1px solid var(--line-strong);
  color: var(--ink-muted);
  font-size: 14px;
}
.footer-brand { display: flex; gap: 12px; }
.footer-brand .signature { margin-top: 4px; width: 20px; height: 19px; }
.footer-brand strong { color: var(--ink); }
.footer-family, .footer-legal { display: flex; flex-wrap: wrap; gap: 6px 18px; }
.footer-family { grid-column: 1; }
.footer-family span { color: var(--ink-faint); }
.footer-legal { grid-column: 2; grid-row: 1; justify-content: flex-end; }
.site-footer a { color: var(--ink-muted); text-decoration: none; }
.site-footer a:hover { color: var(--ink); text-decoration: underline; }
.footer-note { grid-column: 1 / -1; color: var(--ink-faint); font-size: 12px; }

.subpage main { min-height: 50vh; }
.legal { max-width: 760px; padding: 56px 0 0; }
.legal h1 { margin: 20px 0 18px; font-size: clamp(36px, 5vw, 52px); letter-spacing: -0.035em; }
.legal p { color: var(--ink-muted); font-size: 17px; }
.legal p + p { margin-top: 14px; }
.back { display: inline-flex; align-items: center; gap: 8px; font-size: 14px; text-decoration: none; }

/* ---------- Responsive ---------- */

@media (max-width: 1080px) {
  .win-body { grid-template-columns: minmax(0, 300px) minmax(0, 1fr); }
  .win-side { display: none; }
  .core-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
}

@media (max-width: 900px) {
  .site-nav { display: none; }
  .header-end { margin-left: auto; }
  .stage { grid-template-columns: minmax(0, 1fr); min-height: 0; padding: 48px 28px 32px; }
  .hero-scene { justify-self: center; width: min(100%, 460px); }
  .feature-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .story, .story.flip { grid-template-columns: minmax(0, 1fr); }
  .story.flip .story-copy { order: 0; }
  .download-grid { grid-template-columns: minmax(0, 1fr); }
}

@media (max-width: 680px) {
  .wrap, .site-header, .site-footer { width: min(100% - 32px, 1180px); }
  .hero { width: calc(100% - 16px); }
  .stage { padding: 36px 20px 24px; border-radius: 22px; }
  .hero .intro { font-size: 16px; }
  .section { padding-top: 80px; }
  .stories { gap: 80px; }
  .win-bar { grid-template-columns: auto minmax(0, 1fr); }
  .win-search { display: none; }
  .win-body { grid-template-columns: minmax(0, 1fr); height: auto; }
  .rows { max-height: 330px; }
  .win-reader { max-height: 420px; padding: 10px 18px 20px; }
  .feature-grid, .core-grid { grid-template-columns: minmax(0, 1fr); }
  .story-demo { padding: 10px; border-radius: var(--radius-lg); }
  .story-demo > div:first-child { padding: 14px; }
  .download-stage { flex-direction: column; align-items: flex-start; border-radius: 22px; }
  .download-lama img { width: 96px; height: 96px; }
  .package { grid-template-columns: auto minmax(0, 1fr) auto auto; }
  .package .pkg-size { display: none; }
  .site-footer { grid-template-columns: minmax(0, 1fr); }
  .footer-legal { grid-column: 1; grid-row: auto; justify-content: flex-start; }
}

@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  *, *::before, *::after { animation-duration: 1ms !important; animation-iteration-count: 1 !important; transition-duration: 1ms !important; }
  .js .reveal { transform: none; }
}
