@font-face {
  font-family: "Lektie Sans";
  font-style: normal;
  font-weight: 400 800;
  font-display: swap;
  src: local("Arial");
}

:root {
  color-scheme: light;
  --ink: #16202b;
  --muted: #566170;
  --paper: #f4f6fa;
  --surface: #fcfdff;
  --surface-strong: #ffffff;
  --line: #d6dce6;
  --green: #1f5fbf;
  --green-dark: #143f87;
  --green-soft: #e1ecfb;
  --lime: #ffd23f;
  --orange: #f0a35e;
  --warning: #fff1dc;
  --error: #aa2f2f;
  --shadow: 0 20px 60px rgba(22, 32, 43, 0.09);
  --radius-sm: 0.7rem;
  --radius: 1.15rem;
  --radius-lg: 1.8rem;
  --shell: min(1180px, calc(100vw - 2.5rem));
}

* {
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
  /* The header is sticky: keep focused fields and #anchor targets clear of it. */
  scroll-padding-top: 6.5rem;
}

body {
  margin: 0;
  background: var(--paper);
  color: var(--ink);
  font-family: "Lektie Sans", Arial, Helvetica, sans-serif;
  font-size: 1rem;
  line-height: 1.65;
  text-rendering: optimizeLegibility;
}

body::before {
  position: fixed;
  z-index: -1;
  inset: 0;
  background:
    radial-gradient(circle at 8% 6%, rgba(255, 210, 63, 0.20), transparent 26rem),
    radial-gradient(circle at 94% 30%, rgba(240, 163, 94, 0.12), transparent 23rem);
  content: "";
  pointer-events: none;
}

a {
  color: var(--green-dark);
  text-underline-offset: 0.18em;
}

a:hover {
  color: var(--green);
}

button,
html {
  -webkit-tap-highlight-color: transparent;
  -webkit-text-size-adjust: 100%;
}

input,
select,
textarea {
  font: inherit;
}

@media (pointer: coarse) {
  input,
  select,
  textarea {
    font-size: 16px;
  }
}

button,
a {
  -webkit-tap-highlight-color: transparent;
  touch-action: manipulation;
}

button {
  user-select: none;
  -webkit-user-select: none;
}

img,
svg {
  display: block;
  max-width: 100%;
}

h1,
h2,
h3,
p {
  margin-top: 0;
}

h1,
h2,
h3 {
  line-height: 1.08;
  letter-spacing: -0.035em;
}

h1 {
  max-width: 18ch;
  margin-bottom: 1.4rem;
  font-size: clamp(2.65rem, 7vw, 5.9rem);
  font-weight: 780;
}

h2 {
  max-width: 24ch;
  margin-bottom: 1rem;
  font-size: clamp(2rem, 4vw, 3.35rem);
  font-weight: 740;
}

h3 {
  margin-bottom: 0.65rem;
  font-size: 1.35rem;
}

p:last-child {
  margin-bottom: 0;
}

.shell {
  width: var(--shell);
  margin-inline: auto;
}

.skip-link {
  position: fixed;
  z-index: 100;
  top: 1rem;
  left: 1rem;
  padding: 0.75rem 1rem;
  border-radius: 0.5rem;
  background: var(--ink);
  color: white;
  transform: translateY(-180%);
}

.skip-link:focus {
  transform: translateY(0);
}

.site-header {
  position: sticky;
  z-index: 20;
  top: 0;
  padding-top: env(safe-area-inset-top, 0px);
  border-bottom: 1px solid rgba(214, 220, 230, 0.82);
  background: rgba(244, 246, 250, 0.94);
  backdrop-filter: blur(14px);
}

.site-nav {
  display: flex;
  min-height: 4.7rem;
  align-items: center;
  justify-content: space-between;
}

.wordmark {
  color: var(--ink);
  font-size: 1.35rem;
  font-weight: 800;
  letter-spacing: -0.05em;
  text-decoration: none;
}

.nav-links {
  display: flex;
  gap: 1.6rem;
  align-items: center;
}

.nav-links a {
  color: var(--ink);
  font-size: 0.92rem;
  font-weight: 680;
  text-decoration: none;
}

.nav-links a:hover {
  color: var(--green);
}

.nav-links .nav-cta {
  padding: 0.65rem 1rem;
  border-radius: 999px;
  background: var(--ink);
  color: white;
}

.nav-links .nav-cta:hover {
  background: var(--green-dark);
  color: white;
}

.nav-toggle {
  display: none;
  min-height: 2.75rem;
  padding: 0.5rem 0.8rem;
  border: 1px solid var(--line);
  border-radius: 0.7rem;
  background: var(--surface-strong);
  color: var(--ink);
  font-weight: 700;
}

main {
  overflow: clip;
}

.hero-grid {
  display: grid;
  grid-template-columns: minmax(0, 1.45fr) minmax(18rem, 0.65fr);
  gap: clamp(2rem, 7vw, 6rem);
  align-items: end;
  min-height: 43rem;
  padding-block: clamp(4.5rem, 10vw, 8.5rem) 5rem;
}

.hero-copy {
  max-width: 53rem;
}

.eyebrow {
  margin-bottom: 0.85rem;
  color: var(--green);
  font-size: 0.78rem;
  font-weight: 800;
  letter-spacing: 0.12em;
  text-transform: uppercase;
}

.hero-lead {
  max-width: 45rem;
  margin-bottom: 1.8rem;
  color: var(--muted);
  font-size: clamp(1.18rem, 2vw, 1.45rem);
  line-height: 1.55;
}

.hero-actions {
  display: flex;
  gap: 1.2rem;
  align-items: center;
  flex-wrap: wrap;
  margin-block: 2rem 1.25rem;
}

.primary-button {
  display: inline-flex;
  min-height: 3.25rem;
  align-items: center;
  justify-content: center;
  padding: 0.8rem 1.25rem;
  border: 0;
  border-radius: 999px;
  background: var(--green-dark);
  box-shadow: 0 8px 22px rgba(20, 63, 135, 0.16);
  color: white;
  cursor: pointer;
  font-weight: 760;
  text-align: center;
  text-decoration: none;
  transition: transform 160ms cubic-bezier(0.23, 1, 0.32, 1), background-color 160ms ease;
}

@media (hover: hover) and (pointer: fine) {
  .primary-button:hover {
    background: var(--green);
    color: white;
    transform: translateY(-1px);
  }
}

.primary-button:active {
  transform: scale(0.97);
}

.primary-button:disabled {
  cursor: wait;
  opacity: 0.66;
  transform: none;
}

.text-link {
  font-weight: 760;
}

.freshness,
.source-note,
.field-help,
.table-sub {
  color: var(--muted);
  font-size: 0.84rem;
}

.decision-card {
  padding: 1.5rem;
  border: 1px solid rgba(20, 63, 135, 0.12);
  border-radius: var(--radius-lg);
  background: var(--surface-strong);
  box-shadow: var(--shadow);
}

.card-kicker {
  margin-bottom: 1rem;
  color: var(--muted);
  font-size: 0.78rem;
  font-weight: 800;
  letter-spacing: 0.1em;
  text-transform: uppercase;
}

.decision-card ol {
  display: grid;
  gap: 0;
  margin: 0;
  padding: 0;
  list-style: none;
}

.decision-card li {
  display: grid;
  grid-template-columns: 2.5rem 1fr;
  gap: 0.75rem;
  align-items: start;
  padding-block: 1rem;
  border-top: 1px solid var(--line);
  font-weight: 680;
  line-height: 1.35;
}

.decision-card span {
  color: var(--green);
  font-size: 0.72rem;
  letter-spacing: 0.08em;
}

.intro-grid,
.content-split,
.method-preview {
  display: grid;
  grid-template-columns: minmax(15rem, 0.8fr) minmax(0, 1.2fr);
  gap: clamp(2rem, 8vw, 8rem);
  padding-block: clamp(4rem, 8vw, 7rem);
  border-top: 1px solid var(--line);
}

.content-split > div:last-child,
.method-preview > div:last-child,
.intro-grid > div:last-child {
  max-width: 44rem;
  color: var(--muted);
  font-size: 1.08rem;
}

.provider-grid,
.value-section,
.faq-section,
.question-list,
section[aria-labelledby="comparison-heading"],
section[aria-labelledby="source-table-heading"] {
  padding-block: clamp(4rem, 8vw, 7rem);
  border-top: 1px solid var(--line);
}

.section-heading {
  display: flex;
  gap: 2rem;
  align-items: end;
  justify-content: space-between;
  margin-bottom: 2.2rem;
}

.provider-cards {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 1rem;
}

.provider-card {
  display: grid;
  min-height: 12rem;
  padding: 1.5rem;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: var(--surface);
  color: var(--ink);
  text-decoration: none;
  transition: border-color 160ms ease, transform 160ms ease, box-shadow 160ms ease;
}

.provider-card:hover {
  border-color: var(--green);
  box-shadow: 0 14px 34px rgba(22, 32, 43, 0.08);
  color: var(--ink);
  transform: translateY(-2px);
}

.provider-card--preferred {
  border-color: var(--green);
  background: var(--green-soft);
}

.commercial-note {
  max-width: 52rem;
  margin: -0.8rem 0 1.3rem;
  color: var(--muted);
  font-size: 0.9rem;
}

.provider-card span {
  align-self: start;
  font-size: 1.5rem;
  font-weight: 760;
  letter-spacing: -0.03em;
}

.provider-card small {
  align-self: end;
  max-width: 24rem;
  color: var(--muted);
  font-size: 0.92rem;
}

.three-up {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 1rem;
  margin-block: 2rem;
}

.three-up article {
  min-height: 17rem;
  padding: 1.4rem;
  border-radius: var(--radius);
  background: var(--surface-strong);
}

.three-up .number {
  color: var(--green);
  font-size: 0.85rem;
  font-weight: 800;
}

.trial-section {
  display: grid;
  grid-template-columns: minmax(0, 1.2fr) minmax(16rem, 0.8fr);
  gap: clamp(2rem, 7vw, 6rem);
  align-items: center;
  margin-block: clamp(4rem, 8vw, 7rem);
  padding: clamp(1.5rem, 5vw, 4.2rem);
  border-radius: var(--radius-lg);
  background: var(--ink);
  box-shadow: var(--shadow);
  color: #e4ecf8;
}

.trial-section h2 {
  color: white;
}

.trial-section .eyebrow,
.trial-section a:not(.primary-button) {
  color: var(--lime);
}

.trial-section .source-note {
  color: #dbe5f3;
}

.trial-action {
  padding: clamp(1.2rem, 3vw, 2rem);
  border-radius: var(--radius);
  background: var(--surface-strong);
  color: var(--ink);
}

.trial-action .primary-button {
  width: 100%;
}

.trial-action .trial-step {
  margin-bottom: 1rem;
  color: var(--green-dark);
  font-size: clamp(2rem, 4vw, 3.2rem);
  font-weight: 760;
  line-height: 1.2;
}

.trial-step small {
  display: block;
  color: var(--muted);
  font-size: 0.9rem;
  font-weight: 400;
}

.trial-action > p:last-child {
  margin-top: 1rem;
  color: var(--muted);
  font-size: 0.86rem;
}

.trial-section .trial-action a:not(.primary-button) {
  color: var(--green-dark);
}

.faq-section {
  display: grid;
  grid-template-columns: minmax(16rem, 0.65fr) minmax(0, 1.35fr);
  gap: clamp(2rem, 8vw, 8rem);
}

.faq-section > .eyebrow,
.faq-section > h2 {
  grid-column: 1;
}

.faq-section > h2 {
  grid-row: 2;
}

.faq-list {
  grid-column: 2;
  grid-row: 1 / span 3;
}

.faq-list details {
  border-top: 1px solid var(--line);
}

.faq-list details:last-child {
  border-bottom: 1px solid var(--line);
}

.faq-list summary {
  display: flex;
  min-height: 4.6rem;
  align-items: center;
  justify-content: space-between;
  padding: 1rem 0;
  cursor: pointer;
  font-weight: 740;
  list-style: none;
}

.faq-list summary::-webkit-details-marker {
  display: none;
}

.faq-list summary::after {
  margin-left: 1rem;
  color: var(--green);
  content: "+";
  font-size: 1.5rem;
}

.faq-list details[open] summary::after {
  content: "−";
}

.faq-list details p {
  max-width: 45rem;
  padding-bottom: 1.4rem;
  color: var(--muted);
}

.breadcrumbs {
  display: flex;
  gap: 0.5rem;
  align-items: center;
  padding-top: 1.5rem;
  color: var(--muted);
  font-size: 0.82rem;
}

.breadcrumbs a,
.breadcrumbs span {
  color: inherit;
}

.page-hero {
  padding-block: clamp(4rem, 9vw, 7.5rem);
}

.compact-hero h1,
.provider-hero h1 {
  max-width: 21ch;
  font-size: clamp(2.6rem, 6vw, 5.1rem);
}

.provider-hero {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(12rem, 0.28fr);
  gap: 2rem;
  align-items: end;
}

.provider-hero .eyebrow,
.provider-hero h1,
.provider-hero .hero-lead {
  grid-column: 1;
}

.provider-hero .text-link {
  grid-column: 2;
  grid-row: 2 / span 2;
  align-self: end;
  justify-self: end;
  text-align: right;
}

.fact-grid {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  margin: 0 0 clamp(4rem, 8vw, 7rem);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: var(--surface-strong);
  overflow: hidden;
}

.fact-grid > div {
  min-height: 9rem;
  padding: 1.2rem;
  border-right: 1px solid var(--line);
}

.fact-grid > div:last-child {
  border-right: 0;
}

.fact-grid dt {
  margin-bottom: 1rem;
  color: var(--muted);
  font-size: 0.72rem;
  font-weight: 760;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}

.fact-grid dd {
  margin: 0;
  font-size: 1.1rem;
  font-weight: 730;
  line-height: 1.35;
}

.table-wrap {
  max-width: 100%;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: var(--surface-strong);
  overflow-x: auto;
}

table {
  width: 100%;
  min-width: 58rem;
  border-collapse: collapse;
  text-align: left;
}

th,
td {
  padding: 1.2rem;
  border-bottom: 1px solid var(--line);
  vertical-align: top;
}

thead th {
  background: #e9eef6;
  color: #3b4757;
  font-size: 0.75rem;
  letter-spacing: 0.07em;
  text-transform: uppercase;
}

tbody th {
  width: 14rem;
  font-size: 1.05rem;
}

tbody tr:last-child th,
tbody tr:last-child td {
  border-bottom: 0;
}

tbody tr:hover {
  background: #f9fbff;
}

.owner-row {
  background: #eef4fd;
}

.table-sub {
  display: block;
  margin-top: 0.35rem;
  line-height: 1.45;
}

.callout {
  margin-block: clamp(4rem, 8vw, 7rem);
  padding: clamp(1.5rem, 5vw, 3.5rem);
  border: 1px solid rgba(31, 95, 191, 0.18);
  border-radius: var(--radius-lg);
  background: var(--green-soft);
}

.callout h2 {
  max-width: 25ch;
}

.callout > p:not(.eyebrow) {
  max-width: 50rem;
  color: #2f4a73;
}

.warning-callout {
  background: var(--warning);
  border-color: rgba(171, 105, 27, 0.22);
}

.warning-callout .eyebrow,
.warning-callout a {
  color: #8c5113;
}

.warning-callout > p:not(.eyebrow) {
  color: #5f4932;
}

.owner-callout {
  background: #eceff4;
  border-color: var(--line);
}

.free-callout {
  background: #fdf3cf;
}

.plain-steps {
  display: grid;
  gap: 1rem;
  margin: 0 0 1.5rem;
  padding-left: 1.2rem;
}

.question-list {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 1rem;
}

.question-card {
  min-height: 19rem;
  padding: clamp(1.4rem, 4vw, 2.3rem);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: var(--surface-strong);
}

.question-card:nth-child(7) {
  grid-column: 1 / -1;
  min-height: 14rem;
  background: var(--green-soft);
}

.question-number {
  color: var(--green);
  font-size: 0.78rem;
  font-weight: 800;
  letter-spacing: 0.1em;
}

.question-card p:last-child {
  color: var(--muted);
}

.site-footer {
  margin-top: 5rem;
  background: #0e1a2e;
  color: #ccd5e3;
}

.footer-grid {
  display: grid;
  grid-template-columns: 1.4fr 0.8fr 0.8fr;
  gap: 3rem;
  padding-block: 4rem;
}

.site-footer .wordmark {
  display: inline-block;
  margin-bottom: 1rem;
  color: white;
}

.site-footer a:not(.wordmark) {
  display: block;
  width: fit-content;
  margin-bottom: 0.55rem;
  color: #ccd5e3;
  text-decoration: none;
}

.site-footer a:hover {
  color: white;
}

.footer-heading {
  margin-bottom: 1rem;
  color: white;
  font-size: 0.76rem;
  font-weight: 800;
  letter-spacing: 0.09em;
  text-transform: uppercase;
}

.footer-legal {
  display: flex;
  gap: 1rem 2rem;
  justify-content: space-between;
  padding-block: 1.3rem;
  border-top: 1px solid #2f3c4d;
  color: #93a1b6;
  font-size: 0.78rem;
}

.error-page {
  min-height: 70vh;
  padding-block: 8rem;
}

/* Between the phone menu and the full row, the button's name ("Kontakt Toptutors") needs a tighter row to stay on one line. */
@media (min-width: 861px) and (max-width: 1000px) {
  .nav-links {
    gap: 1rem;
  }

  .nav-links .nav-cta {
    padding-inline: 0.85rem;
    white-space: nowrap;
  }
}

@media (max-width: 860px) {
  :root {
    --shell: min(100% - 1.5rem, 44rem);
  }

  .site-header {
    top: 0;
  }

  .nav-toggle {
    display: block;
  }

  .nav-links {
    position: absolute;
    top: 100%;
    right: 0.75rem;
    left: 0.75rem;
    display: none;
    gap: 0;
    align-items: stretch;
    padding: 0.6rem;
    border: 1px solid var(--line);
    border-radius: var(--radius);
    background: var(--surface-strong);
    box-shadow: var(--shadow);
  }

  .nav-links[data-open="true"] {
    display: grid;
  }

  .nav-links a {
    padding: 0.8rem;
  }

  .nav-links .nav-cta {
    border-radius: 0.7rem;
    text-align: center;
  }

  .hero-grid,
  .intro-grid,
  .content-split,
  .method-preview,
  .trial-section,
  .faq-section,
  .provider-hero {
    grid-template-columns: 1fr;
  }

  .hero-grid {
    min-height: 0;
    padding-top: 5rem;
  }

  .provider-hero .eyebrow,
  .provider-hero h1,
  .provider-hero .hero-lead,
  .provider-hero .text-link,
  .faq-section > .eyebrow,
  .faq-section > h2,
  .faq-list {
    grid-column: 1;
    grid-row: auto;
  }

  .provider-hero .text-link {
    justify-self: start;
    text-align: left;
  }

  .provider-cards,
  .three-up,
  .fact-grid,
  .question-list,
  .footer-grid {
    grid-template-columns: 1fr 1fr;
  }

  .section-heading {
    display: block;
  }

  .fact-grid > div:nth-child(2) {
    border-right: 0;
  }

  .fact-grid > div:nth-child(-n + 2) {
    border-bottom: 1px solid var(--line);
  }

  .faq-section {
    gap: 0.5rem;
  }

  .faq-list {
    margin-top: 1.5rem;
  }

  .trial-section {
    gap: 2rem;
  }

  .question-card:nth-child(7) {
    grid-column: 1 / -1;
  }
}

@media (max-width: 590px) {
  h1 {
    font-size: clamp(2.5rem, 13vw, 4rem);
  }

  /* The page-title rule above floors the size at 2.6rem, which made "karaktergennemsnit" wider than a 320 to 390 px column.
     Scale with the viewport instead, and let a long word wrap rather than run past the edge. */
  .compact-hero h1 {
    font-size: clamp(2rem, 10vw, 2.6rem);
    overflow-wrap: anywhere;
  }

  h2 {
    font-size: 2rem;
  }

  .hero-actions,
  .footer-legal {
    align-items: stretch;
    flex-direction: column;
  }

  .hero-actions .primary-button {
    width: 100%;
  }

  .provider-cards,
  .three-up,
  .fact-grid,
  .question-list,
  .footer-grid {
    grid-template-columns: 1fr;
  }

  .provider-card {
    min-height: 10rem;
  }

  .three-up article,
  .question-card {
    min-height: 0;
  }

  .fact-grid > div,
  .fact-grid > div:nth-child(2) {
    border-right: 0;
    border-bottom: 1px solid var(--line);
  }

  .fact-grid > div:last-child {
    border-bottom: 0;
  }

  .question-card:nth-child(7) {
    grid-column: auto;
  }

  .trial-section {
    margin-inline: -0.2rem;
    padding: 1.25rem;
  }

  .trial-action {
    padding: 1.25rem;
  }
}

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

/* Calculators ---------------------------------------------------------------
   Used by /karaktergennemsnit/ and /adgangskvotient/. Result changes while typing are not animated
   (high frequency). Buttons give press feedback with transform only; hover movement needs a real pointer. */
.sr-only {
  position: absolute;
  width: 1px;
  height: 1px;
  margin: -1px;
  padding: 0;
  overflow: hidden;
  clip: rect(0, 0, 0, 0);
  white-space: nowrap;
  border: 0;
}

.tool-section {
  margin-block: clamp(2rem, 5vw, 4rem);
}

.tool-card {
  padding: clamp(1.25rem, 4vw, 2.25rem);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: var(--surface-strong);
  box-shadow: var(--shadow);
}

.tool-noscript {
  padding: 1.25rem 1.5rem;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: var(--warning);
}

.mode-switch {
  display: flex;
  flex-wrap: wrap;
  gap: 0.5rem;
  margin: 0 0 1.5rem;
  padding: 0;
  border: 0;
}

.mode-switch legend {
  margin-bottom: 0.6rem;
  padding: 0;
  color: var(--muted);
  font-size: 0.82rem;
  font-weight: 700;
}

.mode-option {
  position: relative;
}

.mode-option input {
  position: absolute;
  inset: 0;
  opacity: 0;
  cursor: pointer;
}

.mode-option span {
  display: inline-flex;
  align-items: center;
  min-height: 2.9rem;
  padding: 0.6rem 1.15rem;
  border: 1px solid #aab4c4;
  border-radius: 999px;
  background: #ffffff;
  font-weight: 700;
  transition: transform 160ms cubic-bezier(0.23, 1, 0.32, 1), background-color 160ms ease, color 160ms ease, border-color 160ms ease;
}

.mode-option input:checked + span {
  border-color: var(--green-dark);
  background: var(--green-dark);
  color: #ffffff;
}

.mode-option input:focus-visible + span {
  outline: 3px solid var(--green);
  outline-offset: 2px;
}

.mode-option input:active + span {
  transform: scale(0.97);
}

.grade-rows {
  display: grid;
  gap: 0.75rem;
}

.grade-row {
  display: grid;
  grid-template-columns: minmax(0, 1.6fr) minmax(0, 1fr) minmax(0, 0.7fr) auto;
  gap: 0.75rem;
  align-items: end;
}

.field {
  display: grid;
  gap: 0.35rem;
}

.field .label {
  color: var(--muted);
  font-size: 0.82rem;
  font-weight: 700;
}

.field input,
.field select {
  width: 100%;
  min-height: 2.9rem;
  padding: 0.55rem 0.8rem;
  border: 1px solid #aab4c4;
  border-radius: var(--radius-sm);
  background: #ffffff;
  color: var(--ink);
  font-size: 1rem;
}

.field input:focus-visible,
.field select:focus-visible,
.remove-row:focus-visible,
.button-secondary:focus-visible {
  outline: 3px solid var(--green);
  outline-offset: 2px;
}

.field [aria-invalid="true"] {
  border-color: var(--error);
}

.remove-row {
  width: 2.9rem;
  height: 2.9rem;
  border: 1px solid #aab4c4;
  border-radius: var(--radius-sm);
  background: #ffffff;
  color: var(--muted);
  cursor: pointer;
  font-size: 1.25rem;
  line-height: 1;
  transition: transform 160ms cubic-bezier(0.23, 1, 0.32, 1), background-color 160ms ease;
}

.remove-row:disabled {
  cursor: not-allowed;
  opacity: 0.45;
}

.remove-row:not(:disabled):active,
.button-secondary:active {
  transform: scale(0.97);
}

.tool-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 0.75rem;
  margin-top: 1.25rem;
}

.button-secondary {
  min-height: 2.9rem;
  padding: 0.55rem 1.15rem;
  border: 1px solid var(--green-dark);
  border-radius: 999px;
  background: transparent;
  color: var(--green-dark);
  cursor: pointer;
  font-weight: 700;
  transition: transform 160ms cubic-bezier(0.23, 1, 0.32, 1), background-color 160ms ease;
}

@media (hover: hover) and (pointer: fine) {
  .button-secondary:hover,
  .remove-row:not(:disabled):hover {
    background: var(--green-soft);
  }
}

.target-fields {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 0.75rem;
  margin-top: 1.25rem;
  padding-top: 1.25rem;
  border-top: 1px solid var(--line);
}

.target-fields[hidden] {
  display: none;
}

.pair-fields {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 0.75rem;
}

.result-card {
  margin-top: 1.5rem;
  padding: 1.25rem 1.5rem;
  border-radius: var(--radius);
  background: var(--green-soft);
}

.result-card[hidden] {
  display: none;
}

.result-label {
  margin: 0;
  color: var(--green-dark);
  font-size: 0.82rem;
  font-weight: 800;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}

.result-figure {
  margin: 0.15rem 0 0;
  color: var(--green-dark);
  font-size: clamp(2.3rem, 7vw, 3.5rem);
  font-weight: 800;
  letter-spacing: -0.02em;
  line-height: 1.05;
}

.result-card p:not(.result-label):not(.result-figure) {
  margin: 0.4rem 0 0;
}

.result-card .result-note {
  color: var(--muted);
  font-size: 0.92rem;
}

.result-card.is-error {
  background: #fbe9e9;
}

.result-card.is-error .result-label,
.result-card.is-error .result-figure {
  color: var(--error);
}

.table-compact table {
  min-width: 0;
}

.table-compact th,
.table-compact td {
  padding: 0.85rem 1rem;
}

.table-compact tbody th {
  width: auto;
  font-size: 1rem;
}

@media (max-width: 590px) {
  .table-compact th,
  .table-compact td {
    padding: 0.7rem 0.5rem;
  }

  .table-compact thead th {
    font-size: 0.68rem;
    letter-spacing: 0.03em;
  }
}

.tool-links {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 1rem;
}

.tool-link-card {
  display: grid;
  gap: 0.6rem;
  align-content: start;
  padding: clamp(1.4rem, 4vw, 2.2rem);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: var(--surface-strong);
  color: var(--ink);
  text-decoration: none;
  transition: transform 160ms cubic-bezier(0.23, 1, 0.32, 1), border-color 160ms ease, box-shadow 160ms ease;
}

.tool-link-card h2,
.tool-link-card h3 {
  margin: 0;
}

/* Three cards share the row, so the card title is smaller than a page section title. */
.tool-link-card h2 {
  font-size: clamp(1.3rem, 2.1vw, 1.9rem);
  overflow-wrap: anywhere;
}

.tool-link-card p {
  margin: 0;
  color: var(--muted);
}

.tool-link-card .tool-link-cta {
  color: var(--green-dark);
  font-weight: 800;
}

.tool-link-card:active {
  transform: scale(0.99);
}

@media (hover: hover) and (pointer: fine) {
  .tool-link-card:hover {
    border-color: var(--green);
    box-shadow: 0 14px 34px rgba(22, 32, 43, 0.08);
  }
}

.tool-link-card:focus-visible {
  outline: 3px solid var(--green);
  outline-offset: 3px;
}

@media (max-width: 960px) {
  .tool-links {
    grid-template-columns: 1fr;
  }
}

.quote-list {
  display: grid;
  gap: 1rem;
  margin: 0 0 1.5rem;
  padding: 0;
  list-style: none;
}

.quote-list li {
  padding: 1.1rem 1.3rem;
  border-left: 4px solid var(--green);
  border-radius: 0 var(--radius-sm) var(--radius-sm) 0;
  background: var(--surface-strong);
}

.quote-list q {
  font-weight: 700;
}

.quote-list .source-note {
  display: block;
  margin-top: 0.4rem;
}

@media (max-width: 590px) {
  .grade-row {
    grid-template-columns: minmax(0, 1fr) minmax(0, 1fr) auto;
  }

  .grade-row .field-subject {
    grid-column: 1 / -1;
  }

  .grade-row .remove-row {
    grid-column: 3;
    grid-row: 2;
  }

  .target-fields,
  .pair-fields,
  .tool-links {
    grid-template-columns: 1fr;
  }
}

/* Short question cards and plain content sections (same rules as the tutors.dk tutor page). */
.question-list--compact .question-card {
  min-height: 0;
}

.question-list--compact .question-card:last-child:nth-child(odd) {
  grid-column: 1 / -1;
}

.content-section {
  margin-block: clamp(3rem, 6vw, 5rem);
}

/* Self-check (/brug-for-lektiehjaelp/) -----------------------------------------
   The answer pills reuse .mode-option and the result reuses .result-card. The form is visible in the HTML,
   so nothing shifts when the script starts. Answering never animates anything. */
.need-intro {
  margin: 0 0 1.5rem;
  color: var(--muted);
}

.need-question {
  min-width: 0;
  margin: 0 0 1.5rem;
  padding: 0;
  border: 0;
}

.need-question legend {
  max-width: 100%;
  margin: 0 0 0.6rem;
  padding: 0;
  font-weight: 700;
}

.need-options {
  display: flex;
  flex-wrap: wrap;
  gap: 0.5rem;
}

.need-question.is-missing legend {
  color: var(--error);
}

.need-question.is-missing .mode-option span {
  border-color: var(--error);
}

.result-cta {
  margin-top: 1rem;
  padding: 1.1rem 1.25rem;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: var(--surface);
}

.result-cta[hidden] {
  display: none;
}

.result-cta p {
  margin: 0 0 0.9rem;
}

.result-cta .source-note {
  margin-bottom: 0.6rem;
}

@media (max-width: 590px) {
  .result-cta .primary-button {
    width: 100%;
  }
}

/* Guide list: "Guider til lektiehjælp" on the home page and "Læs videre" at the end of a guide. One link per card, no animation
   beyond press feedback (transform) and a border change for a real pointer. */
.guide-list {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 1rem;
  margin: 0;
  padding: 0;
  list-style: none;
}

.guide-list li {
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: var(--surface-strong);
}

.guide-list a {
  display: grid;
  height: 100%;
  gap: 0.35rem;
  align-content: start;
  padding: 1.1rem 1.3rem;
  border-radius: var(--radius);
  color: var(--ink);
  text-decoration: none;
  transition: transform 160ms cubic-bezier(0.23, 1, 0.32, 1), box-shadow 160ms ease;
}

.guide-list strong {
  font-size: 1.1rem;
  font-weight: 760;
  letter-spacing: -0.02em;
  line-height: 1.25;
}

.guide-list span {
  color: var(--muted);
}

.guide-list a:active {
  transform: scale(0.99);
}

.guide-list a:focus-visible {
  outline: 3px solid var(--green);
  outline-offset: 3px;
}

@media (hover: hover) and (pointer: fine) {
  .guide-list li:hover {
    border-color: var(--green);
    box-shadow: 0 14px 34px rgba(22, 32, 43, 0.08);
  }
}

@media (max-width: 860px) {
  .guide-list {
    grid-template-columns: 1fr;
  }
}

/* Quotes inside the numbered cards of a guide are long: regular weight keeps a card readable, and a table gets room before the next paragraph. */
.question-card .quote-list {
  margin: 1rem 0 0;
}

.content-section .quote-list q {
  font-weight: 500;
}

.content-section .table-wrap {
  margin-bottom: 1.25rem;
}

/* Numbered cards inside a guide section sit directly under the section's short answer, without the page-section rule and padding. */
.question-list--tight {
  margin-top: 1.25rem;
  padding-block: 0;
  border-top: 0;
}

/* The five levels of the national test already say "Færdighedstrin 1" and so on: no second list number. */
.question-card .level-list { list-style: none; margin: 0.75rem 0 0; padding: 0; }
.question-card .level-list li + li { margin-top: 0.35rem; }

/* Figures drawn in code -------------------------------------------------------------------------------------
   apps/web/scripts/satellite-pictures-lektiehjaelp.mjs writes each figure into its page between picture markers.
   A figure is static (nothing animates) and has its numbers as a text table beside it. The type inside the SVG is
   sized so that it is still 14 px or more on a 320 px phone. */
.figure-card {
  margin: 0;
}

.figure-card svg {
  width: 100%;
  height: auto;
}

.figure-card figcaption {
  margin-top: 0.75rem;
  color: var(--muted);
  font-size: 0.9rem;
}

/* The worked example on /karaktergennemsnit/: the sentence and its table on the left, the figure on the right. On a phone they stack
   as sentence, figure, table. */
.example-figure {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(0, 27rem);
  grid-template-rows: auto 1fr;
  grid-template-areas:
    "text figure"
    "table figure";
  gap: 1.25rem clamp(1.5rem, 4vw, 3.5rem);
  align-items: start;
  margin-top: 1.5rem;
}

.example-figure > p {
  grid-area: text;
  max-width: 34rem;
  margin: 0;
}

.example-figure > .figure-card {
  grid-area: figure;
}

.example-figure > .figure-table {
  grid-area: table;
  max-width: 26rem;
  margin: 0;
}

.figure-table th,
.figure-table td {
  padding: 0.55rem 1rem;
}

@media (max-width: 860px) {
  .example-figure {
    grid-template-columns: minmax(0, 1fr);
    grid-template-rows: auto;
    grid-template-areas:
      "text"
      "figure"
      "table";
  }

  .example-figure > .figure-card {
    max-width: 30rem;
  }
}

/* "Hvad kan vi prøve først?" in the guides: the page's own steps on the left, the same steps as a worksheet on the right. On a phone the
   list comes first and the worksheet under it. */
.steps-figure {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(0, 24rem);
  gap: 1.5rem clamp(1.5rem, 4vw, 3.5rem);
  align-items: start;
}

.steps-figure > div {
  min-width: 0;
}

@media (max-width: 860px) {
  .steps-figure {
    grid-template-columns: minmax(0, 1fr);
  }

  .steps-figure > .figure-card {
    max-width: 30rem;
  }
}

/* Home first screen (14 Nov, Elmar: it is unclear what the site is for). One promise, one button, who runs the site, and a quiet path
   for students. The shared page-title size is for guides and tools; the home heading is a whole sentence, so it is smaller and balanced.
   Links to Toptutors inside it read as the "hero" slot (site.js looks for .page-hero). */
.home-hero {
  display: grid;
  grid-template-columns: minmax(0, 1.4fr) minmax(16rem, 0.6fr);
  gap: clamp(2rem, 6vw, 5rem);
  align-items: end;
  padding-block: clamp(1.75rem, 5vw, 4.5rem) clamp(2.25rem, 5vw, 4rem);
}

.home-hero-copy {
  min-width: 0;
}

.home-hero h1 {
  max-width: 20ch;
  margin-bottom: 1.1rem;
  font-size: clamp(2.05rem, 4.6vw, 3.9rem);
  text-wrap: balance;
}

.home-hero .hero-lead {
  max-width: 34rem;
  margin-bottom: 0;
  font-size: clamp(1.08rem, 1.7vw, 1.28rem);
}

.home-hero .hero-actions {
  gap: 0.7rem 1.25rem;
  margin-block: 1.6rem 0;
}

.home-hero .primary-button {
  min-height: 3.5rem;
  padding-inline: 1.7rem;
  font-size: 1.05rem;
}

.hero-note {
  max-width: 21rem;
  margin: 0;
  color: var(--muted);
  font-size: 0.9rem;
  line-height: 1.45;
}

.hero-owner {
  max-width: 36rem;
  margin: 1.5rem 0 0;
  padding-top: 1rem;
  border-top: 1px solid var(--line);
  color: var(--muted);
  font-size: 0.92rem;
  line-height: 1.5;
}

.hero-owner a {
  font-weight: 700;
}

.home-students {
  min-width: 0;
  padding: 1.25rem 1.4rem 0.4rem;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: rgba(255, 255, 255, 0.78);
}

.home-students .eyebrow {
  margin-bottom: 0.25rem;
}

.home-students h2 {
  max-width: none;
  margin: 0 0 0.5rem;
  font-size: 1.3rem;
  letter-spacing: -0.02em;
}

.home-students .tool-links {
  display: block;
}

.home-students .tool-link-card {
  gap: 0.2rem;
  padding: 0.95rem 0 1.05rem;
  border: 0;
  border-top: 1px solid var(--line);
  border-radius: 0;
  background: transparent;
}

.home-students .tool-link-card h3 {
  margin: 0;
  font-size: 1.08rem;
}

.home-students .tool-link-card p {
  font-size: 0.93rem;
  line-height: 1.5;
}

.home-students .tool-link-cta {
  margin-top: 0.2rem;
  font-size: 0.93rem;
}

@media (hover: hover) and (pointer: fine) {
  .home-students .tool-link-card:hover {
    box-shadow: none;
  }

  .home-students .tool-link-card:hover .tool-link-cta {
    text-decoration: underline;
  }
}

@media (max-width: 900px) {
  .home-hero {
    grid-template-columns: minmax(0, 1fr);
    gap: 2rem;
    align-items: start;
  }
}

@media (max-width: 590px) {
  .home-hero h1 {
    font-size: clamp(1.95rem, 8.4vw, 2.4rem);
    overflow-wrap: anywhere;
  }

  .home-hero .hero-actions {
    margin-top: 1.4rem;
  }

  .home-students {
    padding-inline: 1.1rem;
  }
}
