/* Ledig Parkering API portal. Colours from the logo. */
@font-face { font-family: "Schibsted Grotesk"; font-weight: 400; font-display: swap; src: url("/fonts/schibsted-grotesk-latin-400-normal.woff2") format("woff2"); }
@font-face { font-family: "Schibsted Grotesk"; font-weight: 500; font-display: swap; src: url("/fonts/schibsted-grotesk-latin-500-normal.woff2") format("woff2"); }
@font-face { font-family: "Schibsted Grotesk"; font-weight: 700; font-display: swap; src: url("/fonts/schibsted-grotesk-latin-700-normal.woff2") format("woff2"); }
@font-face { font-family: "Schibsted Grotesk"; font-weight: 800; font-display: swap; src: url("/fonts/schibsted-grotesk-latin-800-normal.woff2") format("woff2"); }
@font-face { font-family: "Schibsted Grotesk"; font-weight: 400; font-display: swap; unicode-range: U+0100-024F, U+1E00-1EFF; src: url("/fonts/schibsted-grotesk-latin-ext-400-normal.woff2") format("woff2"); }
@font-face { font-family: "Schibsted Grotesk"; font-weight: 700; font-display: swap; unicode-range: U+0100-024F, U+1E00-1EFF; src: url("/fonts/schibsted-grotesk-latin-ext-700-normal.woff2") format("woff2"); }
@font-face { font-family: "IBM Plex Mono"; font-weight: 400; font-display: swap; src: url("/fonts/ibm-plex-mono-latin-400-normal.woff2") format("woff2"); }
@font-face { font-family: "IBM Plex Mono"; font-weight: 500; font-display: swap; src: url("/fonts/ibm-plex-mono-latin-500-normal.woff2") format("woff2"); }

:root {
  --fjord: #0f3b3a;        /* headings, code background */
  --fjord-2: #154b49;      /* code header, hover on dark */
  --teal: #32baaa;         /* the logo */
  --teal-ink: #17796f;     /* links and buttons on light backgrounds (AA) */
  --teal-ink-hover: #0f5f57;
  --mist: #eef5f4;         /* page background */
  --paper: #ffffff;
  --line: #cfe3e0;
  --text: #1d3332;
  --muted: #557271;
  --amber: #f2b544;        /* "temporarily unavailable" */
  --red: #b4322a;
  --sans: "Schibsted Grotesk", system-ui, -apple-system, "Segoe UI", sans-serif;
  --mono: "IBM Plex Mono", ui-monospace, SFMono-Regular, Menlo, monospace;
  --radius-lg: 14px;
  --radius: 8px;
}

* { box-sizing: border-box; }
html { scroll-behavior: smooth; scroll-padding-top: 88px; }
@media (prefers-reduced-motion: reduce) { html { scroll-behavior: auto; } * { transition: none !important; animation: none !important; } }
body { margin: 0; background: var(--mist); color: var(--text); font: 400 16px/1.6 var(--sans); -webkit-font-smoothing: antialiased; }
img { max-width: 100%; }
a { color: var(--teal-ink); text-underline-offset: 3px; text-decoration-thickness: 1px; }
a:hover { color: var(--teal-ink-hover); }
:focus-visible { outline: 3px solid var(--teal); outline-offset: 2px; border-radius: 4px; }
code, pre, kbd { font-family: var(--mono); }
.skip { position: absolute; left: -9999px; }
.skip:focus { left: 16px; top: 12px; z-index: 50; background: var(--paper); padding: 8px 12px; }

/* ---------- header ---------- */
.site-header { position: sticky; top: 0; z-index: 20; background: rgba(238, 245, 244, .92); backdrop-filter: saturate(1.4) blur(8px); border-bottom: 1px solid var(--line); }
.site-header .inner { max-width: 1320px; margin: 0 auto; padding: 12px 24px; display: flex; align-items: center; gap: 24px; }
.brand { display: flex; white-space: nowrap; align-items: center; gap: 10px; color: var(--fjord); text-decoration: none; font-weight: 800; font-size: 18px; letter-spacing: -.01em; }
.brand img { width: 38px; height: 38px; display: block; }
.brand small { font-weight: 500; color: var(--muted); font-size: 15px; }
.site-nav { margin-left: auto; display: flex; align-items: center; gap: 6px; }
.site-nav a { white-space: nowrap; padding: 8px 12px; border-radius: 999px; color: var(--fjord); text-decoration: none; font-weight: 500; font-size: 15px; }
.site-nav a:hover { background: #dcecea; color: var(--fjord); }
.site-nav a[aria-current="page"] { background: #dcecea; }
.site-nav a.cta { background: var(--teal-ink); color: #fff; }
.site-nav a.cta:hover { background: var(--teal-ink-hover); color: #fff; }

/* ---------- footer ---------- */
.site-footer { border-top: 1px solid var(--line); margin-top: 72px; }
.site-footer .inner { max-width: 1320px; margin: 0 auto; padding: 28px 24px 40px; display: flex; gap: 16px; flex-wrap: wrap; justify-content: space-between; color: var(--muted); font-size: 14px; }

/* ---------- buttons & forms ---------- */
.btn { display: inline-flex; align-items: center; justify-content: center; gap: 8px; font: 700 16px/1 var(--sans); padding: 14px 22px; border-radius: 999px; border: 0; cursor: pointer; text-decoration: none; }
.btn-primary { background: var(--teal-ink); color: #fff; }
.btn-primary:hover { background: var(--teal-ink-hover); color: #fff; }
.btn-primary:disabled { background: #9bbcb8; cursor: not-allowed; }
.btn-quiet { background: transparent; color: var(--teal-ink); padding: 14px 4px; }
.field { margin-bottom: 18px; }
.field label { display: block; font-weight: 700; font-size: 15px; margin-bottom: 6px; color: var(--fjord); }
.field .help { font-size: 14px; color: var(--muted); margin-top: 6px; }
.field input, .field select { width: 100%; font: 400 16px/1.4 var(--sans); color: var(--text); background: var(--paper); border: 1px solid #b9d3cf; border-radius: var(--radius); padding: 12px 14px; }
.field input:focus, .field select:focus { outline: none; border-color: var(--teal-ink); box-shadow: 0 0 0 3px rgba(50, 186, 170, .35); }
.field input[aria-invalid="true"] { border-color: var(--red); }
.field .error { color: var(--red); font-size: 14px; margin-top: 6px; }
.check { display: flex; gap: 10px; align-items: flex-start; font-size: 15px; margin: 6px 0 22px; }
.check input { width: 20px; height: 20px; margin: 2px 0 0; accent-color: var(--teal-ink); flex: none; }
.notice { border-radius: var(--radius); padding: 14px 16px; font-size: 15px; }
.notice-error { background: #fbe9e7; color: #7c211b; }
.notice-info { background: #e1f1ef; color: var(--fjord); }

/* ---------- docs layout ---------- */
.docs { max-width: 1320px; margin: 0 auto; padding: 0 24px; display: grid; grid-template-columns: 220px minmax(0, 1fr); gap: 48px; }
.docs-nav { position: sticky; top: 88px; align-self: start; max-height: calc(100vh - 100px); overflow: auto; padding: 32px 0 24px; }
.docs-nav h2 { font-size: 14px; font-weight: 700; color: var(--muted); margin: 22px 0 6px; }
.docs-nav h2:first-child { margin-top: 0; }
.docs-nav ul { list-style: none; margin: 0; padding: 0; }
.docs-nav a { display: block; padding: 6px 10px; margin-left: -10px; border-radius: 6px; color: var(--fjord); text-decoration: none; font-size: 15px; border-left: 3px solid transparent; }
.docs-nav a:hover { background: #dcecea; }
.docs-nav a.active { background: var(--paper); border-left-color: var(--teal); font-weight: 700; }
.docs-main { padding-top: 32px; min-width: 0; }

/* ---------- hero: the garage signs ---------- */
.hero { padding: 24px 0 56px; border-bottom: 1px solid var(--line); }
.hero h1 { font-size: clamp(34px, 4.6vw, 58px); line-height: 1.04; letter-spacing: -.025em; font-weight: 800; color: var(--fjord); margin: 0 0 18px; max-width: 16ch; }
.hero .lede { font-size: 19px; color: var(--muted); max-width: 60ch; margin: 0 0 28px; }
.hero .actions { display: flex; gap: 18px; align-items: center; flex-wrap: wrap; margin-bottom: 44px; }
.signs { list-style: none; padding: 0; margin: 0; display: grid; grid-template-columns: repeat(5, minmax(0, 1fr)); gap: 10px; }
.sign { background: var(--fjord); color: #fff; border-radius: var(--radius); padding: 14px 16px 16px; min-height: 128px; display: flex; flex-direction: column; justify-content: space-between; }
.sign .garage { font-size: 14px; font-weight: 500; color: #b9dcd8; }
.sign .word { display: block; font: 700 13px/1 var(--sans); letter-spacing: .14em; color: var(--teal); margin-top: 14px; }
.sign .count { display: block; font: 500 40px/1 var(--mono); color: var(--teal); text-shadow: 0 0 18px rgba(50, 186, 170, .45); font-variant-numeric: tabular-nums; margin-top: 6px; }
.sign.off .word, .sign.off .count { color: var(--amber); text-shadow: none; }
.sign.off .count { font-size: 16px; font-family: var(--sans); font-weight: 700; line-height: 1.25; }
.signs-caption { margin: 12px 0 0; font-size: 14px; color: var(--muted); }
.signs-caption code { color: var(--fjord); }
@media (prefers-reduced-motion: no-preference) {
  .sign .count { animation: flicker .9s steps(2, end) both; }
  .sign:nth-child(2) .count { animation-delay: .08s; }
  .sign:nth-child(3) .count { animation-delay: .16s; }
  .sign:nth-child(4) .count { animation-delay: .24s; }
  .sign:nth-child(5) .count { animation-delay: .32s; }
  @keyframes flicker { 0% { opacity: 0; } 40% { opacity: .55; } 60% { opacity: .2; } 100% { opacity: 1; } }
}

/* ---------- sections ---------- */
.doc-section { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1.08fr); gap: 40px; padding: 56px 0; border-bottom: 1px solid var(--line); }
.doc-section:last-child { border-bottom: 0; }
.doc-section.prose-only { grid-template-columns: minmax(0, 1fr); }
.doc-section h2 { font-size: 28px; line-height: 1.15; letter-spacing: -.015em; color: var(--fjord); margin: 0 0 12px; font-weight: 800; }
.doc-section h3 { font-size: 16px; color: var(--fjord); margin: 28px 0 10px; font-weight: 700; }
.doc-section p, .doc-section li { max-width: 62ch; }
.doc-section p { margin: 0 0 14px; }
.endpoint { display: inline-flex; align-items: center; gap: 10px; background: var(--paper); border: 1px solid var(--line); border-radius: 999px; padding: 5px 14px 5px 5px; margin-bottom: 16px; max-width: 100%; }
.method { font: 700 13px/1 var(--mono); background: var(--teal); color: var(--fjord); padding: 7px 10px; border-radius: 999px; }
.endpoint code { font-size: 15px; color: var(--fjord); overflow-wrap: anywhere; }
.endpoint code .param { color: var(--teal-ink); font-weight: 500; }
.ids { display: flex; flex-wrap: wrap; gap: 8px; padding: 0; margin: 0; list-style: none; }
.ids code { display: inline-block; background: #dcecea; color: var(--fjord); padding: 3px 9px; border-radius: 6px; font-size: 14px; }
.note { border-left: 3px solid var(--amber); background: #fdf5e4; padding: 10px 14px; border-radius: 0 var(--radius) var(--radius) 0; font-size: 15px; max-width: 62ch; margin: 18px 0 0; }
table.errors { width: 100%; border-collapse: collapse; font-size: 15px; }
table.errors th { text-align: left; font-weight: 700; color: var(--muted); font-size: 14px; padding: 0 12px 8px 0; }
table.errors td { padding: 9px 12px 9px 0; border-top: 1px solid var(--line); vertical-align: top; }
table.errors td:first-child { white-space: nowrap; font-family: var(--mono); font-size: 14px; }
table.errors td code { overflow-wrap: anywhere; }
table.errors code { font-size: 14px; color: var(--fjord); }

/* ---------- code panels ---------- */
.code-col { display: flex; flex-direction: column; gap: 16px; min-width: 0; }
.code { background: var(--fjord); color: #d7ecea; border-radius: var(--radius-lg); overflow: hidden; }
.code-head { display: flex; align-items: center; gap: 4px; padding: 6px 6px 6px 16px; background: var(--fjord-2); }
.code-head .label { font-size: 14px; font-weight: 700; color: #b9dcd8; margin-right: auto; }
.tab { font: 500 14px/1 var(--sans); color: #b9dcd8; background: transparent; border: 0; padding: 8px 12px; border-radius: 999px; cursor: pointer; }
.tab[aria-selected="true"] { background: var(--fjord); color: #fff; }
.copy { font: 500 14px/1 var(--sans); color: #b9dcd8; background: transparent; border: 1px solid rgba(185, 220, 216, .35); padding: 7px 12px; border-radius: 999px; cursor: pointer; margin-left: 6px; }
.copy:hover, .tab:hover { color: #fff; }
.code pre { margin: 0; padding: 18px 20px; overflow: auto; font-size: 13.5px; line-height: 1.65; tab-size: 2; }
.code.response pre { max-height: 460px; }
.tok-key { color: #8fe0d6; }
.tok-str { color: #f6d38a; }
.tok-num { color: #ffffff; }
.tok-lit { color: #ffb4a8; }
.tok-kw { color: #8fe0d6; }
.tok-cmd { color: #ffffff; font-weight: 500; }
.tok-flag { color: #8fe0d6; }
.panel[hidden] { display: none; }

/* ---------- auth explainer ---------- */
.steps-inline { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 12px; margin: 22px 0 0; }
.steps-inline div { background: var(--paper); border: 1px solid var(--line); border-radius: var(--radius); padding: 14px 16px; }
.steps-inline b { display: block; color: var(--fjord); margin-bottom: 4px; }
.steps-inline code { font-size: 13.5px; overflow-wrap: anywhere; color: var(--teal-ink); }

/* ---------- signup & test pages ---------- */
.page { max-width: 1080px; margin: 0 auto; padding: 48px 24px 0; }
.split { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 460px); gap: 64px; align-items: start; }
.split h1 { font-size: clamp(32px, 4vw, 48px); line-height: 1.06; letter-spacing: -.025em; font-weight: 800; color: var(--fjord); margin: 0 0 18px; max-width: 14ch; }
.split .lede { font-size: 18px; color: var(--muted); max-width: 46ch; }
.split ul.plain { padding-left: 20px; margin: 22px 0 0; }
.split ul.plain li { margin-bottom: 8px; max-width: 46ch; }
.form-card { background: var(--paper); border-radius: var(--radius-lg); padding: 30px; border: 1px solid var(--line); }
.form-card h2 { margin: 0 0 18px; font-size: 22px; color: var(--fjord); }
.keys { display: grid; gap: 12px; margin: 6px 0 18px; }
.key { background: var(--mist); border-radius: var(--radius); padding: 12px 14px; }
.key span { display: block; font-size: 14px; font-weight: 700; color: var(--muted); }
.key div { display: flex; gap: 10px; align-items: center; justify-content: space-between; }
.key code { font-size: 17px; color: var(--fjord); overflow-wrap: anywhere; }
.key .copy { color: var(--teal-ink); border-color: #b9d3cf; margin: 0; }
.done h2 { display: flex; align-items: center; gap: 10px; }
.done h2::before { content: ""; width: 22px; height: 22px; border-radius: 50%; background: var(--teal) url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24'%3E%3Cpath d='M6 12.5l4 4 8-9' fill='none' stroke='%230f3b3a' stroke-width='3' stroke-linecap='round' stroke-linejoin='round'/%3E%3C/svg%3E") center/14px no-repeat; }

/* ---------- small screens ---------- */
@media (max-width: 1100px) {
  .doc-section { grid-template-columns: minmax(0, 1fr); gap: 24px; }
  .signs { grid-template-columns: repeat(3, minmax(0, 1fr)); }
}
@media (max-width: 860px) {
  .docs { grid-template-columns: minmax(0, 1fr); gap: 0; padding: 0; }
  .docs-main { padding: 8px 16px 0; }
  .docs-nav { position: sticky; top: 63px; z-index: 10; max-height: none; padding: 0; background: var(--mist); border-bottom: 1px solid var(--line); overflow-x: auto; white-space: nowrap; }
  .docs-nav h2 { display: none; }
  .docs-nav ul { display: inline-flex; gap: 4px; padding: 8px 12px 8px 0; }
  .docs-nav nav > ul:first-of-type { padding-left: 16px; }
  .docs-nav nav { display: flex; }
  .docs-nav a { margin: 0; border-left: 0; border-radius: 999px; padding: 6px 12px; }
  .docs-nav a.active { box-shadow: inset 0 0 0 2px var(--teal); }
  html { scroll-padding-top: 130px; }
  .split { grid-template-columns: minmax(0, 1fr); gap: 32px; }
  .site-header .inner { padding: 10px 16px; gap: 12px; }
  .brand small { display: none; }
  .page { padding: 32px 16px 0; }
  .form-card { padding: 22px; }
}
@media (max-width: 560px) {
  .signs { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .sign { min-height: 112px; }
  .sign .count { font-size: 32px; }
  .steps-inline { grid-template-columns: minmax(0, 1fr); }
  .site-nav a:not(.cta) { display: none; }
  .signs li:last-child:nth-child(odd) { grid-column: 1 / -1; }
  /* errors table becomes a list */
  table.errors thead { display: none; }
  table.errors, table.errors tbody, table.errors tr, table.errors td { display: block; }
  table.errors tr { border-top: 1px solid var(--line); padding: 10px 0; }
  table.errors td { border: 0; padding: 2px 0; }
  .site-footer .inner { padding: 24px 16px 32px; }
}
