/* localmem.org pages other than the home (specs/018). Loads after
 * /assets/v2/base.css, which holds the font, the colour tokens, type, buttons,
 * the nav and the footer (R11, v2); this file lays out the pages' content.
 * It uses the base.css token names only; the site is light only. */
/* Page content starts from zero margins, as the page layouts expect. */
:where(main *) { margin: 0; padding: 0 }

/* Section links land below the sticky nav, not under it. */
html { scroll-padding-top: 96px }
/* On these pages the nav is always the pill, and it keeps its own space. */
p, ul, ol { margin-top: 0 }
a { color: var(--accent-ink); text-decoration: none }
a:hover { text-decoration: underline; text-underline-offset: 3px }
.nav a, .foot a, .logo { color: inherit }
.nav a:hover, .foot .cols a:hover, .logo:hover { text-decoration: none }
.foot .cols a { color: #D6D9E8 }

.wrap { max-width: none; margin: 0 auto; padding: 0 var(--gut) }
.wide { padding: 0 var(--gut); max-width: none; margin-inline: auto }

.actions { display: flex; flex-wrap: wrap; gap: 12px }
.more { font-size: 15px; font-weight: 600 }

/* --- type --- */
.eyebrow::before { content: ""; width: 10px; height: 10px; border-radius: 50%; background: var(--green); box-shadow: 0 0 0 4px color-mix(in srgb, var(--green) 22%, transparent); }
h2 { max-width: 26ch; margin-bottom: 18px; }
h2 em, h1 em, .accent { font-style: normal; color: var(--accent-ink); }
h3 { margin-bottom: 8px; line-height: 1.35; }
.steps + .sub { margin-top: 40px; }
.sub { max-width: 62ch; margin-bottom: 40px; color: var(--muted); font-size: var(--fs-lead); line-height: 1.65; }

/* --- hero --- */
/* Sized by the window's height as well as its width, so the actions sit
   above the fold on a laptop screen and the big type stays big. */
.hero { padding: clamp(56px, min(9vw, 10vh), 130px) 0 clamp(56px, 7vw, 110px); }
.hero h1 {
  max-width: 18ch; margin-bottom: clamp(18px, 3vh, 28px);
  line-height: 1.12;
}
.lede { max-width: 60ch; margin-bottom: clamp(24px, 4vh, 36px); font-size: var(--fs-lead); line-height: 1.65; color: var(--muted); }
.today {
  margin-top: 22px; font-family: var(--mono); font-size: 12px;
  letter-spacing: 0.08em; text-transform: uppercase; color: var(--muted);
}

/* --- sections: rules and space, not boxes (R11) --- */
section.band { padding: clamp(72px, 9vw, 130px) 0; }
section.band.alt { background: var(--bg-2); }
.steps, .points { display: grid; gap: 36px 40px; grid-template-columns: 1fr; list-style: none; }
@media (min-width: 640px) { .steps, .points { grid-template-columns: repeat(2, 1fr); } }
@media (min-width: 1000px) { .steps { grid-template-columns: repeat(4, 1fr); } .steps.three, .points.three { grid-template-columns: repeat(3, 1fr); } }
.steps li, .points > * { padding: 28px; border: 1px solid var(--line); border-radius: var(--r-card); background: var(--surface); box-shadow: var(--shadow-card); }
section.band.alt .steps li, section.band.alt .points > * { background: var(--bg); }
.steps p, .points p { color: var(--muted); font-size: 16px; }
.num { display: block; margin-bottom: 14px; font-size: clamp(1.8rem, 2.8vw, 2.7rem); font-weight: 600; letter-spacing: -0.025em; line-height: 1; color: var(--accent-ink); }
.split { display: grid; gap: 40px; grid-template-columns: 1fr; align-items: start; }
@media (min-width: 900px) { .split { grid-template-columns: 1fr 1fr; gap: 64px; } }
.ticks { list-style: none; display: grid; gap: 18px; }
.ticks li { position: relative; padding-left: 26px; color: var(--ink); font-size: 17px; }
.ticks li::before { content: ""; position: absolute; left: 0; top: 0.5em; width: 10px; height: 10px; border-radius: 50%; background: var(--green); }
.tag {
  display: inline-block; margin-bottom: 14px; padding: 4px 10px; border-radius: 999px;
  background: var(--pink-soft); color: var(--navy);
  font-size: 11px; font-weight: 700; letter-spacing: 0.08em; text-transform: uppercase;
}
.lead-line { max-width: 40ch; margin-bottom: 18px; font-size: clamp(1.4rem, 2.4vw, 2.1rem); line-height: 1.25; font-weight: 500; letter-spacing: -0.02em; }
.closing { text-align: left; }
.closing h2 { max-width: 24ch; }

/* --- text pages: privacy, terms, 404, gone --- */
.doc { max-width: 720px; padding-top: 48px; padding-bottom: 56px; font-size: 15.5px; line-height: 1.65; }
.doc h1 { margin-bottom: 10px; font-size: var(--fs-read-h1); line-height: 1.08; }
.doc .updated { margin-bottom: 28px; font-size: 13px; color: var(--muted); }
.update-banner { display: block; width: 100%; height: auto; margin: 8px 0 24px; border-radius: 10px; }
.doc .summary { margin-bottom: 32px; padding: 18px 20px; border: 1px solid var(--line); border-radius: var(--r-box); background: var(--surface); }
.doc h2 { max-width: none; margin: 40px 0 12px; padding-top: 22px; border-top: 1px solid var(--line); font-size: var(--fs-read-h2); font-weight: 600; letter-spacing: -0.02em; line-height: 1.2; }
.doc h3 { margin-top: 24px; }
.doc p, .doc ul { margin-bottom: 12px; }
.doc ul { padding-left: 22px; }
.doc li { margin-bottom: 6px; }
.doc code { font-family: ui-monospace, "SF Mono", Menlo, monospace; font-size: 0.86em; overflow-wrap: anywhere; }
.doc p code, .doc li code, .doc td code { padding: 1px 6px; border-radius: 6px; background: var(--bg-2); }
.doc pre { margin-bottom: 16px; padding: 16px 18px; overflow-x: auto; border-radius: var(--r-box); background: var(--navy); color: #EEEAE2; font-size: 13px; line-height: 1.6; }
.doc pre code { font-size: inherit; overflow-wrap: normal; }
.doc pre, .doc code { font-family: var(--code); }
.doc table { width: 100%; margin-bottom: 14px; border-collapse: collapse; font-size: 14.5px; }
.doc th, .doc td { padding: 10px 12px; border-bottom: 1px solid var(--line); text-align: left; vertical-align: top; }
.doc th { font-weight: 700; }
.table-wrap { overflow-x: auto; }
.points p.lead-line { font-size: clamp(20px, 2vw, 28px); color: var(--ink); }

/* --- illustrations: inline SVG drawn with the tokens (R11) --- */
.ill { display: block; width: 100%; height: auto; }
.ill text { font-family: var(--body); font-size: 11px; fill: var(--muted); letter-spacing: 0.04em; }
.ill text.strong { fill: var(--ink); font-weight: 700; }
.ill text.big { font-family: var(--body); font-size: 14px; font-weight: 600; fill: var(--ink); letter-spacing: 0; }
.ill text.acc { fill: var(--accent-ink); }
.ill .card { fill: var(--surface); stroke: var(--ink); stroke-width: 1.25; }
.ill .bar { fill: var(--line); }
.ill .bar.on { fill: var(--green); }
.ill .rule { stroke: var(--line); stroke-width: 1; fill: none; }
.ill .edge { stroke: var(--muted); stroke-width: 1.25; fill: none; }
.ill .edge.old { stroke-dasharray: 4 4; opacity: 0.6; }
.ill .node { fill: var(--surface); stroke: var(--ink); stroke-width: 1.5; }
.ill .node.acc { fill: var(--green); stroke: var(--green); }
.ill .tick { stroke: var(--bg); stroke-width: 2; fill: none; }
.ill .run { stroke: var(--green); stroke-width: 2; fill: none; stroke-dasharray: 6 8; animation: dash 1.4s linear 3; }
.ill .pulse { transform-box: fill-box; transform-origin: center; animation: pulse 2.4s ease-in-out 2; }
@keyframes dash { to { stroke-dashoffset: -28; } }
@keyframes pulse { 0%, 100% { transform: scale(1); } 50% { transform: scale(1.18); } }
@media (prefers-reduced-motion: reduce) { .ill .run, .ill .pulse { animation: none; } }

.icon { display: block; width: 36px; height: 36px; margin-bottom: 14px; }
.icon * { fill: none; stroke: var(--accent-ink); stroke-width: 1.75; stroke-linecap: round; stroke-linejoin: round; }
.icon .fill { fill: var(--pink-soft); }
.figure { margin-top: 8px; }
.split.center { align-items: center; }

/* Haystack and slice: what a model is handed with and without a memory layer. */
@media (min-width: 800px) { .hay { display: grid; grid-template-columns: repeat(24, 1fr); gap: 3px; margin: 14px 0 18px; } }
.hay span { height: 10px; border-radius: 3px; background: var(--line); }
.hay span.on { background: var(--green); }
.hay.slice { grid-template-columns: repeat(24, 1fr); }
.hay.slice span { background: transparent; }
.hay.slice span.on { background: var(--green); }
.hay.slice span.near { background: var(--pink-soft); }

/* With and without a ledger. */
.table-wrap { overflow-x: auto; }
.ill.graph text { paint-order: stroke; stroke: var(--bg); stroke-width: 5px; stroke-linejoin: round; }
/* On a phone the drawings shrink to ~65%; larger text keeps them legible.
 * The graph is decorative and too dense at that size, so it is left out. */
@media (max-width: 640px) {
  .ill text { font-size: 14px; }
  .ill text.big { font-size: 16px; }
  .ill.graph { display: none; }
}

/* Docs (specs/019): the product switch in the menu (layout: .reader in base.css), and flows drawn without script. */
.docs-products { display: flex; gap: 4px; margin-bottom: 14px; padding: 4px; border: 1px solid var(--line); border-radius: 999px; background: var(--surface); }
.reader-menu .docs-products a { flex: 1; white-space: nowrap; padding: 6px 10px; border: 0; border-radius: 999px; text-align: center; font-size: 13.5px; font-weight: 600; }
.reader-menu .docs-products a[aria-current="true"] { background: var(--ink); color: var(--bg); }
/* the pricing page's product switch (/pricing, assets/v2/pricing.js), the docs' pill (.docs-products) */
.price-products { display: inline-flex; gap: 4px; margin-top: 28px; padding: 4px; border: 1px solid var(--line); border-radius: 999px; background: var(--surface); }
.price-products a { padding: 8px 18px; border-radius: 999px; font-size: 15px; font-weight: 600; color: var(--muted); text-decoration: none; }
.price-products a:hover { color: var(--ink); }
.price-products a[aria-selected="true"] { background: var(--ink); color: var(--bg); }
.price-products a:focus-visible { outline: 2px solid var(--ink); outline-offset: 2px; }
.price-panel[hidden] { display: none; }
.hero.compact { padding: clamp(40px, 5vw, 72px) 0 0; }
.hero.compact h1 { font-size: var(--fs-read-h1); }
.price-panel > section.band:first-of-type { padding-top: clamp(40px, 4vw, 64px); }
@media (max-width: 760px) { .price-products { display: flex; } .price-products a { flex: 1; padding: 8px 10px; text-align: center; } }
.flowline { display: flex; flex-wrap: wrap; gap: 10px 28px; margin: 4px 0 18px; padding: 0; list-style: none; counter-reset: none; }
.doc .flowline { padding-left: 0; }
.flowline li { position: relative; flex: 1 1 150px; margin: 0; padding: 14px 16px; border: 1px solid var(--line); border-radius: 16px; background: var(--surface); font-size: 14px; line-height: 1.45; }
.flowline li strong { display: block; margin-bottom: 4px; }
.flowline li span { color: var(--muted); }
.flowline li + li::before { content: "→"; position: absolute; left: -22px; top: 50%; transform: translateY(-50%); color: var(--pink-ink); font-weight: 700; }
@media (max-width: 760px) {
  .docs-products { flex-basis: 100%; }
  .flowline { flex-direction: column; gap: 22px; }
  .flowline li { flex: none; }
  .flowline li + li::before { content: "↓"; left: 50%; top: -18px; transform: translateX(-50%); }
}

/* a point beside its recording (base.css .screen), alternating sides on wide screens: /teams */
.features { display: grid; gap: clamp(56px, 7vw, 120px); margin-top: 56px }
.feature { display: grid; gap: 28px; align-items: center }
.feature h3 { font-size: var(--fs-h3); margin-bottom: 12px }
.feature p { color: var(--muted); font-size: var(--fs-lead); line-height: 1.65; max-width: 46ch; margin: 0 }
@media (min-width: 900px) {
  .feature { grid-template-columns: minmax(0, 1fr) minmax(0, 1.4fr); gap: clamp(40px, 5vw, 96px) }
  .feature:nth-child(even) { grid-template-columns: minmax(0, 1.4fr) minmax(0, 1fr) }
  .feature:nth-child(even) > div { order: 2 }
}

/* /use-cases: every story as a card, the same cards as the home page's rail (base.css .uc) */
.uc-grid { list-style: none; margin: 0; padding: 0; display: grid; grid-template-columns: repeat(auto-fill, minmax(min(100%, 340px), 1fr)); gap: 18px }
.uc-grid .uc a { min-height: 380px }
section.band.uses-all { padding-top: 0 }
