/* Nostradomo LLC — nostradomo.com
   One stylesheet, no build step. Sections: fonts, tokens, base, layout,
   header, home, record specimen, document pages, footer, print. */

/* ---------- Fonts (self-hosted, Latin subset, SIL OFL 1.1) ---------- */

@font-face {
  font-family: "Newsreader";
  src: url("fonts/newsreader-latin-v1.woff2") format("woff2");
  font-weight: 400 650;
  font-style: normal;
  font-display: swap;
}

@font-face {
  font-family: "Outfit";
  src: url("fonts/outfit-latin-v1.woff2") format("woff2");
  font-weight: 400 600;
  font-style: normal;
  font-display: swap;
}

/* ---------- Tokens ---------- */

:root {
  /* The supplied logo has this exact colour baked into the counters of its
     letters, so the logo may only sit on --canvas. Do not change one without
     the other. */
  --canvas: #eef1f4;
  --paper: #ffffff;
  --ink: #1d1143;        /* logo ink: headings, the record's header band */
  --text: #16212b;       /* body copy */
  --slate: #2e3f4f;      /* secondary copy */
  --muted: #55636f;      /* captions and labels; 5.4:1 on canvas */
  --rule: #d3dbe3;       /* hairlines */
  --rule-strong: #768491;/* control borders; 3.4:1 on canvas */
  --blue: #205dee;       /* the dot in the logo: links, focus, "on file" */
  --blue-deep: #1746bd;

  --serif: "Newsreader", "Iowan Old Style", "Palatino Linotype", Palatino, Georgia, serif;
  --sans: "Outfit", "Avenir Next", Avenir, "Segoe UI", system-ui, sans-serif;

  --step--1: 0.875rem;
  --step-0: 1.125rem;
  --step-1: 1.375rem;
  --step-2: 1.75rem;
  --step-3: clamp(1.75rem, 1.3rem + 1.9vw, 2.5rem);
  --step-4: clamp(2.25rem, 1.35rem + 3.9vw, 4rem);

  --gutter: clamp(1rem, 0.4rem + 2.6vw, 2rem);
  --measure: 38rem;
  --section: clamp(3rem, 2rem + 4vw, 4.75rem);

  color-scheme: light;
}

/* ---------- Base ---------- */

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

html {
  -webkit-text-size-adjust: 100%;
  text-size-adjust: 100%;
  scroll-padding-top: 1.5rem;
}

@media (prefers-reduced-motion: no-preference) {
  html {
    scroll-behavior: smooth;
  }
}

body {
  margin: 0;
  background: var(--canvas);
  color: var(--text);
  font-family: var(--serif);
  font-size: var(--step-0);
  line-height: 1.6;
  font-synthesis: none;
  font-optical-sizing: auto;
  text-rendering: optimizeLegibility;
  -webkit-font-smoothing: antialiased;
}

h1,
h2,
h3 {
  margin: 0;
  color: var(--ink);
  font-weight: 500;
  line-height: 1.12;
  letter-spacing: -0.015em;
  text-wrap: balance;
}

p,
ul,
ol,
dl,
dd {
  margin: 0;
}

p {
  text-wrap: pretty;
}

strong {
  font-weight: 600;
}

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

a {
  color: var(--ink);
  text-decoration-line: underline;
  text-decoration-color: var(--blue);
  text-decoration-thickness: 0.09em;
  text-underline-offset: 0.2em;
}

a:hover {
  color: var(--blue-deep);
  text-decoration-thickness: 0.14em;
}

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

::selection {
  background: var(--ink);
  color: #fff;
}

.visually-hidden {
  position: absolute;
  width: 1px;
  height: 1px;
  margin: -1px;
  padding: 0;
  overflow: hidden;
  clip-path: inset(50%);
  white-space: nowrap;
  border: 0;
}

.skip-link {
  position: absolute;
  left: var(--gutter);
  top: 0;
  z-index: 10;
  padding: 0.6rem 0.9rem;
  background: var(--ink);
  color: #fff;
  font-family: var(--sans);
  font-size: var(--step--1);
  text-decoration: none;
  border-radius: 0 0 6px 6px;
  transform: translateY(-110%);
}

.skip-link:focus {
  transform: none;
  color: #fff;
  outline-offset: 2px;
}

/* ---------- Layout ---------- */

.container {
  width: min(100% - 2 * var(--gutter), 70rem);
  margin-inline: auto;
}

.section {
  padding-block: var(--section);
  border-top: 1px solid var(--rule);
}

.section-title {
  font-size: var(--step-3);
}

.section-intro {
  max-width: var(--measure);
  margin-top: 1rem;
  color: var(--slate);
}

/* ---------- Header ---------- */

.site-header {
  background: var(--canvas);
}

.site-header__inner {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 0.25rem 1.5rem;
  padding-block: 1.1rem;
}

.brand {
  display: block;
  flex: none;
  border-radius: 4px;
}

/* 870 x 262 source. Height sets the size; the wordmark's x-height is about a
   quarter of that, so 40px is the floor for it to stay readable. */
.brand img {
  width: auto;
  height: 2.5rem;
}

.site-nav ul {
  display: flex;
  flex-wrap: wrap;
  gap: 0 0.25rem;
  margin: 0 -0.7rem 0 0;
  padding: 0;
  list-style: none;
}

.site-nav a {
  display: block;
  padding: 0.65rem 0.7rem;
  color: var(--text);
  font-family: var(--sans);
  font-size: 1rem;
  font-weight: 500;
  line-height: 1.25;
  text-decoration-color: transparent;
}

.site-nav a:hover {
  color: var(--ink);
  text-decoration-color: var(--blue);
}

.site-nav a[aria-current="page"] {
  color: var(--ink);
  text-decoration-color: var(--ink);
  text-decoration-thickness: 0.12em;
}

/* On phones the three links get their own row, flush with the logo. */
@media (max-width: 29.99rem) {
  .site-nav {
    flex-basis: 100%;
  }

  .site-nav ul {
    margin: 0 0 0 -0.7rem;
  }
}

@media (min-width: 48rem) {
  .site-header__inner {
    padding-block: 1.5rem;
  }

  .brand img {
    height: 3rem;
  }

  .site-nav ul {
    gap: 0.75rem;
  }
}

/* ---------- Home: opening ---------- */

/* Headline and the example record share the first screen. Stacked on small
   screens, side by side from 62rem. */
.hero {
  display: grid;
  gap: 2.25rem;
  padding-block: clamp(2rem, 1rem + 4vw, 3.5rem) var(--section);
}

.hero h1 {
  font-size: var(--step-4);
  font-weight: 450;
  line-height: 1.04;
  letter-spacing: -0.025em;
}

.lede {
  max-width: 36rem;
  margin-top: 1.25rem;
  color: var(--slate);
  font-size: clamp(1.25rem, 1.1rem + 0.5vw, 1.375rem);
  line-height: 1.45;
}

@media (min-width: 62rem) {
  .hero {
    grid-template-columns: minmax(0, 5fr) minmax(0, 6fr);
    gap: 3.5rem;
    align-items: start;
  }

  .hero__text {
    padding-top: 0.75rem;
  }

  .hero h1 {
    font-size: clamp(2.5rem, 0.4rem + 3.4vw, 3.25rem);
  }

  .hero h1 span {
    display: block;
  }

  .hero h1 span + span {
    margin-top: 0.12em;
  }
}

/* ---------- Home: the record specimen ---------- */

.sheet {
  scroll-margin-top: 1.5rem;
  background: var(--paper);
  border: 1px solid var(--rule);
  border-radius: 8px;
  box-shadow: 0 1px 2px rgb(29 17 67 / 0.05), 0 18px 40px -24px rgb(29 17 67 / 0.28);
  overflow: hidden;
  font-family: var(--sans);
  font-size: 0.9375rem;
  line-height: 1.35;
}

.sheet table {
  width: 100%;
  border-collapse: collapse;
  font-variant-numeric: tabular-nums;
}

.sheet caption {
  padding: 1.1rem 1.25rem 1.2rem;
  background: var(--ink);
  color: #fff;
  text-align: left;
}

.sheet__name {
  display: block;
  font-family: var(--serif);
  font-size: 1.5rem;
  font-weight: 500;
  line-height: 1.15;
  letter-spacing: -0.01em;
}

.sheet__note {
  display: block;
  margin-top: 0.3rem;
  color: #cfd0e3;
  font-size: var(--step--1);
}

.sheet th,
.sheet td {
  padding: 0.68rem 0.5rem;
  text-align: left;
  vertical-align: top;
  font-weight: 400;
}

.sheet th:first-child,
.sheet td:first-child {
  padding-left: 1.25rem;
}

.sheet th:last-child,
.sheet td:last-child {
  padding-right: 1.25rem;
}

.sheet thead th {
  padding-block: 0.7rem 0.6rem;
  color: var(--muted);
  font-size: var(--step--1);
  border-bottom: 1px solid var(--rule);
}

.sheet tbody th[scope="rowgroup"] {
  padding-block: 0.95rem 0.4rem;
  color: var(--ink);
  font-size: 1rem;
  font-weight: 600;
}

.sheet tbody th[scope="row"] {
  color: var(--text);
  font-weight: 500;
}

.sheet tbody tr + tr > * {
  border-top: 1px solid var(--rule);
}

.sheet tbody + tbody tr:first-child > * {
  border-top: 1px solid var(--rule);
}

.sheet td {
  color: var(--slate);
}

.col-when {
  width: 26%;
}

.col-source {
  width: 34%;
}

/* How an entry is known. Shape carries the meaning; the words say it too. */
.src {
  display: grid;
  grid-template-columns: 0.625rem 1fr;
  gap: 0.5rem;
  align-items: start;
}

.src::before {
  content: "";
  width: 0.625rem;
  height: 0.625rem;
  margin-top: 0.32em;
  border: 2px solid var(--muted);
  border-radius: 50%;
}

.src--file::before {
  border-color: var(--blue);
  background: var(--blue);
}

.src--none::before {
  height: 0;
  margin-top: calc(0.32em + 0.25rem);
  border-width: 2px 0 0;
  border-radius: 0;
}

.sheet__key {
  display: flex;
  flex-wrap: wrap;
  gap: 0.4rem 1.5rem;
  margin: 0;
  padding: 0.9rem 1.25rem 1rem;
  border-top: 1px solid var(--rule);
  background: #f7f9fb;
  color: var(--muted);
  font-size: var(--step--1);
  list-style: none;
}

.notes {
  display: grid;
  gap: 1.75rem;
  margin-top: 2.25rem;
}

.notes h3 {
  font-size: var(--step-1);
}

.notes p {
  max-width: var(--measure);
  margin-top: 0.4rem;
  color: var(--slate);
}

@media (min-width: 40rem) {
  .sheet {
    font-size: 1rem;
  }

  .sheet caption,
  .sheet__key {
    padding-inline: 1.75rem;
  }

  .sheet th:first-child,
  .sheet td:first-child {
    padding-left: 1.75rem;
  }

  .sheet th:last-child,
  .sheet td:last-child {
    padding-right: 1.75rem;
  }

  .notes {
    grid-template-columns: 1fr 1fr;
    gap: 2rem 2.5rem;
  }
}

@media (min-width: 62rem) {
  .notes {
    grid-template-columns: repeat(4, minmax(0, 1fr));
    gap: 2.5rem;
  }
}

/* ---------- Home: the questions ---------- */

.asks {
  display: grid;
  gap: 2.5rem;
}

.ask-list {
  border-top: 1px solid var(--rule-strong);
}

.ask-list > div {
  padding-block: 1.1rem 1.3rem;
  border-bottom: 1px solid var(--rule);
}

.ask-list dt {
  color: var(--ink);
  font-size: var(--step-2);
  font-weight: 450;
  line-height: 1.15;
  letter-spacing: -0.015em;
  text-wrap: balance;
}

.ask-list .who {
  margin-top: 0.4rem;
  color: var(--muted);
  font-family: var(--sans);
  font-size: 1rem;
  line-height: 1.45;
}

/* The entry from the example record that answers the question: one slip of
   the same paper as the sheet. */
.entries {
  display: grid;
  gap: 0.4rem;
  justify-items: start;
  margin: 0.8rem 0 0;
  padding: 0;
  list-style: none;
}

.entry {
  display: flex;
  flex-wrap: wrap;
  align-items: baseline;
  gap: 0.15rem 1.1rem;
  padding: 0.5rem 0.85rem;
  background: var(--paper);
  border: 1px solid var(--rule);
  border-radius: 6px;
  color: var(--slate);
  font-family: var(--sans);
  font-size: 0.9375rem;
  line-height: 1.4;
  font-variant-numeric: tabular-nums;
}

.entry__name {
  color: var(--text);
  font-weight: 500;
}

.aside-note {
  max-width: var(--measure);
  margin-top: 1rem;
  color: var(--slate);
}

@media (min-width: 62rem) {
  .asks {
    grid-template-columns: minmax(0, 4fr) minmax(0, 7fr);
    gap: 4rem;
    align-items: start;
  }
}

/* ---------- Home: over time ---------- */

.timeline {
  display: grid;
  gap: 2rem;
  margin: 2.5rem 0 0;
  padding: 0;
  list-style: none;
}

.timeline li {
  padding-top: 1.1rem;
  border-top: 2px solid var(--ink);
}

.timeline h3 {
  font-family: var(--sans);
  font-size: 1rem;
  font-weight: 600;
  letter-spacing: 0;
  line-height: 1.3;
}

.timeline p {
  max-width: var(--measure);
  margin-top: 0.6rem;
  color: var(--slate);
}

@media (min-width: 48rem) {
  .timeline {
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 2.5rem;
  }
}

/* ---------- Home: company ---------- */

.company {
  display: grid;
  gap: 2.5rem;
}

.company .section-intro + .section-intro {
  margin-top: 0.9rem;
}

.facts {
  border-top: 1px solid var(--rule-strong);
  font-family: var(--sans);
  font-size: 1rem;
  line-height: 1.4;
}

.facts > div {
  display: grid;
  grid-template-columns: 6.5rem minmax(0, 1fr);
  gap: 1rem;
  align-items: baseline;
  padding-block: 0.9rem;
  border-bottom: 1px solid var(--rule);
}

.facts dt {
  color: var(--muted);
}

.facts dd {
  color: var(--text);
  font-weight: 500;
}

.facts a,
.lost li a {
  display: inline-block;
  padding-block: 0.15rem;
}

@media (min-width: 62rem) {
  .company {
    grid-template-columns: minmax(0, 6fr) minmax(0, 5fr);
    gap: 4rem;
    align-items: start;
  }
}

/* ---------- Email address (see site.js) ---------- */

.contact-line {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 0.6rem 0.9rem;
}

.email-link {
  overflow-wrap: anywhere;
  text-decoration-skip-ink: none;
  text-underline-offset: 0.28em;
}

.copy-button {
  appearance: none;
  min-height: 2.5rem;
  padding: 0.4rem 0.85rem;
  border: 1px solid var(--rule-strong);
  border-radius: 6px;
  background: var(--paper);
  color: var(--ink);
  font: 500 0.9375rem/1.2 var(--sans);
  cursor: pointer;
}

.copy-button:hover {
  border-color: var(--ink);
}

.copy-button[data-state="done"] {
  border-color: var(--ink);
  background: var(--ink);
  color: #fff;
}

/* ---------- Support, Privacy, Terms ---------- */

.page-head {
  padding-block: clamp(2rem, 1rem + 4vw, 4rem) clamp(2rem, 1rem + 3vw, 3rem);
}

.page-head h1 {
  font-size: var(--step-4);
  font-weight: 450;
  line-height: 1.04;
  letter-spacing: -0.025em;
}

.page-head .lede {
  margin-top: 1.1rem;
}

.updated {
  margin-top: 1.25rem;
  color: var(--muted);
  font-family: var(--sans);
  font-size: 1rem;
}

.page-body {
  display: grid;
  gap: 2rem;
  padding-block: 2rem var(--section);
  border-top: 1px solid var(--rule);
}

.toc {
  font-family: var(--sans);
  font-size: 1rem;
  line-height: 1.35;
}

.toc h2 {
  color: var(--muted);
  font-family: var(--sans);
  font-size: 1rem;
  font-weight: 500;
  letter-spacing: 0;
}

.toc ol {
  margin: 0.5rem 0 0;
  padding: 0;
  list-style: none;
  columns: 2 8.5rem;
  column-gap: 1.5rem;
}

.toc a {
  display: block;
  padding-block: 0.35rem;
  color: var(--slate);
  text-decoration-color: transparent;
  break-inside: avoid;
}

.toc a:hover {
  color: var(--ink);
  text-decoration-color: var(--blue);
}

.prose {
  max-width: var(--measure);
}

.prose > * + * {
  margin-top: 1rem;
}

.prose h2 {
  margin-top: 2.75rem;
  font-size: var(--step-2);
  scroll-margin-top: 1.5rem;
}

.prose > h2:first-child {
  margin-top: 0;
}

.prose h3 {
  margin-top: 1.75rem;
  font-family: var(--sans);
  font-size: 1rem;
  font-weight: 600;
  letter-spacing: 0;
}

.prose h3 + * {
  margin-top: 0.4rem;
}

.prose ul,
.prose ol {
  padding-left: 1.3rem;
}

.prose li + li {
  margin-top: 0.5rem;
}

.prose li::marker {
  color: var(--muted);
}

.prose ol > li::marker {
  font-family: var(--sans);
  font-size: 0.9em;
  font-variant-numeric: tabular-nums;
}

/* A short plain-language summary at the top of a policy. */
.summary {
  padding: 1.25rem 1.4rem 1.4rem;
  background: var(--paper);
  border: 1px solid var(--rule);
  border-radius: 8px;
}

.summary h2 {
  margin-top: 0;
  font-family: var(--sans);
  font-size: 1rem;
  font-weight: 600;
  letter-spacing: 0;
}

.summary ul {
  margin-top: 0.6rem;
}

@media (min-width: 62rem) {
  .page-body {
    grid-template-columns: 13rem minmax(0, 1fr);
    gap: 4rem;
    padding-top: 3rem;
  }

  .toc {
    position: sticky;
    top: 1.5rem;
    align-self: start;
  }

  .toc ol {
    columns: auto;
  }
}

/* ---------- Not found ---------- */

.lost {
  padding-block: clamp(3rem, 2rem + 8vw, 8rem);
}

.lost h1 {
  font-size: var(--step-4);
  font-weight: 450;
  letter-spacing: -0.025em;
}

.lost ul {
  margin-top: 1.5rem;
  padding-left: 1.3rem;
}

/* ---------- Footer ---------- */

.site-footer {
  border-top: 1px solid var(--rule);
  font-family: var(--sans);
  font-size: 1rem;
  line-height: 1.4;
}

.site-footer__inner {
  display: flex;
  flex-wrap: wrap;
  align-items: baseline;
  justify-content: space-between;
  gap: 0.75rem 2rem;
  padding-block: 1.75rem 2.5rem;
  color: var(--muted);
}

.site-footer ul {
  display: flex;
  flex-wrap: wrap;
  gap: 0.25rem 1.5rem;
  margin: 0;
  padding: 0;
  list-style: none;
}

.site-footer a {
  display: inline-block;
  padding-block: 0.35rem;
  color: var(--slate);
  text-decoration-color: transparent;
}

.site-footer a:hover {
  color: var(--ink);
  text-decoration-color: var(--blue);
}

/* ---------- Preferences ---------- */

@media (prefers-reduced-motion: no-preference) {
  a,
  .copy-button {
    transition: color 0.12s ease, background-color 0.12s ease, border-color 0.12s ease,
      text-decoration-color 0.12s ease;
  }

  .skip-link {
    transition: transform 0.12s ease;
  }
}

@media (prefers-contrast: more) {
  :root {
    --muted: #3b4752;
    --slate: #1f2c38;
    --rule: #8492a0;
    --rule-strong: #2e3f4f;
  }
}

@media (forced-colors: active) {
  .src--file::before {
    background: CanvasText;
  }

  .sheet caption {
    border-bottom: 1px solid CanvasText;
  }
}

/* ---------- Print ---------- */

@media print {
  :root {
    --canvas: #fff;
  }

  body {
    font-size: 11pt;
  }

  .site-nav,
  .skip-link,
  .toc,
  .copy-button,
  .site-footer ul {
    display: none;
  }

  .page-body {
    display: block;
    padding-top: 1rem;
  }

  .sheet {
    box-shadow: none;
  }

  .prose h2 {
    break-after: avoid;
  }

  a {
    text-decoration: none;
  }
}
