@font-face {
  font-family: 'Big Shoulders Display';
  src: url('fonts/BigShouldersDisplay_800ExtraBold.ttf') format('truetype');
  font-weight: 800; font-style: normal; font-display: swap;
}
@font-face {
  font-family: 'Barlow';
  src: url('fonts/Barlow_500Medium.ttf') format('truetype');
  font-weight: 500; font-style: normal; font-display: swap;
}
@font-face {
  font-family: 'Barlow';
  src: url('fonts/Barlow_600SemiBold.ttf') format('truetype');
  font-weight: 600; font-style: normal; font-display: swap;
}

/* Färgerna är appens (src/constants/theme.ts): mörkt tema här, ljust tema längre ner */
:root {
  --bg: #0e151e; --card: #131c27; --line: #25334a; --text: #eef2f4; --muted: #9ba8b5;
  --accent: #e0764f; --link: #e88a66; --horse-filter: none;
  --m-bg: #0e151e; --m-card: #131c27; --m-line: #25334a; --m-text: #eef2f4; --m-muted: #9ba8b5; --m-pill: #233044; --m-water: #1d3042; --m-bezel: #0b1118; --stage: #0a1018;
  --display: 'Big Shoulders Display', 'Arial Narrow', Impact, sans-serif;
  --body: 'Barlow', system-ui, -apple-system, 'Segoe UI', Roboto, sans-serif;
}
@media (prefers-color-scheme: light) {
  :root {
    --bg: #f3f5f7; --card: #ffffff; --line: #d9dfe5; --text: #0e1620; --muted: #5b6772;
    --link: #b4512b; --horse-filter: brightness(0);
    --m-bg: #f3f5f7; --m-card: #ffffff; --m-line: #d9dfe5; --m-text: #0e1620; --m-muted: #5b6772; --m-pill: #e3e8ed; --m-water: #cfe2ee; --m-bezel: #0e1620; --stage: #e3e8ed;
  }
}
/* Eget val med knappen i sidhuvudet (theme.js) går före enhetens inställning */
:root[data-theme='light'] {
  --bg: #f3f5f7; --card: #ffffff; --line: #d9dfe5; --text: #0e1620; --muted: #5b6772;
  --link: #b4512b; --horse-filter: brightness(0);
  --m-bg: #f3f5f7; --m-card: #ffffff; --m-line: #d9dfe5; --m-text: #0e1620; --m-muted: #5b6772; --m-pill: #e3e8ed; --m-water: #cfe2ee; --m-bezel: #0e1620; --stage: #e3e8ed;
}
:root[data-theme='dark'] {
  --bg: #0e151e; --card: #131c27; --line: #25334a; --text: #eef2f4; --muted: #9ba8b5;
  --link: #e88a66; --horse-filter: none;
  --m-bg: #0e151e; --m-card: #131c27; --m-line: #25334a; --m-text: #eef2f4; --m-muted: #9ba8b5; --m-pill: #233044; --m-water: #1d3042; --m-bezel: #0b1118; --stage: #0a1018;
}

* { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; }
body {
  margin: 0; background: var(--bg); color: var(--text);
  font-family: var(--body); font-weight: 500; font-size: 17px; line-height: 1.6;
}
.wrap { max-width: 760px; margin: 0 auto; padding: 0 20px; }

a { color: var(--link); text-underline-offset: 3px; }
a:hover { text-decoration-thickness: 2px; }
a:focus-visible { outline: 2px solid var(--accent); outline-offset: 3px; border-radius: 4px; }

/* Ordmärke */
.brand { display: inline-flex; align-items: center; gap: 10px; text-decoration: none; color: var(--text); }
.brand-mark { height: 30px; width: auto; display: block; filter: var(--horse-filter); }
.word {
  font-family: var(--display); font-weight: 800; font-size: 26px; line-height: 1;
  letter-spacing: 0.04em; text-transform: uppercase; color: var(--text);
}
.accent { color: var(--accent); }

/* Sidhuvud */
/* Följer med överst när man rullar */
.site-header {
  position: sticky; top: 0; z-index: 10; padding: 12px 0;
  background: var(--bg); border-bottom: 1px solid var(--line);
}
@supports (backdrop-filter: blur(8px)) or (-webkit-backdrop-filter: blur(8px)) {
  .site-header {
    background: color-mix(in srgb, var(--bg) 82%, transparent);
    -webkit-backdrop-filter: blur(10px); backdrop-filter: blur(10px);
  }
}
.site-header .wrap { display: flex; align-items: center; justify-content: space-between; gap: 16px; }
.site-header.home .wrap { justify-content: flex-end; }
.tools { display: flex; align-items: center; gap: 8px; }
.tool {
  display: inline-flex; align-items: center; justify-content: center; gap: 8px; height: 44px; min-width: 44px;
  padding: 0 14px; border: 1px solid var(--line); background: transparent; color: var(--text);
  border-radius: 12px; font: inherit; font-size: 15px; font-weight: 600; text-decoration: none; cursor: pointer;
}
.tool:hover { border-color: var(--muted); }
.tool:focus-visible { outline: 2px solid var(--accent); outline-offset: 2px; border-radius: 12px; }
.theme-btn { padding: 0; }
.theme-btn[hidden] { display: none; }
.i-line { fill: none; stroke: currentColor; stroke-width: 1.7; stroke-linecap: round; stroke-linejoin: round; }
.i-fill { fill: currentColor; }
.flag { display: block; border-radius: 3px; box-shadow: 0 0 0 1px var(--line); }

/* Innehåll */
main { padding: 24px 0 48px; }
h1 {
  font-family: var(--display); font-weight: 800; font-size: 40px; line-height: 1.05;
  letter-spacing: 0.02em; text-transform: uppercase; margin: 8px 0 12px;
}
h1::after { content: ''; display: block; width: 48px; height: 3px; background: var(--accent); margin-top: 14px; }
h2 { font-family: var(--body); font-weight: 600; font-size: 22px; line-height: 1.3; margin: 40px 0 8px; }
h3 { font-family: var(--body); font-weight: 600; font-size: 17px; margin: 24px 0 4px; }
p { margin: 0 0 14px; }
ul { margin: 0 0 14px; padding-left: 22px; }
li { margin-bottom: 6px; }
ol { margin: 0 0 14px; padding-left: 22px; }
strong { font-weight: 600; }
.updated { color: var(--muted); font-size: 15px; margin-bottom: 20px; }
.lead { font-size: 20px; line-height: 1.5; margin-bottom: 8px; }

/* Startsida */
.hero { padding: 24px 0 8px; }
.hero-brand { display: flex; align-items: center; gap: 16px; margin-bottom: 20px; }
.hero-brand .brand-mark { height: 64px; }
.hero-brand h1 { margin: 0; font-size: 56px; letter-spacing: 0.04em; }
.hero-brand h1::after { display: none; }
.rule { width: 48px; height: 3px; background: var(--accent); margin: 0 0 20px; }
.soon { color: var(--muted); margin-top: 12px; }

/* Kort */
.card {
  background: var(--card); border: 1px solid var(--line); border-radius: 14px;
  padding: 18px 20px; margin: 0 0 12px;
}
.card h3 { margin: 0 0 4px; }
.card p { margin: 0; color: var(--muted); }
.cards { margin: 24px 0; }

/* Utkastruta */
.draft {
  background: var(--card); border: 1px solid var(--accent); border-radius: 14px;
  padding: 14px 18px; margin: 0 0 20px; font-weight: 600;
}

/* Tabeller */
.table-wrap { overflow-x: auto; margin: 0 0 18px; border: 1px solid var(--line); border-radius: 14px; background: var(--card); }
table { border-collapse: collapse; width: 100%; min-width: 560px; font-size: 15px; line-height: 1.5; }
th, td { text-align: left; vertical-align: top; padding: 10px 14px; border-bottom: 1px solid var(--line); }
tr:last-child td { border-bottom: 0; }
th { font-weight: 600; color: var(--muted); font-size: 14px; }

/* Sidfot */
.site-footer { border-top: 1px solid var(--line); padding: 24px 0 40px; color: var(--muted); font-size: 15px; text-align: center; }
.site-footer ul { list-style: none; padding: 0; margin: 0 0 14px; display: flex; flex-wrap: wrap; gap: 6px 20px; justify-content: center; }
.site-footer li { margin: 0; }
.site-footer p { margin: 0; }

@media (max-width: 420px) {
  body { font-size: 16px; }
  h1 { font-size: 34px; }
  .hero-brand h1 { font-size: 44px; }
  .hero-brand .brand-mark { height: 52px; }
  .lead { font-size: 18px; }
}

/* Kort version överst i policyn */
.summary { border: 1px solid var(--line); background: var(--card); border-radius: 14px; padding: 16px 18px; margin: 20px 0; }
.summary h2 { margin: 0 0 8px; font-size: 1.1rem; }
.summary ul { margin: 0; }

/* ============ Startsidan ============ */
.wrap.wide { max-width: 1040px; }
.home-page .site-header .brand .brand-mark { height: 34px; }
.home-page .site-header .word { font-size: 28px; }
.eyebrow {
  font-size: 14px; font-weight: 600; letter-spacing: 0.12em; text-transform: uppercase;
  color: var(--link); margin: 0 0 10px;
}
.hero2 { display: grid; grid-template-columns: 1.1fr 0.9fr; gap: 40px; align-items: center; padding: 32px 0 56px; }
h1.big { font-size: 68px; line-height: 0.98; margin: 0 0 20px; }
h1.big::after { display: none; }
.hero2 .lead { font-size: 21px; max-width: 30em; margin-bottom: 24px; }
.stores { display: flex; flex-wrap: wrap; align-items: center; gap: 10px; margin: 0 0 18px; }
.stores-label { color: var(--muted); }
.store {
  display: inline-flex; align-items: center; min-height: 46px;
  border: 1px solid var(--line); background: transparent; border-radius: 12px;
  padding: 0 20px; font-size: 15px; font-weight: 600;
}
.trust { list-style: none; padding: 0; margin: 0; display: flex; flex-wrap: wrap; gap: 8px 22px; color: var(--muted); font-size: 16px; }
.trust li { margin: 0; padding-left: 18px; position: relative; }
.trust li::before { content: ''; position: absolute; left: 0; top: 0.62em; width: 8px; height: 8px; border-radius: 50%; background: var(--accent); }

/* Telefonen och exempelkorten följer temat, med appens egna färger i mörkt och ljust läge */
.hero2-art { display: flex; justify-content: center; }
/* Sidan har samma bakgrund som appen, så telefonen står på en något mörkare (ljust läge: något ljusare grå) yta med kantlinje */
.hero2-art { padding: 40px 24px; background: var(--stage); border: 1px solid var(--line); border-radius: 28px; }
.phone {
  width: 300px; background: var(--m-bg); color: var(--m-text); border: 1px solid var(--m-line); border-radius: 34px;
  padding: 22px 16px 20px; box-shadow: 0 30px 60px -20px rgba(0, 0, 0, 0.55), 0 0 0 6px var(--m-bezel);
}
.phone-top { padding: 4px 6px 12px; }
.phone-title { font-family: var(--display); font-weight: 800; font-size: 26px; letter-spacing: 0.03em; text-transform: uppercase; }
.p-card { background: var(--m-card); border: 1px solid var(--m-line); border-radius: 14px; padding: 14px; margin-bottom: 12px; }
.p-list { padding: 4px 14px; }
.p-row { display: flex; align-items: center; justify-content: space-between; gap: 10px; margin-bottom: 8px; }
.p-grow { flex: 1; display: flex; flex-direction: column; min-width: 0; }
.p-strong { font-weight: 600; }
.p-muted { color: var(--m-muted); }
.p-small { font-size: 13.5px; line-height: 1.35; }
.p-total { font-weight: 600; font-size: 17px; margin-top: 6px; }
.p-horse { display: flex; align-items: center; gap: 12px; padding: 11px 0; border-top: 1px solid var(--m-line); }
.p-horse:first-child { border-top: 0; }
.dot { width: 12px; height: 12px; border-radius: 50%; flex: none; }
.dot-a, .bar-a { background: #e0764f; fill: #e0764f; }
.dot-b, .bar-b { background: #5aa9c7; fill: #5aa9c7; }
.bar-0 { fill: var(--m-line); }
.chart { width: 100%; height: auto; display: block; }
.chart .day { fill: var(--m-muted); font-family: var(--body); font-size: 11px; font-weight: 600; }

.section-head { font-size: 30px; margin: 8px 0 8px; }
.feature { display: grid; grid-template-columns: 1fr 1fr; gap: 48px; align-items: center; padding: 36px 0; border-top: 1px solid var(--line); }
.feature.flip .feature-text { order: 2; }
.feature-h { font-family: var(--display); font-weight: 800; font-size: 34px; line-height: 1.05; letter-spacing: 0.02em; text-transform: uppercase; margin: 0 0 12px; }
.feature-text p { color: var(--muted); font-size: 18px; }
.feature-text .eyebrow { color: var(--link); font-size: 14px; }
.ticks { list-style: none; padding: 0; margin: 14px 0 0; }
.ticks li { position: relative; padding-left: 26px; margin-bottom: 8px; }
.ticks li::before { content: ''; position: absolute; left: 4px; top: 0.45em; width: 10px; height: 6px; border-left: 2px solid var(--accent); border-bottom: 2px solid var(--accent); transform: rotate(-45deg); }
.feature-art { display: flex; justify-content: center; }
.mock {
  width: 100%; max-width: 360px; background: var(--m-card); color: var(--m-text); border: 1px solid var(--m-line);
  border-radius: 14px; padding: 18px; box-shadow: 0 24px 48px -24px rgba(0, 0, 0, 0.5);
}
.route { width: 100%; height: auto; display: block; border-radius: 12px; margin: 4px 0 12px; }
.route-bg { fill: var(--m-bg); }
.route-water { fill: var(--m-water); }
.route-line { fill: none; stroke: #e0764f; stroke-width: 4; stroke-linecap: round; stroke-linejoin: round; }
.route-dot { fill: var(--m-text); stroke: #e0764f; stroke-width: 3; }
.stats { display: grid; grid-template-columns: repeat(3, 1fr); gap: 8px; }
.stats div { display: flex; flex-direction: column; }
.stat { font-weight: 600; font-size: 20px; }
.score { font-family: var(--display); font-weight: 800; font-size: 34px; color: #e0764f; line-height: 1; }
.quote { margin: 6px 0 12px; padding: 10px 12px; background: var(--m-bg); border-left: 3px solid #e0764f; border-radius: 8px; font-size: 15.5px; line-height: 1.45; }
.suggest { border: 1px solid #e0764f; background: rgba(224, 118, 79, 0.13); border-radius: 12px; padding: 12px 14px; }
.suggest ul { margin: 6px 0 0; padding-left: 20px; font-size: 15.5px; }
.suggest li { margin-bottom: 2px; }
.shift { display: flex; align-items: center; justify-content: space-between; padding: 10px 0; border-top: 1px solid var(--m-line); }
.shift:first-of-type { margin-top: 8px; }
.pill { background: var(--m-pill); border-radius: 999px; padding: 3px 12px; font-size: 14.5px; font-weight: 600; }
.pill-open { background: transparent; border: 1px dashed #e0764f; color: var(--link); }
.bubble { margin-top: 12px; background: rgba(224, 118, 79, 0.16); border-radius: 14px 14px 14px 4px; padding: 10px 12px; font-size: 15.5px; display: flex; flex-direction: column; }

.safe { border-top: 1px solid var(--line); padding: 40px 0 8px; }
.safe-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 12px; margin-top: 16px; }
.safe-grid .card { margin: 0; }
.cta { text-align: center; padding: 48px 0 12px; }
.cta h2 { margin: 0 0 6px; font-size: 26px; }
.cta p { color: var(--muted); }
.button {
  display: inline-flex; align-items: center; justify-content: center; min-height: 46px;
  background: var(--accent); border: 1px solid var(--accent); color: #0e1620; font-size: 15px; font-weight: 600; text-decoration: none;
  padding: 0 20px; border-radius: 12px; margin-top: 6px;
}
.button:hover { filter: brightness(1.06); }
.button:focus-visible { outline: 2px solid var(--accent); outline-offset: 3px; }
.mock-note { text-align: center; color: var(--muted); font-size: 14px; margin: 18px 0 0; }

@media (max-width: 820px) {
  .hero2 { grid-template-columns: 1fr; gap: 32px; padding-top: 12px; }
  .hero2-art { padding: 32px 8px; }
  h1.big { font-size: 48px; }
  .feature { grid-template-columns: 1fr; gap: 24px; padding: 28px 0; }
  .feature.flip .feature-text { order: 0; }
  .feature-h { font-size: 28px; }
  .safe-grid { grid-template-columns: 1fr; }
  .section-head { font-size: 24px; }
}
