/* Plus Jakarta Sans (SIL OFL, fonts/plus-jakarta-sans-OFL.txt): én variabel fil for alle vekter, latin og latin-ext */
@font-face {
  font-family: "Plus Jakarta Sans";
  font-style: normal;
  font-weight: 200 800;
  font-display: swap;
  src: url("/fonts/plus-jakarta-sans-latin-wght-normal.woff2") format("woff2-variations"), url("/fonts/plus-jakarta-sans-latin-wght-normal.woff2") format("woff2");
  unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA, U+02DC, U+0304, U+0308, U+0329, U+2000-206F, U+20AC, U+2122, U+2191, U+2193, U+2212, U+2215, U+FEFF, U+FFFD;
}
@font-face {
  font-family: "Plus Jakarta Sans";
  font-style: normal;
  font-weight: 200 800;
  font-display: swap;
  src: url("/fonts/plus-jakarta-sans-latin-ext-wght-normal.woff2") format("woff2-variations"), url("/fonts/plus-jakarta-sans-latin-ext-wght-normal.woff2") format("woff2");
  unicode-range: U+0100-02BA, U+02BD-02C5, U+02C7-02CC, U+02CE-02D7, U+02DD-02FF, U+0304, U+0308, U+0329, U+1D00-1DBF, U+1E00-1E9F, U+1EF2-1EFF, U+2020, U+20A0-20AB, U+20AD-20C0, U+2113, U+2C60-2C7F, U+A720-A7FF;
}
/* MangaTxt – de offentlige sidene (forside, katalog, seriesider). Mørkt, lilla aksent, mangaruter som visuell idé.
   Mobil først. Fontene ligger på egen server: Plus Jakarta Sans for tekst, Comic Neue bare i boblene i demoen. */
@font-face {
  font-family: "Comic Neue";
  font-style: normal;
  font-weight: 700;
  font-display: swap;
  src: url("/fonts/comic-neue-latin-700-normal.woff2") format("woff2");
}

:root {
  --bg: #0c0d16;
  --surface: #151623;
  --surface-2: #1c1d2d;
  --border: rgba(245, 243, 240, .09);
  --text: #f5f3f0;
  --text-2: #acabbc;
  --accent: #9265ff;
  --accent-hover: #a47dff;
  --lime: #d8f28a;
  --ink: #05060b;
  --radius: 16px;
  --font: "Plus Jakarta Sans", "Segoe UI Variable", "Segoe UI", system-ui, -apple-system, Roboto, sans-serif;
  --bubble-font: "Comic Neue", "Comic Sans MS", var(--font);
  color-scheme: dark;
}

*, *::before, *::after { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; scroll-padding-top: 84px; }
.sr-only { position: absolute; width: 1px; height: 1px; padding: 0; margin: -1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; border: 0; }
@media (prefers-reduced-motion: no-preference) { html { scroll-behavior: smooth; } }
body {
  margin: 0; background: var(--bg); color: var(--text); font: 17px/1.6 var(--font);
  overflow-x: hidden;
}
img { max-width: 100%; height: auto; display: block; }
a { color: inherit; }
h1, h2, h3, h4 { line-height: 1.15; letter-spacing: -0.02em; margin: 0 0 .5em; }
h2 { font-size: clamp(1.6rem, 4.2vw, 2.3rem); }
h3 { font-size: 1.15rem; }
p { margin: 0 0 1em; }
:focus-visible { outline: 3px solid var(--lime); outline-offset: 3px; border-radius: 6px; }

.wrap { width: min(1160px, 100%); margin: 0 auto; padding: 0 16px; }
.wrap.narrow { width: min(760px, 100%); }
.skip { position: absolute; left: 12px; top: -60px; z-index: 10; padding: 10px 16px; background: var(--lime); color: var(--ink); border-radius: 10px; font-weight: 700; text-decoration: none; }
.skip:focus { top: 12px; }

/* Topp */
.site-head { position: sticky; top: 0; z-index: 5; background: rgba(12, 13, 22, .88); backdrop-filter: blur(10px); border-bottom: 1px solid var(--border); }
.head-row { display: flex; align-items: center; gap: 16px; min-height: 60px; }
.brand { display: inline-flex; align-items: center; gap: 10px; font-weight: 800; font-size: 1.15rem; text-decoration: none; letter-spacing: -0.02em; }
.brand .accent { color: var(--accent); }
.logo .pl { fill: var(--text); } .logo .pr { fill: var(--accent); }
.head-nav { display: none; gap: 6px; }
.head-nav a, .head-end a { display: inline-flex; align-items: center; min-height: 44px; padding: 0 10px; text-decoration: none; color: var(--text-2); font-weight: 600; font-size: .95rem; border-radius: 10px; }
.head-nav a:hover, .head-end a:hover { color: var(--text); }
.head-end { margin-left: auto; display: flex; align-items: center; gap: 6px; }
/* NO | EN: valgt språk markert */
.lang { display: inline-flex; padding: 3px; border: 1px solid var(--border); border-radius: 99px; }
.lang a { min-height: 44px; min-width: 44px; justify-content: center; padding: 0 12px; border-radius: 99px; font-size: .85rem; letter-spacing: .04em; }
.head-end .lang a[aria-current] { background: var(--surface-2); color: var(--text); box-shadow: inset 0 0 0 1px rgba(146, 101, 255, .55); }
@media (min-width: 760px) { .head-nav { display: flex; } }

/* Knapper */
.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 8px; min-height: 48px; padding: 0 22px;
  border-radius: 99px; font-weight: 700; text-decoration: none; border: 1px solid transparent; font-size: 1rem;
  transition: background-color .15s ease, border-color .15s ease, transform .15s ease;
}
.btn-primary { background: var(--accent); color: #fff; }
.btn-primary:hover { background: var(--accent-hover); }
.btn-ghost { border-color: rgba(245, 243, 240, .25); color: var(--text); }
.btn-ghost:hover { border-color: var(--text); }
.btn-small { min-height: 44px; padding: 0 16px; font-size: .92rem; background: var(--surface-2); border-color: var(--border); }
.btn-small:hover { border-color: var(--accent); }
.btn-large { min-height: 56px; padding: 0 30px; font-size: 1.1rem; }
.text-link { color: var(--accent-hover); font-weight: 700; text-decoration: none; }
.text-link:hover { text-decoration: underline; }

/* Første skjermbilde */
.hero { padding: 40px 0 24px; }
.hero-grid { display: grid; gap: 32px; align-items: center; }
.badge { display: inline-block; margin: 0 0 18px; padding: 6px 14px; border-radius: 99px; background: rgba(216, 242, 138, .12); color: var(--lime); font-weight: 700; font-size: .9rem; }
.hero h1 { font-size: clamp(2.15rem, 7.4vw, 4rem); font-weight: 850; margin-bottom: 18px; text-wrap: balance; }
.lead { font-size: clamp(1.05rem, 2.6vw, 1.25rem); color: var(--text-2); max-width: 34em; }
.cta-row { display: flex; flex-wrap: wrap; gap: 12px; margin: 26px 0 14px; }
.login-nudge { font-size: .95rem; color: var(--text-2); }
.login-nudge a { color: var(--text-2); text-underline-offset: 3px; }
.login-nudge a:hover { color: var(--text); }
@media (min-width: 900px) { .hero { padding: 72px 0 40px; } .hero-grid { grid-template-columns: 1.15fr .85fr; gap: 56px; } }

/* Demoruten i første skjermbilde: én ekte rute, fast størrelse, original/oversatt-veksling */
.demo { margin: 0; width: 100%; max-width: 520px; justify-self: center; }
.demo-crop { position: relative; aspect-ratio: 4 / 3; overflow: hidden; background: #fff; border: 3px solid #fff; border-radius: 6px; outline: 10px solid var(--ink); outline-offset: 0; box-shadow: 0 30px 80px rgba(146, 101, 255, .18); transform: rotate(-1deg); }
.demo-page { position: absolute; inset: 0; }
.demo-page img { width: 100%; height: 100%; object-fit: cover; }
.demo.zoomed .demo-page { inset: auto; }
.demo.zoomed .demo-page img { object-fit: fill; }
.demo.show-original .overlay { display: none; }
.demo .toggle { display: flex; width: fit-content; margin: 22px auto 10px; }
.demo .toggle[hidden] { display: none; }
.demo .caption { text-align: center; font-size: .88rem; }

/* Seksjoner */
.section { padding: 48px 0; }
.section.tight { padding: 28px 0; }
.section-head { display: flex; flex-wrap: wrap; align-items: baseline; justify-content: space-between; gap: 8px 16px; }
.section-lead { color: var(--text-2); max-width: 40em; }
.note { color: var(--text-2); font-size: .95rem; }
.count { color: var(--text-2); font-weight: 600; font-size: .7em; margin-left: 6px; }

/* Kort: det som kan leses nå */
.shelf { list-style: none; padding: 0; margin: 20px 0 0; display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 18px 14px; }
@media (min-width: 640px) { .shelf { grid-template-columns: repeat(3, minmax(0, 1fr)); } }
@media (min-width: 980px) { .shelf { grid-template-columns: repeat(5, minmax(0, 1fr)); gap: 26px 20px; } }
.card { display: flex; flex-direction: column; gap: 10px; min-width: 0; }
.card-cover { display: block; border-radius: 12px; overflow: hidden; background: var(--surface); border: 2px solid var(--ink); box-shadow: 0 0 0 1px var(--border); }
.card-cover img { width: 100%; aspect-ratio: 256 / 364; object-fit: cover; }
.card-body h3, .card-body h4 { font-size: 1rem; margin: 2px 0 2px; overflow-wrap: anywhere; }
.card-body h3 a, .card-body h4 a { text-decoration: none; }
.card-body h3 a:hover, .card-body h4 a:hover { text-decoration: underline; }
.card-meta { color: var(--text-2); font-size: .9rem; margin: 0 0 10px; }
.tags { display: flex; flex-wrap: wrap; gap: 6px; margin: 0; }
.pill-ready, .pill-muted, .pill-ai, .lang-tag { display: inline-block; padding: 2px 9px; border-radius: 99px; font-size: .75rem; font-weight: 700; line-height: 1.7; }
.pill-ready { background: var(--lime); color: var(--ink); }
.pill-ai { background: rgba(146, 101, 255, .2); color: #cbb6ff; margin-right: 6px; }
.lang-tag { background: var(--surface-2); color: var(--text-2); }
/* Sjangerfilteret: lukket som standard, «Sjanger ▾» åpner chipsene */
.genre-filter { margin: 0 0 20px; }
.genre-filter summary { display: inline-flex; align-items: center; gap: 6px; min-height: 36px; padding: 6px 14px; border-radius: 99px; background: var(--surface-2); color: var(--text); font-size: .85rem; font-weight: 600; cursor: pointer; list-style: none; }
.genre-filter summary::-webkit-details-marker { display: none; }
.genre-filter summary::after { content: "▾"; font-size: .8em; transition: transform .15s; }
.genre-filter[open] summary::after { transform: rotate(180deg); }
.genre-filter summary.active { background: var(--accent); color: #fff; }
.genre-filter[open] .genre-chips { margin-top: 12px; }
.genre-chips { display: flex; flex-wrap: wrap; gap: 8px; margin: 0; padding: 0; list-style: none; }
.genre-chips a { display: inline-block; padding: 6px 14px; border-radius: 99px; background: var(--surface-2); color: var(--text); font-size: .85rem; font-weight: 600; text-decoration: none; }
.genre-chips a:hover { background: var(--surface); }
.genre-chips a[aria-current="true"] { background: var(--accent); color: #fff; }
.pill-muted { border: 1px dashed rgba(245, 243, 240, .35); color: var(--text-2); }
/* Kan bes om: tydelig annerledes enn det som kan leses nå */
.card-muted .card-cover { opacity: .55; filter: grayscale(.6); border-style: dashed; }
.discover { margin-top: 36px; padding-top: 28px; border-top: 1px solid var(--border); }
.shelf-muted { grid-template-columns: repeat(3, minmax(0, 1fr)); }
@media (min-width: 980px) { .shelf-muted { grid-template-columns: repeat(6, minmax(0, 1fr)); } }

.toggle { display: inline-flex; padding: 4px; gap: 4px; background: var(--surface); border: 1px solid var(--border); border-radius: 99px; }
.toggle button { min-height: 44px; padding: 0 20px; border: 0; border-radius: 99px; background: transparent; color: var(--text-2); font: 700 1rem var(--font); cursor: pointer; }
.toggle button[aria-pressed="true"] { background: var(--accent); color: #fff; }
.caption { color: var(--text-2); font-size: .92rem; }

/* Begynn her: kompakt kort med omslaget ved siden av teksten; flere serier blir et rutenett av samme kort */
.picks { list-style: none; padding: 0; margin: 18px 0 0; display: grid; gap: 16px; grid-template-columns: repeat(auto-fill, minmax(min(100%, 340px), 1fr)); }
.picks.single { grid-template-columns: minmax(0, 720px); }
.pick { display: grid; grid-template-columns: 104px 1fr; gap: 16px; padding: 14px; background: var(--surface); border: 1px solid var(--border); border-radius: var(--radius); align-items: start; }
@media (min-width: 640px) { .pick { grid-template-columns: 150px 1fr; gap: 22px; padding: 18px; } }
.pick-cover { display: block; border-radius: 10px; overflow: hidden; border: 2px solid var(--ink); box-shadow: 0 0 0 1px var(--border); }
.pick-cover img { width: 100%; aspect-ratio: 256 / 364; object-fit: cover; }
.pick-body h3 { font-size: clamp(1.15rem, 3.4vw, 1.5rem); margin: 6px 0 4px; overflow-wrap: anywhere; }
.pick-body h3 a { text-decoration: none; }
.pick-body h3 a:hover { text-decoration: underline; }
.pick-meta { color: var(--text-2); font-size: .92rem; margin: 0 0 6px; }
.pick-count { font-weight: 700; margin: 0 0 14px; }

/* Boblene (samme regler som i leseren) */
.overlay { position: absolute; inset: 0; pointer-events: none; }
.bubble {
  position: absolute; display: flex; align-items: center; justify-content: center; text-align: center; color: #111;
  font-family: var(--bubble-font); font-weight: 700; line-height: 1.12; border-radius: 10%; padding: 1px;
  overflow: hidden; word-break: normal; overflow-wrap: normal; hyphens: manual; text-wrap: balance;
}
.bubble.sfx { display: block; width: auto; height: auto; padding: 2px 7px; border-radius: 6px; background: rgba(11, 15, 30, .82); color: #E8E9F3; font-family: var(--font); font-weight: 600; font-style: italic; line-height: 1.3; overflow: visible; }
.bubble.narration { border-radius: 2px; }
.bubble-mask { position: absolute; pointer-events: none; }
.bubble.shaped { background: transparent; border-radius: 0; padding: 0; overflow: visible; }

/* Tre fordeler */
.benefits { list-style: none; margin: 20px 0 0; padding: 0; display: grid; gap: 14px; }
@media (min-width: 860px) { .benefits { grid-template-columns: repeat(3, minmax(0, 1fr)); } }
.benefits li { padding: 20px; background: var(--surface); border: 1px solid var(--border); border-radius: var(--radius); }
.benefits svg { fill: none; stroke: var(--accent); stroke-width: 1.8; stroke-linecap: round; stroke-linejoin: round; margin-bottom: 8px; }
.benefits p { color: var(--text-2); margin: 0; }
.account-note { margin-top: 16px; }

/* Forespørsler: kort med én knapp; detaljene i en utfellbar forklaring */
.request-card { max-width: 760px; padding: 24px; background: var(--surface); border: 1px solid var(--border); border-radius: 20px; }
.request-card h2 { font-size: clamp(1.4rem, 4vw, 1.9rem); }
.request-card > p { color: var(--text-2); }
.request-details summary { cursor: pointer; min-height: 44px; display: flex; align-items: center; font-weight: 700; color: var(--accent-hover); }
.steps { margin: 8px 0 12px; padding-left: 1.5em; display: grid; gap: 8px; }
.steps li { padding-left: 4px; }
.steps li::marker { color: var(--accent-hover); font-weight: 800; }

/* Spørsmål og svar: details/summary virker med tastatur uten JavaScript */
.faq details { border-bottom: 1px solid var(--border); }
.faq summary { cursor: pointer; list-style: none; padding: 18px 40px 18px 0; font-weight: 700; font-size: 1.08rem; position: relative; }
.faq summary::-webkit-details-marker { display: none; }
.faq summary::after { content: "+"; position: absolute; right: 6px; top: 14px; font-size: 1.5rem; color: var(--accent); }
.faq details[open] summary::after { content: "–"; }
.faq details p { color: var(--text-2); padding-bottom: 8px; }

/* Avslutning */
.final-box { text-align: center; padding: 48px 20px; background: var(--surface); border-radius: 24px; border: 1px solid var(--border); position: relative; overflow: hidden; }
.final-box::before { content: ""; position: absolute; inset: 10px; border: 3px solid var(--ink); border-radius: 16px; pointer-events: none; }
.final-box h2 { font-size: clamp(1.7rem, 5vw, 2.6rem); max-width: 18em; margin: 0 auto 22px; text-wrap: balance; }

/* Katalog og serie */
.page-title { font-size: clamp(2rem, 6vw, 3rem); margin-top: 8px; overflow-wrap: anywhere; }
.crumbs ol { list-style: none; display: flex; flex-wrap: wrap; gap: 6px; padding: 0; margin: 22px 0 6px; color: var(--text-2); font-size: .92rem; }
.crumbs li + li::before { content: "›"; margin-right: 6px; }
.crumbs a { color: var(--text-2); }
.series-head { display: grid; gap: 22px; margin: 10px 0 10px; }
@media (min-width: 720px) { .series-head { grid-template-columns: 240px 1fr; gap: 36px; } }
.series-cover img { width: min(240px, 60vw); aspect-ratio: 256 / 364; object-fit: cover; border-radius: 12px; border: 3px solid #fff; outline: 8px solid var(--ink); }
.alt { color: var(--text-2); margin-top: -6px; }
.series-meta { color: var(--text-2); }
.genres { display: flex; flex-wrap: wrap; gap: 6px; }
.genres span { padding: 3px 10px; border-radius: 99px; background: var(--surface-2); color: var(--text-2); font-size: .85rem; }
.small-h { font-size: 1rem; text-transform: uppercase; letter-spacing: .06em; color: var(--text-2); margin-top: 18px; }
.availability { list-style: none; padding: 0; margin: 0; display: grid; gap: 10px; }
.availability li { display: flex; flex-wrap: wrap; align-items: center; gap: 8px 12px; padding: 12px 14px; background: var(--surface); border-radius: 12px; border: 1px solid var(--border); }
.availability .btn { margin-left: auto; }
.request-box { margin: 18px 0; padding: 20px; border-radius: var(--radius); border: 1px dashed rgba(245, 243, 240, .25); }
.request-box h2 { font-size: 1.25rem; }
.chapters { list-style: none; padding: 0; margin: 0; border-top: 1px solid var(--border); }
.chapters li { display: flex; flex-wrap: wrap; justify-content: space-between; gap: 4px 12px; padding: 12px 2px; border-bottom: 1px solid var(--border); }
.chapters a { font-weight: 600; text-decoration: none; overflow-wrap: anywhere; }
.chapters a:hover { text-decoration: underline; color: var(--accent-hover); }
.ch-meta { color: var(--text-2); font-size: .88rem; }
.desc { color: var(--text-2); white-space: pre-line; max-width: 46em; }
.notfound { padding: 60px 16px; }

/* Bunn */
.site-foot { margin-top: 40px; padding: 32px 0 48px; border-top: 1px solid var(--border); color: var(--text-2); font-size: .92rem; }
.foot-grid { display: grid; gap: 18px; }
.foot-grid nav { display: flex; flex-wrap: wrap; gap: 18px; }
.foot-grid a { color: var(--text-2); }
.trust { max-width: 52em; margin: 0; }

@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { transition: none !important; animation: none !important; }
}
