@font-face {
  font-family: "Oswald";
  src: url("/assets/fonts/oswald-700.woff2") format("woff2");
  font-weight: 700;
  font-style: normal;
  font-display: swap;
}

@font-face {
  font-family: "Libre Franklin";
  src: url("/assets/fonts/libre-franklin-400.woff2") format("woff2");
  font-weight: 400;
  font-style: normal;
  font-display: swap;
}

@font-face {
  font-family: "Libre Franklin";
  src: url("/assets/fonts/libre-franklin-600.woff2") format("woff2");
  font-weight: 600;
  font-style: normal;
  font-display: swap;
}

:root {
  --paper: #f4e4c4;
  --ink: #1b140c;
  --red: #c5281e;
  --blue: #1c4578;
  --yellow: #e2b42a;
  --paper-2: #f7edd8;
}

*,
*::before,
*::after {
  box-sizing: border-box;
  border-radius: 0;
  box-shadow: none;
}

html {
  font-size: 100%;
}

body {
  margin: 0;
  background: var(--paper);
  color: var(--ink);
  font-family: "Libre Franklin", "Franklin Gothic Medium", "Arial Narrow", sans-serif;
  font-size: 1.125rem;
  line-height: 1.45;
}

img {
  max-width: 100%;
  height: auto;
  display: block;
}

a {
  color: inherit;
}

h1,
h2,
h3,
.brand,
.cta,
.num,
.kicker,
legend {
  font-family: "Oswald", "Arial Narrow", Impact, sans-serif;
  font-weight: 700;
  letter-spacing: 0.02em;
  text-transform: uppercase;
  line-height: 0.92;
}

h1 {
  margin: 0.2rem 0 0;
  font-size: 2.4rem;
}

h2 {
  margin: 0;
  font-size: 1.8rem;
}

h3 {
  margin: 0.2rem 0 0;
  font-size: 1.45rem;
}

p {
  margin: 0.75rem 0 0;
}

.skip {
  position: absolute;
  left: 0.5rem;
  top: -4rem;
  background: var(--paper);
  color: var(--ink);
  padding: 0.6rem 0.8rem;
  z-index: 5;
  text-decoration: none;
}

.skip:focus {
  top: 0.5rem;
}

.site-header {
  background: var(--ink);
  color: var(--paper);
}

.mast,
.inner {
  width: min(72rem, 100%);
  margin-inline: auto;
}

.mast {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 0.25rem 1rem;
  padding: 0.35rem 1rem;
}

.brand {
  margin-right: auto;
  text-decoration: none;
  font-size: 1.55rem;
  min-height: 2.75rem;
  display: inline-flex;
  align-items: center;
}

.nav-wide {
  display: none;
  gap: 0.25rem 1.25rem;
}

.nav-wide a,
.nav-narrow a,
.nav-narrow summary {
  min-height: 2.75rem;
  display: inline-flex;
  align-items: center;
  text-decoration: underline;
  text-underline-offset: 0.2em;
  font-family: "Oswald", "Arial Narrow", Impact, sans-serif;
  text-transform: uppercase;
  letter-spacing: 0.04em;
}

.nav-narrow summary {
  cursor: pointer;
  list-style: none;
}

.nav-narrow summary::-webkit-details-marker {
  display: none;
}

.nav-narrow nav {
  display: flex;
  flex-direction: column;
  padding-bottom: 0.5rem;
}

.panel {
  margin: 0;
  padding: 1.25rem 1rem;
  border: 0;
  background: var(--paper);
  color: var(--ink);
}

.panel-paper {
  background: var(--paper);
  color: var(--ink);
}

.panel-progress {
  background: var(--red);
  color: var(--paper);
}

.panel-habits {
  background: var(--blue);
  color: var(--paper);
}

.panel-adjust {
  background: var(--yellow);
  color: var(--ink);
}

.panel-ink {
  background: var(--ink);
  color: var(--paper);
}

.kicker,
.num {
  margin: 0;
  font-size: 1rem;
  letter-spacing: 0.12em;
}

.deck,
.sentence {
  font-size: 1.25rem;
  max-width: 38rem;
}

.who {
  font-weight: 600;
}

.hero-actions,
.hero-copy {
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  gap: 0.85rem;
}

.hero-actions {
  margin-top: 0.4rem;
}

.cta {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 2.75rem;
  padding: 0.85rem 1.1rem;
  background: var(--ink);
  color: var(--paper);
  border: 3px solid var(--ink);
  text-decoration: none;
  font-size: 1.15rem;
  cursor: pointer;
}

.cta:hover {
  background: #3d2c1a;
}

.cta:active {
  transform: translateY(2px);
}

.cta:disabled {
  opacity: 0.55;
  cursor: wait;
  transform: none;
}

.cta-send {
  background: var(--red);
  color: var(--paper);
  border-color: var(--ink);
  margin-top: 0.4rem;
}

.cta-send:hover {
  background: #9e1f18;
}

.text-link {
  font-weight: 600;
  text-underline-offset: 0.2em;
}

.poster-figure {
  margin: 1rem 0 0;
}

.poster-figure img {
  width: 100%;
  border: 4px solid var(--ink);
  background: var(--paper-2);
}

.tool-figure {
  max-width: 22rem;
}

.groups-figure {
  max-width: 16rem;
}

#tool.panel {
  padding: 0;
}

#tool .tool-intro {
  padding: 1.25rem 1rem 0.25rem;
}

fieldset.panel {
  width: 100%;
  min-inline-size: 0;
  margin: 0;
  padding-inline: max(1rem, calc((100% - 72rem) / 2));
}

legend {
  padding: 0 0 0.4rem;
  font-size: 2rem;
}

.item {
  display: flex;
  gap: 0.8rem;
  align-items: flex-start;
  padding: 0.75rem 0;
  border-top: 2px solid currentColor;
  cursor: pointer;
  min-height: 2.75rem;
}

.item input {
  appearance: none;
  width: 1.4rem;
  height: 1.4rem;
  margin: 0.15rem 0 0;
  flex: 0 0 auto;
  border: 3px solid currentColor;
  background: transparent;
  cursor: pointer;
}

.item input:checked {
  background: currentColor;
}

.item input:focus-visible,
.cta:focus-visible,
a:focus-visible,
summary:focus-visible,
button:focus-visible,
input:focus-visible,
textarea:focus-visible {
  outline: 3px solid currentColor;
  outline-offset: 3px;
}

.panel-paper :focus-visible,
.panel-adjust :focus-visible,
.site-footer :focus-visible {
  outline-color: var(--ink);
}

.item:hover .item-text {
  text-decoration: underline;
  text-underline-offset: 0.18em;
}

.item:active {
  transform: translate(2px, 2px);
}

.lists {
  display: grid;
  gap: 1rem;
  margin-top: 1rem;
}

.lists ul {
  list-style: none;
  margin: 0.4rem 0 0;
  padding: 0;
}

.lists li {
  border-top: 2px solid currentColor;
  padding: 0.55rem 0;
}

.beside {
  display: grid;
}

.question-grid,
.groups-intro,
.notices,
.prose {
  max-width: 72rem;
}

.prose {
  max-width: 40rem;
}

.question-grid {
  display: grid;
  gap: 1.25rem;
}

.education {
  background: var(--ink);
  color: var(--paper);
  padding: 1.15rem;
  border: 4px solid var(--ink);
}

.field {
  margin-top: 0.9rem;
}

.field label,
.education h2,
.notices h2,
#nograde h2,
#limit h2,
#question h2 {
  display: block;
}

input,
textarea {
  width: 100%;
  margin-top: 0.35rem;
  padding: 0.75rem;
  border: 3px solid var(--ink);
  background: var(--paper-2);
  color: var(--ink);
  font: inherit;
  font-size: 1rem;
}

textarea {
  min-height: 8.5rem;
  resize: vertical;
}

[aria-invalid="true"] {
  background: var(--yellow);
}

.field-error {
  font-weight: 600;
  margin-top: 0.35rem;
}

.alert {
  background: var(--yellow);
  color: var(--ink);
  border: 4px solid var(--ink);
  padding: 0.75rem 0.9rem;
  margin-top: 0.8rem;
}

.alert[hidden] {
  display: none;
}

.alert p {
  margin: 0;
}

.alert p + p {
  margin-top: 0.4rem;
}

.panel-ink a,
.site-footer a {
  color: var(--paper);
}

.site-footer {
  background: var(--ink);
  color: var(--paper);
  padding: 1.25rem 1rem 2rem;
}

.footer-grid {
  display: grid;
  gap: 1rem;
}

.footer-nav {
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  gap: 0.2rem;
}

.footer-nav a,
.contact a {
  min-height: 2.75rem;
  display: inline-flex;
  align-items: center;
  text-underline-offset: 0.2em;
}

.contact h2 {
  font-size: 1.4rem;
}

ol {
  margin: 0.8rem 0 0;
  padding-left: 1.2rem;
}

ol li + li {
  margin-top: 0.45rem;
}

@media (min-width: 375px) {
  h1 {
    font-size: 2.7rem;
  }

  .panel,
  .mast,
  #tool .tool-intro,
  .site-footer {
    padding-left: 1.15rem;
    padding-right: 1.15rem;
  }
}

@media (min-width: 768px) {
  h1 {
    font-size: 4rem;
  }

  h2,
  legend {
    font-size: 2.4rem;
  }

  .nav-wide {
    display: flex;
  }

  .nav-narrow {
    display: none;
  }

  .hero-grid {
    display: grid;
    grid-template-columns: 1.15fr 0.85fr;
    gap: 1.5rem;
    align-items: end;
  }

  .poster-figure {
    margin-top: 0;
  }

  .lists {
    grid-template-columns: 1fr 1fr;
  }

  .footer-grid {
    grid-template-columns: 1fr 1.2fr;
    align-items: start;
  }

  .panel,
  #tool .tool-intro {
    padding-top: 2rem;
    padding-bottom: 2rem;
  }
}

@media (min-width: 1024px) {
  .beside {
    grid-template-columns: 1.15fr 0.85fr;
  }

  .question-grid {
    grid-template-columns: 1.15fr 0.85fr;
    align-items: start;
    gap: 1.5rem;
  }

  .deck,
  .sentence {
    font-size: 1.45rem;
  }
}

@media (min-width: 1440px) {
  h1 {
    font-size: 5.6rem;
  }

  .panel,
  #tool .tool-intro {
    padding-top: 2.6rem;
    padding-bottom: 2.6rem;
  }
}

.edu-line {
  margin: 0;
  max-width: 36rem;
  font-weight: 600;
}

.sheet-index,
.sheet-items {
  list-style: none;
  margin: 0.8rem 0 0;
  padding: 0;
}

.sheet-index li,
.sheet-items li {
  border-top: 2px solid currentColor;
}

.sheet-index a,
.sheet-links a {
  display: inline-flex;
  align-items: center;
  min-height: 2.75rem;
  font-family: "Oswald", "Arial Narrow", Impact, sans-serif;
  font-weight: 700;
  letter-spacing: 0.03em;
  text-transform: uppercase;
  text-decoration: underline;
  text-underline-offset: 0.18em;
}

.sheet-items li {
  padding: 0.7rem 0;
}

.sheet-links {
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  margin-top: 1rem;
}

.footer-groups {
  display: grid;
  gap: 1.25rem;
}

.footer-groups h2 {
  font-size: 1.15rem;
  margin-bottom: 0.2rem;
}

.footer-control {
  background: transparent;
  color: var(--paper);
  border: 0;
  padding: 0;
  min-height: 2.75rem;
  font: inherit;
  text-align: left;
  text-decoration: underline;
  text-underline-offset: 0.2em;
  cursor: pointer;
}

.consent-banner {
  position: fixed;
  left: 0;
  right: 0;
  bottom: 0;
  z-index: 30;
  max-height: 85vh;
  overflow: auto;
  background: var(--paper);
  color: var(--ink);
  border-top: 4px solid var(--ink);
  padding: 1rem 0 1.25rem;
}

.consent-banner[hidden] {
  display: none;
}

body.consent-open {
  padding-bottom: 14rem;
}

.consent-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 0.5rem;
  margin-top: 0.85rem;
}

.cta-reject {
  background: var(--paper);
  color: var(--ink);
}

.cta-reject:hover {
  background: var(--paper-2);
}

.cta-customize {
  background: var(--blue);
  color: var(--paper);
  border-color: var(--ink);
}

.cta-customize:hover {
  background: #163864;
}

.consent-close {
  color: var(--ink);
  background: transparent;
}

.consent-panel {
  margin-top: 0.9rem;
  max-width: 36rem;
}

.consent-panel[hidden] {
  display: none;
}

.consent-panel fieldset {
  margin: 0;
  padding: 0.75rem 0 0;
  border: 0;
}

.consent-panel legend {
  font-size: 1.4rem;
  padding: 0;
}

.consent-row {
  display: flex;
  gap: 0.75rem;
  align-items: center;
  min-height: 2.75rem;
  border-top: 2px solid var(--ink);
  padding: 0.45rem 0;
  cursor: pointer;
}

.consent-row input {
  width: 1.25rem;
  height: 1.25rem;
  margin: 0;
  accent-color: var(--ink);
}

.consent-row input:disabled {
  cursor: not-allowed;
}

@media (min-width: 768px) {
  .footer-grid {
    grid-template-columns: 1fr;
  }

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

  body.consent-open {
    padding-bottom: 11rem;
  }
}

@media (min-width: 1024px) {
  .footer-groups {
    grid-template-columns: repeat(4, 1fr);
  }
}

@media (prefers-reduced-motion: reduce) {
  .cta:active,
  .item:active {
    transform: none;
  }
}
