/* Opigno LMS — opigno.org
   Self-hosted font: Schibsted Grotesk (SIL Open Font License 1.1) */

@font-face { font-family: "Schibsted Grotesk"; src: url("fonts/schibsted-grotesk-latin-400-normal.woff2") format("woff2"); font-weight: 400; font-style: normal; font-display: swap; }
@font-face { font-family: "Schibsted Grotesk"; src: url("fonts/schibsted-grotesk-latin-400-italic.woff2") format("woff2"); font-weight: 400; font-style: italic; font-display: swap; }
@font-face { font-family: "Schibsted Grotesk"; src: url("fonts/schibsted-grotesk-latin-500-normal.woff2") format("woff2"); font-weight: 500; font-style: normal; font-display: swap; }
@font-face { font-family: "Schibsted Grotesk"; src: url("fonts/schibsted-grotesk-latin-700-normal.woff2") format("woff2"); font-weight: 700; font-style: normal; font-display: swap; }
@font-face { font-family: "Schibsted Grotesk"; src: url("fonts/schibsted-grotesk-latin-800-normal.woff2") format("woff2"); font-weight: 800; font-style: normal; font-display: swap; }

:root {
  color-scheme: light;
  --paper: #f6f7fb;
  --surface: #ffffff;
  --ink: #161833;
  --muted: #555a76;
  --line: #d9dce8;
  --blue: #2b34df;
  --blue-soft: #e8e9fd;
  --ended: #b42318;
  --ended-soft: #fdecea;

  --font: "Schibsted Grotesk", "Helvetica Neue", Arial, sans-serif;
  --step--1: 0.875rem;
  --step-0: 1.0625rem;
  --step-1: 1.25rem;
  --step-2: 1.625rem;
  --step-3: 2.25rem;
  --step-4: clamp(2.25rem, 5.2vw, 3.75rem);
  --measure: 68ch;
  --wrap: 72rem;
  --gap: clamp(1.25rem, 3vw, 2rem);
}

@media (prefers-color-scheme: dark) {
  :root {
    color-scheme: dark;
    --paper: #0f1124;
    --surface: #171a33;
    --ink: #e9eaf5;
    --muted: #a3a7c2;
    --line: #2c3052;
    --blue: #8f96ff;
    --blue-soft: #22265a;
    --ended: #ff8a7a;
    --ended-soft: #3a1c22;
  }
}

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

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

body {
  margin: 0;
  background: var(--paper);
  color: var(--ink);
  font-family: var(--font);
  font-size: var(--step-0);
  line-height: 1.6;
  text-rendering: optimizeLegibility;
}

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

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

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

.skip {
  position: absolute; left: 1rem; top: -4rem;
  background: var(--ink); color: var(--paper);
  padding: 0.5rem 1rem; z-index: 10;
}
.skip:focus { top: 1rem; }

.wrap { width: min(100% - 2 * var(--gap), var(--wrap)); margin-inline: auto; }

/* Notice bar — shown on every page */
.notice {
  background: var(--ink);
  color: var(--paper);
  font-size: var(--step--1);
}
.notice .wrap { padding-block: 0.6rem; }
.notice a { color: inherit; font-weight: 700; }

/* Header */
.site-header { border-bottom: 1px solid var(--line); background: var(--surface); }
.site-header .wrap {
  display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between;
  gap: 0.75rem 2rem; padding-block: 1.1rem;
}
.wordmark {
  font-weight: 800; font-size: 1.375rem; letter-spacing: -0.02em;
  color: var(--ink); text-decoration: none;
}
.wordmark span { color: var(--blue); }
.site-nav ul { list-style: none; display: flex; flex-wrap: wrap; gap: 0.25rem 1.5rem; margin: 0; padding: 0; }
.site-nav a { color: var(--ink); text-decoration: none; font-weight: 500; }
.site-nav a:hover { color: var(--blue); }
.site-nav a[aria-current="page"] { color: var(--blue); text-decoration: underline; text-underline-offset: 0.4em; text-decoration-thickness: 2px; }

/* Type */
h1, h2, h3 { line-height: 1.15; letter-spacing: -0.02em; margin: 0 0 0.6em; }
h1 { font-size: var(--step-4); font-weight: 800; max-width: 22ch; }
h2 { font-size: var(--step-3); font-weight: 800; max-width: 26ch; }
h3 { font-size: var(--step-1); font-weight: 700; letter-spacing: -0.01em; }
p, li { max-width: var(--measure); }
p { margin: 0 0 1em; }
.lead { font-size: var(--step-1); color: var(--muted); max-width: 52ch; }

main section { padding-block: clamp(3rem, 8vw, 5.5rem); }
main section + section { border-top: 1px solid var(--line); }

/* Hero */
.hero { padding-block: clamp(3rem, 9vw, 6rem) clamp(2.5rem, 6vw, 4rem); }

/* Status board — the one bold element */
.status {
  margin-top: clamp(2rem, 5vw, 3rem);
  border: 2px solid var(--ink);
  background: var(--surface);
}
.status-row {
  display: grid;
  grid-template-columns: minmax(10rem, 15rem) minmax(9rem, 13rem) 1fr;
  gap: 0.5rem 2rem;
  align-items: baseline;
  padding: 1.4rem clamp(1rem, 3vw, 2rem);
}
.status-row + .status-row { border-top: 1px solid var(--line); }
.status-row dt { font-weight: 700; }
.status-row .state {
  font-weight: 800; font-size: var(--step-1); letter-spacing: -0.01em;
}
.status-row .state.ended { color: var(--ended); }
.status-row .state.active { color: var(--blue); }
.status-row dd { margin: 0; color: var(--muted); }
.status-row dd p { margin: 0; }
@media (max-width: 760px) {
  .status-row { grid-template-columns: 1fr; gap: 0.25rem; }
}

/* Comparison table */
.table-scroll { overflow-x: auto; margin-top: 2rem; border: 1px solid var(--line); background: var(--surface); }
table { border-collapse: collapse; width: 100%; min-width: 40rem; }
caption { text-align: left; padding: 1rem 1.25rem; color: var(--muted); font-size: var(--step--1); caption-side: bottom; border-top: 1px solid var(--line); }
th, td { text-align: left; vertical-align: top; padding: 1rem 1.25rem; border-bottom: 1px solid var(--line); }
tbody tr:last-child th, tbody tr:last-child td { border-bottom: 0; }
thead th { font-size: var(--step-1); font-weight: 800; letter-spacing: -0.01em; border-bottom: 2px solid var(--ink); }
thead th small { display: block; font-size: var(--step--1); font-weight: 500; color: var(--muted); letter-spacing: 0; }
tbody th { font-weight: 700; width: 22%; }
td.no { color: var(--muted); }
.col-us { background: var(--blue-soft); }

/* Paths: three options for current users */
.paths { display: grid; grid-template-columns: repeat(auto-fit, minmax(16rem, 1fr)); gap: 0; margin-top: 2rem; border-top: 2px solid var(--ink); }
.path { padding: 1.5rem 1.5rem 1.5rem 0; }
.path + .path { border-left: 1px solid var(--line); padding-left: 1.5rem; }
@media (max-width: 860px) {
  .path, .path + .path { border-left: 0; padding-left: 0; padding-right: 0; border-bottom: 1px solid var(--line); }
}
.path p:last-child { margin-bottom: 0; }

/* Buttons */
.btn {
  display: inline-block; padding: 0.8rem 1.3rem;
  background: var(--blue); color: #fff; font-weight: 700; text-decoration: none;
  border: 2px solid var(--blue);
}
.btn:hover { background: transparent; color: var(--blue); }
@media (prefers-color-scheme: dark) { .btn { color: #0f1124; } }
.btn-quiet { background: transparent; color: var(--ink); border-color: var(--ink); }
.btn-quiet:hover { color: var(--blue); border-color: var(--blue); }
.actions { display: flex; flex-wrap: wrap; gap: 0.75rem; margin-top: 1.5rem; }

/* FAQ */
.faq details { border-bottom: 1px solid var(--line); max-width: 52rem; }
.faq details:first-of-type { border-top: 1px solid var(--line); }
.faq summary {
  cursor: pointer; list-style: none; padding: 1.1rem 2.5rem 1.1rem 0; position: relative;
  font-weight: 700; font-size: var(--step-1); letter-spacing: -0.01em;
}
.faq summary::-webkit-details-marker { display: none; }
.faq summary::after {
  content: "+"; position: absolute; right: 0.25rem; top: 0.95rem;
  font-size: 1.5rem; font-weight: 500; color: var(--blue);
}
.faq details[open] summary::after { content: "–"; }
.faq details > div { padding-bottom: 1.25rem; color: var(--muted); }

/* Plans matrix */
.plans thead th { text-align: left; }
.plans td, .plans tbody th { font-size: var(--step-0); }
.plans tfoot td, .plans tfoot th { border-bottom: 0; border-top: 2px solid var(--ink); padding-block: 1.25rem; }
.yes { font-weight: 700; }

/* Includes list */
.includes { display: grid; grid-template-columns: repeat(auto-fit, minmax(18rem, 1fr)); gap: 1.5rem 3rem; margin-top: 2rem; padding: 0; list-style: none; }
.includes li { border-top: 2px solid var(--ink); padding-top: 1rem; }
.includes h3 { margin-bottom: 0.35em; }
.includes p { margin: 0; color: var(--muted); }

/* Steps — a real sequence */
.steps { counter-reset: step; list-style: none; padding: 0; margin: 2rem 0 0; max-width: 46rem; }
.steps li { counter-increment: step; position: relative; padding: 0 0 1.5rem 3.25rem; }
.steps li::before {
  content: counter(step); position: absolute; left: 0; top: -0.1rem;
  width: 2.1rem; height: 2.1rem; display: grid; place-items: center;
  border: 2px solid var(--ink); font-weight: 800;
}
.steps li::after { content: ""; position: absolute; left: 1rem; top: 2.2rem; bottom: 0.3rem; border-left: 2px solid var(--line); }
.steps li:last-child::after { display: none; }
.steps li:last-child { padding-bottom: 0; }

/* Legal page */
.legal { display: grid; grid-template-columns: 15rem minmax(0, 1fr); gap: 3rem; align-items: start; }
.legal nav { position: sticky; top: 1.5rem; font-size: var(--step--1); }
.legal nav ol { padding-left: 1.25rem; margin: 0; }
.legal nav li { margin-bottom: 0.35rem; }
.legal nav a { color: var(--ink); text-decoration: none; }
.legal nav a:hover { color: var(--blue); text-decoration: underline; }
.legal h2 { font-size: var(--step-2); margin-top: 2.5em; scroll-margin-top: 1.5rem; }
.legal h2:first-child { margin-top: 0; }
.legal h3 { margin-top: 1.5em; }
.legal ul { padding-left: 1.25rem; }
.legal .meta { color: var(--muted); font-size: var(--step--1); }
@media (max-width: 900px) {
  .legal { grid-template-columns: 1fr; gap: 2rem; }
  .legal nav { position: static; border: 1px solid var(--line); padding: 1rem 1.25rem; background: var(--surface); }
}
.severity td:first-child { font-weight: 700; white-space: nowrap; }

/* Footer */
.site-footer { background: var(--surface); border-top: 1px solid var(--line); font-size: var(--step--1); color: var(--muted); }
.site-footer .wrap { display: flex; flex-wrap: wrap; justify-content: space-between; gap: 1.5rem 3rem; padding-block: 2.5rem; }
.site-footer p { margin: 0 0 0.35rem; }
.site-footer ul { list-style: none; margin: 0; padding: 0; }
.site-footer li { margin-bottom: 0.35rem; }
.site-footer a { color: var(--ink); }

@media (prefers-reduced-motion: reduce) {
  * { scroll-behavior: auto !important; transition: none !important; }
}
html { scroll-behavior: smooth; }

.visually-hidden { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }
.note { margin-top: 1rem; color: var(--muted); font-size: var(--step--1); }
.legal .table-scroll table { min-width: 32rem; }
.steps h3 { margin-bottom: 0.25em; }
.steps p { margin: 0; color: var(--muted); }

.wordmark img { display: block; height: 40px; width: auto; }
.legal-single { max-width: 46rem; }
.legal-single h3:first-child { margin-top: 0; }
