/* Markvardsen Fredbergs familiehistorie
   Layout: mørkegrøn top/bund, lyse flader med hvide kort; fotos bærer forsiden.
   Farver fra fynske marker og matrikelkort: skovgrøn, markgrøn, karminrød skellinje. */

@font-face { font-family: "Alegreya"; src: url(fonts/alegreya-latin-400-normal.woff2) format("woff2"); font-weight: 400; font-style: normal; font-display: swap; }
@font-face { font-family: "Alegreya"; src: url(fonts/alegreya-latin-400-italic.woff2) format("woff2"); font-weight: 400; font-style: italic; font-display: swap; }
@font-face { font-family: "Alegreya"; src: url(fonts/alegreya-latin-500-normal.woff2) format("woff2"); font-weight: 500; font-style: normal; font-display: swap; }
@font-face { font-family: "Alegreya"; src: url(fonts/alegreya-latin-700-normal.woff2) format("woff2"); font-weight: 700; font-style: normal; font-display: swap; }
@font-face { font-family: "Alegreya"; src: url(fonts/alegreya-latin-700-italic.woff2) format("woff2"); font-weight: 700; font-style: italic; font-display: swap; }
@font-face { font-family: "Alegreya Sans"; src: url(fonts/alegreya-sans-latin-400-normal.woff2) format("woff2"); font-weight: 400; font-display: swap; }
@font-face { font-family: "Alegreya Sans"; src: url(fonts/alegreya-sans-latin-500-normal.woff2) format("woff2"); font-weight: 500; font-display: swap; }
@font-face { font-family: "Alegreya Sans"; src: url(fonts/alegreya-sans-latin-700-normal.woff2) format("woff2"); font-weight: 700; font-display: swap; }

:root {
  --bg: #F3F4EF;
  --surface: #FFFFFF;
  --ink: #1B2420;
  --muted: #59655D;
  --line: #DCE1D7;
  --forest: #173226;
  --forest-2: #224636;
  --on-forest: #E9F0EA;
  --leaf: #2C6A45;
  --leaf-dark: #1E4F32;
  --leaf-wash: #E3EEE4;
  --carmine: #B3263E;
  --carmine-wash: #F7E4E7;
  --photo-bg: #121A16;

  --display: "Alegreya", "Iowan Old Style", Georgia, serif;
  --serif: "Alegreya", "Iowan Old Style", Georgia, serif;
  --sans: "Alegreya Sans", "Segoe UI", "Helvetica Neue", Arial, sans-serif;

  --radius: 12px;
  --shadow: 0 1px 2px rgba(23, 50, 38, .06), 0 4px 14px rgba(23, 50, 38, .06);
  --measure: 40rem;
  --gutter: max(16px, 4vw);
}

*, *::before, *::after { box-sizing: border-box; }
[hidden] { display: none !important; }
html { -webkit-text-size-adjust: 100%; }
body {
  margin: 0;
  background: var(--bg);
  color: var(--ink);
  font-family: var(--sans);
  font-size: 1.125rem;
  line-height: 1.55;
  font-variant-numeric: lining-nums;
}
img { max-width: 100%; height: auto; }
a { color: var(--leaf); text-decoration-thickness: 1px; text-underline-offset: .18em; }
a:hover { color: var(--leaf-dark); text-decoration-thickness: 2px; }
:focus-visible { outline: 3px solid var(--carmine); outline-offset: 2px; border-radius: 4px; }
.sr { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }

.skip { position: absolute; left: -999px; top: 0; background: var(--ink); color: #fff; padding: .5rem 1rem; z-index: 20; }
.skip:focus { left: 1rem; }

.wrap { max-width: 76rem; margin: 0 auto; padding-left: var(--gutter); padding-right: var(--gutter); }
.page { padding-block: 1.5rem 4.5rem; min-height: 55vh; }

h1, h2, h3 { font-family: var(--display); line-height: 1.12; color: var(--ink); text-wrap: balance; margin: 0; }
h1 { font-size: clamp(2.1rem, 1.5rem + 2.4vw, 3.1rem); font-weight: 700; letter-spacing: -.01em; }
h2 { font-size: clamp(1.45rem, 1.2rem + .9vw, 1.85rem); font-weight: 700; }
h3 { font-size: 1.25rem; font-weight: 700; }
p { margin: 0 0 1em; }
.lede { font-size: 1.25rem; line-height: 1.5; color: var(--muted); max-width: 44rem; margin-top: .8rem; }
.muted { color: var(--muted); }
.note { font-size: .95rem; color: var(--muted); }

.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: .4rem;
  font: 700 1.05rem/1 var(--sans); padding: .85rem 1.3rem; border-radius: 999px; border: 0; cursor: pointer;
  background: var(--carmine); color: #fff; text-decoration: none;
}
.btn:hover { background: #95182F; color: #fff; }
.btn--light { background: var(--on-forest); color: var(--forest); }
.btn--light:hover { background: #fff; color: var(--forest); }

/* ------------------------------------------------ top */
.site-head { background: var(--forest); color: var(--on-forest); position: relative; z-index: 5; }
.head-inner { display: flex; align-items: center; justify-content: space-between; gap: .5rem 2rem; min-height: 4.5rem; flex-wrap: wrap; padding-block: .6rem; }
.brand { display: inline-flex; align-items: center; gap: .7rem; text-decoration: none; color: inherit; }
.brand:hover { color: #fff; }
.mark { width: 2.1rem; height: 2.1rem; color: var(--on-forest); flex: none; }
.brand-text { display: flex; flex-direction: column; line-height: 1.1; }
.brand-name { font-family: var(--display); font-weight: 700; font-size: 1.3rem; color: #fff; }
.brand-sub { font-size: .9rem; color: #B9CBBE; }
.mainnav { display: flex; gap: .2rem; flex-wrap: wrap; }
.mainnav a {
  color: var(--on-forest); text-decoration: none; font-weight: 500; font-size: 1.02rem;
  padding: .45rem .8rem; border-radius: 999px;
}
.mainnav a:hover { background: var(--forest-2); color: #fff; }
.mainnav a[aria-current="page"] { background: var(--on-forest); color: var(--forest); }

.crumbs { display: flex; flex-wrap: wrap; gap: .45rem; align-items: baseline; font-size: .95rem; color: var(--muted); margin: .2rem 0 1.4rem; }
.crumbs a { color: var(--muted); }
.crumbs .sep { color: #A9B3AA; }

/* ------------------------------------------------ bund */
.site-foot { background: var(--forest); color: #C4D3C8; font-size: 1rem; }
.foot-inner { display: grid; grid-template-columns: minmax(0, 1.4fr) minmax(0, 1fr) minmax(0, 1fr); gap: 2rem 3rem; padding-block: 3rem 3.5rem; }
.foot-brand p { margin: .9rem 0 0; max-width: 24rem; }
.foot-links { display: flex; flex-direction: column; gap: .45rem; }
.foot-links a { color: var(--on-forest); text-decoration: none; }
.foot-links a:hover { color: #fff; text-decoration: underline; }
.foot-contact p { margin-bottom: .8rem; }

/* ------------------------------------------------ forside */
.hero { background: var(--forest); color: #fff; overflow: hidden; }
.hero-grid { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1.05fr); gap: 2.5rem 3.5rem; align-items: center; padding-block: clamp(2.8rem, 6vw, 5rem); }
.hero-kicker { font-weight: 500; color: #BFD4C5; margin: 0 0 .8rem; font-size: 1.05rem; }
.hero-title { color: #fff; font-size: clamp(2.5rem, 1.3rem + 4.4vw, 4.6rem); line-height: 1; letter-spacing: -.02em; }
.hero-lede { font-size: clamp(1.15rem, 1rem + .5vw, 1.35rem); color: #DCE7DF; max-width: 32rem; margin: 1.2rem 0 1.8rem; }
.hero-search { display: flex; gap: .5rem; max-width: 34rem; background: #fff; padding: .4rem; border-radius: 999px; box-shadow: 0 10px 30px rgba(0,0,0,.25); }
.hero-search input { flex: 1; min-width: 0; border: 0; background: transparent; font: inherit; font-size: 1.1rem; padding: .5rem 1rem; color: var(--ink); }
.hero-search input:focus { outline: none; }
.hero-search:focus-within { outline: 3px solid #F2B8C2; outline-offset: 2px; }
.hero-links { display: flex; gap: 1.4rem; flex-wrap: wrap; margin: 1.2rem 0 0; font-weight: 500; }
.hero-links a { color: #fff; }

/* tre aftryk fra familiealbummet */
.hero-photos { position: relative; aspect-ratio: 1 / .86; }
.print { position: absolute; display: block; background: #FBFAF6; padding: .55rem .55rem .6rem; border-radius: 3px; box-shadow: 0 18px 40px rgba(0,0,0,.4); transition: transform .2s; text-decoration: none; }
.print img { display: block; width: 100%; height: auto; }
.print span { display: block; font-size: .9rem; color: #4B524D; padding: .5rem .2rem .1rem; font-style: italic; line-height: 1.3; }
.print--a { width: 66%; left: 18%; top: 14%; transform: rotate(-2deg); z-index: 3; }
.print--b { width: 48%; right: 0; top: 0; transform: rotate(5deg); z-index: 1; }
.print--c { width: 44%; left: 0; bottom: 4%; transform: rotate(-7deg); z-index: 2; }
.print:hover { transform: rotate(0) scale(1.02); z-index: 4; }

.band { background: var(--surface); border-bottom: 1px solid var(--line); padding-block: 2.2rem 1.6rem; }
.band-head { display: flex; justify-content: space-between; align-items: baseline; gap: .5rem 2rem; flex-wrap: wrap; }
.band-head p { color: var(--muted); margin: 0; }

.section { padding-block: 3rem 0; }
.section:last-child { padding-bottom: 4.5rem; }
.section-head { display: flex; align-items: baseline; justify-content: space-between; gap: .5rem 2rem; flex-wrap: wrap; margin-bottom: 1.2rem; }
.section-head p { color: var(--muted); margin: 0; flex-basis: 100%; }
.section-head a { font-weight: 500; }

.tiles { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 1.25rem; }
.tile { display: flex; flex-direction: column; background: var(--surface); border-radius: var(--radius); overflow: hidden; box-shadow: var(--shadow); text-decoration: none; color: var(--ink); transition: transform .15s, box-shadow .15s; }
.tile:hover { transform: translateY(-2px); box-shadow: 0 2px 4px rgba(23,50,38,.08), 0 12px 28px rgba(23,50,38,.12); color: var(--ink); }
.tile-img { aspect-ratio: 16 / 10; overflow: hidden; background: var(--leaf-wash); }
.tile-img img { width: 100%; height: 100%; object-fit: cover; display: block; }
.tile-body { padding: 1rem 1.15rem 1.2rem; }
.tile-body strong { display: block; font-family: var(--display); font-size: 1.35rem; line-height: 1.2; }
.tile-body span { display: block; color: var(--muted); margin-top: .25rem; font-size: 1.02rem; line-height: 1.45; }

.strip, .gallery { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 1rem; }
.gallery { grid-template-columns: repeat(auto-fill, minmax(15rem, 1fr)); }
.shot { display: block; text-decoration: none; color: var(--ink); }
.shot img { display: block; width: 100%; aspect-ratio: 4 / 3; object-fit: cover; border-radius: 8px; background: #DDE3DA; }
.shot span { display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; margin-top: .5rem; font-size: .98rem; line-height: 1.4; color: var(--muted); }
.shot:hover img { filter: brightness(1.06); outline: 3px solid var(--leaf); outline-offset: 2px; }
.shot:hover span { color: var(--ink); }
.album-sec { margin-top: 2.6rem; }

.reads { list-style: none; padding: 0; margin: 0; display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 1rem; }
.reads li { background: var(--surface); border-radius: var(--radius); padding: 1.1rem 1.2rem; border-left: 4px solid var(--carmine); box-shadow: var(--shadow); }
.reads a { font-family: var(--display); font-weight: 700; font-size: 1.25rem; display: block; line-height: 1.25; }
.reads span { display: block; color: var(--muted); margin-top: .3rem; }

/* ------------------------------------------------ generationslinealen */
.ruler {
  list-style: none; margin: 1.4rem 0 0; padding: 0;
  display: grid; grid-template-columns: repeat(11, minmax(0, 1fr)); position: relative;
  font-variant-numeric: lining-nums tabular-nums;
}
.ruler::before { content: ""; position: absolute; left: 0; right: 0; top: 9px; height: 2px; background: var(--line); }
.tick { position: relative; }
.tick a, .tick > span { display: flex; flex-direction: column; align-items: flex-start; text-decoration: none; color: var(--ink); padding: 0 .3rem .5rem 0; border-radius: 8px; }
.tick .dot { width: 20px; height: 20px; border-radius: 50%; background: var(--surface); border: 2px solid #A9B5AB; margin-bottom: .55rem; position: relative; }
.tick .g { font-weight: 700; font-size: 1.15rem; line-height: 1.1; }
.tick .y { font-size: .92rem; color: var(--muted); }
.tick .n { font-size: .82rem; color: var(--leaf); font-weight: 500; margin-top: .15rem; }
.tick a:hover .dot { border-color: var(--leaf); background: var(--leaf-wash); }
.tick a:hover .g { color: var(--leaf); }
.tick.is-on .dot { background: var(--carmine); border-color: var(--carmine); box-shadow: 0 0 0 4px var(--carmine-wash); }
.tick.is-on .g { color: var(--carmine); }
.ruler--compact { margin-top: 1.4rem; }
.ruler--compact .tick .dot { width: 14px; height: 14px; margin-bottom: .4rem; }
.ruler--compact::before { top: 6px; }
.ruler--compact .tick .g { font-size: .95rem; }
.ruler--compact .tick .y { font-size: .8rem; }

/* ------------------------------------------------ sidetoppe */
.page-intro { margin-bottom: 1.6rem; }
.tag { display: inline-block; font-weight: 700; font-size: .95rem; color: var(--carmine); background: var(--carmine-wash); padding: .2rem .7rem; border-radius: 999px; margin: 0 0 .7rem; }

/* ------------------------------------------------ tavle */
.tavle-head { margin-bottom: .5rem; }
.gen-block { margin-top: 2.4rem; }
.gen-title { display: flex; align-items: baseline; gap: .6rem; flex-wrap: wrap; font-size: 1.5rem; margin-bottom: 1rem; }
.gen-sub { font-family: var(--sans); font-weight: 400; font-size: 1rem; color: var(--muted); }
.count { font-family: var(--sans); font-size: .9rem; font-weight: 700; background: var(--leaf-wash); color: var(--leaf-dark); border-radius: 999px; padding: .05rem .55rem; }

.couple { display: grid; grid-template-columns: minmax(0, 1fr) auto minmax(0, 1fr); gap: 1rem; align-items: stretch; }
.pcard { background: var(--surface); border-radius: var(--radius); box-shadow: var(--shadow); padding: 1.15rem 1.25rem 1.2rem; display: flex; flex-direction: column; gap: .7rem; min-width: 0; border-top: 3px solid transparent; }
.pcard--branch { border-top-color: var(--leaf); }
.pcard--unknown { color: var(--muted); }
.pbody p { margin: 0 0 .5em; }
.pbody p:last-child { margin-bottom: 0; }
.pname { display: block; font-family: var(--display); font-size: 1.35rem; font-weight: 700; line-height: 1.2; margin-bottom: .3rem; color: var(--ink); }
.couple .pname { font-size: 1.55rem; }
.pbody a { font-weight: 500; }
.pill {
  align-self: flex-start; margin-top: auto; display: inline-flex; gap: .35rem; align-items: center;
  font-weight: 700; font-size: .98rem; text-decoration: none; padding: .45rem .85rem; border-radius: 999px;
  background: var(--leaf-wash); color: var(--leaf-dark);
}
.pill:hover { background: var(--leaf); color: #fff; }
.pill--up { background: #EEF0EA; color: var(--ink); }
.pill--up:hover { background: var(--ink); color: #fff; }
.wed { display: flex; flex-direction: column; align-items: center; justify-content: center; text-align: center; gap: .4rem; padding: 0 .4rem; max-width: 11rem; }
.rings { width: 44px; height: 26px; fill: none; stroke: var(--carmine); stroke-width: 2.2; }
.wed-text { font-size: .95rem; color: var(--muted); line-height: 1.35; }
.wed-text p { margin: 0; }

.kids { list-style: none; padding: 0; margin: 0; display: grid; grid-template-columns: repeat(auto-fill, minmax(15rem, 1fr)); gap: 1rem; }
.kids > li { display: flex; }
.kids .pcard { width: 100%; }
.kids .pbody { font-size: 1.05rem; }

/* ------------------------------------------------ tavleoversigt */
.gen-list { margin-top: 2.4rem; scroll-margin-top: 1rem; }
.gen-list h2 { display: flex; align-items: baseline; gap: .7rem; flex-wrap: wrap; margin-bottom: .9rem; }
.tavle-list { list-style: none; padding: 0; margin: 0; display: grid; grid-template-columns: repeat(auto-fill, minmax(19rem, 1fr)); gap: .6rem; }
.tavle-list a { display: flex; gap: .9rem; align-items: center; padding: .75rem 1rem; background: var(--surface); border-radius: 10px; box-shadow: var(--shadow); text-decoration: none; color: var(--ink); height: 100%; }
.tavle-list .nr { flex: none; display: inline-grid; place-items: center; min-width: 2.6rem; height: 2.1rem; padding: 0 .3rem; border-radius: 8px; background: var(--leaf-wash); color: var(--leaf-dark); font-weight: 700; font-variant-numeric: tabular-nums; }
.tavle-list .nm { line-height: 1.3; }
.tavle-list a:hover { box-shadow: 0 0 0 2px var(--leaf); }

/* ------------------------------------------------ navneliste og søgning */
.finder { margin-top: 1.4rem; }
.finder label { display: block; font-weight: 500; margin-bottom: .35rem; }
.finder input {
  font: inherit; font-size: 1.15rem; width: 100%; max-width: 30rem; padding: .75rem 1.1rem;
  background: var(--surface); color: var(--ink); border: 1px solid #B7C1B8; border-radius: 999px;
}
.finder input:focus { outline: 3px solid var(--leaf-wash); border-color: var(--leaf); }
.finder-count { font-size: .95rem; color: var(--muted); min-height: 1.4em; margin: .5rem 0 0; }
.finder-empty { font-size: 1.15rem; padding: 1rem 0; }
.alpha { display: flex; flex-wrap: wrap; gap: .3rem; margin: 1rem 0 0; font-weight: 700; }
.alpha a { display: inline-grid; place-items: center; min-width: 2.3rem; height: 2.3rem; text-decoration: none; border-radius: 8px; background: var(--surface); box-shadow: var(--shadow); }
.alpha a:hover { background: var(--leaf); color: #fff; }
.letter { margin-top: 2rem; }
.letter h2 { color: var(--carmine); margin-bottom: .6rem; }
.names { list-style: none; padding: 0; margin: 0; display: grid; grid-template-columns: repeat(auto-fill, minmax(16rem, 1fr)); gap: .4rem 1.5rem; }
.names a, .names .nolink { display: block; padding: .45rem .1rem; text-decoration: none; border-bottom: 1px solid var(--line); }
.names .nm { display: block; color: var(--ink); font-weight: 500; }
.names .meta { display: block; font-size: .9rem; color: var(--muted); }
.names a:hover .nm { color: var(--leaf); text-decoration: underline; }

/* ------------------------------------------------ tekstsider */
.prose--text, .prose--map { background: var(--surface); border-radius: var(--radius); box-shadow: var(--shadow); padding: clamp(1.4rem, 4vw, 3rem) clamp(1.2rem, 5vw, 3.5rem); max-width: 50rem; }
.prose--text, .prose--map { margin-inline: auto; }
.prose--text > *, .prose--map > * { max-width: var(--measure); }
.prose { font-family: var(--serif); font-size: 1.2rem; line-height: 1.65; }
.prose h1 { margin-bottom: 1.2rem; }
.prose h2 { margin: 2rem 0 .6rem; }
.prose h3 { margin: 1.6rem 0 .4rem; }
.prose ul, .prose ol { padding-left: 1.3rem; }
.prose li { margin: .25em 0; }
.prose blockquote { margin: 1.5rem 0; padding-left: 1.2rem; border-left: 3px solid var(--leaf-wash); font-style: italic; }
.prose img { display: block; margin: 1.5rem auto; border-radius: 6px; }
.prose a.pdf::after { content: " (PDF)"; font-family: var(--sans); font-size: .85em; color: var(--muted); }
.prose--map { max-width: 64rem; }
.prose--map > .imap, .prose--map > p:has(.imap), .prose--map > p:has(img) { max-width: none; }

.prose ul.contacts { list-style: none; padding: 0; margin: 1.4rem 0 0; display: grid; grid-template-columns: repeat(auto-fill, minmax(16rem, 1fr)); gap: 1rem; max-width: none; font-family: var(--sans); font-size: 1.08rem; }
.prose ul.contacts li { margin: 0; background: var(--bg); border-radius: 10px; padding: 1rem 1.1rem; line-height: 1.55; }
.prose ul.contacts b { font-family: var(--display); font-size: 1.2rem; }

.table-wrap { overflow-x: auto; margin: 1.5rem 0; max-width: none !important; }
table.data { border-collapse: collapse; width: 100%; font-family: var(--sans); font-size: 1rem; font-variant-numeric: tabular-nums; }
table.data td, table.data th { padding: .4rem .7rem; border-bottom: 1px solid var(--line); vertical-align: top; text-align: left; }
table.data td:not(:first-child) { text-align: right; white-space: nowrap; }
table.data tr:first-child td { font-weight: 700; background: var(--bg); }

/* fotosider: mørk baggrund som i et fotoalbum */
body.kind-photo { background: var(--photo-bg); }
.kind-photo .crumbs, .kind-photo .crumbs a { color: #9FB0A5; }
.prose--photo { color: #E4EAE5; max-width: 70rem; margin: 0 auto; text-align: center; }
.prose--photo h1 { color: #fff; margin-bottom: 1rem; }
.prose--photo p { max-width: 44rem; margin-left: auto; margin-right: auto; font-family: var(--sans); font-size: 1.12rem; }
.prose--photo p:has(img) { max-width: none; }
.prose--photo img { border-radius: 4px; box-shadow: 0 10px 40px rgba(0,0,0,.5); max-height: 82vh; width: auto; }
.prose--photo a { color: #A9D9B8; }

/* ------------------------------------------------ beretninger */
.stories { list-style: none; padding: 0; margin: 0; display: grid; grid-template-columns: repeat(auto-fill, minmax(18rem, 1fr)); gap: 1rem; }
.story { background: var(--surface); border-radius: var(--radius); box-shadow: var(--shadow); padding: 1.1rem 1.2rem 1.2rem; }
.story h2 { font-size: 1.25rem; margin: 0 0 .4rem; }
.story h2 a { color: var(--ink); text-decoration: none; }
.story h2 a:hover { color: var(--leaf); text-decoration: underline; }
.story ul { list-style: none; padding: 0; margin: 0; }
.story li { margin: .2rem 0; font-size: 1.02rem; }

/* ------------------------------------------------ klikbare kort */
.imap { margin: 1.5rem 0; max-width: calc(var(--w) * 1px); }
.imap-inner { position: relative; }
.imap img { display: block; width: 100%; height: auto; margin: 0; border-radius: 6px; background: #fff; }
.imap-svg { position: absolute; inset: 0; width: 100%; height: 100%; }
.imap-svg rect { fill: transparent; stroke: transparent; stroke-width: 2; vector-effect: non-scaling-stroke; }
.imap-svg a:hover rect, .imap-svg a:focus rect { fill: rgba(179, 38, 62, .18); stroke: var(--carmine); }
.imap-svg a:focus { outline: none; }
.chart { margin: 1.2rem 0; background: var(--surface); border-radius: var(--radius); box-shadow: var(--shadow); padding: 1rem; }
.chart--oversigt .imap { margin: 0 auto; width: 900px; max-width: 100%; }
.chart--nornerne { overflow: auto; max-height: 85vh; padding: 0; }
.chart--nornerne .imap { margin: 0; max-width: none; }
.chart--nornerne.is-full .imap { width: calc(var(--w) * 1px); }
.zoom-bar { display: inline-flex; gap: .2rem; margin-top: 1.2rem; background: var(--surface); padding: .25rem; border-radius: 999px; box-shadow: var(--shadow); }
.zoom-btn { font: inherit; font-size: 1rem; font-weight: 500; padding: .45rem 1rem; border: 0; background: transparent; color: var(--ink); border-radius: 999px; cursor: pointer; }
.zoom-btn[aria-pressed="true"] { background: var(--forest); color: #fff; }
.wide .page { max-width: 110rem; }

/* ------------------------------------------------ anetavlen */
.legend { list-style: none; padding: 0; margin: 1.2rem 0 0; display: flex; flex-wrap: wrap; gap: .4rem .6rem; }
.legend li { display: inline-flex; align-items: center; gap: .45rem; background: var(--surface); border-radius: 999px; padding: .3rem .8rem .3rem .45rem; box-shadow: var(--shadow); font-size: .95rem; }
.sw { width: .9rem; height: .9rem; border-radius: 50%; background: var(--c); }
.ac-bar { display: flex; flex-wrap: wrap; gap: .6rem; margin-top: 1.2rem; }
.seg { display: inline-flex; gap: .2rem; background: var(--surface); padding: .25rem; border-radius: 999px; box-shadow: var(--shadow); }
.seg button { font: inherit; font-size: 1rem; font-weight: 500; padding: .45rem 1rem; border: 0; background: transparent; color: var(--ink); border-radius: 999px; cursor: pointer; min-width: 2.6rem; }
.seg button:hover { background: var(--leaf-wash); }
.seg button[aria-pressed="true"] { background: var(--forest); color: #fff; }
.anetavle { background: var(--surface); border-radius: var(--radius); box-shadow: var(--shadow); overflow: hidden; margin-top: 1rem; }
.ac-scroll { overflow: auto; height: 78vh; min-height: 420px; overscroll-behavior: contain; cursor: grab; }
.ac-scroll.is-drag { cursor: grabbing; user-select: none; }
.ac-scroll.is-drag .ac { pointer-events: none; }
.ac-size { --z: 1; width: calc(var(--w) * var(--z) * 1px); height: calc(var(--h) * var(--z) * 1px); }
.ac-canvas { position: relative; transform: scale(var(--z)); transform-origin: 0 0;
  background-image: linear-gradient(90deg, rgba(23,50,38,.035) 0 50%, transparent 50% 100%); background-size: 488px 100%; background-position: 4px 0; }
.ac-head { position: absolute; top: 12px; width: 196px; display: flex; align-items: baseline; gap: .45rem; color: var(--muted); font-size: 1rem; }
.ac-head b { font-size: 1.3rem; color: var(--ink); }
.ac-lines { position: absolute; inset: 0; pointer-events: none; }
.ac-lines path { fill: none; stroke-width: 2; opacity: .6; transition: opacity .15s; }
.ac {
  position: absolute; width: 196px; height: 60px; display: flex; cursor: pointer; flex-direction: column; justify-content: center;
  padding: 0 1.9rem 0 .7rem; background: #fff; border: 1px solid var(--line); border-left: 5px solid var(--c);
  border-radius: 8px; text-decoration: none; color: var(--ink); font-size: .98rem; line-height: 1.22;
  box-shadow: 0 1px 2px rgba(23,50,38,.08); transition: opacity .15s, box-shadow .15s, transform .15s;
}
.ac-a, .ac-b { white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.ac-a { font-weight: 700; }
.ac-b { color: #3C4842; }
.ac-n { position: absolute; top: 5px; right: 7px; font-size: .8rem; font-weight: 700; color: var(--muted); }
.ac:hover, .ac:focus-visible { box-shadow: 0 0 0 2px var(--c), 0 8px 18px rgba(23,50,38,.18); color: var(--ink); z-index: 2; }
.has-hl .ac { opacity: .28; }
.has-hl .ac.is-hl { opacity: 1; }
.has-hl .ac-lines path { opacity: .08; }
.has-hl .ac-lines path.is-hl { opacity: 1; stroke-width: 3; }
.alist-wrap section { margin-top: 2rem; }
.alist-wrap h2 { display: flex; gap: .6rem; align-items: baseline; flex-wrap: wrap; margin-bottom: .7rem; }
.alist { list-style: none; padding: 0; margin: 0; display: grid; grid-template-columns: repeat(auto-fill, minmax(18rem, 1fr)); gap: .5rem; }
.alist a { display: flex; gap: .7rem; align-items: center; background: var(--surface); border-radius: 10px; border-left: 5px solid var(--c); padding: .65rem .9rem; box-shadow: var(--shadow); text-decoration: none; color: var(--ink); }
.alist .nr { font-weight: 700; color: var(--muted); min-width: 2rem; }
.alist a:hover { box-shadow: 0 0 0 2px var(--c); }
.ac-more { margin-top: 1.5rem; }

/* ------------------------------------------------ mobil */
@media (max-width: 900px) {
  .hero-grid { grid-template-columns: 1fr; }
  .hero-photos { max-width: 34rem; width: 100%; margin: 0 auto; }
  .tiles { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .strip { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .foot-inner { grid-template-columns: 1fr 1fr; }
  .foot-brand { grid-column: 1 / -1; }
}
@media (max-width: 760px) {
  body { font-size: 1.06rem; }
  .head-inner { padding-block: .7rem .5rem; }
  .mainnav { flex-wrap: nowrap; overflow-x: auto; width: 100%; margin: 0 calc(var(--gutter) * -1); padding: 0 var(--gutter) .2rem; scrollbar-width: none; }
  .mainnav::-webkit-scrollbar { display: none; }
  .mainnav a { white-space: nowrap; }
  .hero-grid { grid-template-columns: 1fr; }
  .hero-photos { aspect-ratio: auto; }
  .print--b, .print--c { display: none; }
  .print--a { position: relative; width: 88%; left: auto; top: auto; margin: 0 auto; }
  .hero-search .btn { padding-inline: 1rem; }
  .reads { grid-template-columns: 1fr; }
  .couple { grid-template-columns: 1fr; }
  .wed { flex-direction: row; max-width: none; justify-content: flex-start; padding: 0 .3rem; text-align: left; }
  .prose { font-size: 1.12rem; }
  .ruler .tick .y, .ruler .tick .n { display: none; }
  .tick .g { font-size: .95rem; }
  .ruler::before { top: 9px; }
}
@media (max-width: 520px) {
  .tiles, .strip { grid-template-columns: 1fr 1fr; gap: .8rem; }
  .tile-body span { display: none; }
  .tile-body strong { font-size: 1.12rem; }
  .foot-inner { grid-template-columns: 1fr; }
  .tick .dot { width: 14px; height: 14px; }
  .ruler::before { top: 6px; }
  .tick .g { font-size: .82rem; }
}
@media (prefers-reduced-motion: reduce) { .print:hover { transform: none; } }
@media (prefers-reduced-motion: reduce) { * { transition: none !important; scroll-behavior: auto !important; } }
@media print {
  .site-head, .site-foot, .crumbs, .finder, .alpha, .zoom-bar, .pill { display: none; }
  body, body.kind-photo { background: #fff; color: #000; }
  .pcard, .tile, .story, .prose--text { box-shadow: none; border: 1px solid #ccc; }
}
