/* The Mad Hatter Awards - almanac stylesheet */

:root {
  --broadsheet: #f4efe4;
  --broadsheet-deep: #ebe3d1;
  --lampblack: #1d1a16;
  --oxblood: #7a1f2b;
  --brass-rule: #b08d3c;
  --brass-light: #d4b36a;
  --sepia: #574e43;
  --tan-thread: #cdbf9e;

  --face-caslon: "Libre Caslon Text", Georgia, "Times New Roman", serif;
  --face-franklin: "Libre Caslon Text", Georgia, "Times New Roman", serif;

  /* award posts and category listings read these */
  --gold: #7a1f2b;
  --steel: #574e43;
  --navy: #1d1a16;
  --violet: #7a1f2b;
  --line: #cdbf9e;
  --panel: #ebe3d1;
  --bg: #f4efe4;
  --white: #fbf8f1;
  --white-soft: rgba(244, 239, 228, 0.88);
}

*, *::before, *::after { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; }
body {
  margin: 0;
  background: var(--broadsheet);
  color: var(--lampblack);
  font-family: var(--face-franklin);
  font-size: 17px;
  line-height: 1.7;
  font-feature-settings: "kern", "liga", "onum";
  overflow-wrap: break-word;
}
img { max-width: 100%; height: auto; display: block; }
h1, h2, h3, h4 {
  font-family: var(--face-caslon);
  font-weight: 400;
  line-height: 1.12;
  margin: 0 0 0.5em;
  letter-spacing: 0.005em;
  text-wrap: balance;
}
p { margin: 0 0 1em; }
a { color: var(--oxblood); text-decoration-thickness: 1px; text-underline-offset: 0.18em; }
a:hover { color: var(--lampblack); }
:focus-visible { outline: 2px solid var(--oxblood); outline-offset: 3px; }
abbr { text-decoration: none; }
.unseen {
  position: absolute !important; width: 1px; height: 1px; padding: 0; margin: -1px;
  overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; border: 0;
}
.skip-to-text { position: absolute; left: 12px; top: -60px; background: var(--lampblack); color: var(--broadsheet); padding: 8px 14px; z-index: 500; }
.skip-to-text:focus { top: 12px; color: var(--broadsheet); }

.masthead { background: var(--broadsheet); border-bottom: 1px solid var(--lampblack); }
.masthead-plate {
  max-width: 1180px; margin: 0 auto; padding: 18px 32px 16px; text-align: center;
}
.masthead-dateline {
  display: flex; justify-content: space-between; gap: 12px; flex-wrap: wrap;
  margin: 0 0 14px; padding: 6px 0;
  border-top: 1px solid var(--lampblack); border-bottom: 1px solid var(--lampblack);
  font-size: 13px; font-variant-caps: all-small-caps; letter-spacing: 0.08em; color: var(--sepia);
}
.masthead-name {
  display: inline-block; font-family: var(--face-caslon); font-size: clamp(34px, 6.4vw, 76px);
  line-height: 1; color: var(--lampblack); text-decoration: none; letter-spacing: 0.01em;
}
.masthead-name:hover { color: var(--oxblood); }
.masthead-motto { margin: 10px 0 0; font-style: italic; color: var(--sepia); font-size: 15px; }
.masthead-nav {
  position: relative;
  max-width: 1116px; margin: 0 auto; padding: 0;
  display: flex; justify-content: center; align-items: center; flex-wrap: wrap; gap: 4px 30px;
  border-top: 4px double var(--brass-rule);
  font-size: 15px; font-weight: 500;
}
.masthead-nav > a, .masthead-nav .nav-cats-toggle {
  display: inline-block; padding: 12px 0; color: var(--lampblack); text-decoration: none;
}
.masthead-nav > a:hover, .masthead-nav .nav-cats-toggle:hover { color: var(--oxblood); text-decoration: underline; }
.masthead-nav > a[aria-current="page"] { color: var(--oxblood); text-decoration: underline; text-decoration-color: var(--brass-rule); text-decoration-thickness: 2px; }
.masthead-nav a.nav-cta {
  padding: 7px 16px; margin: 6px 0; border: 1px solid var(--oxblood); color: var(--oxblood); font-weight: 600;
}
.masthead-nav a.nav-cta:hover { background: var(--oxblood); color: var(--broadsheet); text-decoration: none; }

.container { max-width: 1180px; margin: 0 auto; padding: 0 32px; }
.sheet { max-width: 1180px; margin: 0 auto; padding: 0 32px; }
.sheet-narrow { max-width: 760px; margin: 0 auto; padding: 0 32px; }

.leaf { padding: 64px 0; border-bottom: 1px solid var(--lampblack); }
.leaf:last-of-type { border-bottom: 0; }
.leaf-tinted { background: var(--broadsheet-deep); }
.leaf h2 { font-size: clamp(30px, 3.6vw, 44px); }
.leaf-head { text-align: center; max-width: 720px; margin: 0 auto 36px; }
.leaf-head h2 { margin-bottom: 0.35em; }
.leaf-head p { color: var(--sepia); font-size: 18px; margin: 0; }
.leaf-head::after {
  content: ""; display: block; width: 120px; margin: 22px auto 0; border-top: 4px double var(--brass-rule);
}

.standfirst { font-size: clamp(18px, 2vw, 21px); line-height: 1.55; color: var(--sepia); font-style: italic; }

.page-title { text-align: center; padding: 52px 0 40px; border-bottom: 1px solid var(--lampblack); }
.page-title h1 { font-size: clamp(40px, 6vw, 72px); margin-bottom: 0.25em; }
.page-title .standfirst { max-width: 680px; margin: 0 auto; }

/* Front page lead */
.front { padding: 44px 0 56px; border-bottom: 1px solid var(--lampblack); }
.front-headline { text-align: center; max-width: 980px; margin: 0 auto 10px; }
.front-headline h1 { font-size: clamp(40px, 6.4vw, 82px); line-height: 1.02; margin-bottom: 0.3em; }
.front-headline .standfirst { max-width: 720px; margin: 0 auto 28px; }
.front-grid {
  display: grid; grid-template-columns: 220px minmax(0, 1fr) 280px; gap: 0;
  border-top: 1px solid var(--lampblack); padding-top: 28px;
}
.front-grid > * { padding: 0 26px; }
.front-grid > * + * { border-left: 1px solid var(--tan-thread); }
.front-grid > :first-child { padding-left: 0; }
.front-grid > :last-child { padding-right: 0; }
.front-story { column-count: 2; column-gap: 34px; column-rule: 1px solid var(--tan-thread); }
.front-story p { hyphens: auto; }
.front-story > p:first-child::first-letter {
  float: left; font-family: var(--face-caslon); font-size: 4.3em; line-height: 0.82;
  padding: 6px 8px 0 0; color: var(--oxblood);
}
.inside-box h2 { font-size: 22px; padding-bottom: 8px; border-bottom: 1px solid var(--lampblack); }
.inside-box ul { list-style: none; margin: 0; padding: 0; }
.inside-box li { border-bottom: 1px solid var(--tan-thread); padding: 10px 0; font-size: 15.5px; line-height: 1.45; }
.inside-box li a { font-weight: 600; color: var(--lampblack); text-decoration: none; display: block; }
.inside-box li a:hover { color: var(--oxblood); text-decoration: underline; }
.inside-box li span { color: var(--sepia); font-size: 14px; }

.plate { margin: 0; }
.plate img { width: 100%; border: 1px solid var(--lampblack); outline: 1px solid var(--brass-rule); outline-offset: 4px; background: var(--lampblack); }
.plate figcaption { margin-top: 14px; font-size: 14px; line-height: 1.5; color: var(--sepia); font-style: italic; }
.plate figcaption b { font-style: normal; font-variant-caps: all-small-caps; letter-spacing: 0.06em; color: var(--lampblack); }

/* Tally table (worked examples) */
.tally-wrap { overflow-x: auto; margin: 0 0 18px; }
.tally {
  width: 100%; border-collapse: collapse; font-variant-numeric: lining-nums tabular-nums;
  border-top: 2px solid var(--lampblack); border-bottom: 2px solid var(--lampblack); font-size: 16px;
}
.tally caption { caption-side: bottom; text-align: left; padding-top: 10px; font-size: 14px; color: var(--sepia); font-style: italic; }
.tally th, .tally td { padding: 10px 8px; text-align: center; border-bottom: 1px solid var(--tan-thread); }
.tally thead th { font-weight: 600; font-size: 14px; border-bottom: 1px solid var(--lampblack); vertical-align: bottom; line-height: 1.3; }
.tally tbody th { text-align: left; font-weight: 500; white-space: nowrap; }
.tally tr.tally-mean th, .tally tr.tally-mean td { font-weight: 700; border-bottom: 0; border-top: 1px solid var(--lampblack); }
.tally .set-aside { color: #776b5d; background: rgba(29, 26, 22, 0.05); }
.tally td.set-aside { text-decoration: line-through; text-decoration-color: var(--oxblood); text-decoration-thickness: 2px; }
.tally .set-aside-note { display: block; font-weight: 500; font-size: 12px; font-style: italic; color: var(--oxblood); }
.verdict {
  display: flex; flex-wrap: wrap; align-items: baseline; justify-content: space-between; gap: 6px 24px;
  padding: 16px 0; border-bottom: 1px solid var(--lampblack);
}
.verdict-sum { font-variant-numeric: tabular-nums; color: var(--sepia); }
.verdict-score { font-family: var(--face-caslon); font-size: 34px; line-height: 1; }
.verdict-score em { font-style: normal; color: var(--oxblood); }

.score-split, .story-split { display: grid; grid-template-columns: minmax(0, 1.55fr) minmax(0, 1fr); gap: 48px; align-items: start; }
.score-split > *, .story-split > *, .correspondence > * { min-width: 0; }
.score-notes p { font-size: 16.5px; }

.footnotes { margin: 28px 0 0; padding: 14px 0 0 20px; border-top: 1px solid var(--tan-thread); font-size: 14px; color: var(--sepia); line-height: 1.55; }
.footnotes li { margin-bottom: 6px; }
sup a { text-decoration: none; font-weight: 600; padding: 0 1px; }

/* Categories set as a ruled listing */
.departments { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); column-gap: 56px; margin: 0; }
.department { padding: 22px 0; border-top: 1px solid var(--lampblack); }
.department dt, .department h3 { font-family: var(--face-caslon); font-size: 27px; line-height: 1.15; margin: 0 0 8px; }
.department dd { margin: 0; }
.department p { margin-bottom: 0.6em; }
.department .looks-for { font-size: 15px; color: var(--sepia); }
.department .looks-for b { color: var(--lampblack); font-weight: 600; }

/* Register (filled from the category file when it loads) */
.register { list-style: none; margin: 0 auto; padding: 0; max-width: 640px; }
.register li { display: flex; align-items: baseline; gap: 10px; padding: 9px 0; border-bottom: 1px solid var(--tan-thread); }
.register li::after { content: none; }
.register a { font-weight: 600; color: var(--lampblack); text-decoration: none; }
.register a:hover { color: var(--oxblood); text-decoration: underline; }
.register .leader { flex: 1; border-bottom: 1px dotted var(--sepia); transform: translateY(-5px); }
.register .count { font-variant-numeric: tabular-nums; color: var(--sepia); font-size: 15px; white-space: nowrap; }
.register-empty { text-align: center; color: var(--sepia); font-style: italic; }

/* Dark leaf */
.inkleaf { background: var(--lampblack); color: var(--white-soft); padding: 72px 0; text-align: center; }
.inkleaf h2 { color: var(--broadsheet); font-size: clamp(32px, 4vw, 48px); }
.inkleaf p { max-width: 600px; margin: 0 auto 26px; font-size: 18px; }
.inkleaf a:not(.stamp):not(.btn) { color: var(--brass-light); }
.inkleaf :focus-visible { outline-color: var(--brass-light); }

/* Buttons */
.stamp, .btn {
  display: inline-block; padding: 13px 26px; border: 1px solid var(--lampblack);
  background: var(--lampblack); color: var(--broadsheet); text-decoration: none;
  font-family: var(--face-franklin); font-size: 15px; font-weight: 600; letter-spacing: 0.04em;
  cursor: pointer; border-radius: 0;
}
.stamp:hover, .btn:hover { background: var(--oxblood); border-color: var(--oxblood); color: var(--broadsheet); }
.stamp-quiet { background: transparent; color: var(--lampblack); }
.inkleaf .stamp, .section-dark .btn, .section-black .btn, .inkleaf .btn {
  background: var(--broadsheet); color: var(--lampblack); border-color: var(--broadsheet);
}
.inkleaf .stamp:hover, .section-dark .btn:hover, .section-black .btn:hover, .inkleaf .btn:hover {
  background: var(--brass-light); border-color: var(--brass-light); color: var(--lampblack);
}

/* Prose pages (story, methodology, legal) */
.prose { font-size: 18px; }
.prose h2 { font-size: clamp(28px, 3vw, 36px); margin-top: 1.4em; padding-top: 18px; border-top: 1px solid var(--lampblack); }
.prose h2:first-child { margin-top: 0; }
.prose h3 { font-size: 24px; margin-top: 1.2em; }
.prose ol, .prose ul { padding-left: 1.3em; }
.prose li { margin-bottom: 0.5em; }
.prose-columns { column-count: 2; column-gap: 40px; column-rule: 1px solid var(--tan-thread); }
.prose-columns p { break-inside: avoid-column; }

.marks { margin: 0 0 1em; }
.marks div { padding: 14px 0; border-bottom: 1px solid var(--tan-thread); }
.marks dt { font-family: var(--face-caslon); font-size: 24px; }
.marks dd { margin: 4px 0 0; }

.steps-of-sum { counter-reset: none; padding-left: 1.4em; }
.steps-of-sum li::marker { font-family: var(--face-caslon); color: var(--oxblood); }

.queries dt { font-weight: 700; margin-top: 18px; }
.queries dd { margin: 4px 0 0; }

.statute { padding: 48px 0 72px; }
.statute h2 { font-size: 26px; margin: 34px 0 8px; padding-top: 14px; border-top: 1px solid var(--tan-thread); }
.statute h2:first-child { margin-top: 0; }
.statute-note { font-size: 14px; color: var(--sepia); font-style: italic; border-top: 4px double var(--brass-rule); padding-top: 14px; margin-top: 40px; }

/* Letter form */
.correspondence { display: grid; grid-template-columns: minmax(0, 1.5fr) minmax(0, 1fr); gap: 56px; align-items: start; padding: 56px 0 72px; }
.letter-sheet {
  background: var(--white); border: 1px solid var(--lampblack); outline: 1px solid var(--brass-rule); outline-offset: -8px;
  padding: 44px 48px;
}
.letter-sheet .letter-to { font-family: var(--face-caslon); font-size: 28px; margin-bottom: 20px; }
.letter-sheet .letter-sign { font-family: var(--face-caslon); font-size: 22px; margin: 26px 0 8px; }
.write-field { margin-bottom: 18px; }
.write-field label { display: block; font-size: 14px; font-style: italic; color: var(--sepia); margin-bottom: 2px; }
.write-field input, .write-field select, .write-field textarea {
  width: 100%; font: inherit; font-size: 17px; color: var(--lampblack);
  background: transparent; border: 0; border-bottom: 1px solid var(--lampblack); border-radius: 0;
  padding: 6px 2px;
}
.write-field select { cursor: pointer; }
.write-field textarea { border: 1px solid var(--lampblack); padding: 10px 12px; line-height: 1.7; resize: vertical; min-height: 220px; }
.write-field input:focus, .write-field select:focus, .write-field textarea:focus { outline: 2px solid var(--oxblood); outline-offset: 2px; }
.pair-fields { display: grid; grid-template-columns: 1fr 1fr; gap: 0 24px; }
.post-note { font-size: 14px; color: var(--sepia); margin: 16px 0 0; }
.advice h2 { font-size: 28px; }
.advice ol { padding-left: 1.2em; }
.advice li { margin-bottom: 10px; }

.endmatter { background: var(--lampblack); color: var(--white-soft); font-size: 15px; border-top: 4px double var(--brass-rule); }
.endmatter-inner {
  max-width: 1180px; margin: 0 auto; padding: 48px 32px 32px;
  display: grid; grid-template-columns: minmax(0, 2fr) minmax(0, 1fr) minmax(0, 1fr); gap: 40px;
}
.endmatter-name { font-family: var(--face-caslon); font-size: 30px; color: var(--broadsheet); text-decoration: none; line-height: 1.1; }
.endmatter-name:hover { color: var(--brass-light); }
.endmatter-brand p { margin-top: 12px; max-width: 380px; }
.endmatter-head { font-family: var(--face-caslon); font-size: 20px; color: var(--broadsheet); margin: 0 0 10px; padding-bottom: 6px; border-bottom: 1px solid rgba(244, 239, 228, 0.25); }
.endmatter ul { list-style: none; margin: 0; padding: 0; }
.endmatter li { margin-bottom: 6px; }
.endmatter a:not(.endmatter-name) { color: var(--white-soft); text-decoration: none; }
.endmatter a:not(.endmatter-name):hover { color: var(--brass-light); text-decoration: underline; }
.endmatter :focus-visible { outline-color: var(--brass-light); }
.endmatter-imprint {
  max-width: 1116px; margin: 0 auto; padding: 16px 0 24px; font-size: 13px;
  border-top: 1px solid rgba(244, 239, 228, 0.18); color: rgba(244, 239, 228, 0.72);
}

.section { padding: 64px 0; }
.section-light { background: var(--panel); }
.section-dark, .section-black {
  --gold: #d4b36a; --violet: #d4b36a; --steel: #cfc4b0; --navy: #f4efe4;
  --line: rgba(244, 239, 228, 0.22); --panel: #2a2621; --bg: #1d1a16;
  background: var(--lampblack); color: var(--white-soft);
}
.section-black { background: #12100d; }
.section-dark h2, .section-dark h3, .section-black h2, .section-black h3 { color: var(--broadsheet); }
.section-dark a:not(.btn), .section-black a:not(.btn) { color: var(--brass-light); }
.section-dark :focus-visible, .section-black :focus-visible { outline-color: var(--brass-light); }
.section h2 { font-size: clamp(28px, 3.4vw, 40px); }
.section-intro { max-width: 720px; margin: 0 auto; text-align: center; }
.cta-band { text-align: center; }
.cta-band p { max-width: 620px; margin: 0 auto 26px; }
.hero {
  text-align: center; padding: 64px 24px 52px; background: var(--broadsheet);
  border-bottom: 1px solid var(--lampblack);
}
.hero.hero-inner { padding: 52px 24px 44px; }
.hero h1 { font-size: clamp(36px, 5.4vw, 64px); margin-bottom: 0.3em; }
.hero p { max-width: 660px; margin-left: auto; margin-right: auto; color: var(--sepia); }
.kicker {
  font-family: var(--face-franklin); font-size: 14px; font-variant-caps: all-small-caps;
  letter-spacing: 0.1em; color: var(--oxblood); margin: 0 0 10px; font-weight: 600;
}
.section-dark .kicker, .section-black .kicker { color: var(--brass-light); }
.meta { font-size: 13px; font-variant-caps: all-small-caps; letter-spacing: 0.08em; color: var(--sepia); }
.cat-list { max-width: 860px; margin: 0 auto; padding: 0 24px; }
.cat-item {
  display: block; text-decoration: none; color: var(--lampblack);
  border: 0; border-top: 1px solid var(--lampblack); border-radius: 0; padding: 20px 0 22px;
}
.cat-item:last-child { border-bottom: 1px solid var(--lampblack); }
.cat-item:hover { color: var(--oxblood); }
.cat-item h3 { font-size: 24px; margin-bottom: 6px; }
.photo-frame img { border: 1px solid var(--lampblack); outline: 1px solid var(--brass-rule); outline-offset: 4px; }
.article { max-width: 760px; margin: 0 auto; padding: 48px 32px 72px; }
.article h1 { font-size: clamp(34px, 4.6vw, 52px); }
.article h2 { font-size: 26px; margin-top: 1.4em; }

@media (max-width: 1180px) {
  .masthead-nav, .endmatter-imprint { margin: 0 32px; }
}
@media (max-width: 1000px) {
  .front-grid { grid-template-columns: minmax(0, 1fr) 260px; }
  .front-grid .inside-box { grid-column: 1 / -1; order: 3; padding: 28px 0 0; margin-top: 28px; border-left: 0; border-top: 1px solid var(--lampblack); }
  .front-grid .front-story { padding-left: 0; border-left: 0; }
  .front-story { column-count: 1; }
  .score-split, .story-split, .correspondence { grid-template-columns: minmax(0, 1fr); gap: 32px; }
}
@media (max-width: 720px) {
  body { font-size: 16.5px; }
  .container, .sheet, .sheet-narrow, .masthead-plate, .endmatter-inner { padding-left: 16px; padding-right: 16px; }
  .masthead-nav, .endmatter-imprint { margin: 0 16px; }
  .masthead-dateline { justify-content: center; }
  .masthead-dateline span:nth-child(2) { display: none; }
  .masthead-nav { gap: 0 18px; font-size: 14.5px; }
  .front-grid { grid-template-columns: 1fr; }
  .front-grid > * { padding: 0; border-left: 0 !important; }
  .front-grid .plate { margin-top: 28px; max-width: 320px; margin-left: auto; margin-right: auto; }
  .departments { grid-template-columns: 1fr; }
  .prose-columns { column-count: 1; }
  .leaf { padding: 48px 0; }
  .letter-sheet { padding: 30px 20px; }
  .pair-fields { grid-template-columns: 1fr; }
  .endmatter-inner { grid-template-columns: 1fr 1fr; }
  .endmatter-brand { grid-column: 1 / -1; }
  .tally { font-size: 14px; }
  .tally th, .tally td { padding: 8px 3px; }
  .tally tbody th { padding-right: 6px; }
  .tally .judge-word { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }
  .tally .set-aside-note { font-size: 11px; }
  .verdict-score { font-size: 28px; }
}
@media (max-width: 420px) {
  .endmatter-inner { grid-template-columns: 1fr; }
  .tally { font-size: 13px; letter-spacing: -0.01em; }
  .tally th, .tally td { padding: 7px 2px; }
  .tally tbody th { padding-right: 4px; }
}

@media print {
  .masthead-nav, .endmatter, .skip-to-text { display: none; }
  body { background: #fff; }
}
