/* FLYDER - lab notes. Obeys web/DESIGN.md. Light only. */

:root {
  color-scheme: light;
  --paper: #f4efe6;
  --paper-2: #ebe4d6;
  --paper-3: #e2dac9;
  --ink: #14110c;
  --ink-2: #4a443a;
  --muted: #857c6d;
  --line: #d8cfbf;
  --accent: #ff5a1f;
  --accent-ink: #d8440f;
  --accent-soft: rgba(255, 90, 31, 0.18);

  --display: "Archivo Black", "Inter", system-ui, sans-serif;
  --serif: "Instrument Serif", Georgia, serif;
  --text: "Inter", system-ui, -apple-system, "Segoe UI", sans-serif;
  --mono: "JetBrains Mono", ui-monospace, "Cascadia Mono", Consolas, monospace;

  --gap: 12px;
  --gutter: 16px;
  --pad: 12px;
  --list-h: 240px;
  --radius: 4px;
}
@media (min-width: 768px) { :root { --gap: 16px; --gutter: 24px; --pad: 14px; --list-h: 260px; } }
@media (min-width: 1024px) { :root { --gutter: 32px; --pad: 16px; --list-h: 280px; } }

/* ---- base ---------------------------------------------------------------- */
*, *::before, *::after { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; scroll-behavior: smooth; scroll-padding-top: 56px; }
body {
  margin: 0;
  background: var(--paper);
  color: var(--ink);
  font-family: var(--text);
  font-size: 14.5px;
  line-height: 22px;
  overflow-x: hidden;
}
h1, h2, h3, p, ul, ol, figure { margin: 0; }
ul, ol { padding: 0; list-style: none; }
a { color: var(--accent-ink); text-decoration: none; }
a:hover { text-decoration: underline; }
a[aria-disabled="true"] { color: var(--muted); pointer-events: none; }
button { font: inherit; color: inherit; }
img { display: block; }
.mono { font-family: var(--mono); font-variant-numeric: tabular-nums; }
.small { font-size: 12.5px; line-height: 18px; }
.muted { color: var(--muted); }
.serif { font-family: var(--serif); font-size: 19px; line-height: 28px; color: var(--ink); }
.label {
  font-family: var(--mono);
  font-size: 11px;
  line-height: 16px;
  letter-spacing: .14em;
  text-transform: uppercase;
  color: var(--ink-2);
}
[hidden] { display: none !important; }
.wrap { max-width: 1180px; margin: 0 auto; padding: 0 var(--gutter); }

/* phase gating */
body[data-phase="crawl"] .only-launched { display: none !important; }
body[data-phase="launched"] .only-crawl { display: none !important; }

/* ---- nav ----------------------------------------------------------------- */
.nav { position: sticky; top: 0; z-index: 10; background: var(--paper); border-bottom: 1px solid var(--ink); }
.nav-in {
  max-width: 1180px; margin: 0 auto; padding: 0 var(--gutter);
  display: grid; grid-template-columns: auto 1fr auto; align-items: center; gap: 12px;
  height: 52px;
}
.nav-brand { display: flex; align-items: center; gap: 8px; color: var(--ink); text-decoration: none; }
.nav-brand:hover { text-decoration: none; }
.nav-mark { width: 30px; height: 30px; border-radius: 6px; border: 1px solid var(--line); background: #fff; }
.nav-name { font-family: var(--display); font-size: 17px; letter-spacing: .02em; }
.nav-links {
  display: flex; gap: 2px; min-width: 0; overflow-x: auto; scrollbar-width: none;
  -webkit-overflow-scrolling: touch; justify-content: flex-start;
}
.nav-links::-webkit-scrollbar { display: none; }
.nav-links a {
  font-family: var(--mono); font-size: 10.5px; letter-spacing: .06em; text-transform: uppercase; color: var(--ink-2);
  padding: 6px 6px; white-space: nowrap; border-radius: var(--radius);
}
@media (min-width: 1024px) { .nav-links a { font-size: 11px; letter-spacing: .08em; padding: 6px 8px; } }
.nav-links a:hover { background: var(--paper-2); text-decoration: none; color: var(--ink); }
@media (min-width: 1024px) { .nav-links { justify-content: center; } }
.nav-pills { display: flex; gap: 6px; }
.pill {
  display: inline-block; font-family: var(--mono); font-size: 10.5px; line-height: 16px; letter-spacing: .14em;
  text-transform: uppercase; padding: 2px 9px; border: 1px solid var(--line); border-radius: 999px; color: var(--ink-2); white-space: nowrap;
}
.pill.phase { border-color: var(--accent); color: var(--accent-ink); }
.pill.chain { border-color: var(--ink-2); color: var(--ink); }
@media (max-width: 767px) { .pill.chain { display: none; } }

/* ---- banner -------------------------------------------------------------- */
.banner {
  background: var(--ink); color: var(--paper); font-family: var(--mono); font-size: 12px; line-height: 18px;
  letter-spacing: .06em; text-align: center; padding: 8px var(--gutter);
}

/* ---- hero ---------------------------------------------------------------- */
.hero { padding: 36px 0 28px; border-bottom: 1px solid var(--ink); }
@media (min-width: 768px) { .hero { padding: 56px 0 40px; } }
.kicker { font-size: 11px; line-height: 16px; letter-spacing: .14em; text-transform: uppercase; color: var(--ink-2); margin-bottom: 18px; }
.display {
  font-family: var(--display); font-weight: 400; font-size: 34px; line-height: 1.04; letter-spacing: -.01em;
  max-width: 20ch; color: var(--ink); text-wrap: balance;
}
@media (min-width: 768px) { .display { font-size: 56px; } }
@media (min-width: 1024px) { .display { font-size: 72px; } }
.mark {
  background: linear-gradient(transparent 62%, var(--accent) 62%, var(--accent) 92%, transparent 92%);
  padding: 0 .06em;
}
.abstract { font-family: var(--serif); font-size: 19px; line-height: 28px; max-width: 70ch; margin-top: 22px; color: var(--ink); }
@media (min-width: 768px) { .abstract { font-size: 22px; line-height: 32px; margin-top: 28px; } }
.abstract em { font-style: italic; color: var(--accent-ink); }
.stats { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); grid-auto-rows: 1fr; gap: var(--gap); margin-top: 28px; }
@media (min-width: 768px) { .stats { grid-template-columns: repeat(4, minmax(0, 1fr)); margin-top: 36px; } }
.stat { border: 1px solid var(--ink); border-radius: var(--radius); padding: 14px var(--pad); display: grid; gap: 4px; min-width: 0; background: var(--paper); }
.stat-v { font-size: 21px; line-height: 28px; color: var(--accent-ink); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
@media (min-width: 768px) { .stat-v { font-size: 26px; line-height: 32px; } }
@media (min-width: 1024px) { .stat-v { font-size: 36px; line-height: 40px; } }
.stat-l { font-size: 12.5px; line-height: 18px; color: var(--ink-2); }

/* ---- sections ------------------------------------------------------------ */
main.wrap { display: flex; flex-direction: column; }
.sec { padding: 36px 0; border-bottom: 1px solid var(--line); display: grid; gap: 20px; }
@media (min-width: 768px) { .sec { padding: 48px 0; gap: 24px; } }
.sec:last-child { border-bottom: 0; }
.sec-h { display: flex; align-items: baseline; gap: 12px; }
.sec-n { font-size: 13px; letter-spacing: .1em; color: var(--accent-ink); flex: 0 0 auto; }
.sec-h h2 { font-family: var(--display); font-weight: 400; font-size: 26px; line-height: 1.1; letter-spacing: -.01em; }
@media (min-width: 768px) { .sec-h h2 { font-size: 34px; } }
.sec-body { display: grid; gap: 16px; }
@media (min-width: 1024px) { .sec-body { grid-template-columns: minmax(0, 8fr) minmax(0, 4fr); gap: var(--gap); align-items: start; } }
.sec-body .serif { max-width: 68ch; }
.note {
  border: 1.5px solid var(--accent); border-radius: var(--radius); padding: 12px 14px;
  font-size: 13.5px; line-height: 20px; color: var(--ink-2); background: var(--paper);
}
.note-h { display: block; font-family: var(--mono); font-size: 11px; letter-spacing: .14em; text-transform: uppercase; color: var(--accent-ink); margin-bottom: 4px; }

/* ---- figures ------------------------------------------------------------- */
.fig { border: 1px solid var(--ink); border-radius: var(--radius); background: #fff; display: flex; flex-direction: column; min-width: 0; }
.fig > *:not(figcaption) { padding: var(--pad); }
.fig figcaption { font-size: 11.5px; line-height: 17px; letter-spacing: .02em; color: var(--ink-2); padding: 10px var(--pad); border-top: 1px solid var(--line); background: var(--paper); }
.fig figcaption .mono, .fig figcaption span { color: var(--ink); }
.col { display: grid; gap: 10px; min-width: 0; align-content: start; }
.col-h { display: flex; justify-content: space-between; align-items: baseline; gap: 10px; padding-bottom: 6px; border-bottom: 1px solid var(--line); }
.col-h .mono { white-space: nowrap; overflow: hidden; text-overflow: ellipsis; min-width: 0; }
.two { display: grid; gap: var(--gap); }
@media (min-width: 768px) { .two { grid-template-columns: repeat(2, minmax(0, 1fr)); } }

/* ---- fig 1: the live crawl ----------------------------------------------- */
.live { display: grid; gap: var(--gap); }
@media (min-width: 1024px) { .live { grid-template-columns: minmax(0, 7fr) minmax(0, 5fr); align-items: stretch; } }
.live-view { display: flex; flex-direction: column; gap: 8px; min-width: 0; }
.live-place { display: grid; gap: 1px; min-width: 0; }
.live-title { font-family: var(--serif); font-size: 20px; line-height: 24px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.live-url { display: block; font-size: 11.5px; line-height: 16px; color: var(--muted); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.view-wrap { position: relative; width: 100%; aspect-ratio: 1280 / 800; background: var(--paper-2); border: 1px solid var(--line); overflow: hidden; }
.view { position: absolute; inset: 0; width: 100%; height: 100%; display: block; }
.view-idle {
  position: absolute; left: 50%; top: 50%; transform: translate(-50%, -50%);
  padding: 6px 12px; font-size: 11px; line-height: 16px; letter-spacing: .14em; text-transform: uppercase;
  color: var(--ink); background: var(--paper); border: 1px solid var(--ink); border-radius: var(--radius); white-space: nowrap;
}
.live-foot { font-size: 11px; line-height: 16px; letter-spacing: .08em; text-transform: uppercase; color: var(--ink-2); }
.live-read { display: flex; flex-direction: column; justify-content: space-between; gap: 12px; min-width: 0; border-left: 0; }
@media (min-width: 1024px) { .live-read { border-left: 1px solid var(--line); padding-left: var(--gap); } }
.read-top { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: var(--gap); }
.read-big { display: grid; gap: 2px; min-width: 0; }
.read-v { font-size: 24px; line-height: 30px; color: var(--accent-ink); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
@media (min-width: 1280px) { .read-v { font-size: 28px; line-height: 34px; } }
.bars { display: grid; gap: 7px; }
.bar { display: grid; grid-template-columns: 64px 1fr 58px; align-items: center; gap: 10px; }
.bar-l { font-family: var(--mono); font-size: 11px; letter-spacing: .06em; text-transform: uppercase; color: var(--ink-2); white-space: nowrap; }
.bar-t { position: relative; height: 8px; background: var(--paper-2); border-radius: 2px; overflow: hidden; }
.bar-f { position: absolute; left: 0; top: 0; bottom: 0; width: 0; background: var(--accent); transition: width .25s linear; }
.bar-tick { position: absolute; top: -1px; bottom: -1px; width: 2px; background: var(--ink); left: 0; }
.bar-v { font-size: 12px; text-align: right; color: var(--ink); white-space: nowrap; }
.outs { display: grid; grid-template-columns: repeat(5, minmax(0, 1fr)); gap: 6px; }
.out { background: var(--paper-2); border-radius: var(--radius); padding: 6px 5px; display: grid; gap: 4px; min-width: 0; }
@media (min-width: 768px) { .out { padding: 6px 7px; } }
.out .label { font-size: 9.5px; letter-spacing: .02em; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.out-t { position: relative; height: 4px; background: var(--paper-3); border-radius: 2px; overflow: hidden; }
.out-t i { position: absolute; left: 0; top: 0; bottom: 0; width: 0; background: var(--accent); transition: width .25s linear; }
.out .mono { font-size: 12.5px; line-height: 18px; }
.out.hot { outline: 1.5px solid var(--accent); outline-offset: -1.5px; }
.read-note { display: flex; justify-content: space-between; gap: 10px; font-size: 11px; line-height: 16px; letter-spacing: .08em; text-transform: uppercase; color: var(--ink-2); }
.read-note span:last-child { color: var(--accent-ink); }
.live-lists { display: grid; gap: var(--gap); border-top: 1px solid var(--line); }
@media (min-width: 768px) { .live-lists { grid-template-columns: repeat(2, minmax(0, 1fr)); } }
.list { display: grid; gap: 6px; align-content: start; }
.list.scroll { height: var(--list-h); overflow-y: auto; overflow-x: hidden; }
.list li { display: grid; gap: 2px; padding: 6px 8px; background: var(--paper-2); border-radius: var(--radius); font-size: 12.5px; line-height: 18px; min-width: 0; }
.list .l1 { display: flex; justify-content: space-between; gap: 8px; min-width: 0; }
.list .l1 > span:first-child, .list .l1 > a { white-space: nowrap; overflow: hidden; text-overflow: ellipsis; min-width: 0; }
.list .l1 .mono { color: var(--muted); font-size: 11.5px; white-space: nowrap; flex: 0 0 auto; }
.list .l2 { color: var(--ink-2); font-family: var(--mono); font-size: 11.5px; line-height: 16px; overflow-wrap: anywhere; }
.list a { color: var(--ink); }
.list li.click .l1 > span:first-child { color: var(--accent-ink); }
.list li.veto .l1 > span:first-child { color: var(--ink-2); }
.kvs { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 6px var(--gap); }
@media (min-width: 768px) { .kvs { grid-template-columns: repeat(4, minmax(0, 1fr)); } }
.kv { display: flex; justify-content: space-between; gap: 10px; font-size: 12.5px; line-height: 18px; color: var(--ink-2); min-width: 0; border-bottom: 1px solid var(--line); padding: 4px 0; }
.kv > span:first-child { white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.kv .mono { color: var(--ink); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; flex: 0 1 auto; text-align: right; }
.kvs-1 { display: grid; gap: 0; }
.kvs-1 .kv .mono { white-space: normal; overflow-wrap: anywhere; }

/* ---- fig 2: the loop ----------------------------------------------------- */
.loop { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 8px; counter-reset: none; }
@media (min-width: 768px) { .loop { grid-template-columns: repeat(3, minmax(0, 1fr)); } }
@media (min-width: 1024px) { .loop { grid-template-columns: repeat(6, minmax(0, 1fr)); } }
.loop li { position: relative; border: 1px solid var(--ink); border-radius: var(--radius); padding: 10px 10px 10px 10px; display: grid; gap: 4px; min-width: 0; background: var(--paper); }
.loop li strong { font-family: var(--display); font-weight: 400; font-size: 14px; line-height: 18px; }
.loop li span:last-child { font-size: 12px; line-height: 17px; color: var(--ink-2); }
.loop-n { font-size: 11px; letter-spacing: .1em; color: var(--accent-ink); }
.loop li:not(:last-child)::after { content: "→"; position: absolute; right: -11px; top: 50%; transform: translateY(-50%); font-family: var(--mono); color: var(--accent); font-size: 14px; display: none; }
@media (min-width: 1024px) { .loop li:not(:last-child)::after { display: block; } }
@media (min-width: 1024px) { .loop { gap: 14px; } }

/* ---- fig 3: the eye ------------------------------------------------------ */
.eye-grid { display: grid; gap: var(--gap); }
@media (min-width: 768px) { .eye-grid { grid-template-columns: minmax(0, 8fr) minmax(0, 4fr); align-items: stretch; } }
.eye-wrap { position: relative; width: 100%; aspect-ratio: 300 / 210; background: var(--paper-2); border: 1px solid var(--line); border-radius: var(--radius); overflow: hidden; }
.eye { position: absolute; inset: 0; width: 100%; height: 100%; display: block; }
.counters { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 6px; align-content: start; }
@media (min-width: 768px) { .eye-grid .counters { grid-template-columns: 1fr; } }
.counter { background: var(--paper-2); border-radius: var(--radius); padding: 8px 10px; display: grid; gap: 2px; min-width: 0; }
.counter .label { font-size: 9.5px; letter-spacing: .08em; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.counter .mono { font-size: 18px; line-height: 24px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; color: var(--ink); }

/* ---- fig 4: the sparkline ------------------------------------------------ */
.spark-wrap { position: relative; height: 140px; background: var(--paper-2); border: 1px solid var(--line); border-radius: var(--radius); overflow: hidden; margin: var(--pad) var(--pad) 0; padding: 0 !important; }
@media (min-width: 768px) { .spark-wrap { height: 180px; } }
.spark { position: absolute; inset: 0; width: 100%; height: 100%; display: block; }
.fig > .counters { grid-template-columns: repeat(2, minmax(0, 1fr)); }
@media (min-width: 768px) { .fig > .counters { grid-template-columns: repeat(4, minmax(0, 1fr)); } }

/* ---- tables -------------------------------------------------------------- */
.tbl { width: 100%; border-collapse: collapse; font-size: 13px; line-height: 18px; }
.tbl th { text-align: left; font-family: var(--mono); font-size: 10.5px; letter-spacing: .12em; text-transform: uppercase; color: var(--ink-2); font-weight: 500; padding: 6px 8px; border-bottom: 1px solid var(--ink); }
.tbl td { padding: 8px; border-bottom: 1px solid var(--line); vertical-align: top; color: var(--ink); }
.tbl tr:last-child td { border-bottom: 0; }
.tbl .num { text-align: right; white-space: nowrap; }
.tbl td.num { color: var(--accent-ink); }
.tbl td.small { color: var(--ink-2); }
.tbl.who td { font-size: 12.5px; line-height: 17px; }
@media (max-width: 767px) { .tbl td.small { display: none; } .tbl th:last-child { display: none; } }

/* ---- fig 6: gains -------------------------------------------------------- */
.gains { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: var(--gap); }
.gain { display: grid; gap: 4px; padding: 10px 12px; border: 1px solid var(--line); border-radius: var(--radius); min-width: 0; }
.gain-v { font-size: 30px; line-height: 34px; color: var(--accent-ink); }
@media (min-width: 768px) { .gain-v { font-size: 40px; line-height: 44px; } }
.gain-l { font-size: 12.5px; line-height: 18px; color: var(--ink-2); }

/* ---- fig 7: fences + name ------------------------------------------------ */
.fences, .stages { display: grid; gap: 6px; counter-reset: item; }
.fences li, .stages li { display: grid; grid-template-columns: 22px minmax(0, 1fr); gap: 2px 8px; padding: 6px 8px; background: var(--paper-2); border-radius: var(--radius); font-size: 13px; line-height: 18px; counter-increment: item; }
.fences li::before, .stages li::before { content: counter(item); font-family: var(--mono); font-size: 11px; color: var(--accent-ink); grid-row: 1 / span 2; padding-top: 1px; }
.stages li::before { grid-row: 1; }
.fences li strong { font-weight: 600; color: var(--ink); }
.fences li span { color: var(--ink-2); grid-column: 2; }
.words { display: grid; gap: 3px; }
.kv.word { display: grid; grid-template-columns: minmax(0, 1fr) 72px 44px; align-items: center; gap: 8px; border-bottom: 0; padding: 3px 0; }
.kv.word .tr { height: 6px; background: var(--paper-2); border-radius: 2px; position: relative; }
.kv.word .tr i { position: absolute; left: 0; top: 0; bottom: 0; background: var(--accent); }
.kv.word .mono { text-align: right; }

/* ---- fig 9: coin + wallet ------------------------------------------------ */
.coin-row { display: flex; align-items: center; gap: 12px; min-width: 0; min-height: 56px; }
.coin-art { width: 56px; height: 56px; border-radius: 8px; border: 1px solid var(--line); background: #fff; flex: 0 0 auto; }
.coin-text { display: grid; gap: 2px; min-width: 0; }
.coin-name { font-family: var(--display); font-size: 20px; line-height: 24px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.coin-name.mono { font-family: var(--mono); font-size: 18px; }
.coin-ticker { font-size: 12.5px; line-height: 18px; color: var(--ink-2); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.coin-pre, .coin-live { display: grid; gap: 0; }
.coin-addr-row { display: inline-flex; align-items: center; gap: 6px; }
.btn {
  display: inline-block; font-family: var(--mono); font-size: 10.5px; line-height: 16px; letter-spacing: .12em; text-transform: uppercase;
  padding: 2px 8px; border: 1px solid var(--ink); border-radius: var(--radius); background: transparent; color: var(--ink); cursor: pointer; text-decoration: none;
}
.btn:hover { background: var(--ink); color: var(--paper); text-decoration: none; }
.btn:focus-visible { outline: 2px solid var(--accent); outline-offset: 2px; }

/* ---- fig 10: checklist --------------------------------------------------- */
.checks { display: grid; gap: 6px; }
.checks li { display: grid; grid-template-columns: 72px minmax(0, 1fr); gap: 10px; align-items: baseline; padding: 8px 10px; background: var(--paper-2); border-radius: var(--radius); font-size: 13.5px; line-height: 19px; }
.check { font-size: 10.5px; letter-spacing: .12em; text-transform: uppercase; padding: 2px 6px; border-radius: 999px; text-align: center; border: 1px solid var(--line); color: var(--ink-2); }
.checks li.done .check { border-color: var(--accent); color: var(--accent-ink); }

/* ---- refs ---------------------------------------------------------------- */
.refs { display: grid; gap: 8px; counter-reset: ref; font-family: var(--serif); font-size: 17px; line-height: 25px; max-width: 76ch; }
.refs li { display: grid; grid-template-columns: 28px minmax(0, 1fr); gap: 8px; counter-increment: ref; }
.refs li::before { content: "[" counter(ref) "]"; font-family: var(--mono); font-size: 12px; color: var(--accent-ink); padding-top: 3px; }

/* ---- footer -------------------------------------------------------------- */
.foot { border-top: 1px solid var(--ink); margin-top: 24px; }
.foot-in { padding-top: 18px; padding-bottom: 32px; display: grid; gap: 6px; font-size: 12.5px; line-height: 18px; color: var(--ink-2); max-width: 1180px; }
.foot-honest { color: var(--ink); font-weight: 600; }
.foot .small { max-width: 72ch; }
.foot-links { display: flex; flex-wrap: wrap; gap: 6px 8px; align-items: center; }
.sep { color: var(--muted); }

/* ---- motion -------------------------------------------------------------- */
@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  .bar-f, .out-t i { transition: none; }
}
