/* AML Advisory brand tokens, from Brand/README.md (the website's :root).
   Status colours are not in the brand kit; they are chosen for WCAG AA on
   white and on their own tints. */
:root {
  --ink: #102A43;          /* navy: logo, headings, primary buttons */
  --text: #22374A;         /* body text */
  --ink-soft: #4A5D6E;     /* secondary text */
  --ink-faint: #66798A;    /* muted text, large or non-essential only */
  --teal: #3E6F72;         /* accent, links, ticks */
  --teal-logo: #4C8487;    /* check in the logo */
  --mist: #EEF2F3;         /* light panels, page background */
  --rule: #D6DFE3;         /* lines and borders */
  --paper: #FFFFFF;
  --navy-hover: #1E3D5B;

  --teal-tint: #E4EEEE;
  --ok: #2C6E49;  --ok-tint: #E7F2EB;  --ok-rule: #C4DFCD;
  --warn: #8A4B00; --warn-tint: #FBF1E3; --warn-rule: #EED6B4;
  --danger: #A3261E; --danger-tint: #FBEDEB; --danger-rule: #EDC9C5;

  --radius: 6px;
  --header-h: 72px;
}

* { box-sizing: border-box; }

body {
  margin: 0;
  font-family: "Inter", "Segoe UI", "Helvetica Neue", Arial, sans-serif;
  color: var(--text);
  background: var(--mist);
  font-size: 15px;
  line-height: 1.5;
}

a { color: var(--teal); text-decoration: none; }
a:hover { text-decoration: underline; text-underline-offset: 3px; }
:focus-visible { outline: 2px solid var(--teal); outline-offset: 2px; }
h1, h2, h3 { color: var(--ink); }
h1 { font-size: 26px; margin: 0 0 6px; letter-spacing: -0.3px; }
h2 { font-size: 17px; margin: 0; letter-spacing: -0.1px; }
h3 { font-size: 14px; margin: 0 0 6px; }
p { margin: 0 0 10px; }

/* Logo: mark + wordmark, sized and spaced as on the website */
.logo { display: inline-flex; align-items: center; gap: 10px; color: var(--ink); text-decoration: none; }
.logo:hover { text-decoration: none; }
.logo-mark { width: 34px; height: auto; flex-shrink: 0; display: block; }
.mark-a { fill: currentColor; }
.mark-check { fill: var(--teal-logo); }
.wordmark { font-size: 1.12rem; font-weight: 400; letter-spacing: -0.01em; white-space: nowrap; color: var(--ink); }
.wordmark b { font-weight: 800; letter-spacing: 0.01em; }

/* Header */
.topbar {
  display: flex; align-items: center; justify-content: space-between; gap: 24px;
  min-height: var(--header-h); padding: 0 28px;
  background: var(--paper); color: var(--ink); border-bottom: 1px solid var(--rule);
}
.topnav { display: flex; align-items: center; gap: 22px; font-size: 14px; flex-wrap: wrap; }
.topnav a { color: var(--ink-soft); font-weight: 600; }
.topnav a:hover { color: var(--ink); }
.topnav .who { color: var(--ink-soft); font-size: 13px; }
.inline { display: inline; margin: 0; }

.subnav {
  display: flex; gap: 4px; flex-wrap: wrap; padding: 8px 28px;
  background: var(--paper); border-bottom: 1px solid var(--rule); font-size: 13px;
}
.subnav a { color: var(--ink-soft); padding: 4px 10px; border-radius: var(--radius); }
.subnav a:hover { background: var(--mist); color: var(--ink); text-decoration: none; }

.wrap { max-width: 1180px; margin: 0 auto; padding: 24px 28px 60px; }
.foot { max-width: 1180px; margin: 0 auto; padding: 16px 28px 40px; font-size: 12px; color: var(--ink-soft); border-top: 1px solid var(--rule); }

/* Page head */
.page-head { display: flex; justify-content: space-between; align-items: flex-start; gap: 20px; margin-bottom: 20px; }
.page-head .actions { display: flex; gap: 8px; flex-wrap: wrap; }
.crumb { font-size: 13px; color: var(--ink-soft); margin-bottom: 6px; }

/* Cards */
.card {
  background: var(--paper); border: 1px solid var(--rule); border-radius: var(--radius);
  padding: 18px 20px; margin-bottom: 18px;
}
.card-head { display: flex; align-items: center; gap: 10px; flex-wrap: wrap; margin-bottom: 12px; }
.card-head h2 { margin-right: auto; }
.cards { display: grid; grid-template-columns: repeat(auto-fit, minmax(380px, 1fr)); gap: 16px; }
.link-card { display: block; color: inherit; transition: border-color .15s; }
.link-card:hover { border-color: var(--teal); text-decoration: none; }
.stats { display: grid; grid-template-columns: repeat(auto-fit, minmax(105px, 1fr)); gap: 12px; margin-top: 14px; padding-top: 12px; border-top: 1px solid var(--rule); }
.stats div { display: flex; flex-direction: column; }
.stats strong { font-size: 18px; color: var(--ink); }
.stats span { font-size: 11px; color: var(--ink-soft); text-transform: uppercase; letter-spacing: .4px; }

/* Badges */
.badge {
  display: inline-block; font-size: 11.5px; font-weight: 600; padding: 2px 8px;
  border-radius: 20px; border: 1px solid transparent; white-space: nowrap;
}
.badge-ok { background: var(--ok-tint); color: var(--ok); border-color: var(--ok-rule); }
.badge-warn { background: var(--warn-tint); color: var(--warn); border-color: var(--warn-rule); }
.badge-info { background: var(--teal-tint); color: var(--teal); border-color: #C3D8D8; }
.badge-muted { background: var(--mist); color: var(--ink-soft); border-color: var(--rule); }

/* Par links */
.par { font-size: 12px; color: var(--ink-soft); }
.par a { color: var(--teal); }
.par .sep { margin: 0 4px; color: var(--ink-faint); }

/* Tables */
.table { width: 100%; border-collapse: collapse; font-size: 13.5px; }
.table th {
  text-align: left; font-size: 11px; text-transform: uppercase; letter-spacing: .5px;
  color: var(--ink-soft); padding: 8px 10px; border-bottom: 1px solid var(--rule); font-weight: 600;
}
.table td { padding: 10px; border-bottom: 1px solid var(--mist); vertical-align: top; }
.table tr:last-child td { border-bottom: none; }
.table.compact td, .table.compact th { padding: 7px 8px; }
.table .right { text-align: right; }
.nowrap { white-space: nowrap; }
/* Wide tables scroll inside their own box, so the page itself never does. */
.table-scroll { overflow-x: auto; }
.table-scroll table { min-width: 860px; }
/* The policy table fits the page without horizontal scroll. */
.table-scroll table.table-politikker { min-width: 0; }
.table-scroll td.detaljer { word-break: break-word; }

/* Definition lists */
.kv-list { margin: 0 0 10px; }
.kv { display: flex; gap: 16px; padding: 6px 0; border-bottom: 1px dotted var(--rule); }
.kv dt { flex: 0 0 200px; font-size: 12.5px; color: var(--ink-soft); }
.kv dd { margin: 0; flex: 1; min-width: 0; font-size: 13.5px; white-space: pre-wrap; overflow-wrap: anywhere; }
.tekst { white-space: pre-wrap; overflow-wrap: break-word; }

/* Forms */
.stack { display: flex; flex-direction: column; gap: 12px; }
.grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(220px, 1fr)); gap: 12px; }
.field { display: flex; flex-direction: column; gap: 4px; font-size: 12.5px; }
.field > span { color: var(--ink-soft); font-weight: 600; }
input:not([type]), input[type=text], input[type=date], input[type=number], input[type=password], select, textarea {
  font: inherit; font-size: 13.5px; padding: 8px 10px; border: 1px solid #A9B8C1;
  border-radius: var(--radius); background: var(--paper); color: var(--text); width: 100%;
}
input:focus, select:focus, textarea:focus { outline: 2px solid var(--teal); outline-offset: 0; border-color: var(--teal); }
textarea { resize: vertical; }
.check { display: flex; align-items: center; gap: 8px; font-size: 13.5px; }
.check input { width: auto; }

.btn {
  display: inline-block; font: inherit; font-size: 13.5px; font-weight: 700;
  padding: 9px 16px; border-radius: 4px; border: 1px solid transparent;
  background: var(--ink); color: #fff; cursor: pointer; text-align: center;
}
.btn:hover { background: var(--navy-hover); text-decoration: none; }
.btn:focus-visible { outline: 2px solid var(--teal); outline-offset: 2px; }
.btn-ghost { background: var(--paper); color: var(--ink); border-color: var(--rule); }
.btn-ghost:hover { background: var(--mist); border-color: #B9C7CF; }
.btn-danger { background: var(--danger); }
.btn-danger:hover { background: #7E1C16; }
.btn-small { padding: 5px 10px; font-size: 12px; }
.btn[disabled] { opacity: .55; cursor: not-allowed; }

.inline-form { display: flex; align-items: flex-end; gap: 10px; flex-wrap: wrap; }
.inline-form .field { min-width: 200px; }
.approve { display: flex; align-items: flex-end; gap: 10px; flex-wrap: wrap; margin-top: 10px; }
.approve .field { min-width: 280px; flex: 1 1 280px; }
.stack .table { margin-top: 4px; }

details.edit { margin-top: 12px; border-top: 1px solid var(--rule); padding-top: 10px; }
details.edit summary {
  cursor: pointer; font-size: 13px; font-weight: 600; color: var(--teal);
  padding: 4px 0; list-style: none;
}
details.edit summary::before { content: "▸ "; }
details.edit[open] summary::before { content: "▾ "; }
details.edit .edit-body { padding: 12px 0 0; }

/* Notices */
.notice { background: var(--mist); border: 1px solid var(--rule); border-left: 3px solid var(--teal); padding: 12px 14px; border-radius: var(--radius); margin-top: 14px; font-size: 13.5px; }
.notice-warn { background: var(--warn-tint); border-color: var(--warn-rule); border-left-color: var(--warn); }
.alert { padding: 10px 14px; border-radius: var(--radius); margin-bottom: 16px; font-size: 13.5px; }
.alert-ok { background: var(--ok-tint); border: 1px solid var(--ok-rule); color: #23583A; }
.alert-err { background: var(--danger-tint); border: 1px solid var(--danger-rule); color: #7D231D; }
.alert-warn { background: var(--warn-tint); border: 1px solid var(--warn-rule); color: var(--warn); }
.alert-warn p { margin: 0 0 6px; }
.flag-list { margin: 0; padding-left: 18px; }
.flag-list li { margin: 4px 0; }
.flag-marker { margin-top: 4px; }
/* A field the CPR guard emptied after a rejected save (F13). */
.field > .felt-fejl { color: #7D231D; font-weight: 600; }
.field [aria-invalid="true"] { border-color: var(--danger-rule); }
.muted { color: var(--ink-soft); }
.small { font-size: 12px; }
.approved { font-size: 13px; color: var(--ok); margin-top: 8px; }
.sub { margin-top: 18px; }
.right { text-align: right; }

.three { display: grid; grid-template-columns: repeat(auto-fit, minmax(240px, 1fr)); gap: 14px; }
.mini { background: var(--mist); border: 1px solid var(--rule); border-radius: var(--radius); padding: 12px; }
.mini h3 { margin-bottom: 6px; }

.mitid { display: flex; justify-content: space-between; align-items: center; gap: 16px; margin-top: 12px; padding: 10px 14px; background: var(--mist); border: 1px dashed #B9C7CF; border-radius: var(--radius); }
.mitid p { margin: 0; }

.danger-zone { margin-top: 14px; padding: 12px 14px; border: 1px solid var(--danger-rule); background: var(--danger-tint); border-radius: var(--radius); }

.check-row { border-top: 1px solid var(--rule); padding: 12px 0; }
.check-title { font-weight: 600; font-size: 13.5px; margin-bottom: 8px; color: var(--ink); }

.lookup { margin-top: 12px; padding: 10px 14px; background: var(--teal-tint); border: 1px solid #C3D8D8; border-radius: var(--radius); font-size: 13.5px; }

/* Task queue */
.task-list { list-style: none; margin: 0; padding: 0; display: grid; gap: 8px; }
.task { display: flex; flex-direction: column; gap: 2px; padding: 10px 12px; border: 1px solid var(--rule); border-left: 3px solid var(--teal); border-radius: var(--radius); background: var(--paper); }
.task-hoej { border-left-color: var(--danger); background: #FDF8F7; }
.task-mellem { border-left-color: var(--warn); background: #FDFAF5; }
.task a { color: var(--ink); }
.task a:hover { color: var(--teal); }
/* A button inside a task keeps the button's own colours, not the task link colour. */
.task a.btn { color: #fff; }
.task a.btn:hover { color: #fff; }
.task a.btn-ghost { color: var(--ink); }
.task a.btn-ghost:hover { color: var(--ink); }

/* Login */
.login-body { display: flex; min-height: 100vh; align-items: center; justify-content: center; background: var(--ink); padding: 16px; }
.login-card { background: var(--paper); padding: 32px; border-radius: 8px; width: 380px; max-width: 100%; box-shadow: 0 20px 50px rgba(0,0,0,.25); }
.login-card .logo .logo-mark { width: 40px; }
.login-card .logo .wordmark { font-size: 1.3rem; }
.login-card h1 { font-size: 22px; margin-top: 22px; }

/* Law page */
.law-card h2 { margin-bottom: 8px; }
blockquote { margin: 10px 0; padding: 10px 14px; background: var(--mist); border-left: 3px solid var(--teal-logo); font-size: 13px; color: var(--text); }
blockquote p { margin: 0 0 6px; }
.quote-ref { font-size: 11px; text-transform: uppercase; letter-spacing: .4px; color: var(--ink-soft); font-weight: 600; }

@media (max-width: 800px) {
  .col-oprettet { display: none; }
}

@media (max-width: 760px) {
  .page-head { flex-direction: column; }
  .kv { flex-direction: column; gap: 2px; }
  .kv dt { flex: none; }
  .topbar { flex-wrap: wrap; gap: 10px; padding: 12px 16px; }
  .wrap { padding: 20px 16px 48px; }
  .subnav { padding: 8px 16px; }
}

/* Review: word-level comparison and review comments (F16). Changes carry
   text markers [+ … +] and [− … −] as well as colour, so they read without
   colour and in print. */
.diff-legende { margin: 0 0 12px; }
.diff-felt { border-top: 1px solid var(--rule); padding: 10px 0; }
.diff-felt h3 { margin: 0 0 6px; font-size: 14px; }
.diff-tekst { white-space: pre-wrap; overflow-wrap: break-word; font-size: 13.5px; }
.diff-mark { font-weight: 700; color: var(--ink); }
ins.diff-ins { background: var(--ok-tint); color: var(--text); text-decoration: underline; }
del.diff-del { background: var(--danger-tint); color: var(--text); text-decoration: line-through; }
.review-kommentarer { border: 1px solid var(--warn-rule); background: var(--warn-tint); border-radius: 6px; padding: 10px 14px; margin: 0 0 12px; }
.review-kommentarer h3 { margin: 0 0 6px; font-size: 14px; }
.review-kommentarer ul { margin: 0; padding-left: 18px; }
.review-kommentarer li { margin: 0 0 8px; }
.review-felt { border-left: 3px solid var(--warn); padding: 2px 8px; margin: 2px 0 8px; }

/* Guided documents (option C): each question beside its help; help is never printed. */
.guided { display: grid; gap: 14px; }
.gq-section { border: 1px solid var(--rule); border-radius: var(--radius); padding: 12px 14px 4px; margin: 0; background: var(--paper); }
.gq-section > legend { font-weight: 600; color: var(--ink); padding: 0 6px; }
.gq { display: grid; grid-template-columns: minmax(0, 3fr) minmax(0, 2fr); gap: 16px; padding: 12px 0; border-top: 1px solid var(--rule); }
.gq:first-of-type { border-top: 0; }
.gq[hidden] { display: none; }
.gq-label { display: block; font-weight: 600; color: var(--ink); margin: 0 0 6px; }
.gq-req { color: var(--warn); }
.gq textarea { width: 100%; }
.gq-sub { display: block; font-size: 13px; color: var(--ink-soft); margin: 8px 0 4px; }
.gq-choices { display: flex; flex-wrap: wrap; gap: 6px 16px; }
.gq-choice { display: inline-flex; align-items: center; gap: 6px; font-weight: 400; }
.gq-ir { margin-top: 8px; font-size: 13px; }
.gq-ir summary { cursor: pointer; color: var(--ink-soft); }
.gq-ir-nej { margin: 8px 0 0; }
.gq-help { background: var(--mist); border-left: 3px solid var(--teal-tint); border-radius: var(--radius); padding: 8px 12px; font-size: 13px; color: var(--ink-soft); align-self: start; }
.gq-help p { margin: 0 0 6px; }
.gq-kilder { margin: 0; padding-left: 16px; font-size: 12px; }
.gq-kind { display: inline-block; font-size: 11px; font-weight: 600; color: var(--teal); margin-right: 4px; }
.gq-komm { border-left: 3px solid var(--warn-rule); background: var(--warn-tint); padding: 4px 10px; margin-bottom: 6px; }
.gq-gaps { border: 1px solid var(--warn-rule); background: var(--warn-tint); border-radius: var(--radius); padding: 10px 14px; }
.gq-gaps.ok { border-color: var(--ok-rule); background: var(--ok-tint); }
.gq-gaps ul { margin: 6px 0 0; padding-left: 18px; font-size: 13px; }
.gq-eksisterende { border: 1px dashed var(--rule); background: var(--paper); border-radius: var(--radius); padding: 10px 14px; }
.gq-eksisterende h3 { margin: 0 0 4px; font-size: 15px; }
.gq-eksisterende-tekst { max-height: 320px; overflow: auto; margin: 6px 0 10px; }
.gq-prose h3 { font-size: 16px; margin: 14px 0 6px; }
@media (max-width: 760px) { .gq { grid-template-columns: 1fr; gap: 8px; } }
@media print { .gq-help, .gq-ir { display: none; } }
