/* oversight.study: The AI Oversight Study. Self-hosted type, two images, no trackers. */

@font-face {
  font-family: "Inter";
  font-style: normal;
  font-weight: 400 600;
  font-display: swap;
  src: url("/assets/fonts/inter.woff2") format("woff2");
}
@font-face {
  font-family: "Source Serif 4";
  font-style: normal;
  font-weight: 400 500;
  font-display: swap;
  src: url("/assets/fonts/source-serif-4.woff2") format("woff2");
}
@font-face {
  font-family: "Source Serif 4";
  font-style: italic;
  font-weight: 400;
  font-display: swap;
  src: url("/assets/fonts/source-serif-4-italic.woff2") format("woff2");
}

:root {
  --paper: #f4eee2;
  --paper-deep: #ebe2d0;
  --card: #fbf7ef;
  --ink: #17130e;
  --ink-soft: #3b3228;
  --dim: #7b6e5b;
  --rule: #d4c8b0;
  --night: #1c1916;
  --shade: #120d09;
  --night-ink: #ede7dc;
  --night-dim: rgba(237, 231, 220, 0.66);
  --copper: #a35f26;
  --copper-deep: #8a4f1e;
  --copper-light: #e0a15e;
  --serif: "Source Serif 4", "Iowan Old Style", Georgia, serif;
  --sans: "Inter", system-ui, -apple-system, "Segoe UI", sans-serif;
  --measure: 40rem;
  --wide: 68rem;
  --gutter: clamp(1.25rem, 5vw, 3rem);
  --icon-copy: url("data:image/svg+xml,<svg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='black' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'><rect width='14' height='14' x='8' y='8' rx='2' ry='2'/><path d='M4 16c-1.1 0-2-.9-2-2V4c0-1.1.9-2 2-2h10c1.1 0 2 .9 2 2'/></svg>");
  --icon-done: url("data:image/svg+xml,<svg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='black' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'><path d='M20 6 9 17l-5-5'/></svg>");
}

/* ── Base ── */
* {
  box-sizing: border-box;
}
html {
  background: var(--paper);
  color: var(--ink-soft);
  font-family: var(--sans);
  font-size: 17px;
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
}
body {
  margin: 0;
}
a {
  color: var(--copper);
  text-decoration-thickness: 1px;
  text-underline-offset: 0.18em;
}
a:hover {
  color: var(--ink);
}
h1,
h2,
h3 {
  font-family: var(--serif);
  font-weight: 400;
  color: var(--ink);
  letter-spacing: -0.01em;
  line-height: 1.15;
  margin: 0;
}
h2 {
  font-size: clamp(1.7rem, 1.2rem + 1.6vw, 2.4rem);
  margin-bottom: 0.6em;
}
p {
  margin: 0 0 1em;
}

.wrap {
  max-width: var(--wide);
  margin: 0 auto;
  padding: 0 var(--gutter);
}
.prose {
  max-width: var(--measure);
}
.label {
  font-family: var(--sans);
  font-size: 0.72rem;
  font-weight: 500;
  line-height: inherit;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--dim);
  margin: 0 0 1.2em;
}
.small {
  font-size: 0.85rem;
  color: var(--dim);
}
.visually-hidden {
  position: absolute;
  width: 1px;
  height: 1px;
  overflow: hidden;
  clip-path: inset(50%);
  white-space: nowrap;
}
.button {
  display: inline-block;
  background: var(--copper);
  color: #fff8ef;
  padding: 0.8em 1.4em;
  font-weight: 500;
  font-size: 0.95rem;
  text-decoration: none;
  border-radius: 2px;
}
.button:hover {
  background: var(--copper-deep);
  color: #fff8ef;
}
.button--light {
  background: var(--night-ink);
  color: var(--night);
}
.button--light:hover {
  background: #fff;
  color: var(--night);
}

/* ── On dark ground ── */
.hero h1,
.survey h2,
.closing h1,
.closing h2,
.track--org h3 {
  color: var(--night-ink);
}
.wordmark em,
.domain em,
.hero h1 em,
.notice a,
.survey-small a,
.closing a:not(.button) {
  color: var(--copper-light);
}

/* The hero and the closing: a photograph under a shade that keeps the text legible. */
.hero,
.closing {
  position: relative;
  isolation: isolate;
  color: var(--night-ink);
  background: var(--shade) center / cover no-repeat;
}
.hero::after,
.closing::after {
  content: "";
  position: absolute;
  inset: 0;
  z-index: -1;
}

/* ── Masthead ── */
.masthead {
  position: absolute;
  inset: 0 0 auto;
  z-index: 2;
}
.masthead .wrap {
  display: flex;
  justify-content: space-between;
  align-items: baseline;
  padding-top: 1.4rem;
  font-size: 0.8rem;
  color: var(--night-dim);
}
.wordmark {
  font-family: var(--serif);
  font-size: 1.05rem;
  color: var(--night-ink);
  text-decoration: none;
}
.wordmark:hover {
  color: var(--night-ink);
}

/* ── Hero ── the lifted page, with the study's name in its shadow. At least one
   screen, and exactly one wherever the content fits: the type scales with the
   screen's height as well as its width. */
.hero {
  min-height: 100svh;
  padding-top: clamp(3.25rem, 10svh, 4.5rem);
  display: flex;
  align-items: flex-end;
  background-image: url("/assets/img/page.webp");
  background-position: 38% 50%;
}
.hero::after {
  background:
    linear-gradient(90deg, rgba(14, 9, 5, 0.82) 0%, rgba(14, 9, 5, 0.6) 38%, rgba(14, 9, 5, 0.12) 64%, rgba(14, 9, 5, 0) 78%),
    linear-gradient(0deg, rgba(14, 9, 5, 0.6) 0%, rgba(14, 9, 5, 0) 45%);
}
.hero .wrap {
  width: 100%;
  padding-bottom: clamp(1.5rem, 8vh, 6rem);
}
.hero h1 {
  font-size: clamp(2rem, min(1.4rem + 4.6vw, 8.4svh), 5.2rem);
  line-height: 1.02;
  max-width: 8.5em;
  margin-bottom: 0.35em;
}
.hero .lede {
  font-family: var(--serif);
  font-size: clamp(1rem, min(1rem + 0.6vw, 2.9svh), 1.45rem);
  line-height: 1.4;
  max-width: 21em;
  margin-bottom: min(1.6em, 3svh);
}
/* Shown only when an invitation link set the group. */
.notice {
  border-left: 2px solid var(--copper-light);
  padding: 0.6em 0 0.6em 1em;
  margin: 0 0 min(1.6em, 3svh);
  font-size: clamp(0.82rem, 1.9svh, 0.92rem);
  max-width: 34em;
}
.hero-why {
  font-size: clamp(0.88rem, 2.1svh, 1rem);
  line-height: 1.55;
  color: var(--night-dim);
  max-width: 30em;
  margin: 0 0 min(1.8em, 3.5svh);
}
.hero-actions {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 1rem 1.8rem;
}
.quiet-link {
  color: var(--night-ink);
  font-size: 0.92rem;
}
.quiet-link:hover {
  color: var(--copper-light);
}

/* ── Sections ── */
.section {
  padding: clamp(4rem, 10vh, 7rem) 0;
  border-top: 1px solid var(--rule);
}
.cols {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(0, 1.6fr);
  column-gap: clamp(2rem, 6vw, 5rem);
  align-items: start;
}
.questions {
  list-style: none;
  padding: 0;
  margin: 0 0 1.4em;
  font-family: var(--serif);
  font-style: italic;
  font-size: 1.3rem;
  line-height: 1.45;
  color: var(--ink);
}
.questions li {
  padding: 0.35em 0;
  border-bottom: 1px solid var(--rule);
}
.roles {
  columns: 2;
  column-gap: 2rem;
  padding-left: 1.1em;
  margin: 0 0 1em;
}
.signature {
  display: flex;
  align-items: center;
  gap: 1rem;
  margin-top: 1.8em;
  font-family: var(--serif);
  font-style: italic;
  color: var(--ink);
}
.signature p {
  margin: 0;
}
.signature a {
  color: var(--ink);
}
.signature-role {
  display: block;
  font-family: var(--sans);
  font-style: normal;
  font-size: 0.82rem;
  color: var(--dim);
}
/* The portrait is toned into the page's palette, so a photo taken anywhere reads as part of it. */
.signature img {
  width: 64px;
  height: 64px;
  border-radius: 50%;
  object-fit: cover;
  filter: grayscale(1) sepia(0.35) contrast(1.05);
}

/* ── Two ways to take part ── two offers side by side, their rows aligned like
   price columns. */
.tracks {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 1.5rem;
  margin-top: 0.5rem;
}
.track {
  display: grid;
  grid-row: span 6;
  grid-template-rows: subgrid;
  row-gap: 0;
  justify-items: start;
  padding: 2.2rem 2.2rem 2rem;
  border: 1px solid var(--rule);
  background: var(--card);
}
.track h3 {
  font-size: 1.7rem;
  margin-bottom: 0.5em;
}
.track ul {
  padding-left: 1.1em;
  margin: 0 0 1.8em;
}
.track li + li {
  margin-top: 0.35em;
}
.track-label {
  color: var(--copper);
  margin-bottom: 1em;
}
.track--org {
  background: var(--night);
  border-color: var(--night);
  color: var(--night-dim);
}
.track--org .track-label {
  color: var(--copper-light);
}
.track-notes {
  font-size: 0.82rem;
}
.track-notes p {
  margin: 0.9em 0 0;
}

/* ── The survey ── a dark band, because the form itself is dark. */
.survey {
  background: var(--night);
  color: var(--night-dim);
  padding: clamp(4rem, 10vh, 6rem) 0;
}
.survey .label {
  color: var(--night-dim);
}
.survey-lede {
  font-family: var(--serif);
  font-size: clamp(1.1rem, 1rem + 0.4vw, 1.3rem);
  line-height: 1.45;
  color: var(--night-ink);
  max-width: 32em;
}
.survey-small {
  color: var(--night-dim);
  max-width: 40em;
}
.survey .frame {
  max-width: 46rem;
  margin: 2rem 0 0;
}
.survey iframe {
  display: block;
  width: 100%;
  border: 0;
}

/* ── Closing ── the dictionary entry, and the address to pass on. */
.closing {
  background-image: url("/assets/img/light.webp");
  background-position: 60% 50%;
  padding: clamp(6rem, 18vh, 10rem) 0;
}
.closing::after {
  background: linear-gradient(90deg, rgba(14, 9, 5, 0.78) 0%, rgba(14, 9, 5, 0.3) 60%, rgba(14, 9, 5, 0.1) 100%);
}
.closing p {
  color: var(--night-dim);
  max-width: 32em;
}
.entry-word {
  font-size: clamp(3.2rem, 2rem + 6vw, 6.5rem);
  line-height: 1;
  letter-spacing: -0.02em;
  margin: 0;
}
.entry-pos {
  font-family: var(--serif);
  font-style: italic;
  margin: 0.4em 0 1em;
}
.entry-senses {
  font-family: var(--serif);
  font-size: clamp(1.15rem, 1rem + 0.5vw, 1.4rem);
  line-height: 1.45;
  padding-left: 1.3em;
  margin: 0 0 1.6em;
  max-width: 28em;
}
.entry-gloss {
  font-size: 1rem;
}
.entry-share {
  margin-top: 2.4em;
  font-size: 0.95rem;
}
/* The 404: the same entry, at sense 2, a full screen. */
.not-found {
  min-height: 100svh;
  display: flex;
  align-items: center;
}
.not-found .wrap {
  width: 100%;
}
.not-found .button {
  margin-top: 0.4em;
}

.domain {
  font-family: var(--serif);
  font-size: 1.35rem;
  text-decoration: none;
  margin-left: 0.2em;
}

/* ── Footer ── */
footer {
  padding: 2.4rem 0 3rem;
  font-size: 0.82rem;
  color: var(--dim);
}
footer .wrap {
  display: flex;
  flex-wrap: wrap;
  justify-content: space-between;
  gap: 1rem;
}
footer nav {
  display: flex;
  flex-wrap: wrap;
  gap: 0.4em 1.4em;
}
footer nav a {
  color: var(--dim);
}

/* ── Addresses to copy, not follow ── */
.copy-button {
  appearance: none;
  background: none;
  border: 0;
  padding: 0;
  font: inherit;
  color: inherit;
  cursor: pointer;
  user-select: all;
  transition: color 0.15s ease;
}
.copy-button::after {
  content: "";
  display: inline-block;
  width: 0.95em;
  height: 0.95em;
  margin-left: 0.4em;
  vertical-align: -0.12em;
  background: currentColor;
  mask: var(--icon-copy) center / contain no-repeat;
  opacity: 0.55;
  transition: opacity 0.15s ease;
}
.copy-button[data-copied]::after {
  mask-image: var(--icon-done);
}
.copy-button:hover,
.copy-button:focus-visible {
  color: var(--copper);
}
.track--org .copy-button:hover,
.track--org .copy-button:focus-visible {
  color: var(--copper-light);
}
.copy-button:hover::after,
.copy-button:focus-visible::after,
.copy-button[data-copied]::after {
  opacity: 1;
}

/* ── Legal pages ── */
.legal .masthead {
  position: static;
  background: var(--night);
}
.legal .masthead .wrap {
  padding-bottom: 1.4rem;
}
.legal main {
  padding-top: 3.5rem;
  padding-bottom: 4rem;
}
.legal h1 {
  font-size: clamp(2.2rem, 1.6rem + 2vw, 3rem);
  margin-bottom: 0.3em;
}
.legal h2 {
  font-size: 1.35rem;
  margin: 2.2em 0 0.5em;
}
.legal .meta {
  color: var(--dim);
  font-size: 0.9rem;
  margin-bottom: 2.4em;
}
.legal ul {
  padding-left: 1.2em;
}
.legal li {
  margin-bottom: 0.5em;
}
.legal code {
  font-size: 0.9em;
  background: var(--paper-deep);
  padding: 0.05em 0.35em;
  border-radius: 2px;
}

/* ── Narrow screens ── */
@media (max-width: 760px) {
  .cols {
    grid-template-columns: 1fr;
    row-gap: 1.6rem;
  }
  .roles {
    columns: 1;
  }
  .tracks {
    grid-template-columns: 1fr;
  }
  .track {
    padding: 1.6rem;
  }
  .hero {
    background-position: 30% 40%;
  }
  .hero::after {
    background: linear-gradient(0deg, rgba(14, 9, 5, 0.86) 0%, rgba(14, 9, 5, 0.6) 55%, rgba(14, 9, 5, 0.2) 100%);
  }
  .masthead .when {
    display: none;
  }
}

/* Short, wide screens (a phone on its side): the lines run long so the hero
   keeps to one screen. */
@media (max-height: 520px) and (min-width: 560px) {
  .hero h1,
  .hero .lede,
  .hero-why,
  .notice {
    max-width: none;
  }
  .notice {
    padding-top: 0.3em;
    padding-bottom: 0.3em;
  }
  .hero .wrap {
    padding-bottom: 1rem;
  }
  .hero .lede,
  .hero-why,
  .notice {
    margin-bottom: 0.7em;
  }
}

/* Small phones: tighter spacing keeps the hero, notice included, to one screen. */
@media (max-width: 480px) and (max-height: 700px) {
  .hero .wrap {
    padding-bottom: 1.1rem;
  }
  .notice {
    padding-top: 0.4em;
    padding-bottom: 0.4em;
  }
  .hero .lede,
  .hero-why,
  .notice {
    margin-bottom: 0.8em;
  }
  .hero-actions {
    gap: 0.8rem 1.8rem;
  }
}
