/* AKUTBOKEN – landningssida (www.akutboken.se).
   Färger och typsnitt följer Readerns tokens (web/css/styles.css) så att
   webbplats och Reader ser ut som samma produkt. Inga externa typsnitt,
   inget JavaScript. Kontrast mot bakgrund minst 4,5:1 för all text. */

:root {
  /* Huvudfärgen och dess nyanser. Standardvärdena gäller om css/farg.css
     saknas; vid bygget skrivs farg.css från site/innehall/utseende.yml och
     ersätter dem (se tools/site-build/lib/siteContent.mjs, colorTheme). */
  --color-primary: #1b5fa8;
  --color-primary-dark: #164e8a;
  --color-primary-darker: #103965;
  --color-primary-tint: #e8eff6;
  --color-primary-tint-border: #afc7e1;
  --color-on-primary-soft: #dde7f2;
  --color-on-primary-lead: #edf2f8;
  --color-on-primary: #ffffff;
  --color-background: #f5f6f8;
  --color-surface: #ffffff;
  --color-text: #16181c;
  --color-text-muted: #5b6270;
  --color-border: #dde1e6;
  --color-focus: #ffbf47;
  --font-family-base: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Helvetica, Arial, sans-serif;
  --radius-md: 10px;
  --radius-lg: 16px;
  --wrap: 1120px;
  --gutter: 16px;
}

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

html { -webkit-text-size-adjust: 100%; scroll-behavior: smooth; }
@media (prefers-reduced-motion: reduce) { html { scroll-behavior: auto; } }

body {
  display: flex;
  flex-direction: column;
  min-height: 100vh;
  margin: 0;
  font-family: var(--font-family-base);
  font-size: 1rem;
  line-height: 1.6;
  color: var(--color-text);
  background: var(--color-background);
}

img { max-width: 100%; height: auto; }

a { color: var(--color-primary); }
a:hover { color: var(--color-primary-dark); }

:focus-visible {
  outline: 3px solid var(--color-focus);
  outline-offset: 2px;
  border-radius: 4px;
}

.wrap {
  width: 100%;
  max-width: var(--wrap);
  margin: 0 auto;
  padding: 0 var(--gutter);
}
@media (min-width: 720px) { :root { --gutter: 32px; } }

.skip-link {
  position: absolute;
  left: 8px;
  top: -100px;
  z-index: 10;
  padding: 10px 16px;
  background: var(--color-surface);
  color: var(--color-text);
  border-radius: var(--radius-md);
  font-weight: 700;
}
.skip-link:focus { top: 8px; }

main { flex: 1 0 auto; display: flex; flex-direction: column; }
main > * { width: 100%; }
main:focus { outline: none; }

/* ---- Sidhuvud ---- */

.site-header {
  background: var(--color-surface);
  border-bottom: 1px solid var(--color-border);
}
.site-header-inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  min-height: 64px;
}
.brand {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  color: var(--color-text);
  text-decoration: none;
  font-weight: 800;
  font-size: 1.2rem;
  letter-spacing: 0.02em;
}
.brand img { border-radius: 8px; display: block; }

.site-nav ul {
  display: flex;
  gap: 4px;
  margin: 0;
  padding: 0;
  list-style: none;
}
.site-nav a {
  display: inline-flex;
  align-items: center;
  min-height: 44px;
  padding: 0 14px;
  border-radius: var(--radius-md);
  color: var(--color-text);
  font-weight: 600;
  text-decoration: none;
}
.site-nav a:hover { background: var(--color-background); color: var(--color-primary); }

@media (max-width: 639px) {
  .site-header-inner { flex-wrap: wrap; padding-top: 8px; padding-bottom: 4px; gap: 4px; }
  .site-nav { width: 100%; }
  .site-nav ul { display: grid; grid-template-columns: repeat(3, 1fr); }
  .site-nav a { display: flex; justify-content: center; padding: 0 6px; }
  .nav-full { display: none; }
}

/* ---- Huvudsektion med de tre likvärdiga valen ---- */

/* Startsidan består bara av huvudsektionen: den fyller ytan mellan
   sidhuvud och sidfot. */
.hero {
  flex: 1 0 auto;
  display: flex;
  align-items: center;
  background: linear-gradient(160deg, var(--color-primary) 0%, var(--color-primary-darker) 100%);
  color: var(--color-on-primary);
  padding: 28px 0 36px;
}

/* EKG-kurvan från omslaget (webbanpassad kopia av ägarens original, se
   site/grafik-kallor/): vit linje med svart skugga, sträckt som ett band
   över hela bredden med jämn linjebredd. Ren dekoration: alt="". */
.hero-ekg {
  display: block;
  width: 100%;
  height: 88px;
  margin: -4px 0 16px;
}
.hero-edition {
  margin: 0 0 4px;
  font-size: 0.95rem;
  font-weight: 700;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--color-on-primary-soft);
}
.hero h1 {
  margin: 0 0 12px;
  font-size: clamp(2rem, 5vw, 3.25rem);
  line-height: 1.1;
  font-weight: 800;
  letter-spacing: -0.01em;
}
.hero-lead {
  margin: 0 0 32px;
  max-width: 46em;
  font-size: clamp(1.05rem, 1.6vw, 1.2rem);
  color: var(--color-on-primary-lead);
}

.choices {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 20px;
  margin: 0;
  padding: 0;
  list-style: none;
}
.choices li { display: flex; }

/* Alla tre valen har exakt samma utformning – inget val får dominera
   (ägarbeslut). Ändra aldrig utseendet på bara ett av dem.
   Radlayout på alla skärmar: ikon, rubrik och text, pil. */
.choice {
  display: flex;
  align-items: center;
  gap: 16px;
  width: 100%;
  min-height: 100%;
  padding: 20px 20px 20px 22px;
  background: var(--color-surface);
  color: var(--color-text);
  border: 1px solid rgba(255, 255, 255, 0.7);
  border-radius: 14px;
  box-shadow: 0 1px 2px rgba(9, 30, 60, 0.12), 0 8px 24px rgba(9, 30, 60, 0.16);
  text-decoration: none;
  transition: transform 0.15s ease, box-shadow 0.15s ease;
}
.choice:hover {
  color: var(--color-text);
  transform: translateY(-2px);
  box-shadow: 0 2px 4px rgba(9, 30, 60, 0.14), 0 14px 32px rgba(9, 30, 60, 0.24);
}
.choice:focus-visible { outline-offset: 4px; }
.choice-icon {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 48px;
  height: 48px;
  border-radius: 12px;
  background: var(--color-primary-tint);
  color: var(--color-primary);
  flex: none;
}
.choice-text { display: flex; flex-direction: column; gap: 2px; flex: 1; min-width: 0; }
.choice-title {
  font-size: 1.2rem;
  line-height: 1.25;
  font-weight: 700;
  letter-spacing: -0.005em;
  color: var(--color-primary-darker);
}
.choice-desc { color: var(--color-text-muted); font-size: 0.95rem; line-height: 1.4; }
.choice-arrow {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 36px;
  height: 36px;
  border-radius: 50%;
  background: var(--color-primary-tint);
  color: var(--color-primary);
  flex: none;
  transition: background-color 0.15s ease, color 0.15s ease, transform 0.15s ease;
}
.choice:hover .choice-arrow {
  background: var(--color-primary);
  color: var(--color-on-primary);
  transform: translateX(2px);
}
/* Dator och surfplatta: ikon och pil överst, rubrik och text i full bredd
   under – texterna får plats på en rad. */
@media (min-width: 760px) {
  .choice {
    display: grid;
    grid-template-columns: auto 1fr auto;
    grid-template-areas: "icon . arrow" "text text text";
    align-items: center;
    row-gap: 18px;
    padding: 22px 22px 24px;
  }
  .choice-icon { grid-area: icon; }
  .choice-arrow { grid-area: arrow; }
  .choice-text { grid-area: text; }
  .choice-title { font-size: 1.3rem; }
}
@media (prefers-reduced-motion: reduce) {
  .choice, .choice-arrow { transition: none; }
  .choice:hover, .choice:hover .choice-arrow { transform: none; }
}

/* Mobil: något tätare så att alla tre valen syns direkt. */
@media (max-width: 759px) {
  .hero { padding: 16px 0 24px; }
  .hero-edition { font-size: 0.8rem; }
  .hero h1 { font-size: clamp(1.45rem, 7vw, 2.25rem); margin-bottom: 8px; }
  .hero-lead { margin-bottom: 8px; font-size: 1rem; line-height: 1.5; }
  .hero-ekg { height: 48px; margin: 0 0 12px; }
  .choices { grid-template-columns: 1fr; grid-auto-rows: 1fr; gap: 10px; }
  .choice { gap: 12px; padding: 12px 12px 12px 14px; border-radius: 12px; }
  .choice-icon { width: 40px; height: 40px; border-radius: 10px; }
  .choice-icon svg { width: 22px; height: 22px; }
  .choice-title { font-size: 1.08rem; }
  .choice-desc { font-size: 0.88rem; }
  .choice-arrow { width: 30px; height: 30px; }
}

/* ---- Sidan Om AKUTBOKEN ---- */

.about-page p { margin: 0 0 14px; }
.back-link { margin: 0 0 12px !important; }
.back-link a { font-weight: 600; text-decoration: none; }
.back-link a:hover { text-decoration: underline; }
/* Dator: omslaget i en egen kolumn till vänster om rubrik och rutor.
   Mobil: omslaget litet bredvid rubriken, rutorna under. Utan omslag tar
   rubrik och rutor hela bredden. */
.about-top {
  display: grid;
  grid-template-columns: 200px minmax(0, 1fr);
  grid-template-areas: "cover head" "cover boxes";
  align-items: start;
  gap: 20px 32px;
}
.about-top:not(:has(.cover)) { grid-template-columns: minmax(0, 1fr); grid-template-areas: "head" "boxes"; }
.about-top h1 { grid-area: head; }
.about-top .cover { grid-area: cover; }
.about-top .about-grid { grid-area: boxes; }
.about-page h1 {
  margin: 0;
  font-size: clamp(1.8rem, 4vw, 2.4rem);
  line-height: 1.2;
  color: var(--color-primary-darker);
}
.cover { margin: 0; flex: none; }
.cover img {
  display: block;
  width: 200px;
  border-radius: 6px;
  box-shadow: 0 8px 24px rgba(9, 30, 60, 0.28);
}
.about-item h2 {
  margin: 0 0 8px;
  font-size: 1.15rem;
  line-height: 1.3;
}
.about-item p:last-child { margin-bottom: 0; }
.about-page .products-heading, .about-page .org h2 {
  margin: 40px 0 16px;
  font-size: 1.2rem;
  line-height: 1.3;
}
.about-page .org h2 { margin: 0 0 8px; }

.about-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 24px;
  /* Varje ruta är så hög som sitt innehåll – den kortare får ingen tom yta. */
  align-items: start;
}
.about-item {
  padding: 24px;
  background: var(--color-surface);
  border: 1px solid var(--color-border);
  border-radius: var(--radius-lg);
}
.about-item p + h2 { margin-top: 20px; }
.about-item h3 { margin: 20px 0 8px; font-size: 1.05rem; line-height: 1.3; }
.about-item ul { margin: 0 0 14px; padding-left: 1.2em; }
.about-item li { margin-bottom: 4px; }

/* Viktigt vid användning: diskret ruta med markering i kanten. */
.notice {
  margin-top: 24px;
  padding: 16px 20px;
  background: var(--color-primary-tint);
  border: 1px solid var(--color-primary-tint-border);
  border-left: 4px solid var(--color-primary);
  border-radius: var(--radius-lg);
}
.about-page .notice h2 { margin: 0 0 4px; font-size: 1rem; line-height: 1.3; }
.notice p { margin: 0; }

/* Utdrag ur boken (PDF): samma ruta som informationsrutorna. */
.excerpt {
  margin-top: 24px;
  padding: 24px;
  background: var(--color-surface);
  border: 1px solid var(--color-border);
  border-radius: var(--radius-lg);
}
.about-page .excerpt h2 { margin: 0 0 8px; font-size: 1.15rem; line-height: 1.3; }

.products {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 16px;
  margin: 0 0 20px;
  padding: 0;
  list-style: none;
}
.product {
  display: grid;
  grid-template-rows: auto auto 1fr;
  gap: 4px;
  padding: 20px;
  background: var(--color-surface);
  border: 1px solid var(--color-border);
  border-radius: var(--radius-lg);
}
.product-name { font-weight: 700; }
.product-price { font-size: 1.6rem; font-weight: 800; color: var(--color-primary-darker); }
.product-desc { color: var(--color-text-muted); font-size: 0.95rem; }

.facts { margin: 0 0 28px; padding-left: 1.2em; }
.facts li { margin-bottom: 4px; }

.org {
  padding: 20px 24px;
  margin-bottom: 28px;
  background: var(--color-primary-tint);
  border: 1px solid var(--color-primary-tint-border);
  border-radius: var(--radius-lg);
}
.org p { margin: 0; }

.section-actions { display: flex; flex-wrap: wrap; gap: 12px; margin: 0; }
.button {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  min-height: 46px;
  padding: 0 22px;
  border: 1px solid transparent;
  border-radius: 10px;
  background: var(--color-primary);
  color: var(--color-on-primary);
  font-weight: 600;
  letter-spacing: 0.005em;
  text-decoration: none;
  box-shadow: 0 1px 2px rgba(9, 30, 60, 0.16);
  transition: background-color 0.15s ease, box-shadow 0.15s ease;
}
.button:hover { background: var(--color-primary-dark); color: var(--color-on-primary); box-shadow: 0 4px 12px rgba(9, 30, 60, 0.22); }
@media (prefers-reduced-motion: reduce) { .button { transition: none; } }

@media (max-width: 759px) {
  .about-top {
    grid-template-columns: minmax(0, 1fr) auto;
    grid-template-areas: "head cover" "boxes boxes";
    align-items: center;
    gap: 16px;
  }
  .cover img { width: 110px; }
  .about-grid, .products { grid-template-columns: 1fr; }
  .about-item { padding: 20px; }
  .button { flex: 1 1 100%; }
}

/* ---- Juridiska sidor ---- */

.page { padding-top: 32px; padding-bottom: 56px; }
.legal {
  max-width: 760px;
  margin: 0 auto;
  padding: 32px;
  background: var(--color-surface);
  border: 1px solid var(--color-border);
  border-radius: var(--radius-lg);
}
@media (max-width: 759px) {
  .page { padding-top: 16px; padding-bottom: 32px; }
  .legal { padding: 20px 16px; }
}
.legal h1 {
  margin: 0 0 8px;
  font-size: clamp(1.6rem, 4vw, 2.1rem);
  line-height: 1.2;
  color: var(--color-primary-darker);
}
.legal h2 { margin: 28px 0 8px; font-size: 1.2rem; line-height: 1.3; color: var(--color-primary-darker); }
.legal p, .legal ul, .legal ol { margin: 0 0 12px; }
.legal li { margin-bottom: 4px; }
.legal table { width: 100%; border-collapse: collapse; margin: 8px 0 16px; font-size: 0.95rem; }
.legal th, .legal td { padding: 8px 10px 8px 0; text-align: left; vertical-align: top; border-bottom: 1px solid var(--color-border); }
.legal th { font-weight: 700; }
.legal .version { color: var(--color-text-muted); }
.legal .small, .legal-source { font-size: 0.92rem; color: var(--color-text-muted); }
.legal-source { margin-top: 24px !important; }
.legal .form { margin-top: 24px; padding: 16px 20px; border: 1px solid var(--color-border); border-radius: var(--radius-md); }
.legal .form h2 { margin-top: 0; }
.legal .line { border-bottom: 1px solid #9aa1ab; height: 20px; margin: 2px 0 12px; }
.legal-box, .legal-note {
  margin: 24px 0 0;
  padding: 16px 20px;
  background: var(--color-primary-tint);
  border: 1px solid var(--color-primary-tint-border);
  border-radius: var(--radius-md);
}
.legal-note { margin: 8px 0 20px; }
.legal-box p { margin: 0 0 6px; }
.legal-box p:last-child { margin: 0; }
.legal-actions { margin: 16px 0 !important; }

/* Breda tabeller (integritetspolicyn) rullar i sidled inom rutan i stället
   för att göra hela sidan bredare på mobil. */
@media (max-width: 759px) {
  .legal table { display: block; overflow-x: auto; }
}

/* ---- Sidfot ---- */

/* Diskret sidfot: företagsuppgifter, kontakt och juridiska länkar. */
.site-footer {
  flex: none;
  background: var(--color-surface);
  border-top: 1px solid var(--color-border);
  color: var(--color-text-muted);
  padding: 16px 0;
  font-size: 0.875rem;
  line-height: 1.6;
}
.footer-inner {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 8px 24px;
}
.footer-company { margin: 0; }
.site-footer a { color: var(--color-primary); }
.site-footer a:hover { color: var(--color-primary-dark); }
.footer-links {
  display: flex;
  flex-wrap: wrap;
  gap: 4px 16px;
  margin: 0;
  padding: 0;
  list-style: none;
}
.footer-links a { display: inline-block; padding: 4px 0; }

@media print {
  .site-header, .site-footer, .skip-link, .hero .choices { display: none; }
  .legal { border: 0; padding: 0; }
}
