/* Elvs. Kurv Tech family tokens (warm paper, graphite night) with Elvs violet. */

: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(262 58% 55%);
  --accent-ink: hsl(262 52% 42%);
  --accent-soft: hsl(262 70% 95%);
  --aura: hsl(262 70% 88%);
  --aura-2: hsl(165 55% 84%);
  --sans: system-ui, -apple-system, 'Segoe UI', Roboto, 'Helvetica Neue', Arial, sans-serif;
  --round: ui-rounded, 'SF Pro Rounded', system-ui, -apple-system, 'Segoe UI', Roboto, sans-serif;
  --mono: ui-monospace, SFMono-Regular, Menlo, Consolas, 'Liberation Mono', monospace;
  --radius: 18px;
}
: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(262 85% 76%);
    --accent-ink: hsl(262 90% 82%);
    --accent-soft: hsl(262 40% 16%);
    --aura: hsl(262 60% 30%);
    --aura-2: hsl(170 50% 20%);
  }
}
: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(262 85% 76%);
  --accent-ink: hsl(262 90% 82%);
  --accent-soft: hsl(262 40% 16%);
  --aura: hsl(262 60% 30%);
  --aura-2: hsl(170 50% 20%);
}

*, *::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 { font-family: var(--round); 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, top right */
body::before {
  content: '';
  position: fixed;
  z-index: -1;
  right: -22vmax;
  top: -28vmax;
  width: 70vmax;
  height: 70vmax;
  border-radius: 50%;
  background:
    radial-gradient(closest-side at 40% 55%, var(--aura), transparent 75%),
    radial-gradient(closest-side at 65% 40%, var(--aura-2), transparent 70%);
  filter: blur(30px);
  opacity: 0.85;
  pointer-events: none;
}

/* 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: 700 1.2rem var(--round); letter-spacing: -0.02em; margin-right: auto; }
.mark svg { width: 28px; height: 28px; }
.mark-bg { fill: var(--accent); }
.mark-fg { fill: var(--bg); }
.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, 10vh, 7rem) 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 + 5vw, 5.2rem);
  line-height: 1;
  font-weight: 760;
  letter-spacing: -0.035em;
  max-width: 15ch;
}
.lede { margin: 1.6rem 0 0; max-width: 37rem; font-size: clamp(1.05rem, 0.95rem + 0.4vw, 1.25rem); color: var(--muted); }

/* the flow diagram */
.flow {
  margin: 2.8rem 0 0;
  padding: 1.6rem 1.4rem 1.1rem;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: color-mix(in oklab, var(--surface) 88%, transparent);
  box-shadow: 0 1px 2px hsl(262 30% 20% / 0.05), 0 24px 50px -30px hsl(262 50% 30% / 0.35);
  max-width: 46rem;
}
.flow-grid { display: grid; grid-template-columns: auto 1fr auto; align-items: center; gap: 1rem; }
.col { list-style: none; margin: 0; padding: 0; display: grid; gap: 0.6rem; }
.chip {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  padding: 0.5rem 0.8rem;
  border: 1px solid var(--line);
  border-radius: 12px;
  background: var(--surface);
  font: 600 0.9rem var(--round);
  white-space: nowrap;
}
.chip .ico { display: grid; place-items: center; width: 1.4rem; height: 1.4rem; border-radius: 7px; font: 700 0.75rem var(--sans); color: #fff; }
.slack .ico { background: hsl(330 55% 45%); }
.tg .ico { background: hsl(200 75% 45%); font-size: 0.65rem; }
.worker { font: 500 0.82rem var(--mono); color: var(--muted); }
.worker .ico { width: auto; height: auto; color: var(--accent); background: none; font-size: 0.7rem; }

.lanes { display: grid; gap: 2.4rem; padding-top: 1rem; }
.lane { position: relative; height: 2px; background-image: linear-gradient(90deg, var(--line) 50%, transparent 0); background-size: 8px 2px; }
.lane .tag { position: absolute; left: 50%; top: -1.15rem; translate: -50% 0; font: 400 0.68rem var(--mono); color: var(--muted); white-space: nowrap; }
.lane i {
  position: absolute;
  top: -4px;
  left: 0;
  width: 10px;
  height: 10px;
  border-radius: 3px;
  background: var(--accent);
}
.lane.out i { left: auto; right: 0; border-radius: 50%; background: hsl(165 55% 38%); }
.lane.out .tag { color: hsl(165 45% 32%); }
:root[data-theme='dark'] .lane.out .tag { color: hsl(165 50% 62%); }
@media (prefers-color-scheme: dark) { :root:not([data-theme='light']) .lane.out .tag { color: hsl(165 50% 62%); } }

@media (prefers-reduced-motion: no-preference) {
  .lane.in i { animation: run-in 3.2s cubic-bezier(0.45, 0, 0.3, 1) infinite; }
  .lane.in.two i { animation-delay: 0.9s; }
  .lane.in i.late { animation-delay: 1.6s; }
  .lane.in.two i.late { animation-delay: 2.5s; }
  .lane.out i { animation: run-out 3.2s cubic-bezier(0.45, 0, 0.3, 1) 1.4s infinite; }
}
@keyframes run-in {
  0% { left: 0; opacity: 0; }
  10% { opacity: 1; }
  85% { opacity: 1; }
  100% { left: calc(100% - 10px); opacity: 0; }
}
@keyframes run-out {
  0% { right: 0; opacity: 0; }
  10% { opacity: 1; }
  85% { opacity: 1; }
  100% { right: calc(100% - 10px); opacity: 0; }
}
/* with motion off, the dots rest mid-lane so the diagram still reads */
@media (prefers-reduced-motion: reduce) {
  .lane.in i { left: 30%; }
  .lane.in i.late { left: 62%; }
  .lane.out i { right: 45%; }
}
.flow figcaption { margin-top: 1.3rem; padding-top: 0.9rem; border-top: 1px dashed var(--line); font: 400 0.82rem var(--mono); color: var(--muted); }

/* 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: 740; }
.points ol { list-style: none; counter-reset: p; margin: 0; padding: 0; display: grid; grid-template-columns: repeat(2, 1fr); gap: 0.9rem; }
.points li { counter-increment: p; padding: 1.5rem 1.5rem 1.4rem; background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius); }
.points li::before { content: counter(p); display: grid; place-items: center; width: 1.8rem; height: 1.8rem; margin-bottom: 0.9rem; border-radius: 50%; background: var(--accent-soft); color: var(--accent-ink); font: 700 0.85rem var(--round); }
.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: 14px; }
.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: var(--accent-soft); }

/* contact + footer */
.contact { padding-block: 3rem 2rem; }
.contact h2 { margin-bottom: 0.4rem; }
.mail { font: 760 clamp(1.6rem, 1rem + 3vw, 3rem) var(--round); 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; }
  .flow { padding: 1.2rem 0.9rem 0.9rem; }
  .flow-grid { gap: 0.6rem; }
  .chip { padding: 0.45rem 0.55rem; font-size: 0.8rem; gap: 0.35rem; }
  .worker { font-size: 0.72rem; }
  .lanes { gap: 1.9rem; }
  .lane .tag { font-size: 0.58rem; }
  .chip .ico { width: 1.2rem; height: 1.2rem; }
}

/* 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; }

/* Elvs: disabled "Add to" buttons and the example thread */
.ctas { display: flex; flex-wrap: wrap; align-items: center; gap: 0.7rem; margin-top: 2rem; }
.cta {
  display: inline-flex; align-items: center; gap: 0.55rem;
  padding: 0.7rem 1.1rem; border: 1px solid var(--line); border-radius: 999px;
  background: var(--surface); color: var(--ink); font: 600 0.95rem var(--sans);
}
.cta:disabled { cursor: not-allowed; opacity: 0.65; }
.cta .ico { display: grid; place-items: center; width: 1.4rem; height: 1.4rem; border-radius: 7px; background: var(--accent); color: #fff; font: 700 0.75rem var(--sans); }
.thread { list-style: none; margin: 0; padding: 1.2rem; max-width: 34rem; display: grid; gap: 0.7rem; border: 1px solid var(--line); border-radius: var(--radius); background: var(--surface); }
.msg { display: grid; gap: 0.15rem; padding: 0.7rem 0.9rem; border-radius: 12px; border: 1px solid var(--line); }
.msg.elvs { border-color: var(--accent); background: var(--accent-soft); }
.msg .who { font: 500 0.75rem var(--mono); color: var(--muted); }

/* 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; }
