:root{
  --bg:#F7F3EC; --paper:#FFFFFF; --ink:#2B2620; --ink-dim:#8A7F6E;
  --line:#E4DBC9; --accent:#7C2D3A; --accent-ink:#FFFFFF; --accent-soft:#F3E1E1;
  --down:#9C6B1F;
}
*{box-sizing:border-box;}
html,body{margin:0; padding:0;}
body{
  background:var(--bg); color:var(--ink);
  font-family:"Inter",-apple-system,BlinkMacSystemFont,sans-serif;
  font-size:16px; line-height:1.5;
}
h1,h2{font-family:"Fraunces","Georgia",serif; margin:0; text-wrap:balance; font-weight:600;}
.num{font-family:"IBM Plex Mono","SFMono-Regular",monospace; font-variant-numeric:tabular-nums;}
a{color:inherit;}
button{font:inherit; color:inherit; background:none; border:none; margin:0; padding:0;}

.wrap{max-width:1040px; margin:0 auto; padding:0 24px;}

header.top{
  display:flex; align-items:center; justify-content:space-between;
  padding:22px 24px;
}
header.top .mark{font-family:"Fraunces",serif; font-weight:600; font-size:19px;}
header.top a.signin{font-size:14px; color:var(--ink-dim); text-decoration:none; border-bottom:1px solid var(--line); padding-bottom:2px;}
header.top a.signin:hover{color:var(--ink); border-color:var(--ink-dim);}

.hero{
  padding:48px 0 64px;
  display:grid; grid-template-columns:1.1fr 0.9fr; gap:56px; align-items:center;
}
.hero h1{font-size:44px; line-height:1.12; letter-spacing:-0.01em;}
.hero .lede{
  margin-top:20px; font-size:17px; line-height:1.6; color:var(--ink); max-width:46ch;
}
.hero .lede strong{font-weight:600;}
.cta-row{display:flex; align-items:center; gap:20px; margin-top:32px; flex-wrap:wrap;}
.btn-primary{
  display:inline-block; background:var(--accent); color:var(--accent-ink);
  font-weight:700; font-size:15px; padding:14px 26px; border-radius:12px;
  text-decoration:none;
}
.btn-primary:hover{background:#671f2a;}
.cta-row .secondary{font-size:14px; color:var(--ink-dim); text-decoration:none; border-bottom:1px solid var(--line); padding-bottom:2px;}
.cta-row .secondary:hover{color:var(--ink); border-color:var(--ink-dim);}

/* the tally card — a physical-feeling artifact, not a screenshot */
.tally-wrap{display:flex; justify-content:center;}
.tally{
  background:var(--paper); border:1px solid var(--line); border-radius:14px;
  box-shadow:0 10px 30px rgba(43,38,32,.12), 0 2px 8px rgba(43,38,32,.06);
  padding:22px 22px 18px; width:100%; max-width:340px;
  transform:rotate(-2.5deg);
}
.tally .heading{font-size:11.5px; text-transform:uppercase; letter-spacing:.08em; color:var(--ink-dim); font-weight:700; margin-bottom:14px;}
.tally-row{
  display:flex; align-items:baseline; justify-content:space-between; gap:10px;
  padding:10px 0; border-top:1px solid var(--line);
}
.tally-row:first-of-type{border-top:none;}
.tally-row .name{font-size:14.5px; font-weight:600;}
.tally-row .unit{font-size:11.5px; color:var(--ink-dim); font-weight:500; display:block; margin-top:1px;}
.tally-row .count{font-size:19px; font-weight:600; white-space:nowrap;}
.tally-row .delta{font-size:11.5px; color:var(--down); font-weight:700; margin-left:6px;}

hr.rule{border:none; border-top:1px solid var(--line); margin:0;}

section{padding:56px 0;}

.beats{display:flex; flex-direction:column; gap:0;}
.beat{padding:18px 0; border-top:1px solid var(--line); font-size:17px; line-height:1.55; max-width:56ch;}
.beat:first-child{border-top:none;}

.split{display:grid; grid-template-columns:1fr 1fr; gap:48px; align-items:start;}
.split p{font-size:16px; line-height:1.65; color:var(--ink); max-width:48ch;}
.split p + p{margin-top:14px;}

.grid-motif{
  border:1px solid var(--line); border-radius:12px; overflow:hidden; background:var(--paper);
}
.grid-motif .row{display:grid; grid-template-columns:2fr 1fr 1fr; font-size:13px;}
.grid-motif .row > div{padding:10px 12px; border-top:1px solid var(--line); border-left:1px solid var(--line);}
.grid-motif .row > div:first-child{border-left:none;}
.grid-motif .row:first-child > div{border-top:none; color:var(--ink-dim); font-weight:600; font-size:11.5px; text-transform:uppercase; letter-spacing:.05em;}

.closing{
  text-align:left; padding:64px 0 80px;
}
.closing h2{font-size:32px; max-width:20ch;}
.closing .lede{margin-top:16px; font-size:16px; color:var(--ink-dim); max-width:50ch;}
.closing .cta-row{margin-top:28px;}

footer{
  border-top:1px solid var(--line); padding:28px 24px; font-size:13px; color:var(--ink-dim);
  display:flex; justify-content:space-between; flex-wrap:wrap; gap:10px;
}
footer a{text-decoration:none; border-bottom:1px solid var(--line);}
footer a:hover{color:var(--ink); border-color:var(--ink-dim);}

@media (max-width:820px){
  .hero{grid-template-columns:1fr; gap:36px; padding:32px 0 48px;}
  .hero h1{font-size:34px;}
  .split{grid-template-columns:1fr; gap:24px;}
  .tally{transform:rotate(-1.2deg); max-width:100%;}
  .closing h2{font-size:26px;}
}

@media (prefers-reduced-motion: reduce){
  .count-anim{transition:none !important;}
}

/* ---- Guide page ---- */
.guide-steps{counter-reset:step; display:flex; flex-direction:column; gap:0;}
.guide-step{
  counter-increment:step; position:relative; padding:28px 0 28px 56px; border-top:1px solid var(--line);
}
.guide-step:first-child{border-top:none; padding-top:0;}
.guide-step::before{
  content:counter(step); position:absolute; left:0; top:28px;
  width:34px; height:34px; border-radius:50%; background:var(--accent); color:var(--accent-ink);
  font-family:"Fraunces",serif; font-weight:600; font-size:15px;
  display:flex; align-items:center; justify-content:center;
}
.guide-step:first-child::before{top:0;}
.guide-step h3{font-family:"Fraunces",serif; font-weight:600; font-size:19px; margin:0 0 8px;}
.guide-step p{font-size:15.5px; line-height:1.65; color:var(--ink); max-width:56ch; margin:0 0 10px;}
.guide-step p:last-child{margin-bottom:0;}
.guide-step code{background:var(--accent-soft); padding:1px 6px; border-radius:5px; font-size:0.92em;}

.tab-strip{display:flex; gap:4px; margin:14px 0 0; flex-wrap:wrap;}
.tab-strip span{
  font-size:12.5px; font-weight:600; color:var(--ink-dim); background:var(--paper);
  border:1px solid var(--line); border-bottom:none; border-radius:8px 8px 0 0; padding:7px 14px;
}
.tab-strip span.active{color:var(--ink); background:var(--bg); border-color:var(--line);}

.sheet-mock{
  border:1px solid var(--line); border-radius:0 10px 10px 10px; overflow:hidden; background:var(--paper);
  margin-top:-1px;
}
.sheet-mock table{width:100%; border-collapse:collapse; font-size:13.5px;}
.sheet-mock th{
  text-align:left; font-weight:600; color:var(--ink-dim); font-size:11.5px; text-transform:uppercase; letter-spacing:.04em;
  background:var(--bg); padding:9px 12px; border-bottom:1px solid var(--line); border-left:1px solid var(--line);
}
.sheet-mock th:first-child{border-left:none;}
.sheet-mock td{padding:9px 12px; border-top:1px solid var(--line); border-left:1px solid var(--line); vertical-align:top;}
.sheet-mock td:first-child{border-left:none;}
.sheet-mock td.cat{font-weight:600; color:var(--down); background:#FBF6EC; text-align:center;}
.sheet-mock td.num{font-family:"IBM Plex Mono",monospace; text-align:right;}

@media (max-width:820px){
  .guide-step{padding-left:48px;}
  .guide-step::before{width:30px; height:30px; font-size:13px;}
  .sheet-mock{overflow-x:auto;}
  .sheet-mock table{min-width:460px;}
}
