@font-face {
  font-family: Bricolage;
  src: url(bricolage-latin.woff2) format("woff2");
  font-weight: 700 800;
  font-display: swap;
}
@font-face {
  font-family: Bricolage;
  src: url(bricolage-ext.woff2) format("woff2");
  font-weight: 700 800;
  font-display: swap;
  unicode-range: U+0100-02BA, U+02BD-02C5, U+02C7-02CC, U+02CE-02D7, U+02DD-02FF, U+1E00-1E9F;
}
@font-face {
  font-family: "DM Sans";
  src: url(dm-sans-latin.woff2) format("woff2");
  font-weight: 400 700;
  font-display: swap;
}
@font-face {
  font-family: "DM Sans";
  src: url(dm-sans-ext.woff2) format("woff2");
  font-weight: 400 700;
  font-display: swap;
  unicode-range: U+0100-02BA, U+02BD-02C5, U+02C7-02CC, U+02CE-02D7, U+02DD-02FF, U+1E00-1E9F;
}
:root {
  color-scheme: light;
  --paper: #fff3dc;
  --ink: #27142b;
  --accent: #ff6944;
  --accent-ink: #27142b;
  --art: #ffd17d;
  --heading: Bricolage, "Arial Black", sans-serif;
  --body: "DM Sans", Arial, sans-serif;
  --gutter: clamp(18px, 4.15vw, 66px);
  background: var(--paper);
  color: var(--ink);
  font-family: var(--body);
}
:root[data-club="pessimist"] {
  color-scheme: dark;
  --paper: #151515;
  --ink: #f7f0e3;
  --accent: #ffca55;
  --accent-ink: #151515;
  --art: #242532;
}
*, *::before, *::after { box-sizing: border-box; }
body, h1, h2, p { margin: 0; }
a { color: inherit; text-underline-offset: .18em; }
button, input { font: inherit; color: inherit; }
button { cursor: pointer; }
[hidden] { display: none !important; }
:focus-visible { outline: 3px solid currentColor; outline-offset: 4px; }
::selection { background: var(--accent); color: var(--accent-ink); }
.shell { max-width: 1632px; margin-inline: auto; padding-inline: var(--gutter); }
.masthead, .footer {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px 28px;
  padding-block: 16px;
}
.masthead { border-bottom: 2px solid; }
.masthead a, .footer a { text-decoration: none; }
.masthead a:hover, .footer a:hover { text-decoration: underline; }
.wordmark, .footer a {
  font: 800 clamp(25px, 3.3vw, 51px)/1 var(--heading);
  letter-spacing: -.035em;
}
.masthead nav {
  display: flex;
  gap: clamp(14px, 3.8vw, 60px);
  font: 800 clamp(14px, 1.7vw, 25px)/1.15 var(--heading);
}
.cross-link { white-space: nowrap; }
.cross-link svg { display: inline-block; width: .82em; height: .82em; margin-inline-start: .18em; vertical-align: -.03em; }
.hero {
  display: grid;
  grid-template-columns: minmax(0, 1.47fr) minmax(0, 1fr);
  gap: clamp(24px, 3.45vw, 54px);
  align-items: center;
  padding-block: clamp(23px, 2.05vw, 34px);
  border-bottom: 2px solid;
}
:root[data-club="pessimist"] .hero { grid-template-columns: minmax(0, 1.5fr) minmax(0, 1fr); }
.hero-copy { min-width: 0; }
h1 {
  font: 800 clamp(52px, 10.05vw, 155px)/.88 var(--heading);
  font-variation-settings: "opsz" 30;
  letter-spacing: -.039em;
  margin-inline-start: -.035em;
}
h1 span { display: block; white-space: nowrap; }
.hero-intro {
  font-size: clamp(17px, 2.03vw, 32px);
  line-height: 1.22;
  margin-top: clamp(18px, 2.2vw, 34px);
}
.mascot { display: block; width: 100%; height: auto; aspect-ratio: 1; background: var(--art); }
.answers {
  --answer-height: clamp(54px, 5.55vw, 86px);
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: clamp(12px, 2vw, 30px);
  margin-top: clamp(24px, 3vw, 48px);
}
.answer-slot { min-width: 0; min-height: var(--answer-height); }
.button {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 48px;
  padding: .48em .65em;
  border: 2px solid var(--ink);
  border-radius: 0;
  background: transparent;
  color: var(--ink);
  text-align: center;
  font: 800 clamp(17px, 2.2vw, 33px)/1.15 var(--heading);
  touch-action: manipulation;
}
.button.accent { background: var(--accent); color: var(--accent-ink); border-color: var(--accent); }
.button:hover { box-shadow: inset 0 0 0 2px currentColor; }
.button:disabled { cursor: wait; opacity: .7; }
.answers .button { width: 100%; min-height: var(--answer-height); padding-block: .24em; font-size: clamp(23px, 3.15vw, 48px); }
.answers .runner[data-fleeing] {
  position: fixed;
  z-index: 2;
  left: var(--runner-x, 0px);
  top: var(--runner-y, 0px);
  width: var(--runner-width);
  background: var(--paper);
  box-shadow: 4px 4px 0 var(--accent);
}
.answer-feedback { display: flex; align-items: baseline; flex-wrap: wrap; gap: 4px 12px; font-size: clamp(15px, 1.35vw, 20px); min-height: 1.35em; margin-top: 10px; }
.answer-feedback a { font-weight: 700; }
.diploma {
  display: grid;
  grid-template-columns: minmax(0, .72fr) minmax(0, 1fr);
  gap: clamp(22px, 5vw, 75px);
  padding-block: clamp(22px, 2.6vw, 42px);
  scroll-margin-top: 15px;
}
:root[data-club="pessimist"] .diploma { grid-template-columns: repeat(2, minmax(0, 1fr)); }
h2 { font: 800 clamp(40px, 5.5vw, 82px)/.91 var(--heading); letter-spacing: -.04em; }
:root[data-club="optimist"] .diploma h2 { max-width: 7ch; }
.diploma-intro p { font-size: clamp(16px, 1.9vw, 28px); line-height: 1.28; margin-top: 12px; }
fieldset { margin: 0; padding: 0; min-width: 0; border: 0; }
.statement {
  display: flex;
  align-items: center;
  gap: clamp(12px, 2vw, 28px);
  padding: 9px clamp(4px, 1.05vw, 16px);
  min-height: 51px;
  border-top: 1px solid;
  font-size: clamp(16px, 1.7vw, 25px);
  line-height: 1.24;
  cursor: pointer;
}
.statement:last-child { border-bottom: 1px solid; }
.statement:hover, .statement:has(input:checked) { background: color-mix(in srgb, var(--accent) 14%, var(--paper)); }
.statement input {
  appearance: none;
  display: grid;
  place-content: center;
  flex: 0 0 auto;
  width: clamp(21px, 1.95vw, 28px);
  aspect-ratio: 1;
  margin: 0;
  border: 2px solid;
  border-radius: 0;
  cursor: pointer;
}
.statement input:checked { background: var(--accent); color: var(--accent-ink); }
.statement input:checked::after { content: ""; width: 11px; height: 7px; border: solid currentColor; border-width: 0 0 2px 2px; transform: translateY(-1px) rotate(-45deg); }
.diploma form > .button { width: 100%; margin-top: 16px; }
.form-status { margin-top: 8px; font-weight: 700; }
.form-status:empty { display: none; }
.footer { border-top: 2px solid; padding-bottom: 25px; }
.footer a { font-size: clamp(23px, 2.7vw, 40px); }
dialog {
  width: min(640px, calc(100% - 24px));
  max-height: calc(100% - 24px);
  padding: clamp(16px, 3vw, 30px);
  border: 2px solid var(--ink);
  background: var(--paper);
  color: var(--ink);
}
dialog::backdrop { background: #110e16b8; }
.dialog-top { display: flex; align-items: center; justify-content: space-between; gap: 10px; margin-bottom: 14px; }
.dialog-top h2 { font-size: clamp(27px, 5vw, 44px); }
.close { flex: 0 0 auto; min-width: 42px; min-height: 42px; border: 1px solid; background: transparent; font-size: 26px; line-height: 1; }
.certificate {
  display: grid;
  grid-template-columns: minmax(0, 1fr) 27%;
  align-items: center;
  gap: 15px;
  padding: clamp(15px, 3.1vw, 32px);
  border: 3px double var(--ink);
  background: color-mix(in srgb, var(--accent) 11%, var(--paper));
}
.certificate h3 { font: 800 clamp(24px, 4.9vw, 43px)/.98 var(--heading); letter-spacing: -.045em; margin: 6px 0; overflow-wrap: anywhere; }
.certificate p { line-height: 1.25; font-size: clamp(13px, 2.4vw, 17px); overflow-wrap: anywhere; }
.certificate .domain, #certificate-name { font-weight: 700; }
.certificate img { display: block; width: 100%; height: auto; aspect-ratio: 1; }
.recipient { display: grid; gap: 5px; margin-block: 15px; font-weight: 700; }
.recipient input, .share-fallback input { width: 100%; min-height: 44px; padding: 8px 10px; background: var(--paper); border: 1px solid; border-radius: 0; font-weight: 400; }
.dialog-actions { display: flex; flex-wrap: wrap; gap: 8px; }
.dialog-actions .button { flex: 1 1 185px; font-size: 18px; }
.share-fallback { display: block; margin-top: 12px; }
.sr-only { position: absolute; width: 1px; height: 1px; padding: 0; margin: -1px; overflow: hidden; clip-path: inset(50%); white-space: nowrap; border: 0; }

@media (max-width: 780px) {
  .hero, :root[data-club="pessimist"] .hero { grid-template-columns: minmax(0, 1fr); }
  h1 { font-size: clamp(42px, 14.1vw, 106px); }
  .hero-intro { max-width: 40ch; }
  .mascot { max-width: min(100%, 550px); }
  .diploma, :root[data-club="pessimist"] .diploma { grid-template-columns: minmax(0, 1fr); }
  :root[data-club="optimist"] .diploma h2 { max-width: none; }
}
@media (max-width: 400px) {
  .masthead { flex-wrap: wrap; }
  .masthead nav { justify-content: space-between; }
}
