/* KatchiMed · Thorax 3D: fullskjerms anatomi-app i same stil som framsida (pro.css). */
.thx { --glass: rgba(14, 16, 24, .74); --glass-2: rgba(255, 255, 255, .04); --radius: 16px; overflow: hidden; }
.thx .pro-top { background: linear-gradient(var(--bg) 55%, transparent); padding-block: 14px; }
.tx-modes { display: inline-flex; padding: 3px; gap: 2px; border: 1px solid var(--line); border-radius: 999px; background: rgba(255,255,255,.04); }
.tx-modes button { font: 400 13px var(--sans); color: var(--muted); background: none; border: 0; border-radius: 999px; padding: 7px 16px; cursor: pointer; transition: background .2s, color .2s; }
.tx-modes button:hover { color: var(--text); }
.tx-modes button[aria-selected="true"] { background: var(--text); color: var(--bg); }

.tx-app { position: fixed; inset: 0; }
.tx-stage { position: absolute; inset: 0; background: radial-gradient(70% 60% at 50% 40%, #141826, var(--bg) 70%); }
#txCv { display: block; width: 100%; height: 100%; touch-action: none; outline: none; }
.tx-load { position: absolute; inset: 0; display: grid; place-content: center; justify-items: center; gap: 12px; color: var(--muted); font-size: 14px; }
.tx-load[hidden] { display: none; }
.tx-spin { width: 28px; height: 28px; border-radius: 50%; border: 2px solid var(--line); border-top-color: var(--accent); animation: tx-spin 1s linear infinite; }
@keyframes tx-spin { to { transform: rotate(1turn); } }
.tx-label { position: absolute; pointer-events: none; transform: translate(-50%, -140%); padding: 5px 11px; border-radius: 999px; background: rgba(7,8,12,.85); border: 1px solid rgba(255,210,120,.5); color: var(--accent); font-size: 13px; white-space: nowrap; backdrop-filter: blur(6px); }

.tx-panel { position: absolute; top: 76px; bottom: 96px; display: flex; flex-direction: column; gap: 12px; padding: 18px; border-radius: var(--radius);
  background: var(--glass); border: 1px solid var(--line); backdrop-filter: blur(16px); -webkit-backdrop-filter: blur(16px); box-shadow: 0 20px 60px rgba(0,0,0,.45); }
.tx-left { left: clamp(12px, 2vw, 28px); width: 290px; }
.tx-right { right: clamp(12px, 2vw, 28px); width: 360px; overflow-y: auto; }
.tx-head h1 { margin: 0; font-weight: 300; font-size: 30px; letter-spacing: -.03em; line-height: 1.1; }
.tx-sub { margin: 6px 0 0; color: var(--muted); font-size: 13px; line-height: 1.5; }
.tx-search { width: 100%; font: 400 14px var(--sans); color: var(--text); background: var(--glass-2); border: 1px solid var(--line); border-radius: 10px; padding: 9px 12px; }
.tx-search:focus { outline: none; border-color: rgba(255,255,255,.3); }
.tx-tree { flex: 1; min-height: 0; overflow-y: auto; margin: 0 -8px; padding: 0 8px; }
.tx-grp { border-bottom: 1px solid var(--line); padding: 6px 0; }
.tx-grp-h { display: flex; align-items: center; gap: 8px; }
.tx-grp-h button.tx-exp { flex: 1; display: flex; align-items: center; gap: 9px; background: none; border: 0; color: var(--text); font: 400 14px var(--sans); padding: 6px 0; cursor: pointer; text-align: left; }
.tx-grp-h .n { color: var(--muted); font-size: 12px; }
.tx-dot { width: 10px; height: 10px; border-radius: 50%; flex: none; box-shadow: 0 0 0 2px rgba(255,255,255,.06); }
.tx-chev { color: var(--muted); font-size: 11px; transition: transform .2s; }
.tx-grp.open .tx-chev { transform: rotate(90deg); }
.tx-eye { flex: none; width: 30px; height: 26px; border-radius: 8px; border: 1px solid transparent; background: none; color: var(--muted); cursor: pointer; font-size: 14px; }
.tx-eye:hover { border-color: var(--line); color: var(--text); }
.tx-eye.off { opacity: .35; }
.tx-items { display: none; list-style: none; margin: 2px 0 6px; padding: 0 0 0 19px; }
.tx-grp.open .tx-items, .tx-tree.searching .tx-items { display: block; }
.tx-items li { display: flex; align-items: center; gap: 4px; }
.tx-items button.tx-it { flex: 1; text-align: left; background: none; border: 0; color: var(--muted); font: 300 13.5px var(--sans); padding: 4px 6px; border-radius: 8px; cursor: pointer; }
.tx-items button.tx-it:hover { color: var(--text); background: var(--glass-2); }
.tx-items button.tx-it.sel { color: var(--accent); background: rgba(255,210,120,.08); }
.tx-items li.hide { display: none; }
.tx-credit { margin: 0; font-size: 11px; line-height: 1.5; color: var(--muted); opacity: .8; }

.tx-dock { position: absolute; left: 50%; bottom: 20px; transform: translateX(-50%); display: flex; align-items: center; gap: 14px; padding: 8px 10px; border-radius: 999px;
  background: var(--glass); border: 1px solid var(--line); backdrop-filter: blur(14px); -webkit-backdrop-filter: blur(14px); white-space: nowrap; }
.tx-views { display: flex; gap: 2px; }
.tx-views button, .tx-ico, .tx-pill { font: 400 12.5px var(--sans); color: var(--muted); background: none; border: 1px solid transparent; border-radius: 999px; padding: 6px 11px; cursor: pointer; }
.tx-views button:hover, .tx-ico:hover, .tx-pill:hover { color: var(--text); border-color: var(--line); }
.tx-pill[aria-pressed="true"] { color: var(--bg); background: var(--text); }
.tx-slide { display: flex; align-items: center; gap: 8px; font-size: 12.5px; color: var(--muted); }
.tx-slide input, .tx-range input { accent-color: var(--accent); width: 120px; }

/* høgre panel: kort */
.tx-k { margin: 0 0 4px; font-size: 11.5px; letter-spacing: .12em; text-transform: uppercase; color: var(--muted); display: flex; align-items: center; gap: 8px; }
.tx-card h2 { margin: 0; font-weight: 400; font-size: 24px; letter-spacing: -.02em; line-height: 1.2; }
.tx-card .la { margin: 4px 0 0; color: var(--muted); font-style: italic; font-size: 14px; }
.tx-card p.f { margin: 14px 0 0; line-height: 1.6; font-size: 14.5px; }
.tx-hook { margin: 14px 0 0; padding: 12px 14px; border-radius: 12px; background: linear-gradient(135deg, rgba(255,158,122,.12), rgba(124,196,255,.06)); font-size: 14px; line-height: 1.55; }
.tx-hook b { display: block; font-family: "Caveat", cursive; font-weight: 600; font-size: 20px; color: #ffd9a8; line-height: 1; margin-bottom: 4px; }
.tx-sch { margin: 10px 0 0; font-size: 12px; color: var(--muted); }
.tx-acts { display: flex; flex-wrap: wrap; gap: 8px; margin: 16px 0 0; }
.tx-btn { font: 400 13px var(--sans); color: var(--text); background: none; border: 1px solid rgba(255,255,255,.22); border-radius: 999px; padding: 8px 15px; cursor: pointer; transition: background .2s, color .2s; }
.tx-btn:hover { background: var(--text); color: var(--bg); }
.tx-btn.main { background: var(--text); color: var(--bg); border-color: var(--text); }
.tx-btn.main:hover { background: var(--accent); border-color: var(--accent); }
.tx-btn:disabled { opacity: .4; pointer-events: none; }
.tx-empty h2 { margin: 0 0 8px; font-family: "Caveat", cursive; font-weight: 600; font-size: 28px; color: #ffd9a8; }
.tx-empty p { margin: 0 0 8px; color: var(--muted); font-size: 14px; line-height: 1.6; }
.tx-tips { margin: 12px 0 0; padding: 0; list-style: none; display: grid; gap: 8px; font-size: 13.5px; color: var(--muted); }
.tx-tips li::before { content: "→ "; color: var(--accent); }

/* snitt */
.tx-ct { position: relative; width: 100%; aspect-ratio: 1; border-radius: 12px; overflow: hidden; background: #000; border: 1px solid var(--line); }
.tx-ct canvas { width: 100%; height: 100%; display: block; image-rendering: auto; }
.tx-ct .tag { position: absolute; left: 10px; top: 8px; font-size: 11px; letter-spacing: .1em; text-transform: uppercase; color: rgba(255,255,255,.7); }
.tx-ct .ori { position: absolute; font-size: 11px; color: rgba(255,210,120,.85); }
.tx-row { display: flex; flex-wrap: wrap; gap: 6px; align-items: center; margin: 10px 0 0; }
.tx-row > span.l { font-size: 12px; color: var(--muted); min-width: 64px; }
.tx-range { display: grid; grid-template-columns: 64px 1fr 44px; gap: 8px; align-items: center; margin: 8px 0 0; font-size: 12px; color: var(--muted); }
.tx-range input { width: 100%; }
.tx-note { font-size: 12px; color: var(--muted); line-height: 1.5; margin: 10px 0 0; }

/* pugg */
.tx-stat { display: flex; gap: 14px; font-size: 12.5px; color: var(--muted); margin: 0 0 14px; flex-wrap: wrap; }
.tx-stat b { color: var(--text); font-weight: 600; }
.tx-q { font-size: 17px; line-height: 1.45; margin: 0 0 12px; }
.tx-q b { color: var(--accent); font-weight: 400; }
.tx-in { display: flex; gap: 8px; }
.tx-in input { flex: 1; min-width: 0; font: 400 16px var(--sans); color: var(--text); background: var(--glass-2); border: 1px solid var(--line); border-radius: 999px; padding: 9px 16px; }
.tx-in input:focus { outline: none; border-color: rgba(255,255,255,.35); }
.tx-hint { font: 500 15px ui-monospace, Consolas, monospace; letter-spacing: .12em; color: var(--cool); margin: 10px 0 0; min-height: 1.4em; overflow-wrap: anywhere; }
.tx-fb { margin: 12px 0 0; padding: 10px 14px; border-radius: 12px; line-height: 1.5; font-size: 14px; }
.tx-fb.ok { background: rgba(127,224,168,.1); border: 1px solid rgba(127,224,168,.35); }
.tx-fb.bad { background: rgba(255,120,150,.08); border: 1px solid rgba(255,120,150,.3); }
.tx-big { font-weight: 300; font-size: 56px; letter-spacing: -.04em; margin: 0; color: var(--accent); line-height: 1; }
.tx-miss { margin: 8px 0 0; padding-left: 18px; font-size: 14px; color: var(--muted); }
.tx-select { font: 400 13px var(--sans); color: var(--text); background: var(--glass-2); border: 1px solid var(--line); border-radius: 999px; padding: 6px 12px; }
.tx-select option { background: #0e1018; }

/* mobil: modellen øvst, panela under */
@media (max-width: 900px) {
  .thx { overflow-x: hidden; overflow-y: auto; }
  .thx .pro-top { position: sticky; top: 0; flex-wrap: wrap; gap: 10px; padding: 10px 14px; background: var(--bg); }
  .thx .pro-nav { display: none; }
  .tx-modes { order: 3; width: 100%; max-width: 100%; overflow-x: auto; justify-content: flex-start; scrollbar-width: none; }
  .tx-modes::-webkit-scrollbar { display: none; }
  .tx-modes button { flex: none; padding: 7px 12px; }
  .tx-app { position: static; display: flex; flex-direction: column; gap: 12px; padding: 0 12px 24px; }
  .tx-stage { position: sticky; top: 104px; z-index: 2; height: 52vh; min-height: 320px; border-radius: var(--radius); overflow: hidden; border: 1px solid var(--line); }
  .tx-dock { bottom: 10px; gap: 6px; padding: 5px 6px; max-width: calc(100% - 16px); overflow-x: auto; }
  .tx-views button { padding: 6px 8px; }
  .tx-slide input { width: 70px; }
  .tx-panel { position: static; width: auto; max-height: none; backdrop-filter: none; }
  .tx-right { order: 2; } .tx-left { order: 3; }
  .tx-tree { max-height: 50vh; }
}
@media (prefers-reduced-motion: reduce) { .tx-spin { animation: none; } }
.tx-tip { position: absolute; pointer-events: none; padding: 4px 10px; border-radius: 999px; background: rgba(7,8,12,.88); border: 1px solid var(--line); color: var(--text); font-size: 12.5px; white-space: nowrap; z-index: 3; }
.tx-tip[hidden] { display: none; }
.tx-ct canvas#txCtView { cursor: crosshair; }
.tx-ct-hit { margin: 10px 0 0; font-size: 14px; color: var(--muted); min-height: 1.5em; }
.tx-ct-hit b { color: var(--accent); font-weight: 400; }
.tx-link { background: none; border: 0; color: var(--cool); font: 400 13px var(--sans); cursor: pointer; padding: 0 0 0 6px; }
.tx-invlabels span { position: absolute; transform: translate(-100%, -50%); font-family: "Caveat", cursive; font-weight: 600; font-size: 22px; color: #ffd9a8; pointer-events: none; white-space: nowrap; text-shadow: 0 2px 10px #000; }
.tx-invlabels[hidden] { display: none; }
.tx-near { display: flex; flex-wrap: wrap; gap: 6px; align-items: center; margin: 14px 0 0; }
.tx-near .l { font-size: 11.5px; letter-spacing: .1em; text-transform: uppercase; color: var(--muted); margin-right: 4px; }
.tx-chipn { font: 400 12.5px var(--sans); color: var(--text); background: var(--glass-2); border: 1px solid var(--line); border-radius: 999px; padding: 4px 10px; cursor: pointer; }
.tx-chipn:hover { border-color: rgba(255,210,120,.5); color: var(--accent); }
.tx-meta { margin: 10px 0 0; font-size: 12px; color: var(--muted); }
.tx-opts { display: grid; gap: 8px; margin: 12px 0 0; }
.tx-opt { text-align: left; font: 400 14px/1.45 var(--sans); color: var(--text); background: var(--glass-2); border: 1px solid var(--line); border-radius: 12px; padding: 10px 14px; cursor: pointer; transition: border-color .2s, background .2s; }
.tx-opt:hover:not(:disabled) { border-color: rgba(255,210,120,.5); }
.tx-opt:disabled { cursor: default; }
.tx-opt.ok { border-color: rgba(127,224,168,.7); background: rgba(127,224,168,.1); }
.tx-opt.bad { border-color: rgba(255,120,150,.6); background: rgba(255,120,150,.08); }
#txQuiz .tx-ct { max-width: 300px; margin: 0 auto 4px; }
.tx-check { list-style: none; margin: 10px 0 0; padding: 0; display: grid; gap: 6px; }
.tx-check li { display: flex; align-items: center; gap: 8px; }
.tx-check input { width: 17px; height: 17px; accent-color: #7fe0a8; flex: none; }
.thx .tx-modes button { padding: 7px 12px; }
/* disseksjonsbok */
.bok-tasks { margin-top: 6px; }
.tx-pill.done { border-color: rgba(127,224,168,.6); color: #7fe0a8; }
.bok-goal { margin: 10px 0 4px; border: 1px solid var(--line); border-radius: 12px; padding: 8px 12px; font-size: 13.5px; line-height: 1.5; }
.bok-goal summary, .bok-q summary { cursor: pointer; color: var(--muted); }
.bok-goal p { margin: 6px 0 0; }
.bok-n { margin: 14px 0 2px; font-size: 11.5px; letter-spacing: .12em; text-transform: uppercase; color: var(--accent); }
.bok-t { font-size: 19px; }
.bok-steps { margin: 0; padding: 0; list-style: none; counter-reset: s; display: grid; gap: 6px; }
.bok-steps li { counter-increment: s; position: relative; padding: 9px 12px 9px 38px; border-radius: 12px; border: 1px solid var(--line); font-size: 14px; line-height: 1.5; color: var(--muted); cursor: pointer; transition: all .3s; }
.bok-steps li::before { content: counter(s); position: absolute; left: 12px; top: 9px; width: 18px; height: 18px; border-radius: 50%; border: 1px solid currentColor; font-size: 11px; display: grid; place-items: center; }
.bok-steps li.on { border-color: rgba(255,210,120,.55); background: rgba(255,210,120,.08); color: var(--text); box-shadow: 0 0 18px rgba(255,210,120,.12); }
.bok-steps li.done { opacity: .7; }
.bok-steps li.done::before { content: '✓'; color: #7fe0a8; }
.bok-pit { margin: 12px 0; padding: 9px 12px; border-left: 3px solid #ffb86b; background: rgba(255,184,107,.07); border-radius: 0 10px 10px 0; font-size: 13.5px; line-height: 1.5; }
.bok-pit b { display: block; color: #ffb86b; font-weight: 400; font-size: 11.5px; letter-spacing: .12em; text-transform: uppercase; margin-bottom: 2px; }
.bok-rm { font-size: 12.5px; margin-top: 8px; }
.bok-qh { margin-top: 16px; }
.bok-q { border-top: 1px solid var(--line); padding: 8px 0; font-size: 14px; line-height: 1.5; }
.bok-q summary { color: var(--text); }
.bok-q p { margin: 6px 0 0; color: var(--muted); }
.bok-q[open] summary { color: var(--accent); }

/* ---------- Disseksjonsatlas (modus 4) ---------- */
.thx { --paper: #f7f2e7; --paper-2: #efe7d6; --ink: #2b2520; --ink-2: #6b5f52; --rule: #d8ccb6; --rubric: #a3362a; --serif: 'Crimson Pro', 'Iowan Old Style', Georgia, serif; }
.atl-toc { display: none; }
body.tx-atlas .tx-stage { background: radial-gradient(75% 70% at 50% 45%, #f6f0e4 0%, #ece4d3 62%, #ddd2bc 100%); }
body.tx-atlas .tx-stage::after { content: ''; position: absolute; inset: 0; pointer-events: none; background: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='160' height='160'%3E%3Cfilter id='n'%3E%3CfeTurbulence baseFrequency='.9' numOctaves='2' stitchTiles='stitch'/%3E%3CfeColorMatrix values='0 0 0 0 .35 0 0 0 0 .28 0 0 0 0 .2 0 0 0 .05 0'/%3E%3C/filter%3E%3Crect width='100%25' height='100%25' filter='url(%23n)'/%3E%3C/svg%3E"); mix-blend-mode: multiply; }
body.tx-atlas .tx-dock { background: rgba(247,242,231,.92); border-color: var(--rule); color: var(--ink); }
body.tx-atlas .tx-dock button, body.tx-atlas .tx-dock label { color: var(--ink); }
body.tx-atlas .tx-panel { background: var(--paper); color: var(--ink); border-color: var(--rule); box-shadow: 0 18px 50px rgba(40,28,10,.28), 0 1px 0 rgba(255,255,255,.6) inset; backdrop-filter: none; -webkit-backdrop-filter: none; }
body.tx-atlas .tx-left > :not(.atl-toc) { display: none; }
body.tx-atlas .atl-toc { display: block; overflow-y: auto; flex: 1; min-height: 0; font-family: var(--serif); }
body.tx-atlas .tx-right { width: 420px; padding: 0; }
body.tx-atlas .tx-label { display: none; }
.atl-toc-k { margin: 0; font: 600 10.5px var(--sans); letter-spacing: .16em; text-transform: uppercase; color: var(--rubric); }
.atl-toc-h { margin: 4px 0 10px; font: 600 30px/1.1 var(--serif); color: var(--ink); border-bottom: 2px solid var(--ink); padding-bottom: 8px; }
.atl-toc-kurs { margin: 14px 0 4px; font: 600 15px var(--serif); font-variant: small-caps; letter-spacing: .06em; color: var(--rubric); }
.atl-toc-l { list-style: none; margin: 0; padding: 0; }
.atl-toc-l button { display: grid; grid-template-columns: 26px 1fr auto; align-items: baseline; gap: 6px; width: 100%; text-align: left; background: none; border: 0; border-bottom: 1px dotted var(--rule); padding: 6px 4px; font: 400 15.5px/1.3 var(--serif); color: var(--ink); cursor: pointer; border-radius: 0; }
.atl-toc-l button:hover { background: rgba(163,54,42,.06); }
.atl-toc-l button.on { background: rgba(163,54,42,.1); font-weight: 600; }
.atl-toc-n { font-variant-numeric: oldstyle-nums; color: var(--ink-2); }
.atl-toc-ok { color: #3f7d4a; font-family: var(--sans); font-size: 12px; }

.atl-page { font-family: var(--serif); color: var(--ink); padding: 18px 26px 22px; font-size: 17px; line-height: 1.5; }
.atl-run { display: flex; justify-content: space-between; font: 400 11px var(--sans); letter-spacing: .14em; text-transform: uppercase; color: var(--ink-2); border-bottom: 1px solid var(--rule); padding-bottom: 7px; }
.atl-run span:last-child { font-family: var(--serif); font-size: 15px; letter-spacing: 0; color: var(--ink); }
.atl-kicker { margin: 18px 0 0; font: 600 13px var(--sans); letter-spacing: .18em; text-transform: uppercase; color: var(--rubric); }
.atl-title { margin: 2px 0 14px; font: 600 32px/1.1 var(--serif); letter-spacing: -.01em; }
.atl-goal { margin: 0 0 14px; padding: 10px 14px; background: var(--paper-2); border-left: 3px solid var(--ink); font-size: 15.5px; }
.atl-goal p { margin: 4px 0 0; }
.atl-h { margin: 0 !important; font: 600 11px var(--sans) !important; letter-spacing: .14em; text-transform: uppercase; color: var(--ink-2); cursor: default; }
details.atl-goal summary { cursor: pointer; }
.atl-h3 { margin: 20px 0 8px; font: 600 19px var(--serif); font-variant: small-caps; letter-spacing: .04em; color: var(--rubric); border-bottom: 1px solid var(--rule); padding-bottom: 3px; }
.atl-steps { margin: 0; padding: 0; list-style: none; counter-reset: st; }
.atl-steps li { counter-increment: st; position: relative; padding: 4px 6px 6px 34px; margin: 0 -6px; cursor: pointer; border-radius: 4px; transition: background .2s; }
.atl-steps li::before { content: counter(st); position: absolute; left: 6px; top: 3px; font: 600 22px/1 var(--serif); color: var(--rubric); }
.atl-steps li:hover { background: rgba(163,54,42,.05); }
.atl-steps li.on { background: rgba(214,164,60,.18); }
.atl-steps li:first-child::first-letter { font-weight: 600; }
.atl-pit { margin: 14px 0; padding: 10px 14px; background: #f4e1d8; border-left: 4px solid var(--rubric); font-size: 15.5px; }
.atl-pit b { display: block; font: 600 11px var(--sans); letter-spacing: .14em; text-transform: uppercase; color: var(--rubric); margin-bottom: 2px; }
.atl-note { margin: 4px 0 8px; font-size: 14px; color: var(--ink-2); font-style: italic; }
.atl-rm { margin-top: 10px; }
.atl-legend { list-style: none; margin: 6px 0 8px; padding: 0; columns: 1; }
.atl-legend li { display: flex; align-items: flex-start; gap: 8px; padding: 3px 0; break-inside: avoid; }
.atl-legend input { margin-top: 6px; accent-color: #3f7d4a; width: 15px; height: 15px; flex: none; }
.atl-lname { display: flex; flex-wrap: wrap; align-items: baseline; gap: 2px 8px; background: none; border: 0; padding: 0; text-align: left; font: 400 16.5px var(--serif); color: var(--ink); cursor: pointer; }
.atl-lname i { font-style: italic; }
.atl-lname small { width: 100%; padding-left: 30px; font-size: 13.5px; color: var(--ink-2); }
.atl-lname:hover i { color: var(--rubric); }
.atl-num { display: inline-grid; place-items: center; min-width: 22px; height: 22px; border-radius: 50%; border: 1.5px solid var(--ink); font: 600 12px var(--sans); color: var(--ink); background: var(--paper); flex: none; }
.atl-bar { height: 4px; background: var(--rule); margin-top: 6px; }
.atl-bar i { display: block; height: 100%; background: #3f7d4a; }
.atl-qs { margin: 0; padding: 0 0 0 22px; }
.atl-qs li { margin: 0 0 8px; }
.atl-qs li::marker { font-weight: 600; color: var(--rubric); }
.atl-qs summary { cursor: pointer; }
.atl-qs details[open] summary { font-weight: 600; }
.atl-qs details p { margin: 6px 0 0; padding: 8px 12px; background: var(--paper-2); border-radius: 2px; font-size: 15.5px; }
.atl-acts { display: flex; flex-wrap: wrap; gap: 8px; margin: 18px 0 0; }
.atl-btn { font: 400 13px var(--sans); color: var(--ink); background: var(--paper); border: 1px solid var(--ink); border-radius: 2px; padding: 7px 12px; cursor: pointer; }
.atl-btn:hover { background: var(--ink); color: var(--paper); }
.atl-nav { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; margin: 20px 0 0; border-top: 2px solid var(--ink); padding-top: 10px; }
.atl-navb { display: flex; flex-direction: column; gap: 2px; text-align: left; background: none; border: 0; padding: 4px 0; cursor: pointer; color: var(--ink); font: 400 15px var(--serif); }
.atl-navb.nx { text-align: right; align-items: flex-end; }
.atl-navb small { font: 600 10.5px var(--sans); letter-spacing: .14em; text-transform: uppercase; color: var(--rubric); }
.atl-navb:disabled { opacity: .3; cursor: default; }

.atl-ov { position: absolute; inset: 0; pointer-events: none; z-index: 1; }
.atl-ov[hidden] { display: none; }
.atl-lines { position: absolute; inset: 0; overflow: visible; }
.atl-lines polyline { fill: none; stroke: #2b2520; stroke-width: 1; opacity: .8; }
.atl-lines circle { fill: #2b2520; }
.atl-lines .hot { stroke: #a3362a; stroke-width: 1.8; opacity: 1; fill: #a3362a; }
.atl-lines polyline.hot { fill: none; }
.atl-labs { position: absolute; inset: 0; }
.atl-lab { position: absolute; transform: translate(-100%, -50%); flex-direction: row-reverse; display: flex; align-items: center; gap: 7px; pointer-events: auto; background: none; border: 0; padding: 2px 0; font: italic 400 16px var(--serif); color: #2b2520; cursor: pointer; white-space: nowrap; }
.atl-lab i { background: rgba(247,242,231,.86); padding: 0 5px; border-radius: 2px; box-shadow: 0 0 6px 2px rgba(247,242,231,.7); }
.atl-lab.r { transform: translateY(-50%); flex-direction: row; }
.atl-lab.hot { color: #a3362a; }
.atl-lab.hot .atl-num { border-color: #a3362a; color: #fff; background: #a3362a; }
.atl-cap { position: absolute; left: 50%; bottom: 82px; background: rgba(247,242,231,.9); padding: 3px 12px; border-radius: 2px; transform: translateX(-50%); max-width: min(560px, 90%); margin: 0; text-align: center; font: italic 400 16px/1.4 var(--serif); color: #4a3f34; }
.atl-cap b { font-style: normal; font-weight: 600; color: #a3362a; margin-right: 4px; }
@media (max-width: 900px) {
  body.tx-atlas .tx-right { width: auto; }
  body.tx-atlas .tx-left { display: block; }
  body.tx-atlas .atl-toc { max-height: 46vh; }
  .atl-lab { font-size: 14px; }
}
@media (max-width: 559px) {
  .atl-lab.dot { transform: translate(-50%, -50%); } .atl-lab .atl-num { min-width: 18px; height: 18px; font-size: 10px; box-shadow: 0 1px 3px rgba(0,0,0,.3); }
  .atl-lab.dot i { display: none; }
  .atl-cap { bottom: 58px; font-size: 13px; }
}

/* ---------- Overflateanatomi (modus 6) ---------- */
.sf-labs { position: absolute; inset: 0; pointer-events: none; z-index: 1; }
.sf-labs[hidden] { display: none; }
.sf-lab { position: absolute; transform: translate(-50%, -50%); font: 600 11px var(--sans); color: #fff; text-shadow: 0 0 3px #000, 0 0 6px #000; }
.sf-lab.sf-ribs { font-weight: 400; font-size: 10.5px; color: #e8dcc4; opacity: .9; }
.sf-lab.sf-ausc { transform: translate(-50%, -150%); color: #ffcf4a; font-size: 13px; }
.sf-lab.sf-valve { transform: translate(-50%, 70%); color: #ffcf4a; font-size: 10px; opacity: .8; }
.sf-lay { display: grid; grid-template-columns: 1fr 1fr; gap: 4px 10px; margin: 10px 0 4px; }
.sf-tog { display: flex; align-items: center; gap: 7px; font-size: 13px; cursor: pointer; }
.sf-tog input { accent-color: var(--accent); width: 15px; height: 15px; margin: 0; flex: none; }
.sf-sw { width: 14px; height: 3px; border-radius: 2px; flex: none; }
.sf-h { margin-top: 16px; }
.sf-pts { display: flex; flex-wrap: wrap; gap: 6px; margin: 6px 0; }
.sf-pts .tx-chipn.on { border-color: var(--accent); color: var(--accent); }
.sf-now { margin: 10px 0 6px; }
.sf-small { font-size: 12px; margin-top: 8px; }
.sf-rules { margin: 14px 0 0; padding: 10px 12px; border: 1px solid var(--line); border-radius: 12px; background: var(--glass-2); }
.sf-rules p:not(.tx-k) { margin: 6px 0 0; font-size: 13px; line-height: 1.5; color: var(--muted); }
.sf-ok { color: #7fe0a8; } .sf-no { color: #ff8fa3; }
@media (max-width: 1400px) { .thx .pro-nav { display: none; } }

.atl-cap.sel { max-width: min(620px, 92%); }
.atl-cap.sel b { font-style: italic; font-size: 18px; }
.atl-cap-f { display: block; font-style: normal; font-size: 14px; color: #5b4f43; margin-top: 2px; }
.atl-legend li.hot { background: rgba(196,71,31,.1); outline: 1px solid rgba(196,71,31,.35); border-radius: 3px; }
.atl-legend li.hot i { color: #a3362a; }

/* ---------- Spotter ---------- */
.tx-spot { margin-top: 16px; padding-top: 12px; border-top: 1px solid var(--line); }
.sp-bar { height: 4px; background: var(--glass-2); border-radius: 4px; margin: 4px 0 10px; overflow: hidden; }
.sp-bar i { display: block; height: 100%; background: linear-gradient(90deg, #ff9e7a, #ffd278); }
.sp-clock { color: var(--accent); font-variant-numeric: tabular-nums; }
.sp-res { margin: 8px 0; padding-left: 22px; display: grid; gap: 6px; font-size: 13.5px; }
.sp-res li { line-height: 1.4; }
.sp-res li small { display: block; color: #ff8fa3; }
.sp-res .sp-mk { margin-right: 6px; }
.sp-res li.ok .sp-mk { color: #7fe0a8; } .sp-res li.no .sp-mk { color: #ff8fa3; }
.sp-res .tx-link { margin-left: 6px; }

/* Omvisning første gong */
.tt-ov { position: fixed; inset: 0; z-index: 60; }
.tt-ov.dim { background: rgba(4,5,8,.72); }
.tt-hole { position: fixed; border-radius: 16px; box-shadow: 0 0 0 9999px rgba(4,5,8,.72), 0 0 0 2px rgba(255,210,120,.85), 0 0 24px 4px rgba(255,210,120,.25); pointer-events: none; transition: all .28s ease; }
.tt-card { position: fixed; width: min(340px, calc(100vw - 24px)); padding: 16px 18px 14px; border-radius: 16px; background: #10121a; border: 1px solid rgba(255,210,120,.35); color: var(--text); box-shadow: 0 18px 50px rgba(0,0,0,.5); font-family: var(--sans); transition: left .28s ease, top .28s ease; }
.tt-n { margin: 0 0 4px; font-size: 11px; letter-spacing: .12em; color: var(--accent); }
.tt-t { margin: 0 0 8px; font-size: 18px; font-weight: 600; }
.tt-b { margin: 0 0 14px; font-size: 13.5px; line-height: 1.55; color: var(--muted); }
.tt-l { margin: 0 0 14px; padding: 0; list-style: none; font-size: 13px; line-height: 1.5; color: var(--muted); }
.tt-l li { padding: 3px 0; border-bottom: 1px solid var(--line); }
.tt-l li:last-child { border: 0; }
.tt-row { display: flex; flex-wrap: wrap; gap: 8px; justify-content: flex-end; align-items: center; }
.tt-btn { font: 400 13px var(--sans); color: var(--text); background: none; border: 1px solid var(--line); border-radius: 999px; padding: 7px 14px; cursor: pointer; }
.tt-btn.main { background: var(--accent); border-color: var(--accent); color: #111; font-weight: 600; }
.tt-btn:hover { border-color: var(--accent); }
.tt-skip { margin-right: auto; font: 400 12.5px var(--sans); color: var(--muted); background: none; border: 0; cursor: pointer; padding: 6px 2px; text-decoration: underline; text-underline-offset: 3px; }
@media (prefers-reduced-motion: reduce) { .tt-hole, .tt-card { transition: none; } }
