/* Chrome, rail, buttons, plates, data. Hover is opt-in; active always present. */

.mark__word { font-family: var(--sign); font-weight: 800; font-size: 29px; line-height: 1; letter-spacing: 0.02em; text-transform: uppercase; }
.mark__slot { font-family: var(--data); font-size: 11px; letter-spacing: 0.2em; white-space: nowrap; color: var(--fg-faint); text-transform: uppercase; }

.khead__no { font-family: var(--data); font-size: var(--t-caption); letter-spacing: 0.2em; color: var(--accent); }
.khead__title { font-family: var(--sign); font-weight: 700; font-size: 30px; text-transform: uppercase; letter-spacing: 0.04em; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }

/* Header actions are full-height slabs so they are trivially hittable. */
.slab {
  min-width: 210px;
  padding: 0 34px;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 14px;
  border-left: 1px solid var(--rule);
  font-family: var(--data);
  font-size: var(--t-caption);
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--fg-soft);
  transition: background var(--dur-fast) var(--ease-out), color var(--dur-fast) var(--ease-out);
}
.slab:active { background: var(--accent); color: var(--bg); }
@media (hover: hover) { .slab:hover { background: var(--bg-2); color: var(--fg); } }
.slab--accent { color: var(--accent); }
.slab--narrow { min-width: 0; padding: 0 26px; }

/* Corner brackets, drawn rather than iconographic. */
.slab__icon {
  width: 20px; height: 20px;
  border: 2px solid currentColor;
  border-radius: 2px;
  mask-image: linear-gradient(135deg, #000 0 34%, transparent 34% 66%, #000 66% 100%);
  -webkit-mask-image: linear-gradient(135deg, #000 0 34%, transparent 34% 66%, #000 66% 100%);
  flex: 0 0 auto;
}

/* ---- Chapter rail ---- */
.krail__list { flex: 1; display: flex; flex-direction: column; }

.chapbtn {
  position: relative;
  flex: 1;
  min-height: var(--touch-min);
  display: grid;
  grid-template-columns: 66px 1fr;
  align-items: center;
  text-align: left;
  padding: 0 26px 0 0;
  border-bottom: 1px solid var(--rule);
  color: var(--fg-faint);
  transition: color var(--dur-fast) var(--ease-out), background var(--dur-fast) var(--ease-out);
}
.chapbtn__no { font-family: var(--data); font-size: var(--t-caption); letter-spacing: 0.1em; text-align: center; }
.chapbtn__name { font-family: var(--sign); font-weight: 700; font-size: var(--t-chapter); text-transform: uppercase; letter-spacing: 0.03em; line-height: 1; }
.chapbtn__sub { display: block; font-family: var(--label); font-weight: 400; font-size: var(--t-caption); letter-spacing: 0; text-transform: none; color: var(--fg-faint); margin-top: 6px; }

.chapbtn::before {
  content: "";
  position: absolute;
  left: 0; top: 0; bottom: 0;
  width: 5px;
  background: var(--accent);
  transform: scaleY(0);
  transform-origin: top;
  transition: transform var(--dur-mid) var(--ease-out);
}
.chapbtn[aria-selected="true"] { color: var(--fg); background: var(--bg-2); }
.chapbtn[aria-selected="true"]::before { transform: scaleY(1); }
.chapbtn[aria-selected="true"] .chapbtn__no { color: var(--accent); }
.chapbtn:active { background: var(--bg-3); }
@media (hover: hover) { .chapbtn:hover { color: var(--fg); } }

.krail__foot { padding: 26px; border-top: 1px solid var(--rule); }

/* Chapter progress - the kiosk stand-in for a reading progress bar. */
.progress { display: flex; gap: 6px; margin-bottom: 14px; }
.progress__seg { height: 4px; flex: 1; background: var(--rule); transition: background var(--dur-mid) var(--ease-out); }
.progress__seg.is-done { background: var(--accent); }

/* ---- Photo plates ---- */
.plate {
  position: relative;
  overflow: hidden;
  background: var(--plate);
  flex: 1;
  min-height: 0;
}
.plate > img { width: 100%; height: 100%; object-fit: cover; }
.plate__cap {
  position: absolute;
  left: 0; right: 0; bottom: 0;
  padding: 20px 24px;
  font-family: var(--data);
  font-size: var(--t-tick);
  letter-spacing: 0.18em;
  text-transform: uppercase;
  color: #dfe6ee;
  background: linear-gradient(to top, rgba(4,6,10,0.86), transparent);
}
.plate--short { flex: 0 0 232px; }
.plate--band { flex: 0 0 172px; }
.plate--bleed { margin-right: calc(var(--gutter) * -1); }

/* ---- Copy blocks ---- */
.eyebrow { font-family: var(--data); font-size: var(--t-caption); letter-spacing: 0.26em; text-transform: uppercase; color: var(--accent); }
.headline { font-family: var(--sign); font-weight: 800; font-size: var(--t-huge); text-transform: uppercase; line-height: 0.9; letter-spacing: 0.004em; }
.headline--mega { font-size: var(--t-mega); }
.eyebrow + .headline, .eyebrow + .subhead { margin-top: 12px; }
.subhead { font-family: var(--sign); font-weight: 700; font-size: 44px; text-transform: uppercase; line-height: 0.98; letter-spacing: 0.02em; }
.lead { font-size: var(--t-lead); line-height: 1.4; color: var(--fg); }
.headline + .lead, .subhead + .lead { margin-top: 16px; }
.copy { font-size: var(--t-body); line-height: 1.54; color: var(--fg-soft); }
.copy + .copy { margin-top: 18px; }
.lead + .copy { margin-top: 22px; }
.copy + .pull, .lead + .pull { margin-top: 28px; }
.pull { font-size: 36px; line-height: 1.26; font-weight: 500; color: var(--fg); border-left: 5px solid var(--accent); padding-left: 30px; }

/* ---- Data strip: the specimen record ---- */
.record { display: grid; grid-template-columns: repeat(4, 1fr); border-top: 1px solid var(--rule); }
.record__cell { padding: 22px 20px 0 0; border-right: 1px solid var(--rule); }
.record__cell:last-child { border-right: 0; }
.record__k { font-family: var(--data); font-size: var(--t-tick); letter-spacing: 0.2em; text-transform: uppercase; color: var(--fg-faint); }
.record__v { font-family: var(--sign); font-weight: 700; font-size: 40px; text-transform: uppercase; line-height: 1; margin-top: 10px; }
.record__u { font-family: var(--data); font-size: var(--t-caption); color: var(--accent); margin-left: 8px; letter-spacing: 0.08em; }

/* Narrow columns get the unit on its own line rather than a wrapped key. */
.record--stack .record__k { min-height: 42px; }
.record--stack .record__v { font-size: 38px; }
.record--stack .record__u { display: block; margin-left: 0; margin-top: 8px; font-size: 15px; }
.record + .tick { display: block; margin-top: 18px; }

/* ---- Fact rows: the alternative to another grid of cards ---- */
.rows { border-top: 1px solid var(--rule); }
.row {
  display: grid;
  grid-template-columns: 92px 1fr;
  gap: 28px;
  padding: 21px 0;
  border-bottom: 1px solid var(--rule);
  align-items: start;
}
.row__n { font-family: var(--data); font-size: var(--t-caption); color: var(--accent); letter-spacing: 0.1em; padding-top: 6px; }
.row__t { font-family: var(--sign); font-weight: 700; font-size: 30px; text-transform: uppercase; letter-spacing: 0.02em; line-height: 1; }
.row__d { font-size: 22px; line-height: 1.46; color: var(--fg-soft); margin-top: 8px; }

/* Textured grain for tactile depth on plates and panels. */
.textured::before {
  content: "";
  position: absolute;
  inset: 0;
  z-index: 2;
  pointer-events: none;
  opacity: 0.042;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='180' height='180'%3E%3Cfilter id='n'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='0.85' numOctaves='3'/%3E%3C/filter%3E%3Crect width='180' height='180' filter='url(%23n)'/%3E%3C/svg%3E");
}
