/* Checkout Diaries — design system
   A diary about AI-run checkouts, told through the vocabulary of
   receipts and ledgers: hairline rules, tabular numbers, stamped states. */

@import url('https://fonts.googleapis.com/css2?family=Fraunces:opsz,wght@9..144,400;9..144,500;9..144,600&family=Fraunces:ital,opsz,wght@1,9..144,500&family=Source+Sans+3:wght@400;500;600&family=IBM+Plex+Mono:wght@400;500&display=swap');

:root{
  --paper: #EFEBE0;
  --paper-raised: #F8F6EF;
  --ink: #1E2B3C;
  --ink-soft: #57606F;
  --ink-faint: #8A8F98;
  --line: #D2CBB6;
  --stamp-red: #A5352A;
  --stamp-red-soft: #E7D9D4;
  --ledger-green: #3E5C4C;
  --ledger-green-soft: #DCE3DA;
  --max: 640px;
  --max-wide: 860px;
}

*{ box-sizing: border-box; }

html{ scroll-behavior: smooth; }

body{
  margin: 0;
  background: var(--paper);
  color: var(--ink);
  font-family: 'Source Sans 3', -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif;
  font-size: 17px;
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
}

img{ max-width: 100%; display: block; }

a{ color: inherit; }

/* ---------- Layout shell ---------- */

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

.wrap--wide{ max-width: var(--max-wide); }

/* ---------- Site header ---------- */

.site-header{
  border-bottom: 1px solid var(--line);
  padding: 28px 0 24px;
}

.site-header .wrap{
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  gap: 16px;
  flex-wrap: wrap;
}

.wordmark{
  font-family: 'Fraunces', serif;
  font-weight: 600;
  font-size: 1.35rem;
  letter-spacing: -0.01em;
  text-decoration: none;
  color: var(--ink);
}

.wordmark span{
  color: var(--stamp-red);
}

.tagline{
  font-family: 'IBM Plex Mono', monospace;
  font-size: 0.78rem;
  color: var(--ink-soft);
  letter-spacing: 0.01em;
}

.site-nav{
  display: flex;
  gap: 22px;
  font-family: 'IBM Plex Mono', monospace;
  font-size: 0.82rem;
}

.site-nav a{
  text-decoration: none;
  color: var(--ink-soft);
}

.site-nav a:hover{
  color: var(--stamp-red);
}

/* ---------- Hero ---------- */

.hero{
  padding: 56px 0 48px;
  border-bottom: 1px solid var(--line);
}

.hero h1{
  font-family: 'Fraunces', serif;
  font-weight: 500;
  font-size: clamp(2rem, 4.5vw, 2.9rem);
  line-height: 1.12;
  letter-spacing: -0.015em;
  margin: 0 0 18px;
  max-width: 15ch;
}

.hero p{
  font-size: 1.08rem;
  color: var(--ink-soft);
  max-width: 46ch;
  margin: 0;
}

/* receipt strip — decorative, but built from the real first entry's numbers */
.receipt-strip{
  margin-top: 40px;
  background: var(--paper-raised);
  border: 1px solid var(--line);
  padding: 18px 22px;
  font-family: 'IBM Plex Mono', monospace;
  font-size: 0.82rem;
  color: var(--ink-soft);
  max-width: 420px;
  position: relative;
}

.receipt-strip::before{
  content: "";
  position: absolute;
  top: -1px; left: 0; right: 0;
  height: 6px;
  background-image: linear-gradient(135deg, var(--paper) 25%, transparent 25%),
                     linear-gradient(-135deg, var(--paper) 25%, transparent 25%);
  background-size: 12px 12px;
  background-position: top;
}

.receipt-strip .row{
  display: flex;
  justify-content: space-between;
  padding: 3px 0;
}

.receipt-strip .row.total{
  border-top: 1px dashed var(--line);
  margin-top: 6px;
  padding-top: 8px;
  color: var(--ink);
  font-weight: 500;
}

/* ---------- Entry list (homepage) ---------- */

.entries{
  padding: 8px 0 64px;
}

.entry-row{
  display: block;
  padding: 28px 0;
  border-bottom: 1px solid var(--line);
  text-decoration: none;
  color: inherit;
}

.entry-row:first-child{ padding-top: 40px; }

.entry-meta{
  font-family: 'IBM Plex Mono', monospace;
  font-size: 0.76rem;
  color: var(--ink-faint);
  margin-bottom: 8px;
}

.entry-row h2{
  font-family: 'Fraunces', serif;
  font-weight: 500;
  font-size: 1.5rem;
  line-height: 1.25;
  margin: 0 0 8px;
  letter-spacing: -0.01em;
}

.entry-row p{
  margin: 0;
  color: var(--ink-soft);
  max-width: 60ch;
}

.entry-row .read-more{
  display: inline-block;
  margin-top: 12px;
  font-family: 'IBM Plex Mono', monospace;
  font-size: 0.78rem;
  color: var(--stamp-red);
}

.empty-note{
  padding: 40px 0;
  color: var(--ink-soft);
  font-style: italic;
}

/* ---------- Footer ---------- */

.site-footer{
  border-top: 1px solid var(--line);
  padding: 28px 0 40px;
  font-size: 0.85rem;
  color: var(--ink-faint);
}

/* ---------- Post page ---------- */

.post-header{
  padding: 48px 0 32px;
  border-bottom: 1px solid var(--line);
}

.kicker{
  font-family: 'IBM Plex Mono', monospace;
  font-size: 0.78rem;
  color: var(--stamp-red);
  margin-bottom: 14px;
}

.post-header h1{
  font-family: 'Fraunces', serif;
  font-weight: 500;
  font-size: clamp(2rem, 5vw, 2.7rem);
  line-height: 1.15;
  letter-spacing: -0.015em;
  margin: 0 0 18px;
}

.post-header .dek{
  font-family: 'Fraunces', serif;
  font-style: italic;
  font-weight: 400;
  font-size: 1.15rem;
  color: var(--ink-soft);
  line-height: 1.5;
  margin: 0 0 20px;
  max-width: 56ch;
}

.byline{
  font-family: 'IBM Plex Mono', monospace;
  font-size: 0.8rem;
  color: var(--ink-faint);
}

.post-body{
  padding: 44px 0 24px;
}

.post-body h2{
  font-family: 'Fraunces', serif;
  font-weight: 500;
  font-size: 1.55rem;
  line-height: 1.3;
  letter-spacing: -0.01em;
  margin: 56px 0 10px;
}

.post-body .section-kicker{
  font-family: 'IBM Plex Mono', monospace;
  font-size: 0.74rem;
  color: var(--ink-faint);
  margin: 56px 0 6px;
}

.post-body h2 + .section-kicker,
.section-kicker + h2{
  margin-top: 0;
}

.post-body p{
  margin: 0 0 20px;
  max-width: 62ch;
}

.post-body p.lede{
  font-size: 1.08rem;
  color: var(--ink-soft);
}

/* three-across fact cards (Reading / Building / Music, Control / Transparency / Privacy) */
.card-row{
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 16px;
  margin: 24px 0 28px;
}

.card-row.two{ grid-template-columns: repeat(2, 1fr); }

.fact-card{
  background: var(--paper-raised);
  border: 1px solid var(--line);
  padding: 16px 18px;
}

.fact-card .label{
  font-family: 'IBM Plex Mono', monospace;
  font-size: 0.72rem;
  color: var(--stamp-red);
  margin-bottom: 8px;
}

.fact-card p{
  margin: 0;
  font-size: 0.94rem;
  color: var(--ink-soft);
  max-width: none;
}

/* pull callout — the "that convenience is real" style box */
.callout{
  border-left: 3px solid var(--stamp-red);
  background: var(--paper-raised);
  padding: 18px 22px;
  margin: 28px 0;
  font-size: 0.98rem;
  color: var(--ink);
}

.callout strong{ color: var(--stamp-red); }

.callout.verified{
  border-left-color: var(--ledger-green);
  background: var(--ledger-green-soft);
}

.callout.verified strong{ color: var(--ledger-green); }

/* ledger table — "what the bank showed" */
.ledger-table{
  border: 1px solid var(--line);
  margin: 28px 0;
  font-family: 'IBM Plex Mono', monospace;
  font-size: 0.86rem;
}

.ledger-table .ledger-row{
  display: flex;
  justify-content: space-between;
  gap: 16px;
  padding: 12px 18px;
  border-bottom: 1px solid var(--line);
}

.ledger-table .ledger-row:last-child{ border-bottom: none; }

.ledger-table .ledger-row.total{
  background: var(--paper-raised);
  font-weight: 500;
}

.ledger-table .ledger-label{ color: var(--ink-soft); }
.ledger-table .ledger-value{ color: var(--ink); }

.ledger-note{
  font-size: 0.88rem;
  color: var(--ink-soft);
  margin: 10px 0 28px;
  max-width: 62ch;
}

/* numbered sequence — genuinely sequential steps / experiments */
.steps{
  list-style: none;
  margin: 24px 0 28px;
  padding: 0;
  counter-reset: step;
}

.steps li{
  counter-increment: step;
  position: relative;
  padding: 4px 0 20px 44px;
  border-bottom: 1px solid var(--line);
  margin-bottom: 20px;
}

.steps li:last-child{ border-bottom: none; margin-bottom: 0; }

.steps li::before{
  content: counter(step, decimal-leading-zero);
  position: absolute;
  left: 0; top: 2px;
  font-family: 'IBM Plex Mono', monospace;
  font-size: 0.82rem;
  color: var(--stamp-red);
}

.steps li strong{
  display: block;
  font-family: 'Source Sans 3', sans-serif;
  font-weight: 600;
  margin-bottom: 4px;
}

.steps li p{ margin: 0; color: var(--ink-soft); max-width: 58ch; }

/* pull quote used for the two "headline" lines of the essay */
.pull-quote{
  font-family: 'Fraunces', serif;
  font-style: italic;
  font-weight: 500;
  font-size: 1.35rem;
  line-height: 1.42;
  color: var(--ink);
  margin: 36px 0;
  max-width: 46ch;
  border-top: 1px solid var(--line);
  border-bottom: 1px solid var(--line);
  padding: 24px 0;
}

.privacy-note{
  font-size: 0.86rem;
  color: var(--ink-faint);
  border-top: 1px solid var(--line);
  padding-top: 16px;
  margin: 32px 0;
}

.sources{
  font-size: 0.82rem;
  color: var(--ink-faint);
  margin: 32px 0;
}

/* ---------- Contact form ---------- */

.contact-form{
  margin: 8px 0 40px;
  max-width: 480px;
}

.field{
  margin-bottom: 20px;
}

.field label{
  display: block;
  font-family: 'IBM Plex Mono', monospace;
  font-size: 0.78rem;
  color: var(--ink-soft);
  margin-bottom: 6px;
}

.field input,
.field textarea{
  width: 100%;
  background: var(--paper-raised);
  border: 1px solid var(--line);
  padding: 12px 14px;
  font-family: 'Source Sans 3', sans-serif;
  font-size: 0.98rem;
  color: var(--ink);
}

.field textarea{
  resize: vertical;
  min-height: 140px;
}

.field input:focus,
.field textarea:focus{
  outline: 2px solid var(--stamp-red);
  outline-offset: 1px;
}

.submit-btn{
  background: var(--ink);
  color: var(--paper);
  border: none;
  padding: 13px 26px;
  font-family: 'Source Sans 3', sans-serif;
  font-weight: 600;
  font-size: 0.95rem;
  cursor: pointer;
}

.submit-btn:hover{ background: var(--stamp-red); }

.honeypot{ position: absolute; left: -9999px; }

@media (max-width: 640px){
  .card-row{ grid-template-columns: 1fr; }
  .card-row.two{ grid-template-columns: 1fr; }
}
