/* Same fonts and palette as the Blotter GUI (views/layout.erb). */
@font-face { font-family: "Instrument Sans"; font-style: normal; font-weight: 400 600; font-display: swap;
  src: url(fonts/instrument-sans-latin.woff2) format("woff2");
  unicode-range: U+0000-00FF, U+2013-2014, U+2018-2019, U+201C-201D, U+2026; }
@font-face { font-family: "Instrument Sans"; font-style: normal; font-weight: 400 600; font-display: swap;
  src: url(fonts/instrument-sans-latin-ext.woff2) format("woff2");
  unicode-range: U+0100-02BA, U+1E00-1EFF, U+2113, U+2C60-2C7F, U+A720-A7FF; }
@font-face { font-family: "Fragment Mono"; font-style: normal; font-weight: 400; font-display: swap;
  src: url(fonts/fragment-mono-latin.woff2) format("woff2");
  unicode-range: U+0000-00FF, U+2013-2014, U+2018-2019, U+201C-201D, U+2026; }
@font-face { font-family: "Fragment Mono"; font-style: normal; font-weight: 400; font-display: swap;
  src: url(fonts/fragment-mono-latin-ext.woff2) format("woff2");
  unicode-range: U+0100-02BA, U+1E00-1EFF, U+2113, U+2C60-2C7F, U+A720-A7FF; }

:root {
  --ink: #1c1c1a; --muted: #77776f; --hairline: #e4e4df;
  --paper: #fbfbf9; --well: #f4f4f0; --accent: #e8590c;
  --gutter: clamp(1.25rem, 6vw, 5rem);
  --label: 11rem;
}
@media (prefers-color-scheme: dark) {
  :root {
    --ink: #f4f2ec; --muted: #96968e; --hairline: #2f2f2c;
    --paper: #171715; --well: #1f1f1d; --accent: #f26a1b;
  }
}

* { margin: 0; box-sizing: border-box; }
html { scroll-behavior: smooth; scroll-padding-top: 2rem; -webkit-text-size-adjust: 100%; }
body {
  background: var(--paper); color: var(--ink);
  font: 16px/1.6 "Instrument Sans", sans-serif;
  padding: 0 var(--gutter);
  max-width: 78rem; margin: 0 auto;
  -webkit-font-smoothing: antialiased;
}
a { color: inherit; text-underline-offset: 3px; text-decoration-thickness: 1px; }
a:hover { text-decoration-color: var(--accent); }
:focus-visible { outline: 2px solid var(--accent); outline-offset: 3px; }
::selection { background: var(--accent); color: #fff; }
strong { font-weight: 600; }
code, .mono { font-family: "Fragment Mono", monospace; font-size: 0.86em; }

/* ── Header ─────────────────────────────────────────── */
.top { display: flex; align-items: center; justify-content: space-between; gap: 1rem; padding: 1.75rem 0; }
.brand { display: flex; align-items: center; gap: 0.6rem; font-weight: 600; font-size: 17px; text-decoration: none; letter-spacing: 0.01em; }
.mark { width: 30px; height: 30px; flex: none; }
.mark .ink { fill: var(--ink); }
.mark .line { fill: none; stroke: var(--accent); stroke-width: 5; stroke-linecap: round; }
.brand:hover .mark { animation: rock 0.9s ease-in-out; transform-origin: 50% 62%; }
@keyframes rock { 25% { transform: rotate(-9deg); } 60% { transform: rotate(7deg); } }
nav { display: flex; gap: clamp(1rem, 3vw, 1.75rem); font-size: 14px; }
nav a { color: var(--muted); text-decoration: none; white-space: nowrap; }
nav a:hover { color: var(--ink); }

/* ── Hero ───────────────────────────────────────────── */
.hero { padding: clamp(2.5rem, 9vw, 7rem) 0 clamp(2.5rem, 6vw, 4.5rem); }
h1 {
  font-size: clamp(2.6rem, 8.2vw, 6.4rem); font-weight: 600;
  line-height: 1.08; letter-spacing: -0.04em; max-width: 13em; text-wrap: balance;
}
.quiet { position: relative; white-space: nowrap; }
.quiet svg {
  position: absolute; left: -2%; bottom: -0.1em; width: 104%; height: 0.16em; overflow: visible;
  animation: blot 0.9s 0.35s cubic-bezier(0.6, 0, 0.2, 1) both;
}
.quiet path { fill: none; stroke: var(--accent); stroke-width: 0.075em; stroke-linecap: round; }
@keyframes blot { from { clip-path: inset(-100% 100% -100% 0); } to { clip-path: inset(-100% -5% -100% 0); } }
.lede { margin-top: clamp(2rem, 5vw, 3.25rem); margin-left: min(var(--label), 14vw); max-width: 35rem; font-size: clamp(1.05rem, 1.6vw, 1.2rem); line-height: 1.5; }
.cta { display: flex; flex-wrap: wrap; align-items: center; gap: 1.5rem; margin-top: 1.75rem; font-size: 15px; }
.button { background: var(--ink); color: var(--paper); text-decoration: none; padding: 0.7rem 1.25rem; font-weight: 500; transition: background 0.15s; }
.button:hover { background: var(--accent); color: #fff; }

/* ── Demo ledger ────────────────────────────────────── */
.demo { border-top: 1px solid var(--ink); padding: 1.25rem 0 0; font-size: 14px; }
.incoming {
  display: flex; align-items: baseline; gap: 1rem; min-height: 2.6rem;
  padding: 0 0 1.25rem; white-space: nowrap; overflow: hidden;
}
.label, th, .tally dt {
  font: 500 11px/1.4 "Instrument Sans", sans-serif; text-transform: uppercase;
  letter-spacing: 0.09em; color: var(--muted);
}
#incoming { overflow: hidden; text-overflow: ellipsis; min-width: 0; transition: opacity 0.25s, color 0.25s; }
.verdict { font-size: 12.5px; color: var(--muted); opacity: 0; transition: opacity 0.2s; flex: none; }
.incoming.judged .verdict { opacity: 1; }
.incoming.drop.judged #incoming { color: var(--muted); text-decoration: line-through; text-decoration-color: var(--muted); opacity: 0.6; }
.incoming.new.judged .verdict { color: var(--accent); }
.incoming.fresh #incoming { animation: arrive 0.3s ease-out; }
@keyframes arrive { from { opacity: 0; transform: translateY(-0.5em); } }

table { border-collapse: collapse; width: 100%; table-layout: fixed; }
th { text-align: left; padding: 0 1rem 0.6rem 0; border-bottom: 1px solid var(--ink); }
td { padding: 0.75rem 1rem 0.75rem 0; border-bottom: 1px solid var(--hairline); vertical-align: baseline; overflow-wrap: anywhere; }
th.d, td.d { width: 1.5rem; padding-right: 0; }
th:nth-child(2) { width: 26%; }
th.num, td.num { text-align: right; padding-right: 0; width: 5.5rem; }
td.num { font-variant-numeric: tabular-nums; font-weight: 500; }
.dot { display: inline-block; width: 7px; height: 7px; border-radius: 50%; }
.dot.inline { background: var(--accent); }
.dot.new { background: var(--ink); }
.dot.quiet { background: var(--hairline); }
.tag { font: 500 10.5px "Instrument Sans", sans-serif; text-transform: uppercase; letter-spacing: 0.07em; color: var(--accent); margin-left: 0.6rem; white-space: nowrap; }
.sample { color: var(--muted); }
tr.bump td.num { animation: bump 0.6s ease-out; }
@keyframes bump { 0% { color: var(--accent); transform: translateY(-3px); } }
tr.enter td { animation: enter 1.6s ease-out; }
@keyframes enter { 0% { background: color-mix(in srgb, var(--accent) 22%, transparent); } }

.tally { display: grid; grid-template-columns: repeat(4, 1fr); gap: 1rem; padding: 1.5rem 0 0; }
.tally dd { font-size: clamp(1.5rem, 3.4vw, 2.4rem); font-weight: 600; letter-spacing: -0.03em; font-variant-numeric: tabular-nums; line-height: 1.2; }
.tally div:last-child dd { color: var(--accent); }
figcaption, .note { color: var(--muted); font-size: 13.5px; max-width: 38rem; margin-top: 1.25rem; }

/* ── Ledger rows: margin label + body ───────────────── */
.row {
  display: grid; grid-template-columns: var(--label) minmax(0, 1fr); gap: 0 2rem;
  border-top: 1px solid var(--hairline); padding: clamp(2.5rem, 6vw, 4.5rem) 0;
}
.demo + .row { margin-top: clamp(3rem, 7vw, 5rem); }
.row > .label { padding-top: 0.55rem; }
.body { max-width: 44rem; }
.body > p + p, .body > pre + p { margin-top: 1rem; }
.big { font-size: clamp(1.7rem, 4vw, 2.75rem); font-weight: 600; line-height: 1.08; letter-spacing: -0.03em; text-wrap: balance; }
.big + p { margin-top: 1.5rem; }

.steps { list-style: none; padding: 0; margin-top: 2.5rem; counter-reset: step; }
.steps li { counter-increment: step; display: grid; grid-template-columns: 3rem 1fr; padding: 1.4rem 0; border-top: 1px solid var(--hairline); }
.steps li::before { content: counter(step, decimal-leading-zero); font: 13px/1.9 "Fragment Mono", monospace; color: var(--accent); grid-row: span 2; }
h3 { font-size: 1.05rem; font-weight: 600; }
.steps p { color: var(--muted); margin-top: 0.3rem; grid-column: 2; }

.days { display: grid; grid-template-columns: repeat(30, 1fr); gap: clamp(3px, 0.8vw, 9px); margin-top: 2.25rem; max-width: 36rem; }
.days i { aspect-ratio: 1; border-radius: 50%; border: 1px solid var(--muted); opacity: 0.45; }
.days i.on { background: var(--accent); border-color: var(--accent); opacity: 1; }

.facts { display: grid; grid-template-columns: repeat(auto-fit, minmax(15rem, 1fr)); gap: 0 2.5rem; }
.facts div { padding: 1.25rem 0; border-top: 1px solid var(--hairline); }
.facts dt { font-weight: 600; }
.facts dd { color: var(--muted); margin-top: 0.25rem; font-size: 15px; }

pre {
  font: 13px/1.7 "Fragment Mono", monospace; background: var(--well); border: 1px solid var(--hairline);
  padding: 1.1rem 1.25rem; overflow-x: auto; margin: 1.25rem 0;
}
pre code { font-size: inherit; }
pre .c { color: var(--muted); }

.also { list-style: none; padding: 0; }
.also li { display: grid; grid-template-columns: minmax(0, 17rem) minmax(0, 1fr); gap: 0.2rem 2rem; padding: 0.95rem 0; border-top: 1px solid var(--hairline); }
.also li:first-child { border-top: 0; padding-top: 0.3rem; }
.also a { font-weight: 500; }
.also span { color: var(--muted); font-size: 15px; }

footer.row { color: var(--muted); font-size: 14px; padding-bottom: 4rem; }

@media (max-width: 720px) {
  .row { grid-template-columns: minmax(0, 1fr); }
  .row > .label { padding: 0 0 1rem; }
  .lede { margin-left: 0; }
  .tally { grid-template-columns: repeat(2, 1fr); }
  th:nth-child(2) { width: 34%; }
  th.num, td.num { width: 3.75rem; }
  .demo { font-size: 13px; }
  .incoming { flex-wrap: wrap; gap: 0.3rem; min-height: 5.6rem; align-content: flex-start; }
  .incoming > * { flex: 0 0 100%; }
  .also li { grid-template-columns: 1fr; }
  .days { grid-template-columns: repeat(15, 1fr); }
}
@media (max-width: 420px) {
  nav a:first-child { display: none; }
}
@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  *, *::before, *::after { animation: none !important; transition: none !important; }
}
