:root {
  --ink: #10243e;
  --ink-soft: #34445a;
  --paper: #fffdf4;
  --paper-deep: #f4efdd;
  --white: #ffffff;
  --yellow: #ffd84d;
  --yellow-deep: #f2bb18;
  --coral: #f05c4d;
  --blue: #2755d9;
  --mint: #8bdcbd;
  --line: #10243e;
  --muted-line: rgba(16, 36, 62, 0.18);
  --shadow: 6px 6px 0 #10243e;
  --shadow-small: 3px 3px 0 #10243e;
  --radius: 10px;
  --content: 1180px;
}

*,
*::before,
*::after {
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
  scroll-padding-top: 6rem;
}

body {
  margin: 0;
  color: var(--ink);
  background-color: var(--paper);
  background-image: radial-gradient(rgba(16, 36, 62, 0.095) 0.8px, transparent 0.8px);
  background-size: 18px 18px;
  font-family: Inter, ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
  font-size: 1rem;
  line-height: 1.62;
  text-rendering: optimizeLegibility;
}

body::before {
  content: "";
  position: fixed;
  inset: 0 0 auto;
  height: 5px;
  z-index: 1000;
  background: linear-gradient(90deg, var(--yellow) 0 30%, var(--coral) 30% 58%, var(--blue) 58% 80%, var(--mint) 80%);
}

a {
  color: var(--blue);
  text-decoration-thickness: 0.11em;
  text-underline-offset: 0.18em;
}

a:hover {
  color: #173998;
}

button,
input,
select {
  font: inherit;
}

button,
.button {
  min-height: 44px;
}

button:focus-visible,
a:focus-visible,
input:focus-visible,
select:focus-visible,
summary:focus-visible {
  outline: 4px solid rgba(39, 85, 217, 0.28);
  outline-offset: 3px;
}

img,
svg {
  max-width: 100%;
}

.skip-link {
  position: fixed;
  top: -100px;
  left: 1rem;
  z-index: 2000;
  padding: 0.7rem 1rem;
  color: var(--white);
  background: var(--ink);
}

.skip-link:focus {
  top: 1rem;
}

.site-header {
  position: sticky;
  top: 0;
  z-index: 100;
  border-bottom: 2px solid var(--line);
  background: rgba(255, 253, 244, 0.96);
  backdrop-filter: blur(12px);
}

.header-inner,
.site-main,
.footer-inner {
  width: min(calc(100% - 2rem), var(--content));
  margin-inline: auto;
}

.header-inner {
  min-height: 76px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
}

.brand {
  display: inline-flex;
  align-items: center;
  gap: 0.72rem;
  color: var(--ink);
  text-decoration: none;
}

.brand:hover {
  color: var(--ink);
}

.brand-mark {
  display: grid;
  width: 42px;
  height: 42px;
  place-items: center;
  border: 2px solid var(--line);
  border-radius: 50%;
  background: var(--yellow);
  box-shadow: 2px 2px 0 var(--line);
  font-family: Georgia, "Times New Roman", serif;
  font-size: 1.5rem;
  font-weight: 800;
  line-height: 1;
}

.brand-copy {
  display: grid;
  line-height: 1.05;
}

.brand-name {
  font-family: Georgia, "Times New Roman", serif;
  font-size: 1.38rem;
  font-weight: 800;
}

.brand-tag {
  margin-top: 0.25rem;
  color: var(--ink-soft);
  font-family: ui-monospace, SFMono-Regular, Menlo, Consolas, monospace;
  font-size: 0.73rem;
  letter-spacing: 0.04em;
  text-transform: uppercase;
}

.site-nav {
  display: flex;
  align-items: center;
  gap: 0.35rem;
}

.site-nav a {
  padding: 0.55rem 0.7rem;
  border-radius: 6px;
  color: var(--ink);
  font-size: 0.95rem;
  font-weight: 750;
  text-decoration: none;
}

.site-nav a:hover,
.site-nav a[aria-current="page"] {
  background: var(--yellow);
}

.nav-toggle {
  display: none;
  align-items: center;
  justify-content: center;
  border: 2px solid var(--line);
  border-radius: 6px;
  color: var(--ink);
  background: var(--paper);
  font-weight: 800;
  cursor: pointer;
}

.site-main {
  padding-block: clamp(1.5rem, 4vw, 3.5rem) 5rem;
}

.home-lead {
  display: grid;
  grid-template-columns: minmax(0, 0.82fr) minmax(420px, 1.18fr);
  align-items: stretch;
  gap: clamp(1.2rem, 3vw, 2.25rem);
}

.intro-block {
  padding: clamp(0.5rem, 2vw, 1.25rem) 0;
}

.eyebrow {
  display: inline-block;
  margin: 0 0 0.8rem;
  color: var(--coral);
  font-family: ui-monospace, SFMono-Regular, Menlo, Consolas, monospace;
  font-size: 0.78rem;
  font-weight: 850;
  letter-spacing: 0.095em;
  text-transform: uppercase;
}

h1,
h2,
h3 {
  color: var(--ink);
  font-family: Georgia, "Times New Roman", serif;
  line-height: 1.08;
}

h1 {
  max-width: 13ch;
  margin: 0;
  font-size: clamp(2.7rem, 7vw, 5.8rem);
  letter-spacing: -0.055em;
}

h2 {
  margin: 0;
  font-size: clamp(2rem, 4vw, 3.3rem);
  letter-spacing: -0.035em;
}

h3 {
  margin: 0;
  font-size: 1.4rem;
  letter-spacing: -0.018em;
}

.lede {
  max-width: 42rem;
  margin: 1.2rem 0 0;
  color: var(--ink-soft);
  font-size: clamp(1.05rem, 2vw, 1.22rem);
}

.lead-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 0.7rem;
  margin-top: 1.55rem;
}

.button,
button.button {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 0.48rem;
  padding: 0.7rem 1rem;
  border: 2px solid var(--line);
  border-radius: 7px;
  color: var(--ink);
  background: var(--yellow);
  box-shadow: var(--shadow-small);
  font-weight: 850;
  line-height: 1.15;
  text-align: center;
  text-decoration: none;
  cursor: pointer;
  transition: transform 120ms ease, box-shadow 120ms ease, background-color 120ms ease;
}

.button:hover,
button.button:hover {
  color: var(--ink);
  background: #ffe687;
  transform: translate(-1px, -1px);
  box-shadow: 4px 4px 0 var(--line);
}

.button:active,
button.button:active {
  transform: translate(2px, 2px);
  box-shadow: 1px 1px 0 var(--line);
}

.button.secondary {
  background: var(--white);
}

.button.tertiary {
  border-color: transparent;
  background: transparent;
  box-shadow: none;
}

.button.small {
  min-height: 38px;
  padding: 0.5rem 0.72rem;
  font-size: 0.9rem;
}

.institute-seal {
  display: inline-flex;
  align-items: center;
  gap: 0.55rem;
  margin-top: 1.7rem;
  padding: 0.55rem 0.7rem;
  border: 1px solid rgba(16, 36, 62, 0.3);
  border-radius: 5px;
  color: var(--ink-soft);
  background: rgba(255, 255, 255, 0.55);
  font-family: ui-monospace, SFMono-Regular, Menlo, Consolas, monospace;
  font-size: 0.77rem;
}

.seal-dot {
  width: 10px;
  height: 10px;
  border: 2px solid var(--ink);
  border-radius: 50%;
  background: var(--mint);
}

.daily-panel {
  position: relative;
  min-height: 500px;
  padding: clamp(1rem, 3vw, 1.65rem);
  border: 3px solid var(--line);
  border-radius: 14px;
  background: var(--yellow);
  box-shadow: var(--shadow);
  overflow: hidden;
}

.daily-panel::after {
  content: "PEER REVIEWED*";
  position: absolute;
  right: -2.3rem;
  top: 1.8rem;
  padding: 0.32rem 2.7rem;
  border-block: 2px solid var(--line);
  background: var(--coral);
  color: var(--white);
  font-family: ui-monospace, SFMono-Regular, Menlo, Consolas, monospace;
  font-size: 0.68rem;
  font-weight: 900;
  letter-spacing: 0.08em;
  transform: rotate(38deg);
}

.panel-heading {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
  margin-bottom: 1rem;
  padding-right: 4.5rem;
}

.panel-label {
  margin: 0;
  font-family: ui-monospace, SFMono-Regular, Menlo, Consolas, monospace;
  font-size: 0.78rem;
  font-weight: 850;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}

.panel-date {
  margin: 0;
  color: var(--ink-soft);
  font-size: 0.82rem;
  font-weight: 750;
}

.joke-card {
  position: relative;
  display: flex;
  min-height: 100%;
  flex-direction: column;
  padding: 1.15rem;
  border: 2px solid var(--line);
  border-radius: var(--radius);
  background: var(--white);
  box-shadow: var(--shadow-small);
}

.daily-panel .joke-card {
  min-height: 405px;
  padding: clamp(1.15rem, 3vw, 1.8rem);
  box-shadow: none;
}

.joke-meta {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 0.45rem;
  margin-bottom: 1rem;
}

.chip {
  display: inline-flex;
  align-items: center;
  min-height: 27px;
  padding: 0.25rem 0.54rem;
  border: 1.5px solid var(--line);
  border-radius: 999px;
  color: var(--ink);
  background: var(--paper);
  font-family: ui-monospace, SFMono-Regular, Menlo, Consolas, monospace;
  font-size: 0.7rem;
  font-weight: 800;
  line-height: 1.1;
  text-decoration: none;
  text-transform: uppercase;
}

a.chip:hover {
  color: var(--ink);
  background: var(--yellow);
}

.rating-chip {
  margin-left: auto;
  background: var(--mint);
}

.joke-setup {
  margin: 0;
  font-family: Georgia, "Times New Roman", serif;
  font-size: clamp(1.35rem, 2.5vw, 1.8rem);
  font-weight: 800;
  line-height: 1.22;
}

.daily-panel .joke-setup {
  max-width: 21ch;
  font-size: clamp(1.75rem, 4vw, 2.75rem);
}

.answer-region {
  margin-top: 1.2rem;
}

.punchline {
  margin: 0.2rem 0 0;
  padding: 1rem;
  border-left: 5px solid var(--coral);
  background: #fff4d3;
  font-family: Georgia, "Times New Roman", serif;
  font-size: clamp(1.22rem, 2.5vw, 1.62rem);
  font-weight: 800;
  line-height: 1.25;
}

.punchline[hidden] {
  display: none;
}

.reveal-button {
  width: fit-content;
}

.joke-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 0.45rem;
  margin-top: auto;
  padding-top: 1.3rem;
}

.icon-button {
  display: inline-flex;
  min-width: 42px;
  min-height: 42px;
  align-items: center;
  justify-content: center;
  gap: 0.38rem;
  padding: 0.45rem 0.65rem;
  border: 1.5px solid var(--line);
  border-radius: 6px;
  color: var(--ink);
  background: var(--white);
  font-size: 0.84rem;
  font-weight: 800;
  cursor: pointer;
}

.icon-button:hover,
.icon-button[aria-pressed="true"] {
  background: var(--yellow);
}

.explanation {
  margin-top: 0.9rem;
  border-top: 1px solid var(--muted-line);
  padding-top: 0.8rem;
}

.explanation summary {
  width: fit-content;
  cursor: pointer;
  font-weight: 800;
}

.explanation p {
  margin: 0.7rem 0 0;
  color: var(--ink-soft);
  font-size: 0.94rem;
}

.section {
  margin-top: clamp(4rem, 9vw, 7rem);
}

.section-heading {
  display: flex;
  align-items: end;
  justify-content: space-between;
  gap: 1rem;
  margin-bottom: 1.5rem;
}

.section-heading > div {
  max-width: 48rem;
}

.section-heading p {
  margin: 0.65rem 0 0;
  color: var(--ink-soft);
  font-size: 1.05rem;
}

.category-grid {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 1rem;
}

.category-tile {
  position: relative;
  display: flex;
  min-height: 178px;
  flex-direction: column;
  padding: 1.05rem;
  border: 2px solid var(--line);
  border-radius: var(--radius);
  color: var(--ink);
  background: var(--white);
  box-shadow: 3px 3px 0 var(--line);
  text-decoration: none;
  transition: transform 130ms ease, box-shadow 130ms ease;
}

.category-tile:nth-child(4n + 1) {
  border-top: 9px solid var(--yellow);
}

.category-tile:nth-child(4n + 2) {
  border-top: 9px solid var(--coral);
}

.category-tile:nth-child(4n + 3) {
  border-top: 9px solid var(--mint);
}

.category-tile:nth-child(4n + 4) {
  border-top: 9px solid var(--blue);
}

.category-tile:hover {
  color: var(--ink);
  transform: translate(-2px, -2px);
  box-shadow: 6px 6px 0 var(--line);
}

.category-tile p {
  margin: 0.55rem 0 1rem;
  color: var(--ink-soft);
  font-size: 0.93rem;
  line-height: 1.42;
}

.tile-count {
  margin-top: auto;
  font-family: ui-monospace, SFMono-Regular, Menlo, Consolas, monospace;
  font-size: 0.73rem;
  font-weight: 800;
  text-transform: uppercase;
}

.notes-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 1.2rem;
}

.note-card {
  display: grid;
  min-height: 220px;
  grid-template-rows: auto auto 1fr auto;
  padding: 1.3rem;
  border: 2px solid var(--line);
  border-radius: var(--radius);
  background: var(--paper-deep);
}

.note-card:nth-child(2) {
  background: #eaf1ff;
}

.note-card:nth-child(3) {
  background: #e7f8f1;
}

.note-card:nth-child(4) {
  background: #fff0e9;
}

.note-card .note-meta {
  margin: 0 0 0.7rem;
  font-family: ui-monospace, SFMono-Regular, Menlo, Consolas, monospace;
  font-size: 0.72rem;
  font-weight: 800;
  letter-spacing: 0.06em;
  text-transform: uppercase;
}

.note-card p {
  color: var(--ink-soft);
}

.note-card a {
  width: fit-content;
  font-weight: 850;
}

.stats-strip {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  margin-top: 4rem;
  border: 2px solid var(--line);
  border-radius: var(--radius);
  background: var(--ink);
  color: var(--white);
  overflow: hidden;
}

.stat {
  padding: 1.2rem;
  text-align: center;
}

.stat + .stat {
  border-left: 1px solid rgba(255, 255, 255, 0.35);
}

.stat strong {
  display: block;
  color: var(--yellow);
  font-family: Georgia, "Times New Roman", serif;
  font-size: 2rem;
  line-height: 1;
}

.stat span {
  display: block;
  margin-top: 0.35rem;
  font-size: 0.78rem;
  font-weight: 750;
  letter-spacing: 0.05em;
  text-transform: uppercase;
}

.page-head {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  align-items: end;
  gap: 2rem;
  padding: clamp(1rem, 3vw, 2.4rem) 0 clamp(2rem, 5vw, 4rem);
  border-bottom: 3px solid var(--line);
}

.page-head h1 {
  max-width: 16ch;
  font-size: clamp(2.7rem, 7vw, 5.2rem);
}

.page-head .lede {
  max-width: 50rem;
}

.head-stamp {
  width: 148px;
  height: 148px;
  display: grid;
  place-items: center;
  border: 3px double var(--line);
  border-radius: 50%;
  background: var(--yellow);
  font-family: ui-monospace, SFMono-Regular, Menlo, Consolas, monospace;
  font-size: 0.73rem;
  font-weight: 900;
  line-height: 1.25;
  text-align: center;
  text-transform: uppercase;
  transform: rotate(6deg);
}

.category-intro {
  display: grid;
  grid-template-columns: minmax(0, 1.4fr) minmax(250px, 0.6fr);
  gap: 2rem;
  margin-top: 2rem;
}

.category-intro p:first-child {
  margin-top: 0;
}

.use-card {
  height: fit-content;
  padding: 1.1rem;
  border: 2px solid var(--line);
  border-radius: var(--radius);
  background: var(--mint);
  box-shadow: var(--shadow-small);
}

.use-card strong {
  display: block;
  margin-bottom: 0.4rem;
  font-family: ui-monospace, SFMono-Regular, Menlo, Consolas, monospace;
  font-size: 0.74rem;
  letter-spacing: 0.06em;
  text-transform: uppercase;
}

.joke-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 1.15rem;
  margin-top: 2rem;
}

.joke-grid .joke-card {
  min-height: 390px;
}

.filter-panel {
  margin-top: 2rem;
  padding: 1.2rem;
  border: 2px solid var(--line);
  border-radius: var(--radius);
  background: var(--white);
  box-shadow: var(--shadow-small);
}

.filter-grid {
  display: grid;
  grid-template-columns: minmax(220px, 2fr) repeat(3, minmax(150px, 1fr));
  gap: 0.9rem;
}

.field {
  display: grid;
  gap: 0.35rem;
}

.field label,
.field .label {
  font-size: 0.78rem;
  font-weight: 850;
  letter-spacing: 0.04em;
  text-transform: uppercase;
}

.field input,
.field select {
  width: 100%;
  min-height: 46px;
  padding: 0.65rem 0.75rem;
  border: 2px solid var(--line);
  border-radius: 6px;
  color: var(--ink);
  background: var(--paper);
}

.check-field {
  display: flex;
  min-height: 46px;
  align-items: center;
  gap: 0.55rem;
  padding: 0.55rem 0.7rem;
  border: 2px solid var(--line);
  border-radius: 6px;
  background: var(--paper);
}

.check-field input {
  width: 19px;
  height: 19px;
  accent-color: var(--blue);
}

.results-bar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
  margin-top: 1.3rem;
}

.results-count {
  margin: 0;
  font-weight: 800;
}

.empty-state {
  grid-column: 1 / -1;
  padding: 3rem 1.5rem;
  border: 2px dashed var(--line);
  border-radius: var(--radius);
  text-align: center;
}

.empty-state h2 {
  font-size: 2rem;
}

.empty-state p {
  color: var(--ink-soft);
}

.load-more-wrap {
  display: flex;
  justify-content: center;
  margin-top: 1.5rem;
}

.print-workspace {
  display: grid;
  grid-template-columns: minmax(260px, 0.55fr) minmax(0, 1.45fr);
  gap: 1.5rem;
  margin-top: 2rem;
  align-items: start;
}

.print-controls {
  position: sticky;
  top: 98px;
  padding: 1.2rem;
  border: 2px solid var(--line);
  border-radius: var(--radius);
  background: var(--yellow);
  box-shadow: var(--shadow-small);
}

.print-controls h2 {
  font-size: 1.7rem;
}

.print-controls .field {
  margin-top: 1rem;
}

.print-controls .button {
  width: 100%;
  margin-top: 0.75rem;
}

.print-note {
  margin: 1rem 0 0;
  color: var(--ink-soft);
  font-size: 0.86rem;
}

.print-preview-wrap {
  padding: 1rem;
  border: 2px solid var(--line);
  border-radius: var(--radius);
  background: #d9dce0;
}

.print-sheet {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 0.35in;
  width: 100%;
  min-height: 760px;
  padding: 0.45in;
  background: var(--white);
  box-shadow: 0 4px 18px rgba(16, 36, 62, 0.22);
}

.print-card {
  display: flex;
  min-height: 170px;
  flex-direction: column;
  justify-content: space-between;
  padding: 0.22in;
  border: 2px dashed var(--line);
  border-radius: 4px;
  break-inside: avoid;
}

.print-card:nth-child(4n + 1) {
  background: #fff8cf;
}

.print-card:nth-child(4n + 2) {
  background: #edf3ff;
}

.print-card:nth-child(4n + 3) {
  background: #e9f8f1;
}

.print-card:nth-child(4n + 4) {
  background: #fff0e9;
}

.print-card .print-setup {
  margin: 0;
  font-family: Georgia, "Times New Roman", serif;
  font-size: 1rem;
  font-weight: 800;
  line-height: 1.25;
}

.print-card .print-answer {
  margin: 0.7rem 0 0;
  padding-top: 0.5rem;
  border-top: 1px solid var(--line);
  font-size: 0.9rem;
  font-weight: 800;
}

.print-card .print-brand {
  margin-top: 0.5rem;
  font-family: ui-monospace, SFMono-Regular, Menlo, Consolas, monospace;
  font-size: 0.58rem;
  letter-spacing: 0.05em;
  text-transform: uppercase;
}

.article-shell {
  display: grid;
  grid-template-columns: minmax(0, 750px) minmax(190px, 1fr);
  gap: clamp(2rem, 6vw, 5rem);
  align-items: start;
  margin-top: 2rem;
}

.article-body {
  padding: clamp(1.2rem, 4vw, 2.5rem);
  border: 2px solid var(--line);
  border-radius: var(--radius);
  background: var(--white);
  box-shadow: var(--shadow-small);
}

.article-body > p:first-child {
  margin-top: 0;
  font-size: 1.18rem;
}

.article-body p {
  max-width: 68ch;
}

.article-body h2 {
  margin-top: 2.1rem;
  font-size: clamp(1.55rem, 3vw, 2.1rem);
}

.article-aside {
  position: sticky;
  top: 98px;
}

.aside-card {
  padding: 1rem;
  border: 2px solid var(--line);
  border-radius: var(--radius);
  background: var(--mint);
}

.aside-card h2 {
  font-size: 1.35rem;
}

.aside-card ul {
  margin: 0.8rem 0 0;
  padding-left: 1.2rem;
}

.aside-card li + li {
  margin-top: 0.55rem;
}

.prose {
  max-width: 780px;
}

.prose h2 {
  margin-top: 2.2rem;
  font-size: clamp(1.6rem, 3vw, 2.2rem);
}

.prose h3 {
  margin-top: 1.6rem;
}

.prose p,
.prose li {
  color: var(--ink-soft);
}

.prose strong {
  color: var(--ink);
}

.prose-card {
  padding: clamp(1.2rem, 4vw, 2.5rem);
  border: 2px solid var(--line);
  border-radius: var(--radius);
  background: var(--white);
  box-shadow: var(--shadow-small);
}

.policy-table {
  width: 100%;
  border-collapse: collapse;
  margin-top: 1rem;
}

.policy-table th,
.policy-table td {
  padding: 0.75rem;
  border: 1px solid var(--line);
  text-align: left;
  vertical-align: top;
}

.policy-table th {
  background: var(--yellow);
}

.callout {
  margin: 1.5rem 0;
  padding: 1rem;
  border-left: 6px solid var(--coral);
  background: #fff0e9;
}

.site-footer {
  border-top: 3px solid var(--line);
  background: var(--ink);
  color: var(--white);
}

.footer-inner {
  display: grid;
  grid-template-columns: 1fr auto;
  gap: 2rem;
  padding-block: 2.5rem;
}

.footer-brand {
  color: var(--white);
  font-family: Georgia, "Times New Roman", serif;
  font-size: 1.5rem;
  font-weight: 800;
}

.footer-copy {
  max-width: 44rem;
  margin: 0.5rem 0 0;
  color: rgba(255, 255, 255, 0.76);
  font-size: 0.9rem;
}

.footer-links {
  display: flex;
  flex-wrap: wrap;
  justify-content: flex-end;
  gap: 0.8rem 1rem;
}

.footer-links a {
  color: var(--white);
  font-size: 0.9rem;
}

.copyright {
  grid-column: 1 / -1;
  margin: 0;
  padding-top: 1rem;
  border-top: 1px solid rgba(255, 255, 255, 0.25);
  color: rgba(255, 255, 255, 0.65);
  font-size: 0.78rem;
}

.toast {
  position: fixed;
  right: 1rem;
  bottom: 1rem;
  z-index: 1000;
  max-width: min(360px, calc(100% - 2rem));
  padding: 0.8rem 1rem;
  border: 2px solid var(--line);
  border-radius: 7px;
  color: var(--ink);
  background: var(--yellow);
  box-shadow: var(--shadow-small);
  font-weight: 800;
  opacity: 0;
  transform: translateY(20px);
  pointer-events: none;
  transition: opacity 150ms ease, transform 150ms ease;
}

.toast.show {
  opacity: 1;
  transform: translateY(0);
}

.error-page {
  min-height: 64vh;
  display: grid;
  place-items: center;
  text-align: center;
}

.error-code {
  margin: 0;
  color: var(--coral);
  font-family: ui-monospace, SFMono-Regular, Menlo, Consolas, monospace;
  font-size: clamp(4rem, 18vw, 10rem);
  font-weight: 900;
  line-height: 0.8;
}

.error-page h1 {
  max-width: none;
  margin-top: 1.2rem;
  font-size: clamp(2rem, 6vw, 4rem);
}

.error-page p {
  max-width: 40rem;
  margin-inline: auto;
  color: var(--ink-soft);
}

.visually-hidden {
  position: absolute !important;
  width: 1px !important;
  height: 1px !important;
  padding: 0 !important;
  margin: -1px !important;
  overflow: hidden !important;
  clip: rect(0, 0, 0, 0) !important;
  white-space: nowrap !important;
  border: 0 !important;
}

@media (max-width: 980px) {
  .home-lead {
    grid-template-columns: 1fr;
  }

  .intro-block {
    display: grid;
    grid-template-columns: minmax(0, 1fr) minmax(260px, 0.65fr);
    gap: 1rem 2rem;
    align-items: end;
  }

  .intro-block .eyebrow,
  .intro-block h1 {
    grid-column: 1;
  }

  .intro-block .lede,
  .intro-block .lead-actions,
  .intro-block .institute-seal {
    grid-column: 2;
  }

  .intro-block .lede {
    grid-row: 1 / span 2;
    align-self: end;
    margin: 0;
  }

  .category-grid {
    grid-template-columns: repeat(3, minmax(0, 1fr));
  }

  .joke-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .filter-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .print-workspace {
    grid-template-columns: 1fr;
  }

  .print-controls {
    position: static;
  }

  .article-shell {
    grid-template-columns: 1fr;
  }

  .article-aside {
    position: static;
  }
}

@media (max-width: 760px) {
  .header-inner {
    min-height: 70px;
  }

  .brand-tag {
    display: none;
  }

  .nav-toggle {
    display: inline-flex;
  }

  .site-nav {
    position: absolute;
    inset: calc(100% + 2px) 0 auto;
    display: none;
    flex-direction: column;
    align-items: stretch;
    gap: 0;
    padding: 0.5rem 1rem 1rem;
    border-bottom: 2px solid var(--line);
    background: var(--paper);
  }

  .site-nav.open {
    display: flex;
  }

  .site-nav a {
    padding: 0.75rem;
  }

  .intro-block {
    display: block;
  }

  .intro-block .lede {
    margin-top: 1rem;
  }

  .daily-panel {
    min-height: 490px;
  }

  .category-grid,
  .notes-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .page-head {
    grid-template-columns: 1fr;
  }

  .head-stamp {
    display: none;
  }

  .category-intro {
    grid-template-columns: 1fr;
  }

  .footer-inner {
    grid-template-columns: 1fr;
  }

  .footer-links {
    justify-content: flex-start;
  }
}

@media (max-width: 560px) {
  .header-inner,
  .site-main,
  .footer-inner {
    width: min(calc(100% - 1.15rem), var(--content));
  }

  h1 {
    font-size: clamp(2.5rem, 15vw, 4rem);
  }

  .daily-panel {
    min-height: 520px;
    padding: 0.75rem;
    box-shadow: 4px 4px 0 var(--line);
  }

  .daily-panel::after {
    display: none;
  }

  .panel-heading {
    padding-right: 0;
  }

  .daily-panel .joke-card {
    min-height: 445px;
  }

  .category-grid,
  .notes-grid,
  .joke-grid,
  .filter-grid,
  .stats-strip {
    grid-template-columns: 1fr;
  }

  .category-tile {
    min-height: 150px;
  }

  .joke-grid .joke-card {
    min-height: 360px;
  }

  .stat + .stat {
    border-top: 1px solid rgba(255, 255, 255, 0.35);
    border-left: 0;
  }

  .section-heading,
  .results-bar {
    align-items: flex-start;
    flex-direction: column;
  }

  .print-preview-wrap {
    padding: 0.35rem;
    overflow-x: auto;
  }

  .print-sheet {
    min-width: 520px;
  }
}

@media (prefers-reduced-motion: reduce) {
  html {
    scroll-behavior: auto;
  }

  *,
  *::before,
  *::after {
    transition-duration: 0.01ms !important;
    animation-duration: 0.01ms !important;
    animation-iteration-count: 1 !important;
  }
}

@media print {
  @page {
    size: letter;
    margin: 0.3in;
  }

  body.print-page {
    background: #fff;
  }

  .print-page .site-header,
  .print-page .page-head,
  .print-page .print-controls,
  .print-page .site-footer,
  .print-page .print-preview-label,
  .print-page .toast {
    display: none !important;
  }

  .print-page .site-main,
  .print-page .print-workspace,
  .print-page .print-preview-wrap {
    display: block;
    width: 100%;
    max-width: none;
    margin: 0;
    padding: 0;
    border: 0;
    background: #fff;
  }

  .print-page .print-sheet {
    width: 100%;
    min-height: 0;
    padding: 0;
    gap: 0.2in;
    box-shadow: none;
  }

  .print-page .print-card {
    min-height: 2.15in;
    -webkit-print-color-adjust: exact;
    print-color-adjust: exact;
  }
}
