/* Designretning 5 «Seriøs» (godkjent 29.09.2026): docs/designretning-r5.md.
   Shared tokens for every surface. The --v4-* names are kept as aliases so
   admin, support, pilot and sign-in pick up R5 without markup changes. */
@font-face {
  font-family: "Schibsted Grotesk";
  src: url('/fonts/SchibstedGrotesk-Variable.woff2') format('woff2');
  font-style: normal;
  font-weight: 400 900;
  font-display: swap;
}
:root {
  --r5-font: "Schibsted Grotesk", system-ui, -apple-system, "Segoe UI", sans-serif;
  --r5-ink: #16181D;
  --r5-ink-2: #3A3D45;
  --r5-muted: #4B4E57;
  --r5-line: #DCDDE1;
  --r5-line-soft: #E6E7EA;
  --r5-control: #C3C6CD;
  --r5-surface: #FFFFFF;
  --r5-subtle: #F4F5F7;
  --r5-star: #F2B100;
  --r5-star-track: #EFEDE6;
  --r5-star-empty: #E6E3DA;
  --r5-red-bg: #FDECEA; --r5-red-line: #F0BDB6; --r5-red: #A5221A;
  --r5-orange-bg: #FFEFE3; --r5-orange-line: #F0C6A3; --r5-orange: #983C00;
  --r5-blue-bg: #EAF1FB; --r5-blue-line: #BCD0F0; --r5-blue: #174EA6;
  --r5-green-bg: #E7F5EC; --r5-green-line: #B5DEC4; --r5-green: #0B6B35;
  --r5-neutral-bg: #F3F4F6; --r5-neutral-line: #D5D7DC; --r5-neutral: #3A3D45;
  --r5-shadow: 0 1px 2px rgba(16,24,40,.04);
  --r5-radius-card: 10px;
  --r5-radius: 8px;
  --r5-radius-tag: 6px;

  /* Legacy aliases (v4 names) mapped to R5. */
  --v4-ink: var(--r5-ink);
  --v4-ink2: var(--r5-muted);
  --v4-line: var(--r5-line);
  --v4-soft: var(--r5-subtle);
  --v4-brand: var(--r5-ink);
  --v4-brandH: #000000;
  --v4-ok: var(--r5-green);
  --v4-okBg: var(--r5-green-bg);
  --v4-warn: var(--r5-orange);
  --v4-warnBg: var(--r5-orange-bg);
  --v4-err: var(--r5-red);
  --v4-errBg: var(--r5-red-bg);
  --v4-info: var(--r5-blue);
  --v4-infoBg: var(--r5-blue-bg);
  --v4-sel: var(--r5-subtle);
  --v4-forest: var(--r5-ink);
  --v4-onDark: #D5D7DC;
  --v4-focus: var(--r5-blue);
  --v4-radius: var(--r5-radius);
  --v4-space: 8px;
  --v4-font: var(--r5-font);
}
html, body { font-family: var(--r5-font); -webkit-font-smoothing: antialiased; }
button, input, select, textarea { font-family: inherit; }
/* Logo: the yellow star is the only brand colour. */
:is(.brand, .logo, .auth-brand).v4-logo, :is(.brand, .logo, .auth-brand).v4-logo:hover {
  display: inline-flex; align-items: center; gap: 8px; min-height: 44px;
  font-family: var(--r5-font); font-size: 19px; font-weight: 700;
  letter-spacing: -.02em; text-decoration: none; color: var(--r5-ink);
}
:is(.brand, .logo, .auth-brand).v4-logo > span { color: inherit; }
.v4-logo :is(.logo-mark, .brand-mark) { display: block; flex: none; width: 24px; height: 24px; color: var(--r5-ink); --logo-star: var(--r5-star); }
.v4-logo .logo-star { color: var(--r5-star); }
.v4-logo.v4-logo-dark, .v4-logo.v4-logo-dark:hover { color: #fff; }
.v4-logo.v4-logo-dark :is(.logo-mark, .brand-mark) { color: #fff; --logo-star: var(--r5-star); }
.v4-system {
  --forest: var(--r5-ink); --green: var(--r5-ink); --green-dark: #000;
  --ink: var(--r5-ink); --muted: var(--r5-muted); --line: var(--r5-line);
  --soft: var(--r5-subtle); --select: var(--r5-subtle); --white: #fff;
  --attention: var(--r5-orange); --danger: var(--r5-red); --info: var(--r5-blue);
  margin: 0; color: var(--r5-ink); background: var(--r5-surface); font-size: 15px; line-height: 1.45;
}
.v4-system *, .v4-system *::before, .v4-system *::after { box-sizing: border-box; }
.v4-system :is(button, input, select, textarea) { font: inherit; }
.v4-system :is(button, summary, input:not([type=checkbox]):not([type=radio]), select, textarea) { min-height: 44px; }
.v4-system :is(button, summary) { cursor: pointer; }
.v4-system :is(a, button, input, select, textarea, summary):focus-visible { outline: 2px solid var(--r5-blue); outline-offset: 2px; }
.v4-system h1 { font-size: 30px; line-height: 1.2; font-weight: 700; letter-spacing: -.02em; }
.v4-system .btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 8px;
  min-height: 44px; padding: 10px 16px; border: 1px solid var(--r5-ink); border-radius: var(--r5-radius);
  background: var(--r5-ink); color: #fff; font-size: 15px; font-weight: 700; line-height: 20px;
  text-decoration: none; text-align: center; box-shadow: none;
}
.v4-system .btn:hover { background: #000; border-color: #000; color: #fff; }
.v4-system .btn.secondary { border: 1px solid var(--r5-control); background: #fff; color: var(--r5-ink); font-weight: 600; }
.v4-system .btn.secondary:hover { border-color: var(--r5-ink-2); background: var(--r5-subtle); color: var(--r5-ink); }
.v4-system .btn:disabled, .v4-system .btn.secondary:disabled { opacity: 1; background: var(--r5-subtle); border-color: var(--r5-line); color: var(--r5-muted); cursor: not-allowed; }
.v4-system .btn.danger, .v4-system .btn.secondary.err { background: #fff; border: 1px solid var(--r5-red); color: var(--r5-red); font-weight: 600; }
.v4-system .btn.danger:hover, .v4-system .btn.secondary.err:hover { background: var(--r5-red-bg); color: var(--r5-red); }
.v4-system .text-link { display: inline-flex; align-items: center; min-height: 44px; color: var(--r5-ink); font-weight: 600; text-decoration: underline; text-underline-offset: 3px; }
.v4-system small { font-size: 13px; line-height: 18px; }
.v4-system .tag {
  display: inline-flex; align-items: center; gap: 6px; width: max-content; max-width: 100%;
  min-height: 26px; padding: 2px 8px; border: 1px solid var(--r5-neutral-line); border-radius: var(--r5-radius-tag);
  background: var(--r5-neutral-bg); color: var(--r5-neutral); font-size: 13px; line-height: 18px; font-weight: 700; white-space: nowrap;
}
.v4-system .tag--quiet { color: var(--r5-neutral); background: var(--r5-neutral-bg); border-color: var(--r5-neutral-line); }
.v4-system .tag--success { color: var(--r5-green); background: var(--r5-green-bg); border-color: var(--r5-green-line); }
.v4-system .tag--attention { color: var(--r5-orange); background: var(--r5-orange-bg); border-color: var(--r5-orange-line); }
.v4-system .tag--danger { color: var(--r5-red); background: var(--r5-red-bg); border-color: var(--r5-red-line); }
.v4-system .tag--info { color: var(--r5-blue); background: var(--r5-blue-bg); border-color: var(--r5-blue-line); }
.v4-system :is(input, select, textarea) { border-radius: var(--r5-radius); }
.v4-system [hidden] { display: none !important; }
@media (max-width: 767px) { .v4-system h1 { font-size: 26px; line-height: 1.2; } }

/* D / E: shared entry and focused setup components, canvas v4. */
[hidden] { display: none !important; }
.entry-shell { min-height:100dvh; background:#fff; color:var(--v4-ink); }
.entry-header { height:64px; padding:0 32px; display:flex; align-items:center; gap:16px; border-bottom:1px solid var(--v4-line); }
.entry-header .brand { flex:1; }
.entry-label { flex:none; color:var(--r5-muted); border:1px solid var(--r5-control); border-radius:6px; padding:2px 8px; font-size:13px; line-height:18px; font-weight:500; white-space:nowrap; }
.entry-main { max-width:600px; margin:0 auto; padding:40px 0 48px; }
.entry-main.login-main { max-width:400px; padding-top:64px; }
.entry-stack { display:flex; flex-direction:column; gap:16px; min-width:0; }
.entry-shell :is(h1,h2,p) { margin:0; }
.entry-shell h2 { font-size:18px;line-height:24px; }
.entry-shell :is(p,b,span) { overflow-wrap:anywhere; }
.entry-shell h1 { font-size:28px;line-height:34px;letter-spacing:-.02em; }
.entry-muted,.entry-small { color:var(--v4-ink2); }
.entry-small { font-size:13px;line-height:18px; }
.entry-shell label { display:flex;flex-direction:column;gap:4px;font-weight:500; }
.entry-shell :is(input,select) { width:100%;min-width:0;min-height:44px;border:1px solid var(--v4-line);border-radius:8px;padding:10px 12px;color:var(--v4-ink);background:#fff; }
.entry-shell .code-input { letter-spacing:.3em;font-variant-numeric:tabular-nums; }
.entry-actions { display:flex;gap:16px;flex-wrap:wrap;align-items:center; }
.entry-link { display:inline-flex;align-items:center;min-height:44px;border:0;background:none;padding:0;color:var(--v4-brand);font:inherit;font-weight:500;text-decoration:none; }
.entry-link:disabled { color:var(--v4-ink2);cursor:not-allowed; }
.entry-error { color:var(--v4-err);padding:12px;background:var(--v4-errBg);border-radius:8px; }
.entry-success { display:flex;align-items:center;gap:6px;color:var(--v4-ok);font-size:13px;line-height:18px;font-weight:500; }
.entry-success svg { flex:none; }
.entry-warning { color:var(--v4-warn);font-weight:500; }
.entry-option { display:flex;flex-direction:column;gap:4px;text-align:left;width:100%;min-height:64px;border:1px solid var(--v4-line);border-radius:6px;background:#fff;color:var(--v4-ink);padding:14px 16px; }
.entry-option span { color:var(--v4-ink2);font-size:14px; }
.entry-option[aria-pressed=true] { border-color:var(--v4-brand);background:var(--v4-sel); }
.entry-option:disabled { color:var(--v4-ink2);background:var(--v4-soft); }
.entry-lines { list-style:none;margin:0;padding:0; }
.entry-lines li { display:grid;grid-template-columns:40% minmax(0,1fr);gap:12px;padding:10px 0;border-bottom:1px solid var(--v4-line); }
.entry-lines li>span:first-child { color:var(--v4-ink2); }
.entry-sms { padding:16px;background:var(--v4-soft);border-radius:8px;white-space:pre-wrap; }
.entry-stepper { display:flex;list-style:none;margin:0 0 24px;padding:0;gap:4px 16px;font-size:13px;color:var(--v4-ink2);flex-wrap:wrap; }
.entry-stepper li { min-width:0; }
.entry-stepper li.on { color:var(--v4-ink);font-weight:600; }
.entry-stepper li.done { color:var(--v4-ink); }
.entry-back { min-width:44px;min-height:44px;display:inline-flex;align-items:center;text-decoration:none;color:var(--v4-brand); }
.entry-provider { background:var(--v4-soft); }
.entry-provider .entry-main { max-width:520px;margin:48px auto;padding:32px;background:#fff;border:1px solid var(--v4-line);border-radius:8px; }
.entry-provider .provider-name { flex:1;font-weight:600; }
@media(max-width:640px){
 .entry-header{height:56px;padding:0 16px;gap:8px;}
 .entry-main,.entry-main.login-main{padding:24px 16px 32px;}
 .entry-shell h1{font-size:20px;line-height:26px;}
 .entry-lines li{grid-template-columns:40% minmax(0,1fr);gap:12px;}
 .entry-provider .entry-main{margin:0;border:0;border-radius:0;padding:24px 16px 32px;}
 .entry-stepper{gap:8px;}
}

.entry-lines li:first-child{border-top:1px solid var(--v4-line)}
.setup-toolbar{display:flex;align-items:center;gap:16px;margin-bottom:24px}
.setup-toolbar .entry-stepper{flex:1;margin:0}
.setup-mobile-header{display:none}
.provider-symbol{width:24px;height:24px;display:grid;place-items:center;border-radius:4px;background:var(--r5-ink);color:#fff;font-size:13px;font-weight:600}
.entry-provider .entry-actions .btn,.entry-provider .entry-actions .entry-link{flex:1;justify-content:center}
.entry-provider .entry-actions .entry-link{border:1px solid var(--v4-line);border-radius:8px;color:var(--v4-ink)}
@media(max-width:640px){
 .setup-desktop-header,.setup-desktop-back{display:none}
 .setup-mobile-header{display:flex;padding-left:4px;gap:4px}
 .setup-mobile-header .entry-link{justify-content:center;min-width:44px}
 .setup-mobile-header strong{flex:1}
 .entry-setup .entry-main{padding-top:16px}
 .entry-setup.entry-provider .entry-main{padding-top:20px}
 .setup-toolbar{margin-bottom:20px}
}

.entry-shell input[aria-invalid=true]{border-color:var(--v4-err)}

/* Internal operations and customer support share the same v4 components. */
.ops-system { --dark:var(--v4-forest); --amber:var(--v4-warn); --red:var(--v4-err); }
.ops-system :is(h1,h2,h3,p) { margin:0 0 12px; }
.ops-system h2 { font-size:18px;line-height:24px;letter-spacing:-.01em; }
.ops-system h3 { font-size:16px;line-height:22px; }
.ops-system :is(p,strong,span,small,dd) { overflow-wrap:anywhere; }
.ops-system :is(input,select,textarea) { min-width:0;max-width:100%;padding:10px 12px;border:1px solid var(--line);background:#fff;color:var(--ink); }
.ops-system textarea { width:100%;resize:vertical;min-height:88px; }
.ops-system :is(.eyebrow,.section-label,.overline,.muted,.ticket-meta,.context-subtitle,.context-id) { color:var(--muted);font-size:13px;line-height:18px;font-weight:400; }
.ops-system :is(.status,.pill) { display:inline-flex;align-items:center;gap:6px;padding:2px 8px;border-radius:6px;border:1px solid var(--r5-neutral-line);min-height:26px;font-size:13px;line-height:18px;font-weight:600;background:var(--soft);color:var(--muted); }
.ops-system :is(.status,.pill)::before { content:none; }
.ops-system :is(.status.open,.pill.open) { color:var(--v4-warn);background:var(--v4-warnBg); }
.ops-system :is(.status.waiting,.pill.waiting_customer) { color:var(--v4-info);background:var(--v4-infoBg); }
.ops-system :is(.status.active,.pill.active) { color:var(--v4-ok);background:var(--v4-okBg); }
.ops-system :is(.status.failed,.status.unknown,.status.suspended,.pill.suspended) { color:var(--v4-err);background:var(--v4-errBg); }
.ops-system :is(.notice,.feedback,.error) { margin:0;padding:12px 24px;background:var(--v4-okBg);color:var(--v4-ok); }
.ops-system :is(.error,.feedback.error) { background:var(--v4-errBg);color:var(--v4-err); }
.ops-system .empty { padding:24px;color:var(--muted); }
.ops-system .btn.danger { color:var(--v4-err);border-color:var(--v4-err); }
.ops-system :is(.filters,.segmented) { display:flex;gap:16px;flex-wrap:wrap; }
.ops-system :is(.filters,.segmented) button { border:0;border-bottom:2px solid transparent;background:none;color:var(--muted);padding:8px 0;font-weight:500; }
.ops-system :is(.filters,.segmented) button.active { border-bottom-color:var(--green);color:var(--ink);font-weight:600; }
.ops-system .ticket-row { width:100%;display:block;text-align:left;padding:16px;border:0;border-bottom:1px solid var(--line);border-left:3px solid transparent;background:#fff;color:var(--ink); }
.ops-system .ticket-row:hover { background:var(--soft); }
.ops-system :is(.ticket-row.selected,.ticket-row.active) { background:var(--select);border-left-color:var(--green); }
.ops-system :is(.ticket-row-top,.row-top,.ticket-row-meta,.row-foot) { display:flex;align-items:start;justify-content:space-between;gap:8px; }
.ops-system .ticket-row strong { font-size:15px;font-weight:600; }
.ops-system .ticket-row p { margin:6px 0;color:var(--muted);font-size:14px; }
.ops-system :is(.ticket-row-meta,.row-foot,.message header) { font-size:13px;line-height:18px;color:var(--muted); }
.ops-system .message { margin:0 0 16px;padding:12px;border:1px solid var(--line);border-radius:8px;max-width:100%; }
.ops-system :is(.message.operator,.message.support) { background:var(--select); }
.ops-system .message header { display:flex;justify-content:space-between;gap:8px;flex-wrap:wrap; }
.ops-system .message p { margin:8px 0 0;white-space:pre-wrap; }
.ops-system :is(.compose-foot,.reply-actions) { display:flex;align-items:center;justify-content:space-between;gap:16px;margin-top:8px; }
.ops-system :is(.compose-foot,.reply-actions) :is(small,span) { color:var(--muted);font-size:13px;line-height:18px; }
.ops-system :is(.composer,.reply-form) label { display:block;margin-bottom:8px;font-weight:500; }
.ops-system :is(.signin-wrap,.auth) { max-width:480px;margin:64px auto;padding:0 24px; }
.ops-system :is(.signin-wrap,.auth) .v4-logo { margin-bottom:32px; }
.ops-system :is(.signin-options,.support-form) { display:grid;gap:16px;margin-top:24px; }
.ops-system .signin-options { margin-bottom:24px; }
.ops-system .audit-row { display:flex;gap:16px;justify-content:space-between;padding:12px 0;border-bottom:1px solid var(--line);font-size:13px; }
.ops-system .audit-row time { flex:none;color:var(--muted); }
.ops-system :is(.skip,.sr-only) { position:absolute;width:1px;height:1px;overflow:hidden;clip:rect(0,0,0,0); }
.ops-system .skip:focus { position:fixed;width:auto;height:auto;clip:auto;z-index:20;background:#fff;padding:12px; }
@media(max-width:760px) {
 .ops-system :is(.compose-foot,.reply-actions,.audit-row) { align-items:stretch;flex-direction:column;gap:8px; }
 .ops-system :is(.notice,.feedback,.error) { padding:12px 16px; }
}

/* Setup reference: the shared small demo pill and option rows. */
/* A status label, not a control: neutral chip so it never reads as a button. */
.entry-setup .entry-label { flex: none; min-height: 28px; display: inline-flex; align-items: center; padding: 0 10px; border: 1px solid #D5D7DC; border-radius: 6px; background: #F3F4F6; color: #3A3D45; font-size: 13px; line-height: 18px; font-weight: 700; }
.entry-setup .entry-option { flex-direction: row; align-items: center; gap: 12px; }
.setup-option-copy { display: flex; flex: 1; min-width: 0; flex-direction: column; gap: 2px; }
.setup-option-copy strong { color: var(--v4-ink); font-weight: 600; }
.setup-chevron { flex: none; color: var(--v4-ink2); }
.setup-mobile-header > .logo-mark { width: 24px; height: 24px; flex: none; color: var(--v4-brand); }
@media (max-width: 640px) {
  .entry-setup:not(.entry-provider) .entry-main { max-width: none; margin: 0; }
  .setup-mobile-header { padding: 0 12px 0 16px; gap: 12px; }
}
.entry-setup .entry-stepper li { line-height: 18px; }
.entry-setup .entry-option + .entry-option { margin-top: -8px; }
.entry-setup .entry-option:disabled .setup-option-copy strong { color: var(--v4-ink2); }
@media (max-width: 640px) {
  .entry-setup .entry-stepper { gap: 4px 16px; }
  .setup-mobile-header strong { font-weight: 600; }
}
@media (max-width: 640px) {
  .entry-setup:not(.entry-provider) .setup-mobile-header { padding-left: 20px; gap: 16px; }
}

.entry-shell:has(.login-main) .entry-header .brand { flex:none; margin-right:auto; }
.login-main :is(input,select) { border-radius:6px; font-size:16px; line-height:22px; font-weight:400; }
.login-main .entry-muted b { color:var(--v4-ink); overflow-wrap:anywhere; }
.login-main .entry-link { font-weight:500; text-decoration:underline; text-underline-offset:3px; }
@media(max-width:640px){ .entry-shell:has(.login-main) .entry-header{padding:0 12px 0 16px} }

/* R5: shared entry/setup components (innlogging, oppsett, leverandørside). */
.entry-shell { background: var(--r5-surface); color: var(--r5-ink); }
.entry-header { height: 72px; padding: 0 40px; border-bottom: 1px solid var(--r5-line); }
.entry-shell h1 { font-size: 30px; line-height: 1.2; letter-spacing: -.02em; }
.entry-shell h2 { font-size: 17px; line-height: 1.3; }
.entry-muted { color: var(--r5-muted); }
.entry-small { color: var(--r5-muted); font-size: 13px; line-height: 18px; }
.entry-label { min-height: 28px; display: inline-flex; align-items: center; padding: 0 10px; border: 1px solid #D5D7DC; border-radius: 6px; background: #F3F4F6; color: #3A3D45; font-size: 13px; line-height: 18px; font-weight: 700; }
.entry-setup .entry-option .setup-verb.primary { border-color: var(--r5-ink); background: var(--r5-ink); color: #fff !important; font-weight: 700; }
.entry-setup .entry-option:hover:not(:disabled) .setup-verb.primary { background: #000; border-color: #000; }
.entry-shell :is(input, select) { min-height: 48px; border: 1px solid var(--r5-control); border-radius: var(--r5-radius); font-size: 16px; }
.entry-shell label { font-size: 14px; font-weight: 600; }
.entry-link { color: var(--r5-ink); font-weight: 600; text-decoration: underline; text-underline-offset: 3px; }
.entry-error { color: var(--r5-red); background: var(--r5-red-bg); border: 1px solid var(--r5-red-line); border-radius: var(--r5-radius); font-weight: 600; }
.entry-success { align-self: flex-start; min-height: 26px; padding: 2px 8px; color: var(--r5-green); background: var(--r5-green-bg); border: 1px solid var(--r5-green-line); border-radius: var(--r5-radius-tag); font-size: 13px; font-weight: 700; }
.entry-warning { align-self: flex-start; margin: 0; min-height: 26px; padding: 2px 8px; display: inline-flex; align-items: center; color: var(--r5-orange); background: var(--r5-orange-bg); border: 1px solid var(--r5-orange-line); border-radius: var(--r5-radius-tag); font-size: 13px; font-weight: 700; }
.entry-shell p.entry-error:not([role=alert]) { align-self: flex-start; padding: 2px 8px; min-height: 26px; display: inline-flex; align-items: center; font-size: 13px; font-weight: 700; border-radius: var(--r5-radius-tag); }
.entry-option { min-height: 68px; border: 1px solid var(--r5-control); border-radius: var(--r5-radius-card); color: var(--r5-ink); }
.entry-option:hover:not(:disabled) { border-color: var(--r5-ink); }
.entry-option span { color: var(--r5-muted); font-size: 14px; }
.entry-option[aria-pressed=true] { border: 1.5px solid var(--r5-ink); background: var(--r5-subtle); }
.entry-option:disabled { color: var(--r5-muted); background: var(--r5-subtle); border-color: var(--r5-line); }
.setup-option-copy strong { font-size: 16px; font-weight: 700; }
.setup-verb { flex: none; min-height: 44px; padding: 0 14px; display: inline-flex; align-items: center; gap: 6px; border: 1px solid var(--r5-control); border-radius: var(--r5-radius); background: #fff; color: var(--r5-ink) !important; font-size: 15px !important; font-weight: 600; white-space: nowrap; }
.entry-lines li { border-bottom: 1px solid var(--r5-line-soft); }
.entry-lines li:first-child { border-top: 1px solid var(--r5-line-soft); }
.entry-lines li > span:first-child { color: var(--r5-muted); font-size: 14px; }
.entry-sms { padding: 14px 16px; background: #fff; border: 1px solid var(--r5-line); border-radius: var(--r5-radius-card); }
.entry-stepper { gap: 8px 12px; font-size: 14px; font-weight: 600; color: var(--r5-muted); align-items: center; }
.entry-stepper li { display: inline-flex; align-items: center; gap: 8px; }
.entry-stepper .step-n { width: 26px; height: 26px; display: inline-grid; place-items: center; flex: none; border: 1px solid var(--r5-control); border-radius: var(--r5-radius-tag); background: #fff; font-size: 13px; font-weight: 700; color: var(--r5-ink-2); }
.entry-stepper li.on { color: var(--r5-ink); font-weight: 700; }
.entry-stepper li.on .step-n { background: var(--r5-ink); border-color: var(--r5-ink); color: #fff; }
.entry-stepper li.done .step-n { background: var(--r5-green-bg); border-color: var(--r5-green-line); color: var(--r5-green); }
.entry-actions .btn { flex: 0 1 auto; }
.entry-back { color: var(--r5-ink); font-weight: 600; }
.entry-provider { background: var(--r5-subtle); }
.entry-provider .entry-main { border: 1px solid var(--r5-line); border-radius: var(--r5-radius-card); }
.provider-symbol { border-radius: var(--r5-radius-tag); }
.entry-provider .entry-actions .entry-link { border-color: var(--r5-control); text-decoration: none; }
/* Oppsett: trinnliste til venstre på desktop, øverst på mobil. */
@media (min-width: 900px) {
  .entry-setup:not(.entry-provider) .entry-main { max-width: 920px; display: grid; grid-template-columns: 220px minmax(0, 1fr); gap: 48px; align-items: start; }
  .entry-setup:not(.entry-provider) .setup-toolbar { flex-direction: column; align-items: stretch; gap: 16px; margin: 0; position: sticky; top: 24px; }
  .entry-setup:not(.entry-provider) .entry-stepper { flex-direction: column; align-items: flex-start; gap: 12px; padding: 16px; border: 1px solid var(--r5-line); border-radius: var(--r5-radius-card); }
  .entry-setup .setup-desktop-back .btn { width: 100%; }
}
@media (max-width: 640px) {
  .entry-header { height: 60px; padding: 0 16px; }
  .entry-shell h1 { font-size: 26px; }
  .entry-setup .entry-option { flex-wrap: wrap; }
  .entry-setup .setup-verb { width: 100%; justify-content: center; }
  .entry-actions .btn { flex: 1 1 auto; }
}
/* Pilot shell: no pill shapes (R5). */
.v4-system .support-pill { border-radius: var(--r5-radius-tag); }

/* Restored sessions and submitted forms keep a visible, honest working state. */
.entry-restore-mark {width:52px;height:52px;display:grid;place-items:center;background:#f3f3f4;border-radius:12px;margin-bottom:8px;}
.entry-restore-mark span,.entry-working::before {content:'';display:inline-block;width:20px;height:20px;border:2px solid #dedee1;border-top-color:#55585d;border-radius:50%;animation:entry-spin 1s linear infinite;}
.entry-working::before {width:14px;height:14px;border-color:currentColor;border-right-color:transparent;margin-right:9px;vertical-align:middle;}
@keyframes entry-spin {to{transform:rotate(360deg)}}
@media(prefers-reduced-motion:reduce){.entry-restore-mark span,.entry-working::before{animation:none;}}

/* Keep password helpers with their field and recovery choices together. */
.login-main .entry-password-field { position: relative; }
.login-main .entry-password-field label { gap: 8px; padding-top: 8px; }
.login-main .entry-password-toggle { position: absolute; top: 0; right: 0; min-height: 32px; font-size: 13px; }
.login-main .entry-password-field label > input { margin-top: 4px; }
.login-main .entry-login-options { gap: 0 20px; }
.login-main .entry-login-options .entry-link { font-size: 14px; }
.login-main .entry-error { font-size: 14px; font-weight: 400; line-height: 1.5; }
