/* ═══════════════════════════════════════════
   EFTERPLAN — Stylesheet
   Tone: Warm, trustworthy, clear — Swedish editorial
   T088: Frontend-uppgradering (design polish, non-generic)
════════════════════════════════════════════ */


:root {
  /* ── Paper & ink (warm, oklch-derived) ── */
  --paper:        #F6F1E7;  /* warm off-white, like uncoated book stock */
  --paper-soft:   #EFE8D8;  /* slightly deeper tone for section backs */
  --paper-card:   #FBF7EE;  /* softest card surface, not pure white */
  --ink:          #14192B;  /* deep warm ink — not pure black */
  --ink-soft:     #394156;  /* body-emphasis / sub */
  --ink-muted:    #485063;  /* meta, captions — 7.17:1 on paper, passes AAA */
  --rule:         #E3DCCB;  /* warm border, tinted toward paper */
  --rule-strong:  #CFC6B1;

  /* ── Primary accent: deep ink-teal (trustworthy, pålitlig) ── */
  --ink-teal:     #1F3A4E;
  --ink-teal-dk:  #142739;
  --ink-teal-tn:  #E7EEF2;  /* tinted surface, 8% */

  /* ── Secondary accent: burnished terracotta (warm, human) ── */
  --ember:        #B4552E;
  --ember-dk:     #8E3F1E;
  --ember-tn:     #F5E7DE;

  /* ── Legacy mappings (do not remove — used throughout app) ── */
  --bg:           var(--paper);
  --bg-card:      var(--paper-card);
  --text-primary: var(--ink);
  --text-soft:    var(--ink-soft);
  --text-muted:   var(--ink-muted);
  --text-secondary: var(--ink-soft);
  --border:       var(--rule);
  --accent:       var(--ink-teal);
  --accent-dark:  var(--ink-teal-dk);
  --accent-light: var(--ink-teal-tn);
  --disabled-bg:  #D6CEBC;
  --red:          #9E3025;
  --red-bg:       #F7E5DF;
  --yellow:       #7A4A0F;
  --yellow-bg:    #F6EBD1;
  --grey:         var(--ink-muted);
  --grey-bg:      #EFE8D8;
  --green:        #2E6A48;
  --danger:       #A23423;

  --radius:       10px;
  --radius-sm:    6px;
  --radius-lg:    18px;
  --shadow:       0 1px 2px rgba(20,25,43,.04), 0 8px 24px -12px rgba(20,25,43,.10);
  --shadow-sm:    0 1px 2px rgba(20,25,43,.05);
  --transition:   0.2s ease;

  /* ── Typography: distinctive display + humanist body ── */
  --font-display: 'Fraunces', 'Iowan Old Style', 'Apple Garamond', Georgia, serif;
  --font:         'IBM Plex Sans', -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif;
  --font-mono:    'IBM Plex Mono', ui-monospace, SFMono-Regular, Menlo, monospace;

  /* ── Fluid type scale (mobile → desktop) ── */
  --fs-xs:    clamp(0.75rem, 0.73rem + 0.08vw, 0.8rem);
  --fs-sm:    clamp(0.875rem, 0.85rem + 0.12vw, 0.95rem);
  --fs-base:  clamp(1rem, 0.97rem + 0.15vw, 1.08rem);
  --fs-md:    clamp(1.1rem, 1.05rem + 0.25vw, 1.22rem);
  --fs-lg:    clamp(1.25rem, 1.17rem + 0.4vw, 1.5rem);
  --fs-xl:    clamp(1.5rem, 1.35rem + 0.75vw, 2rem);
  --fs-2xl:   clamp(1.95rem, 1.6rem + 1.6vw, 2.85rem);
  --fs-3xl:   clamp(2.4rem, 1.9rem + 2.5vw, 4rem);

  /* ── Fluid spacing (8-based, breathing on larger screens) ── */
  --space-2xs: clamp(0.25rem, 0.22rem + 0.12vw, 0.35rem);
  --space-xs:  clamp(0.5rem,  0.45rem + 0.2vw,  0.7rem);
  --space-sm:  clamp(0.75rem, 0.65rem + 0.4vw,  1.05rem);
  --space-md:  clamp(1.1rem,  0.95rem + 0.6vw,  1.6rem);
  --space-lg:  clamp(1.75rem, 1.4rem + 1.3vw,   2.75rem);
  --space-xl:  clamp(2.75rem, 2.1rem + 2.4vw,   4.5rem);
  --space-2xl: clamp(4rem,    3rem + 3.6vw,     7rem);

  --measure:   62ch;     /* optimal reading width */
  --nav-height: 57px;
  --bottom-nav-height: 58px;
}

*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }

/* ─── SKIP LINK ──────────────────────────────── */
.skip-link {
  position: absolute;
  top: -100%;
  left: 8px;
  background: var(--accent);
  color: #fff;
  padding: 8px 16px;
  border-radius: 0 0 6px 6px;
  font-size: 0.85rem;
  font-weight: 600;
  z-index: 10000;
  text-decoration: none;
  transition: top 0.15s;
}
.skip-link:focus { top: 0; }

/* ─── FOCUS STYLES ──────────────────────────── */
:focus-visible {
  outline: 3px solid var(--accent);
  outline-offset: 3px;
  border-radius: 4px;
}

body {
  font-family: var(--font);
  font-feature-settings: 'ss01', 'ss03', 'cv11';
  /* Warm paper base with two very soft radial tints — depth without noise.
     Painted on body background so stacking of sticky/fixed children is untouched. */
  background-color: var(--paper);
  background-image:
    radial-gradient(1200px 800px at 85% -10%, rgba(180,85,46,.035), transparent 60%),
    radial-gradient(900px 700px at -5% 110%, rgba(31,58,78,.045), transparent 55%);
  background-attachment: fixed;
  color: var(--ink);
  line-height: 1.55;
  min-height: 100vh;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
  text-rendering: optimizeLegibility;
}

/* Selection echoes the ember accent */
::selection {
  background: var(--ember);
  color: var(--paper);
}

/* ─── SCREENS ──────────────────────────────── */
.screen { display: none; }
.screen.active { display: block; }
.screen.active#screen-onboarding { display: flex; }

/* ─── NAV ───────────────────────────────────── */
.nav {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 16px 20px;
  position: sticky;
  top: 0;
  z-index: 100;
}
.nav-light {
  background: var(--bg);
  border-bottom: 1px solid var(--border);
}
.nav-plan { padding: 12px 20px; }
.logo-wrap {
  display: flex;
  flex-direction: column;
  gap: 1px;
}
.logo {
  font-size: 1.3rem;
  font-weight: 700;
  letter-spacing: -0.5px;
  color: var(--accent);
  line-height: 1.2;
}
.logo-tagline {
  font-size: 0.68rem;
  color: var(--text-muted);
  font-weight: 400;
  letter-spacing: 0;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  max-width: 200px;
}
@media (max-width: 420px) {
  .logo-tagline { display: none; }
}
.nav-actions {
  display: none;
  gap: 8px;
}

/* ─── BUTTONS ────────────────────────────────── */
.btn-primary {
  background: var(--ink-teal);
  color: var(--paper);
  border: none;
  border-radius: var(--radius-sm);
  padding: 13px 22px;
  font-family: var(--font);
  font-size: var(--fs-sm);
  font-weight: 500;
  letter-spacing: 0.01em;
  cursor: pointer;
  transition: background .18s ease, transform .18s ease, box-shadow .18s ease;
  width: 100%;
  box-shadow: var(--shadow-sm);
}
.btn-primary:hover {
  background: var(--ink-teal-dk);
  transform: translateY(-1px);
  box-shadow: var(--shadow);
}
.btn-primary:active { transform: translateY(0); }
.btn-primary:disabled {
  background: var(--disabled-bg);
  color: var(--ink-muted);
  cursor: not-allowed;
  box-shadow: none;
  transform: none;
}
.btn-primary.btn-large {
  padding: 18px 34px;
  font-size: var(--fs-base);
  font-weight: 500;
  letter-spacing: 0.005em;
  width: auto;
  border-radius: 8px;
}

@keyframes ctaPulse {
  0%, 100% { box-shadow: 0 0 0 0 rgba(44, 74, 110, 0.35); }
  50%       { box-shadow: 0 0 0 12px rgba(44, 74, 110, 0); }
}
.btn-ghost {
  background: transparent;
  color: var(--text-primary);
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
  padding: 10px 20px;
  font-size: 0.95rem;
  cursor: pointer;
  transition: var(--transition);
  width: 100%;
}
.btn-ghost:hover { background: var(--border); }
.btn-ghost.btn-sm {
  padding: 7px 14px;
  font-size: 0.85rem;
  width: auto;
}
.back-btn {
  background: none;
  border: none;
  color: var(--text-soft);
  font-size: 0.9rem;
  cursor: pointer;
  padding: 0 0 16px 0;
  display: block;
}
.back-btn:hover { color: var(--text-primary); }

/* ─── NAV LANDING LINKS ──────────────────────── */
.nav-landing-links {
  display: flex;
  gap: 20px;
  align-items: center;
}
.nav-text-link {
  font-size: 0.88rem;
  color: var(--text-soft);
  text-decoration: none;
  font-weight: 500;
  transition: color 0.15s;
}
.nav-text-link:hover { color: var(--text-primary); }

/* ─── NAV PLAN ACTIONS ───────────────────────── */
.nav-plan-actions {
  display: flex;
  gap: 8px;
  align-items: center;
}
.plan-participants {
  display: flex;
  align-items: center;
  gap: 4px;
  margin-right: 4px;
}
.plan-participant-add-btn {
  width: 36px;
  height: 36px;
  border-radius: 50%;
  background: transparent;
  border: 1.5px dashed var(--border);
  color: var(--text-muted);
  font-size: 1.1rem;
  font-weight: 400;
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  flex-shrink: 0;
  transition: border-color 0.15s, color 0.15s;
}
.plan-participant-add-btn:hover {
  border-color: var(--accent);
  color: var(--accent);
}
.plan-participant-chip {
  width: 36px;
  height: 36px;
  border-radius: 50%;
  background: var(--accent-light);
  border: 2px solid var(--accent);
  color: var(--accent);
  font-size: 0.78rem;
  font-weight: 700;
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: default;
  flex-shrink: 0;
  letter-spacing: 0.03em;
}
.plan-participant-chip--deceased {
  background: var(--accent);
  color: #fff;
  border-color: var(--accent);
  box-shadow: 0 1px 4px rgba(44,74,110,0.25);
}

/* ─── LANDING ────────────────────────────────── */
#screen-landing .nav {
  background: transparent;
}
.landing-hero {
  min-height: calc(100vh - 80px);
  display: grid;
  align-items: center;
  padding: var(--space-xl) var(--space-md) var(--space-lg);
  background: transparent;
  position: relative;
}
/* Editorial ornament — asymmetric rule, purposeful (not decorative filler) */
.landing-hero::after {
  content: '';
  position: absolute;
  left: var(--space-md);
  bottom: var(--space-lg);
  width: clamp(36px, 6vw, 64px);
  height: 1px;
  background: var(--ember);
  opacity: .7;
}
.landing-content {
  max-width: 640px;
  margin: 0 auto;
  text-align: left;
  padding-left: 0;
}
.landing-brand {
  font-family: var(--font-display);
  font-variation-settings: 'opsz' 14, 'SOFT' 50, 'wght' 500;
  font-size: var(--fs-md);
  font-weight: 500;
  font-style: italic;
  color: var(--ink-soft);
  letter-spacing: 0;
  margin-bottom: var(--space-md);
  display: inline-flex;
  align-items: center;
  gap: var(--space-xs);
}
.landing-brand::before {
  content: '';
  width: 18px;
  height: 1px;
  background: var(--ember);
}

.landing-eyebrow {
  font-family: var(--font);
  font-size: var(--fs-sm);
  letter-spacing: 0.02em;
  color: var(--ink-soft);
  font-weight: 500;
  margin-bottom: var(--space-sm);
  line-height: 1.4;
  padding: 0;
  text-transform: none;
}
.landing-headline {
  font-family: var(--font-display);
  font-variation-settings: 'opsz' 144, 'SOFT' 40, 'wght' 420;
  font-size: var(--fs-3xl);
  font-weight: 420;
  line-height: 1.02;
  color: var(--ink);
  margin-bottom: var(--space-md);
  letter-spacing: -0.025em;
  max-width: 14ch;
}
.landing-headline em {
  font-style: italic;
  font-variation-settings: 'opsz' 144, 'SOFT' 90, 'wght' 420;
  color: var(--ink-teal);
}
.landing-sub {
  font-size: var(--fs-md);
  color: var(--ink-soft);
  max-width: 46ch;
  margin: 0 0 var(--space-lg);
  line-height: 1.6;
}
.landing-payoff {
  list-style: none;
  padding: 0;
  margin: 0 0 var(--space-md);
  max-width: 42ch;
  text-align: left;
  display: flex;
  flex-direction: column;
  gap: var(--space-xs);
  border-top: 1px solid var(--rule);
  padding-top: var(--space-md);
}
.landing-payoff li {
  font-size: var(--fs-sm);
  color: var(--ink-soft);
  padding-left: 26px;
  position: relative;
  line-height: 1.5;
}
.landing-payoff li::before {
  content: '';
  position: absolute;
  left: 0;
  top: 0.55em;
  width: 14px;
  height: 1px;
  background: var(--ink-teal);
}
.landing-note {
  margin-top: var(--space-sm);
  font-size: var(--fs-xs);
  color: var(--ink-muted);
  letter-spacing: 0.01em;
}

/* Nudge brand logo in nav into the editorial voice */
#screen-landing .logo {
  font-family: var(--font-display);
  font-variation-settings: 'opsz' 36, 'SOFT' 40, 'wght' 500;
  font-weight: 500;
  letter-spacing: -0.02em;
  color: var(--ink);
}

@media (min-width: 720px) {
  .landing-hero {
    grid-template-columns: minmax(0, 1fr);
    padding: var(--space-2xl) clamp(2rem, 6vw, 5rem);
  }
  .landing-content { padding-left: 0; }
  .landing-headline { max-width: 16ch; }
}

/* ─── LANDING SECTIONS (Om / Integritet / FAQ) ── */
.landing-section {
  max-width: 720px;
  margin: 0 auto;
  padding: var(--space-xl) var(--space-md);
  border-top: 1px solid var(--rule);
  position: relative;
}
.landing-section::before {
  content: '';
  position: absolute;
  top: -1px;
  left: var(--space-md);
  width: 40px;
  height: 1px;
  background: var(--ember);
}
.landing-section h2 {
  font-family: var(--font-display);
  font-variation-settings: 'opsz' 60, 'SOFT' 40, 'wght' 500;
  font-size: var(--fs-xl);
  font-weight: 500;
  letter-spacing: -0.018em;
  line-height: 1.15;
  margin-bottom: var(--space-md);
  color: var(--ink);
}
.landing-section p {
  font-size: var(--fs-base);
  color: var(--ink-soft);
  line-height: 1.75;
  margin-bottom: var(--space-sm);
  max-width: var(--measure);
}
.landing-section p:last-child { margin-bottom: 0; }
.landing-contact-link {
  color: var(--accent);
  font-weight: 600;
  text-decoration: none;
}
.landing-contact-link:hover { text-decoration: underline; }
/* Fix #16: ta bort !important — mer specifik selektor räcker */
.landing-section .legal-disclaimer {
  font-size: 0.82rem;
  color: var(--text-muted);
  background: var(--grey-bg);
  border-radius: var(--radius-sm);
  padding: 14px 16px;
  margin-top: 10px;
  line-height: 1.6;
}
.faq-item {
  margin-bottom: var(--space-md);
  padding-bottom: var(--space-md);
  border-bottom: 1px solid var(--rule);
}
.faq-item:last-child {
  margin-bottom: 0;
  padding-bottom: 0;
  border-bottom: none;
}
.faq-item h3 {
  font-family: var(--font-display);
  font-variation-settings: 'opsz' 36, 'SOFT' 40, 'wght' 500;
  font-size: var(--fs-md);
  font-weight: 500;
  color: var(--ink);
  margin-bottom: var(--space-xs);
  line-height: 1.3;
  letter-spacing: -0.012em;
}
.faq-item p {
  font-size: var(--fs-base);
  color: var(--ink-soft);
  line-height: 1.75;
  margin: 0;
  max-width: var(--measure);
}
.faq-item p a,
.landing-section p a {
  color: var(--ink-teal);
  text-decoration: underline;
  text-decoration-thickness: 1px;
  text-underline-offset: 3px;
  text-decoration-color: color-mix(in oklab, var(--ink-teal) 40%, transparent);
  transition: text-decoration-color .15s ease;
}
.faq-item p a:hover,
.landing-section p a:hover {
  text-decoration-color: var(--ember);
}
.privacy-badges {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  margin-top: 20px;
}
.privacy-badge {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  background: var(--accent-light);
  border: 1px solid var(--border);
  border-radius: 20px;
  padding: 6px 14px;
  font-size: 0.82rem;
  font-weight: 600;
  color: var(--accent);
}

/* ─── LANDING FOOTER ─────────────────────────── */
.landing-footer {
  background: var(--ink);
  color: color-mix(in oklab, var(--paper) 55%, transparent);
  padding: var(--space-md) var(--space-md) calc(var(--space-md) + env(safe-area-inset-bottom, 0px));
  text-align: center;
  font-size: var(--fs-xs);
  letter-spacing: 0.01em;
  font-family: var(--font);
}
.landing-footer a {
  color: color-mix(in oklab, var(--paper) 82%, transparent);
  text-decoration: none;
  border-bottom: 1px solid transparent;
  transition: border-color .15s ease, color .15s ease;
}
.landing-footer a:hover {
  color: var(--paper);
  border-bottom-color: var(--ember);
}

/* ─── ONBOARDING (fullscreen conversational) ─── */
#screen-onboarding {
  height: 100vh;
  height: 100dvh;
  flex-direction: column;
  background: var(--bg);
  overflow: hidden;
}

.ob-topbar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 20px 32px;
  flex-shrink: 0;
}

.ob-back {
  background: none;
  border: none;
  color: var(--text-muted);
  font-size: 0.9rem;
  cursor: pointer;
  padding: 6px 0;
  font-family: var(--font);
  transition: var(--transition);
  width: 80px;
  text-align: left;
}
.ob-back:hover { color: var(--text-primary); }

.ob-dots {
  display: flex;
  gap: 6px;
  align-items: center;
}
.ob-dot {
  width: 6px;
  height: 6px;
  border-radius: 50%;
  background: var(--border);
  transition: var(--transition);
}
.ob-dot.active {
  background: var(--accent);
  width: 20px;
  border-radius: 3px;
}
.ob-dot.done { background: var(--accent); opacity: 0.4; }

.ob-stage {
  flex: 1;
  display: flex;
  align-items: flex-start;
  justify-content: center;
  padding: 32px 20px 72px;
  overflow-y: auto;
  -webkit-overflow-scrolling: touch;
  position: relative;
}

.ob-step {
  display: none;
  width: 100%;
  max-width: 480px;
  animation: obFadeIn 0.35s ease;
}
.ob-step.active { display: block; }
.ob-step.exit {
  animation: obFadeOut 0.2s ease forwards;
}

@keyframes obFadeIn {
  from { opacity: 0; transform: translateY(18px); }
  to   { opacity: 1; transform: translateY(0); }
}
@keyframes obFadeOut {
  from { opacity: 1; transform: translateY(0); }
  to   { opacity: 0; transform: translateY(-12px); }
}

.ob-content { width: 100%; }

.ob-label {
  font-size: 0.75rem;
  text-transform: uppercase;
  letter-spacing: 1.5px;
  color: var(--text-muted);
  font-weight: 600;
  margin-bottom: 12px;
}

.ob-reassure {
  font-size: 0.82rem;
  color: var(--text-muted);
  margin-top: 6px;
  margin-bottom: 28px;
  padding: 8px 12px;
  background: var(--accent-light);
  border-radius: 8px;
  border-left: 3px solid var(--accent);
}

.ob-title {
  font-size: clamp(1.7rem, 4vw, 2.4rem);
  font-weight: 700;
  letter-spacing: -0.5px;
  line-height: 1.2;
  margin-bottom: 10px;
  color: var(--text-primary);
}

.ob-hint {
  font-size: 1rem;
  color: var(--text-soft);
  margin-bottom: 36px;
  line-height: 1.5;
}

.ob-skip {
  font-size: 0.85rem;
  color: var(--text-muted);
  margin: 14px 0 20px;
}

/* Choices (auto-advance) */
.ob-choices {
  display: flex;
  flex-direction: column;
  gap: 10px;
}

.ob-choice {
  background: var(--bg-card);
  border: 1.5px solid var(--border);
  border-radius: var(--radius);
  padding: 16px 20px;
  font-size: 1rem;
  font-weight: 500;
  font-family: var(--font);
  text-align: left;
  cursor: pointer;
  transition: border-color 0.15s ease, background 0.15s ease, transform 0.1s ease;
  color: var(--text-primary);
  width: 100%;
}
.ob-choice:hover {
  border-color: var(--accent);
  background: var(--accent-light);
}
.ob-choice.selected {
  border-color: var(--accent);
  background: var(--accent-light);
  color: var(--accent);
  transform: scale(1.02);
  box-shadow: 0 2px 14px rgba(44, 74, 110, 0.15);
}

/* Checkboxes */
.ob-checks {
  display: flex;
  flex-direction: column;
  gap: 8px;
  margin-bottom: 4px;
}

.ob-check {
  display: flex;
  align-items: center;
  gap: 14px;
  cursor: pointer;
  padding: 14px 18px;
  border: 1.5px solid var(--border);
  border-radius: var(--radius-sm);
  background: var(--bg-card);
  transition: var(--transition);
}
.ob-check:hover { border-color: var(--accent); }
.ob-check input {
  /* visually hidden but accessible to screen readers */
  position: absolute;
  opacity: 0;
  width: 1px;
  height: 1px;
  overflow: hidden;
  clip: rect(0,0,0,0);
  white-space: nowrap;
}
.ob-check-box {
  width: 20px;
  height: 20px;
  border: 2px solid var(--border);
  border-radius: 5px;
  flex-shrink: 0;
  transition: var(--transition);
  display: flex;
  align-items: center;
  justify-content: center;
}
.ob-check input:checked ~ .ob-check-box {
  background: var(--accent);
  border-color: var(--accent);
}
.ob-check input:checked ~ .ob-check-box::after {
  content: '✓';
  color: white;
  font-size: 11px;
  font-weight: 800;
}
.ob-check:has(input:checked) {
  border-color: var(--accent);
  background: var(--accent-light);
}
.ob-check-label {
  font-size: 0.95rem;
  font-weight: 500;
  display: flex;
  flex-direction: column;
  gap: 3px;
}
.ob-check-hint {
  font-size: 0.75rem;
  font-weight: 400;
  color: var(--text-soft);
  line-height: 1.3;
}
.ob-check-note {
  font-size: 0.72rem;
  font-weight: 500;
  color: var(--green);
  line-height: 1.3;
  margin-top: 1px;
}

/* Text input */
.ob-text-input {
  width: 100%;
  border: none;
  border-bottom: 2px solid var(--border);
  border-radius: 0;
  padding: 12px 4px;
  font-size: 1.4rem;
  font-family: var(--font);
  color: var(--text-primary);
  background: transparent;
  outline: none;
  transition: border-color 0.2s;
  margin-bottom: 0;
}
.ob-text-input:focus {
  border-bottom-color: var(--accent);
  box-shadow: 0 2px 0 0 var(--accent); /* synligt fokusindikator för tangentbord */
}
.ob-text-input::placeholder { color: var(--text-muted); }

/* Next button */
.ob-next-btn {
  background: var(--accent);
  color: #fff;
  border: none;
  border-radius: var(--radius-sm);
  padding: 14px 28px;
  font-size: 1rem;
  font-weight: 600;
  cursor: pointer;
  transition: var(--transition);
  font-family: var(--font);
  margin-top: 8px;
}
.ob-next-btn:hover { background: var(--accent-dark); }
.ob-next-btn:disabled {
  background: var(--disabled-bg);
  color: var(--text-muted);
  cursor: not-allowed;
}
.ob-next-btn:disabled:hover { background: var(--disabled-bg); }
.ob-check-group-label {
  font-size: 0.75rem;
  font-weight: 600;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  color: var(--text-muted);
  margin: 16px 0 6px;
}

/* ─── CHOICE GRID ────────────────────────────── */
.choice-grid {
  display: grid;
  grid-template-columns: 1fr;
  gap: 10px;
  margin-bottom: 28px;
}
.choice-btn {
  background: var(--bg-card);
  border: 1.5px solid var(--border);
  border-radius: var(--radius-sm);
  padding: 14px 16px;
  font-size: 0.95rem;
  font-weight: 500;
  cursor: pointer;
  text-align: left;
  transition: var(--transition);
  color: var(--text-primary);
}
.choice-btn:hover { border-color: var(--accent); }
.choice-btn.selected {
  border-color: var(--accent);
  background: var(--accent-light);
  color: var(--accent);
}
.choice-grid-sm { margin-bottom: 20px; }
.choice-btn-sm {
  padding: 10px 14px;
  font-size: 0.9rem;
}

/* ─── CHECKBOX GRID ──────────────────────────── */
.checkbox-grid {
  display: grid;
  grid-template-columns: 1fr;
  gap: 10px;
  margin-bottom: 16px;
}
.checkbox-btn {
  display: flex;
  align-items: center;
  gap: 10px;
  background: var(--bg-card);
  border: 1.5px solid var(--border);
  border-radius: var(--radius-sm);
  padding: 14px 16px;
  cursor: pointer;
  transition: var(--transition);
}
.checkbox-btn:has(input:checked) {
  border-color: var(--accent);
  background: var(--accent-light);
}
.checkbox-btn input { accent-color: var(--accent); width: 16px; height: 16px; }
.checkbox-label { font-size: 0.9rem; font-weight: 500; }

/* ─── TEXT INPUT ─────────────────────────────── */
.text-input {
  width: 100%;
  border: 1.5px solid var(--border);
  border-radius: var(--radius-sm);
  padding: 12px 16px;
  font-size: 1rem;
  font-family: var(--font);
  color: var(--text-primary);
  background: var(--bg-card);
  transition: var(--transition);
  outline: none;
}
.text-input:focus { border-color: var(--accent); }
.text-input::placeholder { color: var(--text-muted); }
.textarea { resize: vertical; min-height: 80px; }

/* ─── TABS ───────────────────────────────────── */
.plan-tabs-bar {
  background: var(--bg);
  position: fixed;
  top: auto;
  bottom: 0;
  left: 0;
  right: 0;
  border-top: 1px solid var(--border);
  border-bottom: none;
  padding-bottom: env(safe-area-inset-bottom, 0px);
  z-index: 95;
}
.plan-tabs {
  max-width: 100%;
  padding: 0;
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 0;
}
.plan-tab {
  background: none;
  border: none;
  padding: 16px 12px;
  font-size: 0.9rem;
  font-weight: 600;
  font-family: var(--font);
  color: var(--text-muted);
  cursor: pointer;
  border-bottom: 2px solid transparent;
  margin-bottom: -1px;
  text-align: center;
  justify-content: center;
  transition: var(--transition);
}
.plan-tab:hover { color: var(--text-primary); }
.plan-tab.active {
  color: var(--accent);
  border-bottom-color: var(--accent);
}
.plan-tab-content { display: none; }
.plan-tab-content.active { display: block; }

/* ─── PLAN ───────────────────────────────────── */
.plan-wrap {
  max-width: 700px;
  margin: 0 auto;
  padding: 24px 16px 140px; /* extra bottom for nav + safe area */
}
.plan-header { margin-bottom: 40px; }
.plan-title {
  font-size: 1.8rem;
  font-weight: 700;
  letter-spacing: -0.3px;
  margin-bottom: 8px;
}
.plan-sub {
  font-size: 1rem;
  color: var(--text-soft);
  margin-bottom: 12px;
}
.plan-dodsbo-def {
  font-size: 0.8rem;
  color: var(--text-muted);
  line-height: 1.5;
  margin-bottom: 16px;
  padding: 8px 12px;
  background: var(--accent-light);
  border-left: 3px solid var(--border);
  border-radius: 0 var(--radius-sm) var(--radius-sm) 0;
}
.plan-dodsbo-def:empty { display: none; }
.progress-summary {
  font-size: 0.9rem;
  color: var(--text-muted);
}
.progress-summary strong { color: var(--accent); }

/* ─── TASK SECTIONS ──────────────────────────── */
.task-sections { display: flex; flex-direction: column; gap: 36px; }
.task-section {}
.section-header {
  display: flex;
  align-items: center;
  gap: 10px;
  margin-bottom: 12px;
}
.section-dot {
  width: 10px;
  height: 10px;
  border-radius: 50%;
  flex-shrink: 0;
}
.dot-red    { background: var(--red); }
.dot-yellow { background: var(--yellow); }
.dot-grey   { background: var(--grey); }
.section-title {
  font-size: 0.9rem;
  font-weight: 700;
  letter-spacing: 0.1px;
  color: var(--text-soft);
}
.section-count {
  margin-left: auto;
  font-size: 0.8rem;
  color: var(--text-muted);
  font-weight: 500;
}

/* ─── TASK CARD ──────────────────────────────── */
.task-list { display: flex; flex-direction: column; gap: 8px; }
.task-wrap { display: flex; flex-direction: column; }
.task-card {
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 16px 20px;
  display: flex;
  align-items: flex-start;
  gap: 14px;
  cursor: pointer;
  transition: var(--transition);
}
.task-card:hover { border-color: var(--accent); box-shadow: var(--shadow); }
.task-card.expanded {
  border-radius: var(--radius) var(--radius) 0 0;
  border-color: var(--accent);
}
.task-card.done {
  opacity: 0.72;
  cursor: pointer;  /* klickbar för att visa Ångra */
}
.task-check {
  width: 22px;
  height: 22px;
  border: 2px solid var(--border);
  border-radius: 50%;
  flex-shrink: 0;
  margin-top: 2px;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: var(--transition);
  background: var(--bg-card);
}
.task-check.checked {
  background: var(--accent);
  border-color: var(--accent);
}
.task-check.checked::after {
  content: '✓';
  color: white;
  font-size: 12px;
  font-weight: 700;
}
.task-body { flex: 1; min-width: 0; }
.task-title { font-size: 0.97rem; font-weight: 600; margin-bottom: 3px; }
.task-desc { font-size: 0.85rem; color: var(--text-soft); line-height: 1.4; }
.task-time {
  font-size: 0.78rem;
  color: var(--text-muted);
  margin-top: 6px;
  font-weight: 500;
}
.task-chevron {
  color: var(--text-muted);
  font-size: 1.1rem;
  flex-shrink: 0;
  line-height: 1;
  transition: transform 0.2s ease;
  display: flex;
  align-items: center;
}
.task-chevron.open { transform: rotate(90deg); }

/* Accordion expand panel */
.task-expand {
  background: var(--accent-light);
  border: 1px solid var(--border);
  border-top: none;
  border-radius: 0 0 var(--radius) var(--radius);
  padding: 16px 20px 20px 56px;
  animation: expandIn 0.2s ease;
}
.task-expand.hidden { display: none; }
@keyframes expandIn {
  from { opacity: 0; transform: translateY(-4px); }
  to   { opacity: 1; transform: translateY(0); }
}
.task-expand-desc {
  font-size: 0.9rem;
  color: var(--text-soft);
  line-height: 1.6;
  margin-bottom: 12px;
}
.task-expand-desc strong {
  color: var(--text-primary);
  font-weight: 600;
}
.task-expand-link {
  display: inline-block;
  font-size: 0.85rem;
  color: var(--accent);
  font-weight: 600;
  margin-bottom: 14px;
  text-decoration: none;
}
.task-expand-link:hover { text-decoration: underline; }
.task-expand-phone {
  display: inline-block;
  font-size: 0.85rem;
  color: var(--accent);
  font-weight: 500;
  margin-bottom: 14px;
  margin-left: 16px;
  text-decoration: none;
}
.task-expand-phone:hover { text-decoration: underline; }
.task-notes {
  display: block;
  width: 100%;
  margin-bottom: 14px;
  padding: 10px 12px;
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
  font-size: 0.85rem;
  font-family: var(--font);
  color: var(--text-primary);
  background: var(--bg);
  resize: vertical;
  line-height: 1.5;
}
.task-notes:focus { outline: none; border-color: var(--accent); }
.task-expand-actions { display: flex; gap: 10px; flex-wrap: wrap; }
.task-expand-btn {
  background: var(--accent);
  color: #fff;
  border: none;
  border-radius: var(--radius-sm);
  padding: 9px 18px;
  font-size: 0.88rem;
  font-weight: 600;
  cursor: pointer;
  font-family: var(--font);
  transition: var(--transition);
}
.task-expand-btn:hover { background: var(--accent-dark); }
.task-expand-doc {
  background: none;
  color: var(--accent);
  border: 1.5px solid var(--accent);
  border-radius: var(--radius-sm);
  padding: 8px 16px;
  font-size: 0.85rem;
  font-weight: 600;
  cursor: pointer;
  font-family: var(--font);
  transition: var(--transition);
}
.task-expand-doc:hover { background: var(--accent); color: #fff; }
.task-expand-done {
  font-size: 0.85rem;
  color: var(--accent);
  font-weight: 600;
}

.task-expand-undo-btn {
  background: none;
  border: 1px solid var(--border);
  color: var(--text-secondary);
  font-size: 0.8rem;
  padding: 4px 10px;
  border-radius: 6px;
  cursor: pointer;
  margin-left: 8px;
}
.task-expand-undo-btn:hover {
  border-color: var(--text-secondary);
  color: var(--text-primary);
}

/* ─── BULK UPPSÄGNING ────────────────────────── */
.doc-bulk-cta {
  display: flex;
  align-items: center;
  gap: 14px;
  width: 100%;
  background: var(--accent);
  color: #fff;
  border: none;
  border-radius: var(--radius);
  padding: 18px 20px;
  margin-bottom: 20px;
  cursor: pointer;
  text-align: left;
  font-family: var(--font);
  transition: var(--transition);
}
.doc-bulk-cta:hover { background: var(--accent-dark); }
.doc-bulk-icon { font-size: 1.4rem; flex-shrink: 0; }
.doc-bulk-text { flex: 1; }
.doc-bulk-title { display: block; font-size: 1rem; font-weight: 700; }
.doc-bulk-sub { display: block; font-size: 0.82rem; opacity: 0.8; margin-top: 2px; }
.doc-bulk-arrow { font-size: 1.2rem; flex-shrink: 0; opacity: 0.7; }

.bulk-row {
  display: flex;
  gap: 8px;
  align-items: center;
  margin-bottom: 10px;
}
.bulk-row .text-input { flex: 1; min-width: 0; }
.bulk-row .bulk-custnr { max-width: 120px; flex-shrink: 0; }
.bulk-remove {
  background: none;
  border: none;
  color: var(--text-muted);
  font-size: 1rem;
  cursor: pointer;
  padding: 4px 6px;
  border-radius: 4px;
  flex-shrink: 0;
  line-height: 1;
}
.bulk-remove:hover { color: var(--red); }
.add-row-btn {
  background: none;
  border: 1.5px dashed var(--border);
  color: var(--accent);
  border-radius: var(--radius-sm);
  padding: 10px 16px;
  font-size: 0.9rem;
  font-weight: 600;
  cursor: pointer;
  font-family: var(--font);
  width: 100%;
  margin-bottom: 24px;
  transition: var(--transition);
}
.add-row-btn:hover { border-color: var(--accent); background: var(--accent-light); }

.bulk-letter {
  border: 1px solid var(--border);
  border-radius: var(--radius);
  margin-bottom: 16px;
  overflow: hidden;
}
.bulk-letter-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  padding: 14px 16px;
  background: var(--accent-light);
  border-bottom: 1px solid var(--border);
}
.bulk-letter-head .btn-sm { flex-shrink: 0; width: auto; }
.bulk-row { flex-wrap: wrap; }
.bulk-row .bulk-custnr { max-width: 100%; }
.bulk-letter-name { font-weight: 700; font-size: 0.95rem; color: var(--accent); }
.bulk-letter .doc-output { border: none; border-radius: 0; background: var(--bg-card); }
.bulk-letter .copied-msg { margin: 0 16px 12px; }
.btn-sm { padding: 8px 14px !important; font-size: 0.82rem !important; }


/* ─── MODALS ─────────────────────────────────── */
.modal-overlay {
  position: fixed;
  inset: 0;
  background: rgba(0,0,0,0.4);
  z-index: 200;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 20px;
  backdrop-filter: blur(2px);
}
.modal-overlay.hidden { display: none; }
.modal {
  background: var(--bg-card);
  border-radius: 16px;
  padding: 24px 20px;
  width: 100%;
  max-width: 540px;
  max-height: 90vh;
  overflow-y: auto;
  box-shadow: 0 20px 60px rgba(0,0,0,0.15);
}
.modal-sm { max-width: 400px; }
.modal-header {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  margin-bottom: 20px;
}
.modal-title { font-size: 1.3rem; font-weight: 700; letter-spacing: -0.3px; }
.modal-close {
  background: none;
  border: none;
  font-size: 1.1rem;
  cursor: pointer;
  color: var(--text-muted);
  padding: 8px;
  line-height: 1;
  min-width: 44px;
  min-height: 44px;
  display: flex;
  align-items: center;
  justify-content: center;
  border-radius: var(--radius-sm);
  margin: -8px -8px 0 0;
}
.modal-close:hover { color: var(--text-primary); background: var(--grey-bg); }
.modal-sub {
  font-size: 0.95rem;
  color: var(--text-soft);
  margin-bottom: 20px;
}

/* ─── DOC TYPE GRID ──────────────────────────── */
.doc-type-grid { display: flex; flex-direction: column; gap: 10px; }
.doc-type-btn {
  background: var(--bg);
  border: 1.5px solid var(--border);
  border-radius: var(--radius);
  padding: 18px 20px;
  text-align: left;
  cursor: pointer;
  transition: var(--transition);
  display: grid;
  grid-template-columns: 32px 1fr;
  grid-template-rows: auto auto;
  column-gap: 12px;
}
.doc-type-btn:hover { border-color: var(--accent); background: var(--accent-light); }
.doc-icon {
  grid-row: 1 / 3;
  font-size: 1.3rem;
  display: flex;
  align-items: center;
}
.doc-type-title { font-size: 0.97rem; font-weight: 600; }
.doc-type-sub { font-size: 0.83rem; color: var(--text-soft); }

/* ─── FORM ERROR ─────────────────────────────── */
.form-error {
  color: var(--red);
  font-size: 0.85rem;
  font-weight: 600;
  padding: 10px 14px;
  background: var(--red-bg);
  border-radius: var(--radius-sm);
  border: 1px solid rgba(185, 28, 28, 0.2);
  margin-bottom: 12px;
}
.form-error.hidden { display: none; }

/* ─── BÖRJA HÄR ──────────────────────────────── */
.start-here {
  display: flex;
  align-items: center;
  gap: 16px;
  background: var(--accent);
  color: #fff;
  border-radius: var(--radius);
  padding: 16px 20px;
  margin-bottom: 32px;
  cursor: pointer;
  transition: background 0.15s;
  border: none;
  width: 100%;
  text-align: left;
  font-family: var(--font);
}
.start-here:hover { background: var(--accent-dark); }
.start-here.hidden { display: none; }
.start-here-label {
  font-size: 0.72rem;
  text-transform: uppercase;
  letter-spacing: 1.2px;
  opacity: 0.75;
  margin-bottom: 3px;
}
.start-here-title { font-size: 1rem; font-weight: 700; line-height: 1.3; }
.start-here-arrow { margin-left: auto; font-size: 1.5rem; flex-shrink: 0; opacity: 0.8; }
.task-card--next { border-color: var(--accent) !important; }
.task-card--next .task-next-badge {
  display: inline-block;
  font-size: 0.7rem;
  font-weight: 700;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  color: var(--accent);
  background: var(--accent-light);
  border-radius: 4px;
  padding: 2px 7px;
  margin-left: 8px;
  vertical-align: middle;
}
.task-next-badge { display: none; }

/* ─── DOC FORMS ──────────────────────────────── */
#doc-chooser.hidden { display: none; }
.doc-form { display: flex; flex-direction: column; gap: 0; }
.doc-form.hidden { display: none; }
.form-title { font-size: 1.1rem; font-weight: 700; margin-bottom: 20px; }
.form-group { margin-bottom: 16px; }
.form-group label {
  display: block;
  font-size: 0.85rem;
  font-weight: 600;
  color: var(--text-soft);
  margin-bottom: 6px;
}
.required { color: var(--red); }
.form-label-hint { font-weight: 400; color: var(--text-muted); }
.phrase-chips { display: flex; flex-wrap: wrap; gap: 8px; margin-bottom: 10px; }
.phrase-chip {
  background: var(--bg);
  border: 1.5px solid var(--border);
  border-radius: 20px;
  padding: 6px 14px;
  font-size: 0.85rem;
  font-family: var(--font);
  color: var(--text-soft);
  cursor: pointer;
  transition: var(--transition);
}
.phrase-chip.selected {
  background: var(--accent-light);
  border-color: var(--accent);
  color: var(--accent);
}
.form-row { display: grid; grid-template-columns: 1fr; gap: 12px; }

/* ─── DOC OUTPUT ─────────────────────────────── */
.doc-output {
  background: var(--bg);
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
  padding: 20px;
  font-size: 0.9rem;
  line-height: 1.7;
  white-space: pre-wrap;
  font-family: 'Georgia', serif;
  margin-bottom: 16px;
  max-height: 480px;
  overflow-y: auto;
}
.result-note {
  font-size: 0.85rem;
  color: var(--text-soft);
  margin-bottom: 16px;
}
.result-actions { display: flex; gap: 10px; margin-bottom: 10px; }
.copied-msg {
  font-size: 0.85rem;
  color: var(--accent);
  font-weight: 600;
}
.copied-msg.hidden { display: none; }

/* ─── TASK MODAL ─────────────────────────────── */
.task-modal-desc {
  color: var(--text-soft);
  font-size: 0.95rem;
  line-height: 1.6;
  margin-bottom: 12px;
}
.task-modal-time {
  font-size: 0.85rem;
  color: var(--text-muted);
  font-weight: 500;
  margin-bottom: 20px;
}
#task-modal-link a {
  color: var(--accent);
  font-size: 0.85rem;
  margin-bottom: 20px;
  display: block;
}
.task-modal-actions { display: flex; flex-direction: column; gap: 10px; }

/* ─── SHARE ──────────────────────────────────── */
.share-url-wrap {
  margin-bottom: 16px;
}
.share-url-box {
  background: var(--accent-light);
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
  padding: 10px 14px;
  font-size: 0.8rem;
  color: var(--text-soft);
  word-break: break-all;
  line-height: 1.5;
  user-select: all;
}
.share-confirm {
  margin-top: 12px;
  font-size: 0.9rem;
  color: var(--accent);
  font-weight: 500;
  text-align: center;
}
.share-confirm.hidden { display: none; }

/* ─── UNDO TOAST ─────────────────────────────── */
.undo-toast {
  position: fixed;
  bottom: calc(var(--bottom-nav-height) + env(safe-area-inset-bottom, 0px) + 12px);
  left: 50%;
  transform: translateX(-50%);
  background: var(--text-primary);
  color: #fff;
  padding: 12px 20px;
  border-radius: var(--radius-sm);
  display: flex;
  align-items: center;
  gap: 16px;
  z-index: 300;
  font-size: 0.9rem;
  box-shadow: 0 4px 20px rgba(0,0,0,0.22);
  white-space: normal;
  max-width: calc(100vw - 32px);
  animation: toastIn 0.25s ease;
}
.undo-toast.hidden { display: none; }
.undo-toast button {
  background: none;
  border: 1px solid rgba(255,255,255,0.4);
  color: #fff;
  padding: 4px 12px;
  border-radius: 6px;
  cursor: pointer;
  font-size: 0.85rem;
  font-weight: 600;
  font-family: var(--font);
  transition: background 0.15s;
}
.undo-toast button:hover { background: rgba(255,255,255,0.12); }
@keyframes toastIn {
  from { opacity: 0; transform: translateX(-50%) translateY(8px); }
  to   { opacity: 1; transform: translateX(-50%) translateY(0); }
}

/* ─── SHARED BANNER ──────────────────────────── */
.shared-banner {
  position: fixed;
  bottom: 0;
  left: 0;
  right: 0;
  background: var(--accent);
  color: #fff;
  text-align: center;
  padding: 12px 20px;
  font-size: 0.9rem;
  z-index: 100;
}
.shared-banner.hidden { display: none; }
.shared-banner[data-mode="edit"] {
  background: #1f6f3a;
}

/* Hide owner-only UI for read-only and edit visitors */
body.shared-read .owner-only,
body.shared-edit .owner-only { display: none !important; }
body.shared-read .task-expand-actions,
body.shared-read .task-expand-notes,
body.shared-read .task-expand-doc,
body.shared-read .task-expand-assignee,
body.shared-read .task-expand-start-btn,
body.shared-read .task-expand-btn,
body.shared-read .task-expand-undo-btn { display: none !important; }
body.shared-read .task-check { pointer-events: none; }

/* Edit mode: allow task checkboxes + done/undo buttons, hide everything else */
body.shared-edit .task-expand-notes,
body.shared-edit .task-expand-doc,
body.shared-edit .task-expand-assignee { display: none !important; }

/* Paywall + bills + notify panels hidden for shared viewers */
body.shared-read #paywall-card,
body.shared-edit #paywall-card { display: none !important; }

/* ─── STARTED TASK STATE ─────────────────────── */
.task-card.started {
  border-color: var(--accent);
  background: var(--accent-light);
}
.task-check.started {
  border-color: var(--accent);
  background: var(--accent-light);
}
.task-check.started::after {
  content: '–';
  color: var(--accent);
  font-size: 14px;
  font-weight: 700;
  line-height: 1;
}
.task-started-badge {
  display: inline-block;
  font-size: 0.68rem;
  font-weight: 600;
  color: var(--accent);
  background: var(--bg-card);
  border: 1px solid var(--accent);
  border-radius: 3px;
  padding: 1px 5px;
  margin-left: 7px;
  vertical-align: middle;
  letter-spacing: 0.4px;
  text-transform: uppercase;
}
/* ─── ASSIGNEE BADGE (task card) ─────────────── */
.task-assignee-badge {
  display: inline-block;
  font-size: 0.68rem;
  font-weight: 600;
  color: var(--text-secondary);
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: 3px;
  padding: 1px 5px;
  margin-left: 7px;
  vertical-align: middle;
  letter-spacing: 0.3px;
}
.task-assignee-badge.hidden { display: none; }

/* ─── ASSIGNEE PICKER (expand panel) ─────────── */
.task-assignee-section {
  display: flex;
  align-items: center;
  gap: 8px;
  flex-wrap: wrap;
  margin: 10px 0 4px;
}
.task-assignee-label {
  font-size: 0.75rem;
  font-weight: 600;
  color: var(--text-secondary);
  text-transform: uppercase;
  letter-spacing: 0.5px;
  white-space: nowrap;
}
.assignee-picker {
  display: flex;
  align-items: center;
  gap: 6px;
  flex-wrap: wrap;
}
.assignee-chip {
  font-size: 0.8rem;
  padding: 3px 10px;
  border-radius: 20px;
  border: 1px solid var(--border);
  background: none;
  color: var(--text-primary);
  cursor: pointer;
  transition: border-color 0.15s, background 0.15s;
}
.assignee-chip:hover { border-color: var(--accent); }
.assignee-chip.selected {
  background: var(--accent);
  border-color: var(--accent);
  color: #fff;
}
.assignee-add-btn {
  font-size: 1rem;
  width: 26px;
  height: 26px;
  border-radius: 50%;
  border: 1px dashed var(--border);
  background: none;
  color: var(--text-secondary);
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  line-height: 1;
  padding: 0;
}
.assignee-add-btn:hover { border-color: var(--accent); color: var(--accent); }
.assignee-add-hint {
  font-size: 0.78rem;
  color: var(--accent);
  background: none;
  border: 1px dashed var(--accent);
  border-radius: 20px;
  padding: 3px 10px;
  cursor: pointer;
  white-space: nowrap;
}
.assignee-add-hint:hover { background: var(--accent-light); }
.assignee-new-input {
  font-size: 0.8rem;
  border: 1px solid var(--border);
  border-radius: 6px;
  padding: 3px 8px;
  background: var(--bg-input, var(--bg-card));
  color: var(--text-primary);
  width: 110px;
}
.assignee-new-input:focus { outline: none; border-color: var(--accent); }
.assignee-new-input.hidden { display: none; }

/* ─── NOTIFY LIST (kontaktrundringen task) ─── */
.notify-list-section {
  margin: 12px 0 6px;
  border-top: 1px solid var(--border);
  padding-top: 12px;
}
.notify-list-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 8px;
}
.notify-list-label {
  font-size: 0.75rem;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.5px;
  color: var(--text-secondary);
}
.notify-counter {
  font-size: 0.72rem;
  color: var(--text-soft);
}
.notify-list-items {
  display: flex;
  flex-direction: column;
  gap: 4px;
  margin-bottom: 8px;
}
.notify-empty {
  font-size: 0.8rem;
  color: var(--text-soft);
  margin: 0;
  padding: 2px 0;
}
.notify-person {
  display: flex;
  align-items: center;
  gap: 8px;
}
.notify-person.notified .notify-name {
  text-decoration: line-through;
  color: var(--text-soft);
}
.notify-check {
  width: 22px;
  height: 22px;
  flex-shrink: 0;
  border-radius: 50%;
  border: 1.5px solid var(--border);
  background: transparent;
  cursor: pointer;
  font-size: 0.7rem;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 0;
  transition: border-color 0.15s, background 0.15s;
}
.notify-check:hover { border-color: var(--accent); }
.notify-check.checked {
  background: var(--accent);
  border-color: var(--accent);
  color: #fff;
}
.notify-name {
  flex: 1;
  font-size: 0.88rem;
  color: var(--text-primary);
}
.notify-remove {
  font-size: 1rem;
  color: var(--text-soft);
  background: transparent;
  border: none;
  cursor: pointer;
  padding: 2px 4px;
  line-height: 1;
  opacity: 0.5;
}
.notify-remove:hover { opacity: 1; color: var(--danger); }
.notify-add-row {
  display: flex;
  gap: 6px;
  align-items: center;
}
.notify-new-input {
  flex: 1;
  font-size: 0.8rem;
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
  padding: 5px 8px;
  background: var(--bg);
  color: var(--text-primary);
  min-width: 0;
}
.notify-new-input:focus { outline: none; border-color: var(--accent); }
.notify-add-btn {
  font-size: 0.78rem;
  font-weight: 600;
  padding: 5px 12px;
  border-radius: var(--radius-sm);
  border: 1.5px solid var(--accent);
  background: transparent;
  color: var(--accent);
  cursor: pointer;
  white-space: nowrap;
  transition: background 0.15s, color 0.15s;
}
.notify-add-btn:hover {
  background: var(--accent);
  color: #fff;
}
.notify-notifier-select {
  font-size: 0.75rem;
  font-family: var(--font);
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
  background: var(--bg);
  color: var(--text-soft);
  padding: 2px 4px;
  cursor: pointer;
  max-width: 100px;
}
.notify-notifier-select:focus { outline: none; border-color: var(--accent); }

/* ─── Onboarding progress bar ─── */
.ob-progress-bar-wrap {
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  height: 3px;
  background: var(--border);
  z-index: 10;
}
.ob-progress-bar-fill {
  height: 100%;
  background: var(--accent);
  border-radius: 0 2px 2px 0;
  transition: width 0.35s ease;
  width: 0%;
}

/* ─── Offline banner ─── */
.offline-banner {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  background: #92400E;
  color: #fff;
  text-align: center;
  padding: 9px 20px;
  font-size: 0.82rem;
  font-weight: 500;
  letter-spacing: 0.01em;
  z-index: 9999;
  transform: translateY(-100%);
  transition: transform 0.3s ease;
  pointer-events: none;
}
.offline-banner.is-offline {
  transform: translateY(0);
}

/* ─── Onboarding participants ─── */
.ob-participant-list {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  min-height: 16px;
  margin-bottom: 12px;
}
.ob-participant-chip {
  display: flex;
  align-items: center;
  gap: 4px;
  background: var(--accent-light);
  border: 1px solid var(--accent);
  border-radius: 20px;
  padding: 4px 10px;
  font-size: 0.85rem;
  color: var(--text-primary);
}
.ob-participant-chip button {
  background: none;
  border: none;
  cursor: pointer;
  color: var(--text-soft);
  font-size: 0.9rem;
  padding: 0 0 0 4px;
  line-height: 1;
}
.ob-participant-chip button:hover { color: var(--danger); }
.ob-participant-add {
  display: flex;
  gap: 8px;
  align-items: center;
  margin-bottom: 8px;
}
.ob-participant-add .ob-text-input {
  flex: 1;
  margin-bottom: 0;
}
.ob-field-label {
  display: block;
  font-size: 0.8rem;
  font-weight: 600;
  color: var(--text-soft);
  text-transform: uppercase;
  letter-spacing: 0.04em;
  margin-bottom: 6px;
  margin-top: 16px;
}
.ob-field-label:first-of-type { margin-top: 0; }
.ob-participant-input-row {
  display: flex;
  gap: 8px;
  align-items: center;
  margin-bottom: 8px;
}
.ob-participant-input-row .ob-text-input {
  flex: 1;
  margin-bottom: 0;
}
.ob-participant-remove {
  background: none;
  border: none;
  cursor: pointer;
  color: var(--text-soft);
  font-size: 0.9rem;
  padding: 0 0 0 4px;
  line-height: 1;
}
.ob-participant-remove:hover { color: var(--danger); }
.ob-why {
  font-size: 0.8rem;
  color: var(--text-soft);
  margin-bottom: 16px;
  font-style: italic;
}

.task-expand-start-btn {
  background: transparent;
  color: var(--text-soft);
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
  padding: 9px 18px;
  font-size: 0.88rem;
  font-weight: 500;
  cursor: pointer;
  font-family: var(--font);
  transition: var(--transition);
}
.task-expand-start-btn:hover {
  border-color: var(--accent);
  color: var(--accent);
  background: var(--bg-card);
}

/* ─── TASK RESOURCES ─────────────────────────── */
.task-resources {
  display: flex;
  flex-direction: column;
  gap: 5px;
  margin-bottom: 14px;
}
.task-resource-link {
  display: inline-block;
  font-size: 0.82rem;
  color: var(--text-soft);
  text-decoration: none;
  font-weight: 500;
  padding: 2px 0;
}
.task-resource-link:hover { color: var(--accent); text-decoration: underline; }

/* ─── OB OPTIONAL LABEL ──────────────────────── */
.ob-optional {
  font-size: 0.85rem;
  font-weight: 400;
  color: var(--text-muted);
  font-style: italic;
}

/* ─── PROGRESS BAR ───────────────────────────── */
.progress-bar-wrap {
  height: 4px;
  background: var(--border);
  border-radius: 2px;
  margin-bottom: 10px;
  overflow: hidden;
}
.progress-bar-fill {
  height: 100%;
  background: var(--accent);
  border-radius: 2px;
  width: 0%;
  transition: width 0.5s cubic-bezier(0.4, 0, 0.2, 1);
}

/* ─── COMPLETION STATE ───────────────────────── */
.completion-message {
  display: none;
  background: var(--accent-light);
  border: 1px solid var(--accent);
  border-radius: var(--radius);
  padding: 20px 24px;
  margin-top: 32px;
  text-align: center;
}
.completion-message.visible { display: block; }
.completion-message p {
  color: var(--accent);
  font-size: 0.95rem;
  font-weight: 500;
  line-height: 1.6;
}

/* ─── TASK ENTRANCE ANIMATION ────────────────── */
@keyframes taskIn {
  from { opacity: 0; transform: translateY(6px); }
  to   { opacity: 1; transform: translateY(0); }
}
.task-anim-in {
  animation: taskIn 0.3s ease both;
}

/* ─── TASK CARD KEYBOARD ─────────────────────── */
.task-card[tabindex="0"]:focus-visible {
  outline: 2px solid var(--accent);
  outline-offset: 2px;
  border-radius: var(--radius);
}

/* ─── RESPONSIVE (desktop up) ────────────────── */
@media (min-width: 601px) {
  :root {
    --nav-height: 65px;
    --bottom-nav-height: 0px;
  }
  .nav { padding: 20px 40px; }
  .nav-plan { padding: 16px 40px; }
  .plan-wrap { padding: 40px 20px 80px; }
  .choice-grid { grid-template-columns: 1fr 1fr; }
  .checkbox-grid { grid-template-columns: 1fr 1fr; }
  .form-row { grid-template-columns: 1fr 1fr; }
  .modal { padding: 32px; }
  .nav-actions { display: flex; }
  .task-expand { padding: 14px 20px 18px 52px; }

  /* ── Top tab navigation (desktop) ── */
  .plan-tabs-bar {
    position: sticky;
    top: var(--nav-height);
    bottom: auto;
    left: auto;
    right: auto;
    border-top: none;
    border-bottom: 1px solid var(--border);
    padding-bottom: 0;
    z-index: 90;
  }
  .plan-tabs {
    max-width: 700px;
    margin: 0 auto;
    padding: 0 20px;
    display: flex;
  }
  .plan-tab {
    padding: 14px 20px;
    font-size: 0.95rem;
    text-align: left;
    justify-content: flex-start;
  }

  /* Undo toast above fold on desktop */
  .undo-toast {
    bottom: 24px;
    white-space: nowrap;
    max-width: none;
  }
}

/* ═══════════════════════════════════════════
   SECTION DONE BADGE
════════════════════════════════════════════ */
.section-done-badge {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  margin-left: auto;
  font-size: 0.72rem;
  font-weight: 600;
  letter-spacing: 0.03em;
  color: var(--green);
  background: #EBF5EE;
  border: 1px solid #C3DFC9;
  padding: 2px 8px;
  border-radius: 20px;
  transition: opacity 0.3s ease, transform 0.3s ease;
}
.section-done-badge.hidden {
  display: none;
}

/* ═══════════════════════════════════════════
   PDF / PRINT BUTTON (floating)
════════════════════════════════════════════ */
.plan-print-btn {
  position: fixed;
  bottom: calc(var(--bottom-nav-height) + 16px);
  right: 16px;
  width: 44px;
  height: 44px;
  border-radius: 50%;
  background: var(--accent);
  color: #fff;
  border: none;
  cursor: pointer;
  box-shadow: 0 4px 14px rgba(44,74,110,0.28);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 0.7rem;
  font-weight: 700;
  letter-spacing: 0.03em;
  z-index: 80;
  transition: background 0.15s, transform 0.15s;
}
.plan-print-btn:hover  { background: var(--accent-dark); transform: scale(1.06); }
.plan-print-btn:active { transform: scale(0.96); }
@media (min-width: 601px) {
  .plan-print-btn { bottom: 24px; right: 24px; width: 48px; height: 48px; }
}

/* ── Tablet (601–1023px) ── */
@media (min-width: 601px) and (max-width: 1023px) {
  .plan-wrap { padding: 24px 32px 100px; }
  .seo-article { max-width: 660px; }
}

/* ── Desktop large (1024px+) ── */
@media (min-width: 1024px) {
  .plan-wrap { max-width: 860px; padding: 40px 40px 80px; }
  .nav { padding: 20px 60px; }
  .nav-plan { padding: 16px 60px; }
  .plan-tabs { max-width: 860px; padding: 0 40px; }
  .seo-article { max-width: 740px; }
}

/* ═══════════════════════════════════════════
   PAYWALL CARD
════════════════════════════════════════════ */
.paywall-card {
  border: 1.5px solid #C8D6E5;
  border-radius: var(--radius);
  background: linear-gradient(135deg, #EDF2F7 0%, #F8F7F5 100%);
  padding: 28px 24px;
  text-align: center;
  margin-top: 16px;
}
.paywall-card.hidden { display: none; }

.paywall-lock {
  font-size: 2rem;
  margin-bottom: 10px;
  line-height: 1;
}
.paywall-title {
  font-size: 1.05rem;
  font-weight: 700;
  color: var(--text-primary);
  margin-bottom: 8px;
}
.paywall-desc {
  font-size: 0.88rem;
  color: var(--text-soft);
  margin-bottom: 20px;
  line-height: 1.5;
}
.paywall-cta {
  width: 100%;
  max-width: 260px;
  padding: 13px 20px;
  font-size: 0.95rem;
}
.paywall-note {
  font-size: 0.75rem;
  color: var(--text-muted);
  margin-top: 10px;
}

/* ═══════════════════════════════════════════
   T030 — LOCKED TASK CARD + PREVIEW CTA
════════════════════════════════════════════ */
.task-card--locked {
  opacity: 0.55;
  cursor: default;
  pointer-events: none;
  background: #F4F4F2;
  border-style: dashed;
}
.task-card--locked:hover { border-color: inherit; box-shadow: none; }
.task-card--locked .task-check { background: #DDD; border-color: #CCC; }
.task-card--locked .task-title,
.task-card--locked .task-time { color: var(--text-muted); }
.task-lock {
  margin-left: auto;
  padding-right: 4px;
  font-size: 1rem;
  line-height: 1;
}

.preview-cta-card {
  border: 1.5px solid #C8D6E5;
  border-radius: var(--radius);
  background: linear-gradient(135deg, #EDF2F7 0%, #F8F7F5 100%);
  padding: 24px 20px;
  text-align: center;
  margin: 14px 0 18px;
}
.preview-cta-lock {
  font-size: 1.75rem;
  margin-bottom: 8px;
  line-height: 1;
}
.preview-cta-title {
  font-size: 1rem;
  font-weight: 700;
  color: var(--text-primary);
  margin-bottom: 6px;
}
.preview-cta-desc {
  font-size: 0.85rem;
  color: var(--text-soft);
  margin-bottom: 16px;
  line-height: 1.5;
}
.preview-cta-btn {
  width: 100%;
  max-width: 240px;
  padding: 12px 20px;
  font-size: 0.92rem;
}

/* ═══════════════════════════════════════════
   PRINT / PDF EXPORT
════════════════════════════════════════════ */
@media print {
  /* Show only the plan tab content */
  body > *:not(#screen-plan) { display: none !important; }
  #screen-plan { display: block !important; }
  #tabcontent-plan { display: block !important; }
  #tabcontent-docs { display: none !important; }

  /* Hide all interactive chrome */
  .nav, .plan-tabs-bar, .bottom-nav,
  .plan-print-btn, .plan-fab, .btn-ghost,
  .task-expand-actions, .task-chevron,
  .undo-toast, .offline-banner, .trust-band,
  .bills-section, .start-here,
  .skip-link, #completion-message,
  .section-coming-tag,
  .preview-cta-card, .task-lock { display: none !important; }

  /* Unlock locked tasks for print so paid users get a clean export */
  .task-card--locked { opacity: 1 !important; background: #fff !important; border-style: solid !important; }

  /* Reset colors for legibility on paper */
  body { background: #fff; color: #000; }

  /* Force-show all task descriptions (expanded state) */
  .task-expand,
  .task-expand.hidden { display: block !important; }
  .task-expand-desc { font-size: 0.8rem; color: #333; margin-bottom: 6px; }
  .task-expand-link, .task-expand-phone { font-size: 0.75rem; }

  /* Restore full opacity on coming sections */
  .section--coming .task-list { opacity: 1; }

  /* Task card layout for print */
  .task-wrap { break-inside: avoid; margin-bottom: 10px; }
  .task-card { box-shadow: none; border: 1px solid #ccc; border-radius: 0; margin-bottom: 0; }
  .task-card.done { opacity: 0.5; }
  .task-expand { border: 1px solid #ccc; border-top: none; border-radius: 0; padding: 8px 12px; }

  /* Section headers */
  .task-section { display: block !important; }
  .section-header { border-bottom: 1px solid #ccc; padding-bottom: 6px; margin-bottom: 8px; }
  .task-title { font-size: 0.9rem; }

  /* Page breaks between sections */
  .task-section { page-break-inside: avoid; }
  #section-week, #section-later { page-break-before: auto; }

  /* Print header */
  .plan-header { border-bottom: 2px solid #ccc; padding-bottom: 12px; margin-bottom: 16px; }
  .plan-title { font-size: 1.2rem; }
  .progress-bar-wrap, .progress-summary { display: none !important; }

  /* Footer with URL */
  #screen-plan::after {
    content: "Efterplan — efterplan.se";
    display: block;
    text-align: center;
    font-size: 0.75rem;
    color: #999;
    margin-top: 32px;
    padding-top: 16px;
    border-top: 1px solid #ddd;
  }
}

/* ═══════════════════════════════════════════
   COMPLETION OVERLAY
════════════════════════════════════════════ */
.completion-overlay {
  position: fixed;
  inset: 0;
  background: var(--bg);
  z-index: 1000;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 32px 24px;
  animation: co-fade-in 0.5s ease forwards;
}
.completion-overlay.hidden { display: none; }

@keyframes co-fade-in {
  from { opacity: 0; }
  to   { opacity: 1; }
}
.completion-overlay-inner {
  text-align: center;
  max-width: 360px;
  width: 100%;
  animation: co-rise 0.5s ease 0.1s both;
}
@keyframes co-rise {
  from { opacity: 0; transform: translateY(20px); }
  to   { opacity: 1; transform: translateY(0); }
}
.co-check { width: 72px; height: 72px; margin: 0 auto 24px; }
.co-check-svg { width: 72px; height: 72px; }
.co-check-circle {
  stroke: var(--green); stroke-width: 2.5;
  stroke-dasharray: 166; stroke-dashoffset: 166;
  animation: co-circle 0.6s ease 0.3s forwards;
}
.co-check-mark {
  stroke: var(--green); stroke-width: 3;
  stroke-linecap: round; stroke-linejoin: round;
  stroke-dasharray: 48; stroke-dashoffset: 48;
  animation: co-checkmark 0.4s ease 0.85s forwards;
}
@keyframes co-circle   { to { stroke-dashoffset: 0; } }
@keyframes co-checkmark { to { stroke-dashoffset: 0; } }

.co-title {
  font-size: 2rem; font-weight: 700;
  color: var(--text-primary); letter-spacing: -0.5px;
  margin-bottom: 6px;
}
.co-name {
  font-size: 0.9rem; color: var(--text-muted);
  margin-bottom: 20px; font-weight: 500;
}
.co-body {
  font-size: 1rem; color: var(--text-soft);
  line-height: 1.75; margin-bottom: 20px;
}
.co-next-steps {
  list-style: none; padding: 0; margin: 0 0 28px;
  text-align: left;
  display: flex; flex-direction: column; gap: 8px;
}
.co-next-steps li { font-size: 0.9rem; color: var(--text-soft); padding-left: 18px; position: relative; }
.co-next-steps li::before { content: '→'; position: absolute; left: 0; color: var(--accent); }
.co-link { color: var(--accent); text-decoration: underline; }
.co-actions { display: flex; flex-direction: column; gap: 10px; }
.co-pdf-btn  { width: 100%; }
.co-close-btn { width: 100%; font-size: 0.9rem; color: var(--text-muted); }

/* ═══════════════════════════════════════════
   PHONE 2 (secondary action, e.g. 1177)
════════════════════════════════════════════ */
.task-expand-phone--secondary {
  background: var(--accent-light);
  color: var(--accent);
  border: 1.5px solid var(--accent);
  border-radius: var(--radius-sm);
  padding: 4px 12px;
}
.task-expand-phone--secondary:hover {
  background: var(--accent);
  color: #fff;
}

/* ═══════════════════════════════════════════
   TASK CHECKLIST (e.g. digitala konton)
════════════════════════════════════════════ */
.task-checklist {
  margin: 14px 0 8px;
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
  overflow: hidden;
}
.task-checklist-label {
  font-size: 0.72rem;
  font-weight: 600;
  color: var(--text-muted);
  text-transform: uppercase;
  letter-spacing: 0.06em;
  padding: 8px 12px 6px;
  background: var(--accent-light);
  border-bottom: 1px solid var(--border);
}
.task-checklist-item {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 9px 12px;
  border-bottom: 1px solid var(--border);
  font-size: 0.88rem;
  cursor: pointer;
  transition: background 0.1s;
}
.task-checklist-item:last-child { border-bottom: none; }
.task-checklist-item:hover { background: var(--accent-light); }
.task-checklist-item.done span {
  text-decoration: line-through;
  color: var(--text-muted);
}
.task-checklist-item input[type="checkbox"] {
  width: 16px;
  height: 16px;
  accent-color: var(--accent);
  flex-shrink: 0;
  cursor: pointer;
}

/* ═══════════════════════════════════════════
   PLAN DONE FOOTER
════════════════════════════════════════════ */
.plan-done-footer {
  text-align: center;
  padding: 48px 24px 72px;
  max-width: 700px;
  margin: 0 auto;
}
.plan-done-footer.hidden { display: none; }
.plan-done-icon {
  font-size: 2.8rem;
  color: var(--green);
  margin-bottom: 12px;
}
.plan-done-title {
  font-size: 1.3rem;
  font-weight: 700;
  color: var(--text-primary);
  margin-bottom: 10px;
}
.plan-done-sub {
  font-size: 0.9rem;
  color: var(--text-soft);
  line-height: 1.6;
  max-width: 280px;
  margin: 0 auto 20px;
}

/* ═══════════════════════════════════════════
   PARTICIPANTS MODAL — personnr inputs
════════════════════════════════════════════ */
.modal-participant-item {
  margin-bottom: 10px;
  padding-bottom: 10px;
  border-bottom: 1px solid var(--border);
}
.modal-participant-item:last-child { border-bottom: none; margin-bottom: 0; padding-bottom: 0; }
.modal-participant-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 4px;
}
.modal-participant-name {
  font-size: 0.9rem;
  font-weight: 500;
  color: var(--text-primary);
}
.modal-participant-remove {
  background: none;
  border: none;
  color: var(--text-muted);
  font-size: 1rem;
  cursor: pointer;
  padding: 0 4px;
  line-height: 1;
  transition: color 0.15s;
}
.modal-participant-remove:hover { color: var(--danger); }
.participant-personnr-input {
  width: 100%;
  font-size: 0.8rem;
  padding: 5px 9px;
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
  background: var(--bg);
  color: var(--text-soft);
  font-family: var(--font);
}
.participant-personnr-input:focus {
  outline: 2px solid var(--accent);
  outline-offset: 1px;
}

/* ═══ TRUST BAND ════════════════════════════ */
.trust-band {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 6px 12px;
  margin: 24px 0 0;
  padding: 12px 16px;
  background: var(--bg-secondary, #f7f7f5);
  border-radius: 10px;
  font-size: 0.8rem;
  color: var(--text-muted, #888);
  letter-spacing: 0.01em;
}
.trust-sep { opacity: 0.4; }

/* ═══ BILLS (T067) ═══════════════════════════ */
.bills-section { margin: 24px 0 0; }
.bills-header { display: flex; align-items: center; justify-content: space-between; margin-bottom: 12px; }
.bills-add-btn { font-size: 0.85rem; padding: 6px 12px; }
.bills-list { list-style: none; padding: 0; margin: 0; display: flex; flex-direction: column; gap: 8px; }
.bill-item { display: flex; align-items: center; gap: 10px; padding: 10px 12px; background: #fff; border: 1px solid var(--border); border-radius: var(--radius); }
.bill-item.paid .bill-desc { text-decoration: line-through; color: var(--text-soft); }
.bill-check { width: 20px; height: 20px; padding: 12px; margin: -12px; border: 2px solid var(--border); border-radius: 50%; background: none; cursor: pointer; flex-shrink: 0; transition: background 0.15s, border-color 0.15s; }
.bill-item.paid .bill-check { background: var(--green); border-color: var(--green); }
.bill-info { flex: 1; display: flex; flex-direction: column; gap: 2px; }
.bill-desc { font-size: 0.9rem; }
.bill-amount { font-size: 0.8rem; color: var(--text-soft); }
.bill-delete { background: none; border: none; color: var(--text-soft); font-size: 1.2rem; cursor: pointer; min-width: 44px; min-height: 44px; padding: 0 10px; display: flex; align-items: center; justify-content: center; }
.bill-delete:hover { color: var(--red); }
.bills-empty { color: var(--text-soft); font-size: 0.85rem; text-align: center; padding: 16px 0; }
.bill-form { display: flex; flex-direction: column; gap: 8px; margin-top: 12px; padding: 12px; background: var(--bg); border-radius: var(--radius); border: 1px solid var(--border); }
.bill-input { padding: 8px 12px; border: 1px solid var(--border); border-radius: var(--radius); font-size: 0.9rem; width: 100%; box-sizing: border-box; background: #fff; }
.bill-amount-input { max-width: 160px; }
.bill-form-actions { display: flex; gap: 8px; }

/* ═══ PDF PRINT BUTTON (T050) ════════════════ */
.btn-print-inline {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  margin-top: 12px;
  padding: 7px 14px;
  font-size: 0.78rem;
  font-weight: 600;
  color: var(--accent);
  background: transparent;
  border: 1.5px solid var(--accent);
  border-radius: var(--radius);
  cursor: pointer;
  transition: background 0.15s, color 0.15s;
}
.btn-print-inline::before { content: '⬇'; font-size: 0.72rem; }
.btn-print-inline:hover { background: var(--accent); color: #fff; }

/* ═══ FREE PREVIEW (T030) ════════════════════ */
.section--coming .task-list { opacity: 0.55; }
.section-coming-tag {
  font-size: 0.68rem;
  font-weight: 600;
  letter-spacing: 0.03em;
  color: var(--text-muted);
  background: var(--bg-secondary, #f0f0ed);
  padding: 2px 8px;
  border-radius: 20px;
  white-space: nowrap;
}

/* ═══ SEO PAGES (T061, uppdaterad T088) ═════════ */
.seo-nav {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: var(--space-sm) var(--space-md);
  border-bottom: 1px solid var(--rule);
  background: var(--paper);
  position: sticky;
  top: 0;
  z-index: 20;
  backdrop-filter: saturate(1.1);
}
.seo-nav .logo-text {
  font-family: var(--font-display);
  font-variation-settings: 'opsz' 36, 'SOFT' 40, 'wght' 500;
  font-size: var(--fs-md);
  font-weight: 500;
  color: var(--ink);
  letter-spacing: -0.02em;
}
.seo-nav .btn-primary {
  width: auto;
  padding: 9px 18px;
  font-size: var(--fs-xs);
}

.seo-main {
  max-width: 760px;
  margin: 0 auto;
  padding: var(--space-xl) var(--space-md) var(--space-lg);
}
.seo-article { counter-reset: h2counter; }

.seo-article h1 {
  font-family: var(--font-display);
  font-variation-settings: 'opsz' 144, 'SOFT' 50, 'wght' 420;
  font-size: var(--fs-3xl);
  font-weight: 420;
  line-height: 1.02;
  letter-spacing: -0.028em;
  margin: 0 0 var(--space-md);
  color: var(--ink);
  max-width: 18ch;
  text-wrap: balance;
}

/* Lead paragraph — first p after h1 gets editorial lead treatment */
.seo-article h1 + p {
  font-size: var(--fs-md);
  color: var(--ink-soft);
  line-height: 1.6;
  max-width: var(--measure);
  margin-bottom: var(--space-lg);
  padding-bottom: var(--space-md);
  border-bottom: 1px solid var(--rule);
}

.seo-article h2 {
  font-family: var(--font-display);
  font-variation-settings: 'opsz' 48, 'SOFT' 40, 'wght' 500;
  font-size: var(--fs-xl);
  font-weight: 500;
  line-height: 1.2;
  letter-spacing: -0.018em;
  color: var(--ink);
  margin: var(--space-lg) 0 var(--space-sm);
  max-width: 32ch;
  counter-increment: h2counter;
  display: grid;
  grid-template-columns: auto 1fr;
  align-items: baseline;
  gap: var(--space-sm);
}
.seo-article h2::before {
  content: counter(h2counter, decimal-leading-zero);
  font-family: var(--font);
  font-weight: 500;
  font-size: var(--fs-xs);
  letter-spacing: 0.14em;
  color: var(--ink-teal);
  padding-top: 0.55em;
  border-top: 1px solid var(--ember);
  line-height: 1;
  align-self: start;
  min-width: 2.4em;
}

.seo-article h3 {
  font-family: var(--font-display);
  font-variation-settings: 'opsz' 30, 'SOFT' 40, 'wght' 500;
  font-size: var(--fs-lg);
  font-weight: 500;
  line-height: 1.25;
  letter-spacing: -0.012em;
  margin: var(--space-md) 0 var(--space-xs);
  color: var(--ink);
}

.seo-article p {
  line-height: 1.78;
  color: var(--ink);
  margin-bottom: var(--space-sm);
  max-width: var(--measure);
  font-size: var(--fs-base);
}
.seo-article p strong { color: var(--ink); font-weight: 600; }

.seo-article a {
  color: var(--ink-teal);
  text-decoration: underline;
  text-decoration-thickness: 1px;
  text-underline-offset: 3px;
  text-decoration-color: color-mix(in oklab, var(--ink-teal) 35%, transparent);
  transition: text-decoration-color .15s ease;
}
.seo-article a:hover { text-decoration-color: var(--ember); }

.seo-article ul, .seo-article ol {
  padding-left: 0;
  list-style: none;
  margin: 0 0 var(--space-md);
  max-width: var(--measure);
  counter-reset: listmarker;
}
.seo-article ul li, .seo-article ol li {
  line-height: 1.72;
  margin-bottom: var(--space-xs);
  padding-left: 28px;
  position: relative;
  color: var(--ink);
  font-size: var(--fs-base);
}
.seo-article ul li::before {
  content: '';
  position: absolute;
  left: 0;
  top: 0.72em;
  width: 14px;
  height: 1px;
  background: var(--ember);
}
.seo-article ol li {
  counter-increment: listmarker;
}
.seo-article ol li::before {
  content: counter(listmarker) '.';
  position: absolute;
  left: 0;
  top: 0;
  font-family: var(--font-display);
  font-variation-settings: 'opsz' 14, 'wght' 500;
  font-style: italic;
  color: var(--ink-teal);
  font-weight: 500;
}

.seo-article blockquote {
  margin: var(--space-md) 0;
  padding: var(--space-sm) 0 var(--space-sm) var(--space-md);
  border-left: 2px solid var(--ember);
  font-family: var(--font-display);
  font-variation-settings: 'opsz' 24, 'SOFT' 60, 'wght' 400;
  font-style: italic;
  font-size: var(--fs-md);
  line-height: 1.55;
  color: var(--ink-soft);
  max-width: var(--measure);
}

/* Inline CTA box — editorial, not generic "card" */
.seo-cta {
  background: var(--paper-soft);
  border: 1px solid var(--rule);
  border-left: 2px solid var(--ink-teal);
  padding: var(--space-md) var(--space-md) var(--space-md);
  border-radius: 0 var(--radius) var(--radius) 0;
  text-align: left;
  margin: var(--space-lg) 0;
  max-width: var(--measure);
  box-shadow: none;
}
.seo-cta p {
  margin-bottom: var(--space-sm);
  font-weight: 400;
  font-family: var(--font-display);
  font-variation-settings: 'opsz' 20, 'SOFT' 50, 'wght' 500;
  font-size: var(--fs-md);
  color: var(--ink);
  font-style: italic;
  max-width: 40ch;
}
.seo-cta .btn-primary {
  width: auto;
  padding: 12px 22px;
}

.seo-footer {
  text-align: left;
  padding: var(--space-lg) var(--space-md);
  color: var(--ink-muted);
  font-size: var(--fs-xs);
  border-top: 1px solid var(--rule);
  margin-top: var(--space-xl);
  max-width: 760px;
  margin-left: auto;
  margin-right: auto;
  line-height: 1.7;
}
.seo-footer-links {
  font-size: var(--fs-xs);
  margin-top: var(--space-xs);
}
.seo-footer-links a {
  color: var(--ink-muted);
  text-decoration: underline;
  text-decoration-color: var(--rule);
  text-underline-offset: 3px;
}
.seo-footer-links a:hover {
  color: var(--ink-teal);
  text-decoration-color: var(--ember);
}
.landing-footer-links {
  font-size: var(--fs-xs);
  margin-top: var(--space-xs);
  opacity: 0.9;
}
.landing-footer-links a { color: inherit; }

/* ─── FOCUS: AAA visibility on both paper and dark surfaces ── */
:focus-visible {
  outline: 2px solid var(--ember);
  outline-offset: 3px;
  border-radius: 3px;
  transition: none;
}

/* ─── REDUCED MOTION ─────────────────────────── */
@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after {
    animation-duration: 0.001ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: 0.001ms !important;
    scroll-behavior: auto !important;
  }
  .btn-primary:hover { transform: none; }
}
.landing-footer-links { font-size: 0.8rem; margin-top: 6px; opacity: 0.7; }
.landing-footer-links a { color: inherit; }
