@font-face {
  font-family: "Space Grotesk";
  src: url("/fonts/SpaceGrotesk-600.woff") format("woff");
  font-style: normal;
  font-weight: 600;
  font-display: swap;
}
@font-face {
  font-family: "Hanken Grotesk";
  src: url("/fonts/HankenGrotesk-400.woff") format("woff");
  font-style: normal;
  font-weight: 400;
  font-display: swap;
}
@font-face {
  font-family: "IBM Plex Mono";
  src: url("/fonts/IBMPlexMono.woff") format("woff");
  font-style: normal;
  font-weight: 400;
  font-display: swap;
}
:root {
  color-scheme: dark;
  --ink: #0e1417;
  --paper: #f5f7f7;
  --lime: #3de08a;
  --text: #eaf2f0;
  --muted: #a6b4b6;
  --line: #344145;
  --display: "Space Grotesk", system-ui, sans-serif;
  --body: "Hanken Grotesk", system-ui, sans-serif;
  --mono: "IBM Plex Mono", ui-monospace, monospace;
}
* {
  box-sizing: border-box;
}
body {
  margin: 0;
  background: var(--ink);
  color: var(--text);
  font: 16px/1.45 var(--body);
}
button,
input {
  font: inherit;
}
button {
  cursor: pointer;
  color: inherit;
  background: transparent;
  border: 1px solid var(--line);
  padding: 10px 16px;
  border-radius: 2px;
}
button:disabled {
  opacity: 0.35;
  cursor: default;
}
button:focus-visible,
a:focus-visible,
input:focus-visible {
  outline: 2px solid var(--lime);
  outline-offset: 3px;
}
[hidden] {
  display: none !important;
}
header {
  display: flex;
  align-items: center;
  gap: 24px;
  padding: 12px 28px;
  border-bottom: 1px solid var(--line);
}
.brand {
  font: 600 22px/1 var(--mono);
  letter-spacing: -0.055em;
  white-space: nowrap;
}
.brand > span {
  color: var(--lime);
}
.brand small {
  display: block;
  margin-top: 7px;
  font: 400 9px/1.1 var(--mono);
  letter-spacing: 0.09em;
  text-transform: uppercase;
}
h1,
h2 {
  font-family: var(--display);
  line-height: 1.08;
  letter-spacing: -0.045em;
}
input {
  border: 1px solid #58676b;
  background: #141a1c;
  color: var(--text);
  padding: 12px;
  border-radius: 2px;
}
.eyebrow,
.cover-type {
  font: 400 11px/1.3 var(--mono);
  letter-spacing: 0.1em;
  text-transform: uppercase;
}
.visually-hidden {
  position: absolute;
  width: 1px;
  height: 1px;
  clip-path: inset(50%);
  overflow: hidden;
  white-space: nowrap;
}

.reader {
  display: flex;
  flex-direction: column;
  height: 100vh;
  height: 100dvh;
}
.reader-head {
  flex: none;
  min-height: 58px;
  padding: 9px clamp(14px, 2.2vw, 36px);
  gap: 14px;
  background: var(--ink);
}
.reader-head .brand {
  display: flex;
  align-items: baseline;
  font-size: 21px;
}
.reader-head .brand small {
  margin: 0 0 0 20px;
  color: var(--muted);
  font-size: 9px;
  letter-spacing: 0.105em;
}
.head-links {
  display: flex;
  gap: 8px;
  align-items: center;
  min-width: 0;
}
.head-links:has(> [hidden] + [hidden]) {
  display: none;
}
#title {
  margin-left: auto;
  min-width: 0;
  max-width: 45%;
  color: var(--muted);
  font: 12px/1.3 var(--mono);
  white-space: nowrap;
  text-overflow: ellipsis;
  overflow: hidden;
}
#back,
#back-room {
  font: 12px/1.2 var(--body);
  color: var(--text);
  padding: 9px 12px;
  text-decoration: none;
  border: 1px solid var(--line);
}
#main {
  flex: 1;
  min-height: 0;
  display: flex;
  flex-direction: column;
}
#main:has(#gate:not([hidden])) {
  overflow: auto;
  padding: clamp(20px, 6vh, 80px) clamp(18px, 6vw, 112px);
}
#notice {
  margin: 16px clamp(18px, 3vw, 48px);
  color: var(--muted);
}
#notice button {
  padding: 6px 12px;
  margin-left: 12px;
  font-size: 13px;
}
#notice a {
  color: var(--lime);
}

#gate {
  flex: none;
  display: grid;
  grid-template-columns: minmax(0, 1.25fr) minmax(0, 0.85fr);
  width: min(1180px, 100%);
  min-height: clamp(390px, 57vh, 626px);
  margin: auto;
  border: 1px solid #39474a;
}
.cover {
  isolation: isolate;
  position: relative;
  overflow: hidden;
  padding: clamp(28px, 4.1vw, 65px);
  background: #10211e;
}
#waveform {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  z-index: -1;
  pointer-events: none;
}
.cover-type {
  display: inline-flex;
  align-items: center;
  gap: 11px;
  color: #b1d7c7;
}
.cover-type::before {
  content: "";
  width: 24px;
  height: 2px;
  background: var(--lime);
}
.cover h1 {
  position: relative;
  margin: 0.38em 0 0;
  max-width: 14ch;
  overflow-wrap: anywhere;
  color: #f4faf7;
  font-size: clamp(42px, 5.6vw, 83px);
  font-weight: 600;
  line-height: 0.99;
  letter-spacing: -0.065em;
}
.access {
  color-scheme: light;
  color: #141a1c;
  background: var(--paper);
  display: grid;
  align-items: center;
  padding: clamp(28px, 4vw, 66px);
}
.access-inner {
  max-width: 372px;
  width: 100%;
  margin: 0 auto;
}
.access h2 {
  margin: 0 0 0.55em;
  font-size: clamp(30px, 2.8vw, 44px);
  font-weight: 600;
}
.access p {
  color: #44525a;
  margin: 0 0 30px;
  font-size: 18px;
  line-height: 1.48;
}
.access label {
  display: block;
  margin-bottom: 8px;
  font: 13px/1.3 var(--mono);
}
#email {
  width: 100%;
  height: 50px;
  font-size: 17px;
  padding-inline: 15px;
  background: #fff;
  border-color: #94a5a4;
  color: #141a1c;
}
#email::placeholder {
  color: #657470;
}
#email:focus-visible,
.access button:focus-visible,
#answer button:focus-visible {
  outline-color: #087245;
}
.access button,
#read-paper {
  width: 100%;
  min-height: 50px;
  margin-top: 12px;
  color: #062d1c;
  background: var(--lime);
  border: 1px solid #1cc77a;
  font: 600 16px/1.25 var(--display);
  letter-spacing: -0.02em;
}
#viewer {
  flex: 1;
  min-height: 0;
  display: flex;
  flex-direction: column;
}
#stage {
  flex: 1;
  min-height: 0;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 12px;
  background: #121a1e;
}
#page-box {
  position: relative;
  flex: none;
  max-width: 100%;
  max-height: 100%;
  overflow: hidden;
  background: #141a1c;
  outline: 1px solid #344044;
}
#page-image {
  width: 100%;
  height: 100%;
  display: block;
  user-select: none;
  -webkit-user-drag: none;
}
#links {
  position: absolute;
  inset: 0;
}
#links a {
  position: absolute;
  display: block;
  background: transparent;
  border: 0;
  touch-action: manipulation;
}
#links a:focus-visible {
  outline: 2px solid var(--lime);
  outline-offset: -2px;
}
.reader-tools {
  flex: none;
  display: flex;
  align-items: center;
  gap: clamp(14px, 3vw, 54px);
  min-height: 62px;
  padding: 6px clamp(12px, 2.2vw, 36px) max(6px, env(safe-area-inset-bottom));
  border-top: 1px solid var(--line);
}
#overview-open {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 10px;
  white-space: nowrap;
  font: 14px/1 var(--body);
  padding: 10px 13px;
}
.grid-icon {
  display: inline-block;
  width: 14px;
  height: 14px;
  border: 1.5px solid currentColor;
  position: relative;
}
.grid-icon::before,
.grid-icon::after {
  content: "";
  position: absolute;
  background: currentColor;
}
.grid-icon::before {
  left: 5px;
  inset-block: 0;
  width: 1px;
}
.grid-icon::after {
  top: 5px;
  inset-inline: 0;
  height: 1px;
}
#reading-position {
  appearance: none;
  flex: 1;
  min-width: 10px;
  height: 3px;
  border: 0;
  color: var(--lime);
  background: var(--line);
}
#reading-position::-webkit-progress-bar {
  background: var(--line);
}
#reading-position::-webkit-progress-value {
  background: var(--lime);
}
#reading-position::-moz-progress-bar {
  background: var(--lime);
}
.paging {
  display: flex;
  align-items: center;
  flex: none;
  gap: 6px;
  color: var(--muted);
  font: 13px/1 var(--mono);
}
#prev,
#next,
#overview-close,
#close-answer {
  display: grid;
  place-content: center;
  padding: 0;
  width: 42px;
  height: 42px;
  font: 23px/1 var(--body);
}
#prev,
#next {
  color: var(--text);
  border: 0;
}
#page-number {
  width: 4ch;
  min-width: 35px;
  padding: 7px 3px;
  color: var(--text);
  border: 1px solid var(--line);
  background: #182024;
  appearance: textfield;
  text-align: center;
}
#page-number::-webkit-inner-spin-button,
#page-number::-webkit-outer-spin-button {
  -webkit-appearance: none;
  margin: 0;
}
#page-total {
  min-width: 3ch;
}

#overview {
  color-scheme: dark;
  width: min(860px, calc(100vw - 32px));
  max-height: min(78dvh, 760px);
  padding: 0;
  color: var(--text);
  background: #151f22;
  border: 1px solid #526063;
  overflow: auto;
  overscroll-behavior: contain;
}
#overview::backdrop,
#answer-backdrop {
  background: rgb(3 10 12 / 68%);
}
.overview-top {
  position: sticky;
  top: 0;
  z-index: 1;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  padding: 14px 22px;
  background: #151f22;
  border-bottom: 1px solid var(--line);
}
.overview-top h2 {
  margin: 0;
  font-size: 27px;
}
#overview-close,
#close-answer {
  border: 0;
}
#overview-list {
  padding: 22px;
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(min(155px, 100%), 1fr));
  gap: 18px 15px;
}
.thumb {
  min-width: 0;
  border: 0;
  text-align: left;
  padding: 3px;
  font: 12px/1.3 var(--mono);
}
.thumb img {
  display: block;
  background: #0c1214;
  width: 100%;
  aspect-ratio: 16 / 10;
  object-fit: contain;
  border: 1px solid #526063;
}
.thumb span {
  display: block;
  margin-top: 6px;
  color: var(--muted);
}
.thumb[aria-current="page"] img {
  outline: 2px solid var(--lime);
  outline-offset: 1px;
}
.thumb[aria-current="page"] span {
  color: var(--lime);
}

#answer-backdrop {
  position: fixed;
  inset: 0;
  z-index: 5;
}
#answer {
  position: fixed;
  z-index: 6;
  inset: 0 0 0 auto;
  display: flex;
  flex-direction: column;
  width: min(515px, 90vw);
  color-scheme: light;
  color: #141a1c;
  background: var(--paper);
  border-left: 1px solid #b7c7c1;
}
.answer-top {
  min-height: 62px;
  flex: none;
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 8px 22px 8px 32px;
  border-bottom: 1px solid #cad5d2;
}
.answer-top .eyebrow {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  color: #23513f;
}
.answer-top .eyebrow::before {
  content: "?";
  display: grid;
  place-content: center;
  width: 22px;
  height: 22px;
  border: 1px solid #5e917b;
  font: 13px var(--mono);
}
.answer-body {
  flex: 1;
  min-height: 0;
  overflow-y: auto;
  overscroll-behavior: contain;
  padding: 27px 32px 30px;
}
#claim {
  margin: 0 0 20px;
  color: #14221d;
  font-size: clamp(30px, 2.65vw, 40px);
  font-weight: 600;
  line-height: 1.03;
  overflow-wrap: anywhere;
}
#answer-text {
  margin: 0;
  color: #344640;
  font: 18px/1.54 var(--body);
}
#figure {
  display: block;
  width: 100%;
  height: auto;
  margin: 24px 0 0;
  border: 1px solid #d3dcd8;
  background: white;
}
.citation {
  margin-top: 24px;
  padding-top: 16px;
  border-top: 1px solid #c8d2cf;
}
.citation .eyebrow {
  color: #37584a;
  font-size: 10px;
}
#source {
  margin: 6px 0 0;
  font-size: 14px;
  line-height: 1.42;
  color: #46554f;
}
.answer-actions {
  flex: none;
  padding: 14px 32px max(18px, env(safe-area-inset-bottom));
  border-top: 1px solid #c8d2cf;
}
.answer-actions:has(#read-paper[hidden]) {
  display: none;
}
#read-paper {
  margin: 0;
}
@media (hover: hover) {
  button:hover:not(:disabled),
  #back-room:hover {
    background: #223133;
  }
  .access button:hover:not(:disabled),
  #read-paper:hover {
    background: #2bc97c;
  }
  #close-answer:hover {
    background: #e0e9e5;
  }
  .thumb:hover img {
    border-color: var(--lime);
  }
}
@media (max-width: 780px) {
  .reader-head .brand small {
    display: none;
  }
  #gate {
    grid-template-columns: minmax(0, 1fr) minmax(0, 0.95fr);
  }
  .cover {
    padding: 28px;
  }
  .access {
    padding: 26px;
  }
}
@media (max-width: 600px) {
  .reader-head {
    min-height: 52px;
    padding: 7px 14px;
    gap: 8px;
  }
  .reader-head .brand {
    font-size: 18px;
  }
  #title {
    max-width: 48%;
    font-size: 10px;
  }
  .reader-head:has(.head-links > :not([hidden])) #title {
    display: none;
  }
  .head-links {
    margin-left: auto;
  }
  #back,
  #back-room {
    font-size: 11px;
    padding: 8px;
  }
  #main:has(#gate:not([hidden])) {
    padding: 16px 14px;
  }
  #gate {
    grid-template-columns: 1fr;
    width: min(430px, 100%);
    min-height: 0;
  }
  .cover {
    padding: 23px 25px;
    min-height: clamp(170px, 28dvh, 245px);
  }
  .cover-type {
    font-size: 9px;
  }
  .cover h1 {
    font-size: clamp(37px, 9.7vw, 51px);
    max-width: 15ch;
  }
  .access {
    padding: 24px;
  }
  .access h2 {
    font-size: 29px;
    margin-bottom: 8px;
  }
  .access p {
    font-size: 16px;
    margin-bottom: 18px;
  }
  #stage {
    padding: 0;
  }
  .reader-tools {
    min-height: 54px;
    gap: 14px;
  }
  #overview-open {
    padding: 10px;
    min-height: 42px;
  }
  .paging {
    gap: 3px;
  }
  #overview {
    width: calc(100% - 16px);
    max-height: 82dvh;
  }
  #overview-list {
    padding: 14px;
    gap: 12px;
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
  #answer {
    inset: auto 0 0;
    width: 100%;
    max-height: 88dvh;
    border-left: 0;
    border-top: 3px solid var(--lime);
  }
  .answer-top {
    min-height: 48px;
    padding: 2px 12px 2px 20px;
  }
  .answer-body {
    flex: 0 1 auto;
    padding: 19px 20px 20px;
  }
  #claim {
    font-size: 29px;
    margin-bottom: 14px;
  }
  #answer-text {
    font-size: 17px;
    line-height: 1.43;
  }
  .answer-actions {
    padding: 10px 20px max(12px, env(safe-area-inset-bottom));
  }
}
#page-research {
  display: none;
}
@media (max-width: 600px) and (min-height: 625px) and (orientation: portrait) {
  #viewer:has(#page-research:not([hidden])) #stage {
    flex: 0 0 auto;
    aspect-ratio: var(--slide-ratio);
    width: 100%;
    max-height: 55%;
    margin-top: 16px;
  }
  #page-research {
    display: block;
    flex: 1;
    min-height: 0;
    overflow-y: auto;
    overscroll-behavior: contain;
    padding: 28px 20px 18px;
  }
  #page-research-title {
    margin: 0 0 14px;
    color: var(--muted);
    font: 11px/1.4 var(--mono);
    text-transform: uppercase;
    letter-spacing: 0.09em;
  }
  #page-questions button {
    display: grid;
    grid-template-columns: 1fr auto;
    gap: 12px;
    align-items: center;
    width: 100%;
    min-height: 48px;
    padding: 13px 2px;
    border: 0;
    border-top: 1px solid var(--line);
    border-radius: 0;
    text-align: left;
    color: var(--text);
    font-size: 17px;
    line-height: 1.3;
  }
  #page-questions button::after {
    content: "→";
    color: var(--lime);
    font: 20px var(--mono);
  }
}
@media (prefers-reduced-motion: no-preference) {
  #answer:not([hidden]),
  #overview[open] {
    animation: reveal 0.17s ease-out;
  }
  @keyframes reveal {
    from {
      opacity: 0;
      transform: translateY(5px);
    }
  }
}
@media print {
  body > * {
    display: none !important;
  }
  body::after {
    content: "Printing is unavailable for this document.";
  }
}
