/* Sifthamper: one light system. Wicker linen + walnut ink + willow (active) + ochre (pending). 2D only. */
@font-face { font-family: 'Fraunces'; src: url('/fonts/fraunces-latin-full-normal.woff2') format('woff2'); font-weight: 300 900; font-style: normal; font-display: swap; }
@font-face { font-family: 'Fraunces'; src: url('/fonts/fraunces-latin-full-italic.woff2') format('woff2'); font-weight: 300 900; font-style: italic; font-display: swap; }
@font-face { font-family: 'Figtree'; src: url('/fonts/figtree-latin-wght-normal.woff2') format('woff2'); font-weight: 300 900; font-display: swap; }
@font-face { font-family: 'Chivo Mono'; src: url('/fonts/chivo-mono-latin-400-normal.woff2') format('woff2'); font-weight: 400; font-display: swap; }
@font-face { font-family: 'Chivo Mono'; src: url('/fonts/chivo-mono-latin-500-normal.woff2') format('woff2'); font-weight: 500; font-display: swap; }

:root {
  --bg: #ECE7DC; --paper: #F8F5EE; --paper-2: #F2EEE4; --ink: #1F1B16; --ink-2: #3B342B; --muted: #6E675C;
  --line: #D6CFC0; --line-2: #C5BCAA;
  --willow: #456B2F; --willow-soft: #DCE5D0; --ochre: #B5652A; --ochre-soft: #F0DCCB; --slate: #4C5A73; --warn: #9B2C2C; --warn-soft: #F3DADA;
  --f-display: 'Fraunces', Georgia, serif; --f-text: 'Figtree', system-ui, sans-serif; --f-mono: 'Chivo Mono', ui-monospace, monospace;
  --r: 6px; --gut: 16px; --max: 1120px;
  --ease: cubic-bezier(.2,.7,.2,1);
  color-scheme: light;
}
* { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; }
body { margin: 0; background: var(--bg); color: var(--ink); font: 400 16px/1.55 var(--f-text); overflow-x: hidden; }
a { color: var(--willow); text-underline-offset: 3px; text-decoration-thickness: 1px; }
a:hover { color: var(--ink); }
img, svg { max-width: 100%; }
h1, h2, h3 { font-family: var(--f-display); font-weight: 560; letter-spacing: -0.015em; line-height: 1.1; margin: 0 0 .4em; font-variation-settings: 'SOFT' 60, 'opsz' 72; }
h1 { font-size: clamp(34px, 6vw, 62px); font-weight: 520; }
h1 em, h2 em { font-style: italic; color: var(--willow); font-weight: 480; }
h2 { font-size: clamp(24px, 3.4vw, 34px); }
h3 { font-size: 19px; font-variation-settings: 'SOFT' 40, 'opsz' 24; }
p { margin: 0 0 .9em; }
code, .mono { font-family: var(--f-mono); font-size: .9em; }
.wrap { max-width: var(--max); margin: 0 auto; padding: 0 var(--gut); }
.muted { color: var(--muted); }
.small { font-size: 14px; }
.tiny { font-size: 12.5px; }
.eyebrow { font: 500 12px/1.2 var(--f-mono); letter-spacing: .08em; text-transform: uppercase; color: var(--muted); margin: 0 0 10px; }
.sr { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); }

/* header */
.top { border-bottom: 1px solid var(--line); background: var(--paper); position: sticky; top: 0; z-index: 20; }
.top .wrap { display: flex; align-items: center; gap: 14px; min-height: 58px; }
.brand { display: flex; align-items: center; gap: 9px; color: var(--ink); text-decoration: none; font: 600 20px/1 var(--f-display); letter-spacing: -.01em; }
.brand svg { width: 26px; height: 26px; flex: none; }
.nav { display: flex; gap: 2px; margin-left: auto; align-items: center; }
.nav a { color: var(--ink-2); text-decoration: none; padding: 7px 10px; border-radius: var(--r); font-weight: 500; font-size: 15px; }
.nav a:hover, .nav a[aria-current="page"] { background: var(--paper-2); color: var(--ink); }
.nav a[aria-current="page"] { box-shadow: inset 0 -2px 0 var(--willow); border-radius: var(--r) var(--r) 0 0; }
.btn { display: inline-flex; align-items: center; justify-content: center; gap: 8px; font: 600 15px/1 var(--f-text); padding: 11px 16px; border-radius: var(--r);
  border: 1px solid var(--ink); background: var(--ink); color: var(--paper); cursor: pointer; text-decoration: none; transition: background .2s var(--ease), transform .2s var(--ease); white-space: nowrap; }
.btn:hover { background: var(--ink-2); color: var(--paper); }
.btn:active { transform: translateY(1px); }
.btn.ghost { background: transparent; color: var(--ink); border-color: var(--line-2); }
.btn.ghost:hover { background: var(--paper-2); }
.btn.willow { background: var(--willow); border-color: var(--willow); }
.btn.small { padding: 8px 11px; font-size: 14px; }
.btn[disabled], .btn[aria-disabled="true"] { opacity: .45; cursor: not-allowed; transform: none; }
.menu-btn { display: none; }
.nav-buy { display: none; }
@media (max-width: 760px) {
  .nav { display: none; position: absolute; top: 58px; left: 0; right: 0; background: var(--paper); border-bottom: 1px solid var(--line); flex-direction: column; align-items: stretch; padding: 8px var(--gut) 14px; }
  .nav.open { display: flex; }
  .nav a[aria-current="page"] { box-shadow: inset 2px 0 0 var(--willow); border-radius: 0 var(--r) var(--r) 0; }
  .menu-btn { display: inline-flex; margin-left: auto; }
  .top .buy { display: none; }
  .nav-buy { display: block; font-weight: 600; }
}

/* launch / CA strip */
.castrip { background: var(--ink); color: #EFE9DD; font-size: 14px; }
.castrip .wrap { display: flex; flex-wrap: wrap; gap: 6px 18px; align-items: center; padding-top: 9px; padding-bottom: 9px; }
.castrip b { font-weight: 600; }
.castrip .mono { color: #fff; }
.castrip a { color: #CFE0B8; }
.ca { display: inline-flex; align-items: center; gap: 8px; min-width: 0; max-width: 100%; }
.ca .addr { font: 500 13px/1.3 var(--f-mono); overflow-wrap: anywhere; }
.ca button { font: 600 12px/1 var(--f-text); padding: 6px 9px; border-radius: 4px; border: 1px solid #6B6357; background: transparent; color: #EFE9DD; cursor: pointer; }
.ca button[disabled] { opacity: .5; cursor: not-allowed; }

/* sections */
section { padding: 34px 0; }
section + section { border-top: 1px solid var(--line); }
.hero { padding: 34px 0 10px; }
.hero .lede { font-size: clamp(17px, 2vw, 19px); max-width: 66ch; color: var(--ink-2); }
.chips { display: flex; flex-wrap: wrap; gap: 8px; margin: 14px 0 0; padding: 0; list-style: none; }
.chip { display: inline-flex; align-items: center; gap: 7px; font: 500 12.5px/1 var(--f-mono); padding: 7px 10px; border: 1px solid var(--line-2); border-radius: 999px; background: var(--paper); color: var(--ink-2); }
.chip::before { content: ''; width: 7px; height: 7px; border-radius: 50%; background: var(--muted); }
.chip.ok::before { background: var(--willow); }
.chip.pend::before { background: var(--ochre); }
.chip.no::before { background: var(--warn); }

.card { background: var(--paper); border: 1px solid var(--line); border-radius: var(--r); padding: 18px; min-width: 0; }
.card h3 { margin-bottom: 8px; }
.grid2 { display: grid; grid-template-columns: 1fr 1fr; gap: 16px; }
.grid3 { display: grid; grid-template-columns: repeat(3, 1fr); gap: 16px; }
.grid4 { display: grid; grid-template-columns: repeat(4, 1fr); gap: 12px; }
@media (max-width: 900px) { .grid3 { grid-template-columns: 1fr; } .grid4 { grid-template-columns: 1fr 1fr; } }
@media (max-width: 760px) { .grid2 { grid-template-columns: 1fr; } }
@media (max-width: 420px) { .grid4 { grid-template-columns: 1fr; } }

.limits { display: grid; grid-template-columns: repeat(4, 1fr); gap: 0; border: 1px solid var(--line); border-radius: var(--r); background: var(--paper); margin-top: 18px; }
.limits > div { padding: 13px 14px; border-left: 1px solid var(--line); min-width: 0; }
.limits > div:first-child { border-left: 0; }
.limits b { display: block; font: 600 15px/1.25 var(--f-display); margin-bottom: 3px; }
.limits span { font-size: 13.5px; color: var(--muted); }
@media (max-width: 900px) { .limits { grid-template-columns: 1fr 1fr; } .limits > div:nth-child(3) { border-left: 0; } .limits > div:nth-child(n+3) { border-top: 1px solid var(--line); } }
@media (max-width: 420px) { .limits { grid-template-columns: 1fr; } .limits > div { border-left: 0; } .limits > div + div { border-top: 1px solid var(--line); } }

/* the weave (hero object) */
.loom { margin-top: 22px; background: var(--paper); border: 1px solid var(--line); border-radius: var(--r); padding: 14px 14px 12px; }
.loom-head { display: flex; flex-wrap: wrap; justify-content: space-between; align-items: baseline; gap: 8px 16px; margin-bottom: 10px; }
.loom-head h2 { font-size: 20px; margin: 0; }
.seg { display: inline-flex; border: 1px solid var(--line-2); border-radius: var(--r); overflow: hidden; }
.seg button { font: 600 13px/1 var(--f-text); padding: 8px 11px; border: 0; background: transparent; color: var(--ink-2); cursor: pointer; }
.seg button + button { border-left: 1px solid var(--line-2); }
.seg button[aria-pressed="true"] { background: var(--ink); color: var(--paper); }
.weave { position: relative; display: flex; height: 132px; border-radius: 4px; overflow: hidden; background: var(--paper-2); }
.strand { position: relative; height: 100%; flex: 0 0 auto; transition: width .9s var(--ease); border-right: 1px solid var(--paper); min-width: 0; overflow: hidden; }
.strand .fill { position: absolute; inset: 0; background: var(--sc, var(--willow)); }
.strand .weft { position: absolute; inset: 0; background-image: repeating-linear-gradient(0deg, rgba(248,245,238,.0) 0 10px, rgba(248,245,238,.55) 10px 13px, rgba(248,245,238,0) 13px 22px); }
.strand:nth-child(even) .weft { background-position: 0 11px; }
.strand .lab { position: absolute; left: 6px; right: 4px; bottom: 7px; color: #FBF8F1; font: 500 11.5px/1.25 var(--f-mono); white-space: nowrap; }
.strand .lab b { display: block; font: 600 13px/1.2 var(--f-text); }
.weave.pending .strand .fill { background: repeating-linear-gradient(135deg, var(--ochre) 0 7px, #C27A43 7px 14px); }
.shuttle { position: absolute; top: 0; bottom: 0; width: 2px; left: -4px; background: var(--ochre); box-shadow: 0 0 0 1px rgba(248,245,238,.7); opacity: 0; pointer-events: none; }
.shuttle.go { animation: shuttle 1.5s var(--ease) forwards; }
@keyframes shuttle { 0% { left: -4px; opacity: 1; } 92% { opacity: 1; } 100% { left: 100%; opacity: 0; } }
.loom-foot { display: flex; flex-wrap: wrap; gap: 6px 18px; margin-top: 9px; font-size: 13px; color: var(--muted); }
.legend-dot { display: inline-block; width: 10px; height: 10px; border-radius: 2px; vertical-align: -1px; margin-right: 5px; }
@media (max-width: 600px) { .weave { height: 108px; } .strand .lab { writing-mode: vertical-rl; transform: rotate(180deg); left: auto; right: auto; bottom: 6px; top: 6px; width: 100%; display: flex; align-items: center; } .strand .lab b { display: inline; margin-left: 4px; } }
@media (prefers-reduced-motion: reduce) { .strand { transition: none; } .shuttle.go { animation: none; } }

/* big number */
.figure { font: 500 clamp(30px, 5vw, 44px)/1.05 var(--f-display); letter-spacing: -.02em; font-variant-numeric: tabular-nums; }
.figure.empty { color: var(--muted); font-size: clamp(22px, 3.2vw, 28px); }
.label { font-size: 13px; color: var(--muted); }
.note { border-left: 3px solid var(--line-2); padding: 4px 0 4px 12px; color: var(--ink-2); font-size: 14.5px; margin: 12px 0; }
.note.pend { border-color: var(--ochre); }
.note.warn { border-color: var(--warn); }
.note.ok { border-color: var(--willow); }

/* tables */
.tablewrap { overflow-x: auto; -webkit-overflow-scrolling: touch; border: 1px solid var(--line); border-radius: var(--r); background: var(--paper); max-width: 100%; }
table { border-collapse: collapse; width: 100%; font-size: 14px; }
th, td { text-align: right; padding: 9px 10px; border-bottom: 1px solid var(--line); white-space: nowrap; font-variant-numeric: tabular-nums; }
th:first-child, td:first-child { text-align: left; position: sticky; left: 0; background: var(--paper); }
th { font: 500 11.5px/1.2 var(--f-mono); text-transform: uppercase; letter-spacing: .05em; color: var(--muted); background: var(--paper-2); }
th:first-child { background: var(--paper-2); }
tr:last-child td { border-bottom: 0; }
td.num, .num { font-family: var(--f-mono); font-size: 13px; }
td .sym { font-weight: 700; }
.pos { color: var(--willow); }
.neg { color: var(--ochre); }
.bar { display: inline-block; height: 6px; border-radius: 3px; background: var(--willow); vertical-align: middle; margin-left: 6px; }
.bar.pend { background: var(--ochre); }
.badge { display: inline-block; font: 500 11px/1 var(--f-mono); padding: 4px 6px; border-radius: 4px; background: var(--paper-2); border: 1px solid var(--line); color: var(--muted); }
.badge.warn { background: var(--warn-soft); color: var(--warn); border-color: #E5BFBF; }
.badge.pend { background: var(--ochre-soft); color: #7F4119; border-color: #E4C3A7; }
.badge.ok { background: var(--willow-soft); color: #2F4D1F; border-color: #C1D1AD; }

/* countdown */
.count { font: 500 26px/1.1 var(--f-mono); letter-spacing: -.01em; font-variant-numeric: tabular-nums; }
.track { height: 8px; background: var(--paper-2); border: 1px solid var(--line); border-radius: 4px; overflow: hidden; margin: 10px 0 6px; }
.track i { display: block; height: 100%; width: 0; background: var(--ochre); transition: width 1s linear; }

/* actions */
.action { display: flex; flex-direction: column; gap: 10px; }
.action .why { font-size: 13.5px; color: var(--muted); min-height: 2.6em; }
.action .why.err { color: var(--warn); }
.action .why.ok { color: var(--willow); }
.field { display: flex; gap: 8px; flex-wrap: wrap; }
.field input { flex: 1 1 140px; min-width: 0; font: 500 15px/1 var(--f-mono); padding: 10px 11px; border-radius: var(--r); border: 1px solid var(--line-2); background: #fff; color: var(--ink); }
.field input:focus, .btn:focus-visible, a:focus-visible, button:focus-visible { outline: 2px solid var(--ochre); outline-offset: 2px; }
.skips { display: flex; flex-wrap: wrap; gap: 6px 14px; font-size: 13.5px; }

/* rationale */
.rationale { font-family: var(--f-display); font-size: 17px; line-height: 1.5; font-variation-settings: 'SOFT' 80, 'opsz' 18; }
.rationale.empty { font-family: var(--f-text); font-size: 15px; color: var(--muted); font-style: normal; }
details { border: 1px solid var(--line); border-radius: var(--r); background: var(--paper); padding: 10px 14px; margin: 10px 0; }
details summary { cursor: pointer; font-weight: 600; }
details[open] summary { margin-bottom: 8px; }
.kv { display: grid; grid-template-columns: max-content 1fr; gap: 6px 14px; font-size: 14px; }
.kv dt { color: var(--muted); }
.kv dd { margin: 0; overflow-wrap: anywhere; font-family: var(--f-mono); font-size: 13px; }

/* prose pages */
.prose { max-width: 74ch; }
.prose h2 { margin-top: 1.6em; }
.prose h3 { margin-top: 1.3em; }
.prose ul, .prose ol { padding-left: 1.2em; }
.prose li { margin: .3em 0; }
.toc { display: flex; flex-wrap: wrap; gap: 6px; margin: 10px 0 0; padding: 0; list-style: none; }
.toc a { display: inline-block; padding: 6px 10px; border: 1px solid var(--line-2); border-radius: 999px; text-decoration: none; color: var(--ink-2); font-size: 14px; background: var(--paper); }
.limits-list li { margin: .5em 0; }

/* footer */
footer { border-top: 1px solid var(--line); background: var(--paper); margin-top: 30px; padding: 26px 0 40px; font-size: 14px; color: var(--muted); }
footer .wrap { display: grid; gap: 10px; }
footer nav { display: flex; flex-wrap: wrap; gap: 4px 16px; }
footer a { color: var(--ink-2); }
.toast { position: fixed; left: 50%; bottom: 18px; transform: translateX(-50%); background: var(--ink); color: var(--paper); padding: 10px 14px; border-radius: var(--r); font-size: 14px; z-index: 50; max-width: calc(100vw - 32px); }
.addr-break { overflow-wrap: anywhere; word-break: break-all; }
