/*
  Kennel Agua Dee Lion – handwritten stylesheet. Mobile first: the base is the
  phone, @media (min-width) adds for larger screens. One variable font
  (Bricolage Grotesque, cut to wght 300–800 and opsz 12–96).
  Colours: green-black ink, warm ivory, and the sun (Sol was the first mother).
  The sun is a surface and a button with dark text, never text on light ground.
*/
@font-face {
  font-family: 'Bricolage';
  src: url('fonter/bricolage.woff2') format('woff2');
  font-weight: 300 800;
  font-display: swap;
}

:root {
  --ink: #141a16;
  --papir: #f3eee4;
  --tonet: #e9e2d3;
  --kort: #fbf8f2;
  --dempet: #4a524b;
  --sol: #ef7a35;
  --sol-lys: #f6b388;
  --linje: rgba(20, 26, 22, .16);
  --lys: #f3eee4;
  --lys-dempet: #b6bcb2;
  --av: #8a9288;
  --radius: 22px;
  --gutter: 20px;
  --hurtig: 76px;
  color-scheme: light;
  interpolate-size: allow-keywords;
}

*, *::before, *::after { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; scroll-padding-top: 84px; }
@media (prefers-reduced-motion: no-preference) { html { scroll-behavior: smooth; } }
@view-transition { navigation: auto; }

body {
  margin: 0;
  background: var(--papir);
  color: var(--ink);
  font-family: 'Bricolage', ui-sans-serif, system-ui, sans-serif;
  font-optical-sizing: auto;
  font-size: 17px;
  line-height: 1.6;
  padding-bottom: calc(var(--hurtig) + env(safe-area-inset-bottom));
}
img { display: block; max-width: 100%; height: auto; }
a { color: inherit; }
p { margin: 0 0 1em; text-wrap: pretty; }
h1, h2, h3, h4 { margin: 0; font-weight: 720; line-height: 1.08; letter-spacing: -.02em; text-wrap: balance; }
em { font-style: normal; }
small { font-size: .82em; }
ul, ol { margin: 0; padding: 0; list-style: none; }
dl, dd, figure { margin: 0; }
:focus-visible { outline: 3px solid var(--sol); outline-offset: 3px; border-radius: 6px; }

.vh { position: absolute !important; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); clip-path: inset(50%); white-space: nowrap; }
.hopp { position: absolute; left: 12px; top: -60px; z-index: 50; background: var(--ink); color: var(--lys); padding: 10px 16px; border-radius: 10px; }
.hopp:focus { top: 12px; }

.ramme { width: 100%; max-width: 1200px; margin: 0 auto; padding: 0 var(--gutter); }

/* ---------- type ---------- */
.merk { display: inline-flex; align-items: center; gap: 8px; font-size: .78rem; font-weight: 650; letter-spacing: .14em; text-transform: uppercase; color: var(--dempet); margin: 0 0 14px; }
.merk svg { width: 14px; height: 14px; color: var(--sol); }
.merk--lys { color: var(--lys-dempet); }
.tittel { font-size: clamp(2rem, 7vw, 3.6rem); font-weight: 760; letter-spacing: -.035em; line-height: 1; margin-bottom: .4em; }
.tittel--stor { font-size: clamp(2.6rem, 12vw, 6.2rem); line-height: .95; letter-spacing: -.035em; font-weight: 780; }
.tittel--side { font-size: clamp(2.5rem, 10vw, 5rem); line-height: .96; letter-spacing: -.04em; }
.tittel--liten { font-size: clamp(1.7rem, 5.6vw, 2.6rem); }
.ingress { font-size: clamp(1.1rem, 3.6vw, 1.32rem); line-height: 1.5; color: var(--dempet); max-width: 38em; }
.ingress--lys { color: var(--lys-dempet); }
.smaa { font-size: .88rem; color: var(--dempet); }
.lenke { display: inline-flex; align-items: center; gap: 6px; font-weight: 650; text-decoration: underline; text-decoration-thickness: 2px; text-underline-offset: 4px; text-decoration-color: var(--sol); }
.lenke svg { width: 18px; height: 18px; flex: none; }
.lenke:hover { text-decoration-color: currentColor; }
.bryt { overflow-wrap: anywhere; }
.lesetekst { max-width: 36em; }
.lesetekst h2 { margin-top: 1.4em; }
.lesetekst h2:first-child { margin-top: 0; }

/* ---------- buttons ---------- */
.knapp { display: inline-flex; align-items: center; justify-content: center; gap: 10px; min-height: 52px; padding: 0 24px; border: 0; border-radius: 999px; background: var(--ink); color: var(--lys); font: inherit; font-weight: 680; font-size: 1rem; text-decoration: none; cursor: pointer; transition: transform .2s ease, background .2s ease; }
.knapp svg { width: 20px; height: 20px; flex: none; }
.knapp:hover { transform: translateY(-2px); }
.knapp:active { transform: none; }
.knapp--sol { background: var(--sol); color: var(--ink); }
.knapp--mork { background: var(--ink); color: var(--lys); }
.knapp--omriss { background: transparent; color: var(--ink); box-shadow: inset 0 0 0 2px var(--ink); }
.knapp--liten { min-height: 44px; padding: 0 18px; font-size: .95rem; }

/* ---------- header ---------- */
.topp { position: sticky; top: 0; z-index: 30; background: color-mix(in srgb, var(--papir) 92%, transparent); backdrop-filter: blur(12px); -webkit-backdrop-filter: blur(12px); border-bottom: 1px solid var(--linje); }
.topp__inn { display: flex; align-items: center; gap: 16px; min-height: 64px; }
.logo { display: inline-flex; align-items: center; gap: 10px; text-decoration: none; margin-right: auto; }
.merke { width: 34px; height: 34px; flex: none; color: var(--ink); }
.ordmerke { font-weight: 780; font-size: 1.22rem; letter-spacing: -.03em; }
.meny, .topp__knapp { display: none; }
.mobilmeny { position: relative; }
.mobilmeny summary { list-style: none; cursor: pointer; }
.mobilmeny summary::-webkit-details-marker { display: none; }
.mobilmeny summary > span { display: grid; place-items: center; width: 48px; height: 48px; border-radius: 999px; background: var(--ink); color: var(--lys); }
.mobilmeny summary svg { width: 22px; height: 22px; }
.mobilmeny nav { position: absolute; right: 0; top: calc(100% + 10px); width: min(300px, calc(100vw - 2 * var(--gutter))); background: var(--ink); color: var(--lys); border-radius: 20px; padding: 10px; box-shadow: 0 24px 48px -20px rgba(0,0,0,.5); }
.mobilmeny nav a { display: block; padding: 13px 14px; border-radius: 12px; text-decoration: none; font-weight: 620; font-size: 1.08rem; }
.mobilmeny nav a[aria-current="page"] { background: rgba(243,238,228,.1); color: var(--sol-lys); }

@media (min-width: 1000px) {
  .mobilmeny { display: none; }
  .meny { display: flex; gap: 4px; }
  .meny a { padding: 10px 12px; border-radius: 999px; text-decoration: none; font-weight: 600; font-size: .98rem; }
  .meny a:hover { background: var(--tonet); }
  .meny a[aria-current="page"] { box-shadow: inset 0 -2px 0 var(--sol); border-radius: 0; }
  .topp__knapp { display: inline-flex; }
}

/* ---------- hero ---------- */
.helt { padding: 16px 0 40px; }
.helt__inn { display: grid; gap: 22px; }
.helt__tekst .ingress { margin-bottom: 24px; }
.helt__knapper { display: flex; flex-wrap: wrap; align-items: center; gap: 14px 22px; margin-bottom: 26px; }
.helt__alfa { display: flex; flex-wrap: wrap; align-items: center; gap: 6px; }
.helt__alfa .smaa { width: 100%; margin-bottom: 2px; }
.helt__alfa a { display: grid; place-items: center; width: 36px; height: 44px; border-radius: 10px; background: var(--kort); box-shadow: inset 0 0 0 1px var(--linje); font-weight: 760; font-size: 1.15rem; text-decoration: none; transition: background .2s, transform .2s; }
.helt__alfa a:hover { background: var(--ink); color: var(--lys); transform: translateY(-2px); }
.helt__alfa a.neste { background: transparent; box-shadow: inset 0 0 0 2px var(--sol); outline: 2px dashed transparent; }
.helt__bilde { position: relative; order: -1; border-radius: var(--radius); overflow: hidden; height: 30svh; min-height: 200px; background: var(--tonet); }
.helt__bilde picture { display: contents; }
.helt__bilde img { width: 100%; height: 100%; object-fit: cover; object-position: 50% 40%; }
.helt__bilde figcaption { position: absolute; left: 12px; bottom: 12px; background: rgba(20,26,22,.78); color: var(--lys); font-size: .82rem; font-weight: 600; padding: 6px 12px; border-radius: 999px; }
@media (min-width: 900px) {
  .helt { padding: 56px 0 88px; }
  .helt__inn { grid-template-columns: 1.15fr .85fr; align-items: center; gap: 56px; }
  .helt__bilde { order: 0; height: auto; aspect-ratio: 4 / 5; }
  .helt__bilde img { object-position: 50% 62%; }
  .helt__alfa a { width: 42px; height: 50px; font-size: 1.3rem; }
  .helt__alfa .smaa { width: auto; margin: 0 8px 0 0; }
}

/* ---------- sections ---------- */
.kapittel { padding: 64px 0; }
.kapittel--tonet { background: var(--tonet); }
.kapittel__hode { display: flex; flex-wrap: wrap; justify-content: space-between; align-items: end; gap: 12px 24px; margin-bottom: 20px; }
.kapittel__hode .tittel { margin-bottom: 0; }
.sidetopp { padding: 40px 0 36px; }
.todelt { display: grid; gap: 36px; }
.todelt > * { min-width: 0; }
@media (min-width: 900px) {
  .kapittel { padding: 104px 0; }
  .sidetopp { padding: 80px 0 56px; }
  .todelt { grid-template-columns: 1fr 1fr; gap: 64px; align-items: start; }
}
.rund { border-radius: var(--radius); overflow: hidden; }
.rund img { width: 100%; }
.rund--liten { max-width: 360px; margin: 24px 0; }
.boks { background: var(--kort); border-radius: 18px; padding: 20px 22px; box-shadow: inset 0 0 0 1px var(--linje); }
.boks h3 { font-size: 1.15rem; margin-bottom: 8px; }
.boks p:last-child { margin: 0; }

/* ---------- the litter alphabet (the grip) ---------- */
.kullene { background: var(--ink); color: var(--lys); padding: 64px 0 72px; }
.kullene .tittel { color: var(--lys); }
.alfa { border: 0; margin: 28px 0 20px; padding: 0; min-width: 0; }
.alfa__rad { display: flex; gap: 8px; overflow-x: auto; scroll-snap-type: x mandatory; padding: 4px 4px 12px; margin: 0 -4px; scrollbar-width: none; }
.alfa__rad::-webkit-scrollbar { display: none; }
.alfa__b { position: relative; flex: none; scroll-snap-align: start; display: grid; place-items: center; width: 62px; height: 76px; border-radius: 16px; cursor: pointer; font-weight: 800; font-size: 2.6rem; line-height: 1; color: var(--av); box-shadow: inset 0 0 0 1px rgba(243,238,228,.16); transition: color .2s, background .2s, transform .25s; }
.alfa__b input { position: absolute; inset: 0; opacity: 0; margin: 0; cursor: pointer; }
.alfa__b:hover { color: var(--lys); }
.alfa__b:has(input:checked) { background: var(--sol); color: var(--ink); box-shadow: none; transform: translateY(-4px); }
.alfa__b:has(input:focus-visible) { outline: 3px solid var(--lys); outline-offset: 3px; }
.alfa__b--j { box-shadow: inset 0 0 0 2px var(--sol); color: var(--sol-lys); border-style: dashed; }
@media (min-width: 900px) {
  .kullene { padding: 104px 0 112px; }
  .alfa__rad { overflow: visible; gap: 10px; }
  .alfa__b { width: auto; flex: 1; height: 112px; font-size: 4.4rem; border-radius: 20px; }
}

.kull__panel { display: none; background: rgba(243,238,228,.06); border-radius: var(--radius); padding: 24px 20px; box-shadow: inset 0 0 0 1px rgba(243,238,228,.12); }
.kullene:has(input[value="a"]:checked) [data-kull="a"],
.kullene:has(input[value="b"]:checked) [data-kull="b"],
.kullene:has(input[value="c"]:checked) [data-kull="c"],
.kullene:has(input[value="d"]:checked) [data-kull="d"],
.kullene:has(input[value="e"]:checked) [data-kull="e"],
.kullene:has(input[value="f"]:checked) [data-kull="f"],
.kullene:has(input[value="g"]:checked) [data-kull="g"],
.kullene:has(input[value="h"]:checked) [data-kull="h"],
.kullene:has(input[value="i"]:checked) [data-kull="i"],
.kullene:has(input[value="j"]:checked) [data-kull="j"] { display: grid; gap: 22px; }
@media (prefers-reduced-motion: no-preference) {
  .kull__panel { animation: inn .35s ease both; }
  @keyframes inn { from { transform: translateY(10px); } }
}
.kull__hode { display: flex; align-items: center; gap: 16px; }
.kull__bokstav { margin: 0; display: grid; place-items: center; width: 72px; height: 72px; border-radius: 50%; background: var(--sol); color: var(--ink); font-weight: 800; font-size: 2.6rem; line-height: 1; flex: none; }
.kull__hode h3 { font-size: 1.7rem; color: var(--lys); }
.kull__aar { margin: 4px 0 0; color: var(--lys-dempet); font-variant-numeric: tabular-nums; }
.kull__foreldre { display: grid; gap: 12px; }
.kull__foreldre dt, .kull__navn h4, .hd__tittel { font-size: .74rem; font-weight: 650; letter-spacing: .14em; text-transform: uppercase; color: var(--lys-dempet); margin: 0 0 4px; }
.kull__foreldre dd { font-size: 1.08rem; font-weight: 560; }
.kull__tall { display: flex; flex-wrap: wrap; align-items: baseline; gap: 6px 16px; margin: 0; padding: 16px 0; border-block: 1px solid rgba(243,238,228,.14); }
.kull__tall b { font-size: 1.6rem; font-weight: 760; }
.kull__tall span { color: var(--lys-dempet); }
.kull__navn { display: grid; gap: 18px; }
.valper { display: flex; flex-wrap: wrap; gap: 8px; }
.valper li { padding: 7px 14px; border-radius: 999px; background: rgba(243,238,228,.1); font-weight: 560; }
.valper li small { color: var(--lys-dempet); font-weight: 400; }
.kull__navn > div:first-child .valper li:not(.valper__mer) { background: var(--sol); color: var(--ink); }
.kull__navn > div:first-child .valper li small { color: #3a2a1f; }
.valper__mer { background: transparent !important; box-shadow: inset 0 0 0 1px rgba(243,238,228,.24); color: var(--lys-dempet); }
.hd__stolpe { display: flex; gap: 4px; margin: 6px 0 0; height: 40px; }
.hd__del { display: grid; place-items: center; min-width: 52px; border-radius: 10px; font-weight: 700; font-variant-numeric: tabular-nums; font-size: .95rem; }
.hd__del--a { background: var(--lys); color: var(--ink); }
.hd__del--ab { background: var(--lys-dempet); color: var(--ink); }
.hd__del--b { background: rgba(243,238,228,.16); color: var(--lys); }
.kull__ble { margin: 0; color: var(--lys-dempet); }
.kull__ble .lenke { color: var(--lys); }
.kull__j { font-size: 1.15rem; max-width: 34em; margin: 0; }
@media (min-width: 900px) {
  .kull__panel { grid-template-columns: 1fr 1fr; padding: 36px 40px; }
  .kullene .kull__panel { gap: 28px 56px; }
  .kull__hode, .kull__tall, .kull__navn, .kull__panel--j > * { grid-column: 1 / -1; }
  .kull__foreldre { grid-template-columns: 1fr 1fr; grid-column: 1 / -1; }
  .kull__navn { grid-template-columns: 1fr 1fr; }
  .hd { grid-column: 1; }
  .kull__ble { grid-column: 2; align-self: end; justify-self: end; }
  .kull__bokstav { width: 92px; height: 92px; font-size: 3.4rem; }
  .kull__hode h3 { font-size: 2.2rem; }
}

/* ---------- the family tree ---------- */
.tre__forklaring { display: flex; gap: 16px; margin: 0; font-size: .9rem; color: var(--dempet); }
.tre__forklaring span { display: inline-flex; align-items: center; gap: 6px; }
.tre i, .tre__forklaring i { display: inline-block; width: 10px; height: 10px; border-radius: 50%; }
i.t { background: var(--sol); }
i.h { background: var(--ink); }
.tre { margin-top: 28px; }
.tre ol { display: grid; gap: 10px; }
.tre__ledd { position: relative; }
@media (max-width: 1099px) {
  /* Top to bottom: one indent per generation of litters; a daughter sits right under her litter. */
  .tre ol ol { margin: 10px 0 0 14px; }
  .tre ol ol > .tre__ledd { padding-left: 16px; }
  .tre ol ol > .tre__ledd::before { content: ''; position: absolute; left: 0; top: 30px; width: 14px; border-top: 2px solid var(--linje); }
  .tre ol ol > .tre__ledd::after { content: ''; position: absolute; left: 0; top: -10px; bottom: 0; border-left: 2px solid var(--linje); }
  .tre ol ol > .tre__ledd:last-child::after { bottom: auto; height: 41px; }
  .tre ol.tre__datter { margin: 6px 0 0; }
  .tre ol.tre__datter > .tre__ledd { padding-left: 0; }
  .tre ol.tre__datter > .tre__ledd::before { display: none; }
  .tre ol.tre__datter > .tre__ledd::after { left: 29px; top: -6px; bottom: auto; height: 6px; }
}
.tre__mor, .tre__kull { display: inline-flex; align-items: center; gap: 12px; text-decoration: none; border-radius: 18px; transition: transform .2s, box-shadow .2s; }
.tre__mor { padding: 6px 16px 6px 6px; background: var(--ink); color: var(--lys); }
.tre__mor img { width: 48px; height: 48px; border-radius: 50%; object-fit: cover; flex: none; }
.tre__mor b { display: block; font-size: 1.1rem; line-height: 1.1; }
.tre__mor small { color: var(--lys-dempet); }
.tre__kull { padding: 8px 14px 8px 8px; background: var(--kort); box-shadow: inset 0 0 0 1px var(--linje); }
.tre__mor:hover, .tre__kull:hover { transform: translateX(3px); box-shadow: 0 10px 24px -14px rgba(20,26,22,.5); }
.tre__b { display: grid; place-items: center; width: 44px; height: 44px; border-radius: 50%; background: var(--sol); font-weight: 800; font-size: 1.5rem; flex: none; }
.tre__info { display: grid; gap: 4px; }
.tre__info b { font-size: 1rem; }
.tre__info b small { font-weight: 450; color: var(--dempet); }
.tre__info > small { color: var(--dempet); font-size: .8rem; }
.tre__prikker { display: flex; flex-wrap: wrap; gap: 3px; max-width: 150px; }
.tre__prikker i { width: 9px; height: 9px; }

@media (min-width: 1100px) {
  /* Generations left to right. */
  .tre { overflow-x: auto; padding-bottom: 8px; }
  .tre ol { display: flex; flex-direction: column; gap: 14px; }
  .tre__ledd { display: flex; align-items: center; }
  .tre ol ol { position: relative; margin: 0 0 0 28px; }
  .tre ol ol::before { content: ''; position: absolute; left: -28px; top: 50%; width: 28px; border-top: 2px solid var(--linje); }
  .tre ol ol > .tre__ledd { padding-left: 24px; }
  .tre ol ol > .tre__ledd::before { content: ''; position: absolute; left: 0; top: 50%; width: 24px; border-top: 2px solid var(--linje); }
  .tre ol ol > .tre__ledd::after { content: ''; position: absolute; left: 0; top: 0; bottom: 0; border-left: 2px solid var(--linje); }
  .tre ol ol > .tre__ledd:first-child::after { top: 50%; }
  .tre ol ol > .tre__ledd:last-child::after { bottom: 50%; top: 0; }
  .tre ol ol > .tre__ledd:only-child::after { display: none; }
  .tre__mor { flex-direction: column; gap: 6px; padding: 8px 12px 10px; text-align: center; border-radius: 20px; }
  .tre__mor img { width: 64px; height: 64px; }
  .tre__mor small { display: block; max-width: 9em; line-height: 1.25; }
  .tre__kull { padding: 8px 14px 8px 8px; }
  .tre__mor, .tre__kull { flex: none; }
  .tre__info b { white-space: nowrap; }
  .tre__delt { position: absolute; width: 1px; height: 1px; overflow: hidden; clip-path: inset(50%); white-space: nowrap; }
  .tre__prikker { max-width: 110px; }
}

/* ---------- the pack ---------- */
.flokk { display: grid; gap: 24px; }
.flokken { width: 100%; max-width: 560px; }
.flokk__navn { display: grid; grid-template-columns: 1fr 1fr; gap: 8px; }
.flokk__navn a { display: grid; padding: 14px 16px; border-radius: 16px; background: var(--kort); box-shadow: inset 0 0 0 1px var(--linje); text-decoration: none; transition: background .2s; }
.flokk__navn a:hover { background: var(--tonet); }
.flokk__navn b { font-size: 1.2rem; }
.flokk__navn small { color: var(--dempet); }
@media (min-width: 900px) {
  .flokk { grid-template-columns: .9fr 1.1fr; align-items: end; column-gap: 64px; }
  .flokk__navn { grid-column: 1 / -1; grid-template-columns: repeat(6, 1fr); }
}

/* ---------- news (filled from the chat) ---------- */
.nytt ul { display: grid; gap: 14px; }
.nytt__kort { display: grid; grid-template-columns: 96px 1fr; gap: 16px; align-items: center; padding: 10px; border-radius: 20px; background: var(--kort); box-shadow: inset 0 0 0 1px var(--linje); text-decoration: none; transition: transform .2s, box-shadow .2s; }
.nytt__kort:hover { transform: translateY(-3px); box-shadow: 0 16px 32px -20px rgba(20,26,22,.5); }
.nytt__kort img, .nytt__tom { width: 96px; height: 96px; object-fit: cover; border-radius: 14px; background: var(--sol); }
.nytt__tekst { display: grid; gap: 4px; min-width: 0; }
.nytt__tekst time { font-size: .76rem; font-weight: 650; letter-spacing: .12em; text-transform: uppercase; color: var(--dempet); }
.nytt__tekst b { font-size: 1.22rem; line-height: 1.2; }
.nytt__tekst small { font-size: .95rem; color: var(--dempet); display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; }
@media (min-width: 900px) {
  .nytt ul { grid-template-columns: repeat(3, 1fr); }
  .nytt__kort { grid-template-columns: 1fr; padding: 12px 12px 20px; align-items: start; }
  .nytt__kort img, .nytt__tom { width: 100%; height: auto; aspect-ratio: 4 / 3; }
  .nytt__tekst { padding: 4px 8px 0; }
}

/* ---------- breed facts ---------- */
.fire { display: grid; gap: 10px; margin: 8px 0 24px; }
.fire div { padding: 18px 20px; border-radius: 18px; background: var(--kort); box-shadow: inset 0 0 0 1px var(--linje); }
.fire dt { font-weight: 740; font-size: 1.15rem; margin-bottom: 4px; }
.fire dd { color: var(--dempet); }
@media (min-width: 640px) { .fire { grid-template-columns: 1fr 1fr; } }
@media (min-width: 900px) { .fire--stor { grid-template-columns: repeat(4, 1fr); } .fire--stor dt { font-size: 1.4rem; } }
.ordliste { display: grid; gap: 0; margin: 24px 0; border-top: 1px solid var(--linje); }
.ordliste div { display: grid; gap: 4px; padding: 16px 0; border-bottom: 1px solid var(--linje); }
.ordliste dt { font-weight: 720; }
.ordliste dd { color: var(--dempet); max-width: 40em; }
@media (min-width: 760px) { .ordliste div { grid-template-columns: 220px 1fr; gap: 24px; } }
.maal { width: 100%; max-width: 520px; border-collapse: collapse; margin-top: 32px; font-variant-numeric: tabular-nums; }
.maal caption { text-align: left; font-weight: 740; font-size: 1.15rem; margin-bottom: 8px; }
.maal th, .maal td { text-align: left; padding: 12px 12px 12px 0; border-bottom: 1px solid var(--linje); }
.maal thead th { font-size: .78rem; letter-spacing: .12em; text-transform: uppercase; color: var(--dempet); font-weight: 650; }

/* ---------- J band ---------- */
.jband { background: var(--sol); padding: 48px 0; overflow: hidden; }
.jband__inn { display: grid; gap: 18px; position: relative; }
.jband__j { position: absolute; right: -10px; top: -80px; margin: 0; font-size: 15rem; line-height: 1; font-weight: 800; color: rgba(20,26,22,.1); pointer-events: none; }
.jband .tittel { margin-bottom: .2em; }
.jband p { margin: 0; font-size: 1.1rem; }
@media (min-width: 900px) {
  .jband { padding: 72px 0; }
  .jband__inn { grid-template-columns: 1fr auto; align-items: center; gap: 40px; }
  .jband__j { right: 280px; top: -120px; font-size: 22rem; }
}

/* ---------- the swimmer (J band) ---------- */
.svom { position: relative; width: min(340px, 78%); padding-bottom: 6px; }
.svom__hund { position: relative; z-index: 1; display: block; width: 100%; height: auto; }
/* The water is as wide as the swimmer and fades out at both ends; the waves inside slide. */
.svom__vann { position: absolute; left: -8%; right: -8%; bottom: -4px; height: 34px; overflow: hidden; -webkit-mask-image: linear-gradient(90deg, transparent, #000 18%, #000 82%, transparent); mask-image: linear-gradient(90deg, transparent, #000 18%, #000 82%, transparent); }
.svom__vann--foran { z-index: 2; }
.svom__vann--bak { bottom: 6px; opacity: .35; }
.svom__bolge { display: block; width: 200%; height: 100%; overflow: visible; }
.svom__bolge .fyll { fill: var(--sol); }
.svom__bolge .linje { fill: none; stroke: var(--ink); stroke-width: 3; vector-effect: non-scaling-stroke; }
.svom__vann--bak .fyll { fill: none; }
@media (prefers-reduced-motion: no-preference) {
  .svom__hund { animation: padle 2.6s ease-in-out infinite; transform-origin: 70% 100%; }
  .svom:hover .svom__hund { animation-duration: 1s; }
  .svom__vann--foran .svom__bolge { animation: bolge 6s linear infinite; }
  .svom__vann--bak .svom__bolge { animation: bolge 9s linear infinite reverse; }
  @keyframes padle { 0%, 100% { transform: translateY(2px) rotate(0deg); } 50% { transform: translateY(-4px) rotate(-1.5deg); } }
  @keyframes bolge { to { transform: translateX(-50%); } }
}
@media (min-width: 900px) {
  .jband__inn { grid-template-columns: auto 1fr auto; }
  .svom { width: 300px; }
}

/* ---------- the lion clip (breed page) ---------- */
.klipp { display: grid; gap: 28px; }
.klipp > * { min-width: 0; }
.klipp__figur { position: relative; }
.klipp__figur img { width: 100%; height: auto; }
.klipp__punkter { position: absolute; inset: 0; border: 0; margin: 0; padding: 0; min-width: 0; }
.klipp__nr { position: absolute; transform: translate(-50%, -50%); display: grid; place-items: center; width: 44px; height: 44px; border-radius: 50%; background: var(--papir); color: var(--ink); font-weight: 780; font-size: 1.1rem; box-shadow: 0 0 0 3px var(--ink); cursor: pointer; transition: transform .2s, background .2s; }
.klipp__nr input { position: absolute; inset: 0; opacity: 0; margin: 0; cursor: pointer; }
.klipp__nr:hover { transform: translate(-50%, -50%) scale(1.08); }
.klipp__nr:has(input:checked) { background: var(--sol); transform: translate(-50%, -50%) scale(1.12); }
.klipp__nr:has(input:focus-visible) { outline: 3px solid var(--sol); outline-offset: 4px; }
@media (prefers-reduced-motion: no-preference) {
  .klipp__nr:not(:has(input:checked))::after { content: ''; position: absolute; inset: -3px; border-radius: 50%; box-shadow: 0 0 0 2px var(--sol); animation: puls 2.4s ease-out infinite; }
  @keyframes puls { from { transform: scale(1); opacity: .9; } to { transform: scale(1.6); opacity: 0; } }
}
.klipp__del { display: none; padding: 20px 22px; border-radius: 18px; background: var(--kort); box-shadow: inset 0 0 0 1px var(--linje); }
.klipp:has(input[value="halen"]:checked) [data-del="halen"],
.klipp:has(input[value="bakparten"]:checked) [data-del="bakparten"],
.klipp:has(input[value="manken"]:checked) [data-del="manken"],
.klipp:has(input[value="potene"]:checked) [data-del="potene"] { display: block; }
.klipp__del h3 { display: flex; align-items: center; gap: 12px; font-size: 1.35rem; margin-bottom: 8px; }
.klipp__del h3::before { content: attr(data-nr); display: grid; place-items: center; width: 34px; height: 34px; border-radius: 50%; background: var(--sol); font-size: 1rem; flex: none; }
.klipp__del p { margin: 0; }
@media (min-width: 900px) {
  /* Text and explanation on the left, the drawing on the right; on a phone the explanation sits under the drawing. */
  .klipp { grid-template-columns: .8fr 1.2fr; grid-template-rows: auto 1fr; column-gap: 64px; row-gap: 8px; }
  .klipp__tekst { grid-column: 1; grid-row: 1; align-self: end; }
  .klipp__deler { grid-column: 1; grid-row: 2; }
  .klipp__figur { grid-column: 2; grid-row: 1 / span 2; align-self: center; }
}

/* ---------- dogs ---------- */
.hunder { display: grid; gap: 20px; }
.hund { display: grid; background: var(--kort); border-radius: var(--radius); overflow: hidden; box-shadow: inset 0 0 0 1px var(--linje); scroll-margin-top: 84px; }
.hund__bilde img { width: 100%; aspect-ratio: 4 / 3; object-fit: cover; }
.hund__tekst { padding: 22px 22px 24px; }
.hund h2 { font-size: 2rem; }
.hund__full { color: var(--dempet); font-size: .95rem; margin: 2px 0 14px; }
.hund__fakta { display: grid; grid-template-columns: 1fr 1fr; gap: 12px 16px; margin: 18px 0; font-variant-numeric: tabular-nums; }
.hund__fakta dt { font-size: .74rem; font-weight: 650; letter-spacing: .12em; text-transform: uppercase; color: var(--dempet); }
.hund__fakta dd { font-weight: 600; }
.helse { border-top: 1px solid var(--linje); }
.helse summary { list-style: none; cursor: pointer; padding: 14px 0 4px; }
.helse summary::-webkit-details-marker { display: none; }
.helse summary span { display: inline-flex; align-items: center; gap: 8px; font-weight: 700; }
.helse summary span::after { content: '+'; display: grid; place-items: center; width: 26px; height: 26px; border-radius: 50%; background: var(--sol); font-weight: 700; transition: transform .2s; }
.helse[open] summary span::after { transform: rotate(45deg); }
.hund__fakta--par { grid-template-columns: max-content 1fr; column-gap: 20px; row-gap: 8px; }
.helse__par { grid-template-columns: 1fr auto; column-gap: 16px; }
.helse__par dt, .helse__par dd { padding: 8px 0; border-bottom: 1px dashed var(--linje); }
.helse > dl { display: grid; margin: 8px 0 12px; }
.helse > dl div { display: flex; justify-content: space-between; gap: 16px; padding: 8px 0; border-bottom: 1px dashed var(--linje); }
.helse dt { font-weight: 650; }
.helse dd { text-align: right; color: var(--dempet); }
@media (prefers-reduced-motion: no-preference) {
  .helse::details-content { transition: height .3s ease, content-visibility .3s allow-discrete; height: 0; overflow: clip; }
  .helse[open]::details-content { height: auto; }
}
@media (min-width: 760px) { .hunder { grid-template-columns: 1fr 1fr; } }
@media (min-width: 1100px) { .hunder { grid-template-columns: repeat(3, 1fr); } }

.minne { display: grid; gap: 14px; margin-top: 24px; }
.minne li { display: grid; grid-template-columns: 84px 1fr; gap: 16px; align-items: start; padding: 14px; background: var(--kort); border-radius: 18px; }
.minne img { width: 84px; height: 84px; border-radius: 50%; object-fit: cover; }
.minne__bilde { display: block; }
.minne h3 { font-size: 1.25rem; }
.minne h3 small { font-weight: 450; color: var(--dempet); font-variant-numeric: tabular-nums; }
.minne .smaa { margin: 0 0 4px; }
.minne p:last-child { margin: 0; }
@media (min-width: 760px) { .minne { grid-template-columns: 1fr 1fr; } }
@media (min-width: 1100px) { .minne { grid-template-columns: repeat(3, 1fr); } }

/* ---------- about ---------- */
.tidslinje { margin: 32px 0 0; border-left: 2px solid var(--linje); }
.tidslinje li { display: grid; grid-template-columns: 64px 1fr; gap: 12px; padding: 0 0 22px 18px; position: relative; }
.tidslinje li::before { content: ''; position: absolute; left: -7px; top: 6px; width: 12px; height: 12px; border-radius: 50%; background: var(--sol); }
.tidslinje b { font-variant-numeric: tabular-nums; font-size: 1.1rem; }
.tidslinje h3 { font-size: 1.15rem; margin-bottom: 4px; }
.tidslinje p { margin: 0; color: var(--dempet); }

/* ---------- contact and forms ---------- */
.stor-epost { font-size: clamp(1.4rem, 6vw, 2.4rem); font-weight: 740; letter-spacing: -.02em; margin-bottom: 24px; }
.fakta { display: grid; gap: 0; margin-bottom: 28px; border-top: 1px solid var(--linje); }
.fakta div { display: grid; gap: 2px; padding: 14px 0; border-bottom: 1px solid var(--linje); }
.fakta dt { font-size: .74rem; font-weight: 650; letter-spacing: .12em; text-transform: uppercase; color: var(--dempet); }
.skjema { display: grid; gap: 18px; background: var(--kort); border-radius: var(--radius); padding: 22px 20px 26px; box-shadow: inset 0 0 0 1px var(--linje); scroll-margin-top: 90px; }
.felt { display: grid; gap: 6px; }
.felt > span { font-weight: 650; }
.felt small { font-weight: 400; color: var(--dempet); }
.felt input, .felt textarea { width: 100%; font: inherit; font-size: 1rem; padding: 13px 14px; border-radius: 12px; border: 1.5px solid rgba(20,26,22,.38); background: #fff; color: var(--ink); scroll-margin-bottom: calc(var(--hurtig) + 20px); }
.felt textarea { resize: vertical; min-height: 120px; }
.felt input:focus, .felt textarea:focus { outline: 3px solid var(--sol); outline-offset: 1px; border-color: var(--ink); }
.valgruppe { border: 0; padding: 0; margin: 0; min-width: 0; }
.valgruppe legend { font-weight: 650; padding: 0; margin-bottom: 8px; }
.val-rad { display: flex; flex-wrap: wrap; gap: 8px; }
.val { position: relative; }
.val input { position: absolute; inset: 0; opacity: 0; margin: 0; cursor: pointer; }
.val span { display: inline-flex; align-items: center; min-height: 44px; padding: 0 16px; border-radius: 999px; box-shadow: inset 0 0 0 1.5px rgba(20,26,22,.38); font-weight: 600; }
.val input:checked + span { background: var(--ink); color: var(--lys); box-shadow: none; }
.val input:focus-visible + span { outline: 3px solid var(--sol); outline-offset: 2px; }
.skjema .knapp { justify-self: start; }
.skjema__takk { display: none; margin: 0; padding: 16px 18px; border-radius: 14px; background: var(--tonet); }
.skjema.sendt .skjema__takk { display: block; }

/* ---------- footer ---------- */
.bunn { background: var(--ink); color: var(--lys); padding: 56px 0 32px; }
.bunn__ord { display: flex; align-items: center; gap: 14px; margin: 0 0 36px; font-weight: 790; font-size: clamp(2.4rem, 11vw, 7rem); letter-spacing: -.045em; line-height: 1; }
.bunn__ord .merke { width: .8em; height: .8em; color: var(--lys); }
.bunn__kolonner { display: grid; gap: 28px; }
.bunn h2 { font-size: .78rem; font-weight: 650; letter-spacing: .14em; text-transform: uppercase; color: var(--lys-dempet); margin-bottom: 10px; }
.bunn ul { display: grid; gap: 6px; }
.bunn ul a { text-decoration: none; }
.bunn ul a:hover { text-decoration: underline; }
.bunn__sist { display: flex; flex-wrap: wrap; gap: 8px 24px; margin: 40px 0 0; padding-top: 20px; border-top: 1px solid rgba(243,238,228,.14); font-size: .88rem; color: var(--lys-dempet); }
.bunn__sist a { color: var(--lys); }
@media (min-width: 900px) { .bunn { padding: 88px 0 40px; } .bunn__kolonner { grid-template-columns: 1.2fr 1fr 1fr; } }

/* ---------- thumb bar ---------- */
.hurtig { position: fixed; left: 0; right: 0; bottom: 0; z-index: 40; display: grid; grid-template-columns: 1fr 1fr; gap: 8px; padding: 10px 12px calc(10px + env(safe-area-inset-bottom)); background: color-mix(in srgb, var(--papir) 94%, transparent); backdrop-filter: blur(12px); -webkit-backdrop-filter: blur(12px); border-top: 1px solid var(--linje); }
.hurtig .knapp { min-height: 52px; padding: 0 12px; font-size: .98rem; }
.hurtig .knapp svg { width: 20px; height: 20px; }
@media (min-width: 900px) { .hurtig { display: none; } body { padding-bottom: 0; } }

/* ---------- motion (0 kB, safe without) ---------- */
@media (prefers-reduced-motion: no-preference) {
  @supports (animation-timeline: view()) {
    .kapittel .ramme > *, .hund, .tre__ledd > a { animation: opp linear both; animation-timeline: view(); animation-range: entry 0% entry 40%; }
    @keyframes opp { from { transform: translateY(24px); } }
  }
  .helt__bilde img { animation: zoom 1.4s cubic-bezier(.2,.7,.2,1) both; }
  @keyframes zoom { from { transform: scale(1.06); } }
}

/* Posts written in the chat (lib/skreddersom/felt.mjs) inherit the font and colours. */
.sm-innlegg h1 { font-size: clamp(2.2rem, 8vw, 3.8rem); letter-spacing: -.035em; line-height: 1; font-weight: 780; }
.sm-innlegg__dato, .sm-liste time { color: var(--dempet); font-weight: 650; }
.sm-innlegg__ingress, .sm-liste small { color: var(--dempet); }
.sm-innlegg a { text-decoration-color: var(--sol); text-decoration-thickness: 2px; }

/* Stamtavle: three generations as an indented tree, one dot per dog (dark hann, orange tispe), like the family tree. */
.st { display: grid; gap: 16px; margin: 10px 0 12px; }
.st__barn { display: grid; gap: 8px; margin: 8px 0 0 4px; padding-left: 14px; border-left: 2px solid var(--linje); }
.st p, .st__ukjent { position: relative; display: block; margin: 0; padding-left: 17px; line-height: 1.3; overflow-wrap: anywhere; }
.st p::before { content: ''; position: absolute; left: 0; top: .38em; width: 9px; height: 9px; border-radius: 50%; background: var(--ink); }
.st .t > p::before { background: var(--sol); }
.st > div > p { font-weight: 700; font-size: 1.02rem; }
.st > div > .st__barn > div > p { font-weight: 600; font-size: .95rem; }
.st__barn .st__barn p { font-size: .88rem; color: var(--dempet); }
.st__barn .st__barn { gap: 4px; }
.st__rolle { display: block; padding-left: 17px; font-size: .7rem; font-weight: 650; letter-spacing: .12em; text-transform: uppercase; color: var(--dempet); }
.st__ukjent { font-size: .88rem; color: var(--dempet); font-style: italic; }
.stamtavle .tre__forklaring { margin: 0 0 12px; }
