/* Maily product page. Flat design: solid surfaces, 1px lines, one indigo accent and soft pastel tints. */

:root {
  --bg: #fafaf8;
  --surface: #f2f2ef;
  --card: #ffffff;
  --line: #e6e5e1;
  --line-strong: #d4d3ce;
  --ink: #111114;
  --soft: #3b3b42;
  --muted: #6a6a73;
  --accent: #4646e8;
  --accent-hover: #3535d6;
  --accent-ink: #3333cc;
  --on-accent: #ffffff;
  --accent-soft: #e9e9ff;
  --code-bg: #f0efec;
  --term-bg: #121216;
  --term-ink: #e8e8ee;
  --term-muted: #8b8b98;
  --focus: #4646e8;
  --t-blue: #e9ecff;
  --t-lilac: #f0ebff;
  --t-mint: #e2f5ea;
  --t-peach: #fdede2;
  --t-yellow: #fbf4d6;
  --dot-a: #1a73e8;
  --dot-b: #188038;
  --dot-c: #e37400;
  --radius: 12px;
  --radius-lg: 20px;
  --radius-xl: 28px;
  --font: "Inter", "SF Pro Text", -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
  --display: "Inter Display", "SF Pro Display", -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
  --mono: "JetBrains Mono", ui-monospace, "SF Mono", SFMono-Regular, Menlo, Consolas, monospace;
  color-scheme: light dark;
}

@media (prefers-color-scheme: dark) {
  :root {
    --bg: #0c0c0e;
    --surface: #131316;
    --card: #17171b;
    --line: #26262c;
    --line-strong: #34343c;
    --ink: #f3f3f5;
    --soft: #c8c8d0;
    --muted: #8f8f9a;
    --accent: #8b8bff;
    --accent-hover: #a3a3ff;
    --accent-ink: #a9a9ff;
    --on-accent: #0b0b1a;
    --accent-soft: #1d1d3a;
    --code-bg: #1d1d22;
    --term-bg: #0f0f12;
    --focus: #a9a9ff;
    --t-blue: #161a33;
    --t-lilac: #1c1730;
    --t-mint: #0f2219;
    --t-peach: #2a1a10;
    --t-yellow: #252010;
    --dot-a: #8ab4f8;
    --dot-b: #81c995;
    --dot-c: #fcad70;
  }
}

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

html { scroll-behavior: smooth; scroll-padding-top: 84px; -webkit-text-size-adjust: 100%; }
@media (prefers-reduced-motion: reduce) { html { scroll-behavior: auto; } }

body {
  margin: 0;
  background: var(--bg);
  color: var(--ink);
  font: 16px/1.6 var(--font);
  font-feature-settings: "cv11", "ss01";
  -webkit-font-smoothing: antialiased;
  overflow-wrap: break-word;
}

/* Language switch: the page fades out, and the other language fades in at the same spot */
body { transition: opacity .35s ease; }
.switching body, .leaving body { opacity: 0; }
.leaving body { transition-duration: .2s; }

img { max-width: 100%; height: auto; display: block; }

a { color: var(--accent-ink); text-underline-offset: 3px; text-decoration-thickness: 1px; }
a:hover { text-decoration-thickness: 2px; }

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

h1, h2, h3, h4 { line-height: 1.15; margin: 0 0 .5em; font-weight: 650; font-family: var(--display); }
h1 { font-size: clamp(2.6rem, 1.3rem + 5.4vw, 5.25rem); letter-spacing: -.045em; font-weight: 700; line-height: 1.02; }
h2 { font-size: clamp(1.9rem, 1.2rem + 2.4vw, 3rem); letter-spacing: -.035em; font-weight: 680; line-height: 1.08; }
h3 { font-size: 1.15rem; letter-spacing: -.015em; }
h4 { font-size: 1rem; letter-spacing: -.01em; }
p { margin: 0 0 1em; }
strong { font-weight: 620; }

code { font-family: var(--mono); font-size: .86em; background: var(--code-bg); padding: .12em .4em; border-radius: 6px; }
pre {
  margin: 0 0 1em;
  background: var(--term-bg);
  color: var(--term-ink);
  border-radius: var(--radius);
  padding: 18px 20px;
  overflow-x: auto;
  white-space: pre-wrap; overflow-wrap: anywhere; /* long commands wrap: nothing to scroll sideways */
  font: 13.5px/1.65 var(--mono);
}
pre code { background: none; padding: 0; font-size: inherit; color: inherit; }

.wrap { width: min(1160px, 100% - 40px); margin-inline: auto; }
.wrap.wide { width: min(1240px, 100% - 32px); }
.center { text-align: center; justify-content: center; }
.small { font-size: .9rem; color: var(--muted); }

.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 {
  position: absolute; left: 12px; top: -60px; z-index: 100;
  background: var(--ink); color: var(--bg); padding: 10px 16px; border-radius: 999px; text-decoration: none; font-weight: 600;
}
.skip:focus { top: 12px; }

/* Buttons */
.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 8px;
  min-height: 42px; padding: 10px 20px; border-radius: 999px;
  font: 600 .95rem/1 var(--font); letter-spacing: -.01em; text-decoration: none; white-space: nowrap;
  border: 1px solid transparent; cursor: pointer;
  transition: background-color .2s, border-color .2s, color .2s, transform .2s;
}
.btn-sm { min-height: 36px; padding: 8px 16px; font-size: .88rem; }
.btn-lg { min-height: 52px; padding: 14px 26px; font-size: 1rem; }
.btn-primary { background: var(--accent); color: var(--on-accent); }
.btn-primary:hover { background: var(--accent-hover); }
.btn-ghost { background: var(--card); color: var(--ink); border-color: var(--line-strong); }
.btn-ghost:hover { border-color: var(--ink); }
.btn-invert { background: #ffffff; color: #1b1b6b; }
.btn-invert:hover { background: #eeeeff; }
.btn-outline-invert { background: transparent; color: #ffffff; border-color: rgb(255 255 255 / .45); }
.btn-outline-invert:hover { border-color: #ffffff; }
.cta { display: flex; flex-wrap: wrap; gap: 12px; margin: 32px 0 20px; }

/* Top bar */
.topbar {
  position: sticky; top: 0; z-index: 50;
  background: color-mix(in srgb, var(--bg) 82%, transparent);
  -webkit-backdrop-filter: saturate(1.4) blur(14px);
  backdrop-filter: saturate(1.4) blur(14px);
  border-bottom: 1px solid var(--line);
}
.topbar { transition: border-color .3s, background-color .3s; }
.topbar:not(.scrolled) { border-bottom-color: transparent; background: transparent; -webkit-backdrop-filter: none; backdrop-filter: none; }
.topbar-in { display: flex; align-items: center; gap: 24px; min-height: 64px; }
.brand { display: inline-flex; align-items: center; gap: 10px; color: var(--ink); text-decoration: none; font: 700 1.1rem/1 var(--display); letter-spacing: -.03em; }
.brand img { border-radius: 7px; }
.nav { list-style: none; margin: 0; padding: 0; display: flex; gap: 4px; }
.nav a { display: block; padding: 8px 12px; border-radius: 999px; color: var(--soft); text-decoration: none; font-size: .92rem; font-weight: 500; }
.nav a { transition: color .25s, background-color .25s; }
.nav a:hover { color: var(--ink); background: var(--surface); }
.nav a.active { color: var(--ink); background: var(--surface); }
.topbar nav { margin-inline: auto; }
.topbar-cta { display: flex; gap: 8px; margin-left: auto; }
.topbar nav + .topbar-cta { margin-left: 0; }

/* Hero */
.hero { padding: 72px 0 clamp(56px, 7vw, 96px); position: relative; overflow: hidden; }
.hero::before {
  content: ""; position: absolute; inset: 0 0 auto; height: 760px; z-index: -1;
  background-image: radial-gradient(var(--line-strong) 1px, transparent 1px);
  background-size: 22px 22px;
  -webkit-mask-image: radial-gradient(ellipse 70% 60% at 50% 30%, #000 30%, transparent 75%);
  mask-image: radial-gradient(ellipse 70% 60% at 50% 30%, #000 30%, transparent 75%);
  opacity: .7;
}
.hero-in { text-align: center; display: flex; flex-direction: column; align-items: center; }
.pill {
  display: inline-flex; align-items: center; gap: 10px;
  padding: 5px 14px 5px 5px; margin-bottom: 28px;
  border: 1px solid var(--line-strong); border-radius: 999px; background: var(--card);
  color: var(--soft); font-size: .88rem; font-weight: 500; text-decoration: none;
  transition: border-color .2s;
}
.pill:hover { border-color: var(--accent); }
.pill-tag { background: var(--accent); color: var(--on-accent); font: 700 .72rem/1 var(--mono); letter-spacing: .04em; padding: 6px 9px; border-radius: 999px; }
.pill-arrow { color: var(--muted); transition: transform .2s; }
.pill:hover .pill-arrow { transform: translateX(3px); color: var(--accent-ink); }
.hero h1 { max-width: 15ch; margin-bottom: 24px; }
.hero h1 span { display: block; }
.hl { color: var(--accent); }
.lead { font-size: clamp(1.05rem, 1rem + .3vw, 1.2rem); line-height: 1.6; color: var(--soft); max-width: 62ch; }
.hero .lead { margin-inline: auto; }
.hero .cta { justify-content: center; }
.os-links { list-style: none; margin: 0 0 8px; padding: 0; display: flex; flex-wrap: wrap; justify-content: center; gap: 4px 14px; font-size: .92rem; color: var(--muted); }
.os-links a { color: var(--soft); font-weight: 500; }
.fine { font-size: .88rem; color: var(--muted); margin: 0; }
.fine a { color: inherit; }

/* Hero diagram: mailboxes, Maily, AIs */
.hub { margin: 64px 0 0; padding: clamp(20px, 4vw, 48px); background: var(--accent-soft); border: 1px solid var(--line); border-radius: var(--radius-xl); }
.hub-stage { position: relative; aspect-ratio: 1080 / 440; max-width: 1080px; margin-inline: auto; }
.hub-lines { position: absolute; inset: 0; width: 100%; height: 100%; overflow: visible; }
.hub-lines path { fill: none; stroke: var(--accent); stroke-width: 1.6; stroke-dasharray: 5 7; opacity: .55; vector-effect: non-scaling-stroke; }
.hub-col { position: absolute; top: 0; bottom: 0; width: 23.2%; display: flex; flex-direction: column; justify-content: space-around; }
.hub-left { left: 0; padding: 7% 0; }
.hub-right { right: 0; padding: 1.5% 0; }
.hub-label { position: absolute; top: -6px; left: 0; right: 0; margin: 0; font: 600 .7rem/1 var(--mono); letter-spacing: .12em; text-transform: uppercase; color: var(--muted); }
.hub-right .hub-label { text-align: right; }
.hub-card { display: flex; align-items: center; gap: 12px; min-height: 52px; padding: 10px 14px; background: var(--card); border: 1px solid var(--line); border-radius: 14px; }
.hub-card b { display: block; font: 650 .95rem/1.2 var(--display); letter-spacing: -.01em; }
.hub-card small { display: block; color: var(--muted); font-size: .78rem; line-height: 1.3; }
.hub-core { position: absolute; left: 37.96%; width: 24.07%; top: 27.3%; height: 45.4%; display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 4px; background: var(--card); border: 2px solid var(--accent); border-radius: 24px; text-align: center; }
.hub-core img { width: clamp(44px, 5vw, 72px); height: auto; border-radius: 16px; margin-bottom: 6px; }
.hub-core b { font: 700 1.5rem/1 var(--display); letter-spacing: -.04em; }
.hub-core small { color: var(--muted); font-size: .85rem; }

.term-bar { display: flex; align-items: center; gap: 7px; padding: 11px 14px; border-bottom: 1px solid var(--line); font: 500 .78rem/1 var(--mono); color: var(--muted); }
.term-bar i { width: 11px; height: 11px; border-radius: 50%; background: var(--line-strong); }
.term-bar span { margin-inline: auto; padding-right: 54px; }

/* Language switch */
.lang { display: inline-flex; padding: 3px; border: 1px solid var(--line-strong); border-radius: 999px; background: var(--card); }
.lang a { display: inline-flex; align-items: center; justify-content: center; min-width: 34px; height: 28px; padding: 0 8px; border-radius: 999px;
  font: 700 .74rem/1 var(--font); letter-spacing: .06em; color: var(--muted); text-decoration: none; transition: background-color .25s, color .25s; }
.lang a:hover { color: var(--ink); }
.lang a[aria-current="page"] { background: var(--ink); color: var(--bg); }

/* Strip: integrations and numbers */
.strip { border-block: 1px solid var(--line); background: var(--card); padding: 36px 0; }
.strip-label { text-align: center; font: 600 .74rem/1 var(--mono); letter-spacing: .12em; text-transform: uppercase; color: var(--muted); margin-bottom: 18px; }
.logos { list-style: none; margin: 0 0 18px; padding: 0; display: flex; flex-wrap: wrap; justify-content: center; gap: 14px clamp(24px, 4vw, 52px); }
.logos li { display: inline-flex; align-items: center; gap: 10px; font: 650 clamp(1rem, .9rem + .4vw, 1.2rem)/1 var(--display); letter-spacing: -.02em; color: var(--soft); }
.logos .mark { width: 26px; height: 26px; }
.strip-apps { max-width: 70ch; margin: 0 auto 36px; text-align: center; font-size: .92rem; color: var(--muted); }
.mark { flex: none; width: 22px; height: 22px; color: var(--ink); }
.mark-text { display: inline-grid; place-items: center; border-radius: 7px; background: var(--ink); color: var(--bg); font: 800 8px/1 var(--font); letter-spacing: .02em; }
.logos .mark-text { font-size: 9px; }
.stats { display: grid; grid-template-columns: repeat(4, 1fr); margin: 0; border: 1px solid var(--line); border-radius: var(--radius-lg); overflow: hidden; }
.stats div { display: flex; flex-direction: column-reverse; padding: 22px 24px; border-left: 1px solid var(--line); }
.stats div:first-child { border-left: 0; }
.stats dt { color: var(--muted); font-size: .9rem; }
.stats dd { margin: 0; font: 700 clamp(2.2rem, 1.6rem + 2vw, 3.2rem)/1 var(--display); letter-spacing: -.05em; }

/* Sections */
.section { padding: clamp(80px, 9vw, 128px) 0; }
.section-alt { background: var(--surface); border-block: 1px solid var(--line); }
.head { max-width: 760px; margin-bottom: 48px; }
.eyebrow {
  display: inline-flex; align-items: center; gap: 8px;
  font: 600 .74rem/1 var(--mono); letter-spacing: .12em; text-transform: uppercase; color: var(--accent-ink); margin: 0 0 16px;
}
.eyebrow::before { content: ""; width: 7px; height: 7px; border-radius: 2px; background: var(--accent); }
.section-lead { font-size: 1.1rem; color: var(--soft); max-width: 62ch; margin-top: 12px; }

/* Bento */
.bento { display: grid; grid-template-columns: repeat(3, 1fr); gap: 16px; }
.tile {
  position: relative; display: flex; flex-direction: column;
  padding: 28px; border-radius: var(--radius-lg); border: 1px solid var(--line);
  background: var(--card); min-height: 300px;
}
.tile-wide { grid-column: span 2; }
.tile h3 { font-size: 1.35rem; margin-top: 18px; }
.tile p { color: var(--soft); max-width: 58ch; }
.b-icon { width: 44px; height: 44px; padding: 10px; border-radius: 12px; background: var(--card); border: 1px solid var(--line); color: var(--ink); }
.tint-blue { background: var(--t-blue); }
.tint-lilac { background: var(--t-lilac); }
.tint-mint { background: var(--t-mint); }
.tint-peach { background: var(--t-peach); }
.tint-yellow { background: var(--t-yellow); }
.chips { list-style: none; margin: auto 0 0; padding: 8px 0 0; display: flex; flex-wrap: wrap; gap: 8px; }
.chips li { font: 500 .78rem/1 var(--mono); padding: 8px 11px; border-radius: 999px; background: var(--card); border: 1px solid var(--line); color: var(--soft); }
.mock-accounts { list-style: none; margin: auto 0 0; padding: 8px; background: var(--card); border: 1px solid var(--line); border-radius: 14px; font-size: .9rem; }
.mock-accounts li { display: flex; align-items: center; gap: 10px; padding: 7px 10px; border-radius: 8px; color: var(--soft); }
.mock-accounts li.on { background: var(--accent-soft); color: var(--ink); font-weight: 600; }
.dot { width: 10px; height: 10px; border-radius: 50%; flex: none; }
.dot-all { border-radius: 3px; background: var(--accent); }
.dot-a { background: var(--dot-a); }
.dot-b { background: var(--dot-b); }
.dot-c { background: var(--dot-c); }
.mock-path { list-style: none; margin: auto 0 0; padding: 0; display: flex; align-items: center; gap: 6px; font: 600 .78rem/1 var(--mono); }
.mock-path li { padding: 9px 12px; border-radius: 999px; background: var(--card); border: 1px solid var(--line); color: var(--soft); }
.mock-path li + li::before { content: none; }
.mock-path li.me { background: var(--ink); color: var(--bg); border-color: var(--ink); }
.mock-path li:not(:last-child)::after { content: ""; }
.tile-ink { background: var(--ink); color: var(--bg); border-color: var(--ink); }
.tile-ink p { color: color-mix(in srgb, var(--bg) 78%, var(--ink)); }
.tile-ink a { color: inherit; }
.tile-ink .b-icon { background: transparent; border-color: color-mix(in srgb, var(--bg) 30%, var(--ink)); color: var(--bg); }
.tile-split { display: grid; grid-template-columns: 1fr auto; gap: 24px; align-items: end; height: 100%; }
.price { margin: 0; font: 700 clamp(4rem, 3rem + 4vw, 7rem)/.9 var(--display); letter-spacing: -.06em; text-align: right; color: var(--bg); }
.price span { color: var(--accent); }
@media (prefers-color-scheme: dark) { .price span { color: var(--accent-hover); } .tile-ink .price span { color: #4646e8; } }
.price small { display: block; font: 500 .8rem/1 var(--mono); letter-spacing: .04em; margin-top: 12px; color: color-mix(in srgb, var(--bg) 60%, var(--ink)); }

/* Why: numbered cards and quote */
.cards { display: grid; grid-template-columns: repeat(3, 1fr); gap: 16px; }
.card { background: var(--card); border: 1px solid var(--line); border-radius: var(--radius-lg); padding: 28px; }
.card p { color: var(--soft); margin: 0; }
.num { display: inline-block; font: 600 .8rem/1 var(--mono); color: var(--accent-ink); background: var(--accent-soft); padding: 7px 10px; border-radius: 999px; margin-bottom: 20px; }
.sources { margin: 20px 0 0; font-size: .86rem; color: var(--muted); }
.sources a { color: inherit; }
.quote { margin-top: 48px; padding: clamp(28px, 4vw, 48px); background: var(--card); border: 1px solid var(--line); border-radius: var(--radius-xl); display: grid; grid-template-columns: 200px 1fr; gap: 12px 40px; }
.quote h3 { font-size: .74rem; }
.quote blockquote { margin: 0; grid-row: span 2; }
.quote blockquote p { font: 550 clamp(1.25rem, 1rem + 1vw, 1.7rem)/1.4 var(--display); letter-spacing: -.02em; margin: 0; }
.quote blockquote p::before { content: "“"; color: var(--accent); }
.quote blockquote p::after { content: "”"; color: var(--accent); }
.sig { display: flex; align-items: center; gap: 14px; margin: 0; align-self: end; }
.sig a { color: var(--ink); font-weight: 600; text-decoration: none; display: block; }
.sig a:hover { text-decoration: underline; }
.sig small { display: block; color: var(--muted); font-size: .85rem; }
.avatar { width: 56px; height: 56px; border-radius: 50%; object-fit: cover; flex: none; border: 2px solid var(--card); outline: 1px solid var(--line-strong); }

/* Tabs (themes, settings, mail window): built by main.js; without JavaScript every panel shows, one under the other */
.tabbed { margin-top: 8px; }
.tabs { position: relative; display: inline-flex; gap: 2px; padding: 4px; margin-bottom: 20px; max-width: 100%; overflow-x: auto; scrollbar-width: none;
  background: var(--card); border: 1px solid var(--line); border-radius: 999px; }
.tabs::-webkit-scrollbar { display: none; }
.tab { position: relative; z-index: 1; flex: none; padding: 9px 16px; border: 0; border-radius: 999px; background: none; cursor: pointer;
  font: 600 .9rem/1 var(--font); color: var(--muted); transition: color .3s; }
.tab:hover { color: var(--ink); }
.tab[aria-selected="true"] { color: var(--on-accent); }
.tab-ind { position: absolute; z-index: 0; top: 0; left: 0; width: 0; height: 0; border-radius: 999px; background: var(--accent);
  transition: translate .45s cubic-bezier(.3, .7, .2, 1), width .45s cubic-bezier(.3, .7, .2, 1); }
.tab-panels { display: grid; gap: 40px; }
.js .tab-panels { gap: 0; }
.js .tab-panel { grid-area: 1 / 1; opacity: 0; visibility: hidden; translate: 0 10px;
  transition: opacity .18s ease, translate .22s ease, visibility 0s linear .22s; }
.js .tab-panel.is-active { opacity: 1; visibility: visible; translate: 0 0; transition: opacity .45s ease .2s, translate .6s cubic-bezier(.2, .7, .2, 1) .2s, visibility 0s; }
.panel-text { display: grid; grid-template-columns: 1fr 1.4fr; gap: 12px 48px; align-items: start; margin-bottom: 28px; }
.panel-text h3 { font-size: clamp(1.5rem, 1.2rem + 1vw, 2rem); letter-spacing: -.03em; margin: 0; }
.panel-text p { color: var(--soft); margin: 0; }
.panel-text .mini { margin-top: 16px; }

/* Screenshots: the whole window, always fitting the width of the screen (never cropped, never scrolled sideways).
   On a phone it is small: a tap opens the 2560 pixel capture, and a hint says so. */
.frame { margin: 0; padding: clamp(10px, 2vw, 20px); background: var(--card); border: 1px solid var(--line); border-radius: var(--radius-xl); }
.frame-link { display: block; border-radius: 12px; cursor: zoom-in; }
.frame img { width: 100%; border-radius: 12px; border: 1px solid var(--line); background: #fff; }
.frame-hint { display: none; margin: 10px 0 0; text-align: center; font-size: .82rem; color: var(--muted); }

.mini { list-style: none; margin: 20px 0 0; padding: 0; display: grid; gap: 10px; }
.mini li { position: relative; padding-left: 30px; color: var(--soft); }
.mini li::before { content: ""; position: absolute; left: 0; top: .2em; width: 18px; height: 18px; border-radius: 50%; background: var(--accent-soft);
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 18 18'%3E%3Cpath d='M5 9.2l2.6 2.6L13 6.4' fill='none' stroke='%234646e8' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'/%3E%3C/svg%3E"); }
.subhead { max-width: 760px; margin: clamp(56px, 7vw, 88px) 0 28px; }
.sub { font-size: clamp(1.5rem, 1.2rem + 1vw, 2rem); letter-spacing: -.03em; }
.sub-lead { color: var(--soft); }
.table-wrap { background: var(--term-bg); color: var(--term-ink); border-radius: var(--radius-lg); overflow: hidden; border: 1px solid var(--line); }
.table-wrap .term-bar { border-color: #26262c; color: var(--term-muted); }
.table-wrap .term-bar i { background: #34343c; }
.table-wrap .term-bar i:first-child { background: #ff5f57; }
.table-wrap .term-bar i:nth-child(2) { background: #febc2e; }
.table-wrap .term-bar i:nth-child(3) { background: #28c840; }
.tools { width: 100%; border-collapse: collapse; font-size: .93rem; }
.tools th { text-align: left; font: 600 .72rem/1 var(--mono); letter-spacing: .1em; text-transform: uppercase; color: var(--term-muted); padding: 16px 22px; border-bottom: 1px solid #26262c; }
.tools td { padding: 14px 22px; border-bottom: 1px solid #1f1f25; vertical-align: top; color: #c9c9d3; }
.tools tr:last-child td { border-bottom: 0; }
.tools tbody tr:hover { background: #18181d; }
.tools td:first-child { white-space: nowrap; }
.tools code { background: #1f1f27; color: #b7b7ff; }
.tools td:first-child code { background: none; padding: 0; color: #a9a9ff; font-weight: 600; }

/* The idea, after the problem */
.idea { margin: 56px auto 0; max-width: 22ch; text-align: center; font: 680 clamp(1.7rem, 1.1rem + 2.4vw, 2.9rem)/1.12 var(--display); letter-spacing: -.04em; }
.idea em { font-style: normal; color: var(--accent); }

/* Example prompts */
.prompts { display: grid; grid-template-columns: repeat(2, 1fr); gap: 16px; }
.prompt { display: flex; flex-direction: column; gap: 18px; padding: 24px 26px; background: var(--card); border: 1px solid var(--line); border-radius: var(--radius-lg); }
.prompt-text { margin: 0; font: 550 1.12rem/1.45 var(--display); letter-spacing: -.015em; }
.prompt-text::before { content: ""; display: block; width: 26px; height: 26px; margin-bottom: 14px; border-radius: 8px; background: var(--accent-soft)
  url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 26 26'%3E%3Cpath d='M8 9h10M8 13h7M7 19l-1 2.5L10 19h9a2 2 0 0 0 2-2V8a2 2 0 0 0-2-2H7a2 2 0 0 0-2 2v9a2 2 0 0 0 2 2z' fill='none' stroke='%234646e8' stroke-width='1.6' stroke-linecap='round' stroke-linejoin='round'/%3E%3C/svg%3E") center / 26px no-repeat; }
.prompt-tools { margin: auto 0 0; display: flex; flex-wrap: wrap; gap: 6px; align-items: center; font-size: .82rem; color: var(--muted); }
.prompt-tools code { font-size: .76rem; }

/* How it works */
.flow { list-style: none; margin: 0; padding: 0; display: grid; grid-template-columns: 1fr auto 1.15fr auto 1fr; align-items: stretch; }
.node { display: flex; flex-direction: column; gap: 8px; padding: 26px; background: var(--card); border: 1px solid var(--line); border-radius: var(--radius-lg); }
.node strong { font: 650 1.15rem/1.3 var(--display); letter-spacing: -.02em; }
.node span:last-child { color: var(--soft); font-size: .94rem; }
.node-tag { font: 600 .72rem/1 var(--mono); letter-spacing: .1em; text-transform: uppercase; color: var(--muted); }
.node-main { background: var(--accent); border-color: var(--accent); color: var(--on-accent); }
.node-main .node-tag, .node-main span:last-child { color: color-mix(in srgb, var(--on-accent) 80%, var(--accent)); }
.node-main strong { font-size: 1.6rem; letter-spacing: -.04em; }
.arrow { display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 6px; padding: 0 12px; color: var(--muted); font: 500 .72rem/1 var(--mono); }
.note { margin: 24px 0 0; font-size: .9rem; color: var(--muted); max-width: 80ch; }
.note a { color: inherit; }

/* Quick start */
.steps { list-style: none; margin: 0; padding: 0; counter-reset: step; display: grid; gap: 16px; }
.step { counter-increment: step; position: relative; padding: clamp(24px, 3.5vw, 40px); padding-left: clamp(24px, 3.5vw, 40px); background: var(--card); border: 1px solid var(--line); border-radius: var(--radius-xl); }
.step::before {
  content: counter(step, decimal-leading-zero);
  display: inline-block; margin-bottom: 18px;
  font: 600 .8rem/1 var(--mono); color: var(--on-accent); background: var(--accent); padding: 8px 11px; border-radius: 999px;
}
.step > h3 { font-size: clamp(1.4rem, 1.2rem + .8vw, 1.8rem); letter-spacing: -.03em; }
.step > p { color: var(--soft); max-width: 78ch; }
.os-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(260px, 1fr)); gap: 14px; margin: 24px 0 14px; }
.os-card { display: flex; flex-direction: column; padding: 22px; background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius-lg); transition: border-color .2s; }
.os-card:hover, .os-card:focus-within { border-color: var(--line-strong); }
.os-card h4 { font-size: 1.15rem; margin-bottom: 8px; }
.os-file { display: flex; flex-wrap: wrap; align-items: center; gap: 8px; font-size: .85rem; margin-bottom: 12px; }
.os-file code { background: var(--card); border: 1px solid var(--line); }
.os-file span { color: var(--muted); }
.os-card ol { margin: 0 0 20px; padding-left: 1.2em; color: var(--soft); font-size: .94rem; display: grid; gap: 6px; }
.os-card .btn { margin-top: auto; align-self: flex-start; }
.os-source { display: grid; grid-template-columns: 1fr 1fr; gap: 24px; align-items: center; padding: 22px; border: 1px dashed var(--line-strong); border-radius: var(--radius-lg); }
.os-source p { color: var(--soft); font-size: .94rem; margin: 0; }
.os-source pre { margin: 0; }

/* One-line install: a command, its copy button (shown once main.js runs) */
.oneline { display: grid; grid-template-columns: 1fr 1fr; gap: 14px; margin: 22px 0 18px; }
.cmd-label { font: 600 .74rem/1 var(--mono); letter-spacing: .08em; text-transform: uppercase; color: var(--muted); margin: 0 0 10px; }
.cmd-line { display: flex; align-items: center; gap: 10px; padding: 6px 8px 6px 0; background: var(--term-bg); border-radius: var(--radius); }
.cmd-line pre { flex: 1; min-width: 0; margin: 0; padding: 12px 0 12px 18px; background: none; font-size: 12.5px; white-space: pre-wrap; overflow-wrap: anywhere; }
.copy { display: none; flex: none; padding: 8px 13px; border-radius: 999px; cursor: pointer;
  font: 600 .78rem/1 var(--font); color: var(--term-ink); background: rgb(255 255 255 / .08); border: 1px solid rgb(255 255 255 / .16); transition: background-color .2s, border-color .2s, color .2s; }
.js .copy { display: inline-flex; }
.copy:hover { background: rgb(255 255 255 / .16); }
.copy.done { border-color: #5ad19a; color: #9ff0c8; }
.cta-row { margin: 0 0 28px; }

/* Download page */
.dl-top { padding: clamp(48px, 7vw, 88px) 0 clamp(64px, 8vw, 104px); }
.dl-top h1 { font-size: clamp(2.6rem, 1.8rem + 3.4vw, 4.4rem); }
.dl-grid { display: grid; grid-template-columns: minmax(0, .8fr) minmax(0, 1.2fr); gap: 16px; }
.dl-card { display: flex; flex-direction: column; align-items: flex-start; padding: clamp(24px, 3vw, 36px); background: var(--card); border: 1px solid var(--line); border-radius: var(--radius-xl); }
.dl-card h2 { font-size: 1.35rem; margin-bottom: 12px; }
.dl-card > p { color: var(--soft); }
.dl-card .os-file { margin-bottom: 18px; }
.dl-steps { margin: 26px 0 0; padding-left: 1.2em; color: var(--soft); font-size: .95rem; display: grid; gap: 8px; }
.dl-term { background: var(--surface); }
.dl-term .cmd-line { width: 100%; margin-bottom: 16px; }
.dl-term .small { margin: 0 0 10px; }
.dl-term .small:last-child { margin: 0; }
.cards .card h3 { font-size: 1.2rem; margin-bottom: 10px; }

/* Privacy */
.grid2 { display: grid; grid-template-columns: 1.2fr 1fr; gap: 16px; align-items: start; }
.ticks { list-style: none; margin: 0; padding: 0; display: grid; gap: 1px; background: var(--line); border: 1px solid var(--line); border-radius: var(--radius-lg); overflow: hidden; }
.ticks li { background: var(--card); padding: 18px 22px 18px 56px; position: relative; color: var(--soft); }
.ticks li strong { color: var(--ink); }
.ticks li::before {
  content: ""; position: absolute; left: 20px; top: 21px; width: 22px; height: 22px; border-radius: 50%; background: var(--t-mint);
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 22 22'%3E%3Cpath d='M6.5 11.3l3 3 6-6.3' fill='none' stroke='%23188038' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'/%3E%3C/svg%3E");
}
.callout { padding: 28px; background: var(--t-yellow); border: 1px solid var(--line); border-radius: var(--radius-lg); }
.callout h3 { font-size: 1.2rem; }
.callout p { color: var(--soft); font-size: .96rem; }
.callout p:last-child { margin: 0; }

/* FAQ */
.faq-grid { display: grid; grid-template-columns: 1fr 1.6fr; gap: 48px; align-items: start; }
.faq-grid .head { position: sticky; top: 100px; margin: 0; }
.faq { border-top: 1px solid var(--line); }
details { border-bottom: 1px solid var(--line); }
summary {
  list-style: none; cursor: pointer; display: flex; justify-content: space-between; align-items: center; gap: 20px;
  padding: 22px 0; font: 600 1.08rem/1.35 var(--display); letter-spacing: -.015em;
}
summary::-webkit-details-marker { display: none; }
summary::after {
  content: ""; flex: none; width: 30px; height: 30px; border-radius: 50%; border: 1px solid var(--line-strong);
  background:
    linear-gradient(var(--ink), var(--ink)) center / 11px 1.6px no-repeat,
    linear-gradient(var(--ink), var(--ink)) center / 1.6px 11px no-repeat;
  transition: transform .25s, background-color .2s;
}
details[open] summary::after { transform: rotate(45deg); background-color: var(--surface); }
summary:hover { color: var(--accent-ink); }
details p { color: var(--soft); margin: -6px 0 22px; max-width: 70ch; }

/* Final call to action */
/* Every section owns its space above AND below its content: never count on the neighbour's padding
   (scripts/check_layout.py fails the deployment otherwise). */
.final { padding: clamp(64px, 8vw, 104px) 0; }
.final-card {
  text-align: center; padding: clamp(48px, 7vw, 96px) clamp(20px, 5vw, 64px);
  background: #3b3bd9; color: #ffffff; border-radius: var(--radius-xl); position: relative; overflow: hidden;
}
.final-card::before {
  content: ""; position: absolute; inset: 0; pointer-events: none;
  background-image: radial-gradient(rgb(255 255 255 / .16) 1px, transparent 1px); background-size: 22px 22px;
  -webkit-mask-image: radial-gradient(ellipse at center, #000 20%, transparent 70%);
  mask-image: radial-gradient(ellipse at center, #000 20%, transparent 70%);
}
.final-card > * { position: relative; }
.final-card img { margin: 0 auto 24px; border-radius: 16px; }
.final-card h2 { font-size: clamp(2.2rem, 1.4rem + 3vw, 3.75rem); letter-spacing: -.045em; }
.final-card .lead { color: rgb(255 255 255 / .82); margin-inline: auto; }
.final-card .os-links, .final-card .os-links a, .final-card .fine { color: rgb(255 255 255 / .78); }
.final-card .fine { max-width: 62ch; margin: 16px auto 0; }
.final-card :focus-visible { outline-color: #ffffff; }

/* Footer */
.footer { border-top: 1px solid var(--line); padding: 40px 0 48px; font-size: .92rem; color: var(--muted); }
.footer-in { display: flex; flex-wrap: wrap; justify-content: space-between; gap: 24px; align-items: flex-start; }
.footer-brand p { margin: 10px 0 0; }
.footer ul { list-style: none; margin: 0; padding: 0; display: flex; flex-wrap: wrap; gap: 8px 24px; }
.footer a { color: var(--soft); text-decoration: none; }
.footer a:hover { color: var(--ink); text-decoration: underline; }
.footer .brand { color: var(--ink); }

/* 404 */
.notfound { min-height: 70vh; display: grid; place-items: center; text-align: center; padding: 72px 0; }
.notfound img { margin: 0 auto 24px; border-radius: 18px; }
.notfound .lead { margin-inline: auto; }
.notfound .cta { justify-content: center; }

/* Flow diagram: a soft pulse travels both ways along each link */
.pulse { fill: var(--accent); opacity: 0; }

/* Grid children may shrink below their content (long code lines scroll inside pre) */
.step, .panel-text > *, .tab-panel, .dl-card, .cmd, .grid2 > *, .os-source > *, .os-card, .tile, .node, .faq-grid > * { min-width: 0; }
.table-wrap { overflow-x: auto; }

/* Responsive */
@media (max-width: 1000px) {
  .flow { grid-template-columns: 1fr; }
  .arrow { flex-direction: row; padding: 10px 0; }
  /* Turned upright, the 80 x 16 arrow is 16 x 80: the margins give it that room, so it never reaches the cards */
  .arrow svg { transform: rotate(90deg); margin: 32px -32px; }
  .faq-grid { grid-template-columns: 1fr; gap: 24px; }
  .faq-grid .head { position: static; }
}
@media (max-width: 900px) {
  .oneline, .dl-grid { grid-template-columns: 1fr; }
  /* Narrow screens: the same diagram, read top to bottom. Mailboxes, a flowing line, Maily, a flowing line, AIs. */
  .hub { margin-top: 48px; }
  .hub-stage { aspect-ratio: auto; display: grid; gap: 40px; }
  .hub-lines { display: none; }
  .hub-col, .hub-core { position: static; width: auto; height: auto; padding: 0; }
  .hub-col { display: grid; gap: 8px; }
  .hub-left { grid-template-columns: repeat(3, minmax(0, 1fr)); }
  .hub-right { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .hub-label { position: static; grid-column: 1 / -1; text-align: center !important; margin-bottom: 4px; }
  /* Plain block layout: every card grows with its text (larger system text included), icons on one line at the top */
  .hub-card { display: block; min-height: 0; padding: 14px 8px 12px; text-align: center; }
  .hub-card .dot { display: block; margin: 2px auto 10px; }
  .hub-card .mark { display: block; margin: 0 auto 8px; }
  .hub-card .mark-text { display: grid; width: 22px; height: 22px; }
  .hub-card b { font-size: .86rem; overflow-wrap: anywhere; }
  .hub-card small { font-size: .72rem; margin-top: 2px; }
  .hub-core { position: relative; inset: auto; flex-direction: row; justify-content: center; gap: 12px; padding: 14px 16px; }
  .hub-core img { margin: 0; width: 40px; }
  .hub-core::before, .hub-core::after {
    content: ""; position: absolute; left: 50%; width: 2px; height: 40px; translate: -50% 0; opacity: .6;
    background: repeating-linear-gradient(to bottom, var(--accent) 0 5px, transparent 5px 12px);
  }
  .hub-core::before { bottom: 100%; }
  .hub-core::after { top: 100%; }
  .nav { display: none; }
  .topbar-cta { margin-left: auto; }
  .panel-text { grid-template-columns: 1fr; }
  .prompts { grid-template-columns: 1fr; }
  .cards { grid-template-columns: 1fr; }
  .bento { grid-template-columns: 1fr 1fr; }
  .tile-wide { grid-column: span 2; }
  .grid2, .os-source { grid-template-columns: 1fr; }
  .quote { grid-template-columns: 1fr; }
  .quote blockquote { grid-row: auto; }
}
@media (max-width: 680px) {
  .bento { grid-template-columns: 1fr; }
  .tile-wide { grid-column: auto; }
  .tile { min-height: 0; }
  .tile-split { grid-template-columns: 1fr; }
  .price { text-align: left; }
  .stats { grid-template-columns: 1fr 1fr; }
  .stats div:nth-child(3) { border-left: 0; }
  .stats div:nth-child(n+3) { border-top: 1px solid var(--line); }
  .frame-hint { display: block; }
  /* Tabs wrap onto a second row instead of hiding the last ones off screen */
  .tabs { display: flex; flex-wrap: wrap; border-radius: 22px; }
  .tab { flex: 1 1 auto; }
  /* The copy button goes under the command, which gets the whole width */
  .cmd-line { flex-direction: column; align-items: stretch; gap: 0; padding: 0 8px 8px 0; }
  .cmd-line pre { padding: 14px 0 6px 16px; }
  .copy { align-self: flex-end; }
  /* The tools table, one tool per block: its name, then what it does, full width */
  .tools, .tools tbody, .tools tr, .tools td { display: block; }
  .tools thead { display: none; }
  .tools tr { padding: 14px 18px; border-bottom: 1px solid #1f1f25; }
  .tools tr:last-child { border-bottom: 0; }
  .tools td, .tools td:first-child { padding: 0; border: 0; white-space: normal; overflow-wrap: anywhere; }
  .tools td:first-child { margin-bottom: 6px; }
  pre { font-size: 12.5px; padding: 16px; }
  .hide-sm { display: none; }
  .hero { padding-top: 48px; }
  .term-bar span { padding-right: 0; }
  .lang a { min-width: 30px; padding: 0 6px; }
}

/* Motion, only for people who have not asked their system to reduce it */
@media (prefers-reduced-motion: no-preference) {
  .btn:hover { transform: translateY(-1px); }
  .btn:active { transform: translateY(0); }
  .tile, .card, .prompt { transition: border-color .3s; }
  .card:hover, .prompt:hover { border-color: var(--line-strong); }
  :focus-visible { transition: outline-offset .15s; }

  .hero-in > * { animation: rise .8s cubic-bezier(.2, .7, .2, 1) both; }
  /* Download page: the title, then the lead, then the download cards rise in one sequence, like the hero */
  .dl-top .head > * { animation: rise .8s cubic-bezier(.2, .7, .2, 1) both; }
  .dl-top .head > :nth-child(2) { animation-delay: .08s; }
  .dl-top .head > :nth-child(3) { animation-delay: .16s; }
  .dl-top .tabbed { animation: rise-shot 1s cubic-bezier(.2, .7, .2, 1) .24s both; }
  .hero-in > :nth-child(2) { animation-delay: .08s; }
  .hero-in > :nth-child(3) { animation-delay: .16s; }
  .hero-in > :nth-child(4) { animation-delay: .24s; }
  .hero-in > :nth-child(n+5) { animation-delay: .3s; }
  .hub { animation: rise-shot 1.1s cubic-bezier(.2, .7, .2, 1) .35s both; }
  .hub-lines path { animation: flow 1.6s linear infinite; }
  .hub-lines path:nth-child(n+4) { animation-direction: reverse; }
  .hub-core { animation: glow 3.2s ease-in-out infinite; }
  .hub-core::before, .hub-core::after { animation: drip 1.1s linear infinite; }

  .js .reveal { opacity: 0; translate: 0 22px; }
  .js .reveal.in {
    opacity: 1; translate: 0 0;
    transition: opacity .7s ease-out var(--delay, 0ms), translate .8s cubic-bezier(.2, .7, .2, 1) var(--delay, 0ms);
  }

  details[open] > p { animation: open .4s cubic-bezier(.2, .7, .2, 1); }
  .target-flash { animation: flash 1.4s ease-out; }

  .pulse { animation: travel 3.2s ease-in-out infinite alternate; }
  .arrow + .node + .arrow .pulse { animation-delay: -1.6s; }
}
@keyframes flow { to { stroke-dashoffset: -24; } }
@keyframes drip { from { background-position: 0 0; } to { background-position: 0 12px; } }
@keyframes glow { 0%, 100% { box-shadow: 0 0 0 0 color-mix(in srgb, var(--accent) 0%, transparent); } 50% { box-shadow: 0 0 0 8px color-mix(in srgb, var(--accent) 14%, transparent); } }
@keyframes open { from { opacity: 0; translate: 0 -6px; } to { opacity: 1; translate: 0 0; } }
@keyframes flash { 0% { color: var(--accent); } 100% { color: inherit; } }
@keyframes rise { from { opacity: 0; transform: translateY(14px); } to { opacity: 1; transform: none; } }
@keyframes rise-shot { from { opacity: 0; transform: translateY(36px); } to { opacity: 1; transform: none; } }
@keyframes travel {
  0% { transform: translateX(0); opacity: 0; }
  15%, 85% { opacity: .9; }
  100% { transform: translateX(56px); opacity: 0; }
}
