/* Shared look for the tools at /vaerktoejer (A · Brede: Schibsted Grotesk + IBM Plex Mono, warm paper, one red). */
:root {
  /* colours from A · Brede: warm paper, ink, one red signal, green for "better" */
  --bg: #F4F1EA; --ink: #141414; --ink-2: #4A4741; --muted: #77736A; --line: #DAD4C6; --row: #ECE8DE;
  --desk: #141414; --desk-2: #1F1E1B; --desk-3: #2A2825; --desk-ink: #F4F1EA; --desk-muted: #A8A296; --desk-line: #33302B;
  --me: #C8102E; --up: #1F5E3A; --down: #C8102E;
  --skat: #C8102E; --service: #141414; --aeldre: #8A857A; --arbejde: #B57B12; --sundhed: #1F5E3A; --tryghed: #4A6B8A; --boern: #D9776B; --by: #5E8C7E;
  --sans: 'Schibsted Grotesk', 'Helvetica Neue', Arial, sans-serif; --mono: 'IBM Plex Mono', ui-monospace, monospace;
  --top: 56px;
}
* { box-sizing: border-box; }
html, body { margin: 0; background: var(--bg); color: var(--ink); font: 400 15px/1.45 var(--sans); }
a { color: inherit; }
button, input, select { font: inherit; color: inherit; }
:focus-visible { outline: 3px solid var(--me); outline-offset: 2px; }

/* top bar with the tool menu */
.top { display: flex; align-items: center; gap: 14px; height: var(--top); padding: 0 20px; border-bottom: 1px solid var(--ink); position: sticky; top: 0; background: var(--bg); z-index: 30; }
.mark { display: flex; align-items: center; gap: 10px; text-decoration: none; font-weight: 700; letter-spacing: -.02em; font-size: 17px; white-space: nowrap; }
.mark svg { width: 26px; height: 26px; flex: none; }
.tools { display: flex; gap: 2px; margin-left: 10px; overflow-x: auto; scrollbar-width: none; }
.tools a { text-decoration: none; padding: 8px 12px; border-radius: 999px; font-weight: 600; font-size: 14px; white-space: nowrap; color: var(--ink-2); }
.tools a:hover { background: var(--row); color: var(--ink); }
.tools a[aria-current] { background: var(--ink); color: var(--bg); }
.tools a span { font: 500 9px/1 var(--mono); text-transform: uppercase; letter-spacing: .06em; margin-left: 6px; color: var(--me); }
.sp { flex: 1; }
.btn { display: inline-flex; align-items: center; gap: 6px; border: 1px solid var(--ink); background: none; padding: 9px 12px; font: 500 11px/1 var(--mono); text-transform: uppercase; cursor: pointer; text-decoration: none; white-space: nowrap; }
.btn:hover { background: var(--ink); color: var(--bg); }
.btn.solid { background: var(--ink); color: var(--bg); }
.btn.solid:hover { background: #000; }

.app { display: grid; grid-template-columns: 400px minmax(0, 1fr); min-height: calc(100vh - var(--top)); }
.desk { background: var(--desk); color: var(--desk-ink); padding: 26px 22px 60px; position: sticky; top: var(--top); height: calc(100vh - var(--top)); overflow-y: auto; scrollbar-color: #444 transparent; }
.desk h1 { font: 700 36px/.95 var(--sans); letter-spacing: -.035em; margin: 0 0 10px; }
.desk .lead { color: var(--desk-muted); font-size: 14.5px; margin: 0 0 20px; }
.desk .lead b { color: var(--desk-ink); }
.desk .how { font-size: 12.5px; color: var(--desk-muted); border-top: 1px solid var(--desk-line); padding-top: 14px; margin-top: 22px; }
.desk .how b { color: var(--desk-ink); }
.step { font: 500 10.5px/1 var(--mono); text-transform: uppercase; letter-spacing: .08em; color: var(--me); margin: 22px 0 10px; }
.step:first-of-type { margin-top: 0; }
.desk select, .desk input[type=number], .desk input[type=text] { width: 100%; background: var(--desk-2); border: 1px solid var(--desk-line); color: var(--desk-ink); padding: 11px 12px; border-radius: 8px; font-size: 16px; }
.desk select:focus, .desk input:focus { border-color: var(--desk-ink); outline: none; }
.chips { display: flex; flex-wrap: wrap; gap: 6px; }
.chip { border: 1px solid var(--desk-line); background: var(--desk-2); padding: 8px 12px; border-radius: 999px; cursor: pointer; font-size: 13.5px; color: var(--desk-ink); }
.chip:hover { border-color: var(--desk-ink); }
.chip[aria-pressed="true"] { background: var(--desk-ink); color: var(--desk); border-color: var(--desk-ink); }
.chip i { display: inline-block; width: 8px; height: 8px; border-radius: 2px; background: var(--c); margin-right: 6px; vertical-align: 1px; }

.res { padding: 28px clamp(16px, 3vw, 44px) 120px; min-width: 0; }
.res-head { display: flex; flex-wrap: wrap; align-items: flex-end; gap: 14px 24px; margin-bottom: 18px; }
.res-head h2 { font: 700 clamp(28px, 3.4vw, 48px)/1 var(--sans); letter-spacing: -.035em; margin: 0; flex: 1 1 420px; }
.res-head h2 em { font-style: normal; background: var(--me); padding: 0 .12em; }
.sub { color: var(--ink-2); margin: -8px 0 18px; max-width: 70ch; }
.find { position: relative; }
.find input { border: 1px solid var(--ink); padding: 10px 12px 10px 34px; width: 240px; font-size: 15px; }
.find::before { content: '⌕'; position: absolute; left: 11px; top: 8px; font-size: 18px; color: var(--muted); }
.note { margin-top: 28px; font-size: 12.5px; color: var(--ink-2); max-width: 80ch; }
.note a { color: inherit; }
.tag { display: inline-block; font: 500 10px/1 var(--mono); text-transform: uppercase; letter-spacing: .06em; padding: 4px 6px; border: 1px solid currentColor; border-radius: 3px; }

/* mobile: the desk folds away behind a button */
.desk-toggle { display: none; }
@media (max-width: 900px) {
  .app { grid-template-columns: 1fr; }
  .desk { position: static; height: auto; padding-bottom: 26px; }
  .desk.folded > *:not(h1):not(.desk-toggle) { display: none; }
  .desk-toggle { display: block; width: 100%; margin-top: 12px; background: var(--desk-ink); color: var(--desk); border: 0; padding: 12px; border-radius: 8px; font-weight: 700; cursor: pointer; }
  .tools a { padding: 8px 10px; }
  .top .mark span { display: none; }
  .top .hide-s { display: none; }
}
@media (prefers-reduced-motion: reduce) { * { transition: none !important; animation: none !important; } }

/* grouped tool menu (15 tools) */
.tools { overflow: visible; }
.tm { position: relative; }
.tm summary { list-style: none; display: flex; align-items: center; gap: 10px; cursor: pointer; padding: 8px 14px; border: 1px solid var(--ink); border-radius: 999px; white-space: nowrap; }
.tm summary::-webkit-details-marker { display: none; }
.tm summary b { font-size: 14px; }
.tm summary span { font: 500 10.5px/1 var(--mono); color: var(--muted); text-transform: uppercase; }
.tm[open] summary { background: var(--ink); color: var(--bg); }
.tm-panel { position: absolute; top: calc(100% + 8px); left: 0; z-index: 50; background: var(--bg); border: 1px solid var(--ink); box-shadow: 8px 8px 0 var(--ink);
  display: grid; grid-template-columns: repeat(3, minmax(190px, 1fr)); gap: 4px 18px; padding: 16px 18px; width: max-content; max-width: calc(100vw - 32px); }
.tm-panel p { margin: 0 0 6px; font: 500 10.5px/1 var(--mono); text-transform: uppercase; letter-spacing: .06em; color: var(--muted); }
.tm-panel a { display: block; padding: 7px 8px; margin: 0 -8px; border-radius: 6px; text-decoration: none; font-weight: 600; font-size: 14.5px; }
.tm-panel a:hover { background: var(--row); }
.tm-panel a[aria-current] { background: var(--me); }
@media (max-width: 700px) { .tm-panel { grid-template-columns: 1fr; left: -60px; } }

/* A · Brede colours: red is a signal, not a highlighter */
.res-head h2 em { background: none; color: var(--me); padding: 0; }
.step, .tools a span { color: #E8475C; }
.tm-panel a[aria-current] { background: var(--ink); color: var(--bg); }
.tm-panel { box-shadow: 8px 8px 0 var(--line); }
.btn.solid:hover { background: var(--me); border-color: var(--me); }
.tools a span { color: var(--me); }
/* on the dark desk the red is lifted so it stays readable */
.desk { --me: #E8475C; }

/* phones: wide tables scroll inside their own box, never the whole page */
@media (max-width: 600px) {
  html, body { overflow-x: clip; }
  .res table { display: block; max-width: 100%; overflow-x: auto; -webkit-overflow-scrolling: touch; }
  .top { padding: 0 12px; gap: 10px; }
}

/* Embedded under a card on /vaerktoejer: no top bar, light desk, natural height (the page around it scrolls) */
html.embed { --top: 0px; --desk: #ECE8DE; --desk-2: #F4F1EA; --desk-3: #E4DFD3; --desk-ink: #141414; --desk-muted: #4A4741; --desk-line: #DAD4C6; }
html.embed, html.embed body { background: #F4F1EA; overflow: hidden; }
html.embed .top { display: none; }
html.embed .app { min-height: 0; grid-template-columns: 340px minmax(0, 1fr); }
html.embed .desk { --me: #C8102E; position: static; height: auto; overflow: visible; padding-bottom: 28px; border-right: 1px solid var(--desk-line); }
html.embed .step { color: var(--me); }
html.embed .res { padding-bottom: 40px; }
html.embed .card { top: 16px; }
@media (max-width: 900px) { html.embed .app { grid-template-columns: 1fr; } html.embed .desk { border-right: 0; border-bottom: 1px solid var(--desk-line); } }
