/* White Rabbit Papers */
:root {
  --paper: #F7F4EC;      /* page background */
  --sheet: #FFFDF8;      /* typed sheet */
  --band: #EFEADD;       /* contrast band */
  --ink: #1C1B18;        /* main text */
  --muted: #5A554B;      /* secondary text */
  --rule: #D9D3C4;       /* hairlines */
  --green: #2F6B4F;      /* matrix accent */
  --green-dark: #1E4A36;
  --red: #A8322A;        /* red pill */
  --blue: #2C5A8C;       /* blue pill */
  --type: "Special Elite", "Courier Prime", "Courier New", monospace;
  --mono: "Courier Prime", "Courier New", monospace;
}

*, *::before, *::after { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; }
body {
  margin: 0;
  background: var(--paper);
  color: var(--ink);
  font-family: var(--mono);
  font-size: 17px;
  line-height: 1.7;
}
a { color: var(--green); text-underline-offset: 3px; }
a:hover { color: var(--green-dark); }
img { max-width: 100%; height: auto; }
:focus-visible { outline: 2px solid var(--green); outline-offset: 3px; }

.wrap { max-width: 1040px; margin: 0 auto; padding-left: 24px; padding-right: 24px; }
.visually-hidden, .hidden {
  position: absolute !important; width: 1px; height: 1px; overflow: hidden;
  clip: rect(0 0 0 0); white-space: nowrap;
}
.skip { position: absolute; left: -999px; top: 8px; background: var(--ink); color: var(--paper); padding: 8px 14px; z-index: 10; }
.skip:focus { left: 8px; }

/* Header */
.site-header { border-bottom: 1px solid var(--rule); }
.header-inner {
  display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between;
  gap: 8px 24px; padding-top: 20px; padding-bottom: 20px;
}
.brand { display: flex; align-items: center; gap: 12px; color: var(--ink); text-decoration: none; }
.brand span { font-family: var(--type); font-size: 21px; letter-spacing: 0.06em; }
.brand:hover { color: var(--ink); }
.site-header nav { display: flex; flex-wrap: wrap; gap: 0 22px; font-size: 15px; letter-spacing: 0.04em; }
.site-header nav a { color: var(--ink); text-decoration: none; padding: 12px 0; }
.site-header nav a:hover, .site-header nav a[aria-current="page"], .site-header nav .nav-start { color: var(--green); }
.site-header nav a[aria-current="page"] { text-decoration: underline; }

/* Shared bits */
.meta { margin: 0 0 22px; font-size: 14px; color: var(--green); letter-spacing: 0.07em; }
.lede { max-width: 600px; color: var(--muted); font-size: 16px; line-height: 1.75; margin: 0; }
.section-title, .page-title { font-family: var(--type); font-weight: 400; margin: 0; }
.section-title { font-size: 28px; }
.page-title { font-size: clamp(34px, 5vw, 52px); line-height: 1.15; margin-bottom: 20px; }
.section-sub { margin: 4px 0 28px; font-size: 14px; color: var(--muted); }

/* Hero */
.hero { padding-top: clamp(64px, 12vw, 120px); padding-bottom: clamp(56px, 9vw, 96px); }
.hero-title { font-family: var(--type); font-weight: 400; font-size: clamp(46px, 8vw, 88px); line-height: 1.03; margin: 0; }
.tagline { margin: 32px 0 36px; font-size: clamp(19px, 2.4vw, 24px); line-height: 1.5; min-height: 1.5em; max-width: 760px; }
.cursor { color: var(--green); animation: blink 1s step-end infinite; margin-left: 2px; }
@keyframes blink { 50% { opacity: 0; } }
@media (prefers-reduced-motion: reduce) { .cursor { animation: none; } }

/* Contents and index lists */
.contents { padding-bottom: 88px; }
.contents-list, .index-list { list-style: none; margin: 0; padding: 0; border-top: 1px solid var(--ink); }
.contents-list li, .index-list li { border-bottom: 1px solid var(--rule); }
.contents-list a, .index-list a {
  display: flex; flex-wrap: wrap; align-items: baseline; gap: 8px 28px;
  padding: 26px 0; color: var(--ink); text-decoration: none;
}
.contents-list a:hover .index-title, .index-list a:hover .index-title { color: var(--green); }
.index-num { width: 96px; font-size: 14px; color: var(--green); }
.index-body { flex: 1 1 280px; display: flex; flex-direction: column; gap: 4px; }
.index-title { font-family: var(--type); font-size: 25px; line-height: 1.25; }
.index-summary { font-size: 15px; color: var(--muted); line-height: 1.6; }
.index-date { font-size: 14px; color: var(--muted); }
.section-page { padding-top: clamp(56px, 9vw, 96px); padding-bottom: 72px; }
.section-page .lede { margin-bottom: 40px; }
.empty { color: var(--muted); padding: 28px 0; border-top: 1px solid var(--ink); margin: 0; }

/* The choice */
.choice { background: var(--band); border-top: 1px solid var(--rule); border-bottom: 1px solid var(--rule); }
.choice-inner { padding-top: 84px; padding-bottom: 84px; }
.choice h2 { font-family: var(--type); font-weight: 400; font-size: clamp(27px, 4vw, 40px); line-height: 1.22; max-width: 720px; margin: 0 0 20px; }
.choice p { max-width: 600px; color: var(--muted); margin: 0; }
.pills { display: flex; flex-wrap: wrap; gap: 14px; margin-top: 30px; }
.pill {
  display: inline-flex; align-items: center; gap: 10px; min-height: 48px; padding: 0 24px;
  border-radius: 999px; font-size: 15px; text-decoration: none; font-family: var(--mono);
}
.pill span { width: 10px; height: 10px; border-radius: 999px; }
.pill-blue { border: 1.5px solid var(--blue); color: var(--blue); }
.pill-blue span { background: var(--blue); }
.pill-blue:hover { background: var(--blue); color: #fff; }
.pill-blue:hover span { background: #fff; }
.pill-red { background: var(--red); color: #fff; border: 1.5px solid var(--red); }
.pill-red span { background: #fff; }
.pill-red:hover { background: #8C2922; color: #fff; }
.blue-note { display: none; margin-top: 18px !important; font-style: italic; }
.blue-note:target { display: block; }

/* Reading pages */
.reading { max-width: 760px; margin: 0 auto; padding: clamp(56px, 9vw, 88px) 24px 40px; }
.entry-title { display: flex; flex-direction: column; gap: 10px; font-family: var(--type); font-weight: 400; margin: 0; }
.entry-title .eyebrow { font-size: 18px; letter-spacing: 0.14em; color: var(--muted); }
.entry-title span:last-child { font-size: clamp(32px, 5vw, 50px); line-height: 1.15; }
.sheet {
  margin-top: 48px; background: var(--sheet); border: 1px solid #E4DECF;
  box-shadow: 0 1px 0 #E4DECF, 0 16px 34px -24px rgba(60, 50, 30, 0.4);
  padding: clamp(28px, 6vw, 72px); font-size: 18px; line-height: 1.85;
}
.sheet p, .prose p { margin: 0 0 1.3em; }
.sheet p:last-child { margin-bottom: 0; }
.sheet h2, .sheet h3, .prose h2 { font-family: var(--type); font-weight: 400; font-size: 24px; line-height: 1.3; margin: 1.8em 0 0.6em; }
.sheet blockquote { margin: 1.5em 0; padding-left: 20px; border-left: 2px solid var(--rule); color: var(--muted); }
.sheet ul, .sheet ol, .prose ul { padding-left: 1.3em; }
.prose { margin-top: 40px; font-size: 17px; line-height: 1.8; }
.start-cta { margin-top: 40px; }

/* Typed original */
.original { margin-top: 36px; display: flex; flex-wrap: wrap; align-items: center; gap: 22px; padding: 22px; border: 1px dashed #B9B19E; }
.original-thumb { width: 96px; height: 128px; flex: 0 0 auto; background: var(--sheet); border: 1px solid var(--rule); display: flex; align-items: center; justify-content: center; overflow: hidden; color: #B9B19E; }
.original-thumb img { width: 100%; height: 100%; object-fit: cover; }
.original > div { flex: 1 1 260px; }
.original h2 { font-family: var(--type); font-weight: 400; font-size: 20px; margin: 0 0 6px; }
.original p { margin: 0 0 6px; font-size: 15px; color: var(--muted); line-height: 1.6; }

.entry-nav { margin-top: 56px; padding-top: 22px; border-top: 1px solid var(--ink); display: flex; flex-wrap: wrap; justify-content: space-between; gap: 12px 24px; font-size: 15px; }
.entry-nav a { color: var(--ink); text-decoration: none; padding: 10px 0; }
.entry-nav a:hover { color: var(--green); }

/* Signup */
.signup { border-top: 1px solid var(--rule); }
.signup-inner { max-width: 760px; margin: 0 auto; padding: 72px 24px; text-align: center; }
.signup h2 { font-family: var(--type); font-weight: 400; font-size: clamp(24px, 3.5vw, 32px); margin: 0 0 8px; }
.signup p { margin: 0; color: var(--muted); font-size: 15px; }
.signup-form { display: flex; flex-wrap: wrap; justify-content: center; gap: 10px; margin: 26px auto 12px; max-width: 520px; }
.signup-form input[type="email"] {
  flex: 1 1 240px; min-height: 48px; padding: 0 16px; font: inherit; font-size: 16px;
  background: var(--sheet); color: var(--ink); border: 1px solid #B9B19E; border-radius: 2px;
}
.signup-form button {
  min-height: 48px; padding: 0 26px; font: inherit; font-size: 15px; letter-spacing: 0.04em;
  background: var(--ink); color: var(--paper); border: 0; border-radius: 2px; cursor: pointer;
}
.signup-form button:hover { background: var(--green-dark); }
.signup .fine { font-size: 13px; }

/* 404 / thanks */
.notfound { padding-top: clamp(64px, 12vw, 120px); padding-bottom: 96px; }
.notfound .rabbit { color: var(--ink); margin-bottom: 20px; }
.notfound .lede { margin-bottom: 32px; }

/* Footer */
.site-footer { border-top: 1px solid var(--rule); }
.footer-inner { display: flex; flex-wrap: wrap; justify-content: space-between; gap: 10px 24px; padding-top: 34px; padding-bottom: 48px; font-size: 13px; color: var(--muted); }
.footer-inner a { color: var(--muted); }

@media print {
  .site-header nav, .signup, .entry-nav, .choice, .skip { display: none; }
  .sheet { box-shadow: none; border: 0; padding: 0; }
  body { background: #fff; }
}
