/* Nabídka webu návštěvnické expozice - dossier stylesheet
   Contract: _spec/DESIGN.md (archival surveyor's dossier). */

:root {
  --paper: #f3eee1;
  --paper-2: #eae3cf;
  --ink: #262118;
  --ink-2: #6b6250;
  --rule: #cfc5aa;
  --gold: #a07d21;
  --gold-ink: #7a5e14;
  --gold-bright: #c9a227;
  --oxide: #8a4230;
  --shaft: #3a3226;
  --rail: 84px;
  --notes: 240px;
  --measure: 70ch;
}

* { box-sizing: border-box; }

html { scroll-behavior: smooth; }
@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  *, *::before, *::after { animation: none !important; transition: none !important; }
}

body {
  margin: 0;
  background: var(--paper);
  background-image: radial-gradient(rgba(58, 50, 38, 0.028) 1px, transparent 1px);
  background-size: 22px 22px;
  color: var(--ink);
  font-family: "Piazzolla", Georgia, serif;
  font-optical-sizing: auto;
  font-size: 17px;
  line-height: 1.62;
  -webkit-font-smoothing: antialiased;
}

/* ---------- the vein (left rail) ---------- */
.vein {
  position: absolute;
  top: 0;
  bottom: 0;
  left: calc(var(--rail) / 2);
  width: 2px;
  background: var(--rule);
  z-index: 0;
}
.vein-fill {
  position: absolute;
  top: 0; left: 0; right: 0;
  height: 0;
  background: var(--gold-bright);
}

.page { position: relative; }

/* ---------- shared section grid ---------- */
.sec, .cover-in, .foot-in {
  display: grid;
  grid-template-columns: var(--rail) minmax(0, var(--measure)) var(--notes);
  column-gap: 40px;
  max-width: calc(var(--rail) + 40px + 78ch + 40px + var(--notes));
  margin: 0 auto;
  padding: 0 24px;
}

.sec { padding-top: 64px; padding-bottom: 28px; position: relative; }

.sec > .num {
  grid-column: 1;
  justify-self: center;
  font-family: "IBM Plex Mono", ui-monospace, monospace;
  font-size: 13px;
  font-weight: 600;
  letter-spacing: 0.08em;
  color: var(--gold);
  background: var(--paper);
  padding: 6px 2px;
  position: relative;
  z-index: 1;
  align-self: start;
  margin-top: 6px;
}

.sec > .sbody { grid-column: 2; min-width: 0; }
.sec > .mn-col { grid-column: 3; min-width: 0; }

.sec h2 {
  font-size: 30px;
  font-variation-settings: "opsz" 28;
  font-weight: 620;
  line-height: 1.18;
  letter-spacing: -0.012em;
  margin: 0 0 6px;
  padding-top: 14px;
  border-top: 1px solid var(--rule);
}

.sec h3 {
  font-size: 19px;
  font-weight: 640;
  margin: 30px 0 4px;
}

p { margin: 12px 0; }
.lead { font-size: 19px; line-height: 1.55; }

a { color: var(--gold-ink); text-decoration: underline; text-decoration-thickness: 1px; text-underline-offset: 3px; }
a:hover { text-decoration-thickness: 2.5px; }

strong { font-weight: 660; }

ul { padding-left: 22px; margin: 12px 0; }
li { margin: 5px 0; }

/* margin notes */
.mn {
  font-family: "IBM Plex Mono", ui-monospace, monospace;
  font-size: 11.5px;
  line-height: 1.55;
  color: var(--ink-2);
  border-top: 1px solid var(--rule);
  padding-top: 8px;
  margin-bottom: 26px;
}
.mn b { color: var(--gold-ink); font-weight: 600; }

/* verdict + honesty marks */
.dia, .sq {
  display: inline-block;
  width: 8px; height: 8px;
  margin-right: 9px;
  vertical-align: 1px;
}
.dia { background: var(--gold-bright); transform: rotate(45deg); }
.sq { background: var(--oxide); }

/* operator placeholders - loud until sign-off */
mark.fill {
  background: transparent;
  color: var(--oxide);
  font-family: "IBM Plex Mono", ui-monospace, monospace;
  font-size: 0.85em;
  border: 1.5px dashed var(--oxide);
  padding: 1px 6px;
  white-space: nowrap;
}

/* ---------- cover ---------- */
.cover { padding: 72px 0 56px; border-bottom: 1px solid var(--rule); position: relative; }
.cover-in > .c-rail { grid-column: 1; }
.cover-in > .c-main { grid-column: 2; min-width: 0; }
.cover-in > .c-notes { grid-column: 3; }

.c-brand { display: flex; align-items: baseline; gap: 14px; margin-bottom: 46px; }
.c-brand svg { height: 17px; width: auto; color: var(--ink); }
.c-brand .kind {
  font-family: "IBM Plex Mono", ui-monospace, monospace;
  font-size: 11.5px;
  letter-spacing: 0.14em;
  color: var(--ink-2);
}

.c-seal {
  width: 14px; height: 14px;
  background: var(--gold-bright);
  transform: rotate(45deg);
  margin: 4px 0 30px 3px;
}

.cover h1 {
  font-size: clamp(38px, 6vw, 62px);
  line-height: 1.04;
  font-weight: 560;
  font-style: italic;
  font-variation-settings: "opsz" 30;
  letter-spacing: -0.018em;
  margin: 0 0 30px;
  max-width: 15ch;
  animation: rise 0.65s ease 0.08s both;
}

.cover .lead { animation: rise 0.65s ease 0.16s both; max-width: 62ch; }
.cover p { max-width: 62ch; }

.c-meta {
  margin-top: 40px;
  border-top: 1px solid var(--ink);
  animation: rise 0.65s ease 0.24s both;
}
.c-meta .row {
  display: grid;
  grid-template-columns: 200px 1fr;
  gap: 18px;
  padding: 9px 0;
  border-bottom: 1px solid var(--rule);
  font-family: "IBM Plex Mono", ui-monospace, monospace;
  font-size: 13px;
}
.c-meta .row .k { color: var(--ink-2); letter-spacing: 0.06em; }

@keyframes rise {
  from { opacity: 0.001; transform: translateY(8px); }
  to { opacity: 1; transform: none; }
}

/* ---------- ledger tables ---------- */
table { border-collapse: collapse; width: 100%; margin: 18px 0; }
th {
  font-family: "IBM Plex Mono", ui-monospace, monospace;
  font-size: 11.5px;
  font-weight: 600;
  letter-spacing: 0.07em;
  text-align: left;
  color: var(--ink-2);
  background: var(--paper-2);
  padding: 8px 12px;
  border-top: 1px solid var(--ink);
  border-bottom: 1px solid var(--rule);
}
td {
  padding: 9px 12px;
  border-bottom: 1px solid var(--rule);
  vertical-align: top;
  font-size: 15.5px;
}
td.fig, th.fig { font-family: "IBM Plex Mono", ui-monospace, monospace; font-size: 13.5px; white-space: nowrap; }
.tbl-wrap { overflow-x: auto; }

/* ---------- schematic (03) ---------- */
.schematic {
  margin: 26px 0 10px;
  border: 1px solid var(--rule);
  background: var(--paper-2);
  padding: 10px;
}
.schematic svg { display: block; width: 100%; height: auto; }
.schematic figcaption {
  font-family: "IBM Plex Mono", ui-monospace, monospace;
  font-size: 11.5px;
  color: var(--ink-2);
  padding: 8px 6px 2px;
}

/* ---------- specimen card (07) ---------- */
.specimen {
  display: grid;
  grid-template-columns: 168px 1fr;
  gap: 24px;
  align-items: center;
  border: 1px solid var(--shaft);
  outline: 1px solid var(--rule);
  outline-offset: 4px;
  background: var(--paper-2);
  padding: 22px;
  margin: 28px 0;
  box-shadow: 0 1px 0 rgba(58, 50, 38, 0.18);
  transition: box-shadow 0.25s ease;
}
.specimen:hover { box-shadow: 0 6px 22px -8px rgba(58, 50, 38, 0.35); }
.specimen .qr { background: #fff; padding: 12px; border: 1px solid var(--rule); }
.specimen .qr svg { display: block; width: 100%; height: auto; }
.specimen .cap { font-family: "IBM Plex Mono", ui-monospace, monospace; font-size: 12.5px; line-height: 1.6; color: var(--ink-2); }
.specimen .cap .t { color: var(--ink); font-weight: 600; letter-spacing: 0.1em; display: block; margin-bottom: 8px; }

/* demo credentials block (06) */
.creds {
  font-family: "IBM Plex Mono", ui-monospace, monospace;
  font-size: 13px;
  background: var(--paper-2);
  border-left: 3px solid var(--gold-bright);
  padding: 14px 18px;
  margin: 20px 0;
}
.creds div { padding: 2px 0; }

/* ---------- footer ---------- */
.foot { margin-top: 80px; background: var(--shaft); color: var(--paper); }
.foot-in { padding-top: 44px; padding-bottom: 52px; }
.foot-in > div { grid-column: 2; }
.foot svg { height: 15px; width: auto; color: var(--paper); }
.foot p { color: var(--paper-2); font-size: 14.5px; max-width: 62ch; }
.foot a { color: var(--gold-bright); }
.foot .fnote { font-family: "IBM Plex Mono", ui-monospace, monospace; font-size: 11.5px; color: rgba(243, 238, 225, 0.55); margin-top: 26px; }

/* ---------- responsive ---------- */
@media (max-width: 1279px) {
  .sec, .cover-in, .foot-in { grid-template-columns: 64px minmax(0, 1fr); --rail: 64px; }
  .sec > .mn-col, .cover-in > .c-notes { grid-column: 2; display: flex; flex-wrap: wrap; gap: 18px; }
  .mn { max-width: 300px; margin-bottom: 8px; }
  .vein { left: 32px; }
}

@media (max-width: 640px) {
  body { font-size: 16px; }
  .sec, .cover-in, .foot-in { grid-template-columns: 1fr; padding: 0 20px; }
  .sec { padding-top: 46px; }
  .sec > .num { grid-column: 1; justify-self: start; margin: 0 0 2px; padding: 0; }
  .sec > .sbody, .sec > .mn-col, .cover-in > .c-main, .cover-in > .c-notes, .foot-in > div { grid-column: 1; }
  .vein { display: none; }
  .c-meta .row { grid-template-columns: 1fr; gap: 2px; }
  .specimen { grid-template-columns: 1fr; justify-items: start; }
  .specimen .qr { width: 168px; }
  .sec h2 { font-size: 25px; }
}

/* ---------- print ---------- */
@media print {
  @page { size: A4; margin: 18mm 16mm; }
  body { background: #fff; color: #000; font-size: 11.5pt; }
  .vein, .c-seal { display: none; }
  .sec, .cover-in, .foot-in { grid-template-columns: 1fr; max-width: none; padding: 0; }
  .sec > .num { justify-self: start; background: none; }
  .sec > .mn-col { display: block; }
  .foot { background: none; color: #000; }
  .foot p, .foot .fnote { color: #333; }
  .foot svg { color: #000; }
  a { color: #000; }
  main a[href^="http"]::after {
    content: " (" attr(href) ")";
    font-family: "IBM Plex Mono", monospace;
    font-size: 8.5pt;
    color: #555;
  }
  .sec { break-inside: avoid-page; padding-top: 28px; }
  mark.fill { color: #8a4230; border-color: #8a4230; }
}
