/* Hollis Creek repair report. Five colours: backing blue, bond white, sticker yellow, Bates red, ink. */
@font-face { font-family: "Libre Caslon Text"; font-style: normal; font-weight: 400; font-display: swap; src: url("fonts/libre-caslon-text-latin-400-normal.woff2") format("woff2"); }
@font-face { font-family: "Libre Caslon Text"; font-style: italic; font-weight: 400; font-display: swap; src: url("fonts/libre-caslon-text-latin-400-italic.woff2") format("woff2"); }
@font-face { font-family: "Libre Caslon Text"; font-style: normal; font-weight: 700; font-display: swap; src: url("fonts/libre-caslon-text-latin-700-normal.woff2") format("woff2"); }
@font-face { font-family: "Archivo Narrow"; font-style: normal; font-weight: 500; font-display: swap; src: url("fonts/archivo-narrow-latin-500-normal.woff2") format("woff2"); }
@font-face { font-family: "Archivo Narrow"; font-style: normal; font-weight: 700; font-display: swap; src: url("fonts/archivo-narrow-latin-700-normal.woff2") format("woff2"); }
@font-face { font-family: "JetBrains Mono"; font-style: normal; font-weight: 500; font-display: swap; src: url("fonts/jetbrains-mono-latin-500-normal.woff2") format("woff2"); }
@font-face { font-family: "Hollis Serif KR"; font-style: normal; font-weight: 400; font-display: swap; src: url("fonts/noto-serif-kr-subset-400.woff2") format("woff2"); unicode-range: U+1100-11FF, U+3000-303F, U+3130-318F, U+AC00-D7A3; }
@font-face { font-family: "Hollis Serif KR"; font-style: normal; font-weight: 700; font-display: swap; src: url("fonts/noto-serif-kr-subset-700.woff2") format("woff2"); unicode-range: U+1100-11FF, U+3000-303F, U+3130-318F, U+AC00-D7A3; }
@font-face { font-family: "Hollis Sans KR"; font-style: normal; font-weight: 700; font-display: swap; src: url("fonts/noto-sans-kr-subset-700.woff2") format("woff2"); unicode-range: U+1100-11FF, U+3000-303F, U+3130-318F, U+AC00-D7A3; }

:root {
	--blue: #1f3a5f;
	--white: #ffffff;
	--yellow: #f2c230;
	--red: #b3261e;
	--ink: #20242a;
	/* Tints of ink and blue on white, for quiet text and rules. */
	--ink-soft: #4c5562;
	--rule: #d3d9e0;
	--tint: #eef1f5;
	--serif: "Libre Caslon Text", "Hollis Serif KR", Georgia, serif;
	--label: "Archivo Narrow", "Hollis Sans KR", "Arial Narrow", sans-serif;
	--mono: "JetBrains Mono", ui-monospace, Menlo, Consolas, monospace;
	--line: 28px;
	--measure: 40rem;
}

*, *::before, *::after { box-sizing: border-box; }

html { scroll-padding-top: 72px; -webkit-text-size-adjust: 100%; }
@media (prefers-reduced-motion: no-preference) { html.smooth { scroll-behavior: smooth; } }

body {
	margin: 0;
	background: var(--blue);
	color: var(--ink);
	font-family: var(--serif);
	font-size: 17px;
	line-height: var(--line);
	font-variant-numeric: tabular-nums;
}

::selection { background: var(--blue); color: var(--white); }

a { color: var(--blue); text-decoration-thickness: 1px; text-underline-offset: 0.2em; }
a:hover { text-decoration-thickness: 2px; }
:focus-visible { outline: 3px solid var(--blue); outline-offset: 2px; }
.top :focus-visible, .rail :focus-visible { outline-color: var(--yellow); }

.sr { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }
.mono { font-family: var(--mono); font-size: 13px; letter-spacing: 0; }

.skip {
	position: absolute; left: 16px; top: -48px; z-index: 20;
	background: var(--yellow); color: var(--ink); padding: 8px 14px;
	font-family: var(--label); font-weight: 700; text-transform: uppercase; letter-spacing: 0.08em;
}
.skip:focus { top: 8px; }

/* Top bar: the blue backing */
.top {
	position: sticky; top: 0; z-index: 10;
	display: flex; align-items: center; justify-content: space-between; gap: 8px 24px; flex-wrap: wrap;
	min-height: 56px; padding: 8px 40px;
	background: var(--blue); color: var(--white);
	font-family: var(--label); text-transform: uppercase; letter-spacing: 0.06em; font-size: 14px; line-height: 20px;
}
.top a { color: var(--white); text-decoration: none; }
.top a:hover { text-decoration: underline; }
.top-name { margin: 0; font-weight: 700; font-size: 16px; }
.top-links { display: flex; flex-wrap: wrap; align-items: center; gap: 4px 22px; }
.top-links .lang { border: 1px solid rgba(255, 255, 255, 0.6); padding: 5px 12px; min-height: 32px; display: inline-flex; align-items: center; letter-spacing: 0.02em; }

/* Layout */
.wrap { display: grid; grid-template-columns: 260px minmax(0, 1fr); align-items: start; }

/* Rail: tabbed exhibit index */
.rail {
	position: sticky; top: 56px; padding: 24px 0 32px 40px; color: var(--white);
	font-family: var(--label); max-height: calc(100vh - 56px); overflow: auto;
}
.rail-label { margin: 0 0 12px; font-size: 12px; line-height: 16px; letter-spacing: 0.12em; text-transform: uppercase; color: #c9d3e0; font-weight: 700; }
.rail-label + .tabs { margin-bottom: 26px; }
.tabs { list-style: none; margin: 0; padding: 0; }
.tab {
	display: flex; align-items: center; gap: 12px; min-height: 48px; padding: 10px 16px; margin-bottom: 6px;
	background: rgba(255, 255, 255, 0.08); color: var(--white); text-decoration: none;
	font-size: 16px; line-height: 20px; font-weight: 700; text-transform: uppercase; letter-spacing: 0.04em;
}
.tab:hover { background: rgba(255, 255, 255, 0.16); }
.tab[aria-current="true"] { background: var(--white); color: var(--blue); margin-right: -1px; }
.tab-letter { flex: none; display: grid; place-items: center; width: 28px; height: 28px; background: var(--yellow); color: var(--ink); font-size: 15px; }
.tab-count { margin-left: auto; font-weight: 500; font-size: 13px; }
.tab-plain { background: none; padding-left: 0; min-height: 36px; font-size: 14px; font-weight: 500; }
.tab-plain:hover { background: none; text-decoration: underline; }
.tab-plain[aria-current="true"] { background: none; color: var(--white); text-decoration: underline; margin-right: 0; }

/* The white bond page with its line-numbered margin */
.page {
	position: relative; background: var(--white); margin: 0 40px 40px 0;
	display: grid; grid-template-columns: 64px minmax(0, 1fr);
}
.page:focus { outline: none; }
.lines {
	white-space: pre; overflow: hidden; contain: size; /* the numbers never set the page height */
	padding: 40px 14px 0 0; border-right: 2px solid var(--red);
	font-family: var(--mono); font-size: 11px; line-height: var(--line); color: #66707c; text-align: right;
	user-select: none;
}
.sheet { padding: 40px 40px 48px; min-width: 0; }

/* Opening */
.opening { max-width: var(--measure); margin-bottom: 40px; }
h1 { font-size: 40px; line-height: 1.12; font-weight: 700; margin: 0 0 12px; letter-spacing: -0.01em; text-wrap: balance; }
.caption { margin: 0 0 20px; font-family: var(--label); font-size: 13px; line-height: 20px; letter-spacing: 0.12em; text-transform: uppercase; color: var(--blue); font-weight: 700; }
.owner p { font-size: 18px; line-height: var(--line); margin: 0 0 14px; }

/* Parts and groups */
.part { margin-top: 56px; }
.part:first-of-type { margin-top: 0; }
.part-title {
	display: flex; align-items: center; gap: 12px; margin: 0 0 24px; padding-bottom: 8px; border-bottom: 1px solid var(--rule);
	font-family: var(--label); font-size: 15px; line-height: 20px; letter-spacing: 0.12em; text-transform: uppercase; color: var(--blue); font-weight: 700;
}
.group-letter { display: grid; place-items: center; width: 28px; height: 28px; background: var(--blue); color: var(--white); }
.part > p { max-width: var(--measure); }

/* Exhibits */
.ex {
	display: grid; grid-template-columns: minmax(0, var(--measure)) 300px; gap: 0 0; justify-content: space-between;
	border-top: 2px solid var(--ink); padding-top: 18px; margin-bottom: 44px; scroll-margin-top: 72px;
}
.ex-main { padding-right: 32px; min-width: 0; }
.ex h3 { display: grid; grid-template-columns: auto minmax(0, 1fr); align-items: baseline; gap: 6px 14px; margin: 0 0 8px; font-size: 24px; line-height: 1.25; font-weight: 700; }
.ex-title { text-wrap: balance; }
/* Evidence pages: the sticker carries the exhibit number inside the heading, as on the report. */
.ev-h1 { display: grid; grid-template-columns: auto minmax(0, 1fr); align-items: baseline; gap: 6px 16px; }
.ev-h1 .stk { align-self: baseline; }
.stk {
	flex: none; display: inline-flex; gap: 6px; padding: 5px 10px; background: var(--yellow); border: 2px solid var(--ink); color: var(--ink);
	font-family: var(--label); font-size: 14px; line-height: 18px; letter-spacing: 0.08em; text-transform: uppercase; font-weight: 700; text-decoration: none;
}
.stk:hover { text-decoration: underline; }
.ex p { margin: 10px 0 14px; }
.lbl { font-family: var(--label); font-size: 12px; letter-spacing: 0.1em; text-transform: uppercase; font-weight: 700; color: var(--ink-soft); margin-right: 6px; }

table { border-collapse: collapse; width: 100%; font-size: 15px; line-height: 22px; }
th, td { border-bottom: 1px solid var(--rule); padding: 9px 8px 9px 0; text-align: left; vertical-align: top; }
thead th { font-family: var(--label); font-size: 12px; letter-spacing: 0.1em; text-transform: uppercase; color: var(--ink-soft); font-weight: 700; }
tbody th { font-weight: 400; }
.measures td { white-space: nowrap; width: 7.5em; }
.measures s { color: var(--red); text-decoration-thickness: 2px; }
.measures strong { font-weight: 700; }
.measures s, .measures strong { white-space: nowrap; }
.row-open td, .row-open th { background: var(--ink); color: var(--white); }
.lh-mark { color: var(--ink-soft); margin-left: 2px; }
.lh-note { font-size: 14px; line-height: 20px; color: var(--ink-soft); margin: 6px 0 0; }

.ex-aside { border-left: 1px solid var(--rule); padding: 0 0 0 28px; font-size: 14px; line-height: 21px; position: relative; padding-bottom: 32px; }
.ex-aside h4 { font-family: var(--label); font-size: 12px; line-height: 16px; letter-spacing: 0.12em; text-transform: uppercase; color: var(--ink-soft); margin: 16px 0 6px; font-weight: 700; }
.refs { list-style: none; margin: 0; padding: 0; }
.refs li { margin-bottom: 8px; }
.refs .mono { background: var(--tint); padding: 2px 5px; overflow-wrap: anywhere; }
.commit-subject, .test-note { display: block; color: var(--ink-soft); }
.trace { font-family: var(--label); font-size: 12px; letter-spacing: 0.08em; text-transform: uppercase; font-weight: 700; }

.stamp {
	display: inline-block; margin: 6px 0 4px; padding: 4px 10px; border: 3px solid var(--blue); color: var(--blue); transform: rotate(-4deg);
	font-family: var(--label); font-weight: 700; letter-spacing: 0.12em; text-transform: uppercase; font-size: 14px; line-height: 20px;
}
.stamp-open { background: var(--ink); border-color: var(--ink); color: var(--white); transform: none; }
.stamp-missing { border-style: dashed; color: var(--ink-soft); border-color: var(--ink-soft); transform: none; }
.ex-open { border-top-color: var(--red); }

.remeasure summary { cursor: pointer; font-family: var(--label); font-weight: 700; letter-spacing: 0.06em; text-transform: uppercase; font-size: 13px; color: var(--blue); min-height: 28px; display: inline-flex; align-items: center; }
.remeasure code { display: block; margin: 6px 0; padding: 6px 8px; background: var(--tint); overflow-wrap: anywhere; }
.remeasure p { margin: 0; color: var(--ink-soft); }

.bates { position: absolute; right: 0; bottom: 0; margin: 0 !important; font-family: var(--mono); font-size: 13px; color: var(--red); letter-spacing: 0.04em; }
/* The cover number sits at the foot of the first screen of the page; each exhibit carries its own. */
.cover-bates { margin: -24px 0 4px; text-align: right; font-family: var(--mono); font-size: 13px; color: var(--red); letter-spacing: 0.04em; }
.page-evidence > .bates { right: 20px; bottom: 18px; }

/* Evidence pages: the commit as recorded */
.code { font-family: var(--mono); font-size: 13px; line-height: 20px; background: var(--tint); padding: 14px 16px; margin: 0 0 20px; overflow-x: auto; white-space: pre; max-width: 100%; }
.code-message { white-space: pre-wrap; }
.diff .d-file { color: var(--blue); font-weight: 700; }
.diff .d-hunk { color: var(--ink-soft); }
.diff .d-add { color: var(--blue); }
.diff .d-add::selection, .diff .d-del::selection { background: var(--blue); color: var(--white); }
.diff .d-del { color: var(--red); }
.ev-note { color: var(--ink-soft); font-size: 15px; line-height: 22px; max-width: var(--measure); }
.ev-test + .ev-test { margin-top: 28px; }

/* Procedure, traces, sites */
.steps { counter-reset: step; list-style: none; margin: 0; padding: 0; max-width: 52rem; }
.steps li { display: grid; grid-template-columns: 15rem minmax(0, 1fr); gap: 4px 20px; padding: 12px 0; border-bottom: 1px solid var(--rule); }
.steps code { color: var(--blue); }
.runs { font-family: var(--mono); font-size: 13px; line-height: 20px; color: var(--ink-soft); }
.trace-table { max-width: 52rem; margin-bottom: 24px; }
.sub-label { font-family: var(--label); font-size: 12px; line-height: 16px; letter-spacing: 0.12em; text-transform: uppercase; color: var(--ink-soft); font-weight: 700; margin: 32px 0 10px; }
.table-scroll { max-width: 52rem; overflow-x: auto; }
.lh-table { min-width: 34rem; }
.lh-table s { color: var(--red); text-decoration-thickness: 2px; }
.lh-table td { white-space: nowrap; }
.trace-table td:last-child { white-space: nowrap; width: 6em; }
.trace-table .mono { overflow-wrap: anywhere; }
.refs .original { background: none; padding: 0; }
.caption .mono { text-transform: none; letter-spacing: 0; }
.original { quotes: '“' '”'; color: var(--ink-soft); font-size: 12px; display: block; margin-top: 2px; }
.repo-note { display: block; color: var(--ink-soft); font-size: 14px; }
.trace-table tr:target td { background: var(--tint); }
.site-links { list-style: none; padding: 0; margin: 0 0 24px; max-width: 52rem; }
.site-links li { padding: 10px 0; border-bottom: 1px solid var(--rule); }
.site-links .mono { color: var(--ink-soft); margin-left: 6px; }
.action {
	display: inline-flex; align-items: center; min-height: 48px; padding: 10px 20px; background: var(--yellow); border: 2px solid var(--ink); color: var(--ink);
	font-family: var(--label); font-weight: 700; letter-spacing: 0.08em; text-transform: uppercase; text-decoration: none;
}
.action:hover { text-decoration: underline; }

.foot { margin-top: 56px; padding-top: 16px; border-top: 1px solid var(--rule); font-size: 14px; line-height: 21px; color: var(--ink-soft); max-width: 52rem; }
.foot-data { overflow-wrap: anywhere; }

/* Narrower screens: the rail turns into a strip of tabs under the top bar */
@media (max-width: 1180px) {
	.ex { grid-template-columns: minmax(0, 1fr) 260px; }
}
@media (max-width: 960px) {
	html { scroll-padding-top: 120px; }
	.top { padding: 8px 16px; position: static; }
	.wrap { display: block; }
	.rail { position: sticky; top: 0; z-index: 9; max-height: none; padding: 8px 12px; background: var(--blue); display: flex; gap: 8px; overflow-x: auto; }
	.rail-label, .rail .tabs-plain { display: none; }
	.tabs { display: flex; gap: 6px; margin: 0 !important; }
	.tab { margin: 0; min-height: 44px; padding: 8px 12px; white-space: nowrap; font-size: 14px; }
	.tab-name { display: none; }
	.tab-count { margin-left: 4px; }
	.page { margin: 0; grid-template-columns: 34px minmax(0, 1fr); }
	.lines { padding: 24px 6px 0 0; font-size: 9px; }
	.sheet { padding: 24px 18px 40px 16px; }
	.ex { display: block; scroll-margin-top: 120px; }
	.ex-main { padding-right: 0; }
	.ex-aside { border-left: 0; border-top: 1px solid var(--rule); padding: 12px 0 32px; margin-top: 8px; }
	.steps li { grid-template-columns: 1fr; }
}
@media (max-width: 520px) {
	.ex h3, .ev-h1 { grid-template-columns: minmax(0, 1fr); }
	.ev-h1 .stk { justify-self: start; }
	.ex h3 .stk { justify-self: start; }
	h1 { font-size: 30px; }
	.owner p { font-size: 17px; }
	.ex h3 { font-size: 21px; }
	.measures td { width: auto; white-space: normal; }
	table { font-size: 14px; }
	.top-name { font-size: 15px; }
	.top-links { gap: 4px 14px; font-size: 13px; }
}

@media print {
	body { background: var(--white); }
	.top, .rail, .lines, .skip { display: none; }
	.wrap { display: block; }
	.page { margin: 0; display: block; }
	.ex { break-inside: avoid; }
}

:lang(ko) { word-break: keep-all; overflow-wrap: anywhere; }
.page-evidence { margin: 0 40px 40px; }
@media (max-width: 960px) { .page-evidence { margin: 0; } }
