/* Tremolo — Paper. Site and writing.
   Locked in design-lab/DECISION.md: warm off-white, Georgia, one earthy accent, narrow column.
   Everything DeFi is dark; a light serif reads as a journal, which is the position. */

:root {
  --bg: #fbfaf7;
  --ink: #1a1a18;
  --muted: #8a8579;
  --soft: #6b6659;
  --accent: #7a4c1e;
  --line: #ddd9d0;
  --hair: #eae6dd;
  --measure: 760px;
}

* { box-sizing: border-box; }

html { -webkit-text-size-adjust: 100%; }

body {
  margin: 0;
  background: var(--bg);
  color: var(--ink);
  font: 16px/1.66 Georgia, "Times New Roman", serif;
  font-feature-settings: "onum" 1;
  -webkit-font-smoothing: antialiased;
}

.wrap { max-width: var(--measure); margin: 0 auto; padding: 0 30px; }

/* --- masthead ------------------------------------------------------------ */

header.top {
  border-bottom: 1px solid var(--line);
  padding: 26px 0 14px;
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  gap: 20px;
}
.brand {
  font-size: 20px;
  font-style: italic;
  letter-spacing: .01em;
  text-decoration: none;
  color: var(--ink);
}
.brand span { font-style: normal; letter-spacing: .18em; font-size: 11px; color: var(--muted); margin-left: 10px; }
nav { display: flex; gap: 22px; }
nav a {
  font-size: 13.5px;
  font-style: italic;
  color: var(--soft);
  text-decoration: none;
  border-bottom: 1px solid transparent;
  padding-bottom: 2px;
}
nav a:hover { color: var(--ink); border-bottom-color: var(--line); }
nav a.on { color: var(--ink); border-bottom-color: var(--ink); }

/* --- type ---------------------------------------------------------------- */

.kicker { font-size: 13px; font-style: italic; color: var(--muted); letter-spacing: .02em; }
h1 { font-size: 40px; line-height: 1.16; font-weight: 400; letter-spacing: -.015em; margin: 14px 0 0; }
h2 { font-size: 23px; line-height: 1.28; font-weight: 400; margin: 52px 0 14px; letter-spacing: -.01em; }
h3 { font-size: 17px; font-weight: 400; font-style: italic; color: var(--soft); margin: 32px 0 10px; }
p { margin: 0 0 18px; }
p.lead { font-size: 19px; line-height: 1.55; color: var(--soft); }
a { color: var(--ink); text-decoration: none; border-bottom: 1px solid var(--line); }
a:hover { border-bottom-color: var(--accent); color: var(--accent); }
em { color: var(--soft); }
strong { font-weight: 400; border-bottom: 2px solid var(--accent); }

.rule { height: 1px; background: var(--line); margin: 0; border: 0; }
.hair { height: 1px; background: var(--hair); border: 0; margin: 34px 0; }

/* --- blog index ---------------------------------------------------------- */

.posts { margin: 42px 0 0; }
.post {
  display: block;
  padding: 26px 0;
  border-top: 1px solid var(--line);
  text-decoration: none;
  border-bottom: 0;
  color: inherit;
}
.post:last-of-type { border-bottom: 1px solid var(--line); }
.post:hover { border-bottom-color: var(--line); }
.post .when { font-size: 12.5px; font-style: italic; color: var(--muted); }
.post h2 { font-size: 25px; margin: 8px 0 8px; line-height: 1.22; letter-spacing: -.012em; }
.post:hover h2 { color: var(--accent); }
.post p { margin: 0; color: var(--soft); font-size: 16px; max-width: 62ch; }
.post .tag { font-size: 12px; font-style: italic; color: var(--muted); margin-top: 10px; }

/* --- article furniture --------------------------------------------------- */

.chapter {
  font-size: 12px;
  font-style: italic;
  color: var(--muted);
  letter-spacing: .06em;
  text-transform: uppercase;
  margin: 54px 0 -6px;
}
.aside {
  margin: 32px 0;
  padding: 20px 24px;
  background: rgba(26,26,24,.028);
  border-left: 2px solid var(--line);
  font-size: 15px;
}
.aside .h { font-style: italic; color: var(--soft); margin-bottom: 8px; }
.aside p:last-child { margin-bottom: 0; }

/* --- loading ------------------------------------------------------------- */

/* A pending figure should read as "arriving", not as "broken". A dim bar that breathes says
   the first; four dots said the second. */
@keyframes breathe { 0%,100% { opacity: .28 } 50% { opacity: .13 } }
.skel {
  display: inline-block;
  background: currentColor;
  animation: breathe 1.5s ease-in-out infinite;
  border-radius: 1px;
  vertical-align: baseline;
}

/* --- numbers ------------------------------------------------------------- */

.num { font-variant-numeric: tabular-nums lining-nums; }

.figures { display: grid; grid-template-columns: repeat(4, 1fr); border-top: 1px solid var(--ink); border-bottom: 1px solid var(--line); margin: 30px 0; }
.fig { padding: 16px 18px 16px 0; }
.fig .lbl { font-size: 12px; font-style: italic; color: var(--muted); margin-bottom: 6px; }
.fig .v { font-size: 27px; font-variant-numeric: tabular-nums; letter-spacing: -.02em; }
.fig .v i { font-size: 13px; font-style: italic; color: var(--muted); margin-left: 3px; }
.fig.accent .v { color: var(--accent); }

table { width: 100%; border-collapse: collapse; margin: 24px 0; font-size: 15px; }
th { font-size: 12px; font-style: italic; font-weight: 400; color: var(--muted); text-align: left; padding: 9px 12px 9px 0; border-bottom: 1px solid var(--ink); }
td { padding: 11px 12px 11px 0; border-bottom: 1px solid var(--hair); font-variant-numeric: tabular-nums; }
td.t { font-variant-numeric: normal; }
tr:last-child td { border-bottom: 0; }

blockquote {
  margin: 28px 0;
  padding: 0 0 0 22px;
  border-left: 2px solid var(--accent);
  font-style: italic;
  color: var(--soft);
}

code { font: 13.5px/1.5 ui-monospace, "SF Mono", Menlo, monospace; background: rgba(26,26,24,.045); padding: 1px 5px; }
pre { background: rgba(26,26,24,.035); padding: 16px 18px; overflow-x: auto; font: 13px/1.6 ui-monospace, "SF Mono", Menlo, monospace; border-left: 2px solid var(--line); }
pre code { background: none; padding: 0; }

figure { margin: 40px 0; }
figcaption { font-size: 12.5px; font-style: italic; color: var(--muted); margin-top: 12px; line-height: 1.5; }
figure svg { width: 100%; display: block; color: var(--ink); }
.figlbl { font-size: 12px; font-style: italic; color: var(--muted); margin-bottom: 12px; letter-spacing: .01em; }

/* A number that carries the paragraph should look like it does. */
.big {
  font-size: 46px;
  line-height: 1;
  letter-spacing: -.035em;
  font-variant-numeric: tabular-nums;
  color: var(--accent);
  display: block;
  margin: 6px 0 2px;
}
.bigwrap { margin: 34px 0; display: flex; gap: 34px; flex-wrap: wrap; align-items: flex-start; }
.bigwrap > div { flex: 1 1 190px; }
.bigwrap .cap { font-size: 13px; font-style: italic; color: var(--muted); line-height: 1.5; }

td.lead-num { font-size: 17px; color: var(--accent); }

/* Closing statement: the last thing read should be a claim, not a footnote. */
.close { margin: 54px 0 0; padding: 28px 0 0; border-top: 1px solid var(--ink); }
.close p { font-size: 18.5px; line-height: 1.5; color: var(--ink); max-width: 52ch; }
.close .actions { margin-top: 24px; display: flex; gap: 26px; flex-wrap: wrap; align-items: baseline; }
.close .actions a { font-size: 15.5px; font-style: italic; }
.close .actions a.primary { border-bottom-width: 2px; border-bottom-color: var(--accent); }

.src { font-size: 12.5px; font-style: italic; color: var(--muted); }
.src a { border-bottom-color: var(--hair); }

footer.bot { border-top: 1px solid var(--line); margin-top: 64px; padding: 22px 0 48px; font-size: 12.5px; font-style: italic; color: var(--muted); display: flex; justify-content: space-between; gap: 18px; flex-wrap: wrap; }

/* --- small screens ------------------------------------------------------- */

@media (max-width: 680px) {
  body { font-size: 15.5px; }
  h1 { font-size: 30px; }
  .figures { grid-template-columns: repeat(2, 1fr); }
  .fig { padding-bottom: 14px; }
  table { font-size: 14px; }
}
