@font-face {
  font-family: "Inter";
  font-style: normal;
  font-weight: 400 700;
  font-display: swap;
  src: url("/static/fonts/inter-latin.woff2") format("woff2");
}
@font-face {
  font-family: "Instrument Serif";
  font-style: normal;
  font-weight: 400;
  font-display: swap;
  src: url("/static/fonts/instrument-serif-latin.woff2") format("woff2");
}

:root {
  --paper: #f6f4ef;
  --paper-2: #efece4;
  --surface: #fffdf9;
  --ink: #15140f;
  --ink-soft: #57534a;
  --ink-faint: #8a857a;
  --line: #e2ddd1;
  --night: #131310;
  --night-2: #1d1c17;
  --night-line: #33312a;
  --night-ink: #f4f1e9;
  --night-soft: #a8a396;
  --accent: #c8f24a;
  --accent-ink: #17190d;
  --ok: #2f7d55;
  --ok-soft: #e3f1e7;
  --ok-line: #bfe0cb;
  --bad: #8a2a22;
  --bad-soft: #fbeae9;
  --bad-line: #e8b4ad;
  --warn: #8a6516;
  --warn-soft: #f7edd6;
  --radius: 16px;
  --radius-sm: 10px;
  --ease: cubic-bezier(.2, .7, .3, 1);
  --shadow: 0 1px 2px rgba(21, 20, 15, .05), 0 12px 30px -18px rgba(21, 20, 15, .35);
}

@media (prefers-color-scheme: dark) {
  :root {
    --paper: #121210;
    --paper-2: #191917;
    --surface: #1b1b18;
    --ink: #f2efe8;
    --ink-soft: #a9a598;
    --ink-faint: #837f74;
    --line: #2e2d27;
    --ok: #6fd39b;
    --ok-soft: #16261d;
    --warn: #e0b055;
    --warn-soft: #2a2216;
    --shadow: 0 1px 2px rgba(0, 0, 0, .5), 0 16px 40px -20px rgba(0, 0, 0, .9);
  }
}

* { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; scroll-behavior: smooth; }

body {
  margin: 0;
  background: var(--paper);
  color: var(--ink);
  font: clamp(.95rem, .92rem + .18vw, 1.02rem)/1.62 "Inter", -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Arial, sans-serif;
  -webkit-font-smoothing: antialiased;
}

.wrap { width: min(1120px, 100% - 2.5rem); margin-inline: auto; padding-bottom: 4rem; }

h1, h2, h3 { margin: 0 0 .6rem; line-height: 1.08; font-weight: 400; }
h1, h2 { font-family: "Instrument Serif", Georgia, "Times New Roman", serif; letter-spacing: -.01em; }
h1 { font-size: clamp(2.4rem, 1.6rem + 3.6vw, 4.4rem); }
h2 { font-size: clamp(1.6rem, 1.25rem + 1.6vw, 2.4rem); }
h3 { font-family: "Inter", sans-serif; font-size: 1rem; font-weight: 600; letter-spacing: -.01em; }
p { margin: 0 0 .9rem; color: var(--ink-soft); }
a { color: inherit; text-decoration: none; }
.lead { font-size: clamp(1.02rem, .96rem + .4vw, 1.2rem); max-width: 54ch; }
.muted { color: var(--ink-faint); font-size: .87rem; }
.mono { font-family: ui-monospace, SFMono-Regular, Menlo, Consolas, monospace; font-size: .86em; }

.top {
  display: flex; align-items: center; gap: 1rem; flex-wrap: wrap;
  padding: 1.1rem 0; margin-bottom: 1.5rem; border-bottom: 1px solid var(--line);
  position: sticky; top: 0; z-index: 30;
  background: color-mix(in srgb, var(--paper) 88%, transparent);
  backdrop-filter: saturate(1.3) blur(12px);
}
.brand { display: inline-flex; align-items: center; gap: .55rem; font-weight: 600; letter-spacing: -.02em; font-size: 1.05rem; }
.brand .mark { width: 1.6rem; height: 1.6rem; border-radius: 6px; background: var(--ink); color: var(--paper); display: grid; place-items: center; }
.top nav { margin-left: auto; display: flex; align-items: center; gap: .2rem; flex-wrap: wrap; }
.top nav a {
  display: inline-flex; align-items: center; gap: .35rem; color: var(--ink-soft);
  padding: .4rem .66rem; border-radius: var(--radius-sm); font-size: .9rem; font-weight: 500;
  transition: background .18s var(--ease), color .18s var(--ease);
}
.top nav a:hover { background: var(--paper-2); color: var(--ink); }

.icon { width: 1.05em; height: 1.05em; flex: none; stroke: currentColor; fill: none; stroke-width: 1.8; stroke-linecap: round; stroke-linejoin: round; }

.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: .5rem;
  padding: .72rem 1.2rem; border-radius: 999px; border: 1px solid transparent;
  background: var(--ink); color: var(--paper); font: inherit; font-weight: 560; cursor: pointer;
  transition: transform .16s var(--ease), box-shadow .2s var(--ease), background .2s var(--ease), color .2s var(--ease);
}
.btn:hover { transform: translateY(-1px); box-shadow: 0 10px 24px -14px rgba(21, 20, 15, .9); }
.btn:active { transform: none; }
.btn.accent { background: var(--accent); color: var(--accent-ink); }
.btn.ghost { background: transparent; color: var(--ink); border-color: var(--line); }
.btn.ghost:hover { background: var(--paper-2); box-shadow: none; }
.btn.on-night { background: var(--accent); color: var(--accent-ink); }
.btn.on-night.ghost { background: transparent; color: var(--night-ink); border-color: var(--night-line); }
.btn.on-night.ghost:hover { background: rgba(255, 255, 255, .06); }

.stage {
  background: var(--night); color: var(--night-ink); border-radius: 26px;
  padding: clamp(1.6rem, 1rem + 3.4vw, 3.4rem); margin-bottom: 1.6rem; overflow: hidden;
  display: grid; gap: clamp(1.6rem, 1rem + 3vw, 3rem); grid-template-columns: minmax(0, 1.05fr) minmax(0, .95fr); align-items: center;
  background-image: radial-gradient(120% 90% at 88% 8%, rgba(200, 242, 74, .14), transparent 58%);
}
.stage h1 { color: var(--night-ink); }
.stage p { color: var(--night-soft); }
.stage .kicker {
  display: inline-flex; align-items: center; gap: .45rem; margin-bottom: 1rem;
  font-size: .78rem; letter-spacing: .1em; text-transform: uppercase; color: var(--accent); font-weight: 600;
}
.stage .kicker .dot { width: .45rem; height: .45rem; border-radius: 50%; background: var(--accent); animation: pulse 2.4s var(--ease) infinite; }
.stage .underline { background-image: linear-gradient(transparent 62%, rgba(200, 242, 74, .35) 0); }
.stage .row { margin-top: 1.4rem; }
@media (max-width: 860px) { .stage { grid-template-columns: 1fr; } }

.chat { display: grid; gap: .55rem; font-size: .88rem; }
.bubble {
  background: var(--night-2); border: 1px solid var(--night-line); border-radius: 14px 14px 14px 5px;
  padding: .7rem .85rem; max-width: 92%; color: var(--night-ink); box-shadow: 0 10px 30px -24px #000;
  animation: rise .55s var(--ease) both;
}
.bubble.me { margin-left: auto; border-radius: 14px 14px 5px 14px; background: #24291a; border-color: #3a4426; }
.bubble b { font-weight: 600; }
.bubble .meta { display: block; margin-top: .35rem; color: var(--night-soft); font-size: .76rem; }
.bubble:nth-child(2) { animation-delay: .12s; }
.bubble:nth-child(3) { animation-delay: .24s; }
.bubble:nth-child(4) { animation-delay: .36s; }
.bubble:nth-child(5) { animation-delay: .48s; }
.chip {
  display: inline-flex; align-items: center; gap: .3rem; margin: .4rem .3rem 0 0; padding: .25rem .6rem;
  border-radius: 999px; border: 1px solid var(--night-line); font-size: .78rem; color: var(--night-soft);
}
.chip.go { border-color: rgba(200, 242, 74, .5); color: var(--accent); }

.band { display: grid; gap: 1px; background: var(--line); border: 1px solid var(--line); border-radius: var(--radius); overflow: hidden; margin-bottom: 1.6rem; grid-template-columns: repeat(auto-fit, minmax(min(100%, 11rem), 1fr)); }
.band > div { background: var(--surface); padding: 1.1rem 1.2rem; }
.band .num { display: block; font-family: "Instrument Serif", Georgia, serif; font-size: clamp(1.7rem, 1.4rem + 1.1vw, 2.3rem); line-height: 1; margin-bottom: .3rem; }
.band .label { color: var(--ink-faint); font-size: .84rem; }

.card { background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius); padding: 1.4rem 1.5rem; margin-bottom: 1.1rem; box-shadow: var(--shadow); }
.card > :last-child { margin-bottom: 0; }
.card.lift { transition: transform .22s var(--ease), box-shadow .22s var(--ease); }
.card.lift:hover { transform: translateY(-3px); box-shadow: 0 2px 4px rgba(21, 20, 15, .06), 0 26px 50px -28px rgba(21, 20, 15, .55); }

.duo { display: grid; gap: 1.4rem; grid-template-columns: minmax(0, .9fr) minmax(0, 1.1fr); align-items: center; margin-bottom: 1.8rem; }
@media (max-width: 860px) { .duo { grid-template-columns: 1fr; } }

.kit { background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius); overflow: hidden; box-shadow: var(--shadow); }
.kit .kit-top { padding: 1rem 1.2rem; border-bottom: 1px solid var(--line); display: flex; align-items: center; gap: .75rem; }
.kit .avatar { width: 2.4rem; height: 2.4rem; border-radius: 50%; background: var(--ink); color: var(--paper); display: grid; place-items: center; font-weight: 600; }
.kit .kit-body { padding: 1.1rem 1.2rem; display: grid; gap: .9rem; }
.bar { display: grid; grid-template-columns: 7.5rem 1fr auto; gap: .7rem; align-items: center; font-size: .88rem; }
.bar .track { height: .5rem; border-radius: 999px; background: var(--paper-2); overflow: hidden; }
.bar .fill { height: 100%; border-radius: 999px; background: var(--ink); animation: grow 1.1s var(--ease) both; transform-origin: left; }
.bar .fill.accent { background: var(--accent); }
.bar .val { font-variant-numeric: tabular-nums; color: var(--ink-faint); }
.rate { width: 100%; border-collapse: collapse; font-size: .9rem; }
.rate td { padding: .45rem 0; border-bottom: 1px dashed var(--line); }
.rate td:last-child { text-align: right; font-variant-numeric: tabular-nums; font-weight: 560; }
.rate tr:last-child td { border-bottom: 0; }

.flow { display: grid; gap: 0; margin-bottom: 1.8rem; }
.flow .step { display: grid; grid-template-columns: 2.4rem 1fr; gap: 1rem; padding: 1rem 0; border-bottom: 1px solid var(--line); }
.flow .step:last-child { border-bottom: 0; }
.flow .no { width: 2.1rem; height: 2.1rem; border-radius: 50%; border: 1px solid var(--line); display: grid; place-items: center; font-size: .85rem; color: var(--ink-faint); background: var(--surface); }
.flow .step:hover .no { border-color: var(--ink); color: var(--ink); }
.flow h3 { margin-bottom: .2rem; }
.flow p { margin: 0; }

.pill { display: inline-flex; align-items: center; gap: .35rem; padding: .22rem .58rem; border-radius: 999px; font-size: .78rem; font-weight: 600; background: var(--paper-2); color: var(--ink-soft); }
.pill.ok { background: var(--ok-soft); color: var(--ok); }
.pill.soon { background: var(--warn-soft); color: var(--warn); }
.row { display: flex; gap: .6rem; flex-wrap: wrap; align-items: center; }
.split { display: flex; gap: 1rem; align-items: baseline; justify-content: space-between; flex-wrap: wrap; }
.section-head { margin: 2.4rem 0 1rem; }
.section-head p { max-width: 52ch; }

table { width: 100%; border-collapse: collapse; font-size: .92rem; }
th, td { text-align: left; padding: .6rem .7rem; border-bottom: 1px solid var(--line); }
th { color: var(--ink-faint); font-weight: 600; font-size: .78rem; text-transform: uppercase; letter-spacing: .05em; }
tbody tr { transition: background .16s var(--ease); }
tbody tr:hover { background: var(--paper-2); }
.scroll-x { overflow-x: auto; }

input, select, textarea {
  width: 100%; padding: .64rem .8rem; border-radius: var(--radius-sm); border: 1px solid var(--line);
  background: var(--surface); color: var(--ink); font: inherit;
  transition: border-color .18s var(--ease), box-shadow .18s var(--ease);
}
input:focus, select:focus, textarea:focus { outline: none; border-color: var(--ink); box-shadow: 0 0 0 3px color-mix(in srgb, var(--accent) 45%, transparent); }
label { display: block; margin: .8rem 0 .3rem; font-weight: 550; font-size: .9rem; }
:focus-visible { outline: 2px solid var(--ink); outline-offset: 2px; border-radius: 5px; }

details.qa { border-bottom: 1px solid var(--line); }
details.qa > summary { cursor: pointer; list-style: none; padding: .95rem .2rem; display: flex; align-items: center; gap: .7rem; font-weight: 500; transition: color .16s var(--ease); }
details.qa > summary::-webkit-details-marker { display: none; }
details.qa > summary:hover { color: var(--ink); }
details.qa .chev { margin-left: auto; color: var(--ink-faint); transition: transform .22s var(--ease); }
details.qa[open] > summary { color: var(--ink); }
details.qa[open] .chev { transform: rotate(90deg); }
details.qa .answer { padding: 0 .2rem 1.1rem 2.3rem; color: var(--ink-soft); max-width: 68ch; animation: rise .28s var(--ease) both; }
.faq-topic { margin-bottom: 2.2rem; }
.faq-topic h2 { margin-bottom: .2rem; }

footer { margin-top: 3rem; padding-top: 1.4rem; border-top: 1px solid var(--line); color: var(--ink-faint); font-size: .86rem; display: flex; gap: 1rem; flex-wrap: wrap; align-items: center; }
footer nav { margin-left: auto; display: flex; gap: .9rem; flex-wrap: wrap; }
footer nav a:hover { color: var(--ink); }

.reveal { animation: rise .55s var(--ease) both; }
.reveal:nth-child(2) { animation-delay: .07s; }
.reveal:nth-child(3) { animation-delay: .14s; }
.reveal:nth-child(4) { animation-delay: .21s; }

@keyframes rise { from { opacity: 0; transform: translateY(12px); } to { opacity: 1; transform: none; } }
@keyframes grow { from { transform: scaleX(0); } to { transform: scaleX(1); } }
@keyframes pulse { 0%, 100% { opacity: 1; transform: scale(1); } 50% { opacity: .35; transform: scale(.8); } }

@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  *, *::before, *::after { animation-duration: .001ms !important; animation-delay: 0 !important; transition-duration: .001ms !important; }
}

@media (max-width: 640px) {
  .wrap { width: min(1120px, 100% - 1.5rem); }
  .top { padding: .85rem 0; }
  .top nav { width: 100%; margin-left: 0; }
  .stage { border-radius: 20px; }
  .card { padding: 1.15rem; }
  footer nav { margin-left: 0; width: 100%; }
}

@media print {
  .top, footer nav, .btn { display: none; }
  .stage { background: none; color: #000; }
  .card { box-shadow: none; }
}

.kit-hero h1 { margin-bottom: .25rem; }
.kit-hero .lead { color: var(--ink-soft); margin: 0 0 1rem; font-size: 1.05rem; }
.btn.big { font-size: 1.05rem; padding: .8rem 1.4rem; }
.steps {
  counter-reset: step;
  list-style: none;
  margin: 1.2rem 0 0;
  padding: 0;
  display: grid;
  gap: .55rem;
}
.steps li {
  counter-increment: step;
  position: relative;
  padding-left: 2.1rem;
  color: var(--ink-soft);
  font-size: .95rem;
}
.steps li::before {
  content: counter(step);
  position: absolute;
  left: 0;
  top: -.05rem;
  width: 1.5rem;
  height: 1.5rem;
  border-radius: 50%;
  background: var(--accent);
  color: var(--accent-ink);
  font-weight: 700;
  font-size: .82rem;
  display: grid;
  place-items: center;
}
.fold > summary {
  cursor: pointer;
  color: var(--ink-soft);
  font-size: .95rem;
  padding: .35rem 0;
}
.fold[open] > summary { margin-bottom: .5rem; }

.tg-widget {
  display: inline-block;
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: var(--radius-sm);
  padding: .55rem .7rem;
  color: var(--ink);
  color-scheme: light;
  min-height: 2.6rem;
}

.issues {
  background: var(--bad-soft);
  border: 1px solid var(--bad-line);
  color: var(--bad);
  border-radius: var(--radius-sm);
  padding: .65rem .85rem;
  margin: .6rem 0;
  list-style: none;
}
.issues li { margin: .15rem 0; }
.ok-box {
  background: var(--ok-soft);
  border: 1px solid var(--ok-line);
  color: var(--ok);
  border-radius: var(--radius-sm);
  padding: .65rem .85rem;
  margin: .6rem 0;
}

.toasts {
  position: fixed;
  right: 1rem;
  bottom: 1rem;
  z-index: 60;
  display: grid;
  gap: .5rem;
  justify-items: end;
  width: min(23rem, calc(100% - 2rem));
  pointer-events: none;
}
.toast {
  pointer-events: auto;
  max-width: 100%;
  padding: .7rem .9rem .7rem .8rem;
  border-radius: var(--radius-sm);
  background: var(--night-2);
  color: var(--night-ink);
  border: 1px solid var(--night-line);
  border-left: 3px solid var(--night-line);
  box-shadow: var(--shadow);
  font-size: .92rem;
  line-height: 1.35;
  animation: toast-life 5.4s var(--ease) forwards;
}
.toast.ok { border-left-color: var(--accent); }
.toast.bad { border-left-color: var(--bad-line); }

@keyframes toast-life {
  0% { opacity: 0; transform: translateY(150%); }
  7% { opacity: 1; transform: translateY(0); }
  86% { opacity: 1; transform: translateY(0); }
  100% { opacity: 0; transform: translateY(150%); }
}

@media (prefers-reduced-motion: reduce) {
  .toast { animation: none !important; opacity: 1; transform: none; }
}

@media print { .toasts { display: none; } }

.ops-tabs { display: flex; flex-wrap: wrap; gap: .4rem; margin: .9rem 0 1.1rem; }
.ops-tabs a { padding: .42rem .85rem; border: 1px solid var(--line); border-radius: 999px; font-size: .9rem; text-decoration: none; }
.ops-tabs a.on { background: var(--ink); color: var(--surface); border-color: var(--ink); }
.ops-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(150px, 1fr)); gap: .6rem; }
.tile { display: flex; flex-direction: column; gap: .15rem; padding: .8rem .9rem; border: 1px solid var(--line); border-radius: var(--radius); text-decoration: none; }
.tile b { font-size: 1.6rem; line-height: 1.1; }
.tile span { font-size: .8rem; color: var(--ink-faint); }
.tile.good { border-color: #2f7a4a; }
.tile.warn { border-color: #b3801f; }
.tile.bad { border-color: #a63232; }
@media (max-width: 560px) { .ops-grid { grid-template-columns: repeat(2, 1fr); } }

.bug-open { position: fixed; right: 1rem; bottom: 1rem; z-index: 40; padding: .55rem .95rem; border: 1px solid var(--line); border-radius: 999px; background: var(--surface); color: var(--ink); font: inherit; font-size: .85rem; cursor: pointer; box-shadow: var(--shadow); }
.bug-open:hover { border-color: var(--ink); }
.bug-sheet { width: min(92vw, 460px); padding: 1.3rem 1.4rem; border: 1px solid var(--line); border-radius: var(--radius); background: var(--surface); color: var(--ink); box-shadow: var(--shadow); }
.bug-sheet::backdrop { background: rgba(21, 20, 15, .45); }
.bug-sheet h2 { margin-top: 0; }
.bug-sheet textarea { width: 100%; margin: .6rem 0; padding: .6rem .7rem; border: 1px solid var(--line); border-radius: var(--radius); font: inherit; resize: vertical; }
.bug-actions { display: flex; gap: .5rem; justify-content: flex-end; }
@supports not selector(:popover-open) { .bug-open, .bug-sheet { display: none; } }
@media (max-width: 560px) {
  .bug-open { font-size: 0; padding: .6rem; line-height: 1; opacity: .85; }
  .bug-open::first-letter { font-size: 1.1rem; }
  footer { padding-bottom: 3.4rem; }
}
@media print { .bug-open, .bug-sheet { display: none; } }
