/* kortspiller.dk - pointblokkens papir, kortenes rødt og sort, Bodoni som på et gammelt spillekort */
@font-face { font-family: "Bodoni Moda"; src: url("/assets/fonts/bodoni-moda.woff2") format("woff2"); font-weight: 400 900; font-style: normal; font-display: swap; }
@font-face { font-family: "Bodoni Moda"; src: url("/assets/fonts/bodoni-moda-italic.woff2") format("woff2"); font-weight: 400; font-style: italic; font-display: swap; }
@font-face { font-family: "Commissioner"; src: url("/assets/fonts/commissioner.woff2") format("woff2"); font-weight: 100 900; font-style: normal; font-display: swap; }

:root {
  --papir: #f5efe2;
  --papir-2: #ebe3d0;
  --kort: #fffdf8;
  --blaek: #1c1916;
  --daempet: #5d554b;
  --linje: #d6ccb6;
  --roed: #a8221b;
  --roed-dyb: #861912;
  --bord: #1f3a33;
  --display: "Bodoni Moda", Georgia, serif;
  --tekst: "Commissioner", system-ui, sans-serif;
  --maal: 64ch;
}

*, *::before, *::after { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; }
body { margin: 0; background: var(--papir); color: var(--blaek); font-family: var(--tekst); font-size: 1.0625rem; line-height: 1.65; }
img, svg { max-width: 100%; }
a { color: var(--roed); text-underline-offset: 3px; text-decoration-thickness: 1px; }
a:hover { color: var(--roed-dyb); text-decoration-thickness: 2px; }
:focus-visible { outline: 2px solid var(--roed); outline-offset: 3px; }
h1, h2, h3 { font-family: var(--display); font-weight: 600; line-height: 1.08; margin: 0 0 .45em; text-wrap: balance; font-variation-settings: "opsz" 60; }
h1 { font-size: clamp(2.6rem, 7vw, 4.8rem); font-weight: 700; letter-spacing: -.01em; }
h1 em, h2 em { font-weight: 400; color: var(--roed); }
h2 { font-size: clamp(1.8rem, 3.6vw, 2.5rem); }
h3 { font-size: 1.35rem; }
p { margin: 0 0 1em; }
.ramme { width: min(1120px, 100% - 32px); margin-inline: auto; }
.spring { position: absolute; left: -9999px; }
.spring:focus { left: 16px; top: 12px; background: var(--kort); padding: .5em 1em; z-index: 5; }

.kuloer, .mini { fill: currentColor; }
.kuloer.roed, .mini.roed { color: var(--roed); }
.kuloer.sort, .mini.sort { color: var(--blaek); }

/* top */
.top { border-bottom: 1px solid var(--linje); }
.top-ind { display: flex; align-items: center; justify-content: space-between; flex-wrap: wrap; gap: 10px 28px; padding-block: 16px; }
.ordmaerke { display: inline-flex; align-items: center; gap: 10px; color: var(--blaek); text-decoration: none; font-family: var(--display); font-size: 1.6rem; font-weight: 700; }
.ordmaerke:hover { color: var(--blaek); }
.maerke-kuloer { display: inline-flex; gap: 2px; }
.maerke-kuloer .mini { width: 18px; height: 19px; }
.menu { display: flex; flex-wrap: wrap; gap: 4px 24px; }
.menu a { color: var(--blaek); text-decoration: none; padding: 4px 0; font-size: .98rem; }
.menu a:hover { color: var(--roed); }
.menu a[aria-current="page"] { color: var(--roed); text-decoration: underline; text-decoration-thickness: 2px; text-underline-offset: 8px; }

/* forside */
.helt { padding: clamp(44px, 7vw, 96px) 0 clamp(40px, 6vw, 80px); }
.helt-ind { display: grid; grid-template-columns: 1.15fr .85fr; gap: 48px; align-items: center; }
.indledning { font-size: 1.2rem; line-height: 1.55; max-width: 40ch; color: #3a342d; }
.vifte { position: relative; height: 340px; }
.vifte .spkort { position: absolute; left: 50%; bottom: 10px; width: 150px; height: 212px; margin-left: -75px; background: var(--kort); border-radius: 12px; box-shadow: 0 1px 0 var(--linje), 0 12px 30px rgba(60, 40, 20, .14); transform-origin: 50% 120%; }
.vifte .spkort:nth-child(1) { transform: rotate(-24deg); }
.vifte .spkort:nth-child(2) { transform: rotate(-8deg); }
.vifte .spkort:nth-child(3) { transform: rotate(8deg); }
.vifte .spkort:nth-child(4) { transform: rotate(24deg); }
.spkort .kuloer { position: absolute; top: 40px; left: 12px; width: 22px; height: 23px; }
.spkort .stor { width: 58px; height: 60px; position: absolute; left: 50%; top: 50%; margin: -30px 0 0 -29px; fill: currentColor; color: var(--blaek); }
.spkort .hjoerne { position: absolute; top: 12px; left: 12px; width: 22px; text-align: center; font-family: var(--display); font-weight: 700; font-size: 1.3rem; line-height: 1; }
.spkort .hjoerne.roed { color: var(--roed); }
.knapper { display: flex; flex-wrap: wrap; gap: 12px; margin-top: 26px; }
.knap { display: inline-block; background: var(--blaek); color: var(--kort); text-decoration: none; padding: .78em 1.3em; border-radius: 6px; font-weight: 600; }
.knap:hover { background: var(--roed); color: var(--kort); }
.knap-lys { background: transparent; color: var(--blaek); box-shadow: inset 0 0 0 1.5px var(--blaek); }
.knap-lys:hover { background: var(--blaek); color: var(--kort); }

.sektion { padding: clamp(40px, 6vw, 80px) 0; }
.sektion-papir { background: var(--papir-2); }
.tre { display: grid; grid-template-columns: repeat(3, 1fr); gap: 40px; }
.tre h3 { display: flex; align-items: center; gap: 10px; }
.tre h3 .kuloer { width: 22px; height: 23px; flex: none; }
.pil { font-weight: 600; text-decoration: none; }
.pil::after { content: " \2192"; }
.citat { font-family: var(--display); font-style: italic; font-size: clamp(1.5rem, 3.4vw, 2.2rem); line-height: 1.3; max-width: 30ch; margin: 0 0 .4em; }
.citat-kilde { color: var(--daempet); font-size: .95rem; }
.ord-smagsproeve { display: grid; grid-template-columns: repeat(2, 1fr); gap: 0 40px; margin: 0; }
.ord-smagsproeve div { padding: 14px 0; border-top: 1px solid var(--linje); }
.ord-smagsproeve dt { font-family: var(--display); font-weight: 600; font-size: 1.2rem; }
.ord-smagsproeve dd { margin: 2px 0 0; color: #3a342d; }

/* tekstsider */
.side-top { padding: clamp(36px, 6vw, 72px) 0 clamp(20px, 3vw, 36px); }
.side-top .indledning { max-width: 54ch; }
.indhold { padding-bottom: clamp(56px, 8vw, 100px); }
.artikel { max-width: var(--maal); }
.artikel h2 { margin-top: 1.5em; }
.artikel h2:first-child { margin-top: 0; }
.artikel ul, .artikel ol { padding-left: 1.2em; margin: 0 0 1.2em; }
.artikel li { margin-bottom: .45em; }
.note { background: var(--kort); border-radius: 10px; padding: 18px 22px; box-shadow: 0 1px 0 var(--linje); }

/* ordbog */
.bogstaver { display: flex; flex-wrap: wrap; gap: 6px; margin: 0 0 28px; padding: 0; list-style: none; }
.bogstaver a { display: inline-grid; place-items: center; width: 38px; height: 38px; border-radius: 50%; background: var(--kort); color: var(--blaek); text-decoration: none; font-family: var(--display); font-weight: 600; box-shadow: 0 0 0 1px var(--linje); }
.bogstaver a:hover { background: var(--blaek); color: var(--kort); }
.ordliste { margin: 0; max-width: 760px; }
.ordliste .gruppe { font-family: var(--display); font-size: 2.4rem; color: var(--roed); margin: 28px 0 4px; font-weight: 400; font-style: italic; }
.ordliste dt { font-weight: 700; font-size: 1.08rem; padding-top: 14px; border-top: 1px solid var(--linje); }
.ordliste dd { margin: 4px 0 14px; color: #3a342d; }

/* kulørtabel */
.kuloerer { display: grid; grid-template-columns: repeat(4, 1fr); gap: 12px; margin: 0 0 1.4em; }
.kuloerer div { background: var(--kort); border-radius: 10px; padding: 16px 10px; text-align: center; box-shadow: 0 1px 0 var(--linje); }
.kuloerer .kuloer { width: 34px; height: 36px; display: block; margin: 0 auto 8px; }
.kuloerer span { font-weight: 600; }

/* pointtavle */
.tavle-vaerktoej { display: flex; flex-wrap: wrap; gap: 10px; align-items: center; margin: 0 0 18px; }
.tavle-vaerktoej button, .tavle-vaerktoej select { font: inherit; font-size: .98rem; padding: .55em 1em; border-radius: 6px; border: 1.5px solid var(--blaek); background: var(--kort); color: var(--blaek); cursor: pointer; }
.tavle-vaerktoej button.primaer { background: var(--blaek); color: var(--kort); }
.tavle-vaerktoej button:hover { border-color: var(--roed); }
.tavle-vaerktoej label { font-size: .95rem; display: inline-flex; gap: 8px; align-items: center; }
.tavle { background: var(--kort); border-radius: 12px; padding: 8px 0; box-shadow: 0 1px 0 var(--linje), 0 10px 26px rgba(60, 40, 20, .08); overflow-x: auto; margin-bottom: 28px; }
.tavle table { border-collapse: collapse; width: 100%; min-width: 420px; }
.tavle th, .tavle td { padding: 6px 8px; text-align: center; border-bottom: 1px solid var(--papir-2); white-space: nowrap; }
.tavle th:first-child, .tavle td:first-child { text-align: left; padding-left: 16px; color: var(--daempet); font-size: .9rem; width: 70px; position: sticky; left: 0; background: var(--kort); }
.tavle thead input { width: 100%; min-width: 86px; font: inherit; font-weight: 700; text-align: center; border: 0; border-bottom: 1.5px dashed var(--linje); background: transparent; padding: 6px 2px; color: var(--blaek); }
.tavle tbody input { width: 100%; min-width: 70px; font: inherit; font-variant-numeric: tabular-nums; text-align: center; border: 1px solid transparent; border-radius: 6px; background: var(--papir); padding: 6px 4px; color: var(--blaek); }
.tavle input:focus { outline: none; border-color: var(--blaek); background: var(--kort); }
.tavle tfoot td { font-family: var(--display); font-weight: 700; font-size: 1.4rem; border-top: 2px solid var(--blaek); border-bottom: 0; padding-top: 10px; font-variant-numeric: tabular-nums; }
.tavle tfoot td.forer { color: var(--roed); }
.tavle tfoot td.forer::before { content: ""; display: inline-block; width: 8px; height: 8px; background: var(--roed); transform: rotate(45deg); margin-right: 8px; vertical-align: .2em; }
.status { min-height: 1.6em; font-weight: 600; }

/* bund */
.bund { border-top: 1px solid var(--linje); padding: 32px 0 40px; font-size: .95rem; color: var(--daempet); }
.bund-ind { display: flex; flex-wrap: wrap; justify-content: space-between; gap: 16px 40px; }
.bund-navn { margin: 0; max-width: 40ch; }
.bund-navn em { display: block; font-family: var(--display); font-size: 1.3rem; color: var(--blaek); font-style: italic; }
.bund nav { display: flex; flex-wrap: wrap; gap: 6px 20px; align-items: center; }
.bund a { color: var(--blaek); text-decoration: none; }
.bund a:hover { color: var(--roed); text-decoration: underline; }

@media (max-width: 860px) {
  .helt-ind, .tre { grid-template-columns: 1fr; }
  .vifte { height: 230px; }
  .vifte .spkort { width: 120px; height: 170px; margin-left: -60px; }
  .ord-smagsproeve { grid-template-columns: 1fr; }
  .tre { gap: 28px; }
}
@media (max-width: 520px) {
  body { font-size: 1rem; }
  .kuloerer { grid-template-columns: repeat(2, 1fr); }
  .menu { gap: 2px 18px; }
}
@media (prefers-reduced-motion: no-preference) {
  .knap, .bogstaver a { transition: background-color .15s ease, color .15s ease; }
}
