/* Design tokens, taken from the agreed canvas. */
:root {
  --font-body: 'Inter', system-ui, sans-serif;
  --font-head: 'Schibsted Grotesk', 'Inter', system-ui, sans-serif;

  --bg: #F4F6F9;
  --surface: #FFFFFF;
  --surface-side: #FBFCFD;
  --surface-head: #F9FAFB;
  --border: #E4E7EC;
  --border-soft: #F2F4F7;
  --border-input: #D0D5DD;

  --text: #101828;
  --text-2: #344054;
  --text-muted: #5D6778;
  --text-label: #667085;
  --link: #1E3A5F;
  --link-hover: #0F2440;

  --navy: #1E3A5F;
  --navy-tint: #E8EEF6;
  --hero: #12263F;
  --hero-text: #E8EEF6;
  --hero-muted: #9FB3CC;
  --hero-soft: #B7C6D9;
  --highlight: #F5C451;

  /* Status tags: tinted background plus wording, never colour alone. */
  --late-fg: #B42318;   --late-bg: #FDECEA;
  --soon-fg: #9A5B00;   --soon-bg: #FEF3DC;
  --done-fg: #146C43;   --done-bg: #E3F5EC;
  --info-fg: #1E3A5F;   --info-bg: #E8EEF6;
  --none-fg: #475467;   --none-bg: #F2F4F7;
  --sample-fg: #7A4A00;

  --radius-sm: 4px;
  --radius: 6px;
  --radius-card: 10px;
  --radius-hero: 12px;
}

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

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

body {
  margin: 0;
  font-family: var(--font-body);
  font-size: 13px;
  line-height: 1.45;
  color: var(--text);
  background: var(--bg);
}

h1, h2, h3 { font-family: var(--font-head); font-weight: 600; margin: 0; }
h1 { font-size: 24px; line-height: 1.2; letter-spacing: -0.01em; }
h2 { font-size: 16px; }
h3 { font-size: 14px; }
p { margin: 0; }

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

button, input, select, textarea { font: inherit; color: inherit; }
button { cursor: pointer; }

.num { font-variant-numeric: tabular-nums; }

/* Visible focus everywhere, keyboard only. */
:focus { outline: none; }
:focus-visible { outline: 2px solid var(--navy); outline-offset: 2px; border-radius: 2px; }
main:focus-visible, h1:focus-visible { outline: none; }

.visually-hidden {
  position: absolute !important;
  width: 1px; height: 1px;
  margin: -1px; padding: 0; border: 0;
  overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap;
}

.skip-link {
  position: absolute; left: 12px; top: -48px; z-index: 100;
  padding: 8px 12px; border-radius: var(--radius);
  background: var(--hero); color: #FFFFFF; font-weight: 600;
}
.skip-link:focus { top: 12px; }

.noscript { padding: 32px; font-size: 15px; }

/* Screen container. */
.page {
  padding: 24px 32px 48px;
  max-width: 1600px; width: 100%; margin-inline: auto;
  display: flex; flex-direction: column; gap: 24px;
}
.page-note { color: var(--text-muted); }

/* Status tag (option 2 on the canvas). */
.tag {
  display: inline-block;
  font-size: 12px; font-weight: 600;
  padding: 3px 8px; border-radius: var(--radius-sm);
  white-space: nowrap;
  color: var(--none-fg); background: var(--none-bg);
}
.tag--late   { color: var(--late-fg); background: var(--late-bg); }
.tag--soon   { color: var(--soon-fg); background: var(--soon-bg); }
.tag--done   { color: var(--done-fg); background: var(--done-bg); }
.tag--info   { color: var(--info-fg); background: var(--info-bg); }
.tag--sample { color: var(--sample-fg); background: var(--soon-bg); }

/* Card surface used by every section. */
.card {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius-card);
}

.card-head {
  display: flex; flex-wrap: wrap; justify-content: space-between; align-items: baseline; gap: 12px;
  padding: 16px 20px 12px;
}
.card-link { font-weight: 500; }
.card-note { font-size: 12px; color: var(--text-muted); }

/* Tables. Whole rows are clickable through a stretched .row-link. */
.table-scroll { overflow-x: auto; }
.table { width: 100%; border-collapse: collapse; }
.table th {
  padding: 8px 14px; text-align: left;
  font-size: 12px; font-weight: 500; color: var(--text-muted);
  background: var(--surface-head);
  border-top: 1px solid var(--border); border-bottom: 1px solid var(--border);
}
.table td { padding: 12px 14px; border-bottom: 1px solid var(--border-soft); vertical-align: middle; }
.table th:first-child, .table td:first-child { padding-left: 20px; }
.table th:last-child, .table td:last-child { padding-right: 20px; }
.table tbody tr:last-child td { border-bottom: 0; }
.table tbody tr { position: relative; }
.table tbody tr:hover { background: var(--surface-head); }
.cell-ref { font-weight: 600; color: var(--link); white-space: nowrap; }
.cell-muted { color: var(--text-muted); }
.table .cell-num { text-align: right; }
.row-link { color: var(--text); font-weight: 500; text-decoration: none; }
.row-link::after { content: ''; position: absolute; inset: 0; }
.row-link:hover { color: var(--text); text-decoration: underline; }
.row-link:focus-visible { outline: none; }
.row-link:focus-visible::after { outline: 2px solid var(--navy); outline-offset: -2px; border-radius: 2px; }

/* Progress bar plus its number (the number carries the meaning). */
.progress { display: flex; align-items: center; gap: 10px; }
.bar { flex: 1; max-width: 120px; height: 6px; background: #EAECF0; border-radius: 3px; overflow: hidden; }
.bar-fill { display: block; height: 100%; border-radius: 3px; background: var(--navy); }
.bar-fill.is-complete { background: #1F9D62; }
.progress-value { width: 36px; color: var(--text-2); }

/* Icons, rendered only through js/icon.js. */
.icon {
  font-family: 'Material Symbols Outlined';
  font-weight: normal; font-style: normal;
  font-size: 18px; line-height: 1;
  display: inline-block; flex: none;
  width: 1em; overflow: hidden;
  letter-spacing: normal; text-transform: none; white-space: nowrap; direction: ltr;
  font-feature-settings: 'liga';
  -webkit-font-smoothing: antialiased;
  user-select: none;
}

/* Explained term (js/tooltip.js). */
.term { position: relative; display: inline-block; }
.term-label {
  font: inherit; font-weight: 600; color: inherit;
  background: none; border: 0; padding: 0; cursor: help; text-align: left;
  text-decoration: underline dotted; text-decoration-color: #98A2B3; text-underline-offset: 3px;
}
.term-tip {
  display: none;
  position: fixed; left: 0; top: 0; z-index: 150; /* placed by js/tooltip.js */
  width: max-content; max-width: 280px;
  margin-top: 0; border-top: 6px solid transparent; background-clip: padding-box;
  padding: 8px 10px; border-radius: var(--radius);
  background-color: var(--text); color: #FFFFFF;
  font-size: 12px; font-weight: 400; line-height: 1.45; text-align: left; white-space: normal;
  box-shadow: 0 4px 12px rgba(16, 24, 40, 0.18);
}
.term:hover .term-tip, .term:focus-within .term-tip, .term.is-open .term-tip { display: block; }
.term.is-hidden .term-tip { display: none; }

/* Big monitors: scale the whole layout up, like browser zoom, so text isn't tiny. */
/* Zoom also scales vh, so full-height elements divide by --zoom (see .sidebar). */
:root { --zoom: 1; }
@media (min-width: 1800px) { :root { --zoom: 1.15; } }
@media (min-width: 2300px) { :root { --zoom: 1.25; } }
html { zoom: var(--zoom); }

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

/* Neutral tags get a hairline so they still read on tinted (selected or hover) rows. */
.tag:not([class*='tag--']) { box-shadow: inset 0 0 0 1px var(--border); }
