:root {
  --ink: #18231f;
  --muted: #5e6963;
  --paper: #f4efe5;
  --paper-deep: #e9e1d2;
  --card: #fffdf7;
  --green: #153f35;
  --green-light: #d9e6dc;
  --orange: #e65d32;
  --yellow: #f3ca52;
  --line: rgba(24, 35, 31, 0.2);
  --shadow: 0 18px 50px rgba(44, 37, 26, 0.11);
  --serif: "Newsreader", Georgia, serif;
  --sans: "DM Sans", Arial, sans-serif;
  --mono: "DM Mono", monospace;
}

* { box-sizing: border-box; }
html { scroll-behavior: smooth; }
body {
  margin: 0;
  color: var(--ink);
  background: var(--paper);
  font-family: var(--sans);
  line-height: 1.55;
}
a { color: inherit; }
button, input { font: inherit; }
.paper-noise {
  position: fixed;
  inset: 0;
  pointer-events: none;
  opacity: 0.17;
  z-index: 20;
  background-image: url("data:image/svg+xml,%3Csvg viewBox='0 0 180 180' xmlns='http://www.w3.org/2000/svg'%3E%3Cfilter id='n'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='.9' numOctaves='4' stitchTiles='stitch'/%3E%3C/filter%3E%3Crect width='100%25' height='100%25' filter='url(%23n)' opacity='.13'/%3E%3C/svg%3E");
}
.page-wrap { width: min(1180px, calc(100% - 40px)); margin: 0 auto; }
.skip-link { position: fixed; left: 16px; top: -80px; background: var(--ink); color: white; padding: 10px 14px; z-index: 100; }
.skip-link:focus { top: 16px; }
.sr-only { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0,0,0,0); }

.site-header {
  min-height: 118px;
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 24px;
  border-bottom: 1px solid var(--line);
}
.brand { min-width: 0; display: inline-flex; gap: 14px; align-items: center; text-decoration: none; }
.brand-logo {
  width: 78px;
  height: 78px;
  flex: 0 0 auto;
  display: block;
  object-fit: cover;
  border-radius: 50%;
}
.brand-copy { min-width: 0; display: flex; flex-direction: column; line-height: 1.1; }
.brand strong { font: 600 19px var(--serif); }
.brand small { margin-top: 5px; text-transform: uppercase; letter-spacing: .15em; font: 500 8px var(--mono); }
.header-nav { flex: 0 0 auto; display: flex; gap: 22px; align-items: center; }
.header-nav a { font: 500 12px var(--mono); text-transform: uppercase; letter-spacing: .08em; text-underline-offset: 5px; }

.hero { min-height: 560px; display: grid; grid-template-columns: 1.45fr .75fr; gap: 90px; align-items: center; padding: 80px 5% 78px; }
.eyebrow { margin: 0 0 16px; color: var(--orange); font: 500 11px var(--mono); letter-spacing: .14em; text-transform: uppercase; }
.hero h1 { margin: 0; font: 600 clamp(55px, 7.2vw, 98px)/.88 var(--serif); letter-spacing: -.04em; }
.hero h1 em { color: var(--orange); font-weight: 500; }
.hero-intro { max-width: 600px; margin: 32px 0 0; font-size: clamp(18px, 2vw, 23px); line-height: 1.45; }
.hero-card {
  position: relative; padding: 34px 32px; background: var(--yellow); transform: rotate(2deg);
  box-shadow: var(--shadow); border: 1px solid rgba(24,35,31,.25);
}
.hero-card::before { content: ""; position: absolute; width: 62px; height: 18px; top: -9px; left: 50%; transform: translateX(-50%) rotate(-2deg); background: rgba(255,255,255,.55); }
.card-label { font: 500 10px var(--mono); text-transform: uppercase; letter-spacing: .14em; }
.hero-card p { margin: 20px 0; font: 600 28px/1.18 var(--serif); }
.hero-card small { font-size: 13px; }
.scribble { position: absolute; right: 18px; top: 16px; width: 34px; height: 34px; border: 2px solid var(--ink); border-radius: 50%; border-left-color: transparent; transform: rotate(25deg); }

.browse-panel { margin: 0 -20px; padding: 62px 7%; background: var(--green); color: #f9f5ec; }
.section-heading { display: flex; justify-content: space-between; align-items: end; gap: 30px; margin-bottom: 30px; }
.section-heading h2 { margin: 0; font: 600 clamp(35px, 5vw, 58px)/1 var(--serif); letter-spacing: -.025em; }
.section-heading > p { color: rgba(255,255,255,.66); font: 400 11px var(--mono); text-transform: uppercase; letter-spacing: .08em; }
.section-heading > a { font: 500 12px var(--mono); text-underline-offset: 5px; }

.search-shell { position: relative; z-index: 10; }
.search-shell > svg { position: absolute; left: 22px; top: 50%; transform: translateY(-50%); width: 22px; fill: none; stroke: currentColor; stroke-width: 1.7; z-index: 2; pointer-events: none; }
.search-shell input { width: 100%; height: 72px; padding: 0 64px 0 62px; border: 1px solid rgba(255,255,255,.3); border-radius: 0; outline: none; color: var(--ink); background: var(--card); font-size: 16px; }
.search-shell input:focus { box-shadow: 0 0 0 3px var(--yellow); }
.search-shell kbd { position: absolute; right: 22px; top: 50%; transform: translateY(-50%); min-width: 28px; text-align: center; padding: 3px 7px; color: var(--muted); border: 1px solid var(--line); background: var(--paper); font: 11px var(--mono); }
.search-results { position: absolute; left: 0; right: 0; top: calc(100% + 5px); color: var(--ink); background: var(--card); border: 1px solid var(--ink); box-shadow: var(--shadow); max-height: 480px; overflow-y: auto; }
.search-results a { display: grid; grid-template-columns: 38px 1fr; gap: 14px; align-items: start; padding: 16px 20px; text-decoration: none; border-bottom: 1px solid var(--line); }
.search-results a:hover, .search-results a:focus { background: #f5e8bd; outline: none; }
.search-results strong, .search-results small { display: block; }
.search-results small { margin-top: 3px; color: var(--muted); font-size: 12px; }
.result-letter { display: grid; place-items: center; width: 31px; height: 31px; border-radius: 50%; color: white; background: var(--orange); font: 500 12px var(--mono); }
.no-results { display: flex; flex-direction: column; padding: 22px; }
.no-results span { color: var(--muted); font-size: 13px; }

.alphabet { display: grid; grid-template-columns: repeat(26, 1fr); margin-top: 32px; border-top: 1px solid rgba(255,255,255,.22); border-bottom: 1px solid rgba(255,255,255,.22); }
.alphabet a { display: grid; place-items: center; min-height: 45px; text-decoration: none; border-right: 1px solid rgba(255,255,255,.15); font: 500 12px var(--mono); transition: .18s ease; }
.alphabet a:first-child { border-left: 1px solid rgba(255,255,255,.15); }
.alphabet a:hover, .alphabet a:focus, .alphabet a.is-active { color: var(--ink); background: var(--yellow); outline: none; transform: translateY(-3px); }
.alphabet a.is-empty { opacity: .35; }

.start-section { padding: 110px 5%; }
.start-section .section-heading { border-bottom: 1px solid var(--line); padding-bottom: 24px; }
.starter-grid { display: grid; grid-template-columns: repeat(3, 1fr); border-left: 1px solid var(--line); }
.starter-card { position: relative; min-height: 260px; padding: 28px; text-decoration: none; border-right: 1px solid var(--line); border-bottom: 1px solid var(--line); transition: .2s ease; }
.starter-card:nth-child(-n+3) { border-top: 1px solid var(--line); }
.starter-card:hover { background: var(--card); transform: translateY(-4px); box-shadow: 0 10px 0 var(--orange); }
.starter-index { color: var(--orange); font: 500 10px var(--mono); }
.starter-card h3 { margin: 35px 0 14px; font: 600 25px/1.08 var(--serif); }
.starter-card p { margin: 0; color: var(--muted); font-size: 14px; }
.read-more { position: absolute; bottom: 24px; left: 28px; right: 28px; display: flex; justify-content: space-between; font: 500 10px var(--mono); text-transform: uppercase; letter-spacing: .05em; }
.principle-strip { display: grid; grid-template-columns: 180px 1fr; gap: 30px; align-items: center; margin: 0 5% 100px; padding: 28px 34px; border: 1px solid var(--ink); box-shadow: 8px 8px 0 var(--yellow); }
.principle-strip > span { font: 500 10px var(--mono); text-transform: uppercase; letter-spacing: .12em; }
.principle-strip p { margin: 0; font-size: 17px; }

.letter-hero { min-height: 280px; display: flex; justify-content: space-between; align-items: end; padding: 60px 5% 42px; border-bottom: 1px solid var(--line); }
.letter-hero h1 { margin: 0; font: 600 clamp(80px, 14vw, 160px)/.7 var(--serif); letter-spacing: -.06em; }
.letter-hero h1 span { font: 500 12px var(--mono); letter-spacing: .1em; text-transform: uppercase; vertical-align: top; }
.letter-hero > p { width: 280px; margin: 0; color: var(--muted); }
.letter-tools { margin: 0 -20px; padding: 35px 7%; background: var(--green); color: white; }
.letter-tools .search-shell input { height: 58px; }
.letter-tools .alphabet { margin-top: 24px; }

.terms-list { padding: 35px 5% 75px; }
.term-card { position: relative; display: grid; grid-template-columns: 70px 1fr; scroll-margin-top: 20px; border-bottom: 1px solid var(--line); }
.term-card.is-linked { background: linear-gradient(90deg, rgba(243,202,82,.35), transparent 65%); }
.term-number { padding-top: 52px; color: var(--orange); font: 500 10px var(--mono); }
.term-content { position: relative; padding: 45px 12% 46px 0; }
.term-heading { display: flex; align-items: center; gap: 15px; flex-wrap: wrap; }
.term-heading h2 { margin: 0; font: 600 clamp(31px, 4.2vw, 50px)/1.03 var(--serif); letter-spacing: -.025em; }
.level { padding: 4px 8px; border: 1px solid currentColor; font: 500 8px var(--mono); text-transform: uppercase; letter-spacing: .1em; }
.level-start-here { color: var(--green); background: var(--green-light); }
.level-slang, .level-debated { color: #81331c; background: #f5d8cc; }
.level-newer-term { color: #5f4b0d; background: #f7e7a7; }
.plain-definition { max-width: 830px; margin: 22px 0 18px; font-size: clamp(19px, 2.2vw, 24px); font-weight: 600; line-height: 1.42; }
.term-content > p:not(.plain-definition) { max-width: 770px; color: var(--muted); }
.example { max-width: 770px; display: grid; grid-template-columns: 95px 1fr; gap: 16px; margin-top: 24px; padding: 17px 19px; background: var(--card); border-left: 3px solid var(--yellow); }
.example span, .related > span { padding-top: 3px; font: 500 9px var(--mono); text-transform: uppercase; letter-spacing: .1em; }
.example p { margin: 0; }
.related { display: flex; flex-wrap: wrap; gap: 10px; align-items: center; margin-top: 25px; }
.related > span { margin-right: 8px; }
.related a { padding: 4px 9px; border: 1px solid var(--line); text-decoration: none; font-size: 11px; }
.related a:hover { color: white; background: var(--green); }
.term-anchor { position: absolute; right: 0; top: 52px; color: var(--line); text-decoration: none; font: 22px var(--mono); }
.term-card:hover .term-anchor { color: var(--orange); }
.empty-letter { padding: 100px 0; text-align: center; }
.empty-letter strong { display: block; color: var(--paper-deep); font: 600 180px/.8 var(--serif); }
.page-turn { display: grid; grid-template-columns: 1fr 1fr; margin: 0 5% 90px; border-top: 1px solid var(--line); }
.page-turn a { display: flex; flex-direction: column; padding: 25px 0; text-decoration: none; font: 600 25px var(--serif); }
.page-turn a:last-child { align-items: end; }
.page-turn a span { font: 500 9px var(--mono); text-transform: uppercase; letter-spacing: .1em; color: var(--muted); }

.about-hero { padding: 100px 10%; max-width: 950px; }
.about-hero h1 { margin: 0; font: 600 clamp(46px, 7vw, 80px)/.98 var(--serif); letter-spacing: -.035em; }
.about-hero > p:last-child { max-width: 650px; margin-top: 35px; font-size: 20px; }
.about-grid { display: grid; grid-template-columns: repeat(3, 1fr); margin: 0 5% 90px; border: 1px solid var(--line); }
.about-grid article { min-height: 300px; padding: 32px; border-right: 1px solid var(--line); }
.about-grid article:last-child { border: 0; }
.about-grid span { color: var(--orange); font: 500 10px var(--mono); }
.about-grid h2 { margin-top: 55px; font: 600 31px var(--serif); }
.about-grid p { color: var(--muted); }
.about-note { margin: 0 5% 100px; padding: 50px; color: white; background: var(--green); }
.about-note h2 { margin: 0; font: 600 42px var(--serif); }
.about-note p { max-width: 720px; }
.button { display: inline-block; margin-top: 20px; padding: 12px 18px; color: var(--ink); background: var(--yellow); text-decoration: none; font: 500 11px var(--mono); text-transform: uppercase; }

.site-footer { display: grid; grid-template-columns: 1fr auto; gap: 50px; padding: 48px 5%; border-top: 1px solid var(--line); }
.site-footer strong { font: 600 22px var(--serif); }
.site-footer p { margin: 4px 0 0; color: var(--muted); font-size: 13px; }
.footer-links { display: flex; gap: 25px; align-items: start; font: 500 10px var(--mono); text-transform: uppercase; }
.fine-print { grid-column: 1 / -1; padding-top: 25px; border-top: 1px solid var(--line); }

@media (max-width: 900px) {
  .hero { grid-template-columns: 1fr; gap: 55px; padding-top: 65px; }
  .hero-card { max-width: 430px; }
  .alphabet { grid-template-columns: repeat(13, 1fr); }
  .starter-grid, .about-grid { grid-template-columns: 1fr 1fr; }
  .starter-card:nth-child(-n+3) { border-top: 0; }
  .starter-card:nth-child(-n+2) { border-top: 1px solid var(--line); }
  .about-grid article { border-bottom: 1px solid var(--line); }
  .letter-hero { align-items: center; }
}

@media (max-width: 620px) {
  .page-wrap { width: calc(100% - 24px); }
  .site-header { min-height: 92px; gap: 10px; }
  .header-nav { max-width: 68px; flex-direction: column; gap: 7px; align-items: end; text-align: right; }
  .header-nav a { font-size: 8px; line-height: 1.25; }
  .brand { gap: 8px; }
  .brand-logo { width: 56px; height: 56px; }
  .brand strong { font-size: 16px; }
  .brand small { font-size: 7px; letter-spacing: .09em; }
  .hero { min-height: auto; padding: 60px 4% 70px; }
  .hero h1 { font-size: 52px; }
  .hero-intro { font-size: 17px; }
  .browse-panel, .letter-tools { margin: 0 -12px; padding-left: 20px; padding-right: 20px; }
  .section-heading { display: block; }
  .section-heading > p { margin-top: 12px; }
  .search-shell input { height: 64px; padding-left: 52px; font-size: 13px; }
  .search-shell > svg { left: 17px; }
  .alphabet { grid-template-columns: repeat(7, 1fr); }
  .starter-grid, .about-grid { grid-template-columns: 1fr; }
  .starter-card, .starter-card:nth-child(-n+2) { border-top: 0; }
  .starter-card:first-child { border-top: 1px solid var(--line); }
  .principle-strip { grid-template-columns: 1fr; }
  .letter-hero { display: block; min-height: 240px; padding: 45px 4% 35px; }
  .letter-hero > p { width: auto; margin-top: 35px; }
  .letter-hero h1 { font-size: 105px; }
  .terms-list { padding-left: 2%; padding-right: 2%; }
  .term-card { grid-template-columns: 34px 1fr; }
  .term-content { padding-right: 0; }
  .term-number { padding-top: 48px; }
  .term-anchor { display: none; }
  .example { grid-template-columns: 1fr; gap: 4px; }
  .site-footer { grid-template-columns: 1fr; }
  .footer-links { flex-wrap: wrap; }
  .fine-print { grid-column: auto; }
  .about-grid { margin-left: 2%; margin-right: 2%; }
  .about-grid article { border-right: 0; }
  .about-note { padding: 32px 25px; }
}

@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  *, *::before, *::after { transition: none !important; }
}
