/* Gemensam grund för webbplatsens undersidor (stilsidor m.m.). Byggs till public/css/site.css av build.py.
   Alltid ljust läge; knappen i sidhuvudet byter till mörkt (data-theme på <html>, sparas i localStorage).
   Samma färger och typsnitt som appen och startsidan (constants/theme.ts, marketing/website/index.html). */
:root {
  color-scheme: light;
  --green: #1E4F49;
  --green-deep: #163B37;
  --green-ink: #0C2421;
  --gold: #D4A26A;
  --gold-deep: #8A6A3F;
  --cream: #FCEACC;

  --bg: #FBF6EE;
  --surface: #FFFFFF;
  --paper: #F8F2E7;
  --paper-line: #EDE3D1;
  --text: #050C0B;
  --text-2: #3E4A48;
  --muted: #6E7A78;
  --line: rgba(5, 12, 11, 0.1);
  --tint: #1E4F49;
  --accent: #8A6A3F;
  --chip: #FCEACC;
  --chip-ink: #1E4F49;

  --radius: 20px;
  --shadow: 0 1px 2px rgba(5, 12, 11, 0.05), 0 12px 32px rgba(5, 12, 11, 0.07);
  --wrap: 1200px;
  --gutter: clamp(16px, 4vw, 40px);
}

/* Mörkt läge: bara när besökaren själv valt det med knappen (sparas i localStorage 'theme').
   Utan eget val är sidan alltid ljus, oavsett telefonens eller datorns inställning. */
:root[data-theme="dark"] {
  color-scheme: dark;
  --bg: #0E1917;
  --surface: #15231F;
  --paper: #1A2A26;
  --paper-line: rgba(255, 255, 255, 0.08);
  --text: #F1ECE3;
  --text-2: #C4CDCA;
  --muted: #8E9C98;
  --line: rgba(255, 255, 255, 0.1);
  --tint: #9BCBC0;
  --accent: #D4A26A;
  --chip: #233833;
  --chip-ink: #E2B98A;
  --shadow: 0 1px 2px rgba(0, 0, 0, 0.3), 0 12px 32px rgba(0, 0, 0, 0.35);
}

* { box-sizing: border-box; }
html { scroll-behavior: smooth; -webkit-text-size-adjust: 100%; }
body {
  margin: 0; background: var(--bg); color: var(--text);
  font-family: 'Lora', Georgia, 'Times New Roman', serif; font-size: 18px; line-height: 1.65;
  -webkit-font-smoothing: antialiased; text-rendering: optimizeLegibility; overflow-x: hidden;
}
img { max-width: 100%; display: block; }
a { color: var(--tint); }
h1, h2, h3 { font-weight: 600; letter-spacing: -0.015em; margin: 0; text-wrap: balance; }
p { margin: 0; text-wrap: pretty; }
.wrap { max-width: var(--wrap); margin: 0 auto; padding: 0 var(--gutter); }
:focus-visible { outline: 2px solid var(--gold); outline-offset: 3px; border-radius: 6px; }
.ico { width: 1em; height: 1em; flex: none; }
.skip { position: absolute; left: -999px; top: 8px; background: var(--surface); padding: 8px 14px; border-radius: 10px; z-index: 100; }
.skip:focus { left: 8px; }

/* Appens namn som i logotypen */
.wm { white-space: nowrap; font-weight: 400; letter-spacing: 0; }
.wm i { font-style: italic; font-weight: 400; }
.wm b { font-weight: 700; letter-spacing: 0.08em; }

/* --- Sidhuvud --- */
.gh {
  position: sticky; top: 0; z-index: 50; background: color-mix(in srgb, var(--bg) 92%, transparent);
  backdrop-filter: blur(14px) saturate(1.2); -webkit-backdrop-filter: blur(14px) saturate(1.2);
  border-bottom: 1px solid var(--line); padding-top: env(safe-area-inset-top);
}
.gh .nav { display: flex; align-items: center; gap: 28px; height: 72px; }
.brand { display: flex; align-items: center; gap: 12px; text-decoration: none; font-size: 21px; margin-right: auto; color: var(--tint); }
.brand img { width: 36px; height: 36px; }
.nav-links { display: flex; gap: 26px; }
.nav-links a { text-decoration: none; font-size: 16px; color: var(--text-2); }
.nav-links a:hover, .nav-links a[aria-current] { color: var(--tint); }
.nav-links a[aria-current] { font-weight: 700; }
.lang { display: flex; border: 1px solid var(--line); border-radius: 999px; padding: 3px; }
.lang a, .lang span {
  font-size: 13px; font-weight: 700; letter-spacing: 0.06em; padding: 4px 11px; border-radius: 999px;
  text-decoration: none; color: var(--muted);
}
.lang [aria-current] { background: var(--green); color: var(--cream); }
.nav-cta {
  text-decoration: none; font-weight: 700; font-size: 15px; padding: 10px 20px; border-radius: 999px;
  background: var(--green); color: var(--cream);
}
.nav-cta:hover { background: var(--green-deep); }

/* Knappen för ljust/mörkt läge: visar läget man byter till */
.theme-toggle {
  display: inline-flex; align-items: center; justify-content: center; width: 40px; height: 40px; flex: none;
  border: 1px solid var(--line); border-radius: 50%; background: transparent; color: var(--tint); cursor: pointer; font-size: 22px; padding: 0;
}
.theme-toggle:hover { border-color: var(--tint); }
.theme-toggle .to-light { display: none; }
:root[data-theme="dark"] .theme-toggle .to-light { display: block; }
:root[data-theme="dark"] .theme-toggle .to-dark { display: none; }

/* --- Stilsidans topp --- */
.style-hero { color: var(--cream);
  background: radial-gradient(60% 90% at 88% 0%, rgba(212, 162, 106, 0.18) 0%, rgba(212, 162, 106, 0) 60%),
              radial-gradient(130% 150% at 80% 0%, #24605A 0%, var(--green-deep) 45%, var(--green-ink) 100%); }
.style-hero .wrap { padding-top: 26px; padding-bottom: clamp(48px, 6vw, 84px); }
.crumbs { font-size: 14px; opacity: 0.78; margin-bottom: clamp(28px, 5vw, 56px); }
.crumbs ol { list-style: none; margin: 0; padding: 0; display: flex; flex-wrap: wrap; gap: 6px; }
.crumbs li + li::before { content: "›"; margin-right: 6px; opacity: 0.7; }
.crumbs a { color: var(--cream); }
.hero-grid { display: flex; flex-wrap: wrap; gap: 48px; align-items: center; }
.hero-text { flex: 1 1 560px; min-width: 0; }
.kicker { margin: 0 0 16px; font-size: 13px; letter-spacing: 0.22em; color: var(--gold); font-weight: 700; text-transform: uppercase; }
.style-hero h1 { font-size: clamp(44px, 7vw, 92px); line-height: 1; margin-bottom: 10px;
  /* Långa ord ("Dekonstruktivism") avstavas på smala telefoner i stället för att sticka ut */
  -webkit-hyphens: auto; hyphens: auto; overflow-wrap: break-word; }
.aka { margin: 0 0 26px; font-style: italic; font-size: 19px; opacity: 0.72; }
.hero-lead { font-size: clamp(18px, 1.7vw, 21px); line-height: 1.65; max-width: 640px; opacity: 0.94; }
.hero-actions { display: flex; flex-wrap: wrap; gap: 10px; margin-top: 30px; }
.btn { display: inline-flex; align-items: center; gap: 8px; text-decoration: none; padding: 13px 22px; border-radius: 999px; font-weight: 700; font-size: 16px; }
.btn-gold { background: var(--gold); color: var(--green-ink); }
.btn-gold:hover { background: #E0B27E; }
.btn-ghost { color: var(--cream); border: 1px solid rgba(252, 234, 204, 0.35); font-weight: 600; }
.btn-ghost:hover { border-color: var(--cream); }
/* Stilikonen i ett välvt fönster – en enkel karm: en tunn guldlinje innanför kanten */
.arch {
  flex: 0 0 auto; margin: 0 auto; width: 270px; height: 312px; border-radius: 999px 999px 24px 24px;
  background: #F8F2E7; display: flex; align-items: center; justify-content: center; color: var(--green); font-size: 220px;
  box-shadow: inset 0 0 0 12px #F8F2E7, inset 0 0 0 13.5px rgba(138, 106, 63, 0.55), 0 24px 60px rgba(0, 0, 0, 0.3);
}

/* --- Artikel och sidospalt --- */
.body { display: flex; flex-wrap: wrap; gap: 56px; align-items: stretch; padding-top: 56px; padding-bottom: 64px; }
.article { flex: 999 1 560px; min-width: 0; }
.aside { flex: 1 1 280px; min-width: 0; display: flex; flex-direction: column; gap: 18px; }
.sec { scroll-margin-top: 96px; }
.sec + .sec { margin-top: 64px; }
.sec-title { margin: 0 0 22px; font-size: 22px; letter-spacing: 0.08em; color: var(--tint); font-weight: 700; text-transform: uppercase; }
.sec-title .n { font-style: italic; font-weight: 400; letter-spacing: 0; text-transform: none; opacity: 0.6; margin-right: 4px; }
.prose { font-size: 18px; line-height: 1.75; color: var(--text-2); max-width: 720px; }
.prose p + p { margin-top: 18px; }
.prose strong { color: var(--text); }

.traits { list-style: none; margin: 0; padding: 0; display: grid; grid-template-columns: repeat(auto-fit, minmax(220px, 1fr)); gap: 14px; }
.traits li { background: var(--surface); border-radius: 18px; padding: 20px; box-shadow: var(--shadow); font-size: 16px; line-height: 1.55; color: var(--text); }
.traits li { position: relative; padding-left: 50px; }
.traits .n { position: absolute; left: 20px; top: 21px; font-style: italic; color: var(--accent); font-size: 16px; }

.clue { display: flex; gap: 18px; align-items: flex-start; background: var(--paper); border: 1px solid var(--paper-line); border-left: 4px solid var(--gold); border-radius: 18px; padding: 22px 24px; }
.clue .ico { font-size: 30px; color: var(--accent); margin-top: 2px; }
.clue p { font-size: 18px; line-height: 1.7; color: var(--text-2); }
.clue strong { color: var(--text); }
.facade { display: grid; grid-template-columns: 236px 1fr; gap: 28px; align-items: center; margin: 20px 0 0; padding: 24px; background: var(--surface); border: 1px solid var(--line); border-radius: 24px; }
.facade-art { position: relative; width: 236px; height: 272px; border-radius: 999px 999px 22px 22px; background: #F8F2E7; color: #1E4F49;
  box-shadow: inset 0 0 0 9px #F8F2E7, inset 0 0 0 10.5px rgba(138, 106, 63, 0.55); }
.facade-svg { position: absolute; left: 22px; right: 22px; top: 44px; aspect-ratio: 1; }
.facade-svg > svg { display: block; width: 100%; height: 100%; }
.pin, .pin-n { display: inline-flex; align-items: center; justify-content: center; width: 21px; height: 21px; border-radius: 50%; background: var(--gold-deep); color: #fff; font: 700 11px/1 system-ui, sans-serif; flex: none; }
.pin { position: absolute; transform: translate(-50%, -50%); box-shadow: 0 0 0 2.5px #F8F2E7, 0 2px 6px rgba(0, 0, 0, 0.25); }
.facade figcaption .box-label { margin-bottom: 12px; }
.facade-key { list-style: none; margin: 0; padding: 0; display: grid; gap: 10px; }
.facade-key li { display: flex; gap: 12px; align-items: center; font-size: 17px; line-height: 1.4; color: var(--text); }

/* Stilen i tiden: en remsa med alla stilar i tidsordning, sidans stil i mitten */
.tl-band { background: var(--green-ink); color: var(--cream); padding: 20px 0 22px; }
.tl-head { display: flex; align-items: center; justify-content: space-between; gap: 16px; margin-bottom: 14px; }
.tl-label { font-size: 12px; font-weight: 700; letter-spacing: 0.16em; text-transform: uppercase; color: var(--gold); }
.tl-hint { margin-left: 14px; font-size: 13px; letter-spacing: 0.02em; text-transform: none; font-weight: 400; font-style: italic; color: rgba(252, 234, 204, 0.6); }
.tl-arrows { display: flex; gap: 8px; }
.tl-arrows button { width: 36px; height: 36px; border-radius: 50%; border: 1px solid rgba(252, 234, 204, 0.3); background: transparent; color: var(--cream); font: inherit; font-size: 22px; line-height: 1; cursor: pointer; padding: 0 0 3px; }
.tl-arrows button:hover { border-color: var(--gold); color: var(--gold); }
.tl-strip { overflow-x: auto; scrollbar-width: none; cursor: grab; -webkit-overflow-scrolling: touch; outline: none;
  -webkit-mask-image: linear-gradient(90deg, transparent 0, #000 var(--gutter), #000 calc(100% - var(--gutter)), transparent 100%);
          mask-image: linear-gradient(90deg, transparent 0, #000 var(--gutter), #000 calc(100% - var(--gutter)), transparent 100%); }
.tl-strip::-webkit-scrollbar { display: none; }
.tl-strip.dragging { cursor: grabbing; }
.tl-strip.dragging a { pointer-events: none; }
.tl-strip ol { list-style: none; margin: 0; padding: 4px var(--gutter) 6px; display: flex; align-items: stretch; gap: 8px; width: max-content; position: relative; }
.tl-strip ol::before { content: ""; position: absolute; left: var(--gutter); right: var(--gutter); top: 50%; height: 1px; background: rgba(212, 162, 106, 0.35); }
.tl-strip li { position: relative; flex: none; display: flex; }
.tl-era { align-items: center; padding: 0 6px 0 14px; }
.tl-era span { font-size: 12px; font-weight: 700; letter-spacing: 0.14em; text-transform: uppercase; color: var(--gold); background: var(--green-ink); padding: 4px 8px; writing-mode: horizontal-tb; white-space: nowrap; }
.tl-item { display: flex; align-items: center; gap: 10px; padding: 8px 14px 8px 8px; border-radius: 14px; text-decoration: none; color: var(--cream);
  background: #13312C; border: 1px solid rgba(252, 234, 204, 0.12); transition: border-color .2s, background .2s; user-select: none; -webkit-user-drag: none; }
.tl-item:hover { border-color: var(--gold); }
.tl-ico { width: 40px; height: 44px; flex: none; border-radius: 20px 20px 8px 8px; background: #F8F2E7; color: #1E4F49; display: grid; place-items: center; font-size: 30px; }
.tl-txt strong { display: block; font-size: 15px; line-height: 1.25; white-space: nowrap; }
.tl-txt span { display: block; font-size: 12.5px; opacity: 0.7; white-space: nowrap; }
.tl-item.is-current { background: var(--gold); color: var(--green-ink); border-color: var(--gold); }
.tl-item.is-current .tl-txt span { opacity: 0.8; }

/* Föregående och nästa stil */
.pn { display: grid; grid-template-columns: 1fr 1fr; gap: 16px; padding-bottom: 56px; }
.pn-card { display: flex; gap: 14px; align-items: center; text-decoration: none; color: inherit; background: var(--surface); border: 1px solid transparent; border-radius: 18px; padding: 14px 18px; box-shadow: var(--shadow); transition: border-color .2s, transform .2s; }
.pn-card:hover { border-color: var(--gold); transform: translateY(-2px); }
.pn-next { flex-direction: row-reverse; text-align: right; }
.pn-empty { visibility: hidden; }
.pn-text { min-width: 0; }
.pn-text strong { display: block; font-size: 18px; color: var(--text); line-height: 1.3; }
.pn-text > span:not(.pn-label) { display: block; font-size: 13px; color: var(--muted); }
.pn-label .pn-arrow { font-size: 11px; vertical-align: -1px; margin: 0 6px; }
.pn-prev .pn-label .pn-arrow { margin-left: 0; }
.pn-next .pn-label .pn-arrow { margin-right: 0; }
.pn-label { display: block; font-size: 12px; font-weight: 700; letter-spacing: 0.08em; text-transform: uppercase; color: var(--accent); margin-bottom: 2px; }

/* Ordlistetermer i texten och popupen */
a.term { color: inherit; text-decoration: underline dotted var(--gold); text-decoration-thickness: 2px; text-underline-offset: 4px; cursor: help; }
a.term:hover, a.term[aria-expanded="true"] { color: var(--tint); text-decoration-style: solid; }
.term-pop { position: absolute; z-index: 60; width: min(320px, calc(100vw - 24px)); background: var(--surface); color: var(--text); border: 1px solid var(--line); border-radius: 20px; padding: 14px 16px 16px; box-shadow: 0 20px 50px rgba(0, 0, 0, 0.22); }
.term-art { display: block; background: #F8F2E7; color: #1E4F49; border-radius: 14px; padding: 10px 16px; margin-bottom: 12px; }
.term-art svg { display: block; width: 100%; height: auto; max-height: 150px; }
.term-pop strong { display: block; font-size: 18px; margin-bottom: 4px; }
.term-pop p { font-size: 15px; line-height: 1.55; color: var(--text-2); margin: 0 0 10px; }
.term-pop a { font-weight: 700; font-size: 14px; text-decoration: none; }

.people { list-style: none; margin: 0; padding: 0; display: grid; grid-template-columns: repeat(auto-fit, minmax(240px, 1fr)); gap: 12px; }
.people li { display: flex; gap: 14px; align-items: center; background: var(--paper); border: 1px solid var(--paper-line); border-radius: 18px; padding: 14px 16px; font-weight: 600; font-size: 16px; line-height: 1.35; }
.initials { width: 46px; height: 46px; border-radius: 50%; background: var(--green); color: var(--cream); display: flex; align-items: center; justify-content: center; font-style: italic; font-weight: 400; font-size: 17px; flex: none; }

.places { list-style: none; margin: 0; padding: 0; display: grid; grid-template-columns: repeat(auto-fit, minmax(260px, 1fr)); gap: 14px; }
.places li { display: flex; gap: 14px; align-items: flex-start; background: var(--surface); border-radius: 18px; padding: 18px; box-shadow: var(--shadow); }
.places .ico { font-size: 26px; color: var(--tint); margin-top: 2px; }
.places strong { display: block; font-size: 17px; line-height: 1.35; }
.places span { display: block; font-size: 15px; color: var(--muted); margin-top: 2px; }

/* Platser ur appen: foton i valvformade ramar, som på startsidan */
.shots-intro { color: var(--text-2); margin-bottom: 20px; max-width: 720px; }
.shots { list-style: none; margin: 0; padding: 0; display: grid; grid-template-columns: repeat(auto-fill, minmax(210px, 1fr)); gap: 22px 16px; }
.shots a { display: block; text-decoration: none; color: inherit; }
.shots img { width: 100%; height: auto; aspect-ratio: 4 / 5; object-fit: cover; border-radius: 999px 999px 18px 18px; background: var(--paper); transition: transform .3s ease; }
.shots a:hover img { transform: translateY(-3px); }
.shots .shot-icon { display: flex; margin: 0; align-items: center; justify-content: center; width: 100%; aspect-ratio: 4 / 5; border-radius: 999px 999px 18px 18px; background: var(--paper); color: var(--tint); font-size: 96px; box-shadow: inset 0 0 0 6px var(--paper), inset 0 0 0 7.5px rgba(138, 106, 63, 0.45); transition: transform .3s ease; }
.shots a:hover .shot-icon { transform: translateY(-3px); }
.shots strong { display: block; margin-top: 10px; font-size: 17px; line-height: 1.3; color: var(--text); }
.shots span { display: block; font-size: 14px; color: var(--muted); margin-top: 2px; }
.shots em { display: block; font-size: 13px; color: var(--tint); margin-top: 3px; }

.sources { margin-top: 56px; padding-top: 24px; border-top: 1px solid var(--line); font-size: 14px; color: var(--muted); }
.sources h2 { font-size: 13px; letter-spacing: 0.18em; text-transform: uppercase; color: var(--accent); margin-bottom: 10px; }
.sources ul { margin: 0; padding-left: 18px; display: grid; gap: 4px; }
.byline { margin-top: 18px; font-style: italic; }

.box { background: var(--surface); border-radius: 22px; padding: 24px; box-shadow: var(--shadow); }
.box-paper { background: var(--paper); border: 1px solid var(--paper-line); box-shadow: none; }
.box-label { margin: 0 0 14px; font-size: 12px; letter-spacing: 0.22em; color: var(--accent); font-weight: 700; text-transform: uppercase; }
.facts { margin: 0; display: grid; grid-template-columns: auto 1fr; gap: 10px 16px; font-size: 15px; line-height: 1.45; }
.facts dt { color: var(--muted); display: flex; align-items: center; gap: 8px; }
.facts dt .ico { font-size: 19px; color: var(--tint); }
.facts dd { margin: 0; }
.toc { display: flex; flex-direction: column; gap: 2px; font-size: 15px; }
.toc a { text-decoration: none; color: var(--text-2); padding: 5px 0 5px 14px; border-left: 2px solid var(--paper-line); transition: color .25s, border-color .35s, padding .35s cubic-bezier(.16, 1, .3, 1); }
.toc a .n { color: var(--accent); font-style: italic; }
.toc a:hover { color: var(--tint); }
.toc a.is-active { color: var(--text); font-weight: 600; border-left-color: var(--gold); padding-left: 18px; }
/* Innehållsförteckningen följer med när man läser (sist i sidospalten, som sträcker sig lika långt som texten) */
.toc-box { position: sticky; top: calc(var(--hh, 72px) + 20px); }
/* Samma förteckning som en vågrät rad under sidhuvudet på mobil */
.secbar { display: none; }
.chips { display: flex; flex-wrap: wrap; gap: 8px; font-size: 14px; }
.chips a, .chips span { text-decoration: none; background: var(--chip); color: var(--chip-ink); padding: 7px 13px; border-radius: 999px; }
.chips span { background: transparent; border: 1px solid var(--line); color: var(--text-2); }
.chips a:hover { text-decoration: underline; }
.box-green { background: var(--green); color: var(--cream); }
.box-green p { font-size: 15px; line-height: 1.55; opacity: 0.88; }
.box-green strong { display: block; font-size: 18px; margin-bottom: 6px; opacity: 1; }

/* --- Stilindexet --- */
.vh { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }
html:not(.js) .js-only { display: none !important; }
.crumbs-light { opacity: 1; color: var(--muted); margin-bottom: clamp(20px, 4vw, 40px); }
.crumbs-light a { color: var(--tint); }
.ix-hero { padding-top: 26px; padding-bottom: 28px; }
.ix-hero-grid { display: flex; flex-wrap: wrap; gap: 32px 40px; align-items: flex-end; }
.ix-hero-text { flex: 1 1 560px; min-width: 0; }
.ix-hero h1 { font-size: clamp(44px, 6.4vw, 84px); line-height: 1; margin-bottom: 16px; color: var(--text); }
.ix-lead { font-size: clamp(18px, 1.7vw, 20px); line-height: 1.6; color: var(--text-2); max-width: 600px; }
.ix-lead em { color: var(--tint); }
.ix-search { flex: 1 1 340px; display: flex; background: var(--surface); border: 1px solid var(--line); border-radius: 999px; padding: 6px; box-shadow: var(--shadow); }
.ix-search input { flex: 1; min-width: 0; border: 0; outline: 0; font: inherit; font-size: 16px; padding: 12px 18px; background: transparent; color: var(--text); }
.ix-search:focus-within { border-color: var(--gold); }
/* Epokfiltret följer med när man scrollar genom de många stilarna */
.chips-row { display: flex; flex-wrap: wrap; gap: 8px; padding: 14px 0 16px; border-bottom: 1px solid var(--line);
  position: sticky; top: var(--hh, 72px); z-index: 10; background: color-mix(in srgb, var(--bg) 92%, transparent);
  -webkit-backdrop-filter: blur(14px); backdrop-filter: blur(14px); }
.chip { font: inherit; font-size: 14px; min-height: 40px; padding: 0 16px; border-radius: 999px; border: 1px solid var(--line); background: var(--surface); color: var(--text); cursor: pointer; }
.chip:hover { border-color: var(--tint); }
.chip[aria-pressed="true"] { background: var(--green); border-color: var(--green); color: var(--cream); }
.ix-none { padding: 40px 0; color: var(--muted); font-style: italic; }
.era { padding-top: 40px; scroll-margin-top: calc(var(--hh, 72px) + 80px); }
.era-head { display: flex; flex-wrap: wrap; align-items: baseline; gap: 6px 18px; margin-bottom: 6px; }
.era-head .sec-title { margin: 0; }
.era-years { font-size: 15px; color: var(--accent); font-style: italic; }
.rule { flex: 1; min-width: 40px; height: 1px; background: var(--line); align-self: center; }
.era-blurb { margin: 0 0 20px; font-style: italic; color: var(--muted); }
.style-grid { list-style: none; margin: 0; padding: 0; display: grid; grid-template-columns: repeat(auto-fill, minmax(230px, 1fr)); gap: 14px; }
.style-card { display: flex; gap: 14px; align-items: center; text-decoration: none; color: inherit; background: var(--surface); border: 1px solid transparent; border-radius: 18px; padding: 14px 16px; box-shadow: var(--shadow); height: 100%; transition: border-color .2s, transform .2s; }
.style-card:hover { border-color: var(--gold); transform: translateY(-2px); }
.card-arch { width: 60px; height: 68px; border-radius: 30px 30px 10px 10px; background: #F8F2E7; display: flex; align-items: center; justify-content: center; flex: none; color: var(--green); font-size: 44px;
  box-shadow: inset 0 0 0 4px #F8F2E7, inset 0 0 0 5px rgba(138, 106, 63, 0.55); }
.card-text { min-width: 0; }
.card-text strong { display: block; font-size: 17px; line-height: 1.3; color: var(--text); }
.card-text span { display: block; font-size: 13px; color: var(--muted); }
.card-text em { display: block; font-size: 13px; color: var(--tint); font-style: normal; font-weight: 600; }
.card-text i { display: block; font-size: 13px; color: var(--muted); font-style: italic; opacity: 0.85; }
.style-card.soon { box-shadow: none; background: transparent; border: 1px dashed var(--line); }
.style-card.soon:hover { border-color: var(--line); transform: none; }
.style-card.soon .card-arch { opacity: 0.8; }
.ix-block { padding-top: 56px; }
.ix-last { padding-bottom: 80px; }
.pairs { list-style: none; margin: 0; padding: 0; display: grid; grid-template-columns: repeat(2, 1fr); gap: 16px; }
.pair { display: block; height: 100%; text-decoration: none; color: inherit; background: var(--paper); border: 1px solid var(--paper-line); border-radius: 22px; padding: 22px; transition: border-color .2s; }
.pair:hover { border-color: var(--gold); }
.pair-icons { display: flex; align-items: center; gap: 10px; margin-bottom: 14px; color: var(--tint); font-size: 40px; }
.pair-icons i { font-size: 15px; color: var(--accent); }
.pair strong { display: block; font-size: 19px; color: var(--text); margin-bottom: 6px; }
.pair > span:last-child { display: block; font-size: 15px; line-height: 1.6; color: var(--text-2); }
.band { background: var(--green-deep); color: var(--cream); border-radius: 28px; padding: clamp(28px, 5vw, 52px); display: flex; flex-wrap: wrap; gap: 24px; align-items: center; justify-content: space-between; }
.band h2 { font-size: clamp(28px, 3.4vw, 42px); margin-bottom: 10px; }
.band p:not(.kicker) { opacity: 0.86; max-width: 560px; line-height: 1.6; }
.band .stores { margin-top: 0; }
.az { list-style: none; margin: 0; padding: 0; columns: 4 200px; column-gap: 32px; font-size: 16px; line-height: 2; }
.az a { text-decoration: none; }
.az a:hover { text-decoration: underline; }

/* --- Ordlistan --- */
.gl-letters { display: flex; flex-wrap: wrap; gap: 6px; padding: 14px 0 20px; border-bottom: 1px solid var(--line); position: sticky; top: var(--hh, 72px); background: var(--bg); z-index: 5; }
.gl-letters a.is-active { background: var(--green); border-color: var(--green); color: var(--cream); }
.gl-letters a { min-width: 36px; height: 36px; display: inline-flex; align-items: center; justify-content: center; border-radius: 10px; text-decoration: none; font-weight: 700; color: var(--tint); background: var(--surface); border: 1px solid var(--line); }
.gl-letters a:hover { border-color: var(--gold); }
.gl-list { margin: 0; padding: 24px 0 0; display: grid; grid-template-columns: repeat(auto-fill, minmax(340px, 1fr)); gap: 14px; }
.gl-item { background: var(--surface); border-radius: 18px; padding: 20px 22px; box-shadow: var(--shadow); scroll-margin-top: 150px; }
.gl-art { display: block; background: #F8F2E7; color: #1E4F49; border-radius: 14px; padding: 12px; margin-bottom: 14px; }
.gl-art svg { display: block; height: 112px; width: auto; max-width: 100%; margin: 0 auto; }
.gl-item dt strong { font-size: 19px; color: var(--text); }
.gl-item dt i { color: var(--accent); font-size: 15px; margin-left: 4px; }
.gl-item dd { margin: 8px 0 0; font-size: 16px; line-height: 1.6; color: var(--text-2); }
.gl-see { margin-top: 10px !important; font-size: 14px; display: flex; flex-wrap: wrap; gap: 6px; align-items: center; }
.gl-see span { color: var(--muted); }
.gl-see a { text-decoration: none; background: var(--chip); color: var(--chip-ink); padding: 4px 10px; border-radius: 999px; }
.gl-sources { margin-bottom: 72px; }
.gl-box { font-size: 15px; line-height: 1.55; color: var(--text-2); }
.gl-box-link { display: inline-block; margin-top: 10px; font-weight: 700; font-size: 15px; text-decoration: none; }
.ix-glossary { margin-top: 32px; max-width: 520px; }

/* --- Butiksknappar och appruta --- */
.stores { display: flex; flex-wrap: wrap; gap: 10px; margin-top: 16px; }
.store {
  display: inline-flex; align-items: center; gap: 10px; padding: 9px 18px 9px 14px; border-radius: 14px;
  background: #050C0B; color: #fff; text-decoration: none; border: 1px solid rgba(255, 255, 255, 0.16);
}
.store span { display: flex; flex-direction: column; line-height: 1.1; }
.store small { font-size: 11px; opacity: 0.8; }
.store b { font-size: 17px; font-weight: 600; }
.glyph { width: 22px; height: 22px; fill: currentColor; flex: none; }
.app-cta { margin-bottom: 72px; }
.app-cta .inner { background: var(--paper); border: 1px solid var(--paper-line); border-radius: 28px; padding: clamp(28px, 5vw, 48px); display: flex; flex-wrap: wrap; gap: 24px; align-items: center; justify-content: space-between; }
.app-cta h2 { font-size: clamp(26px, 3vw, 36px); margin-bottom: 8px; }
.app-cta p { color: var(--text-2); max-width: 560px; }
.app-cta .stores { margin-top: 0; }

/* --- Sidfot (samma som startsidan) --- */
.footer-sign { margin: 0 0 48px; padding-bottom: 40px; border-bottom: 1px solid rgba(255, 255, 255, 0.08); font-size: clamp(30px, 4.2vw, 56px); line-height: 1.1; letter-spacing: -0.02em; font-weight: 600; color: var(--cream); text-wrap: balance; }
.footer-sign em { display: block; font-weight: 400; color: var(--gold); }
footer { background: var(--green-ink); color: rgba(255, 255, 255, 0.7); padding: 72px 0 calc(40px + env(safe-area-inset-bottom)); font-size: 16px; }
.footer-grid { display: grid; grid-template-columns: 1.4fr repeat(3, 1fr); gap: 40px; }
.footer-grid .brand { color: #fff; margin-bottom: 16px; }
.footer-grid h4 { margin: 0 0 14px; font-size: 13px; letter-spacing: 0.18em; text-transform: uppercase; color: var(--gold); }
.footer-grid ul { list-style: none; margin: 0; padding: 0; display: grid; gap: 8px; }
.footer-grid a { text-decoration: none; color: rgba(255, 255, 255, 0.8); }
.footer-grid a:hover { color: #fff; }
.footer-bottom { display: flex; justify-content: space-between; gap: 16px; flex-wrap: wrap; margin-top: 56px; padding-top: 28px; border-top: 1px solid rgba(255, 255, 255, 0.08); font-size: 14px; color: rgba(255, 255, 255, 0.5); }

/* --- Mindre skärmar --- */
/* --- Appsidan /appen, /app (app_page.py) --- */
.device { --dw: 220px; position: relative; width: var(--dw); aspect-ratio: 71.9 / 150; filter: drop-shadow(0 18px 24px rgba(12, 36, 33, .22)) drop-shadow(0 4px 8px rgba(12, 36, 33, .14)); }
.device .rim { position: absolute; inset: 0; border-radius: calc(var(--dw) * .175); padding: calc(var(--dw) * .012); background: linear-gradient(135deg, #6b6f73, #2b2d30 40%, #7b8085 70%, #3a3c3f); }
.device .bezel { position: relative; height: 100%; border-radius: calc(var(--dw) * .163); background: #050505; padding: calc(var(--dw) * .026); box-shadow: inset 0 0 0 calc(var(--dw) * .003) rgba(255, 255, 255, .18); }
.device .screen { position: relative; height: 100%; border-radius: calc(var(--dw) * .137); overflow: hidden; background: #fff; }
.device .screen img { width: 100%; height: 100%; object-fit: cover; object-position: top; }
.device .glare { position: absolute; inset: 0; background: linear-gradient(115deg, rgba(255, 255, 255, .16) 0%, rgba(255, 255, 255, 0) 32%); pointer-events: none; }
.device .island { position: absolute; left: 50%; transform: translateX(-50%); top: calc(var(--dw) * .058); width: calc(var(--dw) * .29); height: calc(var(--dw) * .085); border-radius: 999px; background: #000; }
.device .btn { position: absolute; padding: 0; width: calc(var(--dw) * .014); border-radius: 3px; background: linear-gradient(90deg, #2a2c2f, #8d9296 50%, #2a2c2f); }
.device .act { left: calc(var(--dw) * -.009); top: 17%; height: 4.5%; }
.device .vup { left: calc(var(--dw) * -.009); top: 24.5%; height: 7.5%; }
.device .vdn { left: calc(var(--dw) * -.009); top: 33.5%; height: 7.5%; }
.device .pwr { right: calc(var(--dw) * -.009); top: 26%; height: 11%; }

.app-hero-grid { display: flex; flex-wrap: wrap; gap: 36px 56px; align-items: center; }
.app-hero-text { flex: 1 1 520px; min-width: 0; }
.app-hero h1 { font-size: clamp(42px, 5.6vw, 72px); line-height: 1.04; margin-bottom: 18px; color: var(--text); }
.app-hero h1 em { font-weight: 400; color: var(--tint); }
.app-small { margin-top: 14px; font-size: 14px; color: var(--muted); }
.app-toc { display: flex; flex-wrap: wrap; gap: 8px; margin-top: 26px; padding-top: 22px; border-top: 1px solid var(--line); }
.app-toc a { text-decoration: none; background: var(--chip); color: var(--chip-ink); padding: 7px 14px; border-radius: 999px; font-size: 15px; }
.app-toc a:hover { box-shadow: inset 0 0 0 1px var(--gold); }
.app-hero-visual { flex: 0 1 380px; margin: 0 auto; }
.app-arch { display: grid; place-items: center; padding: 48px 20px 36px; border-radius: 999px 999px 28px 28px; background: var(--paper); border: 1px solid var(--paper-line); }
.app-arch .device { --dw: clamp(200px, 22vw, 250px); }

.app-sec { padding-top: 64px; scroll-margin-top: 80px; }
.app-last { padding-bottom: 80px; }
.app-sec h3 { color: var(--text); }

.app-why { display: grid; grid-template-columns: minmax(0, 1.5fr) minmax(0, 1fr); gap: 32px 48px; align-items: center; }
.app-quote { margin: 0; padding: 32px; border-radius: 999px 999px 24px 24px; background: var(--green-deep); color: var(--cream); text-align: center; }
.app-quote p { font-size: clamp(22px, 2.4vw, 30px); line-height: 1.3; font-style: italic; padding-top: 28px; }
.app-quote span { display: block; margin-top: 14px; font-size: 12px; letter-spacing: 0.22em; text-transform: uppercase; color: var(--gold); font-weight: 700; }

.app-steps { list-style: none; margin: 0; padding: 0; display: grid; grid-template-columns: repeat(auto-fit, minmax(250px, 1fr)); gap: 16px; }
.app-steps li { display: flex; flex-direction: column; gap: 14px; background: var(--surface); border-radius: var(--radius); padding: 22px; box-shadow: var(--shadow); }
.step-arch { width: 72px; height: 80px; border-radius: 36px 36px 12px 12px; flex: none; background: var(--green); color: var(--cream); display: grid; place-items: center; font-size: 34px; }
.step-n { display: block; font-size: 13px; font-style: italic; color: var(--accent); }
.app-steps strong { display: block; font-size: 19px; color: var(--text); margin-bottom: 4px; }
.app-steps p { font-size: 15px; line-height: 1.55; color: var(--text-2); }

.app-cats { list-style: none; margin: 0; padding: 0; display: grid; grid-template-columns: repeat(auto-fit, minmax(190px, 1fr)); gap: 14px; }
.app-cats li { background: var(--surface); border-radius: var(--radius); padding: 22px 18px 20px; box-shadow: var(--shadow); text-align: center; }
.cat-pin { display: block; width: 46px; height: 56px; margin: 0 auto 12px; }
.cat-pin .marker { width: 100%; height: 100%; }
.app-cats strong { display: block; font-size: 18px; color: var(--text); margin-bottom: 4px; }
.app-cats p { font-size: 15px; line-height: 1.5; color: var(--text-2); }
.app-styles { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1.3fr); gap: 24px 40px; align-items: center; margin-top: 16px; padding: clamp(22px, 4vw, 36px); background: var(--paper); border: 1px solid var(--paper-line); border-radius: 24px; }
.app-style-icons { display: grid; grid-template-columns: repeat(5, 1fr); gap: 10px; }
.app-style-icons .style-icon { aspect-ratio: 1; border-radius: 999px 999px 10px 10px; background: var(--surface); color: var(--tint); display: grid; place-items: center; font-size: 34px; }
.app-styles h3 { font-size: 22px; margin-bottom: 8px; }
.app-styles p { color: var(--text-2); line-height: 1.6; margin-bottom: 12px; }

.app-rows { display: grid; gap: 18px; }
.app-row { display: grid; grid-template-columns: minmax(0, 0.8fr) minmax(0, 1.2fr); align-items: center; gap: 24px 48px; background: var(--surface); border-radius: 28px; box-shadow: var(--shadow); overflow: hidden; }
.app-row.flip { grid-template-columns: minmax(0, 1.2fr) minmax(0, 0.8fr); }
.app-row.flip .app-row-phone { order: 2; }
.app-row-phone { display: grid; place-items: center; padding: 36px 20px; background: var(--paper); height: 100%; }
.app-row-phone .device { --dw: clamp(170px, 17vw, 210px); }
.app-row-text { padding: 28px clamp(22px, 4vw, 44px) 28px 0; }
.app-row.flip .app-row-text { padding: 28px 0 28px clamp(22px, 4vw, 44px); }
.app-row .num { font-size: 12px; font-weight: 700; letter-spacing: 0.2em; color: var(--accent); text-transform: uppercase; margin-bottom: 6px; }
.app-row h3 { font-size: clamp(24px, 2.6vw, 32px); line-height: 1.15; margin-bottom: 12px; }
.app-row-text > p:not(.num) { color: var(--text-2); font-size: 17px; line-height: 1.6; }
.app-points { list-style: none; margin: 16px 0 0; padding: 0; display: grid; gap: 8px; }
.app-points li { position: relative; padding-left: 26px; font-size: 15px; color: var(--text); }
.app-points li::before { content: ''; position: absolute; left: 4px; top: .45em; width: 10px; height: 10px; border-radius: 5px 5px 2px 2px; background: var(--gold); }

.app-levels-intro { max-width: 720px; color: var(--text-2); font-size: 17px; line-height: 1.6; margin-bottom: 18px; }
.app-levels { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1.3fr); gap: 16px; }
.app-levels .box { border-radius: 24px; padding: 24px; }
.xp-list { list-style: none; margin: 0; padding: 0; }
.xp-list li { display: flex; justify-content: space-between; gap: 16px; padding: 12px 0; border-bottom: 1px solid var(--paper-line); font-size: 16px; }
.xp-list li:last-child { border-bottom: 0; }
.xp-list b { color: var(--tint); white-space: nowrap; }
.ladder { list-style: none; margin: 0; padding: 0; columns: 2 200px; column-gap: 24px; }
.ladder li { display: flex; align-items: center; gap: 10px; padding: 7px 0; break-inside: avoid; }
.ladder .lvl { width: 30px; height: 34px; flex: none; border-radius: 15px 15px 6px 6px; background: var(--green); color: var(--cream); display: grid; place-items: center; font-size: 14px; font-style: italic; }
.ladder li:last-child .lvl { background: #4F8C7E; }
.ladder strong { font-size: 15px; color: var(--text); line-height: 1.25; }
.ladder em { margin-left: auto; font-size: 13px; font-style: normal; color: var(--muted); white-space: nowrap; }
.badges-head { display: flex; flex-wrap: wrap; align-items: baseline; justify-content: space-between; gap: 8px 24px; margin: 32px 0 14px; }
.badges-head h3 { font-size: 22px; }
.tier-legend { display: flex; flex-wrap: wrap; gap: 14px; font-size: 14px; color: var(--muted); }
.tier-legend span, .tiers span { display: inline-flex; align-items: center; gap: 5px; }
.tier-legend i, .tiers i { width: 10px; height: 10px; border-radius: 50%; display: inline-block; }
.badges { list-style: none; margin: 0; padding: 0; display: grid; grid-template-columns: repeat(auto-fill, minmax(250px, 1fr)); gap: 12px; }
.badges li { display: flex; gap: 14px; align-items: center; background: var(--surface); border-radius: 18px; padding: 14px; box-shadow: var(--shadow); }
.medal { width: 56px; height: 56px; flex: none; border-radius: 50%; background: var(--green); color: var(--cream); display: grid; place-items: center; font-size: 28px; box-shadow: inset 0 0 0 3px #4F8C7E, inset 0 0 0 5px var(--green); }
.badges strong { display: block; font-size: 16px; color: var(--text); }
.badges p { font-size: 14px; color: var(--muted); line-height: 1.4; }
.badges .tiers { display: flex; flex-wrap: wrap; gap: 10px; margin-top: 4px; font-size: 13px; color: var(--text-2); }

.app-more { display: grid; grid-template-columns: repeat(auto-fit, minmax(300px, 1fr)); gap: 14px; }
.more-card { display: grid; grid-template-columns: 64px 1fr; column-gap: 16px; align-items: center; background: var(--surface); border-radius: var(--radius); padding: 14px; box-shadow: var(--shadow); }
.more-card .dot { grid-row: span 2; width: 64px; height: 64px; border-radius: 32px 32px 12px 12px; background: var(--chip); color: var(--chip-ink); display: grid; place-items: center; font-size: 28px; }
.more-card h3 { font-size: 17px; line-height: 1.3; }
.more-card p { color: var(--muted); font-size: 14px; line-height: 1.5; }

.app-faq { max-width: 860px; }
.app-faq details { border-bottom: 1px solid var(--line); }
.app-faq details:first-child { border-top: 1px solid var(--line); }
.app-faq summary { list-style: none; cursor: pointer; padding: 20px 48px 20px 0; font-size: 19px; font-weight: 600; position: relative; color: var(--text); }
.app-faq summary::-webkit-details-marker { display: none; }
.app-faq summary::after { content: ''; position: absolute; right: 8px; top: 50%; width: 10px; height: 10px; margin-top: -8px; border-right: 2px solid var(--tint); border-bottom: 2px solid var(--tint); transform: rotate(45deg); transition: transform .2s; }
.app-faq details[open] summary::after { transform: rotate(-135deg); margin-top: -2px; }
.app-faq details p { padding: 0 48px 22px 0; color: var(--text-2); font-size: 17px; line-height: 1.6; }
.app-cta-title em { font-weight: 500; color: var(--gold); }

@media (max-width: 860px) {
  .app-why, .app-styles, .app-levels { grid-template-columns: 1fr; }
  .app-row, .app-row.flip { grid-template-columns: 1fr; }
  .app-row.flip .app-row-phone { order: 0; }
  .app-row-text, .app-row.flip .app-row-text { padding: 0 22px 26px; }
  .app-row-phone { padding: 28px 20px; }
}
@media (max-width: 640px) {
  .app-sec { padding-top: 48px; }
  .app-hero-visual { flex-basis: 100%; }
  .app-faq summary { font-size: 17px; }
  .app-faq details p { padding-right: 0; font-size: 16px; }
  .app-style-icons .style-icon { font-size: 26px; }
}

/* Fem menylänkar (Stilar, Landmärken, Ordlista, Appen, Om) får inte plats under 1160 px – där tar menyknappen över */
@media (max-width: 1160px) { .nav-links { display: none; } }

@media (max-width: 1020px) {
  .pairs { grid-template-columns: 1fr; }
  .footer-grid { grid-template-columns: 1fr 1fr; }
  .footer-grid > :first-child { grid-column: 1 / -1; }
}
@media (max-width: 640px) {
  body { font-size: 17px; }
  .gh .nav { height: 64px; gap: 12px; }
  .brand { font-size: 19px; }
  .gh .brand .wm { display: none; }
  .nav-cta { padding: 8px 16px; font-size: 14px; }
  .theme-toggle { width: 36px; height: 36px; font-size: 20px; }
  .arch { width: 210px; height: 244px; font-size: 172px; box-shadow: inset 0 0 0 9px #F8F2E7, inset 0 0 0 10.5px rgba(138, 106, 63, 0.55), 0 18px 44px rgba(0, 0, 0, 0.3); }
  .body { gap: 40px; padding-top: 40px; }
  .sec + .sec { margin-top: 48px; }
  .sec-title { font-size: 19px; }
  .prose, .clue p { font-size: 17px; }
  .footer-grid { grid-template-columns: 1fr; }
  .gl-list { grid-template-columns: 1fr; }
  .gl-letters { flex-wrap: nowrap; overflow-x: auto; scrollbar-width: none; margin: 0 calc(-1 * var(--gutter)); padding: 12px var(--gutter); }
  .gl-letters::-webkit-scrollbar { display: none; }
  .gl-letters a { flex: none; }
  .shots { grid-template-columns: 1fr 1fr; gap: 18px 12px; }
  .chips-row { flex-wrap: nowrap; overflow-x: auto; margin: 0 calc(-1 * var(--gutter)); padding-left: var(--gutter); padding-right: var(--gutter); scrollbar-width: none; }
  .chips-row::-webkit-scrollbar { display: none; }
  .chip { flex: none; }
  .shots strong { font-size: 15px; }
  .tl-hint { display: none; }
  .tl-item { padding: 6px 12px 6px 6px; }
  .tl-ico { width: 34px; height: 38px; font-size: 26px; }
  .facade { grid-template-columns: 1fr; justify-items: center; padding: 22px 18px; }
  .pn { grid-template-columns: 1fr; gap: 12px; }
  .pn-empty { display: none; }
  .pn-next { flex-direction: row; text-align: left; }
  .facade figcaption { justify-self: stretch; }
  .facade-key li { font-size: 16px; }
}
@media (prefers-reduced-motion: reduce) { html { scroll-behavior: auto; } }

/* Under 980 px ligger sidospalten under texten: innehållsförteckningen blir en rad som följer med överst */
@media (max-width: 980px) {
  .body > .article, .body > .aside { flex-basis: 100%; }
  .toc-box { display: none; }
  .secbar {
    display: block; order: -1; flex: 0 0 calc(100% + 2 * var(--gutter)); margin: -16px calc(-1 * var(--gutter)) -24px;
    position: sticky; top: var(--hh, 64px); z-index: 20; align-self: flex-start;
    background: color-mix(in srgb, var(--bg) 92%, transparent); -webkit-backdrop-filter: blur(14px); backdrop-filter: blur(14px);
    border-bottom: 1px solid var(--line);
    /* Annars blir raden lika bred som alla knappar tillsammans och drar ut hela sidan (zoomar ut den på mobil) */
    min-width: 0; max-width: calc(100% + 2 * var(--gutter));
  }
  .secbar ol { list-style: none; margin: 0; padding: 10px var(--gutter); display: flex; gap: 6px; overflow-x: auto; scrollbar-width: none; min-width: 0; }
  .secbar ol::-webkit-scrollbar { display: none; }
  .secbar li { flex: none; }
  .secbar a { display: block; white-space: nowrap; font-size: 14px; padding: 6px 13px; border-radius: 999px; text-decoration: none;
    color: var(--text-2); background: var(--surface); border: 1px solid var(--line); }
  .secbar a.is-active { background: var(--green); border-color: var(--green); color: var(--cream); }
  .sec { scroll-margin-top: calc(var(--hh, 64px) + 72px); }
}

/* ---------------------------------------------------------------------------------------------
   Gemensamt för alla sidor på webbplatsen (marketing/website/ui.css): menyn på mobil, mjuka sidbyten,
   inglidning, knappar, "till toppen", lässtapel och öppna/stäng-animationer. Läggs in i startsidan och
   integritets-/villkorssidorna av build.py och sist i public/css/site.css av pages.py. Hör ihop med ui.js.
   --------------------------------------------------------------------------------------------- */
:root {
  --ease-out: cubic-bezier(.16, 1, .3, 1);
  --ease-io: cubic-bezier(.65, 0, .35, 1);
  --hh: 72px;
  interpolate-size: allow-keywords;
}
@media (max-width: 640px) { :root { --hh: 64px; } }
::selection { background: rgba(212, 162, 106, 0.32); color: inherit; }
html { scrollbar-gutter: stable; }

/* --- Mjuka sidbyten: sidhuvudet står still, innehållet tonar in --- */
@view-transition { navigation: auto; }
[data-header] { view-transition-name: site-header; }
::view-transition-old(root) { animation: vt-out .2s var(--ease-io) both; }
::view-transition-new(root) { animation: vt-in .45s var(--ease-out) both; }
@keyframes vt-out { to { opacity: 0; } }
@keyframes vt-in { from { opacity: 0; transform: translateY(10px); } }
/* Bytet mellan ljust och mörkt: en cirkel som växer från knappen (ui.js) */
:root.vt-theme [data-header] { view-transition-name: none; }
:root.vt-theme::view-transition-old(root),
:root.vt-theme::view-transition-new(root) { animation: none; mix-blend-mode: normal; }

/* --- Sidhuvudet får en mjuk skugga när man har scrollat --- */
[data-header] { transition: box-shadow .4s var(--ease-out), background-color .4s var(--ease-out); }
[data-header].is-scrolled { box-shadow: 0 12px 32px -18px rgba(12, 36, 33, 0.35); }

/* Menylänkarna: en guldlinje som ritas fram under */
.nav-links a { position: relative; transition: color .25s var(--ease-out); }
.nav-links a::after {
  content: ""; position: absolute; left: 0; right: 0; bottom: -7px; height: 1.5px; border-radius: 2px; background: var(--gold);
  transform: scaleX(0); transform-origin: right; transition: transform .45s var(--ease-out);
}
.nav-links a:hover::after, .nav-links a[aria-current]::after { transform: scaleX(1); transform-origin: left; }

/* --- Knappar och kort: samma mjuka rörelse överallt --- */
.btn, .nav-cta, .store, .chip, .chips a, .search button, .theme-toggle, .menu-btn, .lang a, .lang button, .tl-arrows button,
.app-toc a, .gl-see a, .gl-letters a, .secbar a, .drawer-theme, .drawer-close, .to-top, .faq summary, .app-faq summary {
  transition: background-color .3s var(--ease-out), color .3s var(--ease-out), border-color .3s var(--ease-out),
              box-shadow .3s var(--ease-out), transform .35s var(--ease-out), opacity .3s var(--ease-out);
}
.btn:active, .nav-cta:active, .store:active, .chip:active, .search button:active, .menu-btn:active,
.theme-toggle:active, .drawer-theme:active, .drawer-close:active, .to-top:active { transform: scale(0.96); }
.theme-toggle:hover, .menu-btn:hover { border-color: var(--tint); }
a.card, .style-card, .pn-card, .pair, .places-grid .place, .tl-item {
  transition: transform .5s var(--ease-out), box-shadow .5s var(--ease-out), border-color .3s var(--ease-out), background-color .3s var(--ease-out);
}
a.card:hover, .style-card:hover, .pn-card:hover {
  box-shadow: 0 2px 4px rgba(5, 12, 11, 0.05), 0 24px 48px -14px rgba(12, 36, 33, 0.28);
}
.places-grid .place:hover { transform: translateY(-4px); box-shadow: 0 28px 50px -18px rgba(0, 0, 0, 0.55); }
.style-card .card-arch, .tl-item .tl-ico { transition: transform .6s var(--ease-out); }
.style-card:hover .card-arch { transform: translateY(-2px) scale(1.04); }

/* --- Menyknappen och menyn (under 1020 px, där länkarna i sidhuvudet inte får plats) --- */
.menu-btn {
  display: none; align-items: center; justify-content: center; width: 44px; height: 44px; flex: none; padding: 0;
  border: 1px solid var(--line); border-radius: 50%; background: transparent; color: var(--tint); font-size: 24px; cursor: pointer;
}
html:not(.js) .menu-btn { display: none !important; }
@media (max-width: 1160px) { .menu-btn { display: inline-flex; } }
@media (max-width: 640px) {
  .nav > .lang, .nav > .theme-toggle { display: none; }
  .menu-btn { width: 42px; height: 42px; }
}

.drawer {
  position: fixed; inset: 0; width: 100%; height: 100%; max-width: none; max-height: none; margin: 0; padding: 0; border: 0;
  background: var(--bg); color: var(--text); overflow-y: auto; overscroll-behavior: contain;
  opacity: 0; transform: translateY(-10px);
  transition: opacity .3s var(--ease-out), transform .5s var(--ease-out), overlay .5s allow-discrete, display .5s allow-discrete;
}
.drawer[open] { opacity: 1; transform: none; }
@starting-style { .drawer[open] { opacity: 0; transform: translateY(-10px); } }
.drawer::backdrop {
  background: rgba(12, 36, 33, 0.38); -webkit-backdrop-filter: blur(4px); backdrop-filter: blur(4px); opacity: 0;
  transition: opacity .35s var(--ease-out), overlay .35s allow-discrete, display .35s allow-discrete;
}
.drawer[open]::backdrop { opacity: 1; }
@starting-style { .drawer[open]::backdrop { opacity: 0; } }
@media (min-width: 641px) {
  .drawer { inset: 0 0 0 auto; width: min(460px, 100%); box-shadow: -30px 0 80px rgba(0, 0, 0, 0.22); transform: translateX(40px); }
  @starting-style { .drawer[open] { transform: translateX(40px); } }
  .drawer[open] { transform: none; }
}
.drawer-in {
  min-height: 100%; display: flex; flex-direction: column; gap: 22px;
  padding: env(safe-area-inset-top) var(--gutter, 20px) calc(28px + env(safe-area-inset-bottom));
}
.drawer-top { display: flex; align-items: center; justify-content: space-between; gap: 12px; height: var(--hh); flex: none; }
.drawer-top .brand { margin: 0; }
.drawer-close {
  display: inline-flex; align-items: center; justify-content: center; width: 42px; height: 42px; padding: 0; border-radius: 50%;
  border: 1px solid var(--line); background: transparent; color: var(--tint); font-size: 18px; cursor: pointer;
}
.drawer-close:hover { border-color: var(--tint); }
.drawer-nav { display: grid; border-top: 1px solid var(--line); }
.drawer-nav a {
  display: flex; align-items: center; gap: 16px; padding: 16px 2px; border-bottom: 1px solid var(--line); text-decoration: none; color: var(--text);
  opacity: 0; transform: translateY(10px);
  transition: opacity .5s var(--ease-out), transform .6s var(--ease-out), color .25s; transition-delay: calc(var(--i, 0) * 45ms + 60ms);
}
.drawer[open] .drawer-nav a { opacity: 1; transform: none; }
@starting-style { .drawer[open] .drawer-nav a { opacity: 0; transform: translateY(10px); } }
.drawer-nav .n { align-self: flex-start; padding-top: 7px; min-width: 26px; font-size: 15px; font-style: italic; color: var(--accent, var(--accent-text, #8A6A3F)); }
.drawer-nav strong { display: block; font-size: 27px; font-weight: 600; line-height: 1.15; letter-spacing: -0.01em; }
.drawer-nav small { display: block; margin-top: 3px; font-size: 15px; line-height: 1.4; color: var(--muted); }
.drawer-nav .go { margin-left: auto; font-size: 15px; color: var(--gold); transition: transform .4s var(--ease-out); }
.drawer-nav a:hover strong, .drawer-nav a[aria-current] strong { color: var(--tint); }
.drawer-nav a:hover .go { transform: translateX(4px); }
.drawer-row { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 12px; }
.drawer-row .lang { display: flex; }
.drawer-theme {
  display: inline-flex; align-items: center; gap: 10px; padding: 9px 16px 9px 12px; border: 1px solid var(--line); border-radius: 999px;
  background: transparent; color: var(--text); font: inherit; font-size: 15px; cursor: pointer;
}
.drawer-theme:hover { border-color: var(--tint); }
.drawer-theme .ico { font-size: 22px; color: var(--tint); }
.drawer-theme .to-light, :root[data-theme="dark"] .drawer-theme .to-dark { display: none; }
:root[data-theme="dark"] .drawer-theme .to-light { display: inline; }
.drawer-theme svg.to-light { display: none; }
:root[data-theme="dark"] .drawer-theme svg.to-light { display: block; }
.drawer-app {
  margin-top: auto; padding: 22px; border-radius: 24px; color: var(--cream);
  background: radial-gradient(90% 120% at 100% 0%, rgba(212, 162, 106, 0.22) 0%, rgba(212, 162, 106, 0) 60%), var(--green-deep);
}
.drawer-app strong { display: block; font-size: 19px; line-height: 1.3; }
.drawer-app p { margin: 2px 0 14px; font-size: 15px; line-height: 1.5; opacity: 0.85; }
.drawer-app .stores { margin: 0; flex-direction: row; }
.drawer-app .store { flex: 1 1 auto; justify-content: center; padding: 9px 12px 9px 10px; background: var(--gold); color: #050C0B; border-color: transparent; }
.drawer-app .store b { font-size: 15px; white-space: nowrap; }
.drawer-legal { display: flex; flex-wrap: wrap; gap: 6px 18px; margin: 0; font-size: 14px; }
.drawer-legal a { color: var(--muted); text-decoration: none; }
.drawer-legal a:hover { color: var(--tint); }
html.drawer-open { overflow: hidden; }

/* --- Till toppen --- */
.to-top {
  position: fixed; z-index: 40; right: max(16px, env(safe-area-inset-right)); bottom: calc(18px + env(safe-area-inset-bottom));
  width: 48px; height: 48px; padding: 0; display: grid; place-items: center; border-radius: 50%; cursor: pointer;
  border: 1px solid var(--line); color: var(--tint); font-size: 20px;
  background: color-mix(in srgb, var(--surface, #fff) 86%, transparent); -webkit-backdrop-filter: blur(12px); backdrop-filter: blur(12px);
  box-shadow: var(--shadow, 0 10px 30px rgba(0, 0, 0, 0.12));
  opacity: 0; transform: translateY(14px) scale(0.9); pointer-events: none;
}
.to-top.is-on { opacity: 1; transform: none; pointer-events: auto; }
.to-top:hover { border-color: var(--gold); }

/* --- Lässtapeln på långa texter (stilsidor, villkor, integritet) --- */
.progress {
  position: fixed; z-index: 70; top: 0; left: 0; right: 0; height: 3px; pointer-events: none;
  background: linear-gradient(90deg, var(--gold-deep, #8A6A3F), var(--gold));
  transform-origin: left; transform: scaleX(var(--p, 0));
}

/* --- Frågor och svar: svaret glider fram i stället för att hoppa --- */
details::details-content {
  block-size: 0; overflow: clip;
  transition: block-size .5s var(--ease-out), content-visibility .5s allow-discrete;
}
details[open]::details-content { block-size: auto; }
.faq summary:hover, .app-faq summary:hover { color: var(--tint); }

/* --- Sökträffarna tonar in --- */
.results:not([hidden]) { animation: pop-in .3s var(--ease-out) both; transform-origin: top center; }
@keyframes pop-in { from { opacity: 0; transform: translateY(-6px) scale(0.985); } }

/* --- Inglidning: korten glider fram, ett i taget, när de kommer in i bild (ui.js sätter .in) ---
   Gäller bara när skripten fungerar; utan dem (eller med .ui-off) syns allt direkt. */
.js:not(.ui-off) :is(.reveal, .style-grid > li, .gl-list > .gl-item, .places-grid > .place, .steps > li, .traits > li,
  .people > li, .places > li, .shots > li, .app-steps > li, .app-cats > li, .badges > li, .app-row, .more > .more-card,
  .app-more > .more-card, .pairs > li, .account-grid > .card, .vision-card, .about-card, .facade, .clue, .pn-card, .app-quote) {
  transition: opacity .7s var(--ease-out), transform .85s var(--ease-out), box-shadow .5s var(--ease-out), border-color .3s var(--ease-out);
  transition-delay: var(--d, 0s);
}
.js:not(.ui-off) :is(.reveal, .style-grid > li, .gl-list > .gl-item, .places-grid > .place, .steps > li, .traits > li,
  .people > li, .places > li, .shots > li, .app-steps > li, .app-cats > li, .badges > li, .app-row, .more > .more-card,
  .app-more > .more-card, .pairs > li, .account-grid > .card, .vision-card, .about-card, .facade, .clue, .pn-card, .app-quote):not(.in) { opacity: 0; transform: translateY(22px); }
/* Kapitelrubrikernas linje ritas fram */
.js:not(.ui-off) .sh .rule { transform-origin: left; transition: transform 1.2s var(--ease-out) .1s; }
.js:not(.ui-off) .sh:not(.in) .rule { transform: scaleX(0); }

/* --- Toppen tonar in när sidan öppnas --- */
@keyframes rise { from { opacity: 0; transform: translateY(16px); } }
@keyframes settle { from { opacity: 0; transform: translateY(18px) scale(0.985); } }
.hero-text > *, .style-hero .hero-text > *, .ix-hero-text > *, .app-hero-text > * { animation: rise .75s var(--ease-out) both; }
.hero-text > :nth-child(2), .ix-hero-text > :nth-child(2), .app-hero-text > :nth-child(2) { animation-delay: .05s; }
.hero-text > :nth-child(3), .ix-hero-text > :nth-child(3), .app-hero-text > :nth-child(3) { animation-delay: .1s; }
.hero-text > :nth-child(4), .app-hero-text > :nth-child(4) { animation-delay: .15s; }
.hero-text > :nth-child(n+5), .app-hero-text > :nth-child(n+5) { animation-delay: .2s; }
.hero-visual, .style-hero .arch, .app-hero-visual, .ix-search { animation: settle .9s var(--ease-out) .1s both; }

@media (prefers-reduced-motion: reduce) {
  @view-transition { navigation: none; }
  *, ::before, ::after { animation-duration: .01ms !important; animation-delay: 0s !important; transition-duration: .01ms !important; transition-delay: 0s !important; scroll-behavior: auto !important; }
  .js .in, .js :is(.reveal, .style-grid > li, .gl-list > .gl-item, .places-grid > .place, .steps > li, .traits > li, .people > li,
    .places > li, .shots > li, .app-steps > li, .app-cats > li, .badges > li, .app-row, .more > .more-card, .app-more > .more-card,
    .pairs > li, .account-grid > .card, .vision-card, .about-card, .facade, .clue, .pn-card, .app-quote) { opacity: 1 !important; transform: none !important; }
}
@media print {
  .to-top, .progress, .drawer, .menu-btn, .secbar { display: none !important; }
  .js * { opacity: 1 !important; transform: none !important; }
}
