/* The Engineering Record — security-paper register.
   Palette: cool ledger paper, green-black ink, one seal green. No cream, no terracotta. */

:root {
  --paper: #f3f5f0;
  --paper-deep: #e4e9e0;
  --ink: #0f1f19;
  --ink-soft: #33443c;
  --seal: #17684b;
  --seal-faint: rgba(23, 104, 75, 0.14);
  --rule: #bfc9bc;

  --display: "Bodoni Moda", "Didot", "Bodoni 72", serif;
  --body: "Public Sans", "Segoe UI", sans-serif;

  --measure: 1180px;
  --gutter: clamp(1.25rem, 4vw, 3.5rem);
  --ease: cubic-bezier(0.16, 1, 0.3, 1);
}

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

html { -webkit-text-size-adjust: 100%; background: var(--paper); }

body {
  margin: 0;
  color: var(--ink);
  font: 400 1.0625rem/1.65 var(--body);
  font-variant-numeric: lining-nums;
  background-color: var(--paper);
  /* security-paper linework plus grain */
  background-image:
    url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='220' height='220'%3E%3Cfilter id='n'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='.85' numOctaves='2' stitchTiles='stitch'/%3E%3CfeColorMatrix values='0 0 0 0 0.06 0 0 0 0 0.12 0 0 0 0 0.1 0 0 0 .04 0'/%3E%3C/filter%3E%3Crect width='100%25' height='100%25' filter='url(%23n)'/%3E%3C/svg%3E"),
    repeating-linear-gradient(115deg, transparent 0 7px, rgba(23, 104, 75, 0.02) 7px 8px);
}

a { color: var(--seal); text-underline-offset: 0.2em; text-decoration-thickness: 1px; }
a:hover { text-decoration-thickness: 2px; }
:focus-visible { outline: 2px solid var(--seal); outline-offset: 3px; }

.skip { position: absolute; left: -999px; }
.skip:focus { left: 1rem; top: 1rem; background: var(--ink); color: var(--paper); padding: 0.5rem 0.9rem; z-index: 10; }

.sheet {
  max-width: var(--measure);
  margin: 0 auto;
  padding: 0 var(--gutter) 4rem;
  overflow-x: clip;
}

/* ---- Document bar ---- */
.docbar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
  padding: 1.1rem 0 0.9rem;
  border-bottom: 3px double var(--ink);
  font-size: 0.82rem;
  color: var(--ink-soft);
}
.docbar-mid { font-family: var(--display); font-style: italic; font-size: 1rem; color: var(--ink); }
.print-btn {
  font: inherit;
  color: var(--ink);
  background: transparent;
  border: 1px solid var(--ink);
  padding: 0.35rem 0.8rem;
  cursor: pointer;
  transition: background 180ms var(--ease), color 180ms var(--ease);
}
.print-btn:hover { background: var(--ink); color: var(--paper); }

/* ---- Cover ---- */
.cover {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(0, 27rem);
  grid-template-areas:
    "text seal"
    "ledger ledger";
  align-items: center;
  column-gap: 2rem;
  padding: clamp(2.5rem, 6vw, 5rem) 0 2.5rem;
}
.cover-text { grid-area: text; }
.cover-kicker { margin: 0 0 0.4rem; font-family: var(--display); font-style: italic; font-size: 1.25rem; color: var(--ink-soft); }
h1 {
  margin: 0;
  font-family: var(--display);
  font-optical-sizing: auto;
  font-weight: 500;
  font-size: clamp(3.4rem, 10vw, 8.25rem);
  line-height: 0.92;
  letter-spacing: -0.02em;
}
h1 em { font-style: italic; font-weight: 400; color: var(--seal); }
.cover-post { margin: 1.2rem 0 0; font-weight: 600; font-size: 1.05rem; }
.lede { max-width: 34rem; margin: 1.1rem 0 0; font-size: 1.2rem; line-height: 1.55; color: var(--ink-soft); }
.lede strong { color: var(--ink); font-weight: 600; }

.seal-wrap { grid-area: seal; margin: 0; justify-self: end; width: 100%; max-width: 27rem; }
#seal { display: block; width: 100%; height: auto; overflow: visible; }
#seal path { fill: none; stroke: var(--seal); vector-effect: non-scaling-stroke; }
#seal .ring-outer { stroke-width: 0.55; opacity: 0.85; }
#seal .petal { stroke-width: 0.5; opacity: 0.8; }
#seal .ring-inner { stroke-width: 0.5; }
.seal-rule { fill: none; stroke: var(--seal); stroke-width: 1.2; }
.seal-core { fill: var(--paper); stroke: var(--seal); stroke-width: 1.5; }
.seal-ring-text { font: 600 11.5px var(--body); letter-spacing: 0.21em; fill: var(--seal); }
.seal-initials { font-family: var(--display); font-style: italic; font-weight: 600; font-size: 44px; fill: var(--ink); }

.js #seal path {
  stroke-dasharray: 1;
  stroke-dashoffset: 1;
  animation: engrave 1.9s var(--ease) forwards;
  animation-delay: calc(var(--i) * 28ms);
}
.js .seal-ring-text, .js .seal-initials, .js .seal-rule { opacity: 0; animation: settle 900ms var(--ease) 1.1s forwards; }
@keyframes engrave { to { stroke-dashoffset: 0; } }
@keyframes settle { to { opacity: 1; } }

.ledger {
  grid-area: ledger;
  display: grid;
  grid-template-columns: 0.7fr 1.6fr 1.4fr 1.3fr;
  margin: 2.75rem 0 0;
  border-top: 1px solid var(--ink);
  border-bottom: 1px solid var(--ink);
}
.ledger > div { padding: 0.9rem 1rem 1rem; border-left: 1px solid var(--rule); }
.ledger > div:first-child { border-left: 0; padding-left: 0; }
.ledger dt { font-size: 0.8rem; color: var(--ink-soft); }
.ledger dd { margin: 0.25rem 0 0; font-weight: 600; line-height: 1.4; }
.ledger > div:first-child dd { font-family: var(--display); font-weight: 600; font-size: 2.3rem; line-height: 1; }

/* microprint: reads as a rule line, and the words are there if you lean in */
.microprint {
  margin: 0;
  font: 600 4.4px/1 var(--body);
  letter-spacing: 0.08em;
  color: var(--seal);
  white-space: nowrap;
  overflow: hidden;
  opacity: 0.75;
  user-select: none;
}

/* ---- Section heads ---- */
h2 {
  margin: 0 0 1.25rem;
  font-family: var(--display);
  font-weight: 500;
  font-size: clamp(1.9rem, 3.6vw, 2.6rem);
  line-height: 1.1;
}
.part {
  display: inline-block;
  margin-right: 0.5em;
  font-family: var(--body);
  font-size: 0.95rem;
  font-weight: 600;
  vertical-align: 0.55em;
  color: var(--seal);
}

/* ---- Legend ---- */
.legend { padding: 3.25rem 0 2.5rem; display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1.25fr); column-gap: 3rem; }
.legend h2 { grid-column: 1 / -1; }
.legend-text p { margin: 0 0 0.9rem; font-size: 1.15rem; color: var(--ink-soft); max-width: 27rem; }
.legend-text p:last-child { margin-bottom: 0; font-size: 1rem; }
.legend-list { list-style: none; margin: 0; padding: 0; display: grid; gap: 0.8rem; }
.legend-list li { display: grid; grid-template-columns: 1.6rem 1fr; align-items: baseline; }

.mark { width: 0.95rem; height: 0.95rem; border: 1.5px solid var(--seal); border-radius: 50%; transform: translateY(0.12rem); }
.mark-public { background: var(--seal); }
.mark-demo { background: linear-gradient(90deg, var(--seal) 50%, transparent 50%); }
.mark-ref { background: transparent; }

.band { display: block; width: 100%; height: 28px; }
.band path { fill: none; stroke: var(--seal); stroke-width: 0.6; vector-effect: non-scaling-stroke; opacity: 0.55; }

/* ---- Exhibits ---- */
.exhibits { padding: 3.25rem 0 1.5rem; }

.exhibit {
  display: grid;
  grid-template-columns: 7.5rem minmax(0, 1fr) 15rem;
  column-gap: 2rem;
  padding: 1.9rem 0 2.1rem;
  border-top: 1px solid var(--ink);
}
.exhibit:last-child { border-bottom: 1px solid var(--ink); }

.ex-num {
  margin: 0;
  font-family: var(--display);
  font-style: italic;
  font-weight: 400;
  font-size: 3.4rem;
  line-height: 0.9;
  color: var(--seal);
}
.ex-body h3 {
  margin: 0 0 0.75rem;
  font-family: var(--display);
  font-weight: 600;
  font-size: clamp(1.45rem, 2.5vw, 1.85rem);
  line-height: 1.2;
}
.ex-body ul { margin: 0; padding: 0; list-style: none; display: grid; gap: 0.55rem; }
.ex-body li { position: relative; padding-left: 1.1rem; color: var(--ink-soft); }
.ex-body li::before { content: ""; position: absolute; left: 0; top: 0.72em; width: 0.45rem; border-top: 1px solid var(--seal); }
.ex-body li strong { color: var(--ink); font-weight: 600; }

.ex-check {
  align-self: start;
  padding: 0.95rem 1rem 1rem;
  background: var(--seal-faint);
  border-left: 2px solid var(--seal);
  font-size: 0.93rem;
  line-height: 1.5;
}
.ex-check p { margin: 0; }
.ex-check .stamp-mark { margin: -0.2rem 0 0.6rem; }

/* rubber-stamp evidence label */
.stamp {
  display: inline-block;
  padding: 0.22rem 0.55rem 0.18rem;
  border: 2px solid var(--seal);
  border-radius: 3px;
  box-shadow: inset 0 0 0 1px var(--paper), inset 0 0 0 2.5px var(--seal);
  color: var(--seal);
  font: 700 0.74rem/1.2 var(--body);
  letter-spacing: 0.14em;
  text-transform: uppercase;
  transform: rotate(-3deg);
}
.stamp::before { content: ""; display: inline-block; width: 0.6rem; height: 0.6rem; margin-right: 0.45rem; border: 1.5px solid currentColor; border-radius: 50%; vertical-align: -0.02rem; }
.stamp-public::before { background: currentColor; }
.stamp-demo::before { background: linear-gradient(90deg, currentColor 50%, transparent 50%); }

/* reveal: the exhibit settles, then its stamp lands */
.js .reveal { opacity: 0; transform: translateY(18px); transition: opacity 700ms var(--ease), transform 700ms var(--ease); }
.js .reveal.is-in { opacity: 1; transform: none; }
.js .reveal .stamp-mark { opacity: 0; transform: rotate(var(--tilt)) scale(1.5); }
.js .reveal.is-in .stamp-mark { opacity: 0.94; transform: rotate(var(--tilt)); animation: stamp 420ms cubic-bezier(0.3, 1.5, 0.5, 1) 380ms backwards; }
@keyframes stamp {
  0% { opacity: 0; transform: rotate(calc(var(--tilt) - 8deg)) scale(1.5); }
  100% { opacity: 0.94; transform: rotate(var(--tilt)) scale(1); }
}

/* ---- Service record ---- */
.service { padding: 3.25rem 0 1rem; }
.register { width: 100%; border-collapse: collapse; font-variant-numeric: tabular-nums; }
.register th { text-align: left; font-size: 0.8rem; font-weight: 600; color: var(--ink-soft); padding: 0 1rem 0.6rem 0; border-bottom: 1px solid var(--ink); }
.register td { padding: 0.8rem 1rem 0.8rem 0; border-bottom: 1px solid var(--rule); vertical-align: top; }
.register td:first-child { white-space: nowrap; width: 11rem; color: var(--ink-soft); }
.register td:nth-child(2) { font-weight: 600; }
.edu { margin: 1.5rem 0 0; color: var(--ink-soft); }
.edu strong { color: var(--ink); }

/* ---- Competence ---- */
.competence { padding: 3rem 0 1rem; }
.comp { margin: 0; display: grid; gap: 0; }
.comp > div { display: grid; grid-template-columns: 11rem 1fr; padding: 0.7rem 0; border-bottom: 1px solid var(--rule); }
.comp > div:first-child { border-top: 1px solid var(--ink); }
.comp dt { font-weight: 600; }
.comp dd { margin: 0; color: var(--ink-soft); }

/* ---- Declaration ---- */
.declaration {
  position: relative;
  margin: 3.5rem 0 0;
  padding: 2.5rem clamp(1.25rem, 4vw, 3rem) 2.75rem;
  border: 3px double var(--ink);
  background: rgba(255, 255, 255, 0.35);
}
.decl-text { max-width: 36rem; margin: 0; font-family: var(--display); font-style: italic; font-size: clamp(1.35rem, 2.6vw, 1.75rem); line-height: 1.35; }
.signature { margin-top: 2.25rem; max-width: 20rem; border-top: 1px solid var(--ink); padding-top: 0.5rem; }
.sig-name { margin: 0; font-weight: 600; }
.sig-date { margin: 0; font-size: 0.85rem; color: var(--ink-soft); }
.stamp-seal {
  position: absolute;
  right: clamp(1rem, 5vw, 3.5rem);
  bottom: 2.25rem;
  padding: 0.75rem 1.1rem;
  font-size: 0.95rem;
  text-align: center;
  line-height: 1.3;
  transform: rotate(-8deg);
}
.stamp-seal::before { display: none; }
.js .declaration .stamp-seal { opacity: 0; }
.js .declaration.is-in .stamp-seal { animation: stamp-big 480ms cubic-bezier(0.3, 1.5, 0.5, 1) 600ms forwards; }
@keyframes stamp-big {
  0% { opacity: 0; transform: rotate(-16deg) scale(1.8); }
  100% { opacity: 0.92; transform: rotate(-8deg) scale(1); }
}

/* ---- Contact ---- */
.contact { padding: 3rem 0 2rem; }
.contact h2 { font-size: 1.6rem; margin-bottom: 0.75rem; }
.contact ul { list-style: none; margin: 0; padding: 0; display: flex; flex-wrap: wrap; gap: 0.5rem 2.5rem; }
.contact li span { display: block; font-size: 0.8rem; color: var(--ink-soft); }
.contact a { font-weight: 600; font-size: 1.05rem; }

/* ---- Narrow screens ---- */
@media (max-width: 900px) {
  .cover { grid-template-columns: 1fr; grid-template-areas: "seal" "text" "ledger"; }
  .seal-wrap { justify-self: start; max-width: 15rem; margin-bottom: 1.5rem; }
  .ledger { grid-template-columns: 1fr 1fr; }
  .ledger > div:nth-child(3) { border-left: 0; padding-left: 0; }
  .ledger > div:nth-child(n + 3) { border-top: 1px solid var(--rule); }
  .legend { grid-template-columns: 1fr; row-gap: 1.25rem; }
  .exhibit { grid-template-columns: 4.25rem minmax(0, 1fr); row-gap: 1.1rem; }
  .ex-num { font-size: 2.6rem; }
  .ex-check { grid-column: 2; }
}
@media (max-width: 560px) {
  .docbar-mid { display: none; }
  .ledger { grid-template-columns: 1fr; }
  .ledger > div { border-left: 0; padding-left: 0; }
  .ledger > div + div { border-top: 1px solid var(--rule); }
  .exhibit { grid-template-columns: 1fr; }
  .ex-num { font-size: 2.2rem; }
  .ex-check { grid-column: 1; }
  .register thead { display: none; }
  .register tr { display: grid; padding: 0.7rem 0; border-bottom: 1px solid var(--rule); }
  .register td { border: 0; padding: 0; }
  .comp > div { grid-template-columns: 1fr; }
  .stamp-seal { position: static; display: inline-block; margin-top: 1.75rem; }
}

@media (prefers-reduced-motion: reduce) {
  .js #seal path { animation: none; stroke-dashoffset: 0; }
  .js .seal-ring-text, .js .seal-initials, .js .seal-rule { animation: none; opacity: 1; }
  .js .reveal { opacity: 1; transform: none; transition: none; }
  .js .reveal .stamp-mark, .js .reveal.is-in .stamp-mark { animation: none; opacity: 1; transform: rotate(var(--tilt)); }
  .js .declaration .stamp-seal { animation: none; opacity: 0.92; transform: rotate(-8deg); }
}

/* ---- Print: A4, the record as a document ---- */
@page { size: A4; margin: 16mm 15mm 18mm; }
@media print {
  body { background: #fff; font-size: 10pt; }
  .sheet { max-width: none; padding: 0; }
  .print-btn, .skip, .band, .microprint { display: none; }
  .js #seal path, .js .seal-ring-text, .js .seal-initials, .js .seal-rule { animation: none; stroke-dashoffset: 0; opacity: 1; }
  .js .reveal { opacity: 1; transform: none; transition: none; }
  .js .reveal .stamp-mark, .js .declaration .stamp-seal { animation: none; opacity: 1; transform: rotate(var(--tilt, -8deg)); }
  .cover { padding: 8mm 0 4mm; grid-template-columns: 1fr 58mm; }
  h1 { font-size: 46pt; }
  .lede { font-size: 11pt; }
  .ledger { margin-top: 6mm; }
  .ledger > div:first-child dd { font-size: 20pt; }
  .legend, .exhibits, .service, .competence, .contact { padding-top: 7mm; }
  h2 { font-size: 18pt; margin-bottom: 4mm; }
  .exhibit { grid-template-columns: 16mm 1fr 46mm; column-gap: 5mm; padding: 4mm 0 5mm; break-inside: avoid; }
  .ex-num { font-size: 24pt; }
  .ex-body h3 { font-size: 13pt; }
  .ex-check { background: none; font-size: 8.5pt; }
  .register tr, .comp > div { break-inside: avoid; }
  .declaration { break-inside: avoid; background: none; margin-top: 8mm; }
  .service { break-before: page; }
  a { color: var(--ink); }
  .contact a::after { content: ""; }
}

/* ---- Schedule of works ---- */
.schedule { padding: 3.25rem 0 1rem; }
.sched-intro { margin: 0 0 1.25rem; color: var(--ink-soft); max-width: 38rem; }
.works { border-top: 1px solid var(--ink); }
.works:last-of-type { border-bottom: 1px solid var(--ink); }
.works summary {
  display: flex;
  align-items: baseline;
  gap: 0.75rem;
  padding: 0.9rem 0;
  cursor: pointer;
  list-style: none;
  font-family: var(--display);
  font-weight: 600;
  font-size: 1.3rem;
}
.works summary::-webkit-details-marker { display: none; }
.works summary::before {
  content: "+";
  display: inline-grid;
  place-items: center;
  width: 1.4rem;
  height: 1.4rem;
  border: 1px solid var(--seal);
  color: var(--seal);
  font: 500 1rem/1 var(--body);
  transition: transform 200ms var(--ease);
}
.works[open] summary::before { content: "−"; }
.works .count { margin-left: auto; font: 600 0.85rem var(--body); color: var(--seal); }
.works-table { margin-bottom: 1.25rem; font-size: 0.95rem; }
.works-table td:first-child { width: auto; white-space: normal; color: var(--ink); font-weight: 600; }
.works-table td:nth-child(2) { font-weight: 400; color: var(--ink-soft); }
.works-table td:nth-child(3) { color: var(--ink-soft); width: 30%; }
@media (max-width: 560px) {
  .works-table tr { gap: 0.15rem; }
  .works-table td:nth-child(3) { width: auto; font-size: 0.88rem; }
}
@media print {
  .works summary::before { display: none; }
  .works-table tr { break-inside: avoid; }
  .schedule { break-before: page; }
}

/* ---- Rubber-stamp evidence marks ---- */
.stamp-mark { width: 8.6rem; transform: rotate(var(--tilt)); opacity: 0.94; }
.stamp-svg { display: block; width: 100%; height: auto; overflow: visible; }
.stamp-svg .st-line { fill: none; stroke: var(--seal); stroke-width: 1.4; }
.stamp-svg .st-heavy { stroke-width: 3.2; }
.stamp-svg .st-fill { fill: var(--seal); }
.stamp-svg text { fill: var(--seal); text-anchor: middle; }
.stamp-svg .st-ring { font: 700 10.5px var(--body); letter-spacing: 0.06em; text-anchor: start; }
.stamp-svg .st-num { font: italic 600 30px var(--display); }
.stamp-svg .st-period { font: 700 12px var(--body); letter-spacing: 0.04em; }
.stamp-svg .st-fact { font: 600 9px var(--body); letter-spacing: 0.06em; text-transform: uppercase; }
@media (max-width: 900px) { .stamp-mark { width: 7.5rem; } }

/* ---- Stamps are buttons that open case files ---- */
button.stamp-mark {
  display: block;
  padding: 0;
  border: 0;
  background: none;
  cursor: pointer;
  border-radius: 50%;
  transition: transform 220ms var(--ease), filter 220ms var(--ease);
}
button.stamp-mark:hover, .js .reveal.is-in button.stamp-mark:hover { transform: rotate(0deg) scale(1.05); filter: drop-shadow(0 6px 10px rgba(15, 31, 25, 0.18)); }
button.stamp-mark:focus-visible { outline-offset: 4px; }
.file-link {
  display: inline-block;
  margin: 0.55rem 0 0.35rem;
  padding: 0;
  border: 0;
  background: none;
  font: 600 0.88rem var(--body);
  color: var(--seal);
  text-decoration: underline;
  text-underline-offset: 0.2em;
  cursor: pointer;
}
.file-link:hover { text-decoration-thickness: 2px; }

/* ---- Case file dialog ---- */
dialog.file {
  width: min(58rem, calc(100vw - 2rem));
  max-height: calc(100vh - 2rem);
  padding: 0;
  border: 0;
  background: transparent;
  color: var(--ink);
  overflow: visible;
}
dialog.file::backdrop { background: rgba(15, 31, 25, 0.55); backdrop-filter: blur(2px); }
dialog.file[open] { animation: file-out 380ms var(--ease); }
@keyframes file-out {
  from { opacity: 0; transform: translateY(28px) rotate(-1.2deg); }
  to { opacity: 1; transform: none; }
}
.file-sheet {
  position: relative;
  max-height: calc(100vh - 2rem);
  overflow-y: auto;
  padding: clamp(1.5rem, 4vw, 2.75rem);
  background-color: var(--paper);
  background-image: repeating-linear-gradient(115deg, transparent 0 7px, rgba(23, 104, 75, 0.035) 7px 8px);
  border: 3px double var(--ink);
  box-shadow: 0 1px 0 rgba(15, 31, 25, 0.25), 0 24px 60px rgba(8, 20, 15, 0.45);
}
.file-head { position: relative; padding-right: 10rem; min-height: 8.5rem; }
.file-tab { margin: 0; font-weight: 600; font-size: 0.85rem; color: var(--seal); }
.file-head h3 { margin: 0.2rem 0 0.6rem; font-family: var(--display); font-weight: 500; font-size: clamp(1.7rem, 3.4vw, 2.4rem); line-height: 1.1; }
.file-how { margin: 0; max-width: 34rem; color: var(--ink-soft); }
.file-how strong { color: var(--ink); }
.file-stamp { position: absolute; top: -0.5rem; right: -0.25rem; width: 9rem; transform: rotate(var(--tilt)); opacity: 0.94; }
dialog.file[open] .file-stamp { animation: stamp 440ms cubic-bezier(0.3, 1.5, 0.5, 1) 260ms both; }
.file-public { margin: 1rem 0 0; }
.file-public a { font-weight: 600; }
.file-table { margin-top: 1.5rem; font-size: 0.93rem; }
.file-table td { color: var(--ink-soft); }
.file-table td:first-child { width: 28%; white-space: normal; color: var(--ink); font-weight: 600; }
.file-table td:nth-child(2) { font-weight: 400; }
.file-ask { margin-top: 1.75rem; padding: 1.1rem 1.25rem; background: var(--seal-faint); border-left: 2px solid var(--seal); }
.file-ask h4 { margin: 0 0 0.5rem; font-family: var(--display); font-style: italic; font-weight: 500; font-size: 1.25rem; }
.file-ask ol { margin: 0; padding-left: 1.25rem; display: grid; gap: 0.35rem; }
.file-foot { margin: 1.5rem 0 0; text-align: right; }
.file-close {
  font: 600 0.95rem var(--body);
  color: var(--paper);
  background: var(--ink);
  border: 0;
  padding: 0.6rem 1.1rem;
  cursor: pointer;
  transition: background 180ms var(--ease);
}
.file-close:hover { background: var(--seal); }
@media (max-width: 640px) {
  .file-head { padding-right: 0; }
  .file-stamp { position: static; width: 6.5rem; margin: 0 0 0.75rem; }
  .file-table thead { display: none; }
  .file-table tr { display: grid; padding: 0.7rem 0; border-bottom: 1px solid var(--rule); }
  .file-table td { border: 0; padding: 0.1rem 0; width: auto !important; }
}
@media (prefers-reduced-motion: reduce) {
  dialog.file[open], dialog.file[open] .file-stamp { animation: none; }
  button.stamp-mark { transition: none; }
}
@media print {
  .file-link { display: none; }
  dialog.file { display: none; }
}
.ex-check { display: flex; flex-direction: column; align-items: flex-start; }
.ex-check .stamp-mark { margin-bottom: 0.85rem; }
.ex-check .file-link { order: 3; margin: 0.7rem 0 0; }

/* ---- Readability pass: sticky navigation, big figures, cards, timeline, chips ---- */
.docbar {
  position: sticky;
  top: 0;
  z-index: 5;
  margin: 0 calc(var(--gutter) * -1);
  padding-inline: var(--gutter);
  background: rgba(243, 245, 240, 0.92);
  backdrop-filter: blur(6px);
}
.docnav { display: flex; gap: 1.6rem; }
.docnav a { color: var(--ink); font-weight: 500; font-size: 0.92rem; text-decoration: none; padding: 0.2rem 0; border-bottom: 1.5px solid transparent; transition: color 160ms var(--ease), border-color 160ms var(--ease); }
.docnav a:hover { color: var(--seal); border-bottom-color: var(--seal); }
section[id], footer[id] { scroll-margin-top: 4.5rem; }

.ledger { grid-template-columns: repeat(4, minmax(0, 1fr)); }
.ledger > div { padding: 1.1rem 1.1rem 1.2rem; }
.ledger dt { font-weight: 600; letter-spacing: 0.02em; }
.ledger dd, .ledger > div:first-child dd { font-family: var(--body); font-size: 1rem; font-weight: 400; line-height: 1.45; }
.ledger .fig { display: block; margin-top: 0.35rem; font-family: var(--display); font-weight: 600; font-size: clamp(2.2rem, 4vw, 2.9rem); line-height: 1; color: var(--seal); }
.ledger .fig-note { display: block; margin-top: 0.5rem; font-size: 0.92rem; color: var(--ink-soft); }

.exhibits h2 { margin-bottom: 1.5rem; }
.exhibit {
  grid-template-columns: 5rem minmax(0, 1fr) 15rem;
  margin-bottom: 1.25rem;
  padding: 2rem 2rem 2.1rem;
  background: rgba(255, 255, 255, 0.6);
  border: 1px solid var(--rule);
  border-top: 3px solid var(--seal);
  border-radius: 4px;
  box-shadow: 0 1px 2px rgba(15, 31, 25, 0.05);
  transition: box-shadow 240ms var(--ease);
}
.exhibit:last-child { border-bottom: 1px solid var(--rule); }
.exhibit:hover { box-shadow: 0 10px 28px rgba(15, 31, 25, 0.1); }
.ex-body li { color: var(--ink-soft); line-height: 1.6; }
.ex-check { background: var(--paper); border-radius: 0 3px 3px 0; }

.service .register th:first-child, .service .register td:first-child { padding-left: 1.7rem; }
.service .register td:first-child { position: relative; }
.service .register td:first-child::before {
  content: "";
  position: absolute;
  left: 0.15rem;
  top: 1.15rem;
  width: 0.7rem;
  height: 0.7rem;
  border-radius: 50%;
  background: var(--paper);
  border: 2px solid var(--seal);
  z-index: 1;
}
.service .register td:first-child::after { content: ""; position: absolute; left: 0.47rem; top: 1.85rem; bottom: -1.2rem; width: 2px; background: rgba(23, 104, 75, 0.25); }
.service .register tbody tr:first-child td:first-child::before { background: var(--seal); box-shadow: 0 0 0 4px var(--seal-faint); }
.service .register tbody tr:last-child td:first-child::after { display: none; }

.works summary { transition: color 160ms var(--ease); }
.works summary:hover { color: var(--seal); }
.works-table tbody tr { transition: background 140ms var(--ease); }
.works-table tbody tr:hover { background: rgba(255, 255, 255, 0.7); }

.comp > div { padding: 0.95rem 0; align-items: start; }
.comp dt { padding-top: 0.25rem; }
.chips { list-style: none; margin: 0; padding: 0; display: flex; flex-wrap: wrap; gap: 0.45rem; }
.chips li { padding: 0.22rem 0.7rem; border: 1px solid var(--rule); border-radius: 999px; background: rgba(255, 255, 255, 0.65); color: var(--ink); font-size: 0.9rem; line-height: 1.45; }

@media (max-width: 900px) {
  .docnav { gap: 1rem; }
  .ledger { grid-template-columns: 1fr 1fr; }
  .exhibit { grid-template-columns: 3.5rem minmax(0, 1fr); padding: 1.5rem; }
}
@media (max-width: 760px) {
  .docnav { display: none; }
}
@media (max-width: 560px) {
  .ledger { grid-template-columns: 1fr; }
  .exhibit { grid-template-columns: 1fr; padding: 1.25rem 1.1rem; }
  .service .register td:first-child::before { top: 0.95rem; }
  .service .register td:first-child::after { display: none; }
  .service .register td:first-child { padding-left: 1.7rem; }
}
@media (prefers-reduced-motion: reduce) {
  .exhibit, .docnav a, .works summary, .works-table tbody tr { transition: none; }
}
@media print {
  .docbar { position: static; background: none; backdrop-filter: none; margin: 0; padding-inline: 0; }
  .docnav { display: none; }
  .exhibit { background: none; box-shadow: none; border-radius: 0; margin-bottom: 4mm; padding: 4mm; }
  .chips li { background: none; padding: 0.5mm 2mm; }
}

/* Name: low optical size keeps Bodoni's hairlines visible at display size */
h1 {
  font-optical-sizing: none;
  font-variation-settings: "opsz" 6;
  font-weight: 700;
  font-size: clamp(3.2rem, 9vw, 7.4rem);
  line-height: 0.95;
  letter-spacing: -0.015em;
}
h1 em { font-weight: 600; font-variation-settings: "opsz" 6; padding-left: 0.04em; }
@media print { h1 { font-size: 44pt; } }
.chips li::first-letter { text-transform: uppercase; }

/* ---- Balanced pass: plain paper and no motion clutter, but the seal, serif heads and stamps stay ---- */
html, body { background: #f6f7f3; background-image: none; }
.docbar { border-bottom: 1px solid var(--ink); background: rgba(246, 247, 243, 0.94); }
.docbar-mid { display: none; }
.print-btn { border-radius: 4px; }

.seal-wrap { max-width: 21rem; }
.cover { grid-template-columns: minmax(0, 1fr) minmax(0, 21rem); }
.ledger .fig { font-family: var(--body); font-weight: 700; }
.part { font-size: 0.8rem; vertical-align: 0.4em; }

.exhibit { background: rgba(255, 255, 255, 0.55); box-shadow: none; }
.exhibit:hover { box-shadow: none; }
.ex-num { font-size: 2.4rem; }
.ex-check { background: none; border-left: 1px solid var(--rule); border-radius: 0; }
.stamp-mark { width: 7rem; }
.ex-check .file-link { margin-top: 0.6rem; }

.chips li { background: none; }
.declaration { border: 1px solid var(--ink); background: none; }
.file-sheet { background-image: none; border: 1px solid var(--ink); }

/* one entrance only: the seal draws; exhibits and stamps are simply there */
.js .reveal { opacity: 1; transform: none; transition: none; }
.js .reveal .stamp-mark, .js .reveal.is-in .stamp-mark { opacity: 0.94; animation: none; transform: rotate(var(--tilt)); }
.js .declaration .stamp-seal { opacity: 0.92; animation: none; transform: rotate(-8deg); }
dialog.file[open] { animation: none; }

@media (max-width: 900px) {
  .cover { grid-template-columns: 1fr; }
  .seal-wrap { max-width: 12rem; }
}
