:root {
  --ink: #0f1b33;
  --navy: #0b1a38;
  --muted: #5b667c;
  --line: #dfe5ec;
  --paper: #fffdfa;
  --card: #fff;
  --orange: #b34700;
  --orange-dark: #9a3c00;
  --focus: #1b4aa8;
}

* { box-sizing: border-box; }
html { min-height: 100%; background: var(--paper); }
body { margin: 0; min-height: 100%; color: var(--ink); background: radial-gradient(circle at 10% 0, #fff0df, transparent 34rem), var(--paper); font: 16px/1.5 Inter, ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif; }
a { color: var(--orange-dark); }
a:focus-visible, button:focus-visible, input:focus-visible, select:focus-visible, textarea:focus-visible { outline: 3px solid var(--focus); outline-offset: 3px; }
.account-header { display: flex; justify-content: space-between; align-items: center; width: min(1120px, calc(100% - 40px)); margin: 0 auto; padding: 24px 0; }
.brand { display: inline-flex; align-items: center; color: var(--ink); font-weight: 800; font-size: 1.15rem; text-decoration: none; }
.brand-mark { display: grid; place-items: center; width: 38px; height: 38px; margin-right: 10px; color: white; background: var(--orange); border-radius: 12px; font-weight: 900; }
.account-header nav { display: flex; gap: 18px; align-items: center; }
.account-header nav a { font-size: 1rem; font-weight: 650; display: inline-flex; align-items: center; min-height: 48px; }
.account-main { width: min(1120px, calc(100% - 40px)); margin: 0 auto; padding: 28px 0 72px; }
.account-grid { display: grid; grid-template-columns: minmax(0, 1fr) minmax(300px, .7fr); gap: 28px; align-items: start; }
.account-card { padding: clamp(24px, 5vw, 48px); background: var(--card); border: 1px solid var(--line); border-radius: 20px; box-shadow: 0 10px 30px rgba(41, 31, 20, .07); }
.account-card.narrow { max-width: 560px; margin: 0 auto; }
.eyebrow { color: var(--orange); font-size: .875rem; font-weight: 800; letter-spacing: .14em; text-transform: uppercase; }
h1 { margin: 8px 0 12px; font-size: clamp(2rem, 5vw, 2.4rem); font-weight: 800; line-height: 1.1; letter-spacing: -.035em; }
h2 { margin-top: 0; line-height: 1.15; }
.lead { max-width: 58ch; color: #39445c; font-size: 1.0625rem; }
.account-side { padding: 28px; color: white; background: var(--navy); border-radius: 24px; }
.account-side h2 { color: white; }
.account-side p, .account-side li { color: #dce5f1; }
.account-side .orange { color: #ffb36f; }
.field { display: grid; gap: 7px; margin-top: 18px; }
label, legend { font-weight: 700; }
.hint { margin: 0; color: var(--muted); font-size: .9rem; }
.field-error { margin: .25rem 0 0; color: #a9231a; font-size: .95rem; font-weight: 600; }
.field-error[hidden] { display: none; }
.field-error.reserve { line-height: 1.4; min-height: 5.6em; overflow-wrap: anywhere; }
.field-error.reserve[hidden] { display: block; visibility: hidden; }
.req { font-weight: 500; color: var(--muted); }
input, textarea, select { width: 100%; padding: 12px 14px; color: var(--ink); background: white; border: 1px solid #c9ced8; min-height: 48px; border-radius: 11px; font: inherit; }
textarea { min-height: 120px; resize: vertical; }
.check { display: flex; gap: 10px; align-items: start; margin-top: 18px; font-size: .92rem; font-weight: 500; }
.check input { width: 1.1rem; min-width: 1.1rem; margin-top: .25rem; accent-color: var(--orange); }
.actions { display: flex; flex-wrap: wrap; gap: 12px; align-items: center; margin-top: 24px; }
button, .button { display: inline-flex; justify-content: center; align-items: center; min-height: 48px; padding: 11px 17px; color: white; background: var(--orange); border: 1px solid var(--orange); border-radius: 11px; font: inherit; font-weight: 800; cursor: pointer; text-decoration: none; }
button:hover, .button:hover { background: var(--orange-dark); border-color: var(--orange-dark); }
button.secondary, .button.secondary { color: var(--ink); background: white; border-color: var(--line); }
.resend-link { display: block; margin-top: 10px; }
button:disabled { cursor: wait; opacity: .65; }
.form-status { min-height: 1.5em; margin-top: 14px; color: var(--orange-dark); font-weight: 650; }
.form-status.success { color: #14663a; }
.form-status.error { color: #a9231a; }
.form-status:empty { display: none; }
.price { margin: 22px 0; font-size: 2.8rem; font-weight: 850; letter-spacing: -.05em; }
.price small { color: var(--muted); font-size: 1rem; font-weight: 600; letter-spacing: 0; }
.notice { padding: 14px 16px; color: #704000; background: #fff3e4; border-left: 4px solid var(--orange); border-radius: 9px; }
.account-footer { width: min(1120px, calc(100% - 40px)); margin: 0 auto; padding: 20px 0 32px; color: var(--muted); border-top: 1px solid var(--line); font-size: .9rem; }
.account-footer p { margin: 0; }
.sr-only { position: absolute; width: 1px; height: 1px; padding: 0; overflow: hidden; clip: rect(0, 0, 0, 0); white-space: nowrap; border: 0; }
@media (max-width: 760px) {
  .account-header { width: min(100% - 28px, 1120px); padding: 16px 0; }
  .account-header nav a:not(.button) { display: none; }
  .account-main { width: min(100% - 28px, 1120px); padding-top: 12px; }
  .account-grid { grid-template-columns: 1fr; }
  .account-card { padding: 24px 20px; border-radius: 18px; }
  .account-side { padding: 22px 20px; border-radius: 18px; }
  h1 { font-size: 1.9rem; }
}
@media (prefers-reduced-motion: reduce) { *, *::before, *::after { scroll-behavior: auto !important; transition: none !important; } }

.actions a { display: inline-flex; align-items: center; min-height: 48px; }

.account-card .button, .account-card button { min-height: 52px; }
.contact-panel { display: grid; gap: 12px; margin-top: 20px; }
.contact-panel p { margin: 0; color: #39445c; }
.contact-panel .button { justify-self: start; text-decoration: none; color: #fff; }
.contact-panel .button:hover { color: #fff; }
@media (max-width: 480px) { .contact-panel .button { justify-self: stretch; } }
body { display: flex; flex-direction: column; min-height: 100vh; min-height: 100dvh; }
.account-main { flex: 1 0 auto; width: min(1120px, calc(100% - 40px)); }
.account-header, .account-footer { flex: none; width: min(1120px, calc(100% - 40px)); }
@media (max-width: 760px) { .account-main, .account-header, .account-footer { width: calc(100% - 28px); } }

/* round 2: same brand frame as the app (navy bar, orange mark), card centred in the free space */
.account-header { width: 100%; max-width: none; margin: 0; padding: 14px max(20px, calc((100% - 1120px) / 2)); background: var(--navy); }
.account-header .brand { color: #fff; }
.account-header .brand-mark { color: var(--navy); background: #ff6b0a; }
.account-header nav a { color: #fff; }
.account-main { display: flex; flex-direction: column; justify-content: center; padding-top: 40px; padding-bottom: 56px; }
.account-card.narrow { width: 100%; }
.account-footer { margin-top: 0; }
@media (max-width: 760px) { .account-header { padding: 10px 14px; } .account-header nav a:not(.button) { display: inline-flex; font-size: .95rem; } .account-main { padding-top: 20px; } }
/* round 3: house mark like the app, calmer card rhythm, no cramped actions */
.account-header .brand-mark { font-size: 0; width: 40px; height: 40px; border-radius: 10px; background: #ff6b0a url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24'%3E%3Cpath d='M4 11 12 4l8 7v8a1 1 0 0 1-1 1h-4v-6H9v6H5a1 1 0 0 1-1-1z' fill='none' stroke='%230b1a38' stroke-width='2' stroke-linejoin='round'/%3E%3C/svg%3E") center/26px no-repeat; }
.account-card h1 { color: var(--ink); }
.contact-panel { margin-top: 28px; gap: 20px; }
.contact-actions { display: flex; flex-wrap: wrap; gap: 12px; margin-top: 8px; }
.contact-panel .button.secondary, .contact-panel .button.secondary:hover { color: var(--navy); background: #fff; border: 1.5px solid var(--navy); }
.account-footer { color: #4a566c; font-size: .9375rem; }
@media (max-width: 480px) { .contact-actions { flex-direction: column; } .contact-actions .button { width: 100%; } }
/* A phone header fits the brand plus one action: where a button is present, the plain link (also in the form) yields. */
@media (max-width: 480px) { .account-header nav:has(.button) a:not(.button) { display: none; } }
/* free pilot terms: plain list, no surprises */
.terms-list { display: grid; gap: 12px; margin: 20px 0 0; padding: 0; list-style: none; }
.terms-list li { position: relative; padding-left: 30px; color: #39445c; }
.terms-list li::before { content: ""; position: absolute; left: 4px; top: .45em; width: 14px; height: 8px; border-left: 2.5px solid var(--orange); border-bottom: 2.5px solid var(--orange); transform: rotate(-45deg); }
.terms-list strong { color: var(--ink); }
.fine { margin: 20px 0 0; color: var(--muted); font-size: .9rem; }
/* pilot terms document */
.legal { max-width: 760px; margin: 0 auto; }
.legal h2 { margin: 36px 0 8px; font-size: 1.25rem; }
.legal h3 { margin: 22px 0 6px; font-size: 1.05rem; }
.legal p, .legal li { color: #2c3850; }
.legal .summary { margin: 22px 0 8px; padding: 18px 20px; background: #fff6ec; border: 1px solid #f4d8bc; border-radius: 14px; }
.legal .summary ul { margin: 0; padding-left: 20px; }
.legal .meta { color: var(--muted); font-size: .9375rem; }
.legal .table-wrap { overflow-x: auto; }
.legal table { width: 100%; border-collapse: collapse; font-size: .9375rem; }
.legal th, .legal td { padding: 8px 10px; text-align: left; vertical-align: top; border-bottom: 1px solid var(--line); }
.terms-list ~ .notice, .terms-list ~ form { margin-top: 20px; }
.price-label { margin-top: 22px; color: var(--muted); font-size: .875rem; font-weight: 700; letter-spacing: .08em; text-transform: uppercase; }
.price-label + .price { margin-top: 2px; }
.account-header nav a { white-space: nowrap; }
/* phone: the brand plus one link; the extra account link (Abonnement) is one tap away from the workspace */
@media (max-width: 480px) { .account-header nav a + a:not(.button) { display: none; } }
/* the terms document never widens the page: its table scrolls inside the card */
.account-main > .legal { width: 100%; min-width: 0; }
.legal .table-wrap { max-width: 100%; }
.legal td, .legal th { overflow-wrap: anywhere; }
/* judge round 1 */
.legal .gloss { margin-top: 8px; padding: 10px 14px; background: #f4f7fb; border-radius: 10px; font-size: .95rem; }
.check-hint { margin: 8px 0 0 30px; }
.account-grid:has(> .narrow:only-child) { grid-template-columns: minmax(0, 1fr); }
@media (max-width: 600px) {
  .legal table, .legal tbody, .legal tr, .legal td { display: block; width: 100%; }
  .legal thead { display: none; }
  .legal tr { padding: 10px 0; border-bottom: 1px solid var(--line); }
  .legal td { padding: 2px 0; border: 0; }
  .legal td::before { content: attr(data-label); display: block; color: var(--muted); font-size: .8rem; font-weight: 700; }
}
/* judge round 2: wide screens keep whole words in the supplier table */
@media (min-width: 601px) { .legal td, .legal th { overflow-wrap: normal; } .legal td:first-child { white-space: nowrap; } }
/* Lane B19: the payment outcome sits first in the card on /betaling/. */
.account-card > [data-testid="checkout-result"] { margin: 0 0 20px; }
