@view-transition { navigation: auto; }

:root {
  --navy: #1f5f9e;
  --navy-2: #2b74ba;
  --accent: #2b80d2;
  --accent-hover: #1f6fbd;
  --accent-soft: rgba(43, 128, 210, .12);
  --sky: #8fcbff;
  --bg: #f1f7fd;
  --surface: #ffffff;
  --surface-2: #e6f0fa;
  --glass: rgba(255, 255, 255, .88);
  --text: #14324f;
  --muted: #587089;
  --line: rgba(20, 50, 79, .1);
  --ok: #0f8a4b;
  --ok-soft: #dcf5e7;
  --warn: #9a5b00;
  --warn-soft: #fdf0d5;
  --info: #13527d;
  --info-soft: #e1eef8;
  --danger: #d33a2c;
  --radius: 18px;
  --radius-sm: 12px;
  --shadow-sm: 0 1px 2px rgba(20, 50, 79, .06), 0 2px 8px rgba(20, 50, 79, .05);
  --shadow: 0 10px 30px -12px rgba(20, 50, 79, .2), 0 2px 6px rgba(20, 50, 79, .05);
  --shadow-lg: 0 30px 60px -20px rgba(20, 50, 79, .3);
  --ease: cubic-bezier(.22, 1, .36, 1);
  --nav-h: 68px;
  color-scheme: light;
}
:root[data-theme="dark"] {
  --navy: #2a6aab;
  --navy-2: #3a7fc2;
  --accent: #5aa8ef;
  --accent-hover: #74b7f3;
  --accent-soft: rgba(90, 168, 239, .16);
  --bg: #16253b;
  --surface: #1d3049;
  --surface-2: #26405f;
  --glass: rgba(29, 48, 73, .9);
  --text: #eef4fb;
  --muted: #a7b8cc;
  --line: rgba(255, 255, 255, .1);
  --ok: #4ade80;
  --ok-soft: rgba(74, 222, 128, .12);
  --warn: #fbbf24;
  --warn-soft: rgba(251, 191, 36, .12);
  --info: #8fcbff;
  --info-soft: rgba(143, 203, 255, .12);
  --shadow-sm: 0 1px 2px rgba(0, 0, 0, .2);
  --shadow: 0 10px 30px -12px rgba(0, 0, 0, .45);
  --shadow-lg: 0 30px 60px -20px rgba(0, 0, 0, .5);
  color-scheme: dark;
}

* { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; scroll-behavior: smooth; }
body {
  margin: 0; font-family: 'Plus Jakarta Sans', system-ui, sans-serif; font-size: 16px; line-height: 1.55;
  color: var(--text); background: var(--bg); -webkit-font-smoothing: antialiased;
  transition: background-color .3s, color .3s;
}
h1, h2, h3, h4 { line-height: 1.15; letter-spacing: -0.025em; margin: 0; font-weight: 750; }
p { margin: 0; }
a { color: inherit; text-decoration: none; }
img { max-width: 100%; display: block; }
button, input, select, textarea { font: inherit; color: inherit; }
[hidden] { display: none !important; }
:focus-visible { outline: 3px solid color-mix(in srgb, var(--accent) 60%, transparent); outline-offset: 2px; border-radius: 8px; }
.small { font-size: 13px; color: var(--muted); }
.muted { color: var(--muted); }
.sr-only { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }

.i { width: 20px; height: 20px; flex: none; fill: none; stroke: currentColor; stroke-width: 1.9; stroke-linecap: round; stroke-linejoin: round; }
:root[data-theme="dark"] .only-light, :root:not([data-theme="dark"]) .only-dark { display: none; }

.container { width: min(1200px, 100%); margin: 0 auto; padding: 0 24px; }
main { min-height: 60vh; }

/* Knappar och formulär */
.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 8px; border: 1px solid transparent; cursor: pointer;
  padding: 12px 20px; border-radius: 999px; font-weight: 650; font-size: 15px; white-space: nowrap;
  transition: transform .25s var(--ease), background-color .2s, box-shadow .25s, border-color .2s, color .2s;
}
.btn:active { transform: scale(.97); }
.btn:disabled { opacity: .5; cursor: not-allowed; }
.btn .i { width: 18px; height: 18px; }
.btn-primary { background: var(--accent); color: #fff; box-shadow: 0 8px 20px -8px color-mix(in srgb, var(--accent) 80%, transparent); }
.btn-primary:hover { background: var(--accent-hover); transform: translateY(-1px); box-shadow: 0 12px 26px -10px color-mix(in srgb, var(--accent) 90%, transparent); }
.btn-dark { background: var(--navy); color: #fff; }
.btn-dark:hover { background: var(--navy-2); transform: translateY(-1px); }
.btn-ghost { background: transparent; border-color: var(--line); color: var(--text); }
.btn-ghost:hover { background: var(--surface-2); }
.btn-light { background: rgba(255, 255, 255, .14); color: #fff; border-color: rgba(255, 255, 255, .35); backdrop-filter: blur(8px); }
.btn-light:hover { background: rgba(255, 255, 255, .24); }
.btn-danger { background: var(--danger); color: #fff; }
.btn-sm { padding: 8px 14px; font-size: 13.5px; }
.btn-block { width: 100%; }

.icon-btn {
  display: inline-grid; place-items: center; width: 40px; height: 40px; border-radius: 12px; border: 0; background: transparent;
  cursor: pointer; color: inherit; transition: background-color .2s, transform .2s var(--ease), color .2s;
}
.icon-btn:hover { background: var(--surface-2); }
.icon-btn:active { transform: scale(.92); }
.icon-btn:disabled { opacity: .35; cursor: default; background: none; }

.input, select.input {
  width: 100%; padding: 12px 14px; border-radius: var(--radius-sm); border: 1px solid var(--line); background: var(--surface);
  outline: none; transition: border-color .2s, box-shadow .2s;
}
.input:focus { border-color: var(--accent); box-shadow: 0 0 0 4px var(--accent-soft); }
.label { display: grid; gap: 6px; font-size: 14px; font-weight: 600; }
.label .input { font-weight: 400; }
.field { position: relative; }
.field.loading::after {
  content: ""; position: absolute; right: 14px; top: 50%; width: 16px; height: 16px; margin-top: -8px; border-radius: 50%;
  border: 2px solid var(--line); border-top-color: var(--accent); animation: spin .8s linear infinite;
}
@keyframes spin { to { transform: rotate(360deg); } }

.suggest {
  position: absolute; z-index: 30; top: calc(100% + 6px); left: 0; right: 0; margin: 0; padding: 6px; list-style: none;
  background: var(--surface); border: 1px solid var(--line); border-radius: 14px; box-shadow: var(--shadow); display: none; color: var(--text);
}
.suggest.open { display: block; animation: drop .22s var(--ease); }
.suggest li { padding: 10px 12px; border-radius: 10px; cursor: pointer; display: flex; gap: 10px; align-items: flex-start; }
.suggest li .i { color: var(--muted); margin-top: 2px; width: 18px; height: 18px; }
.suggest li span { display: flex; flex-direction: column; min-width: 0; }
.suggest li:hover, .suggest li.active { background: var(--surface-2); }
.suggest li b { font-weight: 650; font-size: 14px; }
.suggest li small { color: var(--muted); font-size: 12px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
@keyframes drop { from { opacity: 0; transform: translateY(-6px); } }

.chip-row { display: flex; flex-wrap: wrap; gap: 8px; }
.chip {
  display: inline-flex; align-items: center; gap: 6px; padding: 7px 12px; border-radius: 999px; border: 1px solid var(--line);
  background: var(--surface); font-size: 13px; font-weight: 600; cursor: pointer; color: var(--text); transition: all .2s var(--ease);
}
.chip .i { width: 16px; height: 16px; }
.chip:hover { border-color: color-mix(in srgb, var(--accent) 50%, var(--line)); }
.chip[aria-pressed="true"], .chip.on { background: var(--navy); border-color: var(--navy); color: #fff; }
:root[data-theme="dark"] .chip[aria-pressed="true"], :root[data-theme="dark"] .chip.on { background: var(--accent); border-color: var(--accent); }

/* Växlar (checkbox) */
.switch { display: flex; align-items: center; justify-content: space-between; gap: 16px; cursor: pointer; }
.switch input { appearance: none; width: 44px; height: 26px; border-radius: 99px; background: var(--surface-2); border: 1px solid var(--line); position: relative; cursor: pointer; transition: background .25s; flex: none; margin: 0; }
.switch input::after { content: ""; position: absolute; top: 2px; left: 2px; width: 20px; height: 20px; border-radius: 50%; background: #fff; box-shadow: var(--shadow-sm); transition: transform .3s var(--ease); }
.switch input:checked { background: var(--accent); border-color: var(--accent); }
.switch input:checked::after { transform: translateX(18px); }

/* Navigation */
.site-nav { position: sticky; top: 0; z-index: 1000; height: var(--nav-h); background: var(--glass); backdrop-filter: blur(16px) saturate(1.5); -webkit-backdrop-filter: blur(16px) saturate(1.5); border-bottom: 1px solid var(--line); transition: background-color .3s, border-color .3s, color .3s; }
.site-nav[data-transparent] { position: fixed; left: 0; right: 0; background: transparent; border-color: transparent; color: #fff; backdrop-filter: none; -webkit-backdrop-filter: none; }
.site-nav[data-transparent].solid, .site-nav[data-transparent].open { background: var(--glass); border-color: var(--line); color: var(--text); backdrop-filter: blur(16px) saturate(1.5); -webkit-backdrop-filter: blur(16px) saturate(1.5); }
.nav-inner { height: 100%; width: min(1280px, 100%); margin: 0 auto; padding: 0 20px; display: flex; align-items: center; gap: 20px; }
.brand { display: inline-flex; align-items: center; gap: 10px; font-weight: 800; font-size: 19px; letter-spacing: -0.03em; }
.logo { width: 32px; height: 32px; }
.nav-links { display: flex; gap: 2px; margin: 0 auto; }
.nav-link { display: inline-flex; align-items: center; gap: 7px; padding: 8px 12px; border-radius: 10px; font-size: 14px; font-weight: 600; opacity: .78; transition: opacity .2s, background-color .2s; position: relative; }
.nav-link .i { width: 18px; height: 18px; }
.nav-link:hover { opacity: 1; background: color-mix(in srgb, currentColor 8%, transparent); }
.nav-link.active { opacity: 1; }
.nav-link.active::after { content: ""; position: absolute; left: 12px; right: 12px; bottom: 1px; height: 2px; border-radius: 2px; background: var(--accent); }
.nav-actions { display: flex; align-items: center; gap: 6px; }
.avatar { display: grid; place-items: center; width: 38px; height: 38px; border-radius: 50%; background: var(--navy); color: #fff; font-weight: 700; font-size: 14px; border: 2px solid color-mix(in srgb, currentColor 15%, transparent); transition: transform .2s var(--ease); }
.avatar:hover { transform: scale(1.06); }
.avatar .i { width: 18px; height: 18px; }
.nav-burger { display: none; }
.nav-drawer { position: absolute; top: var(--nav-h); left: 0; right: 0; background: var(--surface); border-bottom: 1px solid var(--line); box-shadow: var(--shadow-lg); padding: 12px; color: var(--text); animation: drawer .35s var(--ease); }
.nav-drawer nav { display: grid; gap: 2px; }
.nav-drawer .nav-link { padding: 14px; font-size: 16px; opacity: 1; }
.nav-drawer .nav-link.active { background: var(--accent-soft); color: var(--accent); }
.nav-drawer .nav-link.active::after { display: none; }
@keyframes drawer { from { opacity: 0; transform: translateY(-10px); } }

@media (max-width: 1100px) { .nav-links .nav-link span { display: none; } .nav-links .nav-link { padding: 10px; } }
@media (max-width: 760px) {
  .nav-links { display: none; }
  .nav-burger { display: inline-grid; }
  .nav-inner { justify-content: space-between; }
}

/* Sektioner */
.section { padding: 88px 0; }
.section-head { display: flex; align-items: end; justify-content: space-between; gap: 24px; margin-bottom: 32px; flex-wrap: wrap; }
.section-head h2 { font-size: clamp(28px, 3.4vw, 40px); }
.section-head p { color: var(--muted); max-width: 560px; margin-top: 8px; }
.eyebrow { display: inline-block; font-size: 12px; font-weight: 700; letter-spacing: .08em; text-transform: uppercase; color: var(--accent); }
.page-head { padding: 56px 0 28px; }
.page-head h1 { font-size: clamp(32px, 4.5vw, 48px); margin-top: 6px; }
.page-head p { color: var(--muted); margin-top: 10px; max-width: 620px; font-size: 17px; }
.page-head-row { display: flex; align-items: end; justify-content: space-between; gap: 20px; flex-wrap: wrap; }

.reveal { opacity: 0; transform: translateY(18px); transition: opacity .7s var(--ease), transform .7s var(--ease); transition-delay: calc(var(--i, 0) * 70ms); }
.reveal.in { opacity: 1; transform: none; }

/* Kort */
.card { background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius); box-shadow: var(--shadow-sm); }
.grid { display: grid; gap: 22px; grid-template-columns: repeat(auto-fill, minmax(min(300px, 100%), 1fr)); }

.place-card { background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius); overflow: hidden; display: flex; flex-direction: column; box-shadow: var(--shadow-sm); transition: transform .4s var(--ease), box-shadow .4s var(--ease), opacity .7s var(--ease); }
.place-card:hover { transform: translateY(-4px); box-shadow: var(--shadow); }
.place-img { position: relative; aspect-ratio: 16 / 10; background: var(--surface-2); overflow: hidden; }
.place-img img { width: 100%; height: 100%; object-fit: cover; transition: transform .8s var(--ease); }
.place-card:hover .place-img img { transform: scale(1.05); }
.img-fallback { width: 100%; height: 100%; display: grid; place-items: center; color: var(--muted); }
.img-fallback .i { width: 40px; height: 40px; opacity: .5; }
.fav-btn { position: absolute; top: 12px; right: 12px; width: 40px; height: 40px; border-radius: 50%; border: 0; display: grid; place-items: center; cursor: pointer; background: rgba(255, 255, 255, .92); color: var(--navy); box-shadow: var(--shadow-sm); transition: transform .25s var(--ease), color .2s; }
.fav-btn:hover { transform: scale(1.1); }
.fav-btn.on { color: var(--accent); }
.fav-btn.on .i { fill: currentColor; animation: pulse-heart .4s var(--ease); }
@keyframes pulse-heart { 50% { transform: scale(1.3); } }
.place-body { padding: 18px 20px 20px; display: flex; flex-direction: column; gap: 8px; flex: 1; }
.place-body h3 { font-size: 20px; }
.place-body p { color: var(--muted); font-size: 14.5px; display: -webkit-box; -webkit-line-clamp: 3; -webkit-box-orient: vertical; overflow: hidden; }
.place-actions { display: flex; flex-wrap: wrap; align-items: center; gap: 8px; margin-top: auto; padding-top: 10px; }
.link-more { display: inline-flex; align-items: center; gap: 4px; font-size: 13px; font-weight: 600; color: var(--muted); margin-left: auto; }
.link-more:hover { color: var(--accent); }
.link-more .i { width: 14px; height: 14px; }

.empty-state { text-align: center; padding: 64px 24px; border: 1.5px dashed var(--line); border-radius: 24px; background: var(--surface); }
.empty-icon { width: 72px; height: 72px; margin: 0 auto 18px; border-radius: 22px; display: grid; place-items: center; background: var(--accent-soft); color: var(--accent); }
.empty-icon .i { width: 32px; height: 32px; }
.empty-state h3 { font-size: 22px; }
.empty-state p { color: var(--muted); margin: 8px auto 22px; max-width: 420px; }

.skeleton { border-radius: var(--radius); background: linear-gradient(90deg, var(--surface-2) 25%, var(--surface) 50%, var(--surface-2) 75%); background-size: 200% 100%; animation: shimmer 1.3s infinite; }
@keyframes shimmer { to { background-position: -200% 0; } }
.error-box { color: var(--danger); background: color-mix(in srgb, var(--danger) 10%, transparent); border-radius: 14px; padding: 14px 16px; font-size: 14px; }

/* Footer */
.site-footer { background: var(--surface-2); color: var(--muted); padding: 64px 0 28px; margin-top: 40px; border-top: 1px solid var(--line); }
.site-footer .brand { color: var(--text); margin-bottom: 14px; }
.footer-grid { display: grid; grid-template-columns: 2fr 1fr 1fr 1.4fr; gap: 40px; }
.footer-grid h4 { color: var(--text); font-size: 14px; letter-spacing: .02em; margin-bottom: 14px; }
.footer-grid a:not(.brand) { display: flex; align-items: center; gap: 8px; padding: 4px 0; font-size: 14.5px; transition: color .2s; }
.footer-grid a:hover { color: var(--accent); }
.footer-grid .i { width: 16px; height: 16px; }
.footer-brand p { max-width: 340px; font-size: 14.5px; }
.footer-grid .small { color: var(--muted); margin-top: 6px; }
.footer-bottom { display: flex; justify-content: space-between; flex-wrap: wrap; gap: 12px; margin-top: 48px; padding-top: 24px; border-top: 1px solid var(--line); font-size: 13.5px; }
.footer-bottom .small { color: var(--muted); }
.footer-bottom a { text-decoration: underline; text-underline-offset: 2px; }
@media (max-width: 860px) { .footer-grid { grid-template-columns: 1fr 1fr; } .footer-brand { grid-column: 1 / -1; } }

/* Toast och dialog */
#toast {
  position: fixed; z-index: 3000; left: 50%; bottom: 24px; transform: translate(-50%, 140px); background: var(--navy); color: #fff;
  padding: 12px 18px; border-radius: 14px; font-size: 14px; box-shadow: var(--shadow-lg); transition: transform .45s var(--ease); max-width: calc(100% - 32px);
}
#toast.show { transform: translate(-50%, 0); }
.dialog { border: 0; padding: 0; border-radius: 22px; background: var(--surface); color: var(--text); box-shadow: var(--shadow-lg); width: min(440px, calc(100% - 32px)); }
.dialog::backdrop { background: rgba(5, 12, 23, .5); backdrop-filter: blur(3px); }
.dialog[open] { animation: dialogIn .35s var(--ease); }
@keyframes dialogIn { from { opacity: 0; transform: translateY(14px) scale(.97); } }
.dialog form { padding: 24px; display: grid; gap: 14px; }
.dialog h3 { font-size: 20px; }
.dialog p { color: var(--muted); }
.dialog-actions { display: flex; justify-content: flex-end; gap: 10px; margin-top: 6px; }

/* Startsida */
.hero { position: relative; min-height: min(860px, 100svh); display: flex; align-items: center; color: #fff; overflow: hidden; isolation: isolate; }
.hero-bg { position: absolute; inset: 0; z-index: -2; background: url('../img/hero.jpg') center 55% / cover; animation: heroZoom 18s ease-out both; }
.hero::before { content: ""; position: absolute; inset: 0; z-index: -1; background: linear-gradient(180deg, rgba(14, 52, 92, .45) 0%, rgba(14, 52, 92, .15) 45%, rgba(14, 52, 92, .6) 100%), linear-gradient(90deg, rgba(14, 52, 92, .55), transparent 70%); }
@keyframes heroZoom { from { transform: scale(1.08); } }
.hero-content { padding: calc(var(--nav-h) + 40px) 24px 100px; }
.hero h1 { font-size: clamp(40px, 6.6vw, 82px); font-weight: 800; letter-spacing: -0.04em; max-width: 820px; animation: rise .9s var(--ease) .1s both; }
.hero h1 em, .hero .eyebrow { font-style: normal; color: var(--sky); }
.hero-sub { font-size: clamp(17px, 1.6vw, 21px); opacity: .9; margin-top: 18px; max-width: 560px; animation: rise .9s var(--ease) .2s both; }
.hero-search { margin-top: 36px; display: flex; gap: 8px; padding: 8px; background: rgba(255, 255, 255, .97); border-radius: 999px; max-width: 620px; box-shadow: var(--shadow-lg); color: var(--navy); animation: rise .9s var(--ease) .3s both; }
:root[data-theme="dark"] .hero-search { background: var(--surface); color: var(--text); }
.hero-search .field { flex: 1; display: flex; align-items: center; gap: 10px; padding-left: 16px; }
.hero-search .field > .i { color: var(--muted); }
.hero-search input { flex: 1; border: 0; outline: none; background: transparent; padding: 12px 0; font-size: 16px; min-width: 0; }
.hero-search .suggest { top: calc(100% + 14px); left: -8px; right: -120px; }
.hero-actions { display: flex; gap: 12px; margin-top: 22px; flex-wrap: wrap; animation: rise .9s var(--ease) .4s both; }
.hero-credit { position: absolute; right: 16px; bottom: 12px; font-size: 11px; opacity: .65; }
.hero-credit a { text-decoration: underline; }
@keyframes rise { from { opacity: 0; transform: translateY(24px); } }

.quick { margin-top: -64px; position: relative; z-index: 2; }
.quick-grid { display: grid; grid-template-columns: repeat(4, 1fr); gap: 16px; }
.quick-card { display: flex; flex-direction: column; gap: 14px; padding: 22px; border-radius: var(--radius); background: var(--surface); border: 1px solid var(--line); box-shadow: var(--shadow); transition: transform .35s var(--ease), box-shadow .35s var(--ease), opacity .7s var(--ease); }
.quick-card:hover { transform: translateY(-4px); box-shadow: var(--shadow-lg); }
.quick-icon { width: 46px; height: 46px; border-radius: 14px; display: grid; place-items: center; background: var(--accent-soft); color: var(--accent); }
.quick-card h3 { font-size: 17px; }
.quick-card p { color: var(--muted); font-size: 14px; }
.quick-card .count { margin-left: auto; font-size: 13px; font-weight: 700; color: var(--muted); background: var(--surface-2); padding: 2px 10px; border-radius: 99px; }
.quick-top { display: flex; align-items: center; }
.quick-go { display: inline-flex; align-items: center; gap: 4px; font-size: 14px; font-weight: 650; color: var(--accent); margin-top: auto; }
.quick-go .i { width: 16px; height: 16px; transition: transform .3s var(--ease); }
.quick-card:hover .quick-go .i { transform: translateX(4px); }
@media (max-width: 960px) { .quick-grid { grid-template-columns: 1fr 1fr; } }

.recent-strip { margin-top: 36px; display: flex; align-items: center; gap: 12px; flex-wrap: wrap; }
.recent-strip > span { font-size: 14px; font-weight: 650; color: var(--muted); }


.why { background: var(--surface); border-block: 1px solid var(--line); }
.why-grid { display: grid; grid-template-columns: 1fr 1.25fr; gap: 64px; align-items: center; }
.why-grid h2 { font-size: clamp(30px, 3.6vw, 44px); }
.why-grid > div > p { color: var(--muted); margin: 16px 0 28px; font-size: 17px; }
.feature-list { display: grid; gap: 4px; }
.feature { display: flex; gap: 18px; padding: 18px; border-radius: var(--radius); transition: background-color .3s; }
.feature:hover { background: var(--surface-2); }
.feature-icon { width: 48px; height: 48px; flex: none; border-radius: 14px; display: grid; place-items: center; background: var(--navy); color: #fff; }
:root[data-theme="dark"] .feature-icon { background: var(--navy-2); }
.feature h3 { font-size: 17px; }
.feature p { color: var(--muted); font-size: 14.5px; margin-top: 4px; }
@media (max-width: 860px) { .why-grid { grid-template-columns: 1fr; gap: 24px; } }

.cta { padding: 0 0 40px; }
.cta-box { border-radius: 28px; padding: 56px; background: radial-gradient(circle at 85% 20%, color-mix(in srgb, var(--accent) 35%, transparent), transparent 45%), var(--navy); color: #fff; display: flex; justify-content: space-between; align-items: center; gap: 24px; flex-wrap: wrap; }
.cta-box h2 { font-size: clamp(26px, 3vw, 36px); max-width: 560px; }
.cta-box p { opacity: .8; margin-top: 8px; }

/* Statistik */
.kpis { display: grid; grid-template-columns: repeat(auto-fit, minmax(min(150px, 45%), 1fr)); gap: 12px; }
.kpi { padding: 20px; border-radius: var(--radius); background: var(--surface); border: 1px solid var(--line); box-shadow: var(--shadow-sm); }
.kpi-label { display: flex; align-items: center; gap: 8px; color: var(--muted); font-size: 13.5px; font-weight: 600; }
.kpi-label .i { width: 17px; height: 17px; }
.kpi-value { font-size: 30px; font-weight: 800; letter-spacing: -0.03em; margin-top: 8px; font-variant-numeric: tabular-nums; }
.kpi-sub { font-size: 13px; color: var(--muted); margin-top: 2px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.charts { display: grid; grid-template-columns: 1.6fr 1fr; gap: 16px; margin-top: 16px; }
.chart-card { padding: 22px; }
.chart-card h3 { font-size: 16px; }
.chart-card .small { margin-top: 2px; }
@media (max-width: 860px) { .charts { grid-template-columns: 1fr; } }

/* Resor */
.trip-list { display: grid; gap: 14px; }
.trip { display: grid; grid-template-columns: auto 1fr auto; gap: 18px; align-items: center; padding: 18px 20px; transition: transform .35s var(--ease), box-shadow .35s var(--ease), opacity .7s var(--ease); }
.trip:hover { box-shadow: var(--shadow); }
.trip-mode { width: 48px; height: 48px; border-radius: 14px; display: grid; place-items: center; background: var(--accent-soft); color: var(--accent); }
.trip h3 { font-size: 17px; }
.trip h3 a:hover { color: var(--accent); }
.trip-route { display: flex; align-items: center; gap: 6px; color: var(--muted); font-size: 14px; margin-top: 3px; min-width: 0; }
.trip-route span { white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.trip-route .i { width: 14px; height: 14px; }
.trip-meta { display: flex; flex-wrap: wrap; gap: 6px 16px; margin-top: 8px; font-size: 13px; color: var(--muted); }
.trip-meta span { display: inline-flex; align-items: center; gap: 5px; }
.trip-meta .i { width: 15px; height: 15px; }
.trip-actions { display: flex; gap: 4px; align-items: center; }
@media (max-width: 640px) {
  .trip { grid-template-columns: auto 1fr; }
  .trip-actions { grid-column: 1 / -1; justify-content: flex-start; border-top: 1px solid var(--line); padding-top: 10px; }
  .trip-actions .btn { flex: 1; }
}

/* Utforska */
.toolbar { display: flex; flex-wrap: wrap; gap: 14px; align-items: center; margin-bottom: 28px; }
.search-input { position: relative; flex: 1 1 320px; }
.search-input > .i { position: absolute; left: 16px; top: 50%; transform: translateY(-50%); color: var(--muted); pointer-events: none; }
.search-input .input { padding-left: 46px; border-radius: 999px; height: 50px; }
.result-note { font-size: 14px; color: var(--muted); margin: -12px 0 20px; }

/* Inställningar */
.settings-layout { display: grid; grid-template-columns: 220px 1fr; gap: 32px; align-items: start; }
.settings-nav { position: sticky; top: calc(var(--nav-h) + 24px); display: grid; gap: 2px; }
.settings-nav a { display: flex; gap: 10px; align-items: center; padding: 10px 12px; border-radius: 10px; font-weight: 600; font-size: 14.5px; color: var(--muted); transition: all .2s; }
.settings-nav a:hover { background: var(--surface); color: var(--text); }
.settings-section { padding: 26px; margin-bottom: 20px; scroll-margin-top: calc(var(--nav-h) + 20px); }
.settings-section h2 { font-size: 20px; display: flex; align-items: center; gap: 10px; }
.settings-section > p { color: var(--muted); font-size: 14.5px; margin-top: 4px; }
.form-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 16px; margin-top: 20px; }
.form-grid .full { grid-column: 1 / -1; }
.seg { display: inline-flex; padding: 4px; border-radius: 12px; background: var(--surface-2); gap: 2px; flex-wrap: wrap; }
.seg label { cursor: pointer; }
.seg input { position: absolute; opacity: 0; pointer-events: none; }
.seg span { display: inline-flex; align-items: center; gap: 6px; padding: 8px 14px; border-radius: 9px; font-size: 14px; font-weight: 600; color: var(--muted); transition: all .25s var(--ease); }
.seg span .i { width: 17px; height: 17px; }
.seg input:checked + span { background: var(--surface); color: var(--text); box-shadow: var(--shadow-sm); }
.seg input:focus-visible + span { outline: 3px solid var(--accent-soft); }
.setting-row { display: flex; align-items: center; justify-content: space-between; gap: 16px; padding: 14px 0; border-top: 1px solid var(--line); }
.setting-row:first-of-type { border-top: 0; }
.setting-row b { display: block; font-size: 15px; }
.setting-row small { color: var(--muted); font-size: 13px; }
.profile-head { display: flex; align-items: center; gap: 16px; margin-top: 18px; }
.profile-head .avatar { width: 64px; height: 64px; font-size: 22px; }
.home-chip { display: inline-flex; align-items: center; gap: 8px; margin-top: 8px; font-size: 14px; }
@media (max-width: 860px) {
  .settings-layout { grid-template-columns: 1fr; }
  .settings-nav { position: static; display: flex; overflow-x: auto; gap: 6px; scrollbar-width: none; }
  .settings-nav a { white-space: nowrap; background: var(--surface); border: 1px solid var(--line); }
  .form-grid { grid-template-columns: 1fr; }
}

@media (max-width: 640px) {
  .container { padding: 0 16px; }
  .section { padding: 64px 0; }
  .hero-search { border-radius: 20px; flex-direction: column; }
  .hero-search .field { padding: 4px 8px; }
  .hero-search .btn { width: 100%; }
  .hero-search .suggest { right: -8px; }
  .hero-actions .btn { flex: 1; }
  .quick-grid { grid-template-columns: 1fr; }
  .cta-box { padding: 32px 24px; }
  .settings-section { padding: 20px; }
}

@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { animation-duration: .01ms !important; animation-delay: 0ms !important; transition-duration: .01ms !important; scroll-behavior: auto !important; }
  .reveal { opacity: 1; transform: none; }
}

/* Diagram */
.vbars { display: grid; grid-template-columns: repeat(6, 1fr); gap: 10px; height: 220px; margin-top: 20px; border-bottom: 1px solid var(--line); }
.vbar { position: relative; display: flex; flex-direction: column; align-items: center; outline: none; }
.vbar-track { flex: 1; width: 100%; display: flex; flex-direction: column; justify-content: flex-end; align-items: center; position: relative; }
.vbar-fill { width: min(36px, 70%); height: var(--h); min-height: 2px; background: var(--accent); border-radius: 4px 4px 0 0; transform-origin: bottom; animation: grow .9s var(--ease) both; transition: filter .2s; }
.vbar:hover .vbar-fill, .vbar:focus .vbar-fill { filter: brightness(1.12); }
.vbar-val { font-size: 12px; font-weight: 700; color: var(--text); margin-bottom: 4px; white-space: nowrap; }
.vbar-label { position: absolute; bottom: -24px; font-size: 12px; color: var(--muted); }
.vbar-tip { position: absolute; bottom: 100%; left: 50%; transform: translate(-50%, 4px); background: var(--navy); color: #fff; font-size: 12px; font-weight: 600; padding: 6px 10px; border-radius: 8px; white-space: nowrap; opacity: 0; pointer-events: none; transition: opacity .2s, transform .2s var(--ease); z-index: 2; }
.vbar:hover .vbar-tip, .vbar:focus .vbar-tip { opacity: 1; transform: translate(-50%, -4px); }
.chart-card #chart-month { padding-bottom: 26px; }
@keyframes grow { from { transform: scaleY(0); } }
.hbars { display: grid; gap: 14px; margin-top: 20px; }
.hbar { display: grid; grid-template-columns: 120px 1fr 32px; gap: 12px; align-items: center; font-size: 14px; }
.hbar-label { display: flex; align-items: center; gap: 8px; font-weight: 600; }
.hbar-label .i { width: 18px; height: 18px; color: var(--muted); }
.hbar-track { height: 10px; background: var(--surface-2); border-radius: 99px; overflow: hidden; }
.hbar-fill { height: 100%; width: var(--w); background: var(--accent); border-radius: 99px; transform-origin: left; animation: growX .9s var(--ease) both; }
.hbar-val { font-weight: 700; text-align: right; font-variant-numeric: tabular-nums; }
@keyframes growX { from { transform: scaleX(0); } }

/* Cookies */
.cookie-banner { position: fixed; z-index: 2500; left: 50%; bottom: 20px; transform: translateX(-50%); width: min(920px, calc(100% - 32px)); display: flex; align-items: center; gap: 24px; padding: 20px 22px; border-radius: 20px; background: var(--surface); border: 1px solid var(--line); box-shadow: var(--shadow-lg); animation: cookieIn .6s var(--ease) .3s both; }
@keyframes cookieIn { from { opacity: 0; transform: translate(-50%, 30px); } }
.cookie-text { flex: 1; display: grid; gap: 6px; }
.cookie-text h3 { display: flex; align-items: center; gap: 8px; font-size: 16px; }
.cookie-text h3 .i { color: var(--accent); }
.cookie-text p { font-size: 14px; color: var(--muted); }
.cookie-actions { display: flex; gap: 8px; flex: none; }
.cookie-dialog { width: min(520px, calc(100% - 32px)); }
.cookie-row { display: flex; align-items: center; justify-content: space-between; gap: 16px; padding: 12px 0; border-top: 1px solid var(--line); cursor: pointer; }
.cookie-row span:first-child { display: grid; gap: 2px; }
.cookie-row small { color: var(--muted); font-size: 13px; }
.cookie-row input:disabled { opacity: .6; cursor: not-allowed; }
.cookie-more summary { cursor: pointer; font-weight: 650; font-size: 14px; color: var(--accent); }
.cookie-more p { font-size: 13.5px; margin-top: 8px; }
.link-btn { border: 0; background: none; padding: 0; cursor: pointer; text-decoration: underline; text-underline-offset: 2px; font-size: inherit; color: inherit; }
@media (max-width: 760px) {
  .cookie-banner { flex-direction: column; align-items: stretch; gap: 14px; bottom: 12px; padding: 18px; }
  .cookie-actions { flex-wrap: wrap; }
  .cookie-actions .btn { flex: 1; justify-content: center; }
}

/* Konto */
.nav-login { padding: 8px 14px; }
.nav-login .i { width: 16px; height: 16px; }
@media (max-width: 420px) { .nav-login span { display: none; } .nav-login { padding: 9px; } }
.account-box { display: flex; align-items: center; justify-content: space-between; gap: 16px; flex-wrap: wrap; margin-top: 18px; padding: 16px 18px; border-radius: var(--radius-sm); background: var(--surface-2); }
.account-box p { color: var(--muted); font-size: 14px; margin-top: 2px; }
.account-actions { display: flex; gap: 8px; flex-wrap: wrap; }
.plus-box { display: flex; align-items: center; justify-content: space-between; gap: 16px; flex-wrap: wrap; margin-top: 18px; padding: 16px 18px; border-radius: var(--radius-sm); background: var(--surface-2); }
.plus-box p { color: var(--muted); font-size: 14px; margin-top: 2px; }
.plus-box b { display: inline-flex; align-items: center; gap: 6px; }
.plus-box b svg { color: var(--ok, #16a34a); width: 18px; height: 18px; }
.plus-perks { list-style: none; padding: 0; margin: 10px 0 8px; display: grid; gap: 6px; font-size: 14px; }
.plus-perks li { display: flex; gap: 8px; align-items: center; }
.plus-perks .i { width: 16px; height: 16px; color: var(--ok); flex: none; }
.plus-box a:not(.btn) { color: var(--accent); text-decoration: underline; }
.plus-badge { background: var(--warn-soft); color: var(--warn); }
.role-badge { display: inline-flex; align-items: center; gap: 4px; margin-left: 8px; padding: 2px 8px; border-radius: 99px; background: var(--accent-soft); color: var(--accent); font-size: 12px; font-weight: 700; vertical-align: middle; }

:root:not([data-google]) .google-only { display: none !important; }
.btn-google { background: var(--surface); border: 1px solid var(--line); color: var(--text); }
.btn-google:hover { background: var(--surface-2); }
.btn-google svg { width: 18px; height: 18px; flex: none; }

/* Språk: sidan visas först när texten är översatt, men senast efter två sekunder om något går fel. */
html.i18n body { visibility: hidden; animation: i18n-show 0s 2s forwards; }
@keyframes i18n-show { to { visibility: visible; } }
.lang-pick { display: inline-flex; align-items: center; gap: 8px; margin-top: 14px; color: var(--muted); }
.lang-pick .i { width: 18px; height: 18px; flex: none; }
.lang-pick .input { height: 38px; padding: 0 12px; font-size: 14px; width: auto; }
.maint-banner { position: relative; z-index: 60; display: flex; align-items: center; justify-content: center; gap: 10px; flex-wrap: wrap; padding: 9px 16px; background: #9a5b00; color: #fff; font-size: 14px; font-weight: 600; }
.maint-banner .i { width: 18px; height: 18px; flex: none; }
.maint-banner a { color: #fff; text-decoration: underline; }
.lang-select { margin-top: 16px; max-width: 280px; }
.maint-page { min-height: 100svh; display: grid; place-items: center; background: radial-gradient(circle at 20% 10%, var(--accent-soft), transparent 50%), var(--bg); }
.maint-wrap { padding: 32px 16px; width: 100%; display: grid; place-items: center; }
.maint-box { width: min(520px, 100%); text-align: center; background: var(--surface); border: 1px solid var(--line); border-radius: 24px; box-shadow: var(--shadow); padding: 40px 28px; }
.maint-box .eyebrow { display: block; }
.maint-badge { display: inline-grid; place-items: center; width: 64px; height: 64px; border-radius: 20px; background: var(--accent-soft); color: var(--accent); margin-bottom: 18px; }
.maint-badge .i { width: 30px; height: 30px; }
.maint-box h1 { font-size: clamp(28px, 5vw, 36px); margin: 8px 0 12px; letter-spacing: -0.03em; }
.maint-box p { color: var(--muted); margin-bottom: 10px; }
.maint-box .maint-msg { color: var(--text); font-weight: 600; background: var(--surface-2); border-radius: 12px; padding: 12px 14px; }
.maint-admin { display: inline-block; margin-top: 14px; font-size: 14px; color: var(--muted); }

/* Villkorssidan */
.legal-body { display: grid; gap: 16px; }
.legal-body h3 { font-size: 16px; margin-top: 20px; }
.legal-body p, .legal-body li { color: var(--muted); line-height: 1.65; }
.legal-body > section > p:first-of-type { margin-top: 8px; }
.legal-body ul { margin: 8px 0 0; padding-left: 20px; display: grid; gap: 6px; }
.legal .settings-nav a .i, .legal-body h2 .i { width: 18px; height: 18px; }
.legal-body .btn .i { width: 16px; height: 16px; }
.nav-badge { display: inline-grid; place-items: center; min-width: 18px; height: 18px; padding: 0 5px; border-radius: 99px; background: var(--danger); color: #fff; font-size: 11px; font-weight: 800; line-height: 1; }
.nav-links .nav-badge { position: absolute; top: 2px; right: 2px; }
@media (min-width: 1101px) { .nav-links .nav-badge { position: static; } }
