/* Temmo. Kurv Tech family tokens (warm paper, graphite night) with Temmo orange. */

:root {
  color-scheme: light dark;
  --bg: hsl(40 22% 97%);
  --surface: hsl(40 30% 99%);
  --ink: hsl(30 12% 9%);
  --muted: hsl(30 6% 34%);
  --line: hsl(35 12% 86%);
  --accent: hsl(26 90% 48%);
  --accent-ink: hsl(22 85% 34%);
  --aura: hsl(28 95% 85%);
  --aura-2: hsl(50 90% 84%);
  --term-bg: hsl(28 14% 9%);
  --term-ink: hsl(40 25% 92%);
  --term-dim: hsl(35 8% 58%);
  --sans: system-ui, -apple-system, 'Segoe UI', Roboto, 'Helvetica Neue', Arial, sans-serif;
  --mono: ui-monospace, SFMono-Regular, Menlo, Consolas, 'Liberation Mono', monospace;
  --radius: 16px;
}
:root[data-theme='light'] { color-scheme: light; }
:root[data-theme='dark'] { color-scheme: dark; }
/* Dark values. Plain overrides instead of light-dark(), which iOS Safari
   before 17.5 drops; SVG fills then fall back to black. */
@media (prefers-color-scheme: dark) {
  :root:not([data-theme='light']) {
  --bg: hsl(220 14% 5%);
    --surface: hsl(220 12% 9%);
    --ink: hsl(40 20% 94%);
    --muted: hsl(40 6% 66%);
    --line: hsl(220 8% 18%);
    --accent: hsl(32 95% 62%);
    --accent-ink: hsl(34 95% 70%);
    --aura: hsl(24 80% 32%);
    --aura-2: hsl(40 70% 22%);
  }
}
:root[data-theme='dark'] {
  --bg: hsl(220 14% 5%);
  --surface: hsl(220 12% 9%);
  --ink: hsl(40 20% 94%);
  --muted: hsl(40 6% 66%);
  --line: hsl(220 8% 18%);
  --accent: hsl(32 95% 62%);
  --accent-ink: hsl(34 95% 70%);
  --aura: hsl(24 80% 32%);
  --aura-2: hsl(40 70% 22%);
}

*, *::before, *::after { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; }
body {
  margin: 0;
  min-height: 100dvh;
  display: flex;
  flex-direction: column;
  background: var(--bg);
  color: var(--ink);
  font: 400 1.0625rem/1.6 var(--sans);
  -webkit-font-smoothing: antialiased;
  overflow-x: clip;
}
main { flex: 1; }
a { color: inherit; text-underline-offset: 0.2em; text-decoration-thickness: 1px; }
a:hover { color: var(--accent-ink); }
:focus-visible { outline: 2px solid var(--accent); outline-offset: 3px; border-radius: 6px; }
h1, h2, h3 { text-wrap: balance; }
p { text-wrap: pretty; }
.wrap { width: min(100% - 2.5rem, 1080px); margin-inline: auto; }
.skip { position: absolute; left: 1rem; top: -4rem; padding: 0.5rem 0.8rem; border-radius: 8px; background: var(--ink); color: var(--bg); z-index: 10; }
.skip:focus { top: 1rem; }

/* one soft aura, low left */
body::before {
  content: '';
  position: fixed;
  z-index: -1;
  left: -20vmax;
  bottom: -30vmax;
  width: 70vmax;
  height: 70vmax;
  border-radius: 50%;
  background:
    radial-gradient(closest-side at 40% 45%, var(--aura), transparent 75%),
    radial-gradient(closest-side at 65% 35%, var(--aura-2), transparent 70%);
  filter: blur(30px);
  opacity: 0.8;
  pointer-events: none;
}
:root[data-theme='dark'] body::before { opacity: 0.45; }
@media (prefers-color-scheme: dark) { :root:not([data-theme='light']) body::before { opacity: 0.45; } }

/* header */
.top { display: flex; align-items: center; gap: 1rem; padding-block: 1.4rem; }
.mark { display: inline-flex; align-items: center; gap: 0.55rem; text-decoration: none; font: 650 1.15rem var(--mono); letter-spacing: -0.02em; margin-right: auto; }
.mark svg { width: 28px; height: 28px; }
.mark-bg { fill: var(--ink); }
.mark-fg { stroke: var(--accent); }
.status { display: inline-flex; align-items: center; gap: 0.45rem; margin: 0; padding: 0.2rem 0.7rem; border: 1px solid var(--line); border-radius: 999px; font: 500 0.75rem var(--mono); color: var(--accent-ink); background: var(--surface); }
.status .dot { width: 7px; height: 7px; border-radius: 50%; background: var(--accent); }
.by { font: 500 0.85rem var(--mono); color: var(--muted); text-decoration: none; }
.by:hover { color: var(--ink); }

/* hero */
.hero { padding-block: clamp(3.5rem, 11vh, 8rem) 3rem; }
.eyebrow { margin: 0 0 1rem; font: 500 0.85rem var(--mono); color: var(--accent-ink); }
h1 {
  margin: 0;
  font-size: clamp(2.2rem, 1.2rem + 5.4vw, 5.6rem);
  line-height: 0.98;
  font-weight: 780;
  letter-spacing: -0.04em;
  max-width: 20ch;
}
h1 span { color: var(--muted); }
.lede { margin: 1.6rem 0 0; max-width: 36rem; font-size: clamp(1.05rem, 0.95rem + 0.4vw, 1.25rem); color: var(--muted); }

/* the install placeholder */
.term {
  margin: 2.6rem 0 0;
  max-width: 40rem;
  border-radius: 14px;
  background: var(--term-bg);
  color: var(--term-ink);
  border: 1px solid hsl(30 10% 18%);
  box-shadow: 0 1px 2px hsl(30 20% 10% / 0.08), 0 24px 50px -28px hsl(24 60% 20% / 0.55);
  overflow: hidden;
}
.term-bar { display: flex; align-items: center; gap: 6px; padding: 0.65rem 0.9rem; border-bottom: 1px solid hsl(30 10% 18%); font: 400 0.72rem var(--mono); color: var(--term-dim); }
.term-bar i { width: 10px; height: 10px; border-radius: 50%; background: hsl(30 8% 26%); }
.term-bar span { margin-left: auto; }
.term-body { display: flex; align-items: center; gap: 1rem; padding: 1.1rem 1rem 1.1rem 1.2rem; }
.term code { flex: 1; min-width: 0; font: 400 clamp(0.82rem, 0.75rem + 0.35vw, 1rem) var(--mono); overflow-x: auto; white-space: nowrap; color: var(--term-ink); opacity: 0.72; }
.term .ps { color: hsl(32 95% 62%); margin-right: 0.5ch; }
.copy {
  flex: none;
  padding: 0.4rem 0.8rem;
  border: 1px solid hsl(30 10% 26%);
  border-radius: 8px;
  background: transparent;
  color: var(--term-dim);
  font: 500 0.75rem var(--mono);
}
.copy:disabled { cursor: not-allowed; opacity: 0.7; }
.term figcaption { padding: 0.75rem 1.2rem 0.9rem; border-top: 1px dashed hsl(30 10% 20%); font: 400 0.8rem var(--mono); color: var(--term-dim); }
.term figcaption strong { color: hsl(32 95% 62%); font-weight: 600; }

/* wide screens: lede and install card side by side under the headline */
@media (min-width: 1000px) {
  .hero { display: grid; grid-template-columns: 1fr 1fr; column-gap: 4rem; align-items: end; }
  .hero .eyebrow, .hero h1 { grid-column: 1 / -1; }
  .term { margin-top: 1.6rem; }
}

/* points */
.points { padding-block: 4rem; }
h2 { margin: 0 0 1.8rem; font-size: clamp(1.5rem, 1.1rem + 1.4vw, 2.2rem); letter-spacing: -0.025em; font-weight: 720; }
.points ol { list-style: none; counter-reset: p; margin: 0; padding: 0; display: grid; grid-template-columns: repeat(2, 1fr); gap: 1px; background: var(--line); border: 1px solid var(--line); border-radius: var(--radius); overflow: hidden; }
.points li { counter-increment: p; padding: 1.6rem 1.5rem; background: var(--surface); }
.points li::before { content: '0' counter(p); display: block; margin-bottom: 0.8rem; font: 500 0.75rem var(--mono); color: var(--accent-ink); }
.points h3 { margin: 0 0 0.35rem; font-size: 1.2rem; letter-spacing: -0.015em; }
.points p { margin: 0; color: var(--muted); }

/* family */
.family { padding-block: 2rem 3rem; }
.family h2 a { text-decoration-color: var(--accent); }
.family ul { list-style: none; margin: 0; padding: 0; display: grid; grid-template-columns: repeat(3, 1fr); gap: 0.8rem; }
.family li { display: flex; flex-direction: column; gap: 0.2rem; padding: 1.1rem 1.2rem; border: 1px solid var(--line); border-radius: 12px; }
.family li > :first-child { font-size: 1.1rem; text-decoration: none; }
.family li > a:hover { color: var(--accent-ink); }
.family li > :last-child { font: 400 0.78rem var(--mono); color: var(--muted); }
.family .here { border-color: var(--accent); background: color-mix(in oklab, var(--accent) 8%, transparent); }

/* contact + footer */
.contact { padding-block: 3rem 2rem; }
.contact h2 { margin-bottom: 0.4rem; }
.mail { font: 700 clamp(1.6rem, 1rem + 3vw, 3rem) var(--sans); letter-spacing: -0.03em; text-decoration: none; border-bottom: 2px solid var(--accent); }
.foot { display: flex; flex-wrap: wrap; gap: 0.5rem 1.4rem; padding-block: 2.5rem 3rem; margin-top: 3rem; border-top: 1px solid var(--line); font: 400 0.8rem var(--mono); color: var(--muted); }
.foot a { color: var(--muted); text-decoration: none; }
.foot a:hover { color: var(--ink); }

/* 404 */
.lost { padding-block: clamp(4rem, 16vh, 10rem); }
.lost h1 { max-width: none; }
.lost p { color: var(--muted); }

@media (max-width: 720px) {
  .points ol, .family ul { grid-template-columns: 1fr; }
  .by { display: none; }
  .term-body { flex-direction: column; align-items: stretch; }
  .copy { align-self: flex-start; }
}

/* legal pages (terms, privacy). Shared block across the Kenby, Temmo and Elvs sites. */
.legal { max-width: 48rem; padding-block: 2rem 3rem; }
.draft-banner { margin: 0.5rem 0 2rem; padding: 0.75rem 1rem; border: 1px dashed var(--accent); border-radius: 10px; background: color-mix(in oklab, var(--accent) 8%, transparent); font: 400 0.85rem/1.5 var(--mono); color: var(--accent-ink); }
.legal h1 { max-width: none; font-size: clamp(2rem, 1.4rem + 2.6vw, 3.2rem); line-height: 1.05; }
.legal .meta { margin: 0.8rem 0 1.8rem; font: 400 0.8rem var(--mono); color: var(--muted); }
.legal .summary { padding: 1rem 1.2rem; border: 1px solid var(--line); border-radius: 12px; background: var(--surface); }
.legal .summary p { margin: 0; }
.legal .toc { margin: 2rem 0; padding: 1rem 1.2rem; border-left: 2px solid var(--line); font: 400 0.85rem var(--mono); }
.legal .toc ol { margin: 0; padding-left: 0; list-style: none; columns: 2 16rem; column-gap: 2rem; }
.legal .toc li { margin: 0 0 0.35rem; break-inside: avoid; }
.legal .toc a { color: var(--muted); text-decoration: none; }
.legal .toc a:hover { color: var(--accent-ink); }
.legal section { scroll-margin-top: 1.5rem; }
.legal h2 { margin: 2.4rem 0 0.7rem; font-size: 1.3rem; letter-spacing: -0.015em; }
.legal p, .legal li { line-height: 1.7; }
.legal ul { padding-left: 1.2rem; }
.legal li { margin-bottom: 0.4rem; }
.legal .ph { padding: 0.05em 0.35em; border-radius: 4px; background: color-mix(in oklab, var(--accent) 14%, transparent); color: var(--accent-ink); font: 500 0.88em var(--mono); white-space: nowrap; }
.legal .other { margin-top: 3rem; color: var(--muted); }
@media (max-width: 720px) { .legal .ph { white-space: normal; } }

/* 2026-11 content pass, shared across Kenby, Temmo and Elvs: "Soon" badge,
   diagrams (inline SVG, wide and tall variants), comparison table, example,
   "Coming" strip, and the short legal pages. Classes only; no inline styles. */
.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; }
.soon { display: inline-flex; align-items: center; padding: 0.15rem 0.6rem; border: 1px solid var(--accent); border-radius: 999px; color: var(--accent-ink); font: 500 0.72rem var(--mono); white-space: nowrap; }
.sec { padding-block: 3rem; }
.sec h2 { margin-bottom: 1.2rem; }

.diagram { margin: 0; padding: 1.1rem; border: 1px solid var(--line); border-radius: var(--radius); background: color-mix(in oklab, var(--surface) 88%, transparent); }
.diagram svg { display: block; width: 100%; height: auto; }
.diagram .d-tall { display: none; }
@media (max-width: 640px) { .diagram .d-wide { display: none; } .diagram .d-tall { display: block; } }
.d-box { fill: var(--bg); stroke: var(--line); stroke-width: 1.5; }
.d-box.hot { stroke: var(--accent); fill: var(--surface); fill: color-mix(in oklab, var(--accent) 10%, var(--bg)); }
.d-text { fill: var(--ink); font: 600 15px var(--sans); }
.d-sub { fill: var(--muted); font: 400 12px var(--mono); }
.d-line { fill: none; stroke: var(--muted); stroke-width: 1.4; opacity: 0.6; }
.d-dash { fill: none; stroke: var(--muted); stroke-width: 1.2; stroke-dasharray: 3 5; opacity: 0.7; }
.d-node { fill: var(--bg); stroke: var(--muted); stroke-width: 2; }
.d-node.hot { fill: var(--accent); stroke: var(--accent); }
.d-flow { fill: none; stroke: var(--accent); stroke-width: 2.2; stroke-dasharray: 6 7; stroke-linecap: round; }
.d-arrow { fill: var(--accent); }
.d-band { fill: var(--surface); fill: color-mix(in oklab, var(--accent) 12%, var(--bg)); stroke: var(--accent); stroke-width: 1.2; }
@media (prefers-reduced-motion: no-preference) { .d-flow { animation: dflow 1.4s linear infinite; } }
@keyframes dflow { to { stroke-dashoffset: -26; } }

.cmp-wrap { overflow-x: auto; border: 1px solid var(--line); border-radius: var(--radius); background: var(--surface); }
.cmp { width: 100%; min-width: 36rem; border-collapse: collapse; }
.cmp th, .cmp td { padding: 0.8rem 0.9rem; border-bottom: 1px solid var(--line); text-align: center; }
.cmp tbody th { text-align: left; font-weight: 500; }
.cmp thead th { font: 500 0.75rem var(--mono); color: var(--muted); vertical-align: bottom; }
.cmp tbody tr:last-child > * { border-bottom: 0; }
.cmp .us { background: color-mix(in oklab, var(--accent) 9%, transparent); }
.cmp thead .us { color: var(--accent-ink); font-weight: 700; }
.cmp .y { color: var(--accent-ink); font-weight: 700; }
.cmp .p, .cmp .n { color: var(--muted); }
.legend { margin: 0.7rem 0 0; font: 400 0.75rem var(--mono); color: var(--muted); }

.coming { display: flex; flex-wrap: wrap; gap: 0.5rem; margin: 0; padding: 0; list-style: none; }
.coming li { padding: 0.45rem 0.85rem; border: 1px dashed var(--line); border-radius: 999px; font: 500 0.85rem var(--mono); color: var(--muted); }

.legal .updated { margin: 0.5rem 0 1.6rem; font: 400 0.8rem var(--mono); color: var(--muted); }
.legal-links { display: flex; gap: 1rem; flex-wrap: wrap; margin: 1.2rem 0 0; padding: 0; list-style: none; }
.legal-links a { font-weight: 600; }

/* Temmo: example run log, and the "Soon" badge on the dark terminal */
.term .soon { margin-left: auto; border-color: hsl(32 95% 62%); color: hsl(32 95% 62%); }
.term.log { max-width: 46rem; margin: 0; }
.log-lines { list-style: none; margin: 0; padding: 1rem 1.2rem 1.2rem; font: 400 clamp(0.8rem, 0.74rem + 0.3vw, 0.95rem)/1.9 var(--mono); color: var(--term-ink); overflow-x: auto; }
.log-lines li { white-space: nowrap; }
.log-lines b { display: inline-block; min-width: 6ch; font-weight: 500; color: var(--term-dim); }
.log-lines .ok b { color: hsl(140 55% 60%); }

/* Comparison: on narrow screens each row stacks, and every cell carries its column label. */
@media (max-width: 640px) {
  .cmp-wrap { overflow: visible; }
  .cmp { min-width: 0; }
  .cmp thead { position: absolute; width: 1px; height: 1px; overflow: hidden; clip-path: inset(50%); }
  .cmp tbody, .cmp tr { display: block; }
  .cmp tr { display: flex; flex-wrap: wrap; border-bottom: 1px solid var(--line); }
  .cmp tbody tr:last-child { border-bottom: 0; }
  .cmp th, .cmp td { border-bottom: 0; }
  .cmp tbody th { flex: 1 0 100%; padding-bottom: 0.3rem; }
  .cmp td { flex: 1 1 0; display: grid; gap: 0.2rem; padding-top: 0.3rem; }
  .cmp td::before { content: attr(data-label); font: 400 0.68rem var(--mono); font-weight: 400; color: var(--muted); }
}
.foot .legal-foot { display: inline-flex; gap: 0.5rem; }
