/* Ahaha (ahaha.se) – the portal.
   The page itself is quiet (night sky, paper, brass). Every demo wears its own site's colours. */

:root {
  --paper: #f4efe6;
  --card: #fbf8f1;
  --ink: #1b1a17;
  --muted: #655f54;
  --line: #d9d0c0;
  --brass: #8a6417;
  --night: #0b101a;
  --night-2: #131a29;
  --star: #ece7da;
  --star-muted: #a3a9b8;
  --gold: #d9b25c;
  --serif: "Iowan Old Style", "Palatino Linotype", Palatino, "Book Antiqua", Georgia, serif;
  --sans: system-ui, -apple-system, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
  --mono: ui-monospace, "SF Mono", Menlo, Consolas, monospace;
  --wrap: 1140px;
}
@media (prefers-color-scheme: dark) {
  :root {
    --paper: #10141d;
    --card: #161c28;
    --ink: #ece7da;
    --muted: #a3a9b8;
    --line: #2a3142;
    --brass: #d9b25c;
  }
}

* { box-sizing: border-box; }
html { scroll-behavior: smooth; -webkit-text-size-adjust: 100%; }
body { margin: 0; background: var(--paper); color: var(--ink); font: 17px/1.6 var(--sans); }
html[data-lang="en"] body [lang="sv"], html[data-lang="sv"] body [lang="en"] { display: none !important; }
h1, h2, h3 { font-family: var(--serif); font-weight: 600; line-height: 1.08; margin: 0; text-wrap: balance; letter-spacing: -.01em; }
p { margin: 0 0 1em; }
a { color: inherit; }
button { font: inherit; color: inherit; cursor: pointer; }
:focus-visible { outline: 2px solid var(--gold); outline-offset: 3px; border-radius: 6px; }
.skip { position: absolute; left: -999px; top: 8px; background: var(--gold); color: #111; padding: 8px 14px; border-radius: 8px; z-index: 10; }
.skip:focus { left: 8px; }

.kicker { font: 600 12px/1.2 var(--mono); letter-spacing: .16em; text-transform: uppercase; color: var(--gold); margin: 0 0 14px; }
.fine { font-size: 13.5px; color: var(--muted); margin: 14px 0 0; }

.btn { display: inline-flex; align-items: center; gap: 8px; padding: 11px 20px; border-radius: 999px; border: 1px solid currentColor;
  background: transparent; text-decoration: none; font-weight: 600; font-size: 15px; line-height: 1.2; transition: transform .15s, background .15s; }
.btn:hover { transform: translateY(-1px); }
.btn.solid { background: var(--ink); color: var(--paper); border-color: var(--ink); }

/* ---------- the sky: header, hero, map ---------- */
.sky { position: relative; background: radial-gradient(1200px 700px at 78% -10%, #24304d 0%, transparent 60%), linear-gradient(#0b101a, #0e1522 70%, #121a2a); color: var(--star); overflow: hidden; }
.stars { position: absolute; inset: 0; width: 100%; height: 100%; pointer-events: none; }
.sky > *:not(.stars) { position: relative; }
.sky .btn { color: var(--star); border-color: rgba(236, 231, 218, .45); }
.sky .btn.solid { background: var(--gold); border-color: var(--gold); color: #17130a; }

.top { max-width: var(--wrap); margin: 0 auto; padding: 20px 20px 0; display: flex; flex-wrap: wrap; gap: 12px 24px; align-items: center; justify-content: space-between; }
.brand { display: flex; align-items: center; gap: 10px; text-decoration: none; font: 600 17px/1.2 var(--serif); }
.brand .bn { font-size: 22px; letter-spacing: .01em; }
.brand .bt { font: 400 13.5px var(--sans); color: var(--star-muted); padding-left: 10px; border-left: 1px solid rgba(236, 231, 218, .3); }
@media (max-width: 480px) { .brand .bt { display: none; } }
.creed-name { font: 400 17px/1.55 var(--serif); color: var(--muted); max-width: 58ch; margin: 0 0 14px; }
.creed-name b { color: var(--ink); }
.brand svg { color: var(--gold); flex: none; }
.top nav { display: flex; flex-wrap: wrap; gap: 6px 20px; align-items: center; font-size: 14.5px; }
.top nav a { text-decoration: none; color: var(--star-muted); }
.top nav a:hover { color: var(--star); }
.lang { background: transparent; border: 1px solid rgba(236, 231, 218, .35); border-radius: 999px; padding: 5px 13px; font-size: 13.5px; color: var(--star); }

.hero { max-width: var(--wrap); margin: 0 auto; padding: clamp(56px, 10vw, 120px) 20px clamp(40px, 6vw, 70px); }
.hero h1 { font-size: clamp(44px, 8.2vw, 104px); max-width: 12ch; }
.hero .lead { font: 400 clamp(18px, 2.1vw, 22px)/1.55 var(--serif); color: #cfd3dc; max-width: 62ch; margin: 28px 0 0; }
.hero-cta { display: flex; flex-wrap: wrap; gap: 12px; margin: 34px 0 0; }

.sec-head { max-width: 720px; }
.sec-head h2 { font-size: clamp(30px, 4.4vw, 50px); margin-bottom: 16px; }
.mapwrap { max-width: var(--wrap); margin: 0 auto; padding: 30px 20px 70px; }
.mapwrap .sec-head p:not(.kicker) { color: #cfd3dc; }
.mapwrap .fine { color: var(--star-muted); }

.wishes { display: flex; flex-wrap: wrap; gap: 8px; margin: 22px 0 22px; }
.wish { background: rgba(255, 255, 255, .04); border: 1px solid rgba(236, 231, 218, .22); color: var(--star); border-radius: 999px; padding: 7px 14px; font-size: 14px; line-height: 1.25; text-align: left; }
.wish:hover { border-color: rgba(236, 231, 218, .6); }
.wish[aria-pressed="true"] { background: var(--c, var(--gold)); border-color: var(--c, var(--gold)); color: #111; font-weight: 600; }

.mapgrid { display: grid; grid-template-columns: minmax(0, 1fr) 300px; gap: 20px; align-items: stretch; }
.map { border: 1px solid rgba(236, 231, 218, .16); border-radius: 18px; background: rgba(8, 12, 20, .5); overflow: hidden; }
.map svg { display: block; width: 100%; height: auto; }
.map .axis { font: 600 11px var(--mono); letter-spacing: .14em; fill: #8d94a5; text-transform: uppercase; }
.map .grid { stroke: rgba(236, 231, 218, .1); stroke-dasharray: 2 6; }
.map .ringline { fill: none; stroke: rgba(217, 178, 92, .34); stroke-width: 1; }
.map .node { cursor: pointer; outline: none; transition: opacity .25s; }
.map .node text { font: 600 13px var(--sans); fill: var(--star); paint-order: stroke; stroke: #0b101a; stroke-width: 4px; stroke-linejoin: round; }
.map .node .halo { opacity: .18; transition: opacity .2s; transform-box: fill-box; transform-origin: center; }
.map .node:hover .halo, .map .node:focus-visible .halo, .map .node.on .halo { opacity: .42; }
.map .node.on .halo { animation: pulse 2.4s ease-in-out infinite; }
.map .node:focus-visible .core { stroke: #fff; stroke-width: 2; }
.map.has-sel .node:not(.on) { opacity: .38; }
@keyframes pulse { 50% { transform: scale(1.35); } }

.plate-card { border: 1px solid rgba(236, 231, 218, .16); border-radius: 18px; padding: 22px; background: rgba(255, 255, 255, .03); display: flex; flex-direction: column; gap: 10px; min-height: 250px; }
.plate-card .pc-verb { font: 600 30px/1.08 var(--serif); }
.plate-card .pc-name { font: 600 12px var(--mono); letter-spacing: .14em; text-transform: uppercase; color: var(--c, var(--gold)); }
.plate-card p { color: #cfd3dc; font-size: 15.5px; margin: 0; }
.plate-card .pc-btns { margin-top: auto; display: flex; flex-wrap: wrap; gap: 8px; padding-top: 10px; }
.plate-card .btn { padding: 9px 16px; font-size: 14px; }
.plate-card .btn.solid { background: var(--c, var(--gold)); border-color: var(--c, var(--gold)); }
.plate-card .pc-empty { color: var(--star-muted); font: italic 18px/1.5 var(--serif); margin: auto 0; }

/* ---------- chapters and exhibits ---------- */
main { max-width: var(--wrap); margin: 0 auto; padding: 0 20px; }
.creed { padding: clamp(56px, 8vw, 96px) 0 clamp(36px, 5vw, 56px); border-bottom: 1px solid var(--line); scroll-margin-top: 10px; }
.creed .kicker { color: var(--brass); }
.creed h2 { font-size: clamp(32px, 5vw, 56px); margin-bottom: 20px; }
.creed-lead { font: 400 clamp(19px, 2.1vw, 23px)/1.55 var(--serif); max-width: 62ch; margin: 0; }
.tools { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 14px; margin: 34px 0 30px; }
.tools > div { background: var(--card); border: 1px solid var(--line); border-top: 3px solid var(--brass); border-radius: 4px 4px 14px 14px; padding: 18px 18px 6px; }
.tools h3 { font-size: 25px; margin-bottom: 8px; }
.tools p { font-size: 15.5px; line-height: 1.5; color: var(--muted); }
.creed-end { font: 600 clamp(18px, 2vw, 21px)/1.5 var(--serif); max-width: 58ch; margin: 0; }
@media (max-width: 900px) { .tools { grid-template-columns: repeat(2, minmax(0, 1fr)); } }
@media (max-width: 480px) { .tools { grid-template-columns: 1fr; } }

.chapter { padding: clamp(60px, 9vw, 110px) 0 10px; max-width: 760px; }
.chapter .num { font: 600 14px var(--mono); letter-spacing: .2em; color: var(--brass); margin: 0 0 14px; display: flex; align-items: center; gap: 14px; }
.chapter .num::after { content: ""; height: 1px; width: 70px; background: var(--brass); opacity: .6; }
.chapter h2 { font-size: clamp(34px, 5.4vw, 62px); margin-bottom: 18px; }
.chapter p:not(.num) { font: 400 clamp(18px, 2vw, 21px)/1.55 var(--serif); color: var(--muted); margin: 0; }

.exhibit { display: grid; grid-template-columns: minmax(0, 5fr) minmax(0, 7fr); gap: clamp(24px, 4vw, 56px); align-items: center; padding: clamp(36px, 5vw, 60px) 0; border-bottom: 1px solid var(--line); scroll-margin-top: 10px; }
.exhibit.flip .ex-text { order: 2; }
.plate { font: 600 11.5px var(--mono); letter-spacing: .12em; text-transform: uppercase; color: var(--brass); margin: 0 0 14px; }
.exhibit h3 { font-size: clamp(34px, 4.6vw, 54px); }
.ex-name { font: 600 16px var(--sans); margin: 10px 0 18px; }
.ex-name .amp { color: var(--muted); font-weight: 400; }
.ex-text > p[lang] { color: var(--ink); }
.adds { border-left: 3px solid var(--brass); padding-left: 14px; font: 400 17px/1.5 var(--serif); }
.ex-links { display: flex; flex-wrap: wrap; gap: 10px; margin: 22px 0 0; }

/* ---------- demos: shared ---------- */
.demo { border-radius: 18px; padding: clamp(18px, 2.6vw, 28px); min-height: 380px; position: relative; overflow: hidden; display: flex; flex-direction: column; gap: 14px;
  background: var(--d-bg, #111); color: var(--d-fg, #eee); box-shadow: 0 1px 0 rgba(255, 255, 255, .05) inset, 0 20px 50px -30px rgba(0, 0, 0, .55); font-size: 15px; line-height: 1.45; }
.demo .tag { font: 700 11px var(--mono); letter-spacing: .16em; text-transform: uppercase; color: var(--d-ac); margin: 0; }
.demo p { margin: 0; }
.demo .note { font-size: 12.5px; opacity: .7; margin-top: auto; }
.demo .dbtn { align-self: flex-start; border: 0; border-radius: 10px; padding: 10px 16px; font-weight: 700; font-size: 14.5px; background: var(--d-ac); color: var(--d-on, #111); }
.demo .dbtn.ghost { background: transparent; color: inherit; border: 1px solid currentColor; opacity: .85; }
.demo .dbtn:disabled { opacity: .45; cursor: default; }
.demo .row { display: flex; flex-wrap: wrap; gap: 8px; align-items: center; }
.demo :focus-visible { outline-color: var(--d-ac); }

/* Faktaresistens */
.d-fakta { --d-bg: #0d0d0d; --d-fg: #f0efec; --d-ac: #fecc00; }
.d-fakta .q { font-size: clamp(20px, 2.4vw, 26px); font-weight: 700; line-height: 1.2; letter-spacing: -.01em; }
.d-fakta input[type=range] { width: 100%; accent-color: #fecc00; margin: 0; }
.d-fakta .guess { font: 800 44px/1 var(--sans); color: #fecc00; font-variant-numeric: tabular-nums; }
.d-fakta .bars { display: grid; gap: 10px; }
.d-fakta .bar { display: grid; grid-template-columns: 96px 1fr 58px; gap: 10px; align-items: center; font-size: 14px; }
.d-fakta .bar i { display: block; height: 16px; border-radius: 3px; background: #fecc00; width: 0; transition: width .9s cubic-bezier(.2, .8, .2, 1); }
.d-fakta .bar.you i { background: #f0efec; }
.d-fakta .bar.eu i { background: #6f7480; }
.d-fakta .bar b { text-align: right; font-variant-numeric: tabular-nums; }
.d-fakta .track { background: #222; border-radius: 3px; }
.d-fakta .verdict { font-weight: 600; }
.d-fakta .ticker { border-top: 1px solid #2a2a2a; padding-top: 12px; display: flex; gap: 12px; align-items: baseline; flex-wrap: wrap; }
.d-fakta .ticker b { font: 800 26px/1 var(--sans); color: #fecc00; font-variant-numeric: tabular-nums; }

/* Aktiekartan */
.d-aktie { --d-bg: #0c0e12; --d-fg: #e8eaf0; --d-ac: #6f8cff; }
.d-aktie .seg { display: inline-flex; border: 1px solid #2b3140; border-radius: 10px; overflow: hidden; }
.d-aktie .seg button { background: transparent; border: 0; padding: 8px 14px; font-size: 13.5px; font-weight: 600; color: #aab1c2; }
.d-aktie .seg button[aria-pressed="true"] { background: #6f8cff; color: #0c0e12; }
.d-aktie .tm { position: relative; width: 100%; aspect-ratio: 16 / 10; border-radius: 8px; overflow: hidden; background: #14171d; }
.d-aktie .box { position: absolute; border: 1.5px solid #0c0e12; padding: 6px 8px; overflow: hidden; color: #fff; font-size: 12.5px; line-height: 1.2; text-align: left; transition: background .5s, filter .15s; display: flex; flex-direction: column; justify-content: center; align-items: center; }
.d-aktie .box:hover, .d-aktie .box:focus-visible { filter: brightness(1.25); z-index: 2; }
.d-aktie .box b { font-size: 13px; white-space: nowrap; }
.d-aktie .box span { font-variant-numeric: tabular-nums; opacity: .95; white-space: nowrap; }
.d-aktie .info { min-height: 2.9em; font-size: 14px; color: #c5cad8; }

/* Morrow Brief / Morgonkollen */
.d-brief { --d-bg: #f5f1e8; --d-fg: #1d1b17; --d-ac: #b5482f; --d-on: #fff; }
.d-brief .chip { border: 1px solid #cfc5b2; background: #fffdf8; color: #1d1b17; border-radius: 999px; padding: 6px 13px; font-size: 13.5px; }
.d-brief .chip[aria-pressed="true"] { background: #1d1b17; border-color: #1d1b17; color: #f5f1e8; }
.d-brief .paper { background: #fffdf8; border: 1px solid #ddd3c0; border-radius: 10px; padding: 16px 18px; flex: 1; }
.d-brief .dateline { font: 600 11px var(--mono); letter-spacing: .1em; text-transform: uppercase; color: #7a7263; border-bottom: 2px solid #1d1b17; padding-bottom: 8px; margin-bottom: 12px; display: flex; justify-content: space-between; gap: 10px; flex-wrap: wrap; }
.d-brief .item { padding: 9px 0; border-bottom: 1px solid #e7dfd0; animation: rise .45s both; }
.d-brief .item:last-child { border: 0; }
.d-brief .item small { display: block; font: 700 10.5px var(--mono); letter-spacing: .12em; text-transform: uppercase; color: #b5482f; margin-bottom: 3px; }
.d-brief .item b { font: 600 16px/1.25 var(--serif); display: block; }
.d-brief .item.lead b { font-size: 22px; line-height: 1.15; }
.d-brief .item p { font-size: 14px; color: #4d483f; margin-top: 5px; }
.d-brief .waiting { color: #7a7263; font: italic 16px var(--serif); }
@keyframes rise { from { opacity: 0; transform: translateY(8px); } }

/* Framtidsfacit */
.d-framtid { --d-bg: #07110d; --d-fg: #d8f5e4; --d-ac: #f2b33d; --d-on: #0b1a2b; font-family: var(--serif);
  background-image: repeating-linear-gradient(0deg, rgba(120, 255, 190, .035) 0 1px, transparent 1px 4px); }
.d-framtid .tag, .d-framtid .dbtn, .d-framtid .year, .d-framtid .stamp, .d-framtid .score { font-family: Futura, "Century Gothic", "Avenir Next", var(--sans); }
.d-framtid .year { font-size: 54px; font-weight: 700; line-height: .9; color: #f2b33d; letter-spacing: .02em; }
.d-framtid blockquote { margin: 0; font-size: clamp(19px, 2.2vw, 24px); line-height: 1.3; color: #f2ead8; }
.d-framtid cite { font-style: normal; font-size: 13px; letter-spacing: .12em; text-transform: uppercase; opacity: .75; }
.d-framtid .ans { display: grid; grid-template-columns: repeat(3, 1fr); gap: 8px; }
.d-framtid .ans button { border: 1px solid #f2b33d; background: transparent; color: #f2b33d; border-radius: 8px; padding: 10px 6px; font: 700 14px Futura, "Century Gothic", var(--sans); letter-spacing: .08em; text-transform: uppercase; }
.d-framtid .ans button:hover:not(:disabled) { background: #f2b33d; color: #0b1a2b; }
.d-framtid .ans button.right { background: #6fe0a0; border-color: #6fe0a0; color: #07110d; }
.d-framtid .ans button.wrong { background: #ff7a6b; border-color: #ff7a6b; color: #07110d; }
.d-framtid .ans button:disabled { cursor: default; }
.d-framtid .facit { border-left: 3px solid #f2b33d; padding-left: 12px; animation: rise .4s both; font-size: 16px; }
.d-framtid .facit b { display: block; font: 700 12px Futura, "Century Gothic", var(--sans); letter-spacing: .14em; text-transform: uppercase; color: #f2b33d; margin-bottom: 3px; }
.d-framtid .score { font-size: 12.5px; letter-spacing: .1em; text-transform: uppercase; opacity: .8; }

/* Moralpanik */
.d-moral { --d-bg: #f3eee3; --d-fg: #141210; --d-ac: #141210; --d-on: #ffd400; font-family: Georgia, "Times New Roman", serif; }
.d-moral .tag { background: #141210; color: #ffd400; align-self: flex-start; padding: 5px 9px; }
.d-moral .when { font: 700 12px var(--mono); letter-spacing: .1em; text-transform: uppercase; }
.d-moral h4 { margin: 0; font: 400 clamp(30px, 4.3vw, 46px)/1 Impact, "Arial Narrow Bold", "Haettenschweiler", "Arial Narrow", sans-serif; text-transform: uppercase; letter-spacing: .01em; text-wrap: balance; }
.d-moral .facit { position: relative; background: #fffdf6; border: 2px solid #141210; padding: 14px 16px; animation: rise .4s both; font-size: 16px; }
.d-moral .facit b { font: 700 11px var(--mono); letter-spacing: .14em; text-transform: uppercase; display: block; margin-bottom: 4px; }
.d-moral .stamp { display: inline-block; margin-top: 10px; border: 3px solid #c22a1e; color: #c22a1e; font: 800 15px var(--sans); letter-spacing: .14em; text-transform: uppercase; padding: 3px 10px; transform: rotate(-4deg); animation: stamp .35s .25s both; }
.d-moral .stamp.true { border-color: #1c6a3c; color: #1c6a3c; }
@keyframes stamp { from { opacity: 0; transform: rotate(-4deg) scale(2.2); } }
.d-moral .tally { display: flex; height: 14px; border: 2px solid #141210; }
.d-moral .tally i { display: block; }
.d-moral .legend { display: flex; flex-wrap: wrap; gap: 4px 14px; font: 600 12px var(--sans); }
.d-moral .legend span::before { content: ""; display: inline-block; width: 10px; height: 10px; margin-right: 5px; background: var(--k); border: 1px solid #141210; }

/* Creofant */
.d-creo { --d-bg: #f6ede0; --d-fg: #1c1a16; --d-ac: #7b7466; font-family: var(--serif); padding: 0; gap: 0; }
.d-creo .meadow { display: block; width: 100%; height: auto; }
.d-creo .plant { cursor: pointer; outline: none; }
.d-creo .plant:hover .bloom, .d-creo .plant:focus-visible .bloom, .d-creo .plant.on .bloom { stroke: #1c1a16; stroke-width: 2; }
.d-creo .txt { padding: 16px clamp(18px, 2.6vw, 28px) 20px; display: flex; flex-direction: column; gap: 8px; flex: 1; }
.d-creo .tag { font-family: var(--mono); }
.d-creo blockquote { margin: 0; font-size: clamp(19px, 2.2vw, 23px); line-height: 1.35; }
.d-creo .src { font: 500 12.5px var(--mono); color: #7b7466; }
.d-creo .gloss { font-size: 14px; color: #6b655a; font-style: italic; }

/* Opponera / The Object Daily */
.d-object { --d-bg: #f3eee4; --d-fg: #15171c; --d-ac: #b3271c; --d-on: #fff; font-family: var(--serif); }
.d-object .mast { text-align: center; border-top: 3px double #15171c; border-bottom: 1px solid #15171c; padding: 8px 0 6px; font: 700 22px/1.1 var(--serif); letter-spacing: .01em; }
.d-object .mast small { display: block; font: 500 11px var(--mono); letter-spacing: .14em; text-transform: uppercase; margin-top: 3px; }
.d-object .they { font-size: 18px; color: #4a4d55; }
.d-object .they b { display: block; font: 700 11px var(--mono); letter-spacing: .14em; text-transform: uppercase; color: #6b6e76; margin-bottom: 4px; }
.d-object .they.struck q { text-decoration: line-through; text-decoration-color: #b3271c; text-decoration-thickness: 2px; }
.d-object .obj { animation: rise .45s both; }
.d-object .obj em { display: block; font-style: italic; color: #b3271c; font-size: 17px; margin-bottom: 4px; }
.d-object .obj h4 { margin: 0; font: 700 clamp(22px, 2.8vw, 29px)/1.12 var(--serif); text-wrap: balance; }
.d-object .obj small { display: block; margin-top: 8px; font: 500 11.5px var(--mono); letter-spacing: .08em; text-transform: uppercase; color: #6b6e76; }

/* Utomjordiska Institutet */
.d-utom { --d-bg: #0c1527; --d-fg: #f8f1df; --d-ac: #e2c991; font-family: Garamond, "Cormorant Garamond", "Iowan Old Style", Georgia, serif; font-size: 17px;
  background-image: radial-gradient(600px 300px at 80% 0, rgba(226, 201, 145, .12), transparent 70%); }
.d-utom input[type=text] { width: 100%; background: rgba(255, 255, 255, .06); border: 1px solid rgba(226, 201, 145, .5); border-radius: 8px; padding: 10px 12px; color: #f8f1df; font: inherit; }
.d-utom input::placeholder { color: rgba(248, 241, 223, .5); }
.d-utom .chip { border: 1px solid rgba(226, 201, 145, .45); background: transparent; color: #e2c991; border-radius: 999px; padding: 4px 12px; font: 500 13.5px var(--sans); }
.d-utom .chip:hover { background: rgba(226, 201, 145, .15); }
.d-utom .diploma { flex: 1; border: 1px solid #e2c991; outline: 1px solid rgba(226, 201, 145, .4); outline-offset: 4px; margin: 6px; padding: 18px; text-align: center; display: flex; flex-direction: column; justify-content: center; gap: 6px; }
.d-utom .diploma small { font: 600 10.5px var(--mono); letter-spacing: .18em; text-transform: uppercase; color: #e2c991; }
.d-utom .diploma strong { font-size: clamp(22px, 2.8vw, 30px); line-height: 1.12; font-weight: 600; text-wrap: balance; }
.d-utom .diploma em { color: #cdbf9f; font-size: 16px; }
.d-utom .diploma.new { animation: rise .45s both; }

/* Reverse Graphology */
.d-graph { --d-bg: #fffdf6; --d-fg: #1d2433; --d-ac: #1d2433; --d-on: #fffdf6; border: 1px solid #ddd6c4; }
.d-graph .sheet { flex: 1; border-radius: 6px; background: repeating-linear-gradient(#fffdf6 0 43px, #c9d4ea 43px 44px); min-height: 170px; display: flex; align-items: center; }
.d-graph svg { width: 100%; height: auto; display: block; }
.d-graph .sl { display: grid; grid-template-columns: 1fr minmax(90px, 1.3fr) 1fr; gap: 10px; align-items: center; font-size: 13.5px; }
.d-graph .sl span:last-child { text-align: right; }
.d-graph input[type=range] { width: 100%; accent-color: #1d2433; margin: 0; }
.d-graph .note { font-family: var(--serif); font-style: italic; font-size: 14px; }

/* Repeat Listen */
.d-repeat { --d-bg: #121212; --d-fg: #f1ede4; --d-ac: #f1ede4; --d-on: #121212; }
.d-repeat .deck { display: grid; grid-template-columns: minmax(0, 210px) minmax(0, 1fr); gap: 20px; align-items: center; flex: 1; }
.d-repeat .disc { width: 100%; aspect-ratio: 1; border-radius: 50%; position: relative;
  background: radial-gradient(circle, #e4572e 0 17%, #121212 17.5% 19%, transparent 19.5%), repeating-radial-gradient(circle, #1c1c1c 0 2px, #050505 2px 4px);
  box-shadow: 0 0 0 1px #333, 0 14px 30px -12px #000; animation: spin 3.2s linear infinite; animation-play-state: paused; }
.d-repeat .disc.playing { animation-play-state: running; }
.d-repeat .disc::before { content: ""; position: absolute; inset: 0; border-radius: 50%; background: conic-gradient(from 20deg, transparent 0 8%, rgba(255, 255, 255, .13) 12%, transparent 17% 55%, rgba(255, 255, 255, .09) 60%, transparent 66%); }
.d-repeat .disc::after { content: ""; position: absolute; left: 50%; top: 50%; width: 5%; height: 5%; margin: -2.5% 0 0 -2.5%; border-radius: 50%; background: #f1ede4; }
.d-repeat .disc b { position: absolute; left: 50%; top: 31%; transform: translateX(-50%); font: 800 9px var(--sans); letter-spacing: .1em; color: #121212; z-index: 1; }
@keyframes spin { to { transform: rotate(360deg); } }
.d-repeat h4 { margin: 0 0 2px; font: 900 22px/1.05 "Arial Black", Impact, var(--sans); text-transform: uppercase; }
.d-repeat .by { font-size: 12.5px; opacity: .7; margin-bottom: 8px; }
.d-repeat ol { margin: 0; padding: 0; list-style: none; font-family: Georgia, serif; font-size: 15px; }
.d-repeat li { display: flex; gap: 10px; padding: 4px 0; border-bottom: 1px solid #2a2a2a; opacity: .62; transition: opacity .3s; }
.d-repeat li.now { opacity: 1; }
.d-repeat li.now::after { content: "♪"; margin-left: auto; color: #e4572e; }
.d-repeat li i { font: 700 12px var(--mono); opacity: .6; font-style: normal; padding-top: 2px; }

/* Gottepedia */
.d-gotte { --d-bg: #1b1216; --d-fg: #f8ece6; --d-ac: #ff4f9a; }
.d-gotte .shop { display: grid; grid-template-columns: repeat(5, 1fr); gap: 8px; }
.d-gotte .candy { background: rgba(255, 255, 255, .05); border: 1px solid rgba(248, 236, 230, .16); border-radius: 12px; padding: 10px 4px 8px; color: inherit; font-size: 11.5px; line-height: 1.2; display: flex; flex-direction: column; align-items: center; gap: 7px; }
.d-gotte .candy:hover { border-color: #ff4f9a; }
.d-gotte .candy:active { transform: scale(.95); }
.d-gotte .pc { width: 30px; height: 30px; border-radius: var(--r, 50%); background: var(--k); box-shadow: inset -3px -4px 0 rgba(0, 0, 0, .18), inset 3px 3px 0 rgba(255, 255, 255, .28); flex: none; }
.d-gotte .bagrow { display: grid; grid-template-columns: minmax(0, 190px) 1fr; gap: 18px; align-items: end; flex: 1; }
.d-gotte .bag { position: relative; min-height: 170px; border: 2px solid rgba(248, 236, 230, .5); border-top: 0; border-radius: 4px 4px 16px 16px; background: linear-gradient(rgba(255, 255, 255, .02), rgba(255, 79, 154, .1)); display: flex; flex-wrap: wrap-reverse; align-content: flex-start; gap: 3px; padding: 8px; clip-path: polygon(0 0, 8% 4%, 16% 0, 24% 4%, 32% 0, 40% 4%, 48% 0, 56% 4%, 64% 0, 72% 4%, 80% 0, 88% 4%, 100% 0, 100% 100%, 0 100%); }
.d-gotte .bag .pc { width: 22px; height: 22px; animation: drop .4s cubic-bezier(.3, 1.4, .5, 1) both; }
@keyframes drop { from { transform: translateY(-120px) rotate(-40deg); opacity: 0; } }
.d-gotte .grams { font: 600 40px/1 var(--serif); color: #ff4f9a; font-variant-numeric: tabular-nums; }
.d-gotte .say { font: italic 17px/1.35 var(--serif); margin: 8px 0 12px; }

/* ---------- the ring ---------- */
.ringsec { padding: clamp(60px, 9vw, 110px) 0 70px; }
.ringsec .kicker { color: var(--brass); }
.ringsec .sec-head p:not(.kicker) { color: var(--muted); font: 400 19px/1.55 var(--serif); }
.loop { list-style: none; margin: 30px 0 0; padding: 0; display: grid; grid-template-columns: repeat(auto-fill, minmax(245px, 1fr)); gap: 10px; counter-reset: stop; }
.loop li { counter-increment: stop; }
.loop a { display: grid; grid-template-columns: auto 1fr auto; gap: 12px; align-items: center; height: 100%; text-decoration: none; background: var(--card); border: 1px solid var(--line); border-radius: 14px; padding: 12px 14px; }
.loop a:hover { border-color: var(--brass); }
.loop a::before { content: counter(stop, decimal-leading-zero); font: 600 12px var(--mono); color: var(--muted); }
.loop a::after { content: "→"; color: var(--brass); }
.loop b { display: block; font-size: 15.5px; line-height: 1.2; }
.loop small { display: block; color: var(--muted); font-size: 13px; line-height: 1.3; margin-top: 2px; }
.loop i { display: inline-block; width: 9px; height: 9px; border-radius: 50%; background: var(--c); margin-right: 7px; border: 1px solid rgba(0, 0, 0, .25); }
.loop-end { font: italic 17px var(--serif); color: var(--brass); margin: 14px 0 34px; }
.ring-preview { border: 1px solid var(--line); border-radius: 14px; overflow: hidden; margin-top: 8px; }

.foot { border-top: 1px solid var(--line); padding: 26px 20px 50px; text-align: center; color: var(--muted); font-size: 14px; }
.foot p { margin: 0; }

/* ---------- small screens ---------- */
@media (max-width: 1020px) {
  .mapgrid { grid-template-columns: 1fr; }
  .plate-card { min-height: 0; }
  .plate-card .pc-btns { margin-top: 6px; }
}
@media (max-width: 900px) {
  .exhibit { grid-template-columns: 1fr; }
  .exhibit.flip .ex-text { order: 0; }
}
@media (max-width: 560px) {
  body { font-size: 16px; }
  .top { padding-top: 14px; }
  .top nav { gap: 6px 14px; font-size: 13.5px; }
  .demo { min-height: 0; }
  .d-repeat .deck { grid-template-columns: 1fr; }
  .d-repeat .disc { max-width: 190px; margin: 0 auto; }
  .d-gotte .candy { font-size: 10px; padding: 8px 2px 6px; }
  .d-gotte .bagrow { grid-template-columns: 120px 1fr; }
  .d-fakta .bar { grid-template-columns: 78px 1fr 52px; }
  .d-graph .sl { grid-template-columns: 1fr; gap: 2px; }
  .d-graph .sl span:last-child { display: none; }
}
@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  *, *::before, *::after { animation-duration: .01ms !important; animation-iteration-count: 1 !important; transition-duration: .01ms !important; }
}
