/* Fordi – visuell profil: varm og trygg.
   Dyp petrol (tillit) + korall hjerte (varme) + krem (ro) + solgul (glede).
   Systemfonter: CSP tillater bare egne ressurser, og ingen fontfiler er inkludert. */
:root {
  --paper: #fff8f2;
  --paper-2: #fdf0e6;
  --surface: #ffffff;
  --surface-2: #f8f2ec;
  --ink: #1e2a33;
  --muted: #56636c;

  --brand: #1f5763;
  --brand-dark: #163f48;
  --brand-soft: #e4f0f1;
  --brand-tint: #f1f7f7;

  --heart: #f2735d;
  --heart-strong: #c8432f;
  --heart-soft: #fde8e2;
  --sun: #ffc95c;
  --sun-soft: #fff1cf;

  --success: #2b7a57;
  --success-soft: #e3f3ea;
  --danger: #b3261e;
  --danger-soft: #fcebe8;
  --info-soft: #eef4f5;

  --line: #ecdfd4;
  --line-strong: #cdbfb3;
  --shadow: 0 18px 50px #1e2a3314;
  --shadow-sm: 0 2px 10px #1e2a330d;
  --radius: 14px;
  --sans: ui-sans-serif, -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
  --serif: "Iowan Old Style", "Palatino Linotype", Palatino, "Book Antiqua", Georgia, serif;
  --mono: ui-monospace, SFMono-Regular, Menlo, Consolas, monospace;
  --gutter: clamp(16px, 6vw, 72px);
  --heart-icon: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24'%3E%3Cpath fill='%23f2735d' d='M12 21c-.3 0-.6-.1-.8-.3C7.4 17.6 2.5 13.6 2.5 8.9A5 5 0 0 1 12 6.6a5 5 0 0 1 9.5 2.3c0 4.7-4.9 8.7-8.7 11.8-.2.2-.5.3-.8.3z'/%3E%3C/svg%3E");
}

* { box-sizing: border-box; }
html { scroll-behavior: smooth; scroll-padding-top: 84px; }
@media (prefers-reduced-motion: reduce) { html { scroll-behavior: auto; } *, *::before, *::after { transition: none !important; animation: none !important; } }
body { margin: 0; background: var(--paper); color: var(--ink); font: 400 16px/1.6 var(--sans); -webkit-font-smoothing: antialiased; }
button, input, select, textarea { font: inherit; color: inherit; }
[hidden] { display: none !important; }
.hidden { display: none !important; }
.wrap { width: min(1160px, 100% - 2 * var(--gutter)); margin-inline: auto; }
.muted { color: var(--muted); }
h1, h2, h3 { font-family: var(--serif); font-weight: 500; letter-spacing: -.015em; color: var(--ink); }
:focus-visible { outline: 3px solid var(--brand); outline-offset: 2px; }
.skip-link { position: absolute; left: 12px; top: -60px; background: var(--ink); color: #fff; padding: 10px 14px; border-radius: 8px; z-index: 50; }
.skip-link:focus { top: 12px; }

/* ---------- Topbar ---------- */
.topbar { position: sticky; top: 0; z-index: 20; background: var(--paper); background: color-mix(in srgb, var(--paper) 90%, transparent); backdrop-filter: blur(10px); border-bottom: 1px solid var(--line); }
.topbar-inner { width: min(1240px, 100% - 2 * var(--gutter)); margin-inline: auto; height: 68px; display: flex; align-items: center; gap: 28px; }
.brand { display: inline-flex; gap: 9px; align-items: center; font: 750 23px var(--sans); color: var(--brand); text-decoration: none; letter-spacing: -.04em; }
.brand-logo { width: 34px; height: 34px; display: block; }
.main-nav { display: flex; gap: 22px; }
.main-nav a { color: var(--muted); text-decoration: none; font-size: 15px; font-weight: 600; }
.main-nav a:hover { color: var(--brand); }
.top-actions { margin-left: auto; display: flex; gap: 14px; align-items: center; }
.pilot-badge { font-size: 12px; font-weight: 600; color: #7a5a14; background: var(--sun-soft); padding: 6px 11px; border-radius: 30px; display: flex; align-items: center; gap: 7px; }
.pilot-badge i { width: 7px; height: 7px; background: #e0a526; border-radius: 50%; }

.account-menu { position: relative; }
.account-trigger { display: flex; align-items: center; gap: 9px; background: var(--surface); border: 1px solid var(--line); border-radius: 30px; padding: 4px 12px 4px 4px; cursor: pointer; font-size: 14px; font-weight: 600; }
.account-trigger:hover { border-color: var(--line-strong); }
.avatar { width: 30px; height: 30px; border-radius: 50%; background: var(--heart-soft); color: var(--heart-strong); display: grid; place-items: center; font-size: 12px; font-weight: 750; }
.account-name { max-width: 160px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.chevron { font-size: 11px; color: var(--muted); }
.menu { position: absolute; right: 0; top: calc(100% + 8px); min-width: 210px; background: var(--surface); border: 1px solid var(--line); border-radius: 12px; box-shadow: var(--shadow); padding: 6px; display: flex; flex-direction: column; }
.menu button { text-align: left; background: none; border: 0; padding: 10px 12px; border-radius: 8px; cursor: pointer; font-size: 14px; }
.menu button:hover, .menu button:focus-visible { background: var(--brand-tint); }
.menu hr { border: 0; border-top: 1px solid var(--line); margin: 6px 4px; }

/* Språkvelger: et lite flagg øverst til høyre */
.lang-menu { position: relative; }
.lang-trigger { display: grid; place-items: center; width: 38px; height: 38px; padding: 0; background: var(--surface); border: 1px solid var(--line); border-radius: 50%; cursor: pointer; }
.lang-trigger:hover { border-color: var(--line-strong); }
.lang-trigger svg, .lang-list .flag svg { display: block; width: 22px; height: 15px; border-radius: 3px; box-shadow: 0 0 0 1px #1e2a3326; }
.lang-list { min-width: 170px; }
.lang-list button { display: flex; align-items: center; gap: 10px; }
.lang-list button[aria-checked="true"] { font-weight: 700; background: var(--brand-tint); }
.lang-list button[aria-checked="true"]::after { content: "✓"; margin-left: auto; color: var(--brand); }

/* Siden vises når oversettelsene er lastet, så den ikke blinker fra norsk til valgt språk.
   Animasjonen viser den uansett etter et sekund, i tilfelle skriptene ikke kjører. */
html.i18n-pending body { animation: i18n-reveal 0s 1s forwards; visibility: hidden; }
@keyframes i18n-reveal { to { visibility: visible; } }
@media (prefers-reduced-motion: reduce) { html.i18n-pending body { animation: i18n-reveal 0s 1s forwards !important; } }

/* ---------- Knapper ---------- */
.button { display: inline-flex; align-items: center; justify-content: center; gap: 10px; padding: 13px 20px; text-decoration: none; font: 650 15px/1.2 var(--sans); border: 1px solid transparent; border-radius: 999px; cursor: pointer; transition: transform .15s, background .15s, border-color .15s, box-shadow .15s; white-space: nowrap; }
.button:hover { transform: translateY(-1px); }
.button:disabled { opacity: .6; cursor: progress; transform: none; }
.button-dark { background: var(--brand); color: #fff; box-shadow: 0 6px 16px #1f576326; }
.button-dark:hover { background: var(--brand-dark); }
.button-heart { background: var(--heart-strong); color: #fff; box-shadow: 0 6px 18px #c8432f33; }
.button-heart:hover { background: #ad3624; }
.button-heart::before { content: ""; width: 17px; height: 17px; background: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24'%3E%3Cpath fill='%23fff' d='M12 21c-.3 0-.6-.1-.8-.3C7.4 17.6 2.5 13.6 2.5 8.9A5 5 0 0 1 12 6.6a5 5 0 0 1 9.5 2.3c0 4.7-4.9 8.7-8.7 11.8-.2.2-.5.3-.8.3z'/%3E%3C/svg%3E") center / contain no-repeat; }
.button-light { background: var(--brand-soft); color: var(--brand); }
.button-light:hover { background: #d4e7e9; }
.button-ghost { background: transparent; color: var(--brand); border-color: var(--line-strong); }
.button-ghost:hover { border-color: var(--brand); }
.button-danger { background: var(--danger); color: #fff; }
.button-small { padding: 9px 15px; font-size: 13.5px; }
.link-button { background: none; border: 0; padding: 0; color: var(--brand); font-weight: 650; text-decoration: underline; text-underline-offset: 3px; cursor: pointer; font-size: inherit; }
.spinner { width: 14px; height: 14px; border: 2px solid currentColor; border-right-color: transparent; border-radius: 50%; animation: spin .7s linear infinite; }
@keyframes spin { to { transform: rotate(360deg); } }

/* ---------- Hero ---------- */
.eyebrow { text-transform: uppercase; letter-spacing: .14em; font-size: 12px; font-weight: 750; color: var(--heart-strong); margin: 0 0 14px; }
.hero { width: min(1160px, 100% - 2 * var(--gutter)); margin-inline: auto; padding: 60px 0 72px; display: grid; grid-template-columns: 1.05fr .95fr; gap: 6%; align-items: center; }
.hero h1 { font-family: var(--sans); font-size: clamp(44px, 6vw, 70px); letter-spacing: -.05em; line-height: 1.02; margin: 0 0 22px; font-weight: 650; }
.hero h1 em { font-family: var(--serif); font-weight: 500; color: var(--brand); letter-spacing: -.02em; }
.hero-intro { max-width: 470px; font-size: 18px; line-height: 1.7; color: var(--muted); margin: 0 0 28px; }
.hero-actions { display: flex; gap: 12px; flex-wrap: wrap; }
.hero-trust { display: flex; gap: 18px; flex-wrap: wrap; margin: 26px 0 0; padding: 0; list-style: none; font-size: 14px; color: var(--muted); }
.hero-trust li { display: flex; align-items: center; gap: 7px; }
.hero-trust svg { width: 17px; height: 17px; flex: 0 0 auto; color: var(--success); }

.hero-art { position: relative; aspect-ratio: 1 / .9; max-width: 520px; width: 100%; justify-self: center; }
.hero-art .halo { position: absolute; inset: 6% 4% 2% 8%; border-radius: 50%; background: radial-gradient(circle at 40% 40%, var(--heart-soft), var(--paper-2) 60%, transparent 72%); }
.hero-art .sunspot { position: absolute; right: 8%; top: 4%; width: 22%; aspect-ratio: 1; border-radius: 50%; background: var(--sun); opacity: .85; }
.hero-art .main-bubble { position: absolute; left: 20%; top: 16%; width: 56%; filter: drop-shadow(0 24px 30px #1f576333); animation: float 7s ease-in-out infinite; }
.hero-art .note { position: absolute; z-index: 2; background: var(--surface); padding: 12px 16px 12px 14px; border-radius: 16px 16px 16px 4px; box-shadow: var(--shadow); font: italic 16px/1.35 var(--serif); display: flex; gap: 9px; align-items: center; }
.hero-art .note::before { content: ""; flex: 0 0 18px; height: 18px; background: var(--heart-icon) center / contain no-repeat; }
.hero-art .note-one { right: 0; top: 30%; transform: rotate(4deg); }
.hero-art .note-two { left: 0; bottom: 14%; transform: rotate(-4deg); border-radius: 16px 16px 4px 16px; }
.hero-art .note-three { right: 10%; bottom: 0; transform: rotate(2deg); font: 600 13px/1.3 var(--sans); background: var(--sun-soft); color: #6d4e0c; }
.hero-art .note-three::before { display: none; }
.hero-art .mini-heart { position: absolute; width: 22px; height: 22px; background: var(--heart-icon) center / contain no-repeat; opacity: .8; animation: rise 6s ease-in-out infinite; }
.hero-art .mh-1 { left: 14%; top: 18%; }
.hero-art .mh-2 { right: 26%; top: 10%; width: 16px; height: 16px; animation-delay: 1.5s; }
.hero-art .mh-3 { left: 30%; bottom: 8%; width: 14px; height: 14px; animation-delay: 3s; }
@keyframes float { 50% { transform: translateY(-10px) rotate(-1.5deg); } }
@keyframes rise { 50% { transform: translateY(-12px) scale(1.08); } }

/* ---------- Min side ---------- */
.dashboard { background: linear-gradient(180deg, var(--brand-tint), var(--paper)); border-bottom: 1px solid var(--line); padding: 44px 0 52px; }
.dashboard-head { display: flex; align-items: flex-end; justify-content: space-between; gap: 24px; margin-bottom: 26px; flex-wrap: wrap; }
.dashboard-head h2 { font-size: clamp(30px, 4vw, 42px); margin: 0 0 4px; }
.dashboard-head p { margin: 0; font-size: 14px; }
.dashboard-head-actions { display: flex; gap: 10px; flex-wrap: wrap; }
.tabs { display: flex; gap: 6px; margin-bottom: 22px; overflow-x: auto; padding: 4px; background: var(--surface); border: 1px solid var(--line); border-radius: 999px; width: max-content; max-width: 100%; }
.tab { background: none; border: 0; padding: 9px 18px; border-radius: 999px; font-size: 15px; font-weight: 650; color: var(--muted); cursor: pointer; white-space: nowrap; }
.tab[aria-selected="true"] { background: var(--brand); color: #fff; }
.tab:not([aria-selected="true"]):hover { color: var(--brand); background: var(--brand-tint); }
.tab-panel { min-height: 120px; }
.fordi-list { display: grid; grid-template-columns: repeat(auto-fill, minmax(280px, 1fr)); gap: 16px; }
.fordi-card { position: relative; background: var(--surface); border-radius: 16px 16px 16px 4px; padding: 20px 22px 18px; box-shadow: var(--shadow-sm); border: 1px solid var(--line); display: flex; flex-direction: column; gap: 8px; }
.fordi-card::after { content: ""; position: absolute; right: 18px; top: 18px; width: 22px; height: 22px; background: var(--heart-icon) center / contain no-repeat; }
.fordi-card.is-deed::after { width: 10px; height: 10px; top: 24px; border-radius: 50%; background: var(--success); }
.fordi-card-top { display: flex; flex-direction: column; gap: 2px; padding-right: 30px; }
.fordi-card h3 { margin: 0; font-size: 19px; }
.fordi-card time { font-size: 12.5px; color: var(--muted); }
.fordi-card .reason { margin: 4px 0 0; font: italic 18px/1.45 var(--serif); }
.fordi-card .reason .because-prefix { font-style: normal; color: var(--heart-strong); }
.fordi-card .reason:not(.personal) { font: 15px/1.55 var(--sans); color: var(--muted); }
.fordi-card .who { font-size: 13.5px; color: var(--brand); font-weight: 650; margin: 0; }
.panel-empty { background: var(--surface); border: 1.5px dashed var(--line-strong); border-radius: var(--radius); padding: 32px; text-align: center; color: var(--muted); }
.panel-empty::before { content: ""; display: block; width: 40px; height: 40px; margin: 0 auto 10px; background: url("/logo.svg") center / contain no-repeat; }
.panel-empty strong { display: block; color: var(--ink); font: 500 21px var(--serif); margin-bottom: 6px; }
.panel-empty .button { margin-top: 16px; }

/* ---------- Mine gjerninger ---------- */
.deed-list { display: flex; flex-direction: column; gap: 12px; }
.deed-row { background: var(--surface); border-radius: var(--radius); border: 1px solid var(--line); padding: 18px 20px; box-shadow: var(--shadow-sm); display: grid; grid-template-columns: 1fr auto; gap: 10px 20px; align-items: center; }
.deed-row h3 { margin: 0 0 4px; font-size: 20px; display: flex; gap: 10px; align-items: center; flex-wrap: wrap; }
.deed-meta { font-size: 13.5px; color: var(--muted); margin: 0; }
.deed-actions { display: flex; gap: 8px; flex-wrap: wrap; justify-content: flex-end; }
.status { font: 750 11px var(--sans); text-transform: uppercase; letter-spacing: .08em; padding: 4px 9px; border-radius: 20px; }
.status-published { background: var(--success-soft); color: var(--success); }
.status-closed { background: var(--surface-2); color: var(--muted); }
.status-cancelled { background: var(--danger-soft); color: var(--danger); }
.confirm-inline { grid-column: 1 / -1; display: flex; gap: 10px; align-items: center; flex-wrap: wrap; background: var(--danger-soft); padding: 12px 14px; border-radius: 10px; font-size: 14px; }
.confirm-inline p { margin: 0 auto 0 0; }

/* ---------- Send en takk ---------- */
.thanks-section { padding: 80px 0 72px; background: var(--paper-2); border-bottom: 1px solid var(--line); position: relative; overflow: hidden; }
.thanks-section::before { content: ""; position: absolute; right: -120px; top: -120px; width: 360px; height: 360px; border-radius: 50%; background: var(--heart-soft); opacity: .7; }
.thanks-layout { position: relative; display: grid; grid-template-columns: minmax(0, .75fr) minmax(0, 1.25fr); gap: 6%; align-items: start; }
.thanks-heading h2 { margin: 0 0 10px; font-size: clamp(34px, 4vw, 46px); }
.thanks-heading > p { margin: 0 0 24px; color: var(--muted); font-size: 17px; }
.how-list { list-style: none; padding: 0; margin: 0; display: grid; gap: 14px; font-size: 15px; color: var(--muted); }
.how-list li { display: flex; gap: 12px; align-items: flex-start; }
.how-list li > span:first-child { flex: 0 0 28px; height: 28px; border-radius: 50%; background: var(--surface); border: 1.5px solid var(--heart); display: grid; place-items: center; font-size: 13px; color: var(--heart-strong); font-weight: 750; }
.card { background: var(--surface); border: 1px solid var(--line); border-radius: 22px; box-shadow: var(--shadow); }
.thanks-form { padding: clamp(24px, 3vw, 36px); position: relative; }
.thanks-form::before { content: ""; position: absolute; left: clamp(24px, 3vw, 36px); top: -22px; width: 44px; height: 44px; border-radius: 50%; background: var(--surface) var(--heart-icon) center / 24px no-repeat; box-shadow: var(--shadow-sm); border: 1px solid var(--line); }
.thanks-sentence { display: grid; grid-template-columns: max-content minmax(0, 1fr); gap: 14px 16px; align-items: start; }
.thanks-sentence > label { padding-top: 8px; font: 500 clamp(21px, 2.4vw, 28px) var(--serif); color: var(--brand); }
.thanks-sentence > label[for="thanks-reason"] { color: var(--heart-strong); font-style: italic; }
.thanks-form :is(input, textarea), .field :is(input, textarea, select) { display: block; width: 100%; padding: 12px 14px; border: 1.5px solid var(--line-strong); border-radius: 12px; background: var(--surface); font-size: 16px; line-height: 1.45; transition: border-color .15s, box-shadow .15s; }
.thanks-form textarea, .field textarea { resize: vertical; min-height: 88px; }
:is(.thanks-form, .field) :is(input, textarea, select):hover { border-color: #b3a497; }
:is(.thanks-form, .field) :is(input, textarea, select):focus { border-color: var(--brand); outline: none; box-shadow: 0 0 0 4px #1f57632b; }
::placeholder { color: #6b767d; }
[aria-invalid="true"] { border-color: var(--danger) !important; }
.thanks-form .contact-input:is([data-state="empty"], [data-state="invalid"]) { border-color: var(--danger); background: #fffafa; }
.thanks-form .contact-input:is([data-state="empty"], [data-state="invalid"]):focus { border-color: var(--danger); box-shadow: 0 0 0 4px #b3261e24; }
.thanks-form .contact-input[data-state="valid"] { border-color: var(--success); }
.thanks-form .contact-input[data-state="valid"]:focus { border-color: var(--success); box-shadow: 0 0 0 4px #2b7a5729; }
.contact-hint.is-invalid { color: var(--danger); font-weight: 600; }
.contact-hint.is-valid { color: var(--success); font-weight: 600; }
.field-error { font-size: 13.5px; color: var(--danger); font-weight: 650; margin: 6px 0 0; }
.field-error::before { content: "! "; }
.field-hint { font-size: 13.5px; color: var(--muted); margin: 6px 0 0; line-height: 1.45; }
.counter { text-align: right; }
.counter.near-limit { color: var(--danger); }
.sender-field { border-top: 1px dashed var(--line-strong); margin-top: 22px; padding-top: 4px; }
.sender-field .field, .sender-field .field-hint { max-width: 30rem; }
.form-footer { display: flex; align-items: center; gap: 16px; margin-top: 22px; flex-wrap: wrap; }
.check-field { display: flex; gap: 10px; align-items: center; margin: 18px 0 0; font-size: 15px; cursor: pointer; width: fit-content; }
.check-field input { width: 18px; height: 18px; accent-color: var(--brand); margin: 0; }
.privacy-note { display: flex; gap: 8px; align-items: center; font-size: 13.5px; color: var(--muted); margin: 0; }
.privacy-note svg { width: 16px; height: 16px; color: var(--success); flex: 0 0 auto; }

/* ---------- Meldinger ---------- */
.message { margin-top: 16px; padding: 12px 14px; border-radius: 12px; font-size: 14.5px; line-height: 1.5; display: flex; gap: 10px; align-items: flex-start; }
.message::before { flex: 0 0 22px; height: 22px; border-radius: 50%; display: grid; place-items: center; font-size: 12px; font-weight: 750; }
.message-info { background: var(--info-soft); color: #2d4c53; }
.message-info::before { content: "i"; background: #d3e5e8; }
.message-error { background: var(--danger-soft); color: var(--danger); }
.message-error::before { content: "!"; background: #f6d3ce; }
.message-success { background: var(--success-soft); color: #1f5c41; }
.message-success::before { content: "✓"; background: #c8e8d6; }
.receipt-to { margin: 0 0 6px; font-size: 15px; font-weight: 650; color: var(--brand); }
.message-pending { background: #fff0dc; color: #7a3f06; box-shadow: inset 4px 0 0 #e8892b; }
.message-pending::before { content: "✉"; background: #ffd9a8; }
.message a { color: inherit; font-weight: 750; }

/* ---------- Gjerninger ---------- */
.activity-section { padding: 72px 0 80px; background: var(--paper); }
.section-heading { display: flex; align-items: flex-end; justify-content: space-between; gap: 20px; margin-bottom: 28px; flex-wrap: wrap; }
.section-heading .eyebrow { margin-bottom: 8px; }
.section-heading h2 { font-size: clamp(32px, 4vw, 42px); margin: 0; }
.section-lead { margin: 8px 0 0; font-size: 16px; max-width: 540px; }
.section-heading-actions { display: flex; align-items: center; gap: 10px; }
.count-pill { font-size: 13px; font-weight: 600; color: var(--brand); background: var(--brand-soft); border-radius: 30px; padding: 7px 12px; }
.activity-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(280px, 1fr)); gap: 18px; }
.activity-card { min-height: 220px; background: var(--surface); padding: 22px; border-radius: var(--radius); border: 1px solid var(--line); box-shadow: var(--shadow-sm); display: flex; flex-direction: column; transition: transform .18s, box-shadow .18s, border-color .18s; }
.activity-card:hover { transform: translateY(-3px); box-shadow: var(--shadow); border-color: #e3cfc0; }
.category-tag { width: max-content; max-width: 100%; font-size: 11.5px; text-transform: uppercase; letter-spacing: .08em; font-weight: 750; padding: 5px 10px; background: var(--brand-soft); color: var(--brand); border-radius: 30px; }
.activity-card h3 { font-size: 23px; margin: 14px 0 8px; line-height: 1.2; }
.activity-card p { font-size: 15px; line-height: 1.6; color: var(--muted); margin: 0; }
.card-meta { margin-top: auto; padding-top: 18px; display: flex; justify-content: space-between; align-items: center; gap: 12px; color: var(--muted); font-size: 13.5px; }
.card-meta .button { padding: 9px 15px; font-size: 13.5px; }
.skeleton-card { min-height: 220px; border-radius: var(--radius); background: linear-gradient(100deg, var(--surface-2) 30%, #fffaf6 50%, var(--surface-2) 70%) 0 0 / 300% 100%; animation: shimmer 1.4s infinite; }
@keyframes shimmer { to { background-position: -150% 0; } }
.empty-state { text-align: center; padding: 48px 20px; color: var(--muted); }
.empty-state h3 { font-size: 24px; margin: 12px 0 6px; }
.empty-icon { display: inline-block; width: 48px; height: 48px; background: url("/logo.svg") center / contain no-repeat; font-size: 0; }

/* ---------- Trygghet ---------- */
.trust-section { background: var(--brand); color: #e8f2f3; padding: 72px 0; position: relative; overflow: hidden; }
.trust-section::after { content: ""; position: absolute; left: -80px; bottom: -140px; width: 320px; height: 320px; border-radius: 50%; background: #ffffff0d; }
.trust-section .eyebrow { color: var(--sun); }
.trust-section h2 { color: #fff; font-size: clamp(32px, 4vw, 42px); margin: 0 0 10px; }
.trust-lead { max-width: 620px; font-size: 17px; color: #cfe3e5; margin: 0 0 34px; }
.trust-lead a { color: #fff; font-weight: 650; }
.trust-grid { position: relative; z-index: 1; display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 16px; }
.trust-card { background: #ffffff10; border: 1px solid #ffffff24; border-radius: var(--radius); padding: 20px; }
.trust-card svg { width: 30px; height: 30px; color: var(--sun); margin-bottom: 12px; }
.trust-card h3 { color: #fff; font: 650 17px/1.3 var(--sans); letter-spacing: 0; margin: 0 0 6px; }
.trust-card p { margin: 0; font-size: 14.5px; line-height: 1.55; color: #cfe3e5; }


footer { border-top: 1px solid var(--line); padding: 24px 0; color: var(--muted); font-size: 13.5px; background: var(--paper); }
.footer-inner { display: flex; align-items: center; justify-content: space-between; gap: 16px; flex-wrap: wrap; }
.footer-brand { font-size: 19px; }
.footer-brand .brand-logo { width: 26px; height: 26px; }
.footer-links { display: flex; gap: 16px; align-items: center; }
.footer-links .link-button { font-size: 13.5px; }

/* ---------- Dialog ---------- */
.dialog { border: 0; padding: 0; border-radius: 22px; background: var(--surface); color: var(--ink); width: min(520px, 100% - 24px); box-shadow: 0 30px 90px #10232a59; max-height: min(90vh, 900px); overflow: auto; }
.dialog.wide { width: min(680px, 100% - 24px); }
/* Ikke-modal dialog (se openDialog i app.js): egen plassering og bakgrunn i stedet for top layer og ::backdrop. */
.dialog[open] { position: fixed; inset: 0; margin: auto; height: fit-content; z-index: 100; }
.dialog-backdrop { position: fixed; inset: 0; z-index: 99; background: #10232ab3; backdrop-filter: blur(4px); }
.dialog-backdrop[hidden] { display: none; }
.dialog-open, .dialog-open body { overflow: hidden; }
.dialog-close { position: absolute; right: 14px; top: 12px; z-index: 2; background: var(--surface-2); border: 0; border-radius: 50%; width: 36px; height: 36px; font-size: 20px; line-height: 1; color: var(--muted); cursor: pointer; }
.dialog-close:hover { background: var(--line); color: var(--ink); }
.dialog-inner { padding: 36px 36px 28px; }
.dialog-kicker { font-size: 12px; letter-spacing: .12em; text-transform: uppercase; color: var(--heart-strong); font-weight: 750; margin: 0 0 8px; }
.dialog h2 { font-size: 30px; margin: 0 0 8px; line-height: 1.15; padding-right: 30px; }
.dialog h2:focus, .dialog h2:focus-visible { outline: none; }
.dialog-lead { font-size: 15.5px; line-height: 1.6; color: var(--muted); margin: 0 0 18px; }
.field { display: block; margin: 16px 0 0; }
.field > span { display: block; font-size: 14px; font-weight: 650; margin-bottom: 6px; }
.field .optional { font-weight: 400; color: var(--muted); }
.code-input { font: 750 26px/1 var(--mono) !important; letter-spacing: .35em; text-transform: uppercase; text-align: center; }
.dialog-actions { display: flex; gap: 10px; margin-top: 24px; }
.dialog-actions.sticky { position: sticky; bottom: 0; z-index: 1; margin: 24px -36px -28px; padding: 16px 36px 20px; background: linear-gradient(to top, var(--surface) 80%, transparent); }
.dialog-actions .button { flex: 1; }
.dialog-foot { margin: 18px 0 0; font-size: 14px; color: var(--muted); text-align: center; }
.success-mark { width: 60px; height: 60px; background: var(--heart-soft); color: var(--heart-strong); border-radius: 50%; display: grid; place-items: center; font-size: 26px; margin-bottom: 16px; }
.receipt { position: relative; background: var(--paper-2); border-radius: 16px 16px 16px 4px; padding: 18px 20px; margin: 18px 0 4px; }
.receipt::after { content: ""; position: absolute; right: 16px; top: 16px; width: 22px; height: 22px; background: var(--heart-icon) center / contain no-repeat; }
.receipt .reason { font: italic 20px/1.45 var(--serif); margin: 0 0 8px; padding-right: 28px; }
.receipt .share-label { padding-right: 28px; }
.receipt .meta { font-size: 13.5px; color: var(--muted); margin: 0; }

.choice-group { display: grid; gap: 10px; margin-top: 16px; border: 0; padding: 0; }
.choice-group legend { font-size: 14px; font-weight: 650; margin-bottom: 8px; padding: 0; }
.choice { display: flex; gap: 12px; align-items: flex-start; border: 1.5px solid var(--line); border-radius: 12px; padding: 12px 14px; cursor: pointer; }
.choice:has(input:checked) { border-color: var(--brand); background: var(--brand-tint); }
.choice input { margin-top: 4px; accent-color: var(--brand); }
.choice strong { display: block; font-size: 15px; }
.choice small { color: var(--muted); font-size: 13.5px; }

.share-box { display: grid; grid-template-columns: auto 1fr; gap: 20px; align-items: center; background: var(--brand-tint); border-radius: 16px; padding: 18px; }
.share-qr { width: 156px; height: 156px; background: #fff; padding: 6px; border: 1px solid var(--line); border-radius: 10px; }
.share-code { font: 750 32px/1 var(--mono); letter-spacing: .2em; color: var(--brand); margin: 4px 0 10px; }
.share-label { font-size: 12px; text-transform: uppercase; letter-spacing: .1em; color: var(--muted); font-weight: 750; margin: 0; }
.share-tools { display: flex; gap: 8px; flex-wrap: wrap; }
.subsection { margin-top: 22px; border-top: 1px solid var(--line); padding-top: 18px; }
.subsection h3 { font-size: 19px; margin: 0 0 6px; }
.secret-row { display: flex; gap: 8px; align-items: center; margin-top: 10px; }
.secret-row code { flex: 1; background: var(--surface-2); padding: 10px 12px; border-radius: 8px; font-size: 14px; overflow-wrap: anywhere; }
.participant-list { list-style: none; padding: 0; margin: 0; }
.participant-list li { display: flex; justify-content: space-between; gap: 12px; padding: 11px 0; border-top: 1px solid var(--line); font-size: 14.5px; }
.participant-list li span:last-child { color: var(--muted); }

.toast { position: fixed; bottom: 24px; left: 50%; transform: translateX(-50%); background: var(--ink); color: #fff; padding: 12px 20px; border-radius: 999px; font-size: 14px; box-shadow: var(--shadow); z-index: 110; max-width: calc(100% - 32px); }

/* Innlogget: Min side først */
body.signed-in .hero { display: none; }

#print-area { display: none; }
@media print {
  body > *:not(#print-area) { display: none !important; }
  #print-area { display: block !important; text-align: center; font-family: var(--sans); padding: 24px; color: #000; }
  #print-area h1 { font-size: 30px; margin: 0 0 8px; }
  #print-area .print-logo { width: 56px; height: 56px; margin: 0 auto 8px; }
  #print-area img:not(.print-logo) { width: 300px; height: 300px; margin: 24px auto; display: block; }
  #print-area .print-code { font: 750 44px var(--mono); letter-spacing: .25em; }
}

@media (max-width: 960px) {
  .trust-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
}
@media (max-width: 860px) {
  .main-nav { display: none; }
  .hero { grid-template-columns: 1fr; padding: 40px 0 52px; gap: 28px; }
  .hero-art { max-width: 420px; }
  .thanks-layout { grid-template-columns: 1fr; gap: 36px; }
}
@media (max-width: 560px) {
  .pilot-badge { display: none; }
  .topbar-inner { height: 60px; }
  .account-name { display: none; }
  .account-trigger { padding: 3px 8px 3px 3px; }
  .hero-art { max-width: 320px; }
  .hero-art .note { font-size: 14px; }
  .thanks-sentence { grid-template-columns: 1fr; gap: 6px; }
  .thanks-sentence > label { padding-top: 6px; }
  .form-footer .button, .hero-actions .button { width: 100%; }
  .section-heading-actions { width: 100%; justify-content: space-between; }
  .dashboard-head-actions { width: 100%; }
  .dashboard-head-actions .button { flex: 1; }
  .tabs { width: 100%; }
  .deed-row { grid-template-columns: 1fr; }
  .deed-actions { justify-content: flex-start; }
  .trust-grid { grid-template-columns: 1fr; }
  .dialog, .dialog[open] { width: 100%; max-width: none; max-height: 92vh; margin: auto 0 0; border-radius: 22px 22px 0 0; }
  .dialog-inner { padding: 32px 20px 22px; }
  .dialog-actions { flex-direction: column-reverse; }
  .dialog-actions.sticky { margin: 22px -20px -22px; padding: 14px 20px 18px; }
  .share-box { grid-template-columns: 1fr; justify-items: center; text-align: center; }
  .share-tools { justify-content: center; }
}

/* ---------- Åpningsanimasjon: «Vær snill» ----------
   Spilles hver gang forsiden lastes. Uten JavaScript, ved dyplenker og for
   innloggede vises bare sluttilstanden: mottolinjen og den vanlige forsiden. */
.motto { display: flex; align-items: center; gap: 9px; margin: 0 0 16px; font-size: 13px; font-weight: 750; letter-spacing: .1em; text-transform: uppercase; color: var(--heart-strong); transition: opacity .7s ease, letter-spacing .9s ease; }
.motto-heart { flex: 0 0 16px; height: 16px; background: var(--heart-icon) center / contain no-repeat; }
.hero-stage { display: grid; }
.hero-stage > * { grid-area: 1 / 1; }
.hero-main { transition: opacity .7s ease, transform .7s ease; }
.kind-intro { list-style: none; margin: 0; padding: 0; display: grid; gap: 22px; align-content: center; visibility: hidden; }
.kind-intro li { display: flex; align-items: center; gap: 18px; opacity: 0; transform: translateY(18px); transition: opacity .7s ease, transform .7s cubic-bezier(.2, .8, .2, 1); }
.kind-intro strong { display: block; font: 500 clamp(28px, 3.6vw, 44px)/1.1 var(--serif); letter-spacing: -.02em; color: var(--ink); }
.kind-intro li > div > span { display: block; margin-top: 4px; font-size: 17px; color: var(--muted); }
.kind-icon { flex: 0 0 60px; height: 60px; border-radius: 50%; display: grid; place-items: center; }
.kind-icon svg { width: 30px; height: 30px; }
.kind-self { background: var(--success-soft); color: var(--success); }
.kind-others { background: var(--heart-soft); color: var(--heart-strong); }
.kind-world { background: var(--brand-soft); color: var(--brand); }

.hero.intro-play .kind-intro { visibility: visible; }
.hero.intro-play .kind-intro li.show { opacity: 1; transform: none; }
.hero.intro-play .hero-main { opacity: 0; transform: translateY(18px); visibility: hidden; }
.hero.intro-play .motto { opacity: 0; letter-spacing: .4em; }
.hero.intro-leaving .kind-intro li { opacity: 0 !important; transform: translateY(-14px) scale(.97) !important; transition-duration: .45s; }
.hero.intro-leaving .kind-intro li:nth-child(2) { transition-delay: .06s; }
.hero.intro-leaving .kind-intro li:nth-child(3) { transition-delay: .12s; }

.hero-art.beat .main-bubble { animation: beat .9s ease-out, float 7s ease-in-out .9s infinite; }
@keyframes beat { 0% { transform: scale(1); } 30% { transform: scale(1.09); } 55% { transform: scale(.98); } 100% { transform: scale(1); } }

.intro-skip { position: absolute; left: 78px; bottom: -44px; background: none; border: 0; color: var(--muted); font-size: 14px; font-weight: 600; text-decoration: underline; text-underline-offset: 3px; cursor: pointer; opacity: 0; transition: opacity .4s; }
.hero.intro-play .intro-skip { opacity: 1; }
.hero-copy { position: relative; }

@media (max-width: 560px) {
  .kind-intro { gap: 16px; }
  .kind-icon { flex-basis: 48px; height: 48px; }
  .kind-icon svg { width: 24px; height: 24px; }
  .kind-intro li > div > span { font-size: 15px; }
}

/* ---------- «Vær snill» nederst: samme linjer og ikoner som åpningen ---------- */
.kind-values { padding: 64px 0; background: var(--paper); }
.kind-values-motto { justify-content: center; margin-bottom: 28px; }
.kind-row { list-style: none; margin: 0; padding: 0; display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 28px; }
.kind-row li { display: flex; align-items: center; gap: 16px; }
.kind-row strong { display: block; font: 500 clamp(22px, 2.3vw, 28px)/1.15 var(--serif); letter-spacing: -.015em; color: var(--ink); }
.kind-row li > div > span { display: block; margin-top: 4px; font-size: 15.5px; color: var(--muted); }
@media (max-width: 860px) {
  .kind-row { grid-template-columns: 1fr; gap: 20px; max-width: 420px; margin-inline: auto; }
}

/* Gjerninger der arrangøren krever navn eller kontaktinformasjon */
.activity-card .share-notice, .share-notice { font-size: 13.5px; font-weight: 650; color: #7a3f06; margin: 0; }
.share-consent .check-field { align-items: flex-start; width: auto; }
.share-consent .check-field input { margin-top: 2px; flex: 0 0 auto; }
.participant-who { display: grid; gap: 2px; min-width: 0; }
.participant-who small { font-size: 13px; overflow-wrap: anywhere; }
.participant-who small a { color: var(--brand); }
.participant-list li .participant-who span { color: inherit; }
.message-share::before { content: "!"; }

/* Brukernavnet (e-posten) i kontoskjemaet: vist for passordbehandlere, ikke til å endre */
.field input[readonly] { background: var(--brand-tint); color: var(--muted); cursor: default; }
