/* ============================================================
   TECHNOVIOUS · technovious.org
   Field-archive stylesheet. Paper, ink, two typefaces.
   ============================================================ */

:root {
  --paper:   #f0ead9;
  --paper-2: #e6dec6;
  --card:    #f7f2e3;
  --ink:     #262014;
  --ink-2:   #5d5443;
  --rule:    #cdc3a8;
  --rule-2:  #b0a47c;
  --oxide:   #94381f;
  --moss:    #3f5e45;
  --desk:    #2c1a0c;
  --desk-2:  #3d2814;
  --under-1: #e9e0c8;
  --under-2: #dcd1b2;
  --serif: "Spectral", Georgia, "Times New Roman", serif;
  --mono: "IBM Plex Mono", Consolas, "Courier New", monospace;
  --grain: 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='.85' numOctaves='2' stitchTiles='stitch'/%3E%3C/filter%3E%3Crect width='180' height='180' filter='url(%23n)' opacity='.05'/%3E%3C/svg%3E");
}

* { box-sizing: border-box; }

html {
  /* base desk tone on the canvas so overscroll and URL-bar resize match */
  background-color: var(--desk);
  background-image: linear-gradient(100deg, var(--desk-2) 0%, var(--desk) 48%, #241405 100%);
  scroll-behavior: smooth;
}

body {
  margin: 0;
  color: var(--ink);
  font: 400 17px/1.68 var(--serif);
  /* must stay transparent: an opaque body background would paint over the
     negative z-index desk pseudo and the under-sheets */
  background: transparent;
  overflow-x: hidden;
  overflow-x: clip;
  -webkit-font-smoothing: antialiased;
}

/* ------------------------------------------------------------
   the desk: dark walnut, long grain, a lamp from above
   (fixed pseudo so the paper slides over it on scroll)
   ------------------------------------------------------------ */

body::before {
  content: "";
  position: fixed;
  inset: 0;
  z-index: -4;
  background-color: var(--desk);
  background-image:
    /* vignette: the lamp only reaches so far */
    radial-gradient(ellipse 150% 120% at 50% 42%, transparent 50%, rgba(7, 3, 0, .6) 100%),
    /* lamp glow from above */
    radial-gradient(ellipse 120% 90% at 50% -15%, rgba(255, 213, 150, .15), transparent 58%),
    /* baked walnut veneer (regenerate via _build/wood.html) */
    url("wood.jpg");
  background-size: auto, auto, cover;
  background-position: center;
}

/* leather blotter pad under the paperwork, tooled edge and all.
   only shown once it clears the sheet by a readable margin */
@media (min-width: 1020px) {
  body::after {
    content: "";
    position: fixed;
    z-index: -3;
    top: 16px;
    bottom: 16px;
    left: 50%;
    width: min(61rem, calc(100% - 4rem));
    transform: translateX(-50%);
    background-color: #2d140b;
    background-image:
      var(--grain),
      radial-gradient(ellipse 130% 110% at 50% 35%, rgba(130, 58, 32, .32), transparent 72%);
    border: 3px double rgba(196, 158, 95, .34);
    border-radius: 5px;
    box-shadow:
      inset 0 0 52px rgba(0, 0, 0, .5),
      0 3px 18px rgba(0, 0, 0, .5);
  }
}

/* ------------------------------------------------------------
   the record: the page is the top sheet of a small stack
   ------------------------------------------------------------ */

.stack {
  position: relative;
  width: min(53rem, calc(100% - clamp(1.4rem, 6vw, 5rem)));
  margin: clamp(3.2rem, 5vw, 4rem) auto clamp(2.4rem, 6vw, 4.5rem);
}

.stack::before,
.stack::after {
  content: "";
  position: absolute;
  inset: 0;
  pointer-events: none;
}
/* rotation is kept small because these pseudos are as tall as the page:
   the horizontal swing grows with height (~h/2 x sin) */
.stack::before {
  z-index: -1;
  transform: rotate(.18deg) translate(8px, 10px);
  background: var(--under-1);
  box-shadow: 0 8px 22px rgba(10, 5, 1, .4);
}
.stack::after {
  z-index: -2;
  transform: rotate(-.28deg) translate(-10px, 18px);
  background: var(--under-2);
  box-shadow: 0 14px 32px rgba(10, 5, 1, .45);
}

.sheet {
  position: relative;
  display: flex;
  flex-direction: column;
  min-height: 80vh;
  background-color: var(--paper);
  box-shadow:
    inset 0 1px 0 rgba(255, 252, 240, .55),
    0 1px 3px rgba(15, 8, 2, .3),
    0 22px 50px -14px rgba(10, 5, 1, .6);
  animation: sheet-place .5s cubic-bezier(.2, .75, .3, 1) both;
}
.sheet > main { flex: 1; }

/* one grain pass over the whole sheet, cards and figures included */
.sheet::after {
  content: "";
  position: absolute;
  inset: 0;
  z-index: 5;
  pointer-events: none;
  background-image: var(--grain);
  opacity: .5;
}

/* each page load reads as the next record laid onto the pile */
@keyframes sheet-place {
  0% { opacity: 0; transform: translateY(-18px); }
  55% { opacity: 1; }
  100% { opacity: 1; transform: none; }
}

::selection { background: var(--oxide); color: var(--paper); }

h1, h2, h3, h4, h5 { font-family: var(--serif); line-height: 1.15; margin: 0; }

p { margin: 0 0 1.1em; }

a { color: inherit; text-decoration: underline; text-decoration-color: var(--rule-2); text-underline-offset: .22em; }
a:hover { color: var(--oxide); text-decoration-color: currentColor; }

strong { font-weight: 600; }

button { font: inherit; color: inherit; }

img { max-width: 100%; height: auto; display: block; }

:focus-visible {
  outline: 2px dashed var(--oxide);
  outline-offset: 3px;
}

.visually-hidden {
  position: absolute; width: 1px; height: 1px;
  clip-path: inset(50%); overflow: hidden; white-space: nowrap;
}

.skip {
  position: absolute; left: 1rem; top: -3rem;
  z-index: 100; padding: .5rem .9rem;
  background: var(--ink); color: var(--paper);
  border: 1px solid var(--paper);
  font: 500 12px var(--mono); letter-spacing: .08em;
  transition: top .15s;
}
.skip:focus { top: 1rem; color: var(--paper); }

/* ------------------------------------------------------------
   top bar + folder tabs
   ------------------------------------------------------------ */

.topbar {
  position: relative;
  border-top: 3px double var(--ink);
  border-bottom: 1px solid var(--rule-2);
}

.topbar-inner {
  padding: 0 1.4rem;
}

.sitemark {
  display: inline-block;
  font: 600 12px/1 var(--mono);
  letter-spacing: .22em;
  text-transform: uppercase;
  text-decoration: none;
  padding: .95rem 0;
  color: var(--ink-2);
}
.sitemark b { color: var(--ink); font-weight: 600; }
.sitemark:hover { color: var(--oxide); }

/* index tabs poke up from the top edge of the record */
.tabs {
  position: absolute;
  right: 1.1rem;
  bottom: 100%;
  display: flex;
  gap: .4rem;
  align-items: flex-end;
  width: max-content;
}

.tabs a {
  font: 500 11px/1 var(--mono);
  letter-spacing: .13em;
  text-transform: uppercase;
  text-decoration: none;
  padding: .68rem .85rem .58rem;
  border: 1px solid var(--rule-2);
  border-bottom: none;
  background: var(--under-2);
  color: var(--ink-2);
  box-shadow: 0 -2px 6px rgba(15, 8, 2, .12);
}
.tabs a .tab-no { color: var(--oxide); font-weight: 600; margin-right: .35em; }
.tabs a:hover { background: var(--card); color: var(--ink); }
.tabs a[aria-current="page"] {
  background: var(--paper);
  color: var(--ink);
  font-weight: 600;
  border-color: var(--ink);
  padding-top: .8rem;
}
/* the dashed oxide outline vanishes against dark wood; tabs sit on the desk */
.tabs a:focus-visible {
  outline: 2px solid var(--paper);
  outline-offset: 2px;
}

/* ------------------------------------------------------------
   page column + hero
   ------------------------------------------------------------ */

.page {
  max-width: 46rem;
  margin-inline: auto;
  padding: 0 1.25rem 4rem;
}

.hero {
  padding: 4.2rem 0 1rem;
  position: relative;
}

.hero h1 {
  font-size: clamp(1.7rem, 8.6vw, 4.2rem);
  font-weight: 700;
  letter-spacing: .015em;
  text-transform: uppercase;
}

.hero .sub {
  font-style: italic;
  font-size: 1.22rem;
  color: var(--ink-2);
  margin: .9rem 0 0;
}

.hero-stamp {
  position: absolute;
  right: 0;
  bottom: .4rem;
}

/* rubber stamp */
.stamp {
  display: inline-block;
  font: 600 12px/1 var(--mono);
  letter-spacing: .3em;
  text-transform: uppercase;
  color: var(--oxide);
  border: 2px solid currentColor;
  padding: .62em .55em .62em .85em;
  transform: rotate(-2.5deg);
  position: relative;
  opacity: .92;
}
.stamp::after {
  content: "";
  position: absolute;
  inset: 3px;
  border: 1px solid currentColor;
  opacity: .5;
}

/* ------------------------------------------------------------
   sections, greek-letter rules, margin labels
   ------------------------------------------------------------ */

section { position: relative; }

.sec-rule {
  display: flex;
  align-items: center;
  gap: 1.1rem;
  margin: 3.6rem 0 2rem;
  color: var(--ink-2);
}
.sec-rule::before, .sec-rule::after {
  content: "";
  height: 1px;
  background: var(--rule-2);
  flex: 1;
}
.sec-rule .g {
  font: 600 1.15rem/1 var(--serif);
  color: var(--oxide);
}
.sec-rule .g-label {
  font: 500 11px/1 var(--mono);
  letter-spacing: .26em;
  text-transform: uppercase;
}

.sub-rule {
  border: none;
  border-top: 1px dotted var(--rule-2);
  margin: 3rem 0 2rem;
}

h2 {
  font-size: 1.85rem;
  font-weight: 600;
  margin-bottom: .35em;
}

.h-row {
  display: flex;
  align-items: baseline;
  gap: .9rem;
  flex-wrap: wrap;
}

.badge {
  font: 500 11px/1 var(--mono);
  letter-spacing: .16em;
  text-transform: uppercase;
  border: 1px solid var(--rule-2);
  background: var(--paper-2);
  color: var(--ink-2);
  padding: .42em .6em;
  white-space: nowrap;
}

.lede {
  color: var(--ink-2);
  font-style: italic;
}

.bio {
  font-size: 1.13rem;
}

/* IRL aside */
.note {
  margin: 1.8rem 0 1.6rem;
  padding: 1.05rem 1.25rem .35rem;
  background: var(--card);
  border: 1px solid var(--rule);
  border-left: 3px solid var(--oxide);
}
.note-h {
  font: 600 11px/1 var(--mono);
  letter-spacing: .2em;
  text-transform: uppercase;
  color: var(--oxide);
  margin-bottom: .8em;
}

/* ------------------------------------------------------------
   contact ledger
   ------------------------------------------------------------ */

.ledger {
  margin: 1.6rem 0 0;
  border-top: 1px solid var(--rule-2);
}

.ledger-row {
  border-bottom: 1px solid var(--rule);
  padding: 1.05rem .35rem 1.1rem;
}
.ledger-row:hover { background: var(--card); }

.lr-top {
  display: flex;
  align-items: baseline;
  gap: .8rem;
  flex-wrap: wrap;
}

.lr-label {
  font: 600 12px/1.4 var(--mono);
  letter-spacing: .14em;
  text-transform: uppercase;
  min-width: 8.5rem;
}

.lr-leader {
  flex: 1;
  min-width: 2rem;
  border-bottom: 1px dotted var(--rule-2);
  align-self: center;
  height: .7em;
}

.lr-value {
  font-size: 1.08rem;
  font-weight: 600;
  letter-spacing: .01em;
}
.lr-value a { text-decoration-color: var(--rule-2); }

.lr-meta {
  margin: .5rem 0 0;
  padding-left: 9.3rem;
  font-size: .94rem;
  color: var(--ink-2);
}
/* shared run-in key label ("Response window", "Can speak to") */
.rw {
  font: 500 10px/1 var(--mono);
  letter-spacing: .17em;
  text-transform: uppercase;
  color: var(--ink-2);
  margin-right: .55em;
}

/* in the contact ledger the label sits on its own line, value beneath */
.lr-meta .rw {
  display: block;
  margin: 0 0 .3em;
}
.lr-meta .lr-ext { white-space: nowrap; }
.lr-meta .sep { color: var(--rule-2); margin: 0 .45em; }

/* copy buttons */
.copy {
  font: 600 10.5px/1 var(--mono);
  letter-spacing: .16em;
  text-transform: uppercase;
  padding: .52em .75em .48em;
  border: 1px solid var(--ink);
  background: var(--card);
  cursor: pointer;
  box-shadow: 2px 2px 0 rgba(38, 32, 20, .22);
  white-space: nowrap;
}
.copy:hover { background: var(--ink); color: var(--paper); }
.copy:active { transform: translate(1px, 1px); box-shadow: 1px 1px 0 rgba(38, 32, 20, .22); }
.copy.copied { background: var(--moss); border-color: var(--moss); color: var(--paper); }
.copy.copy-failed { background: var(--oxide); border-color: var(--oxide); color: var(--paper); }

html:not(.js) .copy { display: none; }
html:not(.js) #zone-yours,
html:not(.js) #cap-yours { display: none; }

/* ------------------------------------------------------------
   availability clocks
   ------------------------------------------------------------ */

.clock { margin: 2rem 0 0; }

.clock-head {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  gap: 1rem;
  margin-bottom: .55rem;
}
.clock-head h3 {
  font-size: 1.12rem;
  font-weight: 600;
}
.clock-head .zone {
  font: 500 11px/1.5 var(--mono);
  letter-spacing: .1em;
  color: var(--ink-2);
  text-align: right;
}

.track {
  position: relative;
  height: 2.4rem;
  border: 1px solid var(--ink);
  background:
    repeating-linear-gradient(to right,
      var(--rule) 0 1px,
      transparent 1px calc(100% / 24));
  background-color: var(--card);
}

.track .fill {
  position: absolute;
  top: 0;
  bottom: 0;
  background-color: rgba(63, 94, 69, .16);
  background-image: repeating-linear-gradient(135deg,
    rgba(63, 94, 69, .5) 0 2px,
    transparent 2px 7px);
  border-left: 2px solid var(--moss);
  border-right: 2px solid var(--moss);
}
.track .fill.open-l { border-left: none; }
.track .fill.open-r { border-right: none; }

.track .now {
  position: absolute;
  top: -7px;
  bottom: -7px;
  width: 2px;
  background: var(--oxide);
}
.track .now::before {
  content: "";
  position: absolute;
  top: -5px;
  left: -4px;
  border: 5px solid transparent;
  border-top-color: var(--oxide);
}

.ticks {
  display: flex;
  justify-content: space-between;
  font: 400 10.5px/1 var(--mono);
  letter-spacing: .06em;
  color: var(--ink-2);
  margin-top: .45rem;
}

.cap {
  margin: .7rem 0 0;
  font-size: .95rem;
  color: var(--ink-2);
}

.avail-status {
  margin: 1.6rem 0 0;
  font: 500 12px/1.7 var(--mono);
  letter-spacing: .04em;
  color: var(--ink-2);
  border-top: 1px dotted var(--rule-2);
  padding-top: .9rem;
}
.avail-status .dot {
  display: inline-block;
  width: .6em; height: .6em;
  border-radius: 50%;
  margin-right: .5em;
  background: var(--rule-2);
  vertical-align: baseline;
}
.avail-status.in .dot { background: var(--moss); }
.avail-status.out .dot { background: var(--oxide); }

/* ------------------------------------------------------------
   closing
   ------------------------------------------------------------ */

.eos {
  font: 600 11px/1 var(--mono);
  letter-spacing: .3em;
  text-transform: uppercase;
  color: var(--oxide);
}

/* ------------------------------------------------------------
   record: timeline
   ------------------------------------------------------------ */

.timeline {
  position: relative;
  height: 122px;
  margin: 2.4rem 0 .8rem;
}

.tl-base {
  position: absolute;
  left: 0; right: 0;
  bottom: 30px;
  border-bottom: 2px solid var(--ink);
}

.tl-year {
  position: absolute;
  bottom: 0;
  transform: translateX(-50%);
  font: 500 11px/1 var(--mono);
  letter-spacing: .1em;
  color: var(--ink-2);
}
.tl-year::before {
  content: "";
  position: absolute;
  left: 50%;
  bottom: 18px;
  width: 1px;
  height: 9px;
  background: var(--ink);
}
.tl-year.first { transform: none; }
.tl-year.first::before { left: 0; }
.tl-year.last { transform: translateX(-100%); }
.tl-year.last::before { left: auto; right: 0; }

.tl-m {
  position: absolute;
  bottom: 30px;
  transform: translateX(-50%);
  display: block;
  width: 22px;
  border: none;
  background: transparent;
  cursor: pointer;
  padding: 0;
  text-decoration: none;
}
.tl-m.lane-1 { height: 34px; }
.tl-m.lane-2 { height: 56px; }
.tl-m.lane-3 { height: 78px; }

/* stem */
.tl-m::before {
  content: "";
  position: absolute;
  left: 50%;
  bottom: 0;
  width: 1px;
  height: calc(100% - 11px);
  background: var(--rule-2);
}
/* diamond */
.tl-m::after {
  content: "";
  position: absolute;
  left: 50%;
  top: 0;
  width: 9px;
  height: 9px;
  transform: translateX(-50%) rotate(45deg);
  background: var(--paper);
  border: 1.5px solid var(--ink);
}
.tl-m:hover::after, .tl-m:focus-visible::after { background: var(--oxide); border-color: var(--oxide); }
.tl-m.active::after { background: var(--moss); border-color: var(--moss); }

/* tooltip */
.tl-tip {
  position: absolute;
  bottom: calc(100% + 9px);
  left: 50%;
  transform: translateX(-50%);
  width: max-content;
  max-width: 250px;
  padding: .5em .7em;
  background: var(--ink);
  color: var(--paper);
  font: 500 11px/1.5 var(--mono);
  letter-spacing: .03em;
  text-align: left;
  visibility: hidden;
  z-index: 20;
  pointer-events: none;
}
.tl-m:hover .tl-tip, .tl-m:focus-visible .tl-tip { visibility: visible; }
.tl-m.tip-l .tl-tip { left: -10px; transform: none; }
.tl-m.tip-r .tl-tip { left: auto; right: -10px; transform: none; }

.tl-hint {
  font-size: .95rem;
  color: var(--ink-2);
  font-style: italic;
}

/* ------------------------------------------------------------
   record: entries
   ------------------------------------------------------------ */

.group-head {
  display: flex;
  align-items: baseline;
  gap: .9rem;
  margin: 3rem 0 1rem;
  counter-reset: entry-no;
}
.group-head h3 {
  font-size: 1.3rem;
  font-weight: 600;
}
.group-head .count {
  font: 500 11px/1 var(--mono);
  letter-spacing: .18em;
  text-transform: uppercase;
  color: var(--oxide);
}
.group-head::after {
  content: "";
  flex: 1;
  height: 1px;
  background: var(--rule-2);
}

.expand-wrap { text-align: right; margin: 1.4rem 0 0; }

.entry {
  border: 1px solid var(--rule-2);
  border-left: 3px solid var(--rule-2);
  background: var(--card);
  margin: 0 0 .8rem;
  counter-increment: entry-no;
}
.entry.is-active { border-left-color: var(--moss); }

.entry summary {
  list-style: none;
  cursor: pointer;
  padding: .95rem 1.1rem;
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  grid-template-areas:
    "meta plus"
    "role plus"
    "chip plus";
  gap: .15rem 1rem;
  align-items: start;
}
.entry summary::-webkit-details-marker { display: none; }
.entry summary:hover { background: var(--paper-2); }

.e-meta {
  grid-area: meta;
  font: 500 11px/1.7 var(--mono);
  letter-spacing: .1em;
  text-transform: uppercase;
  color: var(--ink-2);
}
.e-meta .e-no { color: var(--oxide); font-weight: 600; margin-right: .8em; }
.e-meta .e-no::before { content: counter(entry-no, decimal-leading-zero); }
.e-meta .e-org { margin-left: .5em; }
.e-meta .e-org::before { content: "· "; color: var(--rule-2); }

.e-role {
  grid-area: role;
  font-size: 1.22rem;
  font-weight: 600;
  line-height: 1.3;
}
.e-role .e-sub {
  font-weight: 400;
  font-style: italic;
  color: var(--ink-2);
  font-size: 1.02rem;
}

.e-chip {
  grid-area: chip;
  font: 500 10.5px/1.6 var(--mono);
  letter-spacing: .12em;
  text-transform: uppercase;
  color: var(--ink-2);
  margin-top: .3rem;
}
.entry.is-active .e-chip { color: var(--moss); font-weight: 600; }

.e-plus {
  grid-area: plus;
  align-self: center;
  font: 400 1.7rem/1 var(--serif);
  color: var(--oxide);
  transition: transform .18s;
}
.entry[open] .e-plus { transform: rotate(45deg); }

.e-body {
  padding: .35rem 1.1rem 1.05rem;
  border-top: 1px dotted var(--rule-2);
  margin-top: -1px;
}
.e-body > p:first-child { margin-top: .85em; }

.runin {
  font: 600 12px var(--mono);
  letter-spacing: .1em;
  color: var(--oxide);
  margin-right: .5em;
}

@keyframes entry-flash {
  0% { background-color: var(--paper-2); }
  100% { background-color: var(--card); }
}
.entry.flash { animation: entry-flash 1.4s ease-out; }

/* notable case annex */
.case {
  margin: 1.4rem 0 .6rem;
  border: 1px solid var(--rule-2);
  background: var(--paper);
  padding: 1.1rem 1.2rem .4rem;
}
.case-h {
  font: 600 11px/1 var(--mono);
  letter-spacing: .2em;
  text-transform: uppercase;
  color: var(--oxide);
  margin-bottom: .6em;
}
.case h4 {
  font-size: 1.15rem;
  font-weight: 600;
  margin-bottom: .7em;
}
.case-ctx {
  font-style: italic;
  color: var(--ink-2);
  font-size: .96rem;
}

/* ------------------------------------------------------------
   archive of the bestiaries
   ------------------------------------------------------------ */

.kicker {
  font: 600 11px/1 var(--mono);
  letter-spacing: .3em;
  text-transform: uppercase;
  color: var(--oxide);
  margin-bottom: .7em;
}

.specs {
  margin: 1.9rem 0;
  border-top: 1px solid var(--rule-2);
}
.specs > div {
  display: grid;
  grid-template-columns: 9rem minmax(0, 1fr);
  gap: 1rem;
  padding: .55rem .2rem;
  border-bottom: 1px solid var(--rule);
}
.specs dt {
  font: 500 11px/1.9 var(--mono);
  letter-spacing: .14em;
  text-transform: uppercase;
  color: var(--ink-2);
}
.specs dd { margin: 0; font-weight: 500; }

.vol-head {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  gap: 1rem;
  margin: 2.2rem 0 .9rem;
}
.vol-head .case-h { margin: 0; }
.vol-head .count {
  font: 500 11px/1 var(--mono);
  letter-spacing: .14em;
  color: var(--ink-2);
}

.volumes {
  list-style: none;
  margin: 0 0 1.4rem;
  padding: 0;
  columns: 2;
  column-gap: 2.5rem;
}
.volumes li {
  break-inside: avoid;
  padding: .42rem 0;
  border-bottom: 1px dotted var(--rule-2);
  font-weight: 500;
}
.volumes .vn {
  font: 600 12px var(--mono);
  color: var(--oxide);
  display: inline-block;
  min-width: 2.2em;
}

/* the sample-entry book plate */
.book {
  margin: 1rem 0 2rem;
  background: #f9f5e8;
  border: 1px solid var(--ink);
  padding: 1.9rem 1.9rem 1.4rem;
  position: relative;
  box-shadow: 3px 3px 0 rgba(38, 32, 20, .18);
}
.book::before {
  content: "";
  position: absolute;
  inset: 7px;
  border: 1px solid var(--rule-2);
  pointer-events: none;
}

.book-vol {
  text-align: center;
  font: 500 11px/1 var(--mono);
  letter-spacing: .24em;
  text-transform: uppercase;
  color: var(--ink-2);
  margin-bottom: 1rem;
}

/* title flanked by rules, as in the live document */
.book-title {
  display: flex;
  align-items: center;
  gap: .9rem;
  font-size: 1.45rem;
  font-weight: 600;
  letter-spacing: .14em;
  text-transform: uppercase;
  white-space: nowrap;
  margin-bottom: 1.2rem;
}
.book-title::before, .book-title::after {
  content: "";
  flex: 1;
  min-width: 1rem;
  height: 1px;
  background: var(--ink);
}
.book-title .fleuron {
  color: var(--oxide);
  font-size: .7em;
  margin: 0;
}

/* centred italic classification block: "Class - Mammalia" */
.book-class {
  margin: 0 0 1.6rem;
  text-align: center;
}
.book-class > div { padding: .12em 0; }
.book-class dt,
.book-class dd {
  display: inline;
  margin: 0;
  font-size: 1rem;
  font-style: italic;
}
.book-class dt { font-weight: 600; }
.book-class dt::after { content: " - "; font-weight: 400; }

/* ruled section band: "❖ SYNOPSIS" */
.book .book-h {
  display: flex;
  align-items: center;
  font-size: .95rem;
  font-weight: 600;
  letter-spacing: .26em;
  text-transform: uppercase;
  color: var(--ink);
  border-top: 1px solid var(--rule-2);
  border-bottom: 1px solid var(--rule-2);
  padding: .55em .2em;
  margin: 1.7rem 0 .9rem;
}
.book .book-h::before {
  content: "❖";
  color: var(--oxide);
  font-size: .9em;
  letter-spacing: 0;
  margin-right: .8em;
}

/* body copy is justified in the document */
.book > p:not([class]) {
  text-align: justify;
  hyphens: auto;
}

.book figure { margin: 1.4rem 0; }
.book figure img {
  margin-inline: auto;
  max-width: min(100%, 30rem);
}
.book figcaption {
  margin-top: .55rem;
  text-align: center;
  font: 400 11.5px/1.6 var(--mono);
  letter-spacing: .04em;
  color: var(--ink-2);
}

.ellipsis {
  text-align: center;
  color: var(--ink-2);
  letter-spacing: .3em;
  margin: 1.2rem 0;
}

.book-foot {
  display: flex;
  justify-content: space-between;
  align-items: baseline;
  gap: 1rem;
  flex-wrap: wrap;
  border-top: 1px solid var(--rule-2);
  padding-top: .85rem;
  font: 500 11.5px/1.7 var(--mono);
  letter-spacing: .06em;
  color: var(--ink-2);
}

.archive-cta {
  margin: 2rem 0 .6rem;
  display: flex;
  align-items: baseline;
  gap: 1.1rem;
  flex-wrap: wrap;
}
.cta-note {
  font: 500 11px/1.7 var(--mono);
  letter-spacing: .1em;
  color: var(--ink-2);
  margin: 0;
}

.btn {
  display: inline-block;
  font: 600 12px/1 var(--mono);
  letter-spacing: .14em;
  text-transform: uppercase;
  text-decoration: none;
  padding: .85em 1.1em .8em;
  border: 1.5px solid var(--ink);
  background: var(--card);
  box-shadow: 3px 3px 0 rgba(38, 32, 20, .22);
}
.btn:hover { background: var(--ink); color: var(--paper); }
.btn:active { transform: translate(1px, 1px); box-shadow: 2px 2px 0 rgba(38, 32, 20, .22); }

/* ghost control (expand all) */
.ghost {
  font: 500 11px/1 var(--mono);
  letter-spacing: .14em;
  text-transform: uppercase;
  background: none;
  border: none;
  border-bottom: 1px dotted var(--rule-2);
  padding: 0 0 .25em;
  cursor: pointer;
  color: var(--ink-2);
}
.ghost:hover { color: var(--oxide); border-color: currentColor; }
html:not(.js) .ghost { display: none; }

/* ------------------------------------------------------------
   referees
   ------------------------------------------------------------ */

.ref-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(265px, 1fr));
  gap: 1.1rem;
  margin-top: 1.6rem;
}

.ref {
  border: 1px solid var(--rule-2);
  border-top: 3px solid var(--ink);
  background: var(--card);
  padding: 1.15rem 1.25rem 1rem;
}
.ref .case-h { margin-bottom: .45em; }
.ref h3 { font-size: 1.3rem; font-weight: 600; margin-bottom: .75rem; }

.ref dl { margin: 0 0 .9rem; }
.ref dl > div {
  display: flex;
  align-items: baseline;
  gap: .7rem;
  padding: .34rem 0;
  border-bottom: 1px dotted var(--rule);
}
.ref dt {
  font: 500 10.5px/2 var(--mono);
  letter-spacing: .14em;
  text-transform: uppercase;
  color: var(--ink-2);
  min-width: 4.6rem;
}
.ref dd { margin: 0; font-weight: 500; flex: 1; }
.ref dd .copy { float: right; }

.ref-can {
  font-size: .95rem;
  color: var(--ink-2);
  margin: 0;
}

/* ------------------------------------------------------------
   footer
   ------------------------------------------------------------ */

.sheet-foot {
  border-top: 3px double var(--ink);
  margin-top: 4.5rem;
  background: var(--paper-2);
}

.foot-inner {
  max-width: 46rem;
  margin-inline: auto;
  padding: 2.2rem 1.25rem 2.4rem;
}

.foot-h {
  font: 600 12px/1 var(--mono);
  letter-spacing: .24em;
  text-transform: uppercase;
  margin: 0 0 1rem;
}

.foot-contacts {
  list-style: none;
  margin: 0 0 1.8rem;
  padding: 0;
}
.foot-contacts li {
  display: flex;
  align-items: baseline;
  gap: .8rem;
  padding: .42rem 0;
  border-bottom: 1px dotted var(--rule-2);
  font-size: .98rem;
}
.foot-contacts .fc-k {
  font: 500 10.5px/2 var(--mono);
  letter-spacing: .14em;
  text-transform: uppercase;
  color: var(--ink-2);
  min-width: 8.5rem;
}
.foot-contacts .fc-v { font-weight: 500; flex: 1; }

.foot-nav {
  display: flex;
  gap: 1.6rem;
  flex-wrap: wrap;
  font: 500 11px/1 var(--mono);
  letter-spacing: .13em;
  text-transform: uppercase;
  margin-bottom: 1.6rem;
}
.foot-nav a { text-decoration: none; color: var(--ink-2); border-bottom: 1px dotted var(--rule-2); padding-bottom: .25em; }
.foot-nav a:hover { color: var(--oxide); border-color: currentColor; }

.colophon {
  font: 400 11px/1.8 var(--mono);
  letter-spacing: .06em;
  color: var(--ink-2);
  margin: 0;
}

/* ------------------------------------------------------------
   404
   ------------------------------------------------------------ */

.lost {
  padding: 6rem 0 3rem;
  max-width: 38rem;
}
.lost .stamp { font-size: 14px; margin-bottom: 2.2rem; }
.lost h1 { font-size: clamp(2.2rem, 7vw, 3.4rem); font-weight: 700; margin-bottom: .5em; }
.lost p { font-size: 1.08rem; }
.lost-nav { display: flex; gap: 1rem; flex-wrap: wrap; margin-top: 2.2rem; }

/* ------------------------------------------------------------
   responsive
   ------------------------------------------------------------ */

/* the stamp needs clear air to the right of the subtitle */
@media (max-width: 860px) {
  .hero-stamp { position: static; display: block; margin-top: 1.6rem; }
}

@media (max-width: 700px) {
  .lr-meta { padding-left: 0; }
  .lr-label { min-width: 0; }
  .lr-top { row-gap: .3rem; }
  .lr-label { flex-basis: 100%; }
  .lr-leader { display: none; }
  .lr-value { flex: 1; }
  .hero { padding-top: 3rem; }
  .volumes { columns: 1; }
  .book { padding: 1.3rem 1.1rem 1rem; }
  .book-title { font-size: 1.05rem; letter-spacing: .06em; gap: .6rem; }
  .specs > div { grid-template-columns: 1fr; gap: 0; padding: .5rem .2rem .6rem; }
  .timeline { height: 132px; }
  .e-role { font-size: 1.1rem; }
  .tl-tip { max-width: 180px; }
}

@media (max-width: 460px) {
  body { font-size: 16px; }
  .tabs { right: .6rem; gap: .3rem; }
  .tabs a { font-size: 10px; padding: .55rem .45rem .5rem; letter-spacing: .05em; }
  .tabs a[aria-current="page"] { padding-top: .65rem; }
  .topbar-inner { padding-inline: .9rem; }
  .page { padding-inline: .9rem; }
  .foot-contacts .fc-k { min-width: 7rem; }
}

@media (max-width: 374px) {
  .book-title { font-size: .95rem; letter-spacing: .04em; white-space: normal; }
}

/* foldable cover screens: keep both tabs reachable inside the sheet */
@media (max-width: 340px) {
  .tabs { right: .4rem; gap: .25rem; }
  .tabs a { font-size: 9px; letter-spacing: 0; padding: .5rem .35rem .45rem; }
  .tabs a[aria-current="page"] { padding-top: .6rem; }
}

/* ------------------------------------------------------------
   motion + print
   ------------------------------------------------------------ */

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

@media print {
  body::before, body::after, .stack::before, .stack::after, .sheet::after,
  .topbar, .skip, .copy, .ghost, .foot-nav, .tl-tip { display: none !important; }
  html { background: none; }
  body { font-size: 11pt; background: #fff; }
  .stack { width: auto; margin: 0; }
  .sheet { box-shadow: none; animation: none; min-height: 0; background: none; }
  .entry, .book, .ref, .note, .case { box-shadow: none; }
  .sheet-foot { background: none; }
  a { text-decoration: none; }
  .lr-value a[href^="mailto"]::after { content: ""; }
}
