:root {
  --steel: #34503F;
  --steel-deep: #243A2E;
  --paper: #EDF0EA;
  --sheet: #FBFBF7;
  --ink: #1F3027;
  --ink-soft: #4A5B51;
  --manila: #E2C46A;
  --stamp: #AE2F26;
  --rule: rgba(31, 48, 39, 0.16);

  --display: "Big Shoulders Display", "Arial Narrow", "Roboto Condensed", "Helvetica Neue", sans-serif;
  --serif: "Source Serif 4", "Iowan Old Style", "Charter", Georgia, serif;

  --gutter: clamp(16px, 4vw, 48px);
  --frame: 1240px;
  color-scheme: light;
}

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

html { -webkit-text-size-adjust: 100%; }

body {
  margin: 0;
  background: var(--paper);
  color: var(--ink);
  font-family: var(--serif);
  font-size: 1.125rem;
  line-height: 1.62;
  font-optical-sizing: auto;
  text-rendering: optimizeLegibility;
  min-height: 100vh;
  display: flex;
  flex-direction: column;
}

main { flex: 1 0 auto; }

h1, h2, h3 {
  font-family: var(--display);
  font-weight: 800;
  line-height: 0.95;
  letter-spacing: 0.005em;
  margin: 0;
  text-wrap: balance;
}

p { margin: 0 0 1em; }
p:last-child { margin-bottom: 0; }

a { color: var(--steel); text-decoration-thickness: 1px; text-underline-offset: 0.18em; }
a:hover { color: var(--ink); text-decoration-thickness: 2px; }

:focus-visible {
  outline: 3px solid var(--stamp);
  outline-offset: 3px;
  border-radius: 2px;
}

.skip {
  position: absolute;
  left: var(--gutter);
  top: -100px;
  background: var(--ink);
  color: var(--sheet);
  padding: 0.5em 0.9em;
  z-index: 10;
}
.skip:focus { top: 12px; }

.visually-hidden {
  position: absolute; width: 1px; height: 1px; overflow: hidden;
  clip: rect(0 0 0 0); white-space: nowrap;
}

.frame {
  width: 100%;
  max-width: calc(var(--frame) + 2 * var(--gutter));
  margin-inline: auto;
  padding-inline: var(--gutter);
}

/* Masthead */

.masthead {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem 2rem;
  flex-wrap: wrap;
  padding-block: 22px;
}

.wordmark {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  color: var(--ink);
  text-decoration: none;
}
.wordmark-glyph { width: 30px; height: 30px; }
.wordmark-name {
  font-family: var(--display);
  font-weight: 800;
  font-size: 1.9rem;
  line-height: 1;
}

.nav {
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  gap: 0.4rem 1.6rem;
  font-size: 1rem;
}
.nav a { color: var(--ink); text-decoration: none; }
.nav a:hover { text-decoration: underline; }
.nav .nav-invite {
  font-family: var(--display);
  font-weight: 700;
  font-size: 1.15rem;
  background: var(--manila);
  padding: 0.28em 0.75em 0.32em;
  border-radius: 3px;
}
.nav .nav-invite:hover { text-decoration: none; background: #D8B752; }

/* Buttons */

.button {
  display: inline-block;
  font-family: var(--display);
  font-weight: 700;
  font-size: 1.45rem;
  line-height: 1;
  color: var(--sheet);
  background: var(--steel);
  text-decoration: none;
  padding: 0.62em 1em 0.68em;
  border-radius: 4px;
  box-shadow: inset 0 -3px 0 var(--steel-deep);
}
.button:hover { color: var(--sheet); background: var(--steel-deep); }

/* Hero */

.hero {
  display: grid;
  grid-template-columns: minmax(0, 0.78fr) minmax(0, 1.22fr);
  gap: clamp(2rem, 4vw, 4rem) clamp(2rem, 5vw, 5rem);
  align-items: start;
  padding-block: clamp(1.5rem, 4vw, 3.5rem) clamp(3.5rem, 8vw, 7rem);
}

.hero h1 {
  grid-column: 1 / -1;
  font-size: clamp(3.4rem, 9.6vw, 9.4rem);
  line-height: 0.86;
  color: var(--ink);
}
.hero h1 span { display: block; }

.hero-text { padding-top: clamp(0rem, 1vw, 0.6rem); }

.lede {
  margin-top: 0;
  font-size: clamp(1.15rem, 1.6vw, 1.32rem);
  max-width: 34em;
}

.hero-actions {
  margin-top: 2rem;
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 0.9rem 1.4rem;
}
.hero-note {
  font-size: 0.98rem;
  color: var(--ink-soft);
  max-width: 22em;
  line-height: 1.45;
}

/* The sorting case */

.cabinet-wrap { margin: 0; }

.cabinet {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: clamp(8px, 1.1vw, 14px);
  padding: clamp(10px, 1.4vw, 18px);
  background:
    linear-gradient(180deg, rgba(255, 255, 255, 0.06), rgba(0, 0, 0, 0.05)),
    var(--steel);
  border-radius: 6px;
  box-shadow:
    0 1px 0 rgba(255, 255, 255, 0.25) inset,
    0 30px 50px -30px rgba(36, 58, 46, 0.55),
    0 2px 0 var(--steel-deep);
}

.hole {
  display: flex;
  flex-direction: column;
  gap: 6px;
}

.mouth {
  position: relative;
  aspect-ratio: 5 / 4;
  background: var(--steel-deep);
  border-radius: 2px;
  overflow: hidden;
  box-shadow: inset 0 10px 14px -6px rgba(0, 0, 0, 0.55), inset 0 -1px 0 rgba(255, 255, 255, 0.08);
}

.plate {
  display: block;
  font-family: var(--display);
  font-weight: 700;
  font-size: clamp(0.72rem, 1.05vw, 0.95rem);
  line-height: 1.15;
  color: var(--ink);
  background: var(--manila);
  padding: 3px 6px 4px;
  border-radius: 1px;
  box-shadow: inset 0 -1px 0 rgba(0, 0, 0, 0.12);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.slip {
  position: absolute;
  left: 9%;
  right: 9%;
  bottom: -8%;
  height: 78%;
  background: var(--sheet);
  color: var(--ink);
  padding: 7% 8%;
  border-radius: 1px;
  font-size: clamp(0.5rem, 0.78vw, 0.72rem);
  line-height: 1.3;
  box-shadow: 0 -2px 6px rgba(0, 0, 0, 0.25);
  transform: rotate(-1.5deg);
}
.slip b {
  display: block;
  font-family: var(--display);
  font-weight: 700;
  font-size: 1.18em;
  margin-bottom: 0.2em;
}
.slip span { display: block; color: var(--ink-soft); }
.slip-2 { transform: rotate(1.2deg); }
.slip-3 { transform: rotate(-0.6deg); }
.slip-4 { transform: rotate(1.8deg); }
.slip-rest { transform: rotate(0.8deg); bottom: -14%; }

.stamp {
  position: absolute;
  right: 6%;
  top: 8%;
  font-style: normal;
  font-family: var(--display);
  font-weight: 800;
  font-size: 1.5em;
  line-height: 1;
  color: var(--stamp);
  border: 2px solid var(--stamp);
  border-radius: 3px;
  padding: 0.12em 0.3em 0.16em;
  transform: rotate(-12deg);
  mix-blend-mode: multiply;
  opacity: 0.9;
}

.empty-note {
  position: absolute;
  inset: 0;
  display: grid;
  place-items: center;
  font-family: var(--display);
  font-weight: 600;
  font-size: clamp(0.62rem, 0.9vw, 0.85rem);
  color: rgba(237, 240, 234, 0.55);
}

.cabinet-wrap figcaption {
  margin-top: 0.9rem;
  font-size: 0.95rem;
  font-style: italic;
  color: var(--ink-soft);
}

@media (prefers-reduced-motion: no-preference) {
  .slip-1, .slip-2, .slip-3, .slip-4 {
    animation: drop 0.62s cubic-bezier(0.3, 1.3, 0.55, 1) both;
  }
  .slip-1 { animation-delay: 0.35s; --r: -1.5deg; }
  .slip-2 { animation-delay: 0.7s; --r: 1.2deg; }
  .slip-3 { animation-delay: 1.05s; --r: -0.6deg; }
  .slip-4 { animation-delay: 1.4s; --r: 1.8deg; }
  .stamp { animation: stamp 0.32s cubic-bezier(0.2, 0.9, 0.3, 1.2) 2.15s both; }
}

@keyframes drop {
  from { transform: translateY(-135%) rotate(var(--r)); }
  to { transform: translateY(0) rotate(var(--r)); }
}

@keyframes stamp {
  from { opacity: 0; transform: rotate(-12deg) scale(1.9); }
  to { opacity: 0.9; transform: rotate(-12deg) scale(1); }
}

/* Section heads */

.section-head {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(0, 1fr);
  gap: 1rem clamp(2rem, 5vw, 5rem);
  align-items: end;
  margin-bottom: clamp(2rem, 4vw, 3.2rem);
}
.section-head h2 {
  font-size: clamp(2.5rem, 4.8vw, 4rem);
  max-width: 17ch;
}
.section-head p { max-width: 34em; color: var(--ink-soft); }

/* Ways in */

.ways { padding-block: clamp(3rem, 6vw, 5rem); }

.way {
  display: grid;
  grid-template-columns: minmax(0, 0.95fr) minmax(0, 1fr) minmax(0, 0.8fr);
  gap: 1.2rem clamp(1.5rem, 3.5vw, 3.5rem);
  align-items: center;
  padding-block: clamp(1.8rem, 3.2vw, 2.6rem);
  border-top: 2px solid var(--steel);
}
.way:last-child { border-bottom: 2px solid var(--steel); }

.way-say h3 { font-size: clamp(2rem, 3.2vw, 2.7rem); margin-bottom: 0.45rem; }
.way-say p { max-width: 30em; }

.address {
  display: inline-block;
  font-family: var(--display);
  font-weight: 700;
  font-size: 1.05rem;
  background: var(--manila);
  padding: 2px 8px 3px;
  margin: 0 0 0.6rem;
  border-radius: 1px;
  overflow-wrap: anywhere;
}

.paper {
  background: var(--sheet);
  padding: 1rem 1.15rem 1.1rem;
  border-radius: 2px;
  box-shadow: 0 1px 0 rgba(31, 48, 39, 0.12), 0 12px 22px -16px rgba(31, 48, 39, 0.45);
  background-image: linear-gradient(transparent calc(1.55em - 1px), rgba(95, 140, 170, 0.22) 1px);
  background-size: 100% 1.55em;
  background-position: 0 1rem;
  line-height: 1.55;
  font-size: 1rem;
  transform: rotate(-0.4deg);
}
.way:nth-of-type(even) .paper { transform: rotate(0.5deg); }
.paper-head { font-weight: 600; margin-bottom: 0; }

.docket {
  font-size: 0.98rem;
  line-height: 1.5;
  color: var(--ink-soft);
  border-left: 4px solid var(--manila);
  padding-left: 0.9rem;
}
.docket span {
  display: block;
  font-family: var(--display);
  font-weight: 800;
  font-size: 1.45rem;
  line-height: 1.05;
  color: var(--ink);
  margin-bottom: 0.3rem;
}

/* Finding */

.finding {
  background: var(--steel);
  color: var(--sheet);
  padding-block: clamp(3.5rem, 7vw, 6rem);
}
.finding-inner {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(0, 1.05fr);
  gap: clamp(2rem, 5vw, 5rem);
  align-items: start;
}
.finding h2 {
  font-size: clamp(2.5rem, 4.8vw, 4rem);
  max-width: 12ch;
  margin-bottom: 1.4rem;
}
.finding-text p { max-width: 32em; color: rgba(251, 251, 247, 0.9); }

.search {
  background: var(--sheet);
  color: var(--ink);
  border-radius: 4px;
  padding: clamp(1rem, 2.4vw, 1.6rem);
  box-shadow: 0 30px 50px -30px rgba(0, 0, 0, 0.6);
}
.search-box {
  font-size: 1.1rem;
  padding: 0.7rem 0.9rem;
  border: 2px solid var(--steel);
  border-radius: 3px;
  margin-bottom: 1.1rem;
  overflow-wrap: anywhere;
}
.caret {
  display: inline-block;
  width: 2px;
  height: 1.1em;
  margin-left: 2px;
  vertical-align: -0.18em;
  background: var(--stamp);
}
@media (prefers-reduced-motion: no-preference) {
  .caret { animation: blink 1.1s steps(1) infinite; }
}
@keyframes blink { 50% { opacity: 0; } }

.results { list-style: none; margin: 0; padding: 0; }
.results li { padding: 0.85rem 0.2rem; border-top: 1px solid var(--rule); }
.result-title { font-weight: 600; margin: 0; }
.result-meta { font-size: 0.92rem; color: var(--ink-soft); margin: 0.1rem 0 0; }

/* Promises */

.promises {
  display: grid;
  grid-template-columns: minmax(0, 0.8fr) minmax(0, 1.2fr);
  gap: 2rem clamp(2rem, 5vw, 5rem);
  align-items: start;
  padding-block: clamp(3.5rem, 7vw, 6rem) clamp(2rem, 4vw, 3rem);
}
.promises .section-head { display: block; margin: 0; }
.promises .section-head h2 { margin-bottom: 1rem; }
@media (min-width: 961px) {
  .promises .section-head { position: sticky; top: 2rem; }
}

.promise-list {
  display: grid;
  grid-template-columns: minmax(0, 1fr);
  gap: 1.8rem;
  margin: 0;
}
.promise-list div { border-top: 2px solid var(--steel); padding-top: 1rem; }
.promise-list dt {
  font-family: var(--display);
  font-weight: 800;
  font-size: clamp(1.6rem, 2.4vw, 2.05rem);
  line-height: 1;
  margin-bottom: 0.55rem;
}
.promise-list dd { margin: 0; max-width: 32em; }

/* Status */

.status { padding-block: clamp(3rem, 6vw, 5rem) clamp(4rem, 8vw, 7rem); }

.order {
  list-style: none;
  margin: 0 0 clamp(2.5rem, 5vw, 3.5rem);
  padding: 0;
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 1rem clamp(1rem, 3vw, 2.5rem);
}
.order li {
  background: var(--sheet);
  padding: 1rem 1.1rem 1.2rem;
  border-top: 6px solid var(--manila);
  border-radius: 2px;
}
.order li:first-child { border-top-color: var(--steel); }
.order span {
  display: block;
  font-family: var(--display);
  font-weight: 800;
  font-size: 1.6rem;
  line-height: 1;
  margin-bottom: 0.4rem;
}

.invite {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 1.2rem 2rem;
  padding: clamp(1.4rem, 3vw, 2rem);
  border: 2px dashed var(--steel);
  border-radius: 4px;
}
.invite p { max-width: 34em; margin: 0; font-size: 1.2rem; }

/* Footer */

.footer {
  background: var(--steel-deep);
  color: rgba(251, 251, 247, 0.86);
  font-size: 0.98rem;
  padding-block: 2.2rem;
}
.footer-inner {
  display: flex;
  flex-wrap: wrap;
  align-items: baseline;
  justify-content: space-between;
  gap: 0.8rem 2rem;
}
.footer p { margin: 0; }
.footer nav { display: flex; flex-wrap: wrap; gap: 0.4rem 1.4rem; }
.footer a { color: var(--sheet); }
.footer a:hover { color: var(--manila); }
.footer :focus-visible { outline-color: var(--manila); }
.footer-small { width: 100%; font-size: 0.88rem; color: rgba(251, 251, 247, 0.62); }

/* Document pages: privacy, terms, deletion, bot */

.doc {
  max-width: calc(42rem + 2 * var(--gutter));
  margin-inline: auto;
  padding-inline: var(--gutter);
  padding-block: clamp(2rem, 5vw, 4rem) clamp(4rem, 8vw, 6rem);
}
.doc h1 {
  font-size: clamp(3rem, 7vw, 4.8rem);
  margin-bottom: 1.2rem;
}
.doc h2 {
  font-size: clamp(1.8rem, 3.4vw, 2.3rem);
  margin: 2.6rem 0 0.8rem;
  padding-top: 0.9rem;
  border-top: 2px solid var(--steel);
}
.doc h3 {
  font-size: 1.45rem;
  margin: 1.6rem 0 0.4rem;
}
.doc ul, .doc ol { padding-left: 1.3em; margin: 0 0 1em; }
.doc li { margin-bottom: 0.4em; }
.doc .intro { font-size: 1.22rem; }
.doc .meta { color: var(--ink-soft); font-size: 0.98rem; }

.draft {
  display: flex;
  align-items: center;
  gap: 1rem;
  margin: 0 0 2rem;
  padding: 0.9rem 1rem;
  background: var(--sheet);
  border-left: 5px solid var(--stamp);
}
.draft-stamp {
  flex: none;
  font-family: var(--display);
  font-weight: 800;
  font-size: 1.7rem;
  line-height: 1;
  color: var(--stamp);
  border: 2.5px solid var(--stamp);
  border-radius: 3px;
  padding: 0.1em 0.35em 0.14em;
  transform: rotate(-6deg);
}
.draft p { margin: 0; font-size: 1rem; }

.table-wrap { overflow-x: auto; margin: 0 0 1.2em; }
.doc table { width: 100%; border-collapse: collapse; font-size: 0.98rem; min-width: 34rem; }
.doc th, .doc td { text-align: left; vertical-align: top; padding: 0.6rem 0.7rem 0.6rem 0; border-top: 1px solid var(--rule); }
.doc th { font-family: var(--display); font-weight: 700; font-size: 1.12rem; border-top: 2px solid var(--steel); }

.code {
  font-family: ui-monospace, "SF Mono", Menlo, Consolas, monospace;
  font-size: 0.92rem;
  background: var(--sheet);
  padding: 0.7rem 0.9rem;
  border-radius: 3px;
  overflow-wrap: anywhere;
}

/* Not found */

.lost {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(0, 18rem);
  gap: 2rem 4rem;
  align-items: center;
  padding-block: clamp(3rem, 8vw, 7rem);
}
.lost h1 { font-size: clamp(3.2rem, 8vw, 6rem); max-width: 10ch; margin-bottom: 1.2rem; }
.lost .hole { max-width: 18rem; }
.lost .plate { font-size: 1.1rem; }
.lost .mouth { padding: 0; }

/* Narrow screens */

@media (max-width: 960px) {
  .hero, .finding-inner, .section-head, .lost, .promises { grid-template-columns: minmax(0, 1fr); }
  .hero { padding-top: 1rem; }
  .cabinet-wrap { order: 1; }
  .hero-text { order: 2; }
  .hero h1 span { display: inline; }
  .way { grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); }
  .way-say { grid-column: 1 / -1; }
  .section-head { align-items: start; }
}

@media (max-width: 640px) {
  body { font-size: 1.0625rem; }
  .nav { gap: 0.3rem 1.1rem; font-size: 0.95rem; }
  .nav a:not(.nav-invite) { display: none; }
  .way { grid-template-columns: minmax(0, 1fr); }
  .order { grid-template-columns: minmax(0, 1fr); }
  .slip { font-size: 0.5rem; padding: 6% 7%; }
  .slip span { display: none; }
  .stamp { font-size: 1.25em; }
  .plate { font-size: 0.68rem; padding: 2px 4px 3px; }
  .invite .button { width: 100%; text-align: center; }
  .lost .hole { max-width: 12rem; }
}
