/*
Theme Name: Tidsbildet
Description: Arkivtema for Tidsbildet – slekt, kilder og livet før oss.
Version: 1.0.0
Author: Tidsbildet
Text Domain: tidsbildet
*/

/* ---------- fonts ---------- */
@font-face { font-family: 'Fraunces'; src: url(assets/fonts/fraunces-normal-300-800.woff2) format('woff2'); font-weight: 500 650; font-style: normal; font-display: swap; }
@font-face { font-family: 'Fraunces'; src: url(assets/fonts/fraunces-italic-300-800.woff2) format('woff2'); font-weight: 550 700; font-style: italic; font-display: swap; }
@font-face { font-family: 'Source Serif 4'; src: url(assets/fonts/sourceserif-normal-300-700.woff2) format('woff2'); font-weight: 400 650; font-style: normal; font-display: swap; }
@font-face { font-family: 'Source Serif 4'; src: url(assets/fonts/sourceserif-italic-300-700.woff2) format('woff2'); font-weight: 400 600; font-style: italic; font-display: swap; }
@font-face { font-family: 'Plex Mono'; src: url(assets/fonts/plexmono-normal-400.woff2) format('woff2'); font-weight: 400; font-display: swap; }
@font-face { font-family: 'Plex Mono'; src: url(assets/fonts/plexmono-normal-500.woff2) format('woff2'); font-weight: 500; font-display: swap; }

/* ---------- tokens ---------- */
:root {
	--paper: #f4eee2;
	--paper-2: #ebe3d3;
	--card: #fbf8f1;
	--ink: #1c2329;
	--ink-2: #4a535a;
	--ink-3: #6f767a;
	--rule: #d9cfbb;
	--wax: #9b2f1e;
	--wax-2: #7c2416;
	--wax-soft: #f1ddd4;
	--moss: #2e5446;
	--moss-soft: #dfe8e1;
	--brass: #a7863f;
	--brass-2: #d8c48e;
	--blueline: #b9cbe0;
	--shadow: 0 1px 0 rgba(28, 35, 41, .06), 0 10px 28px -14px rgba(28, 35, 41, .28);
	--f-display: 'Fraunces', 'Iowan Old Style', Georgia, serif;
	--f-text: 'Source Serif 4', Georgia, 'Times New Roman', serif;
	--f-mono: 'Plex Mono', ui-monospace, 'Cascadia Mono', Consolas, monospace;
	--wrap: 1180px;
	--gut: clamp(16px, 4vw, 40px);
	--r: 3px;
	color-scheme: light;
}
@media (prefers-color-scheme: dark) {
	:root:not([data-theme="light"]) {
		--paper: #14181b; --paper-2: #1b2125; --card: #1f262b; --ink: #ece4d4; --ink-2: #c3bba9; --ink-3: #9a9384;
		--rule: #333c42; --wax: #e2826b; --wax-2: #f0a08b; --wax-soft: #3a2420; --moss: #8fc1a9; --moss-soft: #1f2d27;
		--brass: #c9a75a; --brass-2: #6d5a2e; --blueline: #2c3b4b; --shadow: 0 10px 28px -14px rgba(0, 0, 0, .7); color-scheme: dark;
	}
}
:root[data-theme="dark"] {
	--paper: #14181b; --paper-2: #1b2125; --card: #1f262b; --ink: #ece4d4; --ink-2: #c3bba9; --ink-3: #9a9384;
	--rule: #333c42; --wax: #e2826b; --wax-2: #f0a08b; --wax-soft: #3a2420; --moss: #8fc1a9; --moss-soft: #1f2d27;
	--brass: #c9a75a; --brass-2: #6d5a2e; --blueline: #2c3b4b; --shadow: 0 10px 28px -14px rgba(0, 0, 0, .7); color-scheme: dark;
}

/* ---------- base ---------- */
*, *::before, *::after { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; text-size-adjust: 100%; scroll-padding-top: 90px; }
body {
	margin: 0; background: var(--paper); color: var(--ink);
	font: 400 1.0625rem/1.65 var(--f-text); font-optical-sizing: auto;
	-webkit-font-smoothing: antialiased; text-rendering: optimizeLegibility;
	background-image: radial-gradient(rgba(120, 95, 50, .035) 1px, transparent 1px);
	background-size: 4px 4px;
}
img, svg { max-width: 100%; height: auto; }
a { color: inherit; text-decoration-color: var(--wax); text-decoration-thickness: 1.5px; text-underline-offset: .18em; }
a:hover { color: var(--wax); }
:focus-visible { outline: 2px solid var(--wax); outline-offset: 2px; border-radius: 2px; }
h1, h2, h3, h4 { font-family: var(--f-display); font-weight: 600; line-height: 1.12; letter-spacing: -.01em; margin: 0 0 .5em; font-variation-settings: 'SOFT' 50, 'WONK' 0; text-wrap: balance; }
p { margin: 0 0 1em; }
.tb-wrap { width: 100%; max-width: var(--wrap); margin-inline: auto; padding-inline: var(--gut); }
.tb-vh { position: absolute !important; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }
.tb-skip { position: absolute; left: -999px; top: 0; z-index: 99; background: var(--ink); color: var(--paper); padding: .6em 1em; }
.tb-skip:focus { left: 8px; top: 8px; }
.tb-ico { flex: none; }
.tb-eyebrow, .tb-ref { font: 500 .74rem/1.3 var(--f-mono); letter-spacing: .12em; text-transform: uppercase; color: var(--wax); margin: 0 0 .7em; }
.tb-ref::before { content: ''; display: inline-block; width: 18px; height: 1.5px; background: currentColor; vertical-align: middle; margin-right: .55em; }

/* ---------- ribbon ---------- */
.tb-ribbon { background: var(--ink); color: var(--paper); font: 400 .78rem/1 var(--f-mono); }
:root[data-theme="dark"] .tb-ribbon, .tb-ribbon { --rb: rgba(244, 238, 226, .62); }
.tb-ribbon__in { display: flex; align-items: center; gap: 14px; min-height: 34px; overflow-x: auto; scrollbar-width: none; white-space: nowrap; }
.tb-ribbon__in::-webkit-scrollbar { display: none; }
.tb-ribbon__label { color: var(--rb); text-transform: uppercase; letter-spacing: .12em; font-size: .68rem; }
.tb-ribbon__years { display: flex; list-style: none; margin: 0; padding: 0; gap: 2px; }
.tb-ribbon__years a { display: block; padding: 6px 8px; color: #f4eee2; text-decoration: none; border-radius: 2px; }
.tb-ribbon__years a:hover { background: rgba(244, 238, 226, .12); color: #fff; }
.tb-ribbon__tool { margin-left: auto; color: #e9b3a6; text-decoration: none; padding-left: 10px; }
.tb-ribbon__tool:hover { color: #fff; text-decoration: underline; }
@media (prefers-color-scheme: dark) { :root:not([data-theme="light"]) .tb-ribbon { background: #0d1012; } }

/* ---------- header ---------- */
.tb-head { position: sticky; top: 0; z-index: 40; background: color-mix(in srgb, var(--paper) 94%, transparent); backdrop-filter: saturate(1.2) blur(8px); border-bottom: 1px solid var(--rule); }
.tb-head__in { display: flex; align-items: center; gap: 20px; min-height: 70px; }
.tb-brand { display: inline-flex; align-items: center; gap: 11px; text-decoration: none; color: var(--ink); }
.tb-brand:hover { color: var(--ink); }
.tb-mark { flex: none; }
.tb-mark__frame { fill: var(--card); stroke: var(--ink); stroke-width: 1.6; }
.tb-mark__tree { fill: none; stroke: var(--wax); stroke-width: 2.6; stroke-linecap: round; stroke-linejoin: round; }
.tb-brand__txt { display: flex; flex-direction: column; line-height: 1; }
.tb-brand__name { font: italic 650 1.62rem/1 var(--f-display); letter-spacing: -.02em; font-variation-settings: 'SOFT' 100, 'WONK' 1; }
.tb-brand__tag { white-space: nowrap; font: 400 .66rem/1.2 var(--f-mono); letter-spacing: .1em; text-transform: uppercase; color: var(--ink-3); margin-top: 5px; }
.tb-nav { margin-left: auto; }
.tb-nav ul { display: flex; list-style: none; margin: 0; padding: 0; gap: 2px; }
.tb-nav a { display: block; padding: 9px 9px; white-space: nowrap; font: 500 .94rem/1 var(--f-text); text-decoration: none; color: var(--ink-2); border-radius: var(--r); position: relative; }
.tb-nav a:hover { color: var(--ink); background: var(--paper-2); }
.tb-nav a[aria-current] { color: var(--ink); }
.tb-nav a[aria-current]::after { content: ''; position: absolute; left: 11px; right: 11px; bottom: 2px; height: 2px; background: var(--wax); }
.tb-nav__tools { border: 1px solid var(--rule); margin-left: 6px; }
.tb-head__act { display: flex; gap: 4px; }
.tb-iconbtn { display: inline-grid; place-items: center; width: 42px; height: 42px; border: 1px solid transparent; border-radius: var(--r); background: none; color: var(--ink); cursor: pointer; }
.tb-iconbtn:hover { background: var(--paper-2); border-color: var(--rule); }
.tb-menubtn { display: none; }
.tb-search { border-top: 1px solid var(--rule); background: var(--card); padding: 14px 0; }
.tb-search form { display: flex; gap: 8px; }
.tb-search input { flex: 1; min-width: 0; font: inherit; padding: 12px 14px; border: 1px solid var(--ink); background: var(--paper); color: var(--ink); border-radius: var(--r); }
.tb-search button, .tb-hero__search button, .tb-btn { display: inline-flex; align-items: center; gap: 8px; font: 500 .95rem/1 var(--f-text); padding: 12px 18px; border: 1px solid var(--ink); background: var(--ink); color: var(--paper); border-radius: var(--r); cursor: pointer; text-decoration: none; }
.tb-search button:hover, .tb-hero__search button:hover, .tb-btn:hover { background: var(--wax); border-color: var(--wax); color: #fff; }
.tb-btn--ghost { background: transparent; color: var(--ink); }

@media (max-width: 1180px) {
	.tb-menubtn { display: inline-grid; }
	.tb-nav { position: fixed; inset: 104px 0 auto 0; margin: 0; background: var(--paper); border-bottom: 1px solid var(--rule); box-shadow: var(--shadow); display: none; max-height: calc(100vh - 104px); overflow: auto; }
	.tb-nav.is-open { display: block; }
	.tb-nav ul { flex-direction: column; padding: 8px var(--gut) 18px; gap: 0; }
	.tb-nav a { padding: 15px 4px; font-size: 1.12rem; border-bottom: 1px solid var(--rule); border-radius: 0; }
	.tb-nav a[aria-current]::after { left: 4px; right: auto; width: 26px; bottom: 8px; }
	.tb-nav__tools { border: 0; margin: 0; }
	.tb-head__act { margin-left: auto; }
}
@media (max-width: 480px) { .tb-brand__tag { display: none; } .tb-brand__name { font-size: 1.45rem; } .tb-head__in { min-height: 60px; } .tb-nav { inset: 94px 0 auto 0; } }

/* ---------- photo frames ---------- */
.tb-photo { background: var(--card); padding: 12px 12px 14px; box-shadow: var(--shadow); border: 1px solid var(--rule); position: relative; }
.tb-photo img { display: block; width: 100%; height: auto; filter: sepia(.12) contrast(1.02); }
.tb-photo--tilt { transform: rotate(1.6deg); }
.tb-photo--tilt-r { transform: rotate(-1.4deg); }
.tb-photo::before, .tb-photo::after { content: ''; position: absolute; width: 34px; height: 34px; background: linear-gradient(135deg, var(--ink) 50%, transparent 50%); opacity: .82; }
.tb-photo::before { top: 4px; left: 4px; }
.tb-photo::after { bottom: 4px; right: 4px; transform: rotate(180deg); }
.tb-photo__note { font: italic 400 1rem/1.4 var(--f-display); color: var(--ink-2); margin-top: 16px; text-align: center; }

/* ---------- hero ---------- */
.tb-hero { padding: clamp(36px, 6vw, 76px) 0 clamp(30px, 5vw, 60px); border-bottom: 1px solid var(--rule); }
.tb-hero__in { display: grid; grid-template-columns: minmax(0, 1.25fr) minmax(0, .75fr); gap: clamp(28px, 5vw, 72px); align-items: center; }
.tb-hero__h { font-size: clamp(2.3rem, 5.4vw, 4.1rem); font-weight: 560; line-height: 1.02; letter-spacing: -.025em; font-variation-settings: 'SOFT' 80, 'WONK' 1, 'opsz' 144; margin-bottom: .35em; }
.tb-hero__lead { font-size: clamp(1.08rem, 1.6vw, 1.25rem); color: var(--ink-2); max-width: 36em; }
.tb-hero__search { display: flex; gap: 8px; margin: 26px 0 14px; max-width: 560px; }
.tb-hero__search input { flex: 1; min-width: 0; font: inherit; font-size: 1.05rem; padding: 14px 16px; border: 1.5px solid var(--ink); background: var(--card); color: var(--ink); border-radius: var(--r); }
.tb-hero__pop { font-size: .95rem; color: var(--ink-3); }
.tb-hero__pop a { color: var(--ink-2); }
.tb-hero__fig { margin: 0; max-width: 420px; justify-self: center; }
@media (max-width: 820px) {
	.tb-hero__in { grid-template-columns: 1fr; }
	.tb-hero__fig { max-width: 300px; order: -1; justify-self: start; margin-left: 6px; }
	.tb-hero__fig .tb-photo__note { display: none; }
}
@media (max-width: 520px) { .tb-hero__fig { display: none; } .tb-hero__search button span { display: none; } }

/* ---------- sections ---------- */
.tb-section { padding: clamp(44px, 7vw, 88px) 0; }
.tb-section + .tb-section { border-top: 1px solid var(--rule); }
.tb-sechead { max-width: 720px; margin-bottom: clamp(24px, 4vw, 40px); }
.tb-sechead h2 { font-size: clamp(1.7rem, 3.4vw, 2.5rem); }
.tb-sechead p:not(.tb-ref) { color: var(--ink-2); font-size: 1.08rem; }

/* index cards (situation chooser) */
.tb-situ__grid { list-style: none; margin: 0; padding: 0; display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 18px; }
.tb-indexcard {
	display: flex; flex-direction: column; height: 100%; padding: 18px 20px 30px; text-decoration: none; color: var(--ink); position: relative;
	background: var(--card);
	border: 1px solid var(--rule); box-shadow: var(--shadow); transition: transform .18s ease, box-shadow .18s ease;
}
.tb-indexcard::before { content: ''; position: absolute; left: 0; right: 0; top: 50px; height: 2px; background: var(--wax); opacity: .55; }
.tb-indexcard::after { content: ''; position: absolute; bottom: 9px; left: 50%; width: 11px; height: 11px; margin-left: -5px; border-radius: 50%; background: var(--paper); box-shadow: inset 0 1px 2px rgba(0, 0, 0, .25); }
.tb-indexcard:hover { transform: translateY(-3px) rotate(-.4deg); color: var(--ink); box-shadow: 0 16px 34px -16px rgba(28, 35, 41, .4); }
.tb-indexcard__no { font: 500 .72rem/1 var(--f-mono); color: var(--ink-3); letter-spacing: .1em; height: 28px; }
.tb-indexcard__q { font: 600 1.28rem/1.18 var(--f-display); margin: 10px 0 14px; min-height: 2.4em; }
.tb-indexcard__a { display: flex; gap: 8px; align-items: flex-start; justify-content: space-between; color: var(--ink-2); font-size: 1rem; line-height: 1.45; margin-top: auto; padding-top: 12px; border-top: 1px dashed var(--blueline); }
.tb-indexcard__a .tb-ico { color: var(--wax); margin-top: 4px; transition: transform .18s; }
.tb-indexcard:hover .tb-indexcard__a .tb-ico { transform: translateX(4px); }
@media (max-width: 900px) { .tb-situ__grid { grid-template-columns: repeat(2, minmax(0, 1fr)); } }
@media (max-width: 560px) { .tb-situ__grid { grid-template-columns: 1fr; gap: 12px; } .tb-indexcard__q { min-height: 0; } }

/* census timeline */
.tb-timeline { background: var(--paper-2); }
.tb-tl { list-style: none; margin: 0; padding: 0 0 6px; display: grid; grid-template-columns: repeat(8, minmax(0, 1fr)); position: relative; }
.tb-tl::before { content: ''; position: absolute; left: 0; right: 0; top: 7px; height: 2px; background: var(--ink); }
.tb-tl__item a { display: flex; flex-direction: column; text-decoration: none; color: var(--ink); padding: 0 10px 0 0; position: relative; }
.tb-tl__yr { font: 600 clamp(1.5rem, 2.4vw, 2.1rem)/1 var(--f-display); font-variant-numeric: lining-nums; height: 40px; display: flex; align-items: flex-end; }
.tb-tl__item a::before { content: ''; width: 14px; height: 14px; border-radius: 50%; background: var(--paper-2); border: 2px solid var(--ink); margin: 0 0 12px; position: relative; top: -1px; transition: background .15s, transform .15s; }
.tb-tl__item a:hover::before { background: var(--wax); border-color: var(--wax); transform: scale(1.25); }
.tb-tl__item:nth-child(1) a::before { border-style: dashed; }
.tb-tl__date { font: 500 .72rem/1.3 var(--f-mono); text-transform: uppercase; letter-spacing: .08em; color: var(--wax); margin-bottom: 6px; }
.tb-tl__txt { font-size: .95rem; line-height: 1.35; color: var(--ink-2); }
.tb-tl__item a:hover .tb-tl__txt { color: var(--ink); }
.tb-tl__more { margin: 30px 0 0; }
@media (max-width: 900px) {
	.tb-tl { grid-template-columns: 1fr; padding-left: 28px; }
	.tb-tl::before { left: 6px; right: auto; top: 6px; bottom: 6px; width: 2px; height: auto; }
	.tb-tl__item a { display: grid; grid-template-columns: 76px 1fr; column-gap: 12px; padding: 0 0 18px; }
	.tb-tl__item a::before { position: absolute; left: -28px; top: 9px; margin: 0; }
	.tb-tl__yr { height: auto; grid-row: span 2; align-items: flex-start; }
}

/* drawers */
.tb-drawers__grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(320px, 1fr)); gap: 22px; }
.tb-drawer { background: var(--card); border: 1px solid var(--rule); box-shadow: var(--shadow); display: flex; flex-direction: column; }
.tb-drawer__front {
	display: flex; flex-direction: column; align-items: center; text-align: center; gap: 12px; padding: 24px 22px 46px; text-decoration: none; color: var(--ink); position: relative;
	background: linear-gradient(180deg, color-mix(in srgb, var(--paper-2) 70%, var(--card)) 0%, var(--paper-2) 100%); border-bottom: 1px solid var(--rule);
}
.tb-drawer__plate {
	display: inline-flex; align-items: center; gap: 10px; padding: 9px 16px 9px 10px; font: 500 .82rem/1 var(--f-mono); letter-spacing: .1em; text-transform: uppercase;
	background: linear-gradient(180deg, var(--brass-2), var(--brass)); color: #241b08; border-radius: 2px; position: relative;
	box-shadow: inset 0 1px 0 rgba(255, 255, 255, .5), inset 0 -1px 0 rgba(0, 0, 0, .2), 0 1px 2px rgba(0, 0, 0, .25);
}
.tb-drawer__plate::before, .tb-drawer__plate::after { content: ''; position: absolute; top: 50%; width: 4px; height: 4px; margin-top: -2px; border-radius: 50%; background: rgba(36, 27, 8, .55); }
.tb-drawer__plate::before { left: -9px; } .tb-drawer__plate::after { right: -9px; }
.tb-drawer__ref { display: inline-grid; place-items: center; width: 20px; height: 20px; background: rgba(36, 27, 8, .85); color: var(--brass-2); border-radius: 1px; font-size: .74rem; }
.tb-drawer__lead { font-size: 1rem; line-height: 1.45; color: var(--ink-2); max-width: 30em; }
.tb-drawer__pull { position: absolute; bottom: -11px; left: 50%; width: 64px; height: 20px; margin-left: -32px; border: 2px solid var(--ink-2); border-top: 0; border-radius: 0 0 32px 32px; background: var(--card); }
.tb-drawer__front:hover .tb-drawer__lead { color: var(--ink); }
.tb-drawer__front:hover .tb-drawer__pull { border-color: var(--wax); }
.tb-drawer__list { list-style: none; margin: 0; padding: 20px 22px 18px; }
.tb-drawer__list li + li { border-top: 1px dashed var(--rule); }
.tb-drawer__list a { display: block; padding: 9px 0; font-size: .98rem; line-height: 1.35; text-decoration: none; }
.tb-drawer__list a:hover { text-decoration: underline; }
@media (max-width: 400px) { .tb-drawers__grid { grid-template-columns: 1fr; } }

/* tool band */
.tb-toolband { background: var(--ink); color: var(--paper); }
.tb-toolband a { color: inherit; }
.tb-sechead--inv p:not(.tb-ref) { color: rgba(244, 238, 226, .78); }
.tb-sechead--inv .tb-ref { color: #e9b3a6; }
.tb-toolband__in { display: grid; grid-template-columns: minmax(0, 1.1fr) minmax(0, .9fr); gap: clamp(28px, 5vw, 64px); align-items: start; }
.tb-toolband__list { list-style: none; margin: 0; padding: 0; display: grid; gap: 10px; }
.tb-toolband__list a { display: flex; gap: 14px; align-items: flex-start; padding: 14px 16px; border: 1px solid rgba(244, 238, 226, .2); text-decoration: none; border-radius: var(--r); transition: background .15s, border-color .15s; }
.tb-toolband__list a:hover { background: rgba(244, 238, 226, .07); border-color: rgba(244, 238, 226, .45); color: #fff; }
.tb-toolband__list strong { display: block; font: 600 1.08rem/1.25 var(--f-display); margin-bottom: 3px; }
.tb-toolband__list span span, .tb-toolband__list a > span:last-child { font-size: .93rem; line-height: 1.4; color: rgba(244, 238, 226, .78); }
.tb-toolband__list a > span:last-child strong { color: #f4eee2; }
.tb-toolband__ico { flex: none; display: inline-grid; place-items: center; width: 44px; height: 44px; border-radius: 50%; border: 1.5px solid #e9b3a6; color: #e9b3a6 !important; font: 500 .74rem/1 var(--f-mono) !important; text-transform: uppercase; letter-spacing: .04em; }
@media (prefers-color-scheme: dark) { :root:not([data-theme="light"]) .tb-toolband { background: #0d1012; } }
@media (max-width: 860px) { .tb-toolband__in { grid-template-columns: 1fr; } }

/* tools: shared form look */
.tb-kv, .tb-rel, .tb-ftf, .tb-mal, .tb-ane { background: var(--card); color: var(--ink); border: 1px solid var(--rule); padding: clamp(18px, 3vw, 28px); box-shadow: var(--shadow); border-radius: var(--r); }
.tb-toolband .tb-kv { border-color: transparent; }
.tb-kv__row, .tb-rel__row { display: grid; grid-template-columns: repeat(auto-fit, minmax(150px, 1fr)); gap: 14px; }
.tb-kv label, .tb-rel label, .tb-ftf label, .tb-mal label { display: flex; flex-direction: column; gap: 6px; font: 500 .74rem/1.3 var(--f-mono); letter-spacing: .08em; text-transform: uppercase; color: var(--ink-2); }
.tb-kv input, .tb-kv select, .tb-rel select, .tb-ftf input, .tb-ftf select, .tb-mal input, .tb-mal select, .tb-ane input {
	font: 500 1.05rem/1.2 var(--f-text); text-transform: none; letter-spacing: 0; color: var(--ink); background: var(--paper); border: 1.5px solid var(--ink-2); border-radius: var(--r); padding: 11px 12px; width: 100%; min-height: 46px;
}
.tb-kv__out, .tb-mal__out, .tb-rel__out { display: block; margin-top: 18px; padding-top: 16px; border-top: 2px solid var(--ink); }
.tb-kv__res { display: block; font: 500 1.25rem/1.35 var(--f-display); }
.tb-kv__out--big .tb-kv__res { font-size: clamp(1.35rem, 2.6vw, 1.85rem); }
.tb-kv__res strong { color: var(--wax); font-weight: 700; white-space: nowrap; }
.tb-kv__fac { display: block; margin-top: 6px; font-size: .95rem; color: var(--ink-2); }
.tb-kv__src { margin: 14px 0 0; font-size: .86rem; color: var(--ink-3); line-height: 1.45; }
.tb-kv__chart { margin-top: 18px; color: var(--ink-2); }
.tb-kv__chart svg { width: 100%; height: auto; display: block; overflow: visible; }
.tb-kv__chart text { font: 500 11px var(--f-mono); fill: var(--ink-2); }
.tb-kv__chart .tb-kv__mark0, .tb-kv__chart .tb-kv__mark1 { stroke: var(--wax); stroke-width: 1.5; stroke-dasharray: 3 3; }
.tb-kv__axis { display: block; font: 400 .74rem var(--f-mono); color: var(--ink-3); margin-top: 6px; }
.tb-rel__intro { color: var(--ink-2); }
.tb-rel__half { flex-direction: row !important; align-items: center; margin-top: 14px; text-transform: none !important; letter-spacing: 0 !important; font: 400 1rem var(--f-text) !important; gap: 10px !important; }
.tb-rel__half input { width: 20px; height: 20px; accent-color: var(--wax); }
.tb-rel__res { font: 500 1.3rem/1.35 var(--f-display); margin-bottom: 10px; }
.tb-rel__res strong { color: var(--wax); }
.tb-rel__dna { color: var(--ink-2); margin: 0; }
.tb-ftf__out { list-style: none; margin: 20px 0 0; padding: 0; border-top: 2px solid var(--ink); }
.tb-ftf__out li { border-bottom: 1px solid var(--rule); }
.tb-ftf__out li > a, .tb-ftf__out li.is-note { display: grid; grid-template-columns: 90px 170px 1fr; gap: 10px; padding: 12px 4px; text-decoration: none; color: var(--ink); align-items: baseline; }
.tb-ftf__out li.is-note { grid-template-columns: 90px 1fr; color: var(--ink-2); font-size: .95rem; }
.tb-ftf__y { font: 600 1.35rem/1 var(--f-display); }
.tb-ftf__d { font: 400 .8rem var(--f-mono); color: var(--ink-3); }
.tb-ftf__out .is-yes .tb-ftf__s { color: var(--moss); font-weight: 600; }
.tb-ftf__out .is-yes .tb-ftf__s::before { content: '✓ '; }
.tb-ftf__out .is-maybe .tb-ftf__s { color: var(--brass); font-weight: 600; }
.tb-ftf__out .is-no { opacity: .62; }
.tb-ftf__out li > a:hover { background: var(--paper-2); }
@media (max-width: 600px) { .tb-ftf__out li > a { grid-template-columns: 64px 1fr; } .tb-ftf__d { grid-column: 2; } .tb-ftf__s { grid-column: 2; } }
.tb-mal__res { font: 500 1.3rem/1.35 var(--f-display); }
.tb-mal__res strong { color: var(--wax); }
.tb-mal__list { list-style: none; padding: 0; margin: 8px 0 0; display: flex; flex-wrap: wrap; gap: 6px 16px; color: var(--ink-2); font-size: .95rem; }
.tb-mal__list li::before { content: '= '; color: var(--ink-3); }
.tb-ane__grid { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); grid-auto-flow: column; grid-template-rows: repeat(8, auto); gap: 10px; margin: 16px 0; }
.tb-ane__p { border: 1px solid var(--rule); background: var(--paper); margin: 0; padding: 8px 10px 10px; border-radius: var(--r); display: grid; gap: 5px; align-self: center; }
.tb-ane__g1 { grid-column: 1; grid-row: 1 / span 8; }
.tb-ane__g2 { grid-column: 2; grid-row: span 4; }
.tb-ane__g3 { grid-column: 3; grid-row: span 2; }
.tb-ane__g4 { grid-column: 4; grid-row: span 1; }
.tb-ane__p legend { font: 500 .72rem/1 var(--f-mono); letter-spacing: .06em; text-transform: uppercase; color: var(--ink-2); padding: 0 4px; }
.tb-ane__no { display: inline-grid; place-items: center; min-width: 20px; height: 18px; background: var(--ink); color: var(--paper); border-radius: 2px; font-size: .68rem; }
.tb-ane input { min-height: 36px; padding: 7px 9px; font-size: .92rem; border-width: 1px; }
.tb-ane__act { display: flex; gap: 10px; flex-wrap: wrap; }
@media (max-width: 860px) {
	.tb-ane__grid { grid-template-columns: 1fr 1fr; grid-auto-flow: row; grid-template-rows: none; }
	.tb-ane__g1, .tb-ane__g2, .tb-ane__g3, .tb-ane__g4 { grid-column: auto; grid-row: auto; }
	.tb-ane__g1 { grid-column: 1 / -1; }
}

/* glossary teaser */
.tb-words__grid { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 0; margin: 0 0 24px; border-top: 2px solid var(--ink); }
.tb-word { padding: 18px 22px 18px 0; border-bottom: 1px solid var(--rule); }
.tb-word + .tb-word { padding-left: 22px; border-left: 1px solid var(--rule); }
.tb-word dt { font: italic 600 1.55rem/1.1 var(--f-display); margin-bottom: 8px; font-variation-settings: 'WONK' 1; }
.tb-word dd { margin: 0; color: var(--ink-2); }
.tb-link-arrow { display: inline-flex; align-items: center; gap: 8px; font-weight: 600; text-decoration: none; border-bottom: 1.5px solid var(--wax); padding-bottom: 2px; }
.tb-link-arrow .tb-ico { color: var(--wax); }
@media (max-width: 800px) { .tb-words__grid { grid-template-columns: 1fr; } .tb-word + .tb-word { padding-left: 0; border-left: 0; } }

/* latest list */
.tb-list { list-style: none; margin: 0; padding: 0; border-top: 2px solid var(--ink); columns: 2; column-gap: 40px; }
.tb-list__item { break-inside: avoid; border-bottom: 1px solid var(--rule); }
.tb-list__item a { display: grid; grid-template-columns: 1fr auto; gap: 2px 14px; padding: 14px 0; text-decoration: none; }
.tb-list__hub { grid-column: 1 / -1; font: 500 .7rem/1 var(--f-mono); letter-spacing: .1em; text-transform: uppercase; color: var(--wax); }
.tb-list__t { font: 600 1.1rem/1.3 var(--f-display); }
.tb-list__d { font: 400 .78rem var(--f-mono); color: var(--ink-3); align-self: end; white-space: nowrap; }
.tb-list__item a:hover .tb-list__t { color: var(--wax); }
@media (max-width: 760px) { .tb-list { columns: 1; } }

/* about strip */
.tb-me__in { display: grid; grid-template-columns: 220px minmax(0, 1fr); gap: clamp(24px, 4vw, 56px); align-items: center; max-width: 960px; }
.tb-me h2 { font-size: clamp(1.5rem, 2.8vw, 2.1rem); }
.tb-me p { color: var(--ink-2); }
.tb-portrait { border-radius: 50%; background: var(--paper-2); object-fit: cover; }
.tb-me__img { width: 220px; height: 220px; border-radius: 4px; border: 10px solid var(--card); box-shadow: var(--shadow); transform: rotate(-2deg); }
@media (max-width: 640px) { .tb-me__in { grid-template-columns: 1fr; } .tb-me__img { width: 150px; height: 150px; } }

/* ---------- article ---------- */
.tb-crumbs ol { list-style: none; margin: 0 0 18px; padding: 0; display: flex; flex-wrap: wrap; gap: 4px 0; font: 400 .78rem/1.4 var(--f-mono); color: var(--ink-3); }
.tb-crumbs li + li::before { content: '›'; margin: 0 8px; color: var(--ink-3); }
.tb-crumbs a { color: var(--ink-2); text-decoration: none; }
.tb-crumbs a:hover { color: var(--wax); text-decoration: underline; }
.tb-ahead { padding: clamp(26px, 4vw, 48px) 0 clamp(20px, 3vw, 32px); }
.tb-ahead__in { max-width: 980px; }
.tb-plate { display: inline-flex; align-items: center; gap: 8px; font: 500 .74rem/1 var(--f-mono); letter-spacing: .1em; text-transform: uppercase; text-decoration: none; color: var(--ink-2); margin-bottom: 16px; }
.tb-plate span { display: inline-grid; place-items: center; width: 22px; height: 22px; background: linear-gradient(180deg, var(--brass-2), var(--brass)); color: #241b08; border-radius: 2px; font-size: .72rem; box-shadow: inset 0 1px 0 rgba(255, 255, 255, .45); }
.tb-plate:hover { color: var(--wax); }
.tb-plate--lg { font-size: .82rem; }
.tb-ahead__h { font-size: clamp(2rem, 4.6vw, 3.35rem); font-weight: 580; letter-spacing: -.022em; line-height: 1.06; max-width: 22em; font-variation-settings: 'SOFT' 60, 'WONK' 0, 'opsz' 144; }
.tb-ahead__dek { font: 400 clamp(1.12rem, 1.8vw, 1.32rem)/1.5 var(--f-text); color: var(--ink-2); max-width: 40em; margin: 0 0 22px; }
.tb-byline { display: flex; flex-wrap: wrap; align-items: center; gap: 10px 18px; padding-top: 18px; border-top: 1px solid var(--rule); position: relative; }
.tb-byline__who { display: inline-flex; align-items: center; gap: 10px; text-decoration: none; font-size: .98rem; }
.tb-byline__who img { width: 44px; height: 44px; }
.tb-byline__meta { font: 400 .8rem var(--f-mono); color: var(--ink-3); }
.tb-stamp {
	margin-left: auto; display: inline-block; padding: 6px 10px; font: 500 .66rem/1.25 var(--f-mono); letter-spacing: .12em; text-transform: uppercase; text-align: center;
	color: var(--wax); border: 2px solid currentColor; outline: 1px solid currentColor; outline-offset: 2px; border-radius: 3px; transform: rotate(-4deg); opacity: .86;
}
.tb-stamp--big { font-size: .9rem; padding: 10px 14px; margin: 0 0 20px; }
@media (max-width: 560px) { .tb-stamp { margin-left: 0; } }
.tb-afig { margin: 0 auto clamp(26px, 4vw, 44px); max-width: 1100px; }
.tb-afig figcaption { font-size: .86rem; color: var(--ink-3); margin-top: 10px; text-align: center; }
.tb-abody { display: grid; grid-template-columns: 250px minmax(0, 720px); gap: clamp(28px, 4vw, 64px); justify-content: center; align-items: start; padding-bottom: 30px; }
.tb-aside { position: sticky; top: 96px; max-height: calc(100vh - 110px); overflow: auto; scrollbar-width: thin; font-size: .92rem; }
.tb-toc { border-top: 2px solid var(--ink); }
.tb-toc summary { font: 500 .74rem/1 var(--f-mono); letter-spacing: .1em; text-transform: uppercase; padding: 12px 0; cursor: pointer; list-style: none; display: flex; justify-content: space-between; }
.tb-toc summary::-webkit-details-marker { display: none; }
.tb-toc summary::after { content: '+'; font-size: 1rem; }
.tb-toc[open] summary::after { content: '−'; }
.tb-toc ol { list-style: none; margin: 0 0 22px; padding: 0; counter-reset: t; }
.tb-toc li { counter-increment: t; }
.tb-toc a { display: grid; grid-template-columns: 26px 1fr; padding: 6px 0; text-decoration: none; color: var(--ink-2); line-height: 1.35; }
.tb-toc a::before { content: counter(t, decimal-leading-zero); font: 400 .72rem/1.9 var(--f-mono); color: var(--ink-3); }
.tb-toc a:hover, .tb-toc a[aria-current] { color: var(--wax); }
.tb-sib { border-top: 1px solid var(--rule); padding-top: 12px; }
.tb-sib__h { font: 500 .72rem/1.3 var(--f-mono); letter-spacing: .1em; text-transform: uppercase; color: var(--ink-3); margin-bottom: 8px; }
.tb-sib ul { list-style: none; margin: 0; padding: 0; }
.tb-sib li { padding: 5px 0; line-height: 1.35; }
.tb-sib a { color: var(--ink-2); text-decoration: none; }
.tb-sib a:hover { color: var(--wax); text-decoration: underline; }
.tb-sib [aria-current] { font-weight: 600; color: var(--ink); padding-left: 10px; border-left: 2px solid var(--wax); display: block; }
@media (max-width: 1023px) {
	.tb-abody { grid-template-columns: minmax(0, 1fr); max-width: 760px; }
	.tb-aside { position: static; max-height: none; }
	.tb-sib { display: none; }
	.tb-toc { background: var(--card); border: 1px solid var(--rule); border-top: 2px solid var(--ink); padding: 0 14px; }
}

/* prose */
.tb-prose { font-size: clamp(1.06rem, 1.25vw, 1.155rem); line-height: 1.7; min-width: 0; }
.tb-prose > *:first-child { margin-top: 0; }
.tb-prose h2 { font-size: clamp(1.5rem, 2.5vw, 1.95rem); margin: 2.1em 0 .6em; padding-top: .7em; border-top: 1px solid var(--rule); }
.tb-prose h3 { font-size: clamp(1.2rem, 1.8vw, 1.4rem); margin: 1.7em 0 .5em; }
.tb-prose h4 { font-size: 1.1rem; margin: 1.4em 0 .4em; }
.tb-prose p, .tb-prose ul, .tb-prose ol { margin: 0 0 1.1em; }
.tb-prose ul, .tb-prose ol { padding-left: 1.3em; }
.tb-prose li { margin-bottom: .4em; }
.tb-prose li::marker { color: var(--wax); }
.tb-prose a { text-decoration-color: color-mix(in srgb, var(--wax) 70%, transparent); }
.tb-prose strong { font-weight: 650; }
.tb-prose blockquote { margin: 1.6em 0; padding: 0 0 0 22px; border-left: 3px solid var(--wax); font: italic 400 1.18em/1.55 var(--f-display); color: var(--ink-2); }
.tb-prose figure { margin: 1.8em 0; }
.tb-prose img { border: 1px solid var(--rule); }
.tb-prose hr { border: 0; border-top: 1px solid var(--rule); margin: 2.4em 0; }
.tb-lead, .tb-prose > p.tb-lead:first-child { font-size: 1.16em; line-height: 1.6; color: var(--ink); }
.tb-prose > p.tb-lead:first-child::first-letter { font: 600 3.4em/.85 var(--f-display); float: left; margin: .06em .1em 0 0; color: var(--wax); }

/* «Kort svar» index card */
.tb-kort {
	position: relative; margin: 0 0 2em; padding: 16px 22px 26px; border: 1px solid var(--rule); box-shadow: var(--shadow);
	background: var(--card);
}
.tb-kort::before { content: ''; position: absolute; left: 0; right: 0; top: 44px; height: 2px; background: var(--wax); opacity: .6; }
.tb-kort::after { content: ''; position: absolute; bottom: 7px; left: 50%; width: 10px; height: 10px; margin-left: -5px; border-radius: 50%; background: var(--paper); box-shadow: inset 0 1px 2px rgba(0, 0, 0, .25); }
.tb-kort__label { font: 500 .74rem/28px var(--f-mono) !important; letter-spacing: .12em; text-transform: uppercase; color: var(--wax); margin: 0 0 14px !important; }
.tb-kort p:last-child, .tb-kort ul:last-child { margin-bottom: 0; }
.tb-kort ul { padding-left: 1.1em; }
.tb-kort li { margin-bottom: .45em; }
.tb-kort li + li { padding-top: .45em; border-top: 1px dashed var(--blueline); }

/* notes and pitfalls */
.tb-merk, .tb-felle { margin: 1.8em 0; padding: 16px 20px; border-radius: var(--r); font-size: .97em; }
.tb-merk { background: var(--moss-soft); border-left: 4px solid var(--moss); }
.tb-felle { background: var(--wax-soft); border-left: 4px solid var(--wax); }
.tb-merk__label, .tb-felle__label { font: 500 .72rem/1.3 var(--f-mono) !important; letter-spacing: .1em; text-transform: uppercase; margin: 0 0 6px !important; }
.tb-merk__label { color: var(--moss); } .tb-felle__label { color: var(--wax); }
.tb-merk p:last-child, .tb-felle p:last-child { margin-bottom: 0; }

/* steps */
.tb-steg { list-style: none; padding: 0 !important; counter-reset: s; margin: 1.4em 0 1.8em !important; }
.tb-steg > li { counter-increment: s; position: relative; padding: 0 0 18px 56px; margin: 0 !important; }
.tb-steg > li::before { content: counter(s); position: absolute; left: 0; top: -2px; width: 38px; height: 38px; display: grid; place-items: center; font: 600 1.05rem/1 var(--f-display); color: var(--paper); background: var(--ink); border-radius: 50%; }
.tb-steg > li:not(:last-child)::after { content: ''; position: absolute; left: 18px; top: 40px; bottom: 2px; width: 2px; background: var(--rule); }
.tb-steg > li > strong:first-child { display: block; font-family: var(--f-display); font-size: 1.08em; margin-bottom: 2px; }

/* ledger tables */
.tb-tabell { margin: 1.6em 0 2em; overflow-x: auto; position: relative; border-top: 2px solid var(--ink); border-bottom: 2px solid var(--ink); -webkit-overflow-scrolling: touch; }
.tb-tabell.is-scroll { box-shadow: inset -24px 0 18px -18px rgba(28, 35, 41, .35); }
.tb-prose table, .tb-tabell table { width: 100%; border-collapse: collapse; font-size: .9em; line-height: 1.45; font-variant-numeric: tabular-nums; }
.tb-tabell caption { caption-side: top; text-align: left; font: 500 .74rem/1.4 var(--f-mono); letter-spacing: .08em; text-transform: uppercase; color: var(--ink-2); padding: 10px 0 8px; }
.tb-tabell th { text-align: left; font: 600 .82rem/1.3 var(--f-text); background: var(--paper-2); padding: 10px 12px; border-bottom: 1px solid var(--ink); white-space: nowrap; vertical-align: bottom; }
.tb-tabell td { padding: 10px 12px; border-bottom: 1px solid var(--rule); vertical-align: top; }
.tb-tabell td + td, .tb-tabell th + th { border-left: 1px solid var(--rule); }
.tb-tabell tr:last-child td { border-bottom: 0; }
.tb-tabell td:first-child { font-weight: 600; }
@media (max-width: 600px) { .tb-tabell td, .tb-tabell th { padding: 8px 9px; } .tb-tabell td { min-width: 120px; } .tb-tabell td:first-child { min-width: 96px; } }

/* glossary list */
.tb-ordliste { margin: 1.4em 0 2em; border-top: 2px solid var(--ink); }
.tb-ordliste > div, .tb-ordliste dt { }
.tb-ordliste dt { font: italic 650 1.12em/1.3 var(--f-display); padding-top: 14px; font-variation-settings: 'WONK' 1; }
.tb-ordliste dd { margin: 4px 0 0; padding-bottom: 14px; border-bottom: 1px solid var(--rule); color: var(--ink-2); }
.tb-alfa { display: flex; flex-wrap: wrap; gap: 4px; margin: 0 0 1.4em; padding: 0; list-style: none; }
.tb-alfa a { display: inline-grid; place-items: center; min-width: 36px; height: 36px; border: 1px solid var(--rule); font: 500 .9rem var(--f-mono); text-decoration: none; background: var(--card); }
.tb-alfa a:hover { background: var(--ink); color: var(--paper); }

/* FAQ */
.tb-faq { margin-top: 2.6em; }
.tb-faq details { border-bottom: 1px solid var(--rule); }
.tb-faq details:first-of-type { border-top: 2px solid var(--ink); }
.tb-faq summary { cursor: pointer; padding: 15px 34px 15px 0; font: 600 1.06em/1.35 var(--f-display); list-style: none; position: relative; }
.tb-faq summary::-webkit-details-marker { display: none; }
.tb-faq summary::after { content: '+'; position: absolute; right: 4px; top: 12px; font: 400 1.4rem/1 var(--f-mono); color: var(--wax); }
.tb-faq details[open] summary::after { content: '−'; }
.tb-faq details > *:not(summary) { margin: 0 0 16px; color: var(--ink-2); }

/* sources */
.tb-kilder { margin-top: 2.6em; font-size: .92em; }
.tb-kilder h2 { font-size: 1.2rem !important; font-family: var(--f-mono) !important; font-weight: 500 !important; letter-spacing: .1em; text-transform: uppercase; }
.tb-kilder ol { padding-left: 1.6em; }
.tb-kilder li { margin-bottom: .55em; color: var(--ink-2); word-break: break-word; }
.tb-kilder li::marker { font-family: var(--f-mono); font-size: .85em; color: var(--ink-3); }

/* compare / pros-cons and key-figure strips (optional components) */
.tb-tall { display: grid; grid-template-columns: repeat(auto-fit, minmax(150px, 1fr)); gap: 0; margin: 1.6em 0 2em; border-top: 2px solid var(--ink); border-bottom: 1px solid var(--rule); }
.tb-tall > div { padding: 14px 16px 14px 0; }
.tb-tall > div + div { padding-left: 16px; border-left: 1px solid var(--rule); }
.tb-tall b { display: block; font: 600 1.9rem/1.05 var(--f-display); color: var(--wax); font-variant-numeric: lining-nums; }
.tb-tall span { display: block; font-size: .9rem; color: var(--ink-2); line-height: 1.35; margin-top: 4px; }

/* article footer */
.tb-afoot { max-width: 1034px; padding-bottom: clamp(40px, 6vw, 80px); }
.tb-authorbox { display: grid; grid-template-columns: 96px minmax(0, 1fr); gap: 20px; padding: 24px; background: var(--card); border: 1px solid var(--rule); box-shadow: var(--shadow); margin: 30px 0 26px; }
.tb-authorbox img { width: 96px; height: 96px; }
.tb-authorbox__h { font: 600 1.15rem/1.3 var(--f-display); margin-bottom: 6px; }
.tb-authorbox p { color: var(--ink-2); font-size: .98rem; }
.tb-authorbox__links { margin: 0; font-size: .92rem !important; }
@media (max-width: 520px) { .tb-authorbox { grid-template-columns: 1fr; } }
.tb-pn { display: grid; grid-template-columns: 1fr 1fr; gap: 14px; }
.tb-pn a { display: flex; flex-direction: column; gap: 6px; padding: 16px 18px; border: 1px solid var(--rule); text-decoration: none; font: 600 1.06rem/1.3 var(--f-display); background: var(--paper); border-radius: var(--r); }
.tb-pn a span { font: 500 .7rem/1.3 var(--f-mono); letter-spacing: .1em; text-transform: uppercase; color: var(--wax); }
.tb-pn__next { text-align: right; grid-column: 2; }
.tb-pn a:hover { border-color: var(--ink); }
@media (max-width: 600px) { .tb-pn { grid-template-columns: 1fr; } .tb-pn__next { grid-column: 1; } }

/* ---------- hubs ---------- */
.tb-hubhead { padding: clamp(26px, 4vw, 52px) 0 clamp(26px, 4vw, 44px); background: var(--paper-2); border-bottom: 1px solid var(--rule); }
.tb-hubhead__in { display: grid; grid-template-columns: minmax(0, 1.3fr) minmax(0, .7fr); gap: clamp(24px, 5vw, 64px); align-items: center; }
.tb-hubhead h1 { font-size: clamp(2.3rem, 5.2vw, 3.9rem); font-weight: 560; letter-spacing: -.025em; font-variation-settings: 'SOFT' 80, 'WONK' 1, 'opsz' 144; }
.tb-hubhead__lead { font-size: clamp(1.08rem, 1.6vw, 1.25rem); color: var(--ink-2); max-width: 34em; margin: 0; }
.tb-hubhead__fig { margin: 0; max-width: 360px; justify-self: end; }
@media (max-width: 760px) { .tb-hubhead__in { grid-template-columns: 1fr; } .tb-hubhead__fig { display: none; } }
.tb-hubbody { padding-top: clamp(30px, 4vw, 48px); padding-bottom: clamp(44px, 6vw, 80px); }
.tb-hubintro { max-width: 760px; margin-bottom: 20px; }
.tb-hubsec { margin: clamp(30px, 4vw, 48px) 0; }
.tb-hubsec h2 { display: flex; align-items: center; gap: 12px; font-size: clamp(1.35rem, 2.4vw, 1.75rem); padding-bottom: 12px; border-bottom: 2px solid var(--ink); margin-bottom: 18px; }
.tb-hubsec__no { font: 500 .74rem/1 var(--f-mono); letter-spacing: .08em; padding: 5px 7px; border: 1px solid var(--ink); border-radius: 2px; }
.tb-cards { list-style: none; margin: 0; padding: 0; display: grid; grid-template-columns: repeat(auto-fill, minmax(280px, 1fr)); gap: 16px; }
.tb-card a { display: flex; flex-direction: column; gap: 8px; height: 100%; padding: 18px 20px 20px; background: var(--card); border: 1px solid var(--rule); text-decoration: none; transition: border-color .15s, transform .15s; border-radius: var(--r); }
.tb-card a:hover { border-color: var(--ink); transform: translateY(-2px); }
.tb-card__img { width: calc(100% + 40px); max-width: none; margin: -18px -20px 6px; height: auto; aspect-ratio: 16/10; object-fit: cover; border-bottom: 1px solid var(--rule); }
.tb-card__hub { font: 500 .7rem/1 var(--f-mono); letter-spacing: .1em; text-transform: uppercase; color: var(--wax); }
.tb-card__t { font: 600 1.16rem/1.25 var(--f-display); }
.tb-card a:hover .tb-card__t { color: var(--wax); }
.tb-card__x { font-size: .95rem; line-height: 1.45; color: var(--ink-2); }
.tb-card--lead { grid-column: span 2; }
.tb-card--lead .tb-card__t { font-size: 1.5rem; }
@media (max-width: 640px) { .tb-card--lead { grid-column: auto; } }
.tb-otherhubs { margin-top: clamp(40px, 6vw, 64px); padding-top: 20px; border-top: 1px solid var(--rule); }
.tb-otherhubs h2 { font: 500 .78rem/1 var(--f-mono); letter-spacing: .12em; text-transform: uppercase; color: var(--ink-2); }
.tb-otherhubs ul { list-style: none; margin: 0; padding: 0; display: flex; flex-wrap: wrap; gap: 10px; }
.tb-otherhubs a { display: inline-flex; align-items: center; gap: 8px; padding: 9px 14px 9px 9px; border: 1px solid var(--rule); background: var(--card); text-decoration: none; border-radius: var(--r); }
.tb-otherhubs a span { display: inline-grid; place-items: center; width: 22px; height: 22px; background: linear-gradient(180deg, var(--brass-2), var(--brass)); color: #241b08; font: 500 .72rem/1 var(--f-mono); border-radius: 2px; }
.tb-otherhubs a:hover { border-color: var(--ink); }
.tb-linkcols { list-style: none; margin: 0; padding: 0; columns: 2; column-gap: 40px; }
.tb-linkcols li { break-inside: avoid; padding: 7px 0; border-bottom: 1px dashed var(--rule); }
@media (max-width: 640px) { .tb-linkcols { columns: 1; } }

/* ---------- pages ---------- */
.tb-pagehead { padding: clamp(28px, 4vw, 52px) 0 clamp(18px, 3vw, 30px); border-bottom: 1px solid var(--rule); margin-bottom: clamp(26px, 4vw, 44px); }
.tb-pagehead h1 { font-size: clamp(2rem, 4.4vw, 3.2rem); font-weight: 580; letter-spacing: -.02em; max-width: 22em; }
.tb-pagehead__lead { font-size: clamp(1.06rem, 1.6vw, 1.22rem); color: var(--ink-2); max-width: 40em; }
.tb-pagehead--tool { background: var(--paper-2); }
.tb-pagebody { max-width: 800px; padding-bottom: clamp(44px, 6vw, 80px); }
.tb-toolwrap { display: grid; gap: clamp(28px, 4vw, 48px); max-width: 900px; padding-bottom: clamp(44px, 6vw, 80px); }
.tb-toolprose { max-width: 760px; }
.tb-toolgrid { list-style: none; margin: 0 0 40px; padding: 0; display: grid; grid-template-columns: repeat(auto-fill, minmax(260px, 1fr)); gap: 16px; }
.tb-toolgrid a { display: flex; flex-direction: column; gap: 8px; height: 100%; padding: 20px; background: var(--card); border: 1px solid var(--rule); text-decoration: none; border-radius: var(--r); }
.tb-toolgrid a:hover { border-color: var(--ink); }
.tb-toolgrid strong { font: 600 1.2rem/1.25 var(--f-display); }
.tb-toolgrid span:last-child { color: var(--ink-2); font-size: .96rem; }
.tb-toolgrid .tb-toolband__ico { color: var(--wax) !important; border-color: var(--wax); }
.tb-authorhead { background: var(--paper-2); }
.tb-authorhead__in { display: grid; grid-template-columns: 280px minmax(0, 1fr); gap: clamp(24px, 4vw, 56px); align-items: start; }
.tb-authorhead__img { width: 280px; height: 280px; border-radius: 4px; border: 12px solid var(--card); box-shadow: var(--shadow); transform: rotate(-1.5deg); }
.tb-authorhead__bio { font-size: 1.06rem; max-width: 40em; }
.tb-foot__mail--ink { color: var(--ink) !important; border-color: var(--ink) !important; }
@media (max-width: 760px) { .tb-authorhead__in { grid-template-columns: 1fr; } .tb-authorhead__img { width: 170px; height: 170px; } }
.tb-404 { text-align: left; }

/* ---------- footer ---------- */
.tb-foot { background: var(--ink); color: rgba(244, 238, 226, .82); padding: clamp(44px, 6vw, 72px) 0 26px; font-size: .96rem; }
@media (prefers-color-scheme: dark) { :root:not([data-theme="light"]) .tb-foot { background: #0d1012; } }
.tb-foot a { color: #f4eee2; text-decoration-color: rgba(233, 179, 166, .6); }
.tb-foot a:hover { color: #fff; }
.tb-foot__top { display: grid; grid-template-columns: minmax(0, 1.5fr) repeat(3, minmax(0, 1fr)); gap: clamp(24px, 4vw, 48px); }
.tb-brand--inv, .tb-brand--inv:hover { color: #f4eee2; }
.tb-brand--inv .tb-mark__frame { fill: #f4eee2; stroke: #f4eee2; }
.tb-brand--inv .tb-brand__tag { color: rgba(244, 238, 226, .6); }
.tb-foot__brand p { margin: 16px 0; max-width: 34em; line-height: 1.55; }
.tb-foot__mail { display: inline-flex; align-items: center; gap: 10px; font: 600 1.12rem/1 var(--f-text); padding: 12px 16px; border: 1.5px solid rgba(244, 238, 226, .55); border-radius: var(--r); text-decoration: none !important; }
.tb-foot__mail:hover { background: rgba(244, 238, 226, .08); }
.tb-foot__small { font-size: .88rem; color: rgba(244, 238, 226, .62); }
.tb-foot__col h2 { font: 500 .74rem/1 var(--f-mono); letter-spacing: .12em; text-transform: uppercase; color: #e9b3a6; margin-bottom: 14px; }
.tb-foot__col ul { list-style: none; margin: 0; padding: 0; }
.tb-foot__col li { padding: 5px 0; }
.tb-foot__col a { text-decoration: none; }
.tb-foot__col a:hover { text-decoration: underline; }
.tb-foot__census { display: flex; justify-content: space-between; gap: 8px; margin: 40px 0 0; padding: 16px 0; border-top: 1px solid rgba(244, 238, 226, .16); border-bottom: 1px solid rgba(244, 238, 226, .16); font: italic 500 clamp(1rem, 2.6vw, 1.7rem)/1 var(--f-display); color: rgba(244, 238, 226, .26); overflow: hidden; }
.tb-foot__bottom { display: flex; flex-wrap: wrap; justify-content: space-between; gap: 10px; padding-top: 20px; font: 400 .78rem/1.5 var(--f-mono); color: rgba(244, 238, 226, .55); }
@media (max-width: 900px) { .tb-foot__top { grid-template-columns: 1fr 1fr; } .tb-foot__brand { grid-column: 1 / -1; } }
@media (max-width: 480px) { .tb-foot__top { grid-template-columns: 1fr; } }

/* ---------- legacy (n8n / older) article markup ---------- */
.tb-article--legacy .tb-prose .mm-box, .tb-article--legacy .tb-prose [class*="n24-"] { max-width: 100%; }
.tb-prose iframe { max-width: 100%; }
.tb-prose .wp-block-table { overflow-x: auto; }

/* pagination */
.nav-links { display: flex; gap: 6px; margin-top: 30px; }
.nav-links .page-numbers { display: inline-grid; place-items: center; min-width: 40px; height: 40px; border: 1px solid var(--rule); text-decoration: none; font-family: var(--f-mono); }
.nav-links .current { background: var(--ink); color: var(--paper); }

/* ---------- motion ---------- */
@media (prefers-reduced-motion: reduce) { *, *::before, *::after { transition: none !important; animation: none !important; scroll-behavior: auto !important; } }

/* ---------- print ---------- */
@media print {
	body { background: #fff; color: #000; font-size: 11pt; }
	.tb-ribbon, .tb-head, .tb-foot, .tb-aside, .tb-afoot, .tb-skip, .tb-crumbs, .tb-pagehead .tb-plate, .tb-toolprose, .tb-ane__act, .tb-rel__intro { display: none !important; }
	.tb-abody { display: block; }
	.tb-prose a::after { content: ' (' attr(href) ')'; font-size: 8pt; color: #555; }
	.page-template-default .tb-pagehead { border: 0; margin: 0; padding: 0 0 8pt; }
	.tb-ane { border: 0; box-shadow: none; padding: 0; }
	.tb-ane__grid { grid-template-columns: repeat(4, 1fr) !important; grid-auto-flow: column !important; grid-template-rows: repeat(8, auto) !important; gap: 6pt; }
	.tb-ane__g1 { grid-column: 1 !important; grid-row: 1 / span 8 !important; }
	.tb-ane__g2 { grid-column: 2 !important; grid-row: span 4 !important; }
	.tb-ane__g3 { grid-column: 3 !important; grid-row: span 2 !important; }
	.tb-ane__g4 { grid-column: 4 !important; grid-row: span 1 !important; }
	.tb-ane__p { border: 1px solid #000; background: #fff; break-inside: avoid; }
	.tb-ane input { border: 0; border-bottom: 1px dotted #999; background: #fff; padding: 2pt 0; min-height: 0; font-size: 9pt; }
	.tb-ane input::placeholder { color: transparent; }
	@page { size: A4 landscape; margin: 12mm; }
}

/* =====================================================================
   v2 – after design critique round 1
   ===================================================================== */
:root { --gut: clamp(20px, 4vw, 40px); --brass-flat: #b08d57; }
h1, h2, h3, h4 { font-variation-settings: 'opsz' 72, 'SOFT' 50, 'WONK' 0; }
.tb-hero__h, .tb-hubhead h1, .tb-ahead__h, .tb-pagehead h1 { font-weight: 520; letter-spacing: -.005em; line-height: 1.08; font-variation-settings: 'opsz' 72, 'SOFT' 50, 'WONK' 0; }
.tb-hero__h { font-size: clamp(2.15rem, 1.3rem + 3.4vw, 3.9rem); }
@media (max-width: 560px) { .tb-hero__h { font-size: 2.1rem; line-height: 1.12; } .tb-ahead__h, .tb-hubhead h1, .tb-pagehead h1 { font-size: 1.95rem; line-height: 1.14; } }
.tb-eyebrow { font-size: .75rem; letter-spacing: .08em; }
.tb-crumbs ol { font-size: .82rem; color: color-mix(in srgb, var(--ink) 70%, transparent); }
.tb-crumbs a { color: color-mix(in srgb, var(--ink) 75%, transparent); }

/* ribbon: ages + tooltips */
.tb-ribbon__in { gap: 10px; min-height: 38px; }
.tb-ribbon__years a { display: flex; align-items: baseline; gap: 5px; padding: 7px 9px; position: relative; }
.tb-ribbon__years a[aria-current] { background: rgba(244, 238, 226, .14); box-shadow: inset 0 -2px 0 #e9b3a6; }
.tb-ribbon__age { font-size: .66rem; color: #e9b3a6; }
.tb-ribbon__age:empty { display: none; }
.tb-ribbon__years a.is-before { opacity: .38; }
.tb-ribbon__years a.is-in .tb-ribbon__y { color: #fff; text-decoration: underline; text-decoration-color: #e9b3a6; text-underline-offset: 3px; }
.tb-ribbon__tip { position: absolute; left: 50%; top: calc(100% + 6px); transform: translateX(-50%); white-space: nowrap; background: var(--card); color: var(--ink); border: 1px solid var(--rule); box-shadow: var(--shadow); padding: 7px 10px; font-size: .74rem; border-radius: 3px; opacity: 0; pointer-events: none; transition: opacity .12s; z-index: 60; }
.tb-ribbon__years a:hover .tb-ribbon__tip, .tb-ribbon__years a:focus-visible .tb-ribbon__tip { opacity: 1; }
.tb-ribbon__born { margin-left: auto; display: inline-flex; align-items: center; gap: 8px; color: rgba(244, 238, 226, .7); font-size: .7rem; text-transform: uppercase; letter-spacing: .08em; }
.tb-ribbon__born input { width: 76px; font: 500 .82rem var(--f-mono); padding: 4px 6px; border: 1px solid rgba(244, 238, 226, .35); background: rgba(244, 238, 226, .08); color: #fff; border-radius: 2px; }
.tb-ribbon__born input::placeholder { color: rgba(244, 238, 226, .4); }
@media (min-width: 1181px) { .tb-ribbon__in { overflow: visible; } }
@media (max-width: 1180px) {
	.tb-ribbon__tip { display: none; }
	.tb-ribbon__in { scroll-snap-type: x proximity; -webkit-mask-image: linear-gradient(90deg, #000 88%, transparent); mask-image: linear-gradient(90deg, #000 88%, transparent); padding-right: 40px; }
	.tb-ribbon__years li { scroll-snap-align: start; }
	.tb-ribbon__born { margin-left: 8px; }
	.tb-nav { inset: 108px 0 auto 0; }
}

/* frames & captions (illustrations are labelled as such) */
.tb-frame { background: var(--card); padding: 10px; border: 1px solid var(--rule); box-shadow: var(--shadow); }
.tb-frame img { display: block; width: 100%; height: auto; }
.tb-caption { font: 400 .74rem/1.4 var(--f-mono); letter-spacing: .04em; color: var(--ink-3); margin-top: 8px; }
.tb-afig .tb-caption { text-align: left; }

/* hero v2 */
.tb-hero { padding: clamp(32px, 5vw, 64px) 0 clamp(36px, 5vw, 64px); }
.tb-hero__in { grid-template-columns: minmax(0, 1.35fr) minmax(0, .65fr); align-items: start; }
.tb-hero__label { display: block; font: 500 .75rem/1 var(--f-mono); letter-spacing: .08em; text-transform: uppercase; color: var(--ink-2); margin-bottom: 8px; }
.tb-hero__search { display: block; margin: 26px 0 12px; }
.tb-hero__field { display: flex; gap: 8px; max-width: 560px; }
.tb-hero__field input { flex: 1; min-width: 0; font: inherit; font-size: 1.05rem; padding: 14px 16px; border: 1.5px solid var(--ink); background: var(--card); color: var(--ink); border-radius: var(--r); min-height: 52px; }
.tb-hero__field button { display: inline-flex; align-items: center; gap: 8px; font: 500 1rem/1 var(--f-text); padding: 0 20px; border: 1.5px solid var(--ink); background: var(--ink); color: var(--paper); border-radius: var(--r); cursor: pointer; min-height: 52px; }
.tb-hero__field button:hover { background: var(--wax); border-color: var(--wax); color: #fff; }
.tb-hero__person { font-size: .98rem; color: var(--ink-2); margin: 0 0 18px; }
.tb-pills { list-style: none; margin: 0; padding: 0; display: flex; flex-wrap: wrap; gap: 8px; }
.tb-pills a { display: inline-flex; align-items: center; min-height: 36px; padding: 6px 14px; border: 1px solid var(--ink-2); border-radius: 999px; font-size: .9rem; text-decoration: none; background: var(--card); }
.tb-pills a:hover { background: var(--ink); color: var(--paper); border-color: var(--ink); }
.tb-hero__side { display: grid; gap: 18px; }
.tb-hero__fig { margin: 0; max-width: 340px; justify-self: end; }
.tb-wordcard { background: var(--card); border: 1px solid var(--rule); border-top: 3px solid var(--wax); padding: 14px 16px 16px; max-width: 340px; justify-self: end; width: 100%; }
.tb-wordcard__lbl { font: 500 .7rem/1.2 var(--f-mono); letter-spacing: .08em; text-transform: uppercase; color: var(--ink-3); margin: 0 0 6px; }
.tb-wordcard__w { font: italic 600 1.5rem/1.1 var(--f-display); margin: 0 0 6px; }
.tb-wordcard__d { font-size: .95rem; line-height: 1.45; color: var(--ink-2); margin: 0 0 8px; }
.tb-wordcard a { font-size: .9rem; font-weight: 600; }
@media (max-width: 860px) { .tb-hero__in { grid-template-columns: 1fr; } .tb-hero__side { grid-template-columns: 1fr; } .tb-hero__fig { display: none; } .tb-wordcard { justify-self: start; max-width: none; } }
@media (max-width: 520px) { .tb-hero__field button span { display: none; } }

/* section rhythm */
.tb-section { padding: clamp(48px, 6.5vw, 96px) 0; }
.tb-situ { padding-top: clamp(40px, 5vw, 64px); }
.tb-me { padding: clamp(60px, 9vw, 140px) 0 clamp(60px, 8vw, 120px); }
.tb-sechead { margin-bottom: clamp(20px, 3vw, 32px); }

/* chooser v2 */
.tb-situ__grid { list-style: none; }
.tb-indexcard { padding: 20px 22px 18px; border-top: 3px solid var(--wax); gap: 0; }
.tb-indexcard::before, .tb-indexcard::after { display: none; }
.tb-indexcard__no { height: auto; margin-bottom: 8px; }
.tb-indexcard__q { font-size: 1.25rem; line-height: 1.2; margin: 0 0 8px; min-height: 0; }
.tb-indexcard__a { display: block; border: 0; padding: 0; margin: 0 0 16px; font-size: .98rem; color: var(--ink-2); }
.tb-indexcard__to { margin-top: auto; display: flex; align-items: center; gap: 8px; font: 500 .78rem/1.3 var(--f-mono); color: var(--wax); padding-top: 12px; border-top: 1px solid var(--rule); }
.tb-indexcard__to .tb-ico { width: 16px; height: 16px; transition: transform .18s; }
.tb-indexcard:hover .tb-indexcard__to .tb-ico { transform: translateX(3px); }
@media (max-width: 560px) {
	.tb-situ__grid { gap: 0; border-top: 2px solid var(--ink); }
	.tb-indexcard { box-shadow: none; border: 0; border-bottom: 1px solid var(--rule); background: transparent; padding: 14px 2px; display: grid; grid-template-columns: 30px 1fr 18px; align-items: center; }
	.tb-indexcard:hover { transform: none; box-shadow: none; }
	.tb-indexcard__no { margin: 0; }
	.tb-indexcard__q { font-size: 1.08rem; margin: 0; }
	.tb-indexcard__a { display: none; }
	.tb-indexcard__to { border: 0; padding: 0; margin: 0; font-size: 0; }
	.tb-indexcard__to .tb-ico { width: 18px; height: 18px; }
}

/* cabinet */
.tb-cabinet { background: var(--paper-2); }
.tb-cabinet__grid { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 16px; }
.tb-drawer { background: var(--card); border: 1px solid var(--rule); box-shadow: var(--shadow); display: block; }
.tb-drawer > summary { list-style: none; cursor: default; }
.tb-drawer > summary::-webkit-details-marker { display: none; }
.tb-drawer__front { display: flex; flex-direction: column; align-items: flex-start; gap: 10px; padding: 18px 18px 14px; text-align: left; background: color-mix(in srgb, var(--paper-2) 55%, var(--card)); border-bottom: 1px solid var(--rule); position: relative; }
.tb-drawer__front::after { content: ''; position: absolute; right: 18px; top: 24px; width: 34px; height: 12px; border: 2px solid var(--ink-3); border-top: 0; border-radius: 0 0 18px 18px; }
.tb-drawer__plate { background: var(--brass-flat); box-shadow: inset 0 0 0 1px rgba(60, 42, 12, .45), 0 1px 0 rgba(255, 255, 255, .35); padding: 8px 14px 8px 8px; font-size: .78rem; color: #21180a; }
.tb-drawer__plate::before, .tb-drawer__plate::after { width: 3px; height: 3px; background: rgba(33, 24, 10, .7); }
.tb-drawer__plate::before { left: 3px; top: 4px; margin: 0; }
.tb-drawer__plate::after { right: 3px; top: auto; bottom: 4px; margin: 0; }
.tb-drawer__ref { background: #21180a; color: #e6d3a8; }
.tb-drawer__count { font: 400 .74rem/1 var(--f-mono); color: var(--ink-3); }
.tb-drawer__pull { display: none; }
.tb-drawer__body { padding: 14px 18px 16px; display: flex; flex-direction: column; }
.tb-drawer__lead { font-size: .95rem; line-height: 1.45; color: var(--ink-2); margin: 0 0 10px; display: -webkit-box; -webkit-line-clamp: 3; -webkit-box-orient: vertical; overflow: hidden; }
.tb-drawer__list { padding: 0; margin: 0 0 10px; }
.tb-drawer__list a { font-size: .95rem; padding: 7px 0; }
.tb-drawer__all { margin-top: auto; display: inline-flex; align-items: center; gap: 6px; font-weight: 600; font-size: .92rem; text-decoration: none; color: var(--wax); }
.tb-drawer__all .tb-ico { width: 16px; height: 16px; }
.tb-drawer--tools .tb-drawer__plate { background: var(--ink); color: var(--paper); box-shadow: none; }
.tb-drawer--tools .tb-drawer__ref { background: var(--paper); color: var(--ink); }
.tb-drawer--tools .tb-drawer__plate::before, .tb-drawer--tools .tb-drawer__plate::after { background: var(--paper); }
@media (max-width: 1100px) { .tb-cabinet__grid { grid-template-columns: repeat(2, minmax(0, 1fr)); } }
@media (max-width: 640px) {
	.tb-cabinet__grid { grid-template-columns: 1fr; gap: 0; border-top: 2px solid var(--ink); }
	.tb-drawer { box-shadow: none; border: 0; border-bottom: 1px solid var(--rule); background: transparent; }
	.tb-drawer > summary { cursor: pointer; }
	.tb-drawer__front { flex-direction: row; align-items: center; justify-content: space-between; background: transparent; border: 0; padding: 14px 2px; min-height: 64px; }
	.tb-drawer__front::after { position: static; width: auto; height: auto; border: 0; content: '\25BE'; font-size: .9rem; color: var(--ink-3); transition: transform .15s; }
	.tb-drawer[open] .tb-drawer__front::after { transform: rotate(180deg); }
	.tb-drawer__count { margin-left: auto; margin-right: 12px; }
	.tb-drawer__body { padding: 0 2px 16px; }
	.tb-drawer__lead { display: none; }
}

/* tool band on paper: ledger card */
.tb-toolband { background: var(--paper); color: var(--ink); border-top: 1px solid var(--rule); }
.tb-toolband .tb-sechead p { color: var(--ink-2); }
.tb-toolband .tb-kv {
	border: 1px solid var(--rule); position: relative; padding-left: clamp(28px, 4vw, 44px);
	background: var(--card) repeating-linear-gradient(to bottom, transparent 0 27px, color-mix(in srgb, var(--rule) 80%, transparent) 27px 28px);
}
.tb-toolband .tb-kv::before { content: ''; position: absolute; top: 0; bottom: 0; left: clamp(14px, 2vw, 24px); width: 1.5px; background: color-mix(in srgb, var(--wax) 60%, transparent); }
.tb-toolband .tb-kv__out { background: var(--card); }
.tb-toollist { list-style: none; margin: 0; padding: 0; border-top: 2px solid var(--ink); }
.tb-toollist li { border-bottom: 1px solid var(--rule); }
.tb-toollist a { display: grid; grid-template-columns: 40px 1fr; gap: 14px; padding: 15px 4px; text-decoration: none; align-items: start; }
.tb-toollist a:hover strong { color: var(--wax); }
.tb-toollist strong { display: block; font: 600 1.1rem/1.25 var(--f-display); margin-bottom: 2px; }
.tb-toollist span { font-size: .95rem; line-height: 1.4; color: var(--ink-2); }
.tb-toolico { color: var(--wax); margin-top: 2px; }
@media (max-width: 560px) { .tb-kv--mini .tb-kv__row { grid-template-columns: 1fr 1fr; } .tb-kv--mini .tb-kv__row label:first-child { grid-column: 1 / -1; } }

/* latest + me */
.tb-list__d { font-size: .74rem; }
.tb-me__fig { margin: 0; }
.tb-me__fig .tb-caption { text-align: center; margin-top: 14px; }
.tb-me__links { display: flex; flex-wrap: wrap; gap: 14px 22px; align-items: center; }

/* article v2 */
.tb-ahead { padding-bottom: 18px; }
.tb-ahead__h { margin-bottom: 18px; }
.tb-byline { gap: 8px 16px; padding-top: 14px; }
.tb-byline__who img { width: 36px; height: 36px; }
.tb-byline__meta, .tb-srcline { font: 400 .8rem var(--f-mono); color: var(--ink-3); }
.tb-srcline { text-decoration: none; border-bottom: 1px dashed currentColor; }
.tb-srcline:hover { color: var(--wax); }
a.tb-stamp { text-decoration: none; animation: tb-stamp .2s ease-out 1 both; }
a.tb-stamp:hover { color: var(--wax-2); }
@keyframes tb-stamp { from { transform: scale(1.15) rotate(-8deg); opacity: 0; } to { transform: rotate(-4deg); opacity: .86; } }
.tb-disclose { margin: 14px 0 0; padding: 10px 14px; border: 1px solid var(--rule); border-left: 3px solid var(--ink); background: var(--card); font-size: .92rem; color: var(--ink-2); max-width: 720px; }
.tb-prose > p.tb-lead:first-child::first-letter { font: inherit; float: none; margin: 0; color: inherit; }
.tb-prose > p.tb-lead:first-child { font-size: 1.12em; }
.tb-kort { padding: 16px 22px 18px; border-top: 3px solid var(--wax); }
.tb-kort::before, .tb-kort::after { display: none; }
.tb-kort__label { margin-bottom: 8px !important; line-height: 1.3 !important; }
.tb-kort ul { list-style: none; padding: 0; margin: 0; }
.tb-kort li { margin: 0; padding: 9px 0 !important; border-top: 1px solid var(--rule) !important; line-height: 1.5; }
.tb-kort li:first-child { border-top: 0 !important; }
.tb-kort li > strong:first-child { display: block; font: 500 .72rem/1.3 var(--f-mono); letter-spacing: .06em; text-transform: uppercase; color: var(--ink-3); margin-bottom: 2px; }
.tb-actions { display: flex; flex-wrap: wrap; gap: 10px; margin: -1.2em 0 2em; padding: 14px 0 0; }
.tb-act { display: inline-flex; align-items: center; gap: 6px; min-height: 44px; padding: 10px 16px; border: 1.5px solid var(--ink); border-radius: var(--r); font: 600 .95rem/1.2 var(--f-text); text-decoration: none !important; color: var(--ink); background: var(--card); }
.tb-act--pri { background: var(--ink); color: var(--paper) !important; }
.tb-act:hover { background: var(--wax); border-color: var(--wax); color: #fff !important; }
.tb-prose a.tb-act::after { content: none !important; }
.tb-age { margin: -1em 0 2em; padding: 10px 14px; background: var(--paper-2); border: 1px dashed var(--ink-3); font-size: .95em; }
.tb-merk, .tb-felle { background: var(--card); border: 1px solid var(--rule); border-left: 3px solid var(--ink); }
.tb-felle { border-left-color: var(--wax); }
.tb-merk__label { color: var(--ink-2); }
.tb-steg > li { padding: 10px 0 14px 46px; border-top: 1px solid var(--rule); }
.tb-steg > li:last-child { border-bottom: 1px solid var(--rule); }
.tb-steg > li::before { content: '\00A7' counter(s); width: auto; height: auto; background: none; color: var(--wax); font: 500 .9rem/1 var(--f-mono); top: 15px; left: 2px; border-radius: 0; display: block; }
.tb-steg > li:not(:last-child)::after { display: none; }
.tb-prose a[href^="http"]:not([href*="tidsbildet.net"])::after { content: '\2009\2197'; font-size: .8em; color: var(--ink-3); }
.tb-kilder a[href^="http"]::after { content: none !important; }
.tb-log { margin-top: 2.4em; padding: 16px 18px; background: var(--card); border: 1px solid var(--rule); font-size: .9em; }
.tb-log h2 { font: 500 .78rem/1 var(--f-mono) !important; letter-spacing: .1em; text-transform: uppercase; border: 0 !important; padding: 0 !important; margin: 0 0 10px !important; }
.tb-log ol { list-style: none; padding: 0; margin: 0 0 8px; }
.tb-log time { font-family: var(--f-mono); font-size: .85em; color: var(--wax); margin-right: 8px; }
.tb-log p { margin: 0; color: var(--ink-2); }
.tb-printmeta { display: none; }
.tb-next { margin: 30px 0 10px; }
.tb-next > h2 { font: 500 .78rem/1 var(--f-mono); letter-spacing: .1em; text-transform: uppercase; color: var(--ink-2); margin-bottom: 12px; }
.tb-pn a { font-size: 1.15rem; padding: 18px 20px; }
.tb-cross { list-style: none; margin: 14px 0 0; padding: 0; display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 10px; }
.tb-cross a { display: flex; flex-direction: column; gap: 4px; padding: 12px 14px; border: 1px solid var(--rule); background: var(--card); text-decoration: none; font-weight: 600; line-height: 1.3; border-radius: var(--r); height: 100%; }
.tb-cross a span { font: 500 .68rem/1 var(--f-mono); letter-spacing: .08em; text-transform: uppercase; color: var(--wax); }
.tb-cross a:hover { border-color: var(--ink); }
@media (max-width: 700px) { .tb-cross { grid-template-columns: 1fr; } }

/* stacked tables on phones */
@media (max-width: 600px) {
	.tb-tabell { overflow: visible; border-bottom: 0; }
	.tb-tabell.is-scroll { box-shadow: none; }
	table.tb-stack thead, table.tb-ledger thead { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); }
	table.tb-stack, table.tb-stack tbody, table.tb-stack tr, table.tb-stack td, table.tb-ledger, table.tb-ledger tbody, table.tb-ledger tr, table.tb-ledger td { display: block; width: 100%; }
	table.tb-stack tr, table.tb-ledger tr { padding: 10px 0; border-bottom: 1px solid var(--ink-3); }
	table.tb-stack td, table.tb-ledger td { border: 0 !important; padding: 3px 0 !important; min-width: 0 !important; }
	table.tb-stack td::before, table.tb-ledger td::before { content: attr(data-label); display: block; font: 500 .68rem/1.3 var(--f-mono); letter-spacing: .06em; text-transform: uppercase; color: var(--ink-3); }
	table.tb-stack td[data-label=""]::before, table.tb-ledger td[data-label=""]::before, table.tb-ledger td[data-label="År"]::before { display: none; }
	table.tb-stack td:first-child { font-family: var(--f-display); font-size: 1.05em; }
}

/* hub ledger + cards */
.tb-ledger td { vertical-align: middle; }
.tb-ledger__y { font: 600 1.7rem/1 var(--f-display); text-decoration: none; }
.tb-ledger td:last-child a { white-space: nowrap; font-weight: 600; }
.tb-card__begin { margin-top: auto; font: 500 .74rem/1 var(--f-mono); letter-spacing: .06em; text-transform: uppercase; color: var(--wax); }
.tb-card--lead a { border-top: 3px solid var(--wax); }

/* footer census as an engraved rule */
.tb-foot__census { font: 400 .72rem/1 var(--f-mono); letter-spacing: .12em; color: rgba(244, 238, 226, .38); padding: 10px 0; margin-top: 34px; }

@media print {
	.tb-printmeta { display: block; font-size: 8pt; color: #555; margin-top: 12pt; border-top: 1px solid #999; padding-top: 6pt; }
	.tb-actions, .tb-age, .tb-log p, .tb-next, .tb-ribbon { display: none !important; }
	a.tb-stamp { animation: none; }
}

/* v2.1 */
.tb-kort li > strong:first-child { display: inline; font: inherit; letter-spacing: 0; text-transform: none; color: inherit; margin: 0; font-weight: 650; }
.tb-kort li > strong.tb-k { display: block; font: 500 .72rem/1.3 var(--f-mono); letter-spacing: .06em; text-transform: uppercase; color: var(--ink-3); margin-bottom: 2px; }
.tb-drawer__front::after { display: none; }
@media (max-width: 640px) { .tb-drawer__front::after { display: block; } }
.tb-afig--in { margin: 0 0 2em; max-width: none; padding: 0; }
@media (max-width: 600px) { .tb-tabell caption { display: block; width: 100%; } }

/* =====================================================================
   v3 – after final review
   ===================================================================== */
:root { --ink-3: #5f5a52; }
@media (prefers-color-scheme: dark) { :root:not([data-theme="light"]) { --ink-3: #b0a898; } }
.tb-foot__small, .tb-foot__bottom { color: rgba(244, 238, 226, .74); }
.tb-foot__census { color: rgba(244, 238, 226, .5); }
.tb-caption { color: var(--ink-2); }

/* stamp: readable */
.tb-stamp { font-size: .72rem; transform: rotate(-3deg); padding: 7px 11px; }
@keyframes tb-stamp { from { transform: scale(1.12) rotate(-7deg); opacity: 0; } to { transform: rotate(-3deg); opacity: .9; } }

/* ribbon form + targets */
.tb-ribbon__later a { color: rgba(244, 238, 226, .6) !important; }
.tb-ribbon__born { gap: 6px; }
.tb-ribbon__born label { color: rgba(244, 238, 226, .75); }
.tb-ribbon__born button { font: 500 .72rem var(--f-mono); padding: 5px 8px; border: 1px solid #e9b3a6; background: transparent; color: #e9b3a6; border-radius: 2px; cursor: pointer; white-space: nowrap; }
.tb-ribbon__born button:hover { background: #e9b3a6; color: #1c2329; }
.tb-ribbon__born input { width: 92px; }
@media (max-width: 1180px) {
	.tb-ribbon { font-size: .8rem; }
	.tb-ribbon__years a { min-height: 34px; align-items: center; padding: 6px 10px; }
	.tb-ribbon__born { display: none; }
}
.tb-nav__born { display: none; }
@media (max-width: 1180px) {
	.tb-nav__born { display: block; padding: 14px 4px; border-bottom: 1px solid var(--rule); }
	.tb-nav__born form { display: grid; grid-template-columns: 1fr auto; gap: 8px; align-items: end; }
	.tb-nav__born label { grid-column: 1 / -1; font: 500 .74rem var(--f-mono); letter-spacing: .08em; text-transform: uppercase; color: var(--ink-2); }
	.tb-nav__born input { font: inherit; padding: 10px 12px; border: 1.5px solid var(--ink-2); border-radius: var(--r); background: var(--card); color: var(--ink); min-width: 0; }
	.tb-nav__born button { font: 600 .95rem var(--f-text); padding: 10px 14px; border: 1.5px solid var(--ink); background: var(--ink); color: var(--paper); border-radius: var(--r); }
}

/* hub grids: no widows */
.tb-card--lead { grid-column: auto; }
@media (min-width: 900px) {
	.tb-cards { grid-template-columns: repeat(3, minmax(0, 1fr)); }
	.tb-cards > li:last-child:nth-child(3n+1) { grid-column: 1 / -1; }
	.tb-cards > li:nth-last-child(2):nth-child(3n+1), .tb-cards > li:nth-last-child(2):nth-child(3n+1) + li { grid-column: span 1; }
	.tb-cards > li:last-child:nth-child(3n+1) a { flex-direction: row; flex-wrap: wrap; align-items: baseline; gap: 6px 18px; }
	.tb-cards > li:last-child:nth-child(3n+1) .tb-card__x { flex: 1 1 420px; }
}
@media (min-width: 640px) and (max-width: 899px) {
	.tb-cards { grid-template-columns: repeat(2, minmax(0, 1fr)); }
	.tb-cards > li:last-child:nth-child(odd) { grid-column: 1 / -1; }
}

/* 2-column tables stack as term/definition without repeated labels */
@media (max-width: 600px) {
	table.tb-stack.tb-2col td::before { display: none; }
	table.tb-stack.tb-2col td:first-child { font-weight: 650; padding-bottom: 0 !important; }
	table.tb-stack.tb-2col td + td { color: var(--ink-2); }
}

/* in-article illustration: smaller, below section 1 */
.tb-afig--in { margin: 2.2em 0 1.4em; }
.tb-afig--in .tb-frame img { max-height: 340px; object-fit: cover; }

/* census direct search */
.tb-dasearch { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 10px; margin: 0 0 2em; padding: 16px 18px; background: var(--paper-2); border: 1px solid var(--rule); border-radius: var(--r); }
.tb-dasearch__h { grid-column: 1 / -1; font: 600 1.05rem/1.3 var(--f-display); margin: 0 !important; }
.tb-dasearch label { display: flex; flex-direction: column; gap: 4px; font: 500 .7rem/1.2 var(--f-mono); letter-spacing: .06em; text-transform: uppercase; color: var(--ink-2); }
.tb-dasearch input { font: 500 1rem var(--f-text); text-transform: none; padding: 9px 10px; border: 1.5px solid var(--ink-2); border-radius: var(--r); background: var(--card); color: var(--ink); min-width: 0; min-height: 44px; }
.tb-dasearch button { grid-column: 1 / -1; justify-self: start; font: 600 .95rem var(--f-text); padding: 11px 16px; border: 1.5px solid var(--ink); background: var(--ink); color: var(--paper); border-radius: var(--r); cursor: pointer; min-height: 44px; }
.tb-dasearch button:hover { background: var(--wax); border-color: var(--wax); }
.tb-dasearch__note { grid-column: 1 / -1; margin: 0 !important; font-size: .88rem; color: var(--ink-2); }
@media (max-width: 640px) { .tb-dasearch { grid-template-columns: 1fr 1fr; } }

/* tools trust line + copy */
.tb-toolmeta { font: 400 .8rem var(--f-mono); color: var(--ink-3); margin: 10px 0 0; display: flex; flex-wrap: wrap; gap: 6px 14px; align-items: center; }
.tb-toolmeta img { width: 28px; height: 28px; }
.tb-copy { margin-top: 14px; }
.tb-kv__default { display: block; }

.tb-ribbon__born input { width: 112px; }
