/*
  Coni × Vipps MobilePay × PowerOffice Go — control plane.
  Visual identity carried over from the onboarding prototype
  (feat/onboarding-ui, ui/onboarding/assets/styles.css): dark navy / teal,
  IBM Plex Sans + Source Serif 4 for editorial headings, local fonts only.
  No Vipps or PowerOffice logos or brand elements (docs/beslutninger.md B28).
*/

/* ---------- Fonts (local files, SIL OFL 1.1 — see fonts/SOURCES.md) ---------- */

@font-face {
  font-family: 'IBM Plex Sans';
  font-style: normal;
  font-weight: 400;
  font-display: swap;
  src: url('./fonts/IBMPlexSans-Regular.woff2') format('woff2');
}
@font-face {
  font-family: 'IBM Plex Sans';
  font-style: normal;
  font-weight: 500;
  font-display: swap;
  src: url('./fonts/IBMPlexSans-Medium.woff2') format('woff2');
}
@font-face {
  font-family: 'IBM Plex Sans';
  font-style: normal;
  font-weight: 600;
  font-display: swap;
  src: url('./fonts/IBMPlexSans-SemiBold.woff2') format('woff2');
}
@font-face {
  font-family: 'IBM Plex Sans';
  font-style: normal;
  font-weight: 700;
  font-display: swap;
  src: url('./fonts/IBMPlexSans-Bold.woff2') format('woff2');
}
@font-face {
  font-family: 'Source Serif 4';
  font-style: normal;
  font-weight: 600;
  font-display: swap;
  src: url('./fonts/SourceSerif4-SemiBold.woff2') format('woff2');
}
@font-face {
  font-family: 'Source Serif 4';
  font-style: normal;
  font-weight: 700;
  font-display: swap;
  src: url('./fonts/SourceSerif4-Bold.woff2') format('woff2');
}

:root {
  --font-sans: 'IBM Plex Sans', 'Segoe UI', system-ui, -apple-system, Arial, sans-serif;
  --font-serif: 'Source Serif 4', Georgia, 'Iowan Old Style', 'Palatino Linotype', serif;
  --font-mono: 'SFMono-Regular', Consolas, 'Liberation Mono', Menlo, monospace;
  --bg: #050912;
  --bg-alt: #0a1220;
  --panel: #0d1a2b;
  --panel-solid: #101f33;
  --border: rgba(158, 205, 212, 0.16);
  --border-strong: rgba(158, 205, 212, 0.34);
  --text: #eef6f8;
  --text-muted: #9fb4c2;
  --text-faint: #7d93a1;
  --accent: #2dd4bf;
  --accent-strong: #7cf2e2;
  --accent-text: #04140f;
  --accent-dim: rgba(45, 212, 191, 0.14);
  --warn: #f5b942;
  --warn-bg: rgba(245, 185, 66, 0.12);
  --warn-border: rgba(245, 185, 66, 0.4);
  --danger: #f87171;
  --danger-bg: rgba(248, 113, 113, 0.12);
  --danger-border: rgba(248, 113, 113, 0.4);
  --ok: #34d399;
  --ok-bg: rgba(52, 211, 153, 0.12);
  --ok-border: rgba(52, 211, 153, 0.4);
  --info: #7cb8fb;
  --info-bg: rgba(96, 165, 250, 0.12);
  --info-border: rgba(96, 165, 250, 0.4);
  --mock: #c084fc;
  --mock-bg: rgba(192, 132, 252, 0.1);
  --mock-border: rgba(192, 132, 252, 0.35);
  --radius-lg: 14px;
  --radius-md: 10px;
  --radius-sm: 7px;
  --max-width: 1100px;
  color-scheme: dark;
}

* {
  box-sizing: border-box;
}

html {
  background: var(--bg);
}

body {
  margin: 0;
  background: var(--bg);
  color: var(--text);
  font: 16px/1.6 var(--font-sans);
  -webkit-font-smoothing: antialiased;
}

img {
  max-width: 100%;
  display: block;
}

a {
  color: var(--accent-strong);
  text-underline-offset: 2px;
}

h1,
h2,
h3,
h4 {
  font-family: var(--font-sans);
  font-weight: 600;
  letter-spacing: -0.005em;
  margin: 0 0 0.5em;
  line-height: 1.25;
}
h1 {
  font-size: clamp(26px, 3.4vw, 36px);
}
h2 {
  font-size: 19px;
}
h3 {
  font-size: 15.5px;
}
p {
  margin: 0 0 1em;
  color: var(--text-muted);
}
ul,
ol {
  color: var(--text-muted);
}

.editorial {
  font-family: var(--font-serif);
  font-weight: 600;
  letter-spacing: -0.01em;
}

.skip-link {
  position: absolute;
  left: -999px;
  top: auto;
  background: var(--accent);
  color: var(--accent-text);
  padding: 10px 16px;
  border-radius: var(--radius-sm);
  z-index: 200;
  font-weight: 600;
}
.skip-link:focus {
  left: 16px;
  top: 16px;
}

:focus-visible {
  outline: 3px solid var(--accent-strong);
  outline-offset: 2px;
  border-radius: 4px;
}

.wrap {
  max-width: var(--max-width);
  margin: 0 auto;
  padding: 0 20px;
}
.wrap-narrow {
  max-width: 900px;
  margin: 0 auto;
  padding: 0 20px;
}

/* ---------- Prototype marking (docs/copy-guide.md 18.6) ---------- */

.banner-mock {
  background: var(--mock-bg);
  border-bottom: 1px solid var(--mock-border);
  color: var(--mock);
  font-size: 13px;
  text-align: center;
  padding: 7px 16px;
}

/* ---------- Header / nav ---------- */

.site-header {
  position: sticky;
  top: 0;
  z-index: 50;
  background: rgba(5, 9, 18, 0.9);
  backdrop-filter: blur(10px);
  border-bottom: 1px solid var(--border);
}
.site-header .wrap {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding-top: 18px;
  padding-bottom: 18px;
  gap: 16px;
  flex-wrap: wrap;
}
.brand {
  display: flex;
  align-items: center;
  gap: 12px;
  text-decoration: none;
  min-width: 0;
}
.brand-logo {
  height: 40px;
  width: auto;
}
.brand-sub {
  font-size: 11px;
  color: var(--text-faint);
  letter-spacing: 0.06em;
  text-transform: uppercase;
  white-space: nowrap;
}
.site-nav {
  display: flex;
  align-items: center;
  gap: 4px;
  flex-wrap: wrap;
}
.site-nav a {
  text-decoration: none;
  font-size: 14px;
  color: var(--text-muted);
  padding: 8px 12px;
  border-radius: var(--radius-sm);
  white-space: nowrap;
}
.site-nav a:hover {
  color: var(--text);
  background: var(--panel);
}
.site-nav a[aria-current='page'] {
  color: var(--accent-strong);
  background: var(--accent-dim);
  font-weight: 600;
}

/* ---------- Sections / cards ---------- */

.calm-surface {
  background:
    radial-gradient(ellipse 900px 420px at 15% -10%, rgba(45, 212, 191, 0.06), transparent 60%),
    var(--bg);
  border-bottom: 1px solid var(--border);
}
/* Vertical only: these sit on .wrap/.wrap-narrow, whose side padding must survive. */
.hero {
  padding-top: 56px;
  padding-bottom: 48px;
}
.hero .lead {
  font-size: 17px;
  max-width: 68ch;
}
.page-head {
  padding-top: 36px;
  padding-bottom: 8px;
}
.section {
  padding: 48px 0;
}
.section-tight {
  padding: 24px 0;
}
.card {
  background: var(--panel);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  padding: 24px 26px;
  margin-bottom: 20px;
}
.card-header {
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
  gap: 12px 16px;
  margin-bottom: 14px;
  flex-wrap: wrap;
}
.card-header h2,
.card-header h3 {
  margin: 0;
}
.grid-2 {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 20px;
}
.grid-3 {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 20px;
}
.grid-2 > .card,
.grid-3 > .card {
  margin-bottom: 0;
}
.muted {
  color: var(--text-muted);
}
.faint {
  color: var(--text-faint);
  font-size: 13px;
}
.mono {
  font-family: var(--font-mono);
  font-size: 0.9em;
}
.nowrap {
  white-space: nowrap;
}
.eyebrow {
  font-size: 12px;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: var(--accent-strong);
  font-weight: 700;
  margin-bottom: 10px;
}

/* ---------- Pills / callouts ---------- */

.pill {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  font-size: 11.5px;
  font-weight: 700;
  letter-spacing: 0.03em;
  text-transform: uppercase;
  padding: 4px 10px;
  border-radius: 999px;
  border: 1px solid transparent;
  white-space: nowrap;
}
.pill::before {
  content: '';
  width: 6px;
  height: 6px;
  border-radius: 50%;
  background: currentColor;
  flex-shrink: 0;
}
.pill-ok {
  background: var(--ok-bg);
  color: var(--ok);
  border-color: var(--ok-border);
}
.pill-warn {
  background: var(--warn-bg);
  color: var(--warn);
  border-color: var(--warn-border);
}
.pill-danger {
  background: var(--danger-bg);
  color: var(--danger);
  border-color: var(--danger-border);
}
.pill-info {
  background: var(--info-bg);
  color: var(--info);
  border-color: var(--info-border);
}
.pill-neutral {
  background: var(--panel-solid);
  color: var(--text-muted);
  border-color: var(--border);
}

.callout {
  border-radius: var(--radius-md);
  border: 1px solid var(--border);
  padding: 14px 16px;
  font-size: 14px;
  color: var(--text-muted);
  margin: 14px 0;
}
.callout strong {
  color: var(--text);
}
.callout p:last-child,
.callout ul:last-child {
  margin-bottom: 0;
}
.callout-warn {
  background: var(--warn-bg);
  border-color: var(--warn-border);
}
.callout-info {
  background: var(--info-bg);
  border-color: var(--info-border);
}
.callout-ok {
  background: var(--ok-bg);
  border-color: var(--ok-border);
}
.callout-danger {
  background: var(--danger-bg);
  border-color: var(--danger-border);
}
.callout-mock {
  background: var(--mock-bg);
  border-color: var(--mock-border);
  color: var(--mock);
}

/* ---------- Definition lists ---------- */

dl.facts {
  display: grid;
  grid-template-columns: minmax(150px, 230px) 1fr;
  gap: 8px 18px;
  margin: 0;
  font-size: 14.5px;
}
dl.facts dt {
  color: var(--text-faint);
}
dl.facts dd {
  margin: 0;
  color: var(--text);
  overflow-wrap: anywhere;
}
dl.facts .sub {
  display: block;
  color: var(--text-faint);
  font-size: 13px;
}

/* ---------- Onboarding steps ---------- */

ol.steps {
  list-style: none;
  padding: 0;
  margin: 0;
}
ol.steps > li {
  display: grid;
  grid-template-columns: 34px 1fr auto;
  gap: 4px 14px;
  align-items: start;
  padding: 16px 0;
  border-top: 1px solid var(--border);
}
ol.steps > li:first-child {
  border-top: none;
}
.step-num {
  width: 30px;
  height: 30px;
  border-radius: 50%;
  display: grid;
  place-items: center;
  font-size: 13px;
  font-weight: 700;
  border: 1px solid var(--border-strong);
  color: var(--text-muted);
}
.step-DONE .step-num {
  background: var(--ok-bg);
  border-color: var(--ok-border);
  color: var(--ok);
}
.step-TODO .step-num {
  border-color: var(--warn-border);
  color: var(--warn);
}
.step-ERROR .step-num {
  border-color: var(--danger-border);
  color: var(--danger);
}
.step-body h3 {
  margin: 3px 0 2px;
}
.step-body .step-detail {
  margin: 0;
  font-size: 14px;
}
.step-body .step-more {
  margin-top: 12px;
}
.step-more > * + * {
  margin-top: 14px;
}
.step-UPCOMING .step-body h3,
.step-NOT_AVAILABLE .step-body h3 {
  color: var(--text-muted);
}

/* ---------- Choice (radio cards, read-only in preview) ---------- */

fieldset.choice {
  border: none;
  padding: 0;
  margin: 12px 0 0;
}
fieldset.choice legend {
  font-weight: 600;
  color: var(--text);
  margin-bottom: 10px;
  font-size: 15px;
}
.radio-card-group {
  display: grid;
  gap: 10px;
}
.radio-card {
  display: flex;
  gap: 12px;
  align-items: flex-start;
  border: 1px solid var(--border);
  border-radius: var(--radius-md);
  padding: 13px 15px;
  background: var(--bg-alt);
}
.radio-card input {
  margin-top: 4px;
  accent-color: var(--accent);
  flex-shrink: 0;
}
.radio-card.selected {
  border-color: var(--accent);
  background: var(--accent-dim);
}
.rc-title {
  font-weight: 600;
  color: var(--text);
  display: block;
}
.rc-desc {
  font-size: 13px;
  color: var(--text-muted);
  display: block;
  margin-top: 2px;
}

.btn {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  border-radius: var(--radius-sm);
  padding: 10px 16px;
  font: 600 14px/1 var(--font-sans);
  border: 1px solid var(--border-strong);
  background: var(--panel);
  color: var(--text);
  text-decoration: none;
}
.btn:disabled {
  opacity: 0.5;
  cursor: not-allowed;
}
.btn-primary {
  background: var(--accent);
  color: var(--accent-text);
  border-color: var(--accent);
}
/* B46: deleting a demo setup or customer. */
.btn-danger {
  background: var(--danger-bg);
  color: var(--danger);
  border-color: var(--danger-border);
}

/* ---------- Admin forms (Kjør bokføring / Regnskapsoppsett, B31) ---------- */

.form-grid {
  display: flex;
  flex-wrap: wrap;
  gap: 14px;
  align-items: flex-end;
}
.field {
  display: grid;
  gap: 6px;
  margin: 0 0 14px;
  border: 0;
  padding: 0;
}
.field label,
.field legend {
  font-weight: 600;
  color: var(--text);
}
.field input,
table.data input:not([type='checkbox']) {
  font: 400 15px/1.3 var(--font-sans);
  color: var(--text);
  background: var(--bg-alt);
  border: 1px solid var(--border-strong);
  border-radius: var(--radius-sm);
  padding: 8px 10px;
  max-width: 100%;
}
/* A single framed choice (radio-card) between other fields: air above and below. */
.field.field-choice {
  margin: 22px 0;
}
.field input:focus-visible,
table.data input:focus-visible {
  outline: 2px solid var(--accent);
  outline-offset: 1px;
}
.actions {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  margin: 12px 0;
}
.inline-form {
  margin: 0 0 12px;
}
/* B46: an archived customer shown with «Vis arkiverte kunder». */
tr[data-archived] td {
  background: var(--bg-alt);
}
.detail-row td {
  padding-top: 0;
}

/* ---------- Product cards / how-it-works ---------- */

.product-card h3 {
  font-family: var(--font-serif);
  font-size: 20px;
}
.points {
  counter-reset: point;
  list-style: none;
  padding: 0;
  margin: 0;
}
.points li {
  display: flex;
  gap: 18px;
  padding: 18px 0;
  border-top: 1px solid var(--border);
}
.points li:first-child {
  border-top: none;
}
.points .p-num {
  font-family: var(--font-serif);
  font-weight: 600;
  font-size: 20px;
  color: var(--accent-strong);
  width: 28px;
  flex-shrink: 0;
}
.points h3 {
  margin-bottom: 4px;
}
.points p {
  margin: 0;
  max-width: 70ch;
}
.split-list {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 24px;
}
.split-list > div {
  border-left: 2px solid var(--border-strong);
  padding-left: 16px;
}
.split-list h3 {
  font-size: 13px;
  text-transform: uppercase;
  letter-spacing: 0.05em;
  color: var(--text-faint);
}
.split-list ul {
  margin: 0;
  padding-left: 18px;
  font-size: 15px;
}
.split-list li {
  margin-bottom: 8px;
}
.voucher {
  max-width: 560px;
}
.voucher-line {
  display: grid;
  grid-template-columns: 1fr 70px 110px;
  gap: 10px;
  padding: 9px 0;
  border-bottom: 1px solid var(--border);
  font-size: 14px;
}
.voucher-line:last-child {
  border-bottom: none;
}
.voucher-line .amount {
  text-align: right;
  font-variant-numeric: tabular-nums;
  color: var(--text);
}

/* ---------- Tables (admin) — become cards on narrow screens ---------- */

.table-wrap {
  border: 1px solid var(--border);
  border-radius: var(--radius-md);
  overflow: hidden;
}

/* Admin: use more of wide screens; a table wider than its space scrolls
   sideways instead of cutting columns. Text size is unchanged. */
body.admin .wrap,
body.admin .wrap-narrow {
  max-width: 1480px;
}
body.admin .table-wrap {
  overflow-x: auto;
}
body.admin table.data td {
  overflow-wrap: break-word;
}
body.admin table.data td .mono {
  overflow-wrap: anywhere;
}
body.admin table.data td .pill {
  white-space: normal;
}
table.data {
  width: 100%;
  border-collapse: collapse;
  font-size: 13.5px;
}
table.data th,
table.data td {
  text-align: left;
  padding: 11px 12px;
  border-bottom: 1px solid var(--border);
  vertical-align: top;
}
table.data th {
  color: var(--text-faint);
  font-weight: 600;
  font-size: 11.5px;
  text-transform: uppercase;
  letter-spacing: 0.04em;
  background: var(--bg-alt);
}
table.data tbody tr:last-child td {
  border-bottom: none;
}
table.data tbody tr:hover {
  background: var(--panel);
}
table.data td .sub {
  display: block;
  color: var(--text-faint);
  font-size: 12.5px;
}
.stats {
  display: flex;
  gap: 12px;
  flex-wrap: wrap;
  margin: 8px 0 20px;
}
.stat {
  border: 1px solid var(--border);
  background: var(--panel);
  border-radius: var(--radius-md);
  padding: 10px 16px;
  min-width: 140px;
}
.stat strong {
  display: block;
  font-size: 22px;
  color: var(--text);
}
.stat span {
  font-size: 13px;
  color: var(--text-faint);
}

/* ---------- Developer notes panel (docs/copy-guide.md 18.6) ---------- */

.dev-panel {
  border: 1px solid var(--border);
  border-radius: var(--radius-md);
  background: var(--bg-alt);
  margin-top: 28px;
}
.dev-panel summary {
  cursor: pointer;
  padding: 14px 18px;
  font-weight: 600;
  font-size: 14px;
  color: var(--text);
}
.dev-panel .dev-panel-body {
  padding: 4px 18px 16px;
  border-top: 1px solid var(--border);
}
.dev-panel li {
  margin-bottom: 8px;
  font-size: 13.5px;
}

/* ---------- Footer ---------- */

.site-footer {
  border-top: 1px solid var(--border);
  padding: 28px 0 44px;
  margin-top: 40px;
}
.site-footer .wrap {
  display: flex;
  justify-content: space-between;
  gap: 12px 20px;
  flex-wrap: wrap;
  font-size: 12.5px;
  color: var(--text-faint);
}

/* ---------- Public page: light profile ----------
   Everything below is scoped to body.public (set only on "/"), so admin and
   the customer page keep the dark look above. Contrast (WCAG AA) is listed
   next to each colour role; the brand teal #2dd4bf is not used on light
   surfaces (1.86:1 on white). */

html:has(body.public) {
  background: #0c2136;
}
body.public {
  --p-bg: #f5f8f9; /* page */
  --p-surface: #ffffff; /* example panel, form fields */
  --p-text: #10283f; /* navy: headings + body — 14.08:1 on --p-bg */
  --p-muted: #4b5f71; /* secondary — 6.20:1 on --p-bg, 6.62:1 on white */
  --p-rule: #d3dee4; /* lines */
  --p-rule-strong: #9fb2bf;
  --p-field-border: #6b7f8f; /* input borders — 4.15:1 on white, 3.89:1 on --p-bg */
  --p-accent: #0b7068; /* teal: button, links — 5.57:1 on --p-bg, white on it 5.95:1 */
  --p-accent-hover: #085a53;
  --p-error: #b3261e; /* error text/border — 6.12:1 on --p-bg, 6.54:1 on white */
  --p-error-bg: #fdf0ef; /* navy 13.52:1, error 5.88:1 */
  --p-ok-bg: #e8f4f2; /* receipt — navy 13.35:1, muted 5.88:1 */
  --p-dark: #0c2136; /* the one dark section (closing + footer) */
  --p-dark-text: #e9f1f4; /* 14.27:1 on --p-dark */
  --p-dark-muted: #a8bccb; /* 8.33:1 on --p-dark */
  --p-dark-accent: #5eead4; /* focus ring on dark — 11.03:1 */
  background: var(--p-bg);
  color: var(--p-text);
  font-size: 17px;
  line-height: 1.6;
  color-scheme: light;
}
body.public p,
body.public ul,
body.public ol {
  color: var(--p-text);
}
body.public a {
  color: var(--p-accent);
}
body.public a:hover {
  color: var(--p-accent-hover);
}
body.public h1,
body.public h2,
body.public h3 {
  color: var(--p-text);
}
body.public :focus-visible {
  outline: 3px solid var(--p-text);
  outline-offset: 3px;
  border-radius: 3px;
}
body.public .skip-link {
  background: var(--p-text);
  color: #ffffff;
}

.public .banner-mock {
  background: #f1ebf8;
  border-bottom-color: #d9c8ee;
  color: #5b3a8c;
}

.public .site-header .wrap {
  max-width: 1160px;
  padding-left: 24px;
  padding-right: 24px;
}
.public .site-header {
  position: static;
  background: var(--p-bg);
  backdrop-filter: none;
  border-bottom: 1px solid var(--p-rule);
}
/* The logo file is light grey for dark backgrounds; darkened here, file unchanged. */
.public .brand-logo {
  filter: brightness(0.22);
}
.public .brand-sub {
  color: var(--p-muted);
}
.public .site-nav a {
  color: var(--p-text);
  font-size: 15px;
  text-decoration: underline;
  text-decoration-color: transparent;
  text-underline-offset: 4px;
}
.public .site-nav a:hover {
  background: none;
  color: var(--p-text);
  text-decoration-color: var(--p-accent);
}

.pub-wrap {
  max-width: 1160px;
  margin: 0 auto;
  padding: 0 24px;
}
/* A narrow, left-aligned text column inside the page width. */
.pub-measure {
  max-width: 1160px;
}
.pub-measure > * {
  max-width: 40em;
}
.public h1 {
  font-size: clamp(30px, 3.6vw, 40px);
  line-height: 1.18;
  margin-bottom: 20px;
}
.public h2 {
  font-size: 26px;
  line-height: 1.25;
  margin-bottom: 16px;
}
.public h3 {
  font-size: 17px;
  font-weight: 600;
  margin-bottom: 4px;
}
.public .pub-note {
  font-size: 15px;
  color: var(--p-muted);
}

/* Hero: text left, the (wider) control example right. */
.pub-hero {
  padding: 64px 0 72px;
  border-bottom: 1px solid var(--p-rule);
}
.pub-hero-grid {
  display: grid;
  grid-template-columns: minmax(0, 6fr) minmax(0, 5fr);
  gap: 64px;
  align-items: start;
}
.pub-hero-text {
  padding-top: 12px;
  max-width: 34em;
}
.pub-actions {
  margin: 28px 0 24px;
}
.pub-btn {
  display: inline-block;
  background: var(--p-accent);
  color: #ffffff;
  font: 600 15px/1 var(--font-sans);
  padding: 14px 20px;
  border: 0;
  border-radius: 6px;
  text-decoration: none;
  cursor: pointer;
}
.public a.pub-btn,
.public a.pub-btn:hover {
  color: #ffffff;
}
.pub-btn:hover {
  background: var(--p-accent-hover);
}

/* The control example: reads as a document, not a card. */
.pub-check {
  margin: 0;
  background: var(--p-surface);
  border: 1px solid var(--p-rule-strong);
  border-radius: 4px;
  padding: 22px 24px 18px;
  font-size: 15px;
}
.pub-check-head {
  display: flex;
  justify-content: space-between;
  align-items: baseline;
  gap: 8px 16px;
  flex-wrap: wrap;
  border-bottom: 2px solid var(--p-text);
  padding-bottom: 10px;
}
.public .pub-check-head p {
  margin: 0;
}
.public .pub-check-title {
  font-weight: 600;
}
.public .pub-example-mark {
  font-size: 13px;
  color: var(--p-muted);
  font-style: italic;
}
.public .pub-check-date {
  margin: 10px 0 4px;
  color: var(--p-muted);
  font-variant-numeric: tabular-nums;
}
table.pub-check-table {
  width: 100%;
  border-collapse: collapse;
}
.pub-check-table th,
.pub-check-table td {
  padding: 8px 0;
  border-bottom: 1px solid var(--p-rule);
  font-weight: 400;
  text-align: left;
}
.pub-check-table td {
  text-align: right;
  font-variant-numeric: tabular-nums;
  white-space: nowrap;
  padding-left: 16px;
}
.pub-check-table .pub-sum th,
.pub-check-table .pub-sum td {
  font-weight: 600;
  border-bottom-color: var(--p-text);
}
.pub-check-table tr:last-child th,
.pub-check-table tr:last-child td {
  border-bottom: none;
  padding-bottom: 0;
}

/* «Når noe ikke stemmer»: heading beside the text. */
.pub-deviation {
  padding: 80px 0 56px;
}
.pub-side-grid {
  display: grid;
  grid-template-columns: minmax(0, 3fr) minmax(0, 7fr);
  gap: 24px 56px;
  align-items: start;
}
.pub-measure-inner {
  max-width: 40em;
}
.public .pub-measure-inner p:last-child {
  margin-bottom: 0;
}

.pub-fit {
  padding: 24px 0 64px;
}

/* Variants and price: one table, price right-aligned and easy to find. */
.pub-pricing {
  padding: 56px 0 48px;
  border-top: 1px solid var(--p-rule);
  border-bottom: 1px solid var(--p-rule);
  background: var(--p-surface);
}
table.pub-price-table {
  width: 100%;
  max-width: 900px;
  border-collapse: collapse;
  margin: 8px 0 16px;
}
.pub-price-table th,
.pub-price-table td {
  text-align: left;
  vertical-align: baseline;
  padding: 16px 24px 16px 0;
  border-bottom: 1px solid var(--p-rule);
}
.pub-price-table thead th {
  font-size: 13px;
  font-weight: 600;
  color: var(--p-muted);
  padding-top: 0;
  padding-bottom: 8px;
  border-bottom: 2px solid var(--p-text);
}
.pub-price-table tbody th {
  font-weight: 600;
  white-space: nowrap;
}
.pub-price-table .pub-price {
  text-align: right;
  white-space: nowrap;
  padding-right: 0;
}
.pub-price-table tbody .pub-price {
  font-size: 20px;
  font-weight: 600;
  font-variant-numeric: tabular-nums;
}
.pub-price-table .pub-later th,
.pub-price-table .pub-later td {
  color: var(--p-muted);
}
.pub-price-table em {
  font-style: italic;
}

.pub-steps {
  padding: 64px 0 24px;
}
.pub-step-list {
  list-style: none;
  counter-reset: step;
  margin: 0;
  padding: 0;
}
.pub-step-list li {
  counter-increment: step;
  position: relative;
  padding: 0 0 20px 40px;
}
.pub-step-list li::before {
  content: counter(step) '.';
  position: absolute;
  left: 0;
  top: 0;
  font-weight: 600;
  font-variant-numeric: tabular-nums;
  color: var(--p-accent);
}
.public .pub-step-list p {
  margin: 0;
}

/* Contact form. */
.pub-contact-form {
  padding: 48px 0 88px;
}
.pub-form {
  max-width: 34em;
}
.pub-field {
  margin: 0 0 20px;
  padding: 0;
  border: 0;
  min-width: 0;
}
.pub-field > label,
.pub-field > legend {
  display: block;
  font-weight: 600;
  margin-bottom: 6px;
  padding: 0;
}
.pub-optional {
  font-weight: 400;
  color: var(--p-muted);
}
.public .pub-hint {
  font-size: 15px;
  color: var(--p-muted);
  margin: 0 0 6px;
}
.pub-field input[type='text'],
.pub-field input[type='email'],
.pub-field input[type='tel'],
.pub-field select,
.pub-field textarea {
  display: block;
  width: 100%;
  font: 400 17px/1.4 var(--font-sans);
  color: var(--p-text);
  background: var(--p-surface);
  border: 1px solid var(--p-field-border);
  border-radius: 4px;
  padding: 10px 12px;
}
.pub-field textarea {
  resize: vertical;
}
/* «Jeg har regnskapsfører»: checkbox + label + fields are siblings, so the
   fields show with :checked ~ and no JavaScript. Hidden = display:none (out
   of the tab order, no empty space). */
.pub-rf {
  margin: 4px 0 24px;
}
.pub-rf-toggle {
  width: 20px;
  height: 20px;
  margin: 0 10px 0 0;
  vertical-align: middle;
  accent-color: var(--p-accent);
}
.pub-rf-label {
  font-weight: 600;
  vertical-align: middle;
}
.pub-rf-fields {
  display: none;
  margin-top: 14px;
  padding-left: 16px;
  border-left: 2px solid var(--p-rule-strong);
}
.pub-rf-toggle:checked ~ .pub-rf-fields {
  display: block;
}
.pub-rf-fields .pub-field:last-child {
  margin-bottom: 0;
}
.pub-field-invalid input[type='text'],
.pub-field-invalid input[type='email'],
.pub-field-invalid input[type='tel'],
.pub-field-invalid select,
.pub-field-invalid textarea {
  border: 2px solid var(--p-error);
}
.pub-field-invalid {
  border-left: 3px solid var(--p-error);
  padding-left: 14px;
}
.public .pub-field-error {
  color: var(--p-error);
  font-weight: 600;
  font-size: 15px;
  margin: 0 0 6px;
}
.pub-form-alert {
  max-width: 34em;
  background: var(--p-error-bg);
  border: 2px solid var(--p-error);
  border-radius: 4px;
  padding: 14px 18px;
  margin: 0 0 24px;
}
.public .pub-form-alert p {
  font-weight: 600;
  margin: 0 0 6px;
}
.public .pub-form-alert p:last-child {
  margin: 0;
}
.pub-form-alert ul {
  margin: 0;
  padding-left: 20px;
}
.public .pub-form-alert a {
  color: var(--p-error);
}
.public .pub-privacy {
  font-size: 15px;
  color: var(--p-muted);
}
/* Honeypot: off-screen for people, still in the form for bots. */
.pub-hp {
  position: absolute;
  left: -10000px;
  top: auto;
  width: 1px;
  height: 1px;
  overflow: hidden;
}
.pub-receipt {
  max-width: 34em;
  background: var(--p-ok-bg);
  border-left: 4px solid var(--p-accent);
  padding: 18px 20px;
}
.public .pub-receipt p {
  margin: 0;
}
.public .pub-receipt .pub-receipt-lead {
  font-weight: 600;
}
.public .pub-receipt .pub-preview-note {
  margin-top: 8px;
  font-size: 15px;
  color: #5b3a8c;
}

/* Closing line + footer: the one dark section. */
.pub-closing {
  background: var(--p-dark);
  padding: 40px 0 4px;
}
.public .pub-closing p {
  color: var(--p-dark-muted);
  font-size: 15px;
}
.public .site-footer {
  background: var(--p-dark);
  border-top: none;
  margin-top: 0;
  padding: 16px 0 48px;
}
.public .site-footer .wrap {
  max-width: 1160px;
  padding: 0 24px;
  color: var(--p-dark-muted);
  font-size: 13px;
}
.public .pub-closing :focus-visible,
.public .site-footer :focus-visible {
  outline-color: var(--p-dark-accent);
}

@media (max-width: 960px) {
  .pub-hero {
    padding: 40px 0 48px;
  }
  .pub-hero-grid,
  .pub-side-grid {
    grid-template-columns: 1fr;
    gap: 28px;
  }
  .pub-hero-text {
    padding-top: 0;
  }
  .pub-check {
    max-width: 34em;
  }
  .pub-deviation {
    padding: 56px 0 40px;
  }
  .pub-side-grid {
    gap: 0;
  }
}

@media (max-width: 600px) {
  .pub-wrap,
  .public .site-header .wrap,
  .public .site-footer .wrap {
    padding-left: 16px;
    padding-right: 16px;
  }
  .pub-check {
    padding: 16px 14px 14px;
  }
  /* Price table -> one block per variant: name + price, then the content. */
  .pub-price-table thead {
    display: none;
  }
  .pub-price-table tbody tr {
    display: grid;
    grid-template-columns: 1fr auto;
    gap: 2px 16px;
    padding: 14px 0;
    border-bottom: 1px solid var(--p-rule);
  }
  .pub-price-table tbody th,
  .pub-price-table tbody td {
    padding: 0;
    border: 0;
  }
  .pub-price-table tbody td:not(.pub-price) {
    grid-column: 1 / -1;
    grid-row: 2;
  }
  .pub-price-table tbody .pub-price {
    font-size: 17px;
  }
  .pub-step-list li {
    padding-left: 32px;
  }
  .pub-contact-form {
    padding-bottom: 64px;
  }
}

/* ---------- Responsive ---------- */

@media (max-width: 900px) {
  .grid-3 {
    grid-template-columns: 1fr;
  }
  /* Admin table -> stacked cards: every cell carries its own label. */
  table.data thead {
    display: none;
  }
  table.data,
  table.data tbody,
  table.data tr,
  table.data td {
    display: block;
    width: 100%;
  }
  table.data tr {
    border-bottom: 1px solid var(--border-strong);
    padding: 8px 0;
  }
  table.data td {
    border-bottom: none;
    display: grid;
    grid-template-columns: 130px 1fr;
    gap: 10px;
    padding: 5px 14px;
  }
  table.data td::before {
    content: attr(data-label);
    color: var(--text-faint);
    font-size: 11.5px;
    text-transform: uppercase;
    letter-spacing: 0.04em;
    padding-top: 2px;
  }
}

@media (max-width: 700px) {
  .grid-2,
  .split-list {
    grid-template-columns: 1fr;
  }
  dl.facts {
    grid-template-columns: 1fr;
    gap: 2px;
  }
  dl.facts dd {
    margin-bottom: 8px;
  }
  ol.steps > li {
    grid-template-columns: 34px 1fr;
  }
  ol.steps > li > .pill {
    grid-column: 2;
    justify-self: start;
  }
}

@media (max-width: 600px) {
  .section {
    padding: 32px 0;
  }
  .hero {
    padding-top: 36px;
    padding-bottom: 32px;
  }
  .card {
    padding: 18px;
  }
  .site-header .wrap {
    padding-top: 12px;
    padding-bottom: 12px;
  }
  .brand-sub {
    display: none;
  }
  .brand-logo {
    height: 30px;
  }
  .voucher-line {
    grid-template-columns: 1fr auto;
  }
  .voucher-line .side {
    display: none;
  }
}
.site-nav .inline-form {
  display: flex;
  align-items: center;
  gap: 8px;
  margin: 0;
}

/* MFA: keep a white quiet zone and preserve square proportions on narrow screens. */
.mfa-qr {
  display: block;
  max-width: 100%;
  height: auto;
  margin: 1.25rem 0;
}

.public .pub-voucher-example {
  display: block;
  width: 100%;
  height: auto;
  margin: 18px 0;
}
.public .pub-check figcaption {
  font-size: 0.85rem;
  line-height: 1.5;
}

.user-create-form {
  display: grid;
  gap: 16px;
  max-width: 620px;
}
.user-create-form .field,
.user-create-form p {
  margin: 0;
}
.user-create-form .btn {
  justify-self: start;
}

.pub-doc-cards {
  min-width: 0;
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  align-content: start;
}
.doc-choice {
  position: absolute;
  width: 1px;
  height: 1px;
  opacity: 0;
}
.pub-doc-cards > label,
.doc-nav label {
  cursor: pointer;
  padding: 9px 13px;
  border: 1px solid var(--p-rule);
  border-radius: 6px;
}
.doc-choice:checked + label {
  background: #073448;
  color: white;
}
.doc-choice:focus-visible + label {
  outline: 3px solid #008c8c;
  outline-offset: 3px;
}
.doc-panels {
  width: 100%;
}
.doc-panel {
  display: none;
  margin: 8px 0 0;
}
#doc-oppgjor:checked ~ .doc-panels .doc-oppgjor,
#doc-handlekurv:checked ~ .doc-panels .doc-handlekurv,
#doc-kassa:checked ~ .doc-panels .doc-kassa {
  display: block;
}
.doc-panel img {
  width: 100%;
  height: 300px;
  object-fit: cover;
  object-position: top;
  background: white;
  display: block;
}
.doc-panel h2 {
  font-size: 1.2rem;
  margin: 0;
}
.doc-panel figcaption {
  font-size: 0.85rem;
  margin: 12px 0;
}
.doc-nav {
  display: flex;
  justify-content: space-between;
}
.automation-card {
  padding: 18px 22px;
  margin-bottom: 14px;
}
.automation-card .card-header {
  margin-bottom: 4px;
}
.automation-card h2 {
  font-size: 1.1rem;
  margin: 0;
}
.automation-card p {
  margin: 6px 0;
}
.automation-controls {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  flex-wrap: wrap;
  margin: 12px 0;
}
.automation-daily {
  display: grid;
  grid-template-columns: 1fr auto;
  gap: 4px 16px;
  align-items: center;
}
.automation-daily .faint {
  grid-column: 1;
  grid-row: 2;
}
.automation-daily button {
  grid-column: 2;
  grid-row: 1 / 3;
}
.automation-result {
  display: flex;
  align-items: center;
  gap: 12px;
  flex-wrap: wrap;
  margin: 8px 0;
}
.automation-card details {
  margin-top: 8px;
}
.automation-card summary {
  font-size: 0.9rem;
}

.automation-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 16px;
  align-items: start;
}
.automation-grid .automation-card {
  margin: 0;
  min-width: 0;
}
.automation-grid details {
  overflow-x: auto;
}
.pub-basket-example img {
  display: block;
  width: 100%;
  height: auto;
  margin: 16px 0;
}
.pub-basket-example h2 {
  font-size: 1.15rem;
  margin: 0;
}
.pub-basket-example figcaption {
  font-size: 0.85rem;
  line-height: 1.5;
}
@media (max-width: 1000px) {
  .automation-grid {
    grid-template-columns: 1fr;
  }
}
