/* Vinka — designsystem (skelett)
   Typsnitt: Inter. Ingen kursiv, mono eller em-dash. Ren, levande, modern. */
@import url('https://fonts.googleapis.com/css2?family=Inter:wght@400;500;600;700;800&display=swap');

:root {
  /* Ytor */
  --paper: #fbf9f5;
  --surface: #ffffff;
  --surface-2: #f4f1ea;
  --line: #ece6db;

  /* Text */
  --ink: #17171a;
  --ink-soft: #3c3c42;
  --muted: #6d6d74;

  /* Brand + levande accenter */
  --brand: #0e5c3a;
  --brand-strong: #0a4a2f;
  --coral: #ff6a45;
  --amber: #f5b83f;
  --violet: #7b6cf0;
  --sky: #37b0e3;

  --radius: 18px;
  --radius-sm: 12px;
  --radius-pill: 999px;
  --shadow: 0 20px 45px rgba(20, 20, 20, .08);
  --shadow-sm: 0 6px 18px rgba(20, 20, 20, .06);
  --maxw: 1160px;
}

* { box-sizing: border-box; }
html { scroll-behavior: smooth; }
body {
  margin: 0;
  font-family: 'Inter', system-ui, -apple-system, sans-serif;
  color: var(--ink);
  background: var(--paper);
  -webkit-font-smoothing: antialiased;
  line-height: 1.55;
}
img { max-width: 100%; display: block; }
a { color: inherit; text-decoration: none; }

/* Layout */
.wrap { width: 100%; max-width: var(--maxw); margin: 0 auto; padding: 0 24px; }
.section { padding: 88px 0; }
.section.tight { padding: 56px 0; }
.center { text-align: center; }

/* Typografi */
h1, h2, h3, h4 { margin: 0 0 .5em; font-weight: 800; letter-spacing: -.02em; line-height: 1.08; }
h1 { font-size: clamp(38px, 6vw, 64px); }
h2 { font-size: clamp(28px, 4vw, 42px); }
h3 { font-size: 21px; letter-spacing: -.01em; }
p { margin: 0 0 1em; color: var(--ink-soft); }
.lead { font-size: 19px; color: var(--ink-soft); max-width: 56ch; }
.muted { color: var(--muted); }
.section-head { max-width: 62ch; margin-bottom: 40px; }
.section-head.center { margin-left: auto; margin-right: auto; }

/* Knappar */
.btn {
  display: inline-flex; align-items: center; gap: 8px;
  padding: 13px 22px; border-radius: var(--radius-pill);
  font-weight: 600; font-size: 15px; cursor: pointer; border: 1px solid transparent;
  transition: transform .12s ease, box-shadow .12s ease, background .12s ease;
}
.btn:hover { transform: translateY(-1px); }
.btn-primary { background: var(--brand); color: #fff; box-shadow: 0 10px 24px rgba(14, 92, 58, .28); }
.btn-primary:hover { background: var(--brand-strong); }
.btn-ghost { background: transparent; color: var(--ink); border-color: var(--line); }
.btn-ghost:hover { background: var(--surface); }
.btn-lg { padding: 16px 28px; font-size: 16px; }
.btn-block { width: 100%; justify-content: center; }

/* Navigering */
.nav {
  position: sticky; top: 0; z-index: 30;
  background: rgba(251, 249, 245, .82);
  backdrop-filter: saturate(140%) blur(10px);
  border-bottom: 1px solid var(--line);
}
.nav-inner { display: flex; align-items: center; justify-content: space-between; height: 72px; }
.brand { display: inline-flex; align-items: center; gap: 10px; font-weight: 800; font-size: 22px; letter-spacing: -.02em; }
.brand .dot { width: 20px; height: 27px; border-radius: 0; background: url("/assets/vinka-mark.svg") center/contain no-repeat; box-shadow: none; }
.nav-links { display: flex; align-items: center; gap: 28px; }
.nav-links a { color: var(--ink-soft); font-weight: 500; font-size: 15px; }
.nav-links a:hover { color: var(--ink); }
.nav-actions { display: flex; align-items: center; gap: 10px; }
/* Hamburgermeny (mobil). Knappen injiceras av session.js. */
.nav-toggle { display: none; background: none; border: 0; cursor: pointer; padding: 8px 6px; flex-direction: column; gap: 5px; }
.nav-toggle span { display: block; width: 24px; height: 2px; background: var(--ink); border-radius: 2px; transition: transform .2s ease, opacity .2s ease; }
.nav.open .nav-toggle span:nth-child(1) { transform: translateY(7px) rotate(45deg); }
.nav.open .nav-toggle span:nth-child(2) { opacity: 0; }
.nav.open .nav-toggle span:nth-child(3) { transform: translateY(-7px) rotate(-45deg); }
@media (max-width: 860px) {
  .nav-toggle { display: inline-flex; }
  .nav-actions { margin-left: auto; }
  .nav-links {
    display: none;
    position: absolute; top: 100%; left: 0; right: 0;
    flex-direction: column; align-items: stretch; gap: 0;
    background: var(--surface); border-bottom: 1px solid var(--line);
    padding: 6px 0; box-shadow: var(--shadow);
  }
  .nav.open .nav-links { display: flex; }
  .nav-item { display: block; width: 100%; }
  .nav-links > a, .nav-item > a { display: block; width: 100%; padding: 13px 24px; font-size: 16px; }
  .nav-item > a::after { display: none; }
  .dropdown { display: none !important; }
  .nav-actions .btn { padding: 9px 14px; font-size: 13px; }
  /* Boka möte tas bort ur navet på mobil (finns i footern och som CTA på sidorna) */
  .nav-actions .btn-primary { display: none; }
}

/* Kort */
.card {
  background: var(--surface); border: 1px solid var(--line);
  border-radius: var(--radius); padding: 26px; box-shadow: var(--shadow-sm);
}
.card.hover { transition: transform .15s ease, box-shadow .15s ease; }
.card.hover:hover { transform: translateY(-3px); box-shadow: var(--shadow); }
.grid { display: grid; gap: 22px; }
.grid-2 { grid-template-columns: repeat(2, 1fr); }
.grid-3 { grid-template-columns: repeat(3, 1fr); }
.grid-4 { grid-template-columns: repeat(4, 1fr); }
@media (max-width: 900px) { .grid-3, .grid-4 { grid-template-columns: repeat(2, 1fr); } }
@media (max-width: 620px) { .grid-2, .grid-3, .grid-4 { grid-template-columns: 1fr; } }

/* Kategori-kort med stående bild (mobilformat) */
.cat-card { padding: 14px; }
.card-media { aspect-ratio: 3 / 4; border-radius: var(--radius-sm); overflow: hidden; background: linear-gradient(150deg, #ffe4d8, #e7f2ff 55%, #efeaff); display: flex; align-items: center; justify-content: center; margin-bottom: 16px; }
.card-media img { width: 100%; height: 100%; object-fit: cover; }
.card-media span { background: rgba(255, 255, 255, .82); padding: 8px 13px; border-radius: var(--radius-pill); font-size: 12px; font-weight: 600; color: #5b5b62; text-align: center; }
.cat-card h3 { padding: 0 8px; }
.cat-card p { padding: 0 8px 6px; }

/* Taggar / kategori-puffar (levande färg) */
.tag { display: inline-flex; align-items: center; gap: 7px; padding: 6px 12px; border-radius: var(--radius-pill); font-size: 13px; font-weight: 600; background: var(--surface-2); color: var(--ink-soft); }
.tag .swatch { width: 8px; height: 8px; border-radius: 50%; }
.sw-coral { background: var(--coral); } .sw-amber { background: var(--amber); }
.sw-violet { background: var(--violet); } .sw-sky { background: var(--sky); }
.sw-brand { background: var(--brand); }

/* Hero */
.hero { position: relative; overflow: hidden; }
.hero-grid { display: grid; grid-template-columns: 1.05fr .95fr; gap: 40px; align-items: center; padding: 72px 0 84px; }
@media (max-width: 900px) { .hero-grid { grid-template-columns: 1fr; } }
.hero h1 { max-width: 15ch; }
.hero .lead { margin-bottom: 26px; }
.hero-cta { display: flex; gap: 12px; flex-wrap: wrap; }
.hero-trust { margin-top: 26px; display: flex; gap: 22px; flex-wrap: wrap; color: var(--muted); font-size: 14px; }

/* Levande hero-visual (platshållare för foto/animation) */
.hero-visual { position: relative; aspect-ratio: 4 / 3.4; border-radius: 26px; overflow: hidden; background: linear-gradient(135deg, #fff0e9, #eef7ff 60%, #f2eeff); border: 1px solid var(--line); box-shadow: var(--shadow); }
.blob { position: absolute; border-radius: 50%; filter: blur(6px); opacity: .85; animation: float 9s ease-in-out infinite; }
.blob.b1 { width: 190px; height: 190px; background: var(--coral); top: -30px; right: 30px; }
.blob.b2 { width: 150px; height: 150px; background: var(--amber); bottom: 10px; left: -20px; animation-delay: 1.2s; }
.blob.b3 { width: 120px; height: 120px; background: var(--violet); bottom: 60px; right: -10px; animation-delay: 2.1s; }
.blob.b4 { width: 90px; height: 90px; background: var(--sky); top: 60px; left: 40px; animation-delay: .6s; }
@keyframes float { 0%, 100% { transform: translateY(0); } 50% { transform: translateY(-14px); } }
.hero-photo-slot { position: absolute; inset: 0; display: flex; align-items: center; justify-content: center; text-align: center; color: #5b5b62; }
.hero-photo-slot span { background: rgba(255, 255, 255, .78); padding: 10px 16px; border-radius: var(--radius-pill); font-size: 13px; font-weight: 600; }

/* Hero-animation: fyra RUNDA cirklar svävar länge och lugnt, sträcks sedan
   till en person som vinkar (krisp, ingen bakgrund). */
.hero-visual.hero-clean { background: none; border: 0; box-shadow: none; overflow: visible; }
.hero-anim { position: absolute; inset: 0; width: 100%; height: 100%; }

/* Gratisverktyg-dropdown (hero). inline-flex gör att knappen matchar syskonknappens höjd. */
.hero-drop { position: relative; display: inline-flex; }
.hero-drop > .btn { font-family: inherit; line-height: inherit; }
.hero-drop > .btn::after { content: "\25be"; margin-left: 8px; font-size: 12px; }
.hero-drop-menu { display: none; position: fixed; min-width: 250px; background: #fff; border: 1px solid var(--line); border-radius: 12px; box-shadow: var(--shadow); padding: 6px; z-index: 1000; }
.hero-drop.open .hero-drop-menu { display: block; }
.hero-drop-menu a { display: block; padding: 11px 14px; border-radius: 8px; color: var(--ink); text-decoration: none; font-weight: 600; font-size: 15px; }
.hero-drop-menu a:hover { background: var(--surface); }
.ha-body circle { fill: var(--amber); }
.ha-head circle { fill: var(--coral); }
.ha-arm circle { fill: var(--violet); }
.ha-hand circle { fill: var(--sky); }
.ha-el { transform-box: fill-box; transform-origin: center; animation-duration: 13s; animation-iteration-count: infinite; animation-timing-function: ease-in-out; }
.ha-body { animation-name: haBody; }
.ha-head { animation-name: haHead; }
.ha-arm { animation-name: haArm; }
.ha-hand { animation-name: haHand; }
.ha-wave { transform-box: view-box; transform-origin: 300px 200px; animation: haWave 13s ease-in-out infinite; }

/* Fas: 0–38% cirklar svävar fritt, 38–62% byggs långsamt ihop, 62–82%
   figuren vinkar, 82–100% skingras långsamt igen. */
@keyframes haBody {
  0%   { transform: translate(-28px, -6px) scale(1); }
  10%  { transform: translate(-34px, -16px) scale(1); }
  20%  { transform: translate(-22px, 2px) scale(1); }
  30%  { transform: translate(-30px, -8px) scale(1); }
  38%  { transform: translate(-26px, -4px) scale(1); }
  62%, 82% { transform: translate(0, 0) scale(.902, 1.118); }
  100% { transform: translate(-28px, -6px) scale(1); }
}
@keyframes haHead {
  0%   { transform: translate(66px, -72px) scale(1); }
  10%  { transform: translate(58px, -82px) scale(1); }
  20%  { transform: translate(72px, -64px) scale(1); }
  30%  { transform: translate(62px, -74px) scale(1); }
  38%  { transform: translate(66px, -70px) scale(1); }
  62%, 82% { transform: translate(0, 0) scale(.983, 1.017); }
  100% { transform: translate(66px, -72px) scale(1); }
}
@keyframes haArm {
  0%   { transform: translate(74px, 52px) rotate(0deg) scale(1); }
  10%  { transform: translate(82px, 62px) rotate(0deg) scale(1); }
  20%  { transform: translate(66px, 46px) rotate(0deg) scale(1); }
  30%  { transform: translate(76px, 54px) rotate(0deg) scale(1); }
  38%  { transform: translate(72px, 50px) rotate(0deg) scale(1); }
  62%, 82% { transform: translate(0, 0) rotate(30deg) scale(.585, 1.707); }
  100% { transform: translate(74px, 52px) rotate(0deg) scale(1); }
}
@keyframes haHand {
  0%   { transform: translate(-80px, 22px) scale(1); }
  10%  { transform: translate(-72px, 12px) scale(1); }
  20%  { transform: translate(-88px, 30px) scale(1); }
  30%  { transform: translate(-78px, 20px) scale(1); }
  38%  { transform: translate(-82px, 24px) scale(1); }
  62%, 82% { transform: translate(0, 0) scale(.985, 1.015); }
  100% { transform: translate(-80px, 22px) scale(1); }
}
@keyframes haWave {
  0%, 62% { transform: rotate(0deg); }
  67% { transform: rotate(-20deg); }
  71% { transform: rotate(-6deg); }
  75% { transform: rotate(-20deg); }
  79% { transform: rotate(-6deg); }
  82% { transform: rotate(-16deg); }
  86%, 100% { transform: rotate(0deg); }
}
@media (prefers-reduced-motion: reduce) {
  .ha-el, .ha-wave { animation: none; transform: none; }
}

/* Statistikband */
.stats { display: flex; flex-wrap: wrap; gap: 40px; }
.stat .num { font-size: 34px; font-weight: 800; letter-spacing: -.02em; }
.stat .lbl { color: var(--muted); font-size: 14px; }

/* CTA-band */
.cta-band { background: var(--ink); color: #fff; border-radius: 28px; padding: 56px; display: flex; align-items: center; justify-content: space-between; gap: 30px; flex-wrap: wrap; }
.cta-band h2 { color: #fff; margin: 0; }
.cta-band p { color: rgba(255, 255, 255, .75); margin: 8px 0 0; }

/* Footer */
.footer { border-top: 1px solid var(--line); padding: 56px 0 40px; margin-top: 40px; }
.footer-grid { display: grid; grid-template-columns: 1.4fr 1fr 1fr 1fr; gap: 30px; }
@media (max-width: 780px) { .footer-grid { grid-template-columns: 1fr 1fr; } }
.footer h4 { font-size: 14px; text-transform: none; margin-bottom: 14px; }
.footer a { display: block; color: var(--muted); font-size: 14px; padding: 5px 0; }
.footer a:hover { color: var(--ink); }
.footer-bottom { margin-top: 34px; padding-top: 20px; border-top: 1px solid var(--line); color: var(--muted); font-size: 13px; display: flex; justify-content: space-between; flex-wrap: wrap; gap: 10px; }

/* Blogg */
.post-card img, .post-cover { aspect-ratio: 16 / 10; border-radius: var(--radius-sm); background: linear-gradient(135deg, #ffe9e0, #e9f4ff); object-fit: cover; }
.post-meta { color: var(--muted); font-size: 13px; margin: 12px 0 6px; }
.article { max-width: 720px; margin: 0 auto; padding: 40px 24px 0; }
.article p { font-size: 18px; }
.article h2 { margin-top: 1.4em; }
.article ul { padding-left: 20px; color: var(--ink-soft); font-size: 18px; }
.article li { margin-bottom: 8px; }
.article blockquote { margin: 28px 0; padding: 18px 24px; border-left: 3px solid var(--brand); background: var(--surface-2); border-radius: 0 var(--radius-sm) var(--radius-sm) 0; font-size: 20px; font-weight: 600; color: var(--ink); }
.article blockquote p, .article blockquote { margin-bottom: 0; }

/* ---- Client portal (inloggat skelett) ---- */
.portal { display: grid; grid-template-columns: 248px 1fr; min-height: 100vh; }
.side { background: var(--surface); border-right: 1px solid var(--line); padding: 22px 16px; position: sticky; top: 0; height: 100vh; }
.side .brand { padding: 4px 8px 20px; }
.side nav a { display: flex; align-items: center; gap: 11px; padding: 11px 12px; border-radius: var(--radius-sm); color: var(--ink-soft); font-weight: 500; font-size: 15px; margin-bottom: 2px; }
.side nav a:hover { background: var(--surface-2); }
.side nav a.active { background: #eaf3ee; color: var(--brand-strong); font-weight: 600; }
.side nav .ic { width: 18px; height: 18px; border-radius: 6px; background: var(--surface-2); }
.portal-main { padding: 26px 34px 60px; }
.portal-top { display: flex; align-items: center; justify-content: space-between; margin-bottom: 26px; flex-wrap: wrap; gap: 12px; }
.chip { padding: 8px 14px; border-radius: var(--radius-pill); background: var(--surface); border: 1px solid var(--line); font-weight: 600; font-size: 14px; }
.kpi { display: grid; grid-template-columns: repeat(4, 1fr); gap: 18px; }
@media (max-width: 1040px) { .portal { grid-template-columns: 1fr; } .side { position: static; height: auto; } .kpi { grid-template-columns: repeat(2, 1fr); } }
.kpi .card { padding: 20px; }
.kpi .k-lbl { color: var(--muted); font-size: 13px; }
.kpi .k-num { font-size: 27px; font-weight: 800; letter-spacing: -.02em; margin-top: 4px; }
.kpi .k-delta { font-size: 13px; font-weight: 600; margin-top: 6px; }
.k-up { color: var(--brand); } .k-down { color: var(--coral); }
.panel-grid { display: grid; grid-template-columns: 1.6fr 1fr; gap: 20px; margin-top: 20px; }
@media (max-width: 1040px) { .panel-grid { grid-template-columns: 1fr; } }
.panel h3 { display: flex; align-items: center; justify-content: space-between; }
.timeline { list-style: none; margin: 0; padding: 0; }
.timeline li { display: flex; gap: 12px; padding: 12px 0; border-bottom: 1px solid var(--line); }
.timeline li:last-child { border-bottom: 0; }
.timeline .when { min-width: 66px; color: var(--muted); font-size: 13px; }
.dot-mark { width: 9px; height: 9px; border-radius: 50%; margin-top: 6px; }
.inv-row { display: flex; align-items: center; justify-content: space-between; padding: 12px 0; border-bottom: 1px solid var(--line); font-size: 14px; }
.inv-row:last-child { border-bottom: 0; }
.badge { padding: 3px 10px; border-radius: var(--radius-pill); font-size: 12px; font-weight: 600; }
.b-paid { background: #eaf3ee; color: var(--brand-strong); }
.b-open { background: #fff2ec; color: #b4471f; }
.upload { border: 2px dashed var(--line); border-radius: var(--radius); padding: 30px; text-align: center; color: var(--muted); transition: border-color .15s ease, background .15s ease; }
.upload.drag { border-color: var(--brand); background: #f5faf7; color: var(--brand-strong); }
.chatbox { background: var(--surface-2); border-radius: var(--radius-sm); padding: 14px; }
.bubble { background: #fff; border: 1px solid var(--line); border-radius: 14px; padding: 10px 13px; font-size: 14px; margin-bottom: 8px; max-width: 85%; }
.bubble.me { background: #eaf3ee; margin-left: auto; }

/* Portal-status + inloggning */
.portal-banner { display: none; margin: 18px 0 4px; padding: 12px 16px; border-radius: var(--radius-sm); font-size: 14px; font-weight: 500; border: 1px solid var(--line); }
.portal-banner code { background: rgba(0,0,0,.05); padding: 1px 6px; border-radius: 6px; font-family: ui-monospace, monospace; font-size: 13px; }
.portal-banner.loading { background: var(--surface-2); color: var(--ink-soft); }
.portal-banner.warn { background: #fff6e8; border-color: #f3ddb0; color: #8a5a12; }
.portal-banner.err { background: #fdeee9; border-color: #f5c9ba; color: #b4471f; }
.login-overlay { position: fixed; inset: 0; background: var(--paper); display: none; align-items: center; justify-content: center; z-index: 200; padding: 20px; }
.login-card { width: 100%; max-width: 380px; background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius); box-shadow: var(--shadow); padding: 30px; }
.login-card .field { display: grid; gap: 6px; margin-top: 14px; }
.login-card .field span { font-weight: 600; font-size: 14px; }
.login-card input { padding: 12px 14px; border: 1px solid var(--line); border-radius: var(--radius-sm); font: inherit; }
.login-err { display: none; margin-top: 14px; padding: 10px 14px; border-radius: var(--radius-sm); background: #fdeee9; color: #b4471f; font-size: 14px; font-weight: 500; }
.link { color: var(--brand-strong); font-weight: 600; cursor: pointer; text-decoration: none; }
.link:hover { text-decoration: underline; }
.or-sep { display: flex; align-items: center; text-align: center; color: var(--muted); font-size: 12px; font-weight: 700; letter-spacing: 0.08em; margin: 22px 0; }
.or-sep::before, .or-sep::after { content: ""; flex: 1; height: 1px; background: var(--line); }
.or-sep span { padding: 0 12px; }
.login-err .link { color: #b4471f; text-decoration: underline; }

/* Adminvy */
.admin-grid { display: grid; grid-template-columns: 320px 1fr; gap: 20px; align-items: start; margin-top: 20px; }
@media (max-width: 1040px) { .admin-grid { grid-template-columns: 1fr; } }
.client-list { display: grid; gap: 8px; }
.client-item { text-align: left; border: 1px solid var(--line); background: var(--surface); border-radius: var(--radius-sm); padding: 12px 14px; cursor: pointer; font: inherit; transition: border-color .12s ease, background .12s ease; }
.client-item:hover { background: var(--surface-2); }
.client-item.active { border-color: var(--brand); background: #eaf3ee; }
.ci-top { display: flex; align-items: center; justify-content: space-between; gap: 8px; }
.ci-email { font-weight: 600; font-size: 14px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.ci-badge { background: var(--brand); color: #fff; font-size: 11px; font-weight: 700; padding: 2px 8px; border-radius: var(--radius-pill); flex: 0 0 auto; }
.ci-sub { color: var(--muted); font-size: 12.5px; margin-top: 4px; }
.ci-tag { font-weight: 600; font-size: 11px; padding: 1px 7px; border-radius: var(--radius-pill); }
.ci-tag.ok { background: #eaf3ee; color: var(--brand-strong); }
.ci-tag.wait { background: #fff2ec; color: #b4471f; }

/* Checklista */
.chk-list { display: grid; gap: 2px; }
.chk-item { display: flex; align-items: center; gap: 12px; padding: 12px 8px; border-bottom: 1px solid var(--line); font-size: 15px; cursor: pointer; }
.chk-item:last-child { border-bottom: 0; }
.chk-item input { width: 18px; height: 18px; accent-color: var(--brand); }
.chk-item input:checked + span { color: var(--muted); text-decoration: line-through; }

/* Underlag */
.ul-row { display: flex; align-items: center; justify-content: space-between; gap: 14px; padding: 13px 0; border-bottom: 1px solid var(--line); }
.ul-row:last-child { border-bottom: 0; }
.ul-main { display: flex; align-items: flex-start; gap: 12px; min-width: 0; }
.ul-name { font-weight: 600; font-size: 14px; word-break: break-word; }

/* ---- Dropdown-navigering ---- */
.nav-item { position: relative; display: inline-flex; align-items: center; }
.nav-item > a { display: inline-flex; align-items: center; gap: 6px; color: var(--ink-soft); font-weight: 500; font-size: 15px; }
.nav-item > a:hover { color: var(--ink); }
.nav-item > a::after { content: ""; width: 6px; height: 6px; border-right: 2px solid currentColor; border-bottom: 2px solid currentColor; transform: rotate(45deg) translateY(-2px); opacity: .45; transition: transform .15s ease, opacity .15s ease; }
.nav-item:hover > a::after { transform: rotate(225deg) translateY(1px); opacity: .8; }
.dropdown { position: absolute; top: 100%; left: 50%; transform: translateX(-50%) translateY(8px); min-width: 330px; background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius); box-shadow: var(--shadow); padding: 10px; opacity: 0; visibility: hidden; transition: opacity .16s ease, transform .16s ease; z-index: 50; }
.dropdown::before { content: ""; position: absolute; top: -14px; left: 0; right: 0; height: 14px; }
.nav-item:hover .dropdown { opacity: 1; visibility: visible; transform: translateX(-50%) translateY(0); }
.dropdown a { display: flex; align-items: flex-start; gap: 12px; padding: 11px 12px; border-radius: var(--radius-sm); }
.dropdown a:hover { background: var(--surface-2); }
.dropdown a .swatch { width: 9px; height: 9px; border-radius: 50%; margin-top: 6px; flex: 0 0 9px; }
.dd-title { display: block; font-weight: 600; font-size: 14px; color: var(--ink); }
.dd-desc { display: block; font-size: 12.5px; color: var(--muted); line-height: 1.4; }
.dropdown a.dd-all { justify-content: center; font-weight: 600; font-size: 13px; color: var(--brand-strong); background: #eaf3ee; margin-top: 4px; }
.dropdown a.dd-all:hover { background: #e0eee6; }

/* ---- Priser ---- */
.price-grid { display: grid; grid-template-columns: repeat(4, 1fr); gap: 20px; align-items: start; }
@media (max-width: 1040px) { .price-grid { grid-template-columns: repeat(2, 1fr); } }
@media (max-width: 620px) { .price-grid { grid-template-columns: 1fr; } }
.price-card { position: relative; background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius); padding: 28px 24px; box-shadow: var(--shadow-sm); display: flex; flex-direction: column; }
.price-card.featured { border-color: var(--brand); box-shadow: var(--shadow); }
.price-badge { position: absolute; top: -12px; left: 24px; background: var(--brand); color: #fff; font-size: 12px; font-weight: 700; padding: 5px 12px; border-radius: var(--radius-pill); }
.price-name { font-size: 20px; font-weight: 800; letter-spacing: -.01em; }
.price-for { color: var(--muted); font-size: 14px; margin: 2px 0 16px; min-height: 20px; }
.price-amount { font-size: 34px; font-weight: 800; letter-spacing: -.02em; }
.price-amount span { font-size: 15px; font-weight: 600; color: var(--muted); }
.price-list { list-style: none; margin: 20px 0 24px; padding: 0; display: grid; gap: 10px; }
.price-list li { display: flex; gap: 10px; align-items: flex-start; font-size: 14px; color: var(--ink-soft); }
.price-list li.inherit { font-weight: 600; color: var(--ink); }
.price-list li::before { content: ""; width: 16px; height: 16px; border-radius: 50%; background: #eaf3ee no-repeat center; flex: 0 0 16px; margin-top: 2px; background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 16 16'%3E%3Cpath d='M4 8.3l2.6 2.6L12 5.2' fill='none' stroke='%230e5c3a' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'/%3E%3C/svg%3E"); }
.price-card .btn { margin-top: auto; }
.price-note { color: var(--muted); font-size: 14px; text-align: center; margin-top: 30px; }

/* ---- Bokslut-verktyg ---- */
.tool-bar { display: flex; flex-wrap: wrap; gap: 16px; align-items: center; justify-content: space-between; background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius); padding: 16px 18px; box-shadow: var(--shadow-sm); }
.tool-bar .grp { display: flex; gap: 12px; align-items: center; flex-wrap: wrap; }
.seg { display: inline-flex; background: var(--surface-2); border-radius: var(--radius-pill); padding: 4px; }
.seg button { border: 0; background: transparent; padding: 9px 16px; border-radius: var(--radius-pill); font: inherit; font-weight: 600; font-size: 14px; color: var(--muted); cursor: pointer; }
.seg button.on { background: var(--surface); color: var(--ink); box-shadow: var(--shadow-sm); }
.tool-bar select { padding: 10px 12px; border: 1px solid var(--line); border-radius: var(--radius-sm); font: inherit; font-size: 14px; background: var(--surface); }
.tool-progress { display: flex; align-items: center; gap: 10px; font-weight: 600; font-size: 14px; }
.tool-progress .bar { width: 120px; height: 8px; border-radius: 8px; background: var(--surface-2); overflow: hidden; }
.tool-progress .bar i { display: block; height: 100%; background: var(--brand); width: 0; transition: width .3s ease; }
.acct-table { width: 100%; border-collapse: collapse; margin-top: 20px; background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius); overflow: hidden; }
.acct-table th, .acct-table td { text-align: left; padding: 13px 16px; border-bottom: 1px solid var(--line); font-size: 14px; vertical-align: middle; }
.acct-table th { background: var(--surface-2); font-weight: 600; color: var(--ink-soft); font-size: 13px; }
.acct-table tr:last-child td { border-bottom: 0; }
.acct-table td.num { text-align: right; font-variant-numeric: tabular-nums; white-space: nowrap; }
.acct-table tr.done { background: #f5faf7; }
.acct-no { font-weight: 700; }
.acct-name { color: var(--muted); }
.link-btn { border: 0; background: none; color: var(--brand-strong); font: inherit; font-weight: 600; font-size: 14px; cursor: pointer; padding: 0; }
.link-btn:hover { text-decoration: underline; }
.file-hint { color: var(--muted); font-size: 12.5px; display: block; margin-top: 3px; max-width: 200px; }
.reco-btn { border: 1px solid var(--line); background: var(--surface); border-radius: var(--radius-pill); padding: 7px 14px; font: inherit; font-weight: 600; font-size: 13px; cursor: pointer; white-space: nowrap; }
.reco-btn.on { background: #eaf3ee; border-color: #cfe6d8; color: var(--brand-strong); }
.tool-empty { text-align: center; padding: 30px; }
.acct-table tr.main { cursor: pointer; }
.acct-table tr.main:hover { background: #faf8f3; }
.acct-table tr.main.open { background: #eef5f0; }
.acct-caret { display: inline-block; width: 7px; height: 7px; border-right: 2px solid var(--muted); border-bottom: 2px solid var(--muted); transform: rotate(-45deg); margin-right: 11px; transition: transform .15s ease; vertical-align: middle; }
.acct-table tr.main.open .acct-caret { transform: rotate(45deg); }
.u-sum { color: var(--muted); font-size: 13px; }
.u-sum.has { color: var(--brand-strong); font-weight: 600; }
.acct-detail > td { background: #f7f9f7; padding: 0; }
.detail-wrap { padding: 24px 22px; }
.detail-head { display: flex; align-items: flex-start; justify-content: space-between; gap: 16px; flex-wrap: wrap; margin-bottom: 18px; }
.detail-no { font-size: 23px; font-weight: 800; letter-spacing: -.01em; }
.detail-sub { color: var(--muted); font-size: 14px; margin-top: 2px; }
.detail-amount { font-size: 23px; font-weight: 800; font-variant-numeric: tabular-nums; white-space: nowrap; }
.doc-list { list-style: none; margin: 16px 0 0; padding: 0; display: grid; gap: 8px; }
.doc-list li { display: flex; align-items: center; justify-content: space-between; gap: 12px; background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius-sm); padding: 10px 14px; font-size: 14px; }
.doc-name { display: flex; align-items: center; gap: 11px; min-width: 0; }
.doc-name .txt { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.doc-ico { width: 28px; height: 28px; border-radius: 8px; background: #eaf3ee no-repeat center; flex: 0 0 28px; background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24'%3E%3Cpath d='M6 3h8l4 4v14H6z' fill='none' stroke='%230e5c3a' stroke-width='1.6' stroke-linejoin='round'/%3E%3Cpath d='M14 3v4h4' fill='none' stroke='%230e5c3a' stroke-width='1.6' stroke-linejoin='round'/%3E%3C/svg%3E"); }
.doc-rm { border: 0; background: none; color: var(--muted); font-size: 20px; cursor: pointer; line-height: 1; padding: 0 4px; }
.doc-rm:hover { color: var(--coral); }
.detail-empty { color: var(--muted); font-size: 14px; margin-top: 14px; }
.detail-actions { display: flex; gap: 12px; align-items: center; margin-top: 20px; flex-wrap: wrap; }
.tool-note { color: var(--muted); font-size: 13px; margin-top: 14px; }
.saved-banner { display: none; align-items: center; justify-content: space-between; gap: 14px; background: #eaf3ee; border: 1px solid #cfe6d8; color: var(--brand-strong); border-radius: var(--radius-sm); padding: 12px 16px; font-size: 14px; font-weight: 600; margin-bottom: 18px; }
.saved-banner.show { display: flex; }

/* ---- Modal ---- */
.modal-back { position: fixed; inset: 0; background: rgba(20,20,20,.45); display: none; align-items: center; justify-content: center; z-index: 100; padding: 20px; }
.modal-back.open { display: flex; }
.modal { background: var(--surface); border-radius: var(--radius); padding: 30px; width: 100%; max-width: 420px; box-shadow: var(--shadow); }
.modal h3 { margin-bottom: 4px; }
.modal .field { display: grid; gap: 6px; margin-top: 14px; }
.modal .field span { font-weight: 600; font-size: 14px; }
.modal input { padding: 12px 14px; border: 1px solid var(--line); border-radius: var(--radius-sm); font: inherit; }
.modal .switch { text-align: center; margin-top: 16px; font-size: 14px; color: var(--muted); }
.modal-close { float: right; border: 0; background: none; font-size: 22px; cursor: pointer; color: var(--muted); line-height: 1; }
.toast { position: fixed; bottom: 24px; left: 50%; transform: translateX(-50%) translateY(20px); background: var(--ink); color: #fff; padding: 13px 20px; border-radius: var(--radius-pill); font-weight: 600; font-size: 14px; opacity: 0; pointer-events: none; transition: opacity .2s ease, transform .2s ease; z-index: 120; }
.toast.show { opacity: 1; transform: translateX(-50%) translateY(0); }

/* ============================================================
   Mobil-överrides (läggs sist så de vinner cascade oavsett var
   basreglerna definieras). Gäller alla sidor.
   ============================================================ */
/* Sidmarginal: .section/.hero-grid nollar sidled-padding (döljs av max-width
   på desktop) vilket ser ut som kant-till-kant på mobil. Återställ den. */
@media (max-width: 720px) {
  .section, .section.tight, .hero-grid { padding-left: 22px; padding-right: 22px; }
}
/* Mobil-hero (alla sidor med den vinkande gubben): gubben överst med explicit
   storlek, mindre rubrik och luftigare text. */
@media (max-width: 620px) {
  .hero-visual.hero-clean { order: -1; width: 230px; height: 210px; max-width: 72%; margin: 0 auto 22px; }
  .hero h1 { font-size: 28px; line-height: 1.14; overflow-wrap: anywhere; }
  .hero .lead { font-size: 15px; line-height: 1.5; }
  .hero-grid { gap: 14px; padding-top: 24px; padding-bottom: 40px; }
}
