/* LecturePack landing
 * Ink on paper, one highlighter. Newsreader for headings, Atkinson Hyperlegible for text.
 * Mobile-first; 16px gutters; no horizontal scroll; dark mode via prefers-color-scheme. */

:root {
  --paper: #ffffff;
  --paper-2: #f3f4f7;
  --ink: #1c2b4a;
  --ink-2: #4e586e;
  --rule: #d6dae3;
  --rule-strong: #aeb5c4;
  --link-line: #8c95a8;
  --mark: #f2cf3a;
  --mark-strong: #e7c226;
  --mark-soft: rgba(242, 207, 58, 0.42);
  --on-mark: #1c2b4a;
  --error: #b3261e;

  --gutter: 16px;
  --font-text: "Atkinson Hyperlegible", system-ui, -apple-system, "Segoe UI", Roboto, sans-serif;
  --font-display: "Newsreader", Georgia, "Times New Roman", serif;
}

@media (prefers-color-scheme: dark) {
  :root {
    --paper: #121a2c;
    --paper-2: #1a2338;
    --ink: #e7eaf1;
    --ink-2: #a6aec0;
    --rule: #2e3850;
    --rule-strong: #4a5571;
    --link-line: #6f7a94;
    --mark-soft: rgba(242, 207, 58, 0.34);
    --error: #f28b82;
  }
}

@media (min-width: 48em) {
  :root { --gutter: 32px; }
}

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

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

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

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

body {
  margin: 0;
  font-family: var(--font-text);
  font-size: 1.0625rem;
  line-height: 1.55;
  color: var(--ink);
  background: var(--paper);
  overflow-x: clip;
}

img, svg, video, iframe { max-width: 100%; height: auto; }

[id] { scroll-margin-top: 1.25rem; }

h1, h2, h3, .wordmark, .pack-unit, .plan-name, .pack-qtext, .claims p {
  font-family: var(--font-display);
  font-weight: 500;
  letter-spacing: -0.005em;
}

h1 {
  font-size: clamp(2.25rem, 1.5rem + 3.4vw, 3.75rem);
  line-height: 1.06;
  margin: 0 0 1.25rem;
  max-width: 16ch;
  text-wrap: balance;
}

h2 {
  font-size: clamp(1.75rem, 1.4rem + 1.4vw, 2.375rem);
  line-height: 1.12;
  margin: 0 0 0.75rem;
  text-wrap: balance;
}

h3 {
  font-size: 1.375rem;
  line-height: 1.25;
  margin: 0 0 0.5rem;
}

p { margin: 0 0 1rem; }

a {
  color: inherit;
  text-decoration: underline;
  text-decoration-color: var(--link-line);
  text-decoration-thickness: 1px;
  text-underline-offset: 0.16em;
}

a:hover { text-decoration-color: currentColor; }

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

.wrap {
  max-width: 72rem;
  margin-inline: auto;
  padding-inline: var(--gutter);
}

.lead {
  font-size: clamp(1.125rem, 1rem + 0.5vw, 1.3125rem);
  line-height: 1.5;
  color: var(--ink-2);
  max-width: 38ch;
}

.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 3rem;
  padding: 0.7rem 1.5rem;
  font: inherit;
  font-weight: 700;
  color: var(--on-mark);
  background: var(--mark);
  border: 0;
  border-radius: 4px;
  text-decoration: none;
  cursor: pointer;
}

.btn:hover { background: var(--mark-strong); }

.btn:disabled {
  opacity: 0.65;
  cursor: progress;
}

.link-quiet { font-weight: 700; }

.aside-note {
  max-width: 62ch;
  margin-top: 1.25rem;
  color: var(--ink-2);
  font-size: 0.9375rem;
}

.aside-note + .aside-note { margin-top: 0.5rem; }

/* Skip link ------------------------------------------------------------- */

.skip {
  position: absolute;
  left: var(--gutter);
  top: -100px;
  z-index: 10;
  padding: 0.5rem 0.75rem;
  background: var(--ink);
  color: var(--paper);
  border-radius: 0 0 4px 4px;
  text-decoration: none;
}

.skip:focus { top: 0; }

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

.site-head { border-bottom: 1px solid var(--rule); }

.head-row {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 0.6rem 1.5rem;
  padding-block: 0.9rem;
}

.wordmark {
  font-size: 1.5rem;
  font-weight: 600;
  line-height: 1;
  text-decoration: none;
  margin-right: auto;
}

.site-nav {
  order: 3;
  width: 100%;
  display: flex;
  flex-wrap: wrap;
  gap: 0.15rem 1.25rem;
  font-size: 0.9375rem;
}

.site-nav a {
  color: var(--ink-2);
  text-decoration: none;
  padding-block: 0.2rem;
}

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

.lang {
  display: inline-flex;
  border: 1px solid var(--rule-strong);
  border-radius: 4px;
  overflow: hidden;
}

.lang button {
  min-width: 2.6rem;
  padding: 0.42rem 0.6rem;
  font: inherit;
  font-size: 0.8125rem;
  font-weight: 700;
  letter-spacing: 0.04em;
  color: var(--ink-2);
  background: transparent;
  border: 0;
  cursor: pointer;
}

.lang button + button { border-left: 1px solid var(--rule-strong); }

.lang button[aria-pressed="true"] {
  color: var(--paper);
  background: var(--ink);
}

.lang button:focus-visible { outline-offset: -3px; }

@media (min-width: 60em) {
  .site-nav {
    order: 0;
    width: auto;
  }
}

/* Hero ------------------------------------------------------------------ */

.hero { padding-block: clamp(2.5rem, 7vw, 6rem); }

.hero-grid {
  display: grid;
  gap: 2.5rem;
}

.hero-actions {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 1rem 1.5rem;
  margin-top: 1.75rem;
}

.hero-note {
  margin: 1rem 0 0;
  font-size: 0.9375rem;
  color: var(--ink-2);
}

@media (min-width: 60em) {
  .hero-grid {
    grid-template-columns: minmax(0, 1.1fr) minmax(0, 1fr);
    align-items: center;
    gap: clamp(2rem, 5vw, 5rem);
  }
}

/* The study-pack artefact ------------------------------------------------ */

.pack {
  border: 1px solid var(--rule);
  border-radius: 6px;
  background: var(--paper);
  font-size: 0.9375rem;
  line-height: 1.45;
}

.pack-head {
  display: flex;
  justify-content: space-between;
  gap: 1rem;
  padding: 0.6rem 1.1rem;
  font-size: 0.8125rem;
  color: var(--ink-2);
  background: var(--paper-2);
  border-bottom: 1px solid var(--rule);
  border-radius: 6px 6px 0 0;
}

.pack-label { font-weight: 700; }

.pack-body { padding: 1.1rem 1.1rem 1.25rem; }

.pack-course {
  margin: 0;
  font-size: 0.875rem;
  color: var(--ink-2);
}

.pack-unit {
  margin: 0.15rem 0 1rem;
  font-size: 1.375rem;
  line-height: 1.2;
}

.pack-h {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  margin: 1rem 0 0.35rem;
  font-size: 0.8125rem;
  font-weight: 700;
  color: var(--ink-2);
}

.pack-chapters {
  list-style: none;
  margin: 0;
  padding: 0;
  border-top: 1px solid var(--rule);
}

.pack-chapters li {
  display: grid;
  grid-template-columns: 3.25rem minmax(0, 1fr);
  gap: 0.5rem;
  padding: 0.35rem 0;
  border-bottom: 1px solid var(--rule);
}

.ts {
  font-variant-numeric: tabular-nums;
  color: var(--ink-2);
  white-space: nowrap;
}

.pack-gloss { margin: 0; }

.pack-gloss dt { font-weight: 700; }

.pack-gloss dd { margin: 0; }

.pack-q {
  margin-top: 1rem;
  padding: 0.85rem 1rem 0.9rem;
  border: 1px solid var(--rule);
  border-radius: 4px;
  background: var(--paper-2);
}

.pack-q .pack-h { margin-top: 0; }

.tag {
  display: inline-block;
  padding: 0.1rem 0.45rem;
  font-size: 0.75rem;
  font-weight: 700;
  color: var(--ink);
  background: var(--mark-soft);
  border-radius: 3px;
}

.pack-qtext {
  margin: 0 0 0.5rem;
  font-size: 1.125rem;
  line-height: 1.3;
}

.pack-ev {
  margin: 0;
  font-size: 0.8125rem;
  color: var(--ink-2);
}

mark.ts {
  padding: 0.05em 0.3em;
  color: var(--ink);
  background: var(--mark-soft);
  border-radius: 2px;
  -webkit-box-decoration-break: clone;
  box-decoration-break: clone;
}

/* Sections ---------------------------------------------------------------- */

.section {
  padding-block: clamp(3rem, 7vw, 5.5rem);
  border-top: 1px solid var(--rule);
}

.section-grid {
  display: grid;
  gap: 1.5rem;
}

.section-lead {
  margin: 0;
  color: var(--ink-2);
  max-width: 34ch;
}

.section-body { min-width: 0; }

.section-body > p { max-width: 62ch; }

@media (min-width: 60em) {
  .section-grid {
    grid-template-columns: minmax(13rem, 17rem) minmax(0, 1fr);
    column-gap: clamp(2rem, 5vw, 5rem);
    align-items: start;
  }

  .section-head {
    position: sticky;
    top: 2rem;
  }
}

/* Demo ---------------------------------------------------------------------- */

.demo-slot {
  display: grid;
  place-items: center;
  aspect-ratio: 16 / 9;
  padding: 1.5rem;
  text-align: center;
  color: var(--ink-2);
  background: var(--paper-2);
  border: 1px dashed var(--rule-strong);
  border-radius: 6px;
}

.demo-slot p {
  margin: 0;
  max-width: 36ch;
}

.demo-video, .demo-slot iframe {
  width: 100%;
  aspect-ratio: 16 / 9;
  border: 0;
  border-radius: 6px;
  background: #000;
}

/* What you get -------------------------------------------------------------- */

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

.outputs li {
  padding: 1.25rem 0;
  border-top: 1px solid var(--rule);
}

.outputs li:first-child {
  padding-top: 0;
  border-top: 0;
}

.outputs p {
  margin: 0;
  max-width: 48ch;
}

@media (min-width: 40em) {
  .outputs { grid-template-columns: repeat(2, minmax(0, 1fr)); }

  .outputs li:nth-child(-n + 2) {
    padding-top: 0;
    border-top: 0;
  }
}

/* How it works ---------------------------------------------------------------- */

.steps {
  list-style: none;
  counter-reset: step;
  margin: 0;
  padding: 0;
  display: grid;
  gap: 1.75rem;
}

.steps li {
  counter-increment: step;
  padding-top: 0.75rem;
  border-top: 1px solid var(--rule);
}

.steps li::before {
  content: counter(step);
  display: block;
  margin-bottom: 0.75rem;
  font-family: var(--font-display);
  font-size: 2.5rem;
  font-weight: 400;
  line-height: 1;
  color: var(--ink-2);
  font-variant-numeric: lining-nums;
}

.steps p {
  margin: 0;
  max-width: 40ch;
}

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

/* Native import table ------------------------------------------------------------- */

.table-wrap {
  overflow-x: auto;
  -webkit-overflow-scrolling: touch;
}

.import-table {
  width: 100%;
  border-collapse: collapse;
  font-size: 0.9375rem;
}

.import-table th, .import-table td {
  padding: 0.7rem 0.75rem 0.7rem 0;
  text-align: left;
  vertical-align: top;
  border-bottom: 1px solid var(--rule);
}

.import-table thead th {
  font-size: 0.8125rem;
  color: var(--ink-2);
  border-bottom-color: var(--ink);
}

.import-table tbody th { font-weight: 700; }

/* Evidence ------------------------------------------------------------------------ */

.claims {
  list-style: none;
  margin: 0;
  padding: 0;
  max-width: 62ch;
}

.claims li {
  padding: 1.1rem 0;
  border-top: 1px solid var(--rule);
}

.claims li:first-child {
  padding-top: 0;
  border-top: 0;
}

.claims p {
  margin: 0;
  font-size: 1.3125rem;
  line-height: 1.38;
}

.fn-ref {
  font-family: var(--font-text);
  font-size: 0.65em;
  line-height: 0;
  margin-left: 0.15em;
}

.fn-ref a {
  padding: 0 0.15em;
  font-weight: 700;
  text-decoration: none;
}

.fn-ref a:hover { text-decoration: underline; }

.honest {
  max-width: 62ch;
  margin: 1.5rem 0 0;
  padding: 0.85rem 1rem;
  background: var(--paper-2);
  border-left: 3px solid var(--ink);
}

.fn-title {
  margin: 2rem 0 0.5rem;
  font-family: var(--font-text);
  font-size: 0.8125rem;
  font-weight: 700;
  color: var(--ink-2);
}

.footnotes {
  max-width: 62ch;
  margin: 0;
  padding-left: 1.25rem;
  font-size: 0.875rem;
  color: var(--ink-2);
}

.footnotes li {
  margin-bottom: 0.4rem;
  overflow-wrap: anywhere;
}

.footnotes a { color: var(--ink); }

/* Privacy ------------------------------------------------------------------------- */

.plain {
  max-width: 62ch;
  margin: 0;
  padding-left: 1.1rem;
}

.plain li { margin-bottom: 0.6rem; }

/* Pricing: a tariff list ----------------------------------------------------------- */

.tariff {
  list-style: none;
  margin: 0;
  padding: 0;
  border-top: 1px solid var(--ink);
}

.tariff-row {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  grid-template-areas:
    "name price"
    "for hours";
  column-gap: 1rem;
  row-gap: 0.15rem;
  align-items: baseline;
  padding: 0.9rem 0;
  border-bottom: 1px solid var(--rule);
}

.plan-name {
  grid-area: name;
  font-size: 1.25rem;
}

.plan-for {
  grid-area: for;
  font-size: 0.9375rem;
  color: var(--ink-2);
}

.plan-hours {
  grid-area: hours;
  font-size: 0.9375rem;
  color: var(--ink-2);
  text-align: right;
  font-variant-numeric: tabular-nums;
  white-space: nowrap;
}

.plan-price {
  grid-area: price;
  font-size: 1.125rem;
  font-weight: 700;
  text-align: right;
  font-variant-numeric: tabular-nums;
  white-space: nowrap;
}

@media (min-width: 48em) {
  .tariff-row {
    grid-template-columns: 9.5rem minmax(0, 1fr) 6.5rem 6.5rem;
    grid-template-areas: "name for hours price";
    column-gap: 1.5rem;
  }
}

/* Pilot form ------------------------------------------------------------------------- */

.form { max-width: 44rem; }

.form-grid {
  display: grid;
  gap: 1.1rem;
}

.field label {
  display: block;
  margin-bottom: 0.35rem;
  font-size: 0.9375rem;
  font-weight: 700;
}

.field input, .field select, .field textarea {
  width: 100%;
  min-height: 2.9rem;
  padding: 0.6rem 0.75rem;
  font: inherit;
  color: var(--ink);
  background: var(--paper);
  border: 1px solid var(--rule-strong);
  border-radius: 4px;
}

.field textarea {
  min-height: 6rem;
  resize: vertical;
}

.field input:focus-visible, .field select:focus-visible, .field textarea:focus-visible {
  outline: 2px solid var(--ink);
  outline-offset: 1px;
  border-color: var(--ink);
}

.field.is-invalid input, .field.is-invalid select { border-color: var(--error); }

.field-hint {
  margin: 0.35rem 0 0;
  font-size: 0.875rem;
  color: var(--ink-2);
}

.field-error {
  margin: 0.35rem 0 0;
  font-size: 0.875rem;
  font-weight: 700;
  color: var(--error);
}

.field-check {
  display: grid;
  grid-template-columns: auto minmax(0, 1fr);
  gap: 0.25rem 0.65rem;
  align-items: start;
}

.field-check input {
  width: 1.15rem;
  height: 1.15rem;
  min-height: 0;
  margin: 0.25rem 0 0;
  padding: 0;
  accent-color: var(--ink);
}

.field-check label {
  margin: 0;
  font-size: 0.9375rem;
  font-weight: 400;
}

.field-check .field-error { grid-column: 2; }

.hp {
  position: absolute;
  left: -10000px;
  top: auto;
  width: 1px;
  height: 1px;
  overflow: hidden;
}

.form-actions { margin-top: 1.5rem; }

.form-status {
  max-width: 62ch;
  min-height: 1.5em;
  margin: 1rem 0 0;
  font-size: 0.9375rem;
}

.form-status.is-error { color: var(--error); }

.form-status.is-ok { font-weight: 700; }

@media (min-width: 48em) {
  .form-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 1.25rem 1.5rem;
  }

  .field-wide { grid-column: 1 / -1; }
}

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

.site-foot {
  padding-block: 2rem 2.5rem;
  font-size: 0.9375rem;
  color: var(--ink-2);
  border-top: 1px solid var(--rule);
}

.foot-row {
  display: grid;
  gap: 0.5rem;
}

.foot-row p { margin: 0; }

.foot-owner { color: var(--ink); }

.foot-links {
  display: flex;
  flex-wrap: wrap;
  gap: 0.25rem 1.25rem;
}

.foot-dev { color: var(--ink); font-size: 0.875rem; font-weight: 500; }

.foot-dev-links {
  display: flex;
  flex-wrap: wrap;
  gap: 0.25rem 1.25rem;
  font-size: 0.875rem;
}

.foot-small { font-size: 0.875rem; }
