/* kurs.datatank.no – samme palett og skrifter som www.datatank.no */
@font-face {
  font-family: "Inter Variable";
  font-style: normal;
  font-display: swap;
  font-weight: 100 900;
  src: url(/assets/inter-latin.woff2) format("woff2-variations");
}
@font-face {
  font-family: "Space Grotesk Variable";
  font-style: normal;
  font-display: swap;
  font-weight: 300 700;
  src: url(/assets/space-grotesk-latin.woff2) format("woff2-variations");
}

:root {
  --ground: #0f1720;
  --raised: #16202c;
  --fg: #e9eff3;
  --dim: #8ea3b1;
  --rule: #92b2c729;
  --rule-strong: #92b2c752;
  --signal: #2dd4bf;
  --signal-soft: #5eead4;
  --wait: #f0a03c;
  --sans: "Inter Variable", ui-sans-serif, system-ui, -apple-system, "Segoe UI", Roboto, sans-serif;
  --display: "Space Grotesk Variable", var(--sans);
  color-scheme: dark;
}

*, *::before, *::after { box-sizing: border-box; }
html { scroll-behavior: smooth; scroll-padding-top: 5rem; -webkit-text-size-adjust: 100%; }
body {
  margin: 0;
  background: var(--ground);
  color: var(--fg);
  font-family: var(--sans);
  font-size: 1.0625rem;
  line-height: 1.625;
}
@media (prefers-reduced-motion: reduce) { html { scroll-behavior: auto; } }

.wrap { max-width: 68rem; margin: 0 auto; padding: 0 1.25rem; }
.narrow > * { max-width: 46rem; }

a { color: var(--signal-soft); text-underline-offset: 0.2em; }
a:hover { color: var(--fg); }
:focus-visible { outline: 2px solid var(--signal); outline-offset: 3px; border-radius: 4px; }

.skip { position: absolute; left: -999rem; top: 0; background: var(--signal); color: var(--ground); padding: 0.5rem 1rem; z-index: 100; }
.skip:focus { left: 0; }

/* Topp */
.top { position: sticky; top: 0; z-index: 50; background: #0f1720e6; backdrop-filter: blur(12px); border-bottom: 1px solid var(--rule); }
.top-inner { display: flex; align-items: center; gap: 1.5rem; min-height: 3.75rem; }
.logo { font-family: var(--display); font-weight: 600; font-size: 1.125rem; color: var(--fg); text-decoration: none; letter-spacing: -0.025em; margin-right: auto; }
.logo .dim { color: var(--dim); font-weight: 400; }
.logo .sig { color: var(--signal); }
nav { display: flex; gap: 1.5rem; }
nav a { color: var(--dim); text-decoration: none; font-size: 0.9375rem; }
nav a:hover { color: var(--fg); }
@media (max-width: 40rem) { nav { display: none; } }

/* Knapper */
.btn { display: inline-block; background: var(--signal); color: var(--ground); font-weight: 600; text-decoration: none; padding: 0.8rem 1.4rem; border-radius: 0.6rem; border: 1px solid var(--signal); }
.btn:hover { background: var(--signal-soft); border-color: var(--signal-soft); color: var(--ground); }
.btn-ghost { background: transparent; color: var(--fg); border-color: var(--rule-strong); }
.btn-ghost:hover { background: var(--raised); color: var(--fg); border-color: var(--dim); }
.btn-small { padding: 0.45rem 1rem; font-size: 0.9375rem; }
.actions { display: flex; flex-wrap: wrap; gap: 0.75rem; margin-top: 2rem; }

/* Seksjoner */
section { padding: 4.5rem 0; }
.band { background: var(--raised); border-block: 1px solid var(--rule); }
.hero { padding: 6rem 0 5rem; }
h1, h2, h3 { font-family: var(--display); letter-spacing: -0.025em; line-height: 1.15; margin: 0; text-wrap: balance; }
h1 { font-size: clamp(2.4rem, 6.5vw, 4.25rem); font-weight: 600; max-width: 14ch; }
h2 { font-size: clamp(1.6rem, 3.6vw, 2.25rem); font-weight: 600; margin-bottom: 1.25rem; }
h3 { font-size: 1.125rem; font-weight: 600; line-height: 1.35; }
p { margin: 0 0 1rem; }
.eyebrow { color: var(--signal); font-size: 0.8125rem; font-weight: 600; letter-spacing: 0.08em; text-transform: uppercase; margin-bottom: 0.9rem; }
.lead { font-size: clamp(1.15rem, 2.2vw, 1.4rem); color: var(--dim); max-width: 34rem; margin-top: 1.5rem; line-height: 1.5; }
.sub { color: var(--dim); margin-top: -0.5rem; }
.note { color: var(--dim); font-size: 0.9375rem; margin-top: 1.75rem; max-width: 46rem; }

/* Utbytte */
.outcomes { list-style: none; padding: 0; margin: 0; display: grid; gap: 0.25rem; max-width: 46rem; }
.outcomes li { position: relative; padding: 0.85rem 0 0.85rem 2rem; border-bottom: 1px solid var(--rule); }
.outcomes li::before { content: ""; position: absolute; left: 0.2rem; top: 1.4rem; width: 0.6rem; height: 0.6rem; border-radius: 50%; background: var(--signal); }

/* Temaer */
.topics { list-style: none; counter-reset: t; padding: 0; margin: 2rem 0 0; display: grid; gap: 1px; grid-template-columns: repeat(auto-fit, minmax(18rem, 1fr)); background: var(--rule); border: 1px solid var(--rule); border-radius: 1rem; overflow: hidden; }
.topics li { counter-increment: t; background: var(--ground); padding: 1.5rem 1.5rem 1.25rem; }
.topics li::before { content: counter(t, decimal-leading-zero); display: block; font-family: var(--display); color: var(--signal); font-size: 0.875rem; font-weight: 600; margin-bottom: 0.5rem; font-variant-numeric: tabular-nums; }
.topics p { color: var(--dim); font-size: 0.9375rem; margin: 0.4rem 0 0; }
.tag { display: inline-block; color: var(--wait); border: 1px solid var(--wait); border-radius: 999px; font-size: 0.75rem; font-weight: 600; padding: 0 0.55rem; margin-left: 0.25rem; white-space: nowrap; }

/* Kort */
.cards { display: grid; gap: 1rem; grid-template-columns: repeat(auto-fit, minmax(16rem, 1fr)); margin-top: 2rem; }
.card { background: var(--ground); border: 1px solid var(--rule); border-radius: 1rem; padding: 1.5rem; }
.card p { color: var(--dim); font-size: 0.9375rem; margin: 0.6rem 0 0; }
.card .status { color: var(--dim); font-size: 0.8125rem; font-weight: 600; margin: 0 0 0.75rem; }
.card .status::before { content: ""; display: inline-block; width: 0.5rem; height: 0.5rem; border-radius: 50%; background: var(--wait); margin-right: 0.5rem; }
.card .status.on { color: var(--signal-soft); }
.card .status.on::before { background: var(--signal); }

/* Tabell */
.table-scroll { overflow-x: auto; margin-top: 1.5rem; }
table { border-collapse: collapse; width: 100%; max-width: 52rem; }
th, td { text-align: left; padding: 0.9rem 1rem 0.9rem 0; border-bottom: 1px solid var(--rule); font-weight: 400; }
thead th { color: var(--dim); font-size: 0.8125rem; font-weight: 600; letter-spacing: 0.06em; text-transform: uppercase; }
tbody td:nth-child(2) { font-family: var(--display); font-weight: 600; font-variant-numeric: tabular-nums; white-space: nowrap; }
tbody td:last-child { color: var(--dim); font-size: 0.9375rem; }

/* Spørsmål og svar */
details { border-bottom: 1px solid var(--rule); }
summary { cursor: pointer; padding: 1.1rem 2rem 1.1rem 0; font-weight: 600; list-style: none; position: relative; }
summary::-webkit-details-marker { display: none; }
summary::after { content: "+"; position: absolute; right: 0.25rem; top: 0.95rem; color: var(--signal); font-size: 1.4rem; line-height: 1; }
details[open] summary::after { content: "–"; }
details p { color: var(--dim); padding-right: 2rem; }

/* Bestill */
.cta { text-align: left; }
.cta p { color: var(--dim); }

/* Bunn */
footer { border-top: 1px solid var(--rule); padding: 2rem 0; color: var(--dim); font-size: 0.875rem; }
.foot { display: flex; flex-wrap: wrap; gap: 0.5rem 2rem; justify-content: space-between; }
.foot p { margin: 0; }
footer a { color: var(--dim); }
