/* System Design notes: same tokens and type as index.html */
:root {
  --ink: #0c0c0a;
  --paper: #f7f4ee;
  --cream: #ede9df;
  --fire: #e84830;
  --fire-dark: #b83520;
  --fire-light: #fde8e4;
  --gold: #d4a017;
  --gold-light: #fdf3d0;
  --green: #1a7a4a;
  --green-light: #dff0e8;
  --muted: #6e6b64;
  --border: #ddd9d0;
  --white: #ffffff;
}
* { margin: 0; padding: 0; box-sizing: border-box; }
body {
  background: var(--paper);
  color: var(--ink);
  font-family: "Bricolage Grotesque", sans-serif;
  font-size: 17px;
  line-height: 1.7;
  -webkit-text-size-adjust: 100%;
}
a { color: var(--fire-dark); }

/* nav + footer (as index.html) */
.site-nav {
  position: sticky; top: 0; z-index: 10;
  display: flex; align-items: center; justify-content: space-between;
  padding: 14px 20px;
  background: rgba(247, 244, 238, 0.92);
  backdrop-filter: blur(12px); -webkit-backdrop-filter: blur(12px);
  border-bottom: 1px solid var(--border);
}
.nav-logo, .footer-logo { font-size: 1.3rem; font-weight: 800; color: var(--ink); text-decoration: none; }
.nav-logo span, .footer-logo span { color: var(--fire); }
.nav-link { font-size: 0.9rem; color: var(--muted); text-decoration: none; }
footer {
  background: var(--ink); color: var(--paper);
  padding: 28px 20px; margin-top: 64px;
  display: flex; flex-direction: column; align-items: center; gap: 14px; text-align: center;
}
.footer-logo { color: var(--paper); }
.footer-links { display: flex; gap: 20px; flex-wrap: wrap; justify-content: center; }
.footer-links a { color: rgba(247, 244, 238, 0.55); text-decoration: none; font-size: 0.85rem; }
.footer-copy { font-size: 0.78rem; color: rgba(247, 244, 238, 0.35); }

main { max-width: 720px; margin: 0 auto; padding: 32px 18px 0; }

/* shared bits */
.tag {
  display: inline-block; font-size: 0.7rem; font-weight: 600;
  letter-spacing: 0.1em; text-transform: uppercase;
  border-radius: 100px; padding: 5px 12px;
  border: 1px solid var(--border); color: var(--muted);
}
.tag.fire { background: var(--fire-light); border-color: #f4b5ab; color: var(--fire-dark); }
.day-label, .section-tag {
  font-size: 0.75rem; font-weight: 700; letter-spacing: 0.14em;
  text-transform: uppercase; color: var(--fire);
}
.btn-fire {
  display: inline-block; background: var(--fire); color: var(--white);
  padding: 14px 22px; border-radius: 6px; text-decoration: none;
  font-weight: 600; font-size: 0.95rem; text-align: center;
}
.btn-fire:hover { background: var(--fire-dark); }

/* index */
.series-head h1, .note-head h1 {
  font-size: clamp(1.9rem, 6vw, 2.8rem); font-weight: 800;
  line-height: 1.1; letter-spacing: -0.02em; margin: 10px 0 14px;
}
.section-sub { color: var(--muted); }
.day-list { list-style: none; margin: 32px 0; display: grid; gap: 14px; }
.day-card {
  display: flex; flex-direction: column; gap: 6px;
  background: var(--white); border: 1px solid var(--border); border-radius: 12px;
  padding: 18px; color: var(--ink); text-decoration: none;
}
.day-card:hover { border-color: var(--ink); }
.day-card-title { font-size: 1.15rem; font-weight: 700; line-height: 1.3; }
.day-card-summary { color: var(--muted); font-size: 0.95rem; line-height: 1.55; }
.day-card .tag { align-self: flex-start; margin-top: 4px; }

/* day page */
.note-head { padding-bottom: 22px; border-bottom: 1px solid var(--border); }
.note-meta { color: var(--muted); font-size: 0.9rem; margin-bottom: 12px; }
.note-body section { margin-top: 36px; }
.note-body h2 { font-size: 1.45rem; font-weight: 800; line-height: 1.2; letter-spacing: -0.01em; margin-bottom: 12px; }
.note-body h3 { font-size: 1.15rem; font-weight: 700; margin: 20px 0 8px; }
.note-body p, .note-body ul, .note-body ol, .note-body .table-wrap, .note-body pre, .note-body figure { margin-bottom: 16px; }
.note-body ul, .note-body ol { padding-left: 1.3em; }
.note-body li { margin-bottom: 6px; }
.note-body strong { font-weight: 700; }
.note-body :not(pre) > code {
  font-family: ui-monospace, SFMono-Regular, Menlo, monospace; font-size: 0.88em;
  background: var(--cream); padding: 1px 5px; border-radius: 4px;
}

/* tables scroll sideways instead of breaking the page on phones */
.table-wrap { overflow-x: auto; -webkit-overflow-scrolling: touch; border: 1px solid var(--border); border-radius: 10px; background: var(--white); }
table { border-collapse: collapse; width: 100%; font-size: 0.92rem; line-height: 1.5; }
th, td { text-align: left; padding: 10px 12px; border-bottom: 1px solid var(--border); vertical-align: top; }
th { background: var(--cream); font-weight: 700; white-space: nowrap; }
tr:last-child td { border-bottom: 0; }

/* code */
pre.code {
  background: var(--ink); color: var(--paper);
  border-radius: 10px; padding: 16px; overflow-x: auto;
  font-size: 0.84rem; line-height: 1.6;
}
pre.code code { font-family: ui-monospace, SFMono-Regular, Menlo, monospace; }
.hljs-keyword, .hljs-built_in { color: #ff8a73; }
.hljs-string { color: #9fd8b0; }
.hljs-number, .hljs-literal { color: #f3c95c; }
.hljs-comment { color: #8f8b82; font-style: italic; }
.hljs-title, .hljs-title.function_ { color: #f7f4ee; font-weight: 600; }
.hljs-params { color: #ddd9d0; }

/* diagrams: currentColor keeps them readable on any background */
.diagram { color: var(--ink); background: var(--white); border: 1px solid var(--border); border-radius: 12px; padding: 14px 10px 10px; }
.diagram svg { display: block; width: 100%; height: auto; }
.diagram figcaption { font-size: 0.85rem; color: var(--muted); text-align: center; margin-top: 6px; }
.d-box { fill: none; stroke: currentColor; stroke-width: 2; }
.d-hl { fill: var(--fire-light); stroke: var(--fire); stroke-width: 3; }
.d-line { stroke: currentColor; stroke-width: 2; }
.d-dash { fill: none; stroke: var(--fire); stroke-width: 2.5; stroke-dasharray: 7 6; }
.d-label { fill: currentColor; font-size: 20px; font-weight: 700; font-family: "Bricolage Grotesque", sans-serif; }
.d-sub { fill: var(--muted); font-size: 17px; font-family: "Bricolage Grotesque", sans-serif; }
.d-note { fill: var(--fire-dark); font-size: 19px; font-weight: 600; font-family: "Bricolage Grotesque", sans-serif; }

/* distinct blocks */
.note-body .block { border-radius: 14px; padding: 20px 16px 6px; border: 1px solid var(--border); }
.note-body .block h2 { font-size: 1.2rem; }
.block-terms { background: var(--gold-light); border-color: #eedb9a !important; }
.block-terms .table-wrap { border-color: #eedb9a; }
.block-terms td:first-child { font-weight: 700; min-width: 8.5em; }
.block-interview { background: var(--fire-light); border-color: #f4b5ab !important; }
.block-interview ol li::marker { color: var(--fire); font-weight: 800; }
.block-related { background: var(--green-light); border-color: #b5dcc6 !important; }
.block-sources { background: var(--cream); }
.block-sources a { word-break: break-word; }

/* prev / next */
.day-nav { display: grid; grid-template-columns: 1fr 1fr; gap: 12px; margin: 40px 0 24px; }
.day-nav a {
  display: flex; flex-direction: column; gap: 4px;
  border: 1px solid var(--border); border-radius: 10px; padding: 14px;
  color: var(--ink); text-decoration: none; font-weight: 600; font-size: 0.92rem; line-height: 1.35;
}
.day-nav a span { font-size: 0.72rem; color: var(--muted); font-weight: 500; letter-spacing: 0.06em; text-transform: uppercase; }
.day-nav-next { text-align: right; grid-column: 2; }

/* CTA */
.cta {
  background: var(--ink); color: var(--paper);
  border-radius: 14px; padding: 24px 20px; margin-top: 24px;
  display: flex; flex-direction: column; gap: 12px;
}
.cta-kicker { font-size: 0.72rem; font-weight: 700; letter-spacing: 0.14em; text-transform: uppercase; color: var(--fire); }
.cta-teaser { font-size: 1.15rem; font-weight: 700; line-height: 1.35; }
.cta-reel { color: rgba(247, 244, 238, 0.75); font-size: 0.9rem; }
.signup { margin-top: 8px; padding-top: 16px; border-top: 1px solid rgba(247, 244, 238, 0.15); }
.signup-label { display: block; font-weight: 700; margin-bottom: 8px; }
.signup-row { display: flex; gap: 8px; flex-wrap: wrap; }
.signup input {
  flex: 1 1 180px; min-width: 0; font: inherit; font-size: 16px; /* 16px stops iOS zoom on focus */
  padding: 12px 14px; border-radius: 6px; border: 1.5px solid rgba(247, 244, 238, 0.25);
  background: rgba(247, 244, 238, 0.08); color: var(--paper);
}
.signup input::placeholder { color: rgba(247, 244, 238, 0.45); }
.signup input:focus { outline: 2px solid var(--fire); outline-offset: 1px; }
.signup button {
  flex: 0 0 auto; font: inherit; font-weight: 600; font-size: 0.95rem; cursor: pointer;
  padding: 12px 18px; border: 0; border-radius: 6px; background: var(--paper); color: var(--ink);
}
.signup button:disabled, .signup input:disabled { opacity: 0.6; cursor: default; }
.signup-note { font-size: 0.82rem; color: rgba(247, 244, 238, 0.6); margin-top: 8px; }
.signup-note a { color: rgba(247, 244, 238, 0.8); }

@media (min-width: 760px) {
  .site-nav { padding: 16px 52px; }
  main { padding-top: 56px; }
  .note-body .block { padding: 24px 24px 8px; }
  footer { flex-direction: row; justify-content: space-between; padding: 36px 52px; }
}

/* WhatsApp share */
.share-wa {
  display: block; margin-top: 32px; padding: 13px 18px; text-align: center;
  border: 1.5px solid var(--green); border-radius: 6px; background: var(--green-light);
  color: var(--green); font-weight: 600; font-size: 0.95rem; text-decoration: none;
}
.share-wa:hover { background: var(--green); color: var(--white); }
