:root {
  /* Standardverdier; UtseendeKloss overstyrer --accent-base, --bg-light, fonter, størrelser og meny. */
  --accent-base: #9a6a26;
  --bg-light: #faf6ef;
  --bg: var(--bg-light);
  --paper: #ffffff;
  --ink: #2a221c;
  --muted: #776a5e;
  --line: #e8dfd2;
  --accent: var(--accent-base);
  --accent-ink: #ffffff;
  --accent-soft: color-mix(in srgb, var(--accent-base) 15%, #ffffff);
  --radius: 14px;
  --shadow: 0 1px 2px rgba(60, 40, 20, .06), 0 6px 20px rgba(60, 40, 20, .06);
  --serif: 'Fraunces', Georgia, serif;
  --sans: 'Inter', system-ui, -apple-system, 'Segoe UI', sans-serif;
  --head-weight: 600;
  --base-size: 16px;
  --menu-size: .94rem;
  --menu-weight: 400;
  --menu-case: none;
  --menu-track: .01em;
  --menu-bg: var(--paper);
  --menu-ink: var(--ink);
  --menu-active: var(--accent);
  --menu-active-deco: none;
}
@media (prefers-color-scheme: dark) {
  :root:not([data-mode="lys"]) {
    --bg: #1b1714; --paper: #241f1b; --ink: #f1e9df; --muted: #b3a597; --line: #3a322b;
    --accent: color-mix(in srgb, var(--accent-base) 60%, #ffffff); --accent-ink: #1b1714;
    --accent-soft: color-mix(in srgb, var(--accent-base) 30%, #1b1714);
    --shadow: 0 1px 2px rgba(0,0,0,.3), 0 6px 20px rgba(0,0,0,.25);
  }
}
:root[data-mode="mork"] {
  --bg: #1b1714; --paper: #241f1b; --ink: #f1e9df; --muted: #b3a597; --line: #3a322b;
  --accent: color-mix(in srgb, var(--accent-base) 60%, #ffffff); --accent-ink: #1b1714;
  --accent-soft: color-mix(in srgb, var(--accent-base) 30%, #1b1714);
  --shadow: 0 1px 2px rgba(0,0,0,.3), 0 6px 20px rgba(0,0,0,.25);
}
* { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; }
body { margin: 0; background: var(--bg); color: var(--ink); font: var(--base-size)/1.65 var(--sans); }
img { max-width: 100%; height: auto; }
a { color: var(--accent); text-underline-offset: 3px; }
h1, h2, h3 { font-family: var(--serif); font-weight: var(--head-weight); line-height: 1.2; letter-spacing: -.01em; }
h1 { font-size: clamp(1.9rem, 4vw, 2.6rem); margin: .2em 0 .4em; }
.wrap { max-width: 1080px; margin: 0 auto; padding: 0 16px; }
main.wrap { padding-top: 24px; padding-bottom: 56px; min-height: 50vh; }
.muted { color: var(--muted); }

/* topp */
.top { background: var(--menu-bg); border-bottom: 1px solid var(--line); z-index: 20; }
/* Toppbildet: «original» = egen størrelse, sentrert (aldri større enn skjermen); «fullbredde» = strukket over hele bredden */
.banner { display: block; text-align: center; background: var(--paper); line-height: 0; }
.banner img { display: inline-block; max-width: 100%; height: auto; }
.banner-fullbredde img { display: block; width: 100%; }
.wordmark { display: inline-block; padding: 22px 16px 8px; font: 600 2rem var(--serif); color: var(--ink); line-height: 1.2; }
/* Fast topp på PC (mus/styreplate), uansett vindusbredde. På mobil ruller alt vanlig. */
@media (hover: hover) and (pointer: fine), (min-width: 761px) {
  .top.fixed-begge, .top.fixed-meny { position: sticky; top: 0; }
}
.nav { max-width: 1080px; margin: 0 auto; padding: 0 16px; }
.nav-toggle { display: none; }
.nav-list { list-style: none; margin: 0; padding: 0; display: flex; flex-wrap: wrap; justify-content: center; gap: 0; }
.nav-list > li { position: relative; }
.nav-list > li > a, .nav-list > li > span {
  display: block; padding: 12px 8px; color: var(--menu-ink); text-decoration: none; font-weight: var(--menu-weight); font-size: var(--menu-size);
  letter-spacing: var(--menu-track); text-transform: var(--menu-case); cursor: pointer;
}
.nav-list > li.active > a, .nav-list > li.active > span { color: var(--menu-active); text-decoration: var(--menu-active-deco); text-underline-offset: 6px; }
.nav-list > li.has-kids > a::after, .nav-list > li.has-kids > span::after { content: '▾'; font-size: .7em; color: var(--menu-ink); opacity: .55; margin-left: 3px; }
.sub {
  list-style: none; margin: 0; padding: 8px; position: absolute; left: 50%; top: 100%; transform: translateX(-50%);
  min-width: 220px; background: var(--paper); border: 1px solid var(--line); border-radius: var(--radius); box-shadow: var(--shadow);
  opacity: 0; visibility: hidden; transition: opacity .15s;
}
.has-kids:hover > .sub, .has-kids:focus-within > .sub { opacity: 1; visibility: visible; }
.sub a { display: flex; align-items: center; gap: 10px; padding: 8px 10px; border-radius: 8px; color: var(--ink); text-decoration: none; font-size: .92rem; font-weight: var(--menu-weight); }
.sub a:hover, .sub a[aria-current] { background: var(--accent-soft); }
.sub img { width: 36px; height: 36px; object-fit: cover; border-radius: 50%; flex: none; }

/* Sammenklappet meny bare på berøringsskjerm (mobil/nettbrett). På PC blir menyen liggende, også i smale vinduer. */
@media (max-width: 760px) and (pointer: coarse) {
  .nav { padding: 0; }
  .nav-toggle {
    display: block; width: 100%; padding: 14px 16px; background: none; border: 0; border-top: 1px solid var(--line);
    font: 600 1rem var(--sans); color: var(--menu-ink); text-align: left;
  }
  .nav-toggle::after { content: '☰'; float: right; }
  .nav-list { display: none; flex-direction: column; padding: 0 0 8px; }
  .nav.open .nav-list { display: flex; }
  .nav-list > li > a, .nav-list > li > span { padding: 10px 16px; }
  .sub { position: static; transform: none; opacity: 1; visibility: visible; box-shadow: none; border: 0; padding: 0 8px 0 24px; background: none; }
  .nav-list > li.has-kids > span::after, .nav-list > li.has-kids > a::after { content: ''; }
}

/* innhold */
.prose { max-width: 760px; margin: 0 auto; }
.prose.home { text-align: center; font-size: 1.08rem; }
.prose img { border-radius: 10px; }
.prose table { border-collapse: collapse; width: 100%; margin: 1em 0; display: block; overflow-x: auto; }
.prose td, .prose th { border: 1px solid var(--line); padding: 6px 10px; vertical-align: middle; }
.prose iframe { max-width: 100%; border-radius: 10px; }
.page-h { text-align: center; }
.meta { color: var(--muted); font-size: .92rem; }
.section-title { text-align: center; margin: 48px 0 18px; font-size: 1.6rem; }
.block { margin-top: 48px; }
.block h2 { text-align: center; }
.button {
  display: inline-block; background: var(--accent); color: var(--accent-ink); padding: 10px 18px; border-radius: 999px;
  text-decoration: none; font-weight: 600;
}
.badge { display: inline-block; font: 600 .75rem var(--sans); background: var(--accent-soft); color: var(--accent); padding: 3px 10px; border-radius: 999px; margin: 0; vertical-align: middle; }
.badge.muted { color: var(--muted); }

/* video */
.video { position: relative; aspect-ratio: 16 / 9; margin: 20px 0; }
.video iframe { position: absolute; inset: 0; width: 100%; height: 100%; border: 0; }
.prose video { width: 100%; border-radius: 10px; margin: 12px 0; background: #000; }
.news-cards { max-width: 1080px; margin-top: 32px; }
.prose hr { border: 0; border-top: 1px solid var(--line); margin: 28px 0; }

/* gallerier */
.galleri { display: grid; grid-template-columns: repeat(auto-fill, minmax(150px, 1fr)); gap: 10px; margin: 20px 0; max-width: 1080px; }
.prose .galleri { margin-left: auto; margin-right: auto; }
.bilde { margin: 0; }
.bilde a { display: block; aspect-ratio: 1; overflow: hidden; border-radius: 10px; background: var(--line); }
.bilde img { width: 100%; height: 100%; object-fit: cover; transition: transform .3s; border-radius: 0; }
.bilde a:hover img { transform: scale(1.04); }
.bilde figcaption { font-size: .85rem; color: var(--muted); padding: 6px 2px 0; text-align: center; }

/* kort */
.cards { display: grid; grid-template-columns: repeat(auto-fill, minmax(220px, 1fr)); gap: 18px; margin: 18px 0; }
.card { display: block; background: var(--paper); border-radius: var(--radius); overflow: hidden; box-shadow: var(--shadow); color: var(--ink); text-decoration: none; transition: transform .2s; }
.card:hover { transform: translateY(-3px); }
.card-img { aspect-ratio: 4 / 3; background: var(--accent-soft); }
.card-img img { width: 100%; height: 100%; object-fit: cover; display: block; }
.card-body { padding: 12px 16px 16px; }
.card-body h3 { margin: 0 0 4px; font-size: 1.25rem; }
.card-body .reg { margin: 0; font-size: .9rem; color: var(--muted); }
.card-body .titles { margin: 6px 0 0; font-size: .78rem; color: var(--accent); font-weight: 600; letter-spacing: .02em; }
.parents { max-width: 760px; margin: 18px auto; }

/* hund */
.dog-hero { display: grid; grid-template-columns: minmax(0, 1.1fr) minmax(0, 1fr); gap: 32px; align-items: start; margin-bottom: 32px; }
.dog-photo img { width: 100%; border-radius: var(--radius); box-shadow: var(--shadow); display: block; }
.eyebrow { text-transform: uppercase; letter-spacing: .12em; font-size: .75rem; font-weight: 600; color: var(--muted); margin: 0; }
.reg { font-family: var(--serif); font-size: 1.15rem; margin: 0 0 12px; }
.chips { list-style: none; padding: 0; margin: 0 0 18px; display: flex; flex-wrap: wrap; gap: 6px; }
.chips li { background: var(--accent-soft); color: var(--accent); font-weight: 600; font-size: .8rem; padding: 4px 10px; border-radius: 999px; }
.facts { display: grid; grid-template-columns: auto 1fr; gap: 6px 18px; margin: 0 0 20px; }
.facts dt { color: var(--muted); }
.facts dd { margin: 0; font-weight: 500; }
@media (max-width: 760px) { .dog-hero { grid-template-columns: 1fr; gap: 18px; } }

/* bunn */
.foot { background: var(--paper); border-top: 1px solid var(--line); padding: 32px 0 12px; font-size: .95rem; }
.foot-grid { display: flex; flex-wrap: wrap; gap: 24px 48px; justify-content: space-between; }
.foot ul { list-style: none; margin: 0; padding: 0; }
.foot li { margin: 4px 0; }
.foot a { color: var(--ink); }
.copy { color: var(--muted); font-size: .85rem; margin-top: 24px; }

/* lysboks */
.lightbox { position: fixed; inset: 0; background: rgba(15, 10, 6, .92); z-index: 100; display: flex; align-items: center; justify-content: center; }
.lightbox[hidden] { display: none; }
.lightbox figure { margin: 0; max-width: 92vw; text-align: center; }
.lightbox img { max-height: 84vh; max-width: 92vw; border-radius: 6px; }
.lightbox figcaption { color: #eee; margin-top: 8px; }
.lightbox button { position: absolute; background: none; border: 0; color: #fff; font-size: 2.6rem; cursor: pointer; padding: 12px 18px; line-height: 1; }
.lb-close { top: 4px; right: 4px; }
.lb-prev { left: 0; top: 50%; transform: translateY(-50%); }
.lb-next { right: 0; top: 50%; transform: translateY(-50%); }

/* inforamme */
.notice { display: flex; gap: 20px; align-items: center; max-width: 900px; margin: 0 auto 28px; padding: 18px 22px;
  border-radius: var(--radius); background: var(--paper); box-shadow: var(--shadow); border-left: 6px solid var(--accent); }
.notice h2 { margin: 0 0 6px; font-size: 1.35rem; }
.notice-text p { margin: 0 0 8px; }
.notice p:last-child { margin-bottom: 0; }
.notice-img { width: 120px; height: 120px; object-fit: cover; border-radius: 12px; flex: none; }
.notice-jul { border-left-color: #b3261e; background: linear-gradient(135deg, #fff6f2, #f4fbf4); }
.notice-jul h2 { color: #8e1b14; }
.notice-feiring { border-left-color: #c48a00; background: #fff8e1; }
.notice-viktig { border-left-color: #b3261e; }
@media (prefers-color-scheme: dark) {
  .notice-jul { background: linear-gradient(135deg, #3a201c, #1f2e22); }
  .notice-jul h2 { color: #ffb4a8; }
  .notice-feiring { background: #3a3016; }
}
@media (max-width: 600px) { .notice { flex-direction: column; align-items: flex-start; } .notice-img { width: 100%; height: 160px; } }
.nav-list > li.special-kalender > a { color: #b3261e; font-weight: 600; }
.preview-bar { background: #2e5e8c; color: #fff; text-align: center; padding: 8px 16px; font-weight: 600; position: sticky; top: 0; z-index: 50; }
.preview-bar a { color: #fff; }

/* kalender */
.kalender-head { text-align: center; }
.kalender-top { display: block; max-width: 1080px; width: 100%; max-height: 360px; object-fit: cover; border-radius: var(--radius); margin: 0 auto 24px; }
.luker { display: grid; grid-template-columns: repeat(6, 1fr); gap: 10px; max-width: 900px; margin: 24px auto; }
@media (max-width: 700px) { .luker { grid-template-columns: repeat(4, 1fr); } }
.luke { aspect-ratio: 1; border-radius: 12px; display: flex; align-items: center; justify-content: center;
  font: 600 clamp(1.2rem, 4vw, 2rem) var(--serif); border: 0; }
.luke.open { background: #8e1b14; color: #fff; cursor: pointer; box-shadow: 0 3px 0 #5e100b; transition: transform .15s; }
.luke.open:hover { transform: translateY(-2px) rotate(-1deg); }
.luke.open.seen { background: #2f5d3a; box-shadow: 0 3px 0 #1d3b25; }
.luke.locked { background: var(--accent-soft); color: var(--muted); cursor: not-allowed; }
.luke.today { outline: 3px solid #c48a00; outline-offset: 2px; }
.luke-dialog { border: 0; border-radius: var(--radius); padding: 24px; max-width: min(640px, 92vw); width: 100%; background: var(--paper); color: var(--ink); }
.luke-dialog::backdrop { background: rgba(15, 10, 6, .7); }
.luke-dialog img { width: 100%; border-radius: 10px; margin: 8px 0; }
.luke-dialog h2 { margin: 0 0 8px; }
.luke-close { float: right; background: none; border: 0; font-size: 2rem; line-height: 1; cursor: pointer; color: var(--ink); }

/* Magazinet */
.mag-cover { aspect-ratio: 3 / 4; display: flex; align-items: center; justify-content: center; }
.pdf-icon { font: 700 1.6rem var(--sans); color: #fff; background: #b3261e; padding: 14px 18px; border-radius: 8px; letter-spacing: .05em; }
.mags { grid-template-columns: repeat(auto-fill, minmax(200px, 1fr)); }
.mag-actions { display: flex; gap: 10px; flex-wrap: wrap; }
.button.ghost { background: transparent; color: var(--accent); box-shadow: inset 0 0 0 1.5px var(--accent); }
/* bla-i-bladet */
.bok { max-width: 1180px; margin: 24px auto 0; padding: 24px 12px 16px; border-radius: var(--radius); background: #3d3a37; position: relative; }
.bok.full { position: fixed; inset: 0; z-index: 1000; max-width: none; margin: 0; border-radius: 0; padding: 16px 12px;
  display: flex; flex-direction: column; justify-content: center; background: #2b2826; }
.bok-full-aktiv, .bok-full-aktiv body { overflow: hidden; }
.bok-status { color: #eee; text-align: center; padding: 60px 16px; }
.bok-status a { color: #ffd88a; }
.bok-sider { margin: 0 auto; }
.bok-side { background: #fff; }
.bok-side img { width: 100%; height: 100%; object-fit: contain; display: block; background: #fff; }
.bok-kontroller { display: flex; align-items: center; justify-content: center; gap: 14px; margin-top: 16px; color: #eee; }
.bok-kontroller[hidden] { display: none; }
.bok-kontroller button, .bok-kontroller a { background: rgba(255,255,255,.12); color: #fff; border: 0; border-radius: 999px; width: 44px; height: 44px;
  font-size: 1.5rem; line-height: 44px; text-align: center; cursor: pointer; text-decoration: none; }
.bok-kontroller button:hover, .bok-kontroller a:hover { background: rgba(255,255,255,.25); }
.bok-teller { min-width: 110px; text-align: center; font-size: .95rem; }

/* utstillinger */
.year-chips { display: flex; flex-wrap: wrap; gap: 8px; justify-content: center; margin: 0 0 8px; }
.year-chips a { padding: 6px 14px; border-radius: 999px; background: var(--accent-soft); color: var(--accent); text-decoration: none; font-weight: 500; }
.year-chips a.on { background: var(--accent); color: var(--accent-ink); }

.page-intro { text-align: center; color: var(--muted); margin-top: -8px; }
