/* Standardoverblikket. Nøgletallene, visningerne, niveauerne, kortene og
 * indholdet er MDR-overblikkets (overblik.css, hentet før denne), så de to
 * sider er det samme system. Her står kun det, der er nyt: stigen,
 * opbygningen side om side, søgningen og standardernes kort.
 *
 * Intet siges med farve alene. Et trin på stigen har sit nummer og sit navn,
 * harmoniseret er en fyldt firkant og ordet, og vægten er fyldte felter og
 * et tal. */

/* ── Stigen ───────────────────────────────────────────────────────────── */

.ladder {
  display: grid;
  gap: 10px;
  margin: 0;
  padding: 0;
  list-style: none;
}

.rung {
  display: grid;
  grid-template-columns: minmax(0, 290px) minmax(0, 1fr);
  gap: 12px 20px;
  align-items: start;
  padding: 14px 16px;
  background: var(--paper-sunk);
  border: 1px solid var(--line);
  border-radius: var(--r-control);
}

.rung-head { display: grid; grid-template-columns: 30px minmax(0, 1fr); gap: 12px; }

/* Trinnets nummer er fyldt for det, der binder, og tomt med en stiplet kant
 * for det, der kun vejleder - formen siger graden, tallet siger rækken. */
.rung-no {
  display: grid;
  place-items: center;
  width: 30px;
  height: 30px;
  border-radius: var(--r-round);
  font-size: 14px;
  font-weight: 650;
  font-variant-numeric: tabular-nums;
  background: var(--ink);
  color: var(--paper);
  border: 2px solid var(--ink);
}

.rung[data-rung="2"] .rung-no { background: var(--ink-soft); border-color: var(--ink-soft); }
.rung[data-rung="3"] .rung-no { background: var(--paper); color: var(--ink); border-color: var(--ink-soft); }
.rung[data-rung="4"] .rung-no,
.rung[data-rung="5"] .rung-no { background: var(--paper); color: var(--ink-soft); border: 2px dashed var(--ink-faint); }

.rung-name { font-weight: 650; line-height: 1.3; padding-top: 3px; }
.rung-say { margin-top: 3px; font-size: var(--step--1); line-height: 1.45; color: var(--ink-soft); }

.rung-cards { display: grid; grid-template-columns: repeat(auto-fill, minmax(200px, 1fr)); gap: 10px; }

.card-type { min-height: 0; padding: 12px 15px; gap: 4px; }
.card-type .card-title { font-size: 15.5px; }
.card-type .card-body { font-size: 13.5px; }

@media (max-width: 760px) {
  .rung { grid-template-columns: minmax(0, 1fr); padding: 12px; }
  .rung-cards { grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 8px; }
}

@media (max-width: 420px) {
  .rung-cards { grid-template-columns: minmax(0, 1fr); }
}

/* Hvem, nummerering, afvigelse: en kort liste med navnet over teksten. */
.facets { max-width: 68ch; margin: 4px 0 0; }
.facets dt:not(:first-child) { margin-top: 16px; }
.facets dt {
  font-size: 12px;
  font-weight: 650;
  letter-spacing: .06em;
  text-transform: uppercase;
  color: var(--ink-faint);
}
.facets dd { margin: 3px 0 0; line-height: 1.5; }

/* ── Opbygningen side om side ─────────────────────────────────────────── */

.anatomy {
  margin-top: clamp(28px, 4vw, 40px);
  padding-top: clamp(24px, 3.4vw, 32px);
  border-top: 1px solid var(--line);
  scroll-margin-top: 88px;
}

.anatomy-title { font-size: var(--step-2); }
.anatomy-intro { max-width: 72ch; margin-top: 8px; color: var(--ink-soft); line-height: 1.5; }

.anatomy-cols {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
  gap: 14px;
  margin-top: 18px;
}

.anatomy-col {
  display: flex;
  flex-direction: column;
  gap: 10px;
  padding: clamp(16px, 2.2vw, 22px);
  background: var(--paper);
  border: 1px solid var(--line);
  border-radius: var(--r-surface);
  box-shadow: var(--shadow);
}

.anatomy-head { font-weight: 650; font-size: 17px; }
.anatomy-sub { font-size: var(--step--1); color: var(--ink-soft); line-height: 1.45; }

/* Niveauerne som en trappe: hvert trin rykket lidt ind under det forrige,
 * så man kan se, at de hænger under hinanden. Tillæggene - bilag og
 * annekser - står ved siden af og ikke under, med en stiplet kant. */
.anatomy-steps {
  display: grid;
  gap: 6px;
  margin: 4px 0 0;
  padding: 0;
  list-style: none;
  counter-reset: trin;
}

.anatomy-steps li {
  display: grid;
  grid-template-columns: minmax(0, 9.5em) minmax(0, 1fr);
  gap: 2px 12px;
  padding: 9px 12px;
  background: var(--paper-sunk);
  border: 1px solid var(--line-strong);
  border-radius: 8px;
}

.anatomy-steps li:nth-child(2) { margin-left: 14px; }
.anatomy-steps li:nth-child(3) { margin-left: 28px; }
.anatomy-steps li:nth-child(4) { margin-left: 42px; }
/* Verbet er ikke et niveau, men det, der står i dem alle. */
.anatomy-steps li.is-note { margin-left: 0; background: none; border-color: transparent; border-left: 3px solid var(--line-strong); border-radius: 0; }
.anatomy-steps li.is-side { margin-left: 0; margin-top: 6px; border-style: dashed; background: var(--paper); }

.anatomy-name { font-weight: 650; }
.anatomy-eg { font-weight: 600; color: var(--accent); font-variant-numeric: tabular-nums; }
.anatomy-say { grid-column: 1 / -1; font-size: 13.5px; line-height: 1.45; color: var(--ink-soft); }

@media (max-width: 640px) {
  .anatomy-steps li { grid-template-columns: minmax(0, 1fr); }
  .anatomy-steps li:nth-child(n) { margin-left: 0; }
}

.anatomy-col .practice { margin-top: auto; padding-top: 4px; font-size: var(--step--1); }

/* ── Søgning og rækkefølge ────────────────────────────────────────────── */

.std-pick { display: grid; gap: 18px; min-width: 0; }

.std-tools {
  display: flex;
  flex-wrap: wrap;
  align-items: flex-end;
  justify-content: space-between;
  gap: 12px 20px;
}

.std-find { display: grid; gap: 5px; flex: 1 1 280px; max-width: 460px; }
.std-find-label { font-size: 13px; font-weight: 650; color: var(--ink-soft); }

.std-find-input {
  min-height: 44px;
  padding: 0 14px;
  font: inherit;
  font-size: 16px;
  color: var(--ink);
  background: var(--paper);
  border: 1px solid var(--edge);
  border-radius: var(--r-control);
}

.std-find-input:focus-visible { outline: 2px solid var(--accent); outline-offset: 1px; }

.views-small .view-pick { min-height: 36px; padding: 0 14px; font-size: 14px; }

.std-none { color: var(--ink-soft); }
.std-rule { max-width: 70ch; font-size: var(--step--1); line-height: 1.45; color: var(--ink-soft); }

.std-group { display: grid; gap: 10px; }
.std-group + .std-group { margin-top: 8px; }
.std-group-name {
  font-size: 12.5px;
  font-weight: 650;
  letter-spacing: .06em;
  text-transform: uppercase;
  color: var(--ink-soft);
}

.std-cards { grid-template-columns: repeat(auto-fill, minmax(220px, 1fr)); gap: 10px; }

/* Listen tegnes om ved hvert tastetryk i søgefeltet. Kom kortene glidende
 * ind hver gang, ville de blinke, mens man skriver. */
.std-cards > * { animation: none; }

.card-std { padding: 14px 16px; gap: 5px; }
.card-std .std-no { font-size: 17px; font-variant-numeric: tabular-nums; }
.card-std .std-name { color: var(--ink-soft); }

@media (max-width: 640px) {
  .std-cards { grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 8px; }
  .card-std { padding: 11px 12px; }
  .card-std .std-no { font-size: 15.5px; }
}

/* To og to også på en telefon, som overblikkets kort - femten kort i én
 * spalte ville fylde fem skærme. */
@media (max-width: 420px) {
  .card-std .card-kicker { font-size: 10.5px; letter-spacing: .03em; }
  .harm, .meter { font-size: 12px; }
}

/* Harmoniseret: fyldt firkant og ordet. Ikke: tom firkant. Kan ikke
 * (rapporter og vejledninger): tom firkant med stiplet kant. */
.harm {
  display: inline-flex;
  align-items: center;
  gap: 7px;
  margin-top: 2px;
  font-size: 13px;
  font-weight: 600;
  line-height: 1.3;
  hyphens: manual;
}

.harm-box {
  flex-shrink: 0;
  width: 11px;
  height: 11px;
  border-radius: 2px;
  border: 2px solid currentColor;
}

.harm.is-yes .harm-box { background: currentColor; }
.harm.is-cannot .harm-box { border-style: dashed; }
.harm.is-no, .harm.is-cannot { color: var(--ink-soft); font-weight: 500; }

/* Vægten: et felt pr. emne og et bredt felt pr. opgave, og tallet i tekst. */
.meter { display: flex; flex-wrap: wrap; align-items: center; gap: 4px 8px; font-size: 13px; color: var(--ink-soft); }
.meter-cells { display: inline-flex; gap: 3px; }
.meter-cell { width: 9px; height: 9px; border-radius: 2px; background: currentColor; opacity: .75; }
.meter-cell.is-task { width: 18px; opacity: 1; }
.meter-text { font-variant-numeric: tabular-nums; }

.card[aria-pressed="true"] .harm,
.card[aria-pressed="true"] .meter,
.card[aria-pressed="true"] .std-name { color: inherit; }

/* ── Indholdet ────────────────────────────────────────────────────────── */

.std-official { font-size: var(--step--1); color: var(--ink-soft); font-style: italic; line-height: 1.45; }

.side-note { font-size: 13.5px; line-height: 1.45; color: var(--ink-soft); }
.side-ref { font-weight: 650; color: var(--ink); font-variant-numeric: tabular-nums; }
.side-place { font-weight: 650; line-height: 1.35; }

.std-diff { display: grid; gap: 10px; margin-top: 8px; max-width: 68ch; }
.diff-list { display: grid; gap: 10px; margin: 0; }
.diff-list dd { margin: 2px 0 0; line-height: 1.5; }

.diff-link {
  padding: 0;
  font: inherit;
  font-weight: 650;
  color: var(--accent);
  background: none;
  border: 0;
  border-bottom: 1px solid currentColor;
  cursor: pointer;
}

.content-side .practice { display: block; font-size: var(--step--1); }
