/* Conference program readers (shared by all five). Components on the Alexandrian Suite tokens (tokens.css, fonts.css). */
* { box-sizing: border-box; }
body { margin: 0; background: var(--papyrus); color: var(--gloss); font-family: var(--f-body); font-size: var(--text-base); line-height: var(--leading-base); }
a { color: var(--terracotta); text-underline-offset: 2px; } a:hover { color: var(--gloss); }
h1, h2, h3 { font-family: var(--f-display); font-weight: 400; line-height: var(--leading-tight); }
h1 { font-size: 1.9rem; margin: .2rem 0 .5rem; } h2 { font-size: 1.3rem; margin: 2rem 0 .5rem; } h3 { font-size: 1.05rem; margin: 1.2rem 0 .3rem; }
.lede { max-width: 46rem; font-size: 1.08rem; color: var(--gloss-soft); }
p, li { max-width: 52rem; }
.small, .meta { font-family: var(--f-ui); font-size: var(--text-sm); color: var(--dilute); }
.caveat { border-left: 3px solid var(--terracotta); background: var(--terracotta-wash); padding: .5rem .9rem; font-size: var(--text-sm); max-width: 52rem; margin: 1rem 0; }
table { border-collapse: collapse; width: 100%; font-size: var(--text-sm); font-family: var(--f-ui); }
th, td { text-align: left; vertical-align: top; padding: .32rem .5rem; border-bottom: 1px solid var(--rule); }
th { font-weight: 600; color: var(--dilute); font-size: .74rem; text-transform: uppercase; letter-spacing: .03em; position: sticky; top: 0; background: var(--papyrus); }
td.n, th.n { text-align: right; font-variant-numeric: tabular-nums; }
.tbl { overflow-x: auto; }
.chart { position: relative; height: 340px; background: var(--paper); border: 1px solid var(--rule); border-radius: var(--radius-sm); padding: .6rem; }
.controls { display: flex; flex-wrap: wrap; gap: .5rem 1rem; align-items: center; margin: .8rem 0; font-family: var(--f-ui); font-size: var(--text-sm); }
select, input[type=text], input[type=number], button { font: inherit; font-size: var(--text-sm); font-family: var(--f-ui); border: 1px solid var(--rule-strong); background: var(--paper); color: var(--gloss); border-radius: var(--radius-sm); padding: .35rem .6rem; }
button, .btn { background: var(--gloss); color: var(--papyrus); cursor: pointer; text-decoration: none; display: inline-block; border-color: var(--gloss); }
.btn.alt { background: var(--paper); color: var(--gloss); }
.badge { font-family: var(--f-ui); font-size: .7rem; border: 1px solid var(--rule-strong); border-radius: 999px; padding: 0 .45rem; color: var(--dilute); white-space: nowrap; }
.badge.warn { border-color: var(--terracotta); color: var(--terracotta); }
.facts { display: grid; grid-template-columns: repeat(auto-fit, minmax(10rem, 1fr)); gap: .6rem; margin: 1rem 0; }
.fact { background: var(--paper); border: 1px solid var(--rule); border-radius: var(--radius-sm); padding: .5rem .7rem; }
.fact b { display: block; font-family: var(--f-display); font-size: 1.5rem; font-weight: 400; } .fact span { font-family: var(--f-ui); font-size: .78rem; color: var(--dilute); }
.cols { display: grid; grid-template-columns: 1fr 1fr; gap: 0 2rem; } @media (max-width: 800px) { .cols { grid-template-columns: 1fr; } }
ul.plain { list-style: none; padding: 0; } ul.plain li { padding: .15rem 0; }
code { font-family: var(--f-mono); font-size: .88em; }
.cite { font-family: var(--f-mono); font-size: .8rem; background: var(--paper); border: 1px solid var(--rule); padding: .5rem .7rem; max-width: 60rem; overflow-wrap: anywhere; }
.legend span { display: inline-block; margin-right: 1rem; font-family: var(--f-ui); font-size: .78rem; } .legend i { display: inline-block; width: .7rem; height: .7rem; border-radius: 50%; margin-right: .3rem; vertical-align: -1px; }

/* keyboard focus and reduced motion */
a:focus-visible, button:focus-visible, select:focus-visible, input:focus-visible, summary:focus-visible, canvas:focus-visible { outline: 3px solid var(--terracotta); outline-offset: 2px; }
@media (prefers-reduced-motion: reduce) { * { animation: none !important; transition: none !important; scroll-behavior: auto !important; } }
.tbl { max-width: 100%; }
img, svg, canvas { max-width: 100%; }
@media (max-width: 600px) { h1 { font-size: 1.5rem; } }

.controls label, .controls select, .controls input[type=text] { max-width: 100%; }
.controls select { text-overflow: ellipsis; }

/* ---- Lifted from the WPA-L Archive Reader ---- */
/* ============================================================
   The icon system.

   57 symbols live in three sprite partials: _icons_core.html (the
   wordmark mark and eleven sidebar destinations, on every page),
   _icons_tools.html (nineteen analytical tools), and
   _icons_datastories.html (twenty-six chapter panels).

   Usage:
     <svg class="ic" aria-hidden="true"><use href="#ic-centrality"/></svg>

   Icons are decoration beside a text label, so they take
   aria-hidden and the label carries the meaning. Where an icon is
   the ONLY content of a control, give the control an aria-label —
   never rely on the mark alone.

   Accent colours travel as custom properties rather than classes.
   A <use> clone lives in a shadow tree that document CSS selectors
   do not reach, but inherited properties cross that boundary, so
   --ic-accent set here lands on the paths inside the symbol.
   ============================================================ */

.ic-sprite {
  position: absolute;
  width: 0;
  height: 0;
  overflow: hidden;
}

.ic {
  display: inline-block;
  flex: none;
  width: var(--ic-size, 1.5rem);
  height: var(--ic-size, 1.5rem);
  color: var(--gloss);

  /* The one saturated hue, on the one element per icon that earns it. */
  --ic-accent: var(--terracotta);
  --ic-wash: var(--terracotta-wash);

  /* Sit on the baseline of the label beside it rather than on the
     line box, which would ride high next to Literata's x-height. */
  vertical-align: -0.28em;
  transition: color var(--t-fast);
}

.ic-sm { --ic-size: 1.125rem; }
.ic-lg { --ic-size: 2rem; }
.ic-xl { --ic-size: 2.75rem; }

/* Dense lists — a sidebar of 54 journals, a nav dropdown — would blow
   the terracotta budget if every row carried an accent. Quiet icons
   drop to a single colour and let the page keep its 5%. */
.ic-quiet {
  --ic-accent: currentColor;
  --ic-wash: transparent;
}

/* Faience marks absence here as it does everywhere else: an icon for
   a tool with no data yet, not an icon that failed to load. */
.ic-absent {
  color: var(--faience);
  --ic-accent: var(--faience);
  --ic-wash: var(--faience-wash);
}

/* In a link or button, the mark follows the label on hover. The accent
   lifts with it, so the two-colour relationship survives the state. */
a:hover > .ic,
button:hover > .ic,
a:hover .ic,
button:hover .ic {
  color: var(--terracotta);
  --ic-accent: var(--terracotta-lift);
}

a:hover .ic-quiet,
button:hover .ic-quiet {
  --ic-accent: currentColor;
}

/* The wordmark mark, which is the only icon allowed to be large and
   the only one that is terracotta throughout. */
.ic-wordmark {
  color: var(--terracotta);
  --ic-accent: var(--terracotta);
}

@media (prefers-reduced-motion: reduce) {
  .ic { transition: none; }
}

/* Switching figure repaints every surface at once. The same component
   transitions that make a hover feel considered turn that switch into a
   fade through the wrong palette -- cards sitting in light paper on a
   black-figure page for a couple of frames -- so they are suppressed for
   the frame the switch happens in. */
.figure-switching, .figure-switching * { transition: none !important; }


/* ============================================================
   Skip link and focus.
   ============================================================ */

.skip {
  position: absolute; left: -9999px; top: 0; z-index: 100;
  background: var(--terracotta); color: var(--added-white);
  font-family: var(--f-ui); font-weight: 700;
  padding: var(--space-3) var(--space-4); text-decoration: none;
}
.skip:focus { left: var(--space-4); top: var(--space-2); color: var(--added-white); }

:where(a, button, input, select, textarea, summary):focus-visible {
  outline: 2px solid var(--terracotta);
  outline-offset: 2px;
  border-radius: var(--radius-sm);
}
main:focus { outline: none; }

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


/* ============================================================
   The shell.

   A capsa is the cylindrical box a library stood its rolls in, each
   with its sillybos tag turned outward so the titles could be read
   without pulling anything out. That is what the left column does:
   it holds fifty-four journals with their names facing the reader.
   ============================================================ */

.layout {
  display: flex;
  align-items: flex-start;
  min-height: 100vh;
}

.capsa {
  --capsa-w: 17.5rem;
  width: var(--capsa-w);
  flex: none;
  position: sticky;
  top: 0;
  height: 100vh;
  overflow-y: auto;
  display: flex;
  flex-direction: column;
  background: var(--papyrus-deep);
  border-right: 1px solid var(--rule);
}

.column {
  flex: 1 1 auto;
  min-width: 0;
}

.column-inner {
  max-width: 64rem;
  padding: var(--space-10) var(--space-8) var(--space-16);
}

/* A page that is mostly prose -- one article, one author -- narrows to
   something closer to the book-roll measure. 64rem is right for a grid of
   cards and much too wide for a paragraph. */
.column-inner--read { max-width: 52rem; }


/* -- The wordmark, at the head of the capsa ------------------ */

.capsa-head {
  padding: var(--space-5) var(--space-5) var(--space-4);
  border-bottom: 1px solid var(--rule);
}

.wordmark {
  display: flex;
  align-items: flex-start;
  gap: var(--space-3);
  text-decoration: none;
  color: var(--gloss);
  line-height: 1.15;
}
.wordmark .name {
  display: block;
  font-family: var(--f-display);
  font-size: 1.5rem;
}
.wordmark .sub {
  display: block;
  font-family: var(--f-quote); font-style: italic;
  font-size: var(--text-sm); color: var(--dilute);
  margin-top: 0.1rem;
}
.wordmark:hover .name { color: var(--terracotta); }
.wordmark .ic { margin-top: 0.28rem; }


/* -- Navigation --------------------------------------------- */

.capsa-nav {
  flex: 1 1 auto;
  padding: var(--space-3) 0 var(--space-4);
  overflow-y: auto;
}

.nav-item { position: relative; }

.nav-link,
.nav-trigger {
  display: flex; align-items: center; gap: var(--space-3);
  width: 100%;
  padding: 0.4rem var(--space-5);
  font-family: var(--f-ui); font-size: var(--text-sm);
  color: var(--gloss-soft);
  text-decoration: none;
  background: none; border: 0;
  text-align: left;
  border-left: 2px solid transparent;
}
.nav-link:hover,
.nav-trigger:hover { background: var(--paper); color: var(--gloss); }

/* The diple in the margin: this is the passage you are reading. */
.nav-link[aria-current="page"] {
  color: var(--gloss); font-weight: 700;
  background: var(--paper);
  border-left-color: var(--terracotta);
}

.nav-label { flex: 1 1 auto; min-width: 0; }

.nav-chevron {
  flex: none; width: 0; height: 0;
  border-left: 5px solid var(--dilute-light);
  border-top: 4px solid transparent;
  border-bottom: 4px solid transparent;
  transition: transform var(--t-fast);
}
.nav-item.open .nav-chevron { transform: rotate(90deg); }

.nav-count {
  flex: none;
  font-family: var(--f-mono); font-size: 0.68rem;
  padding: 0.05em 0.4em; border-radius: var(--radius-sm);
  background: var(--terracotta-wash); color: var(--terracotta);
}

.nav-dropdown { display: none; padding: var(--space-1) 0 var(--space-3); }
.nav-item.open .nav-dropdown { display: block; }

.nav-dropdown a {
  display: block;
  padding: 0.28rem var(--space-5) 0.28rem 3.2rem;
  font-family: var(--f-ui); font-size: 0.8125rem;
  color: var(--dilute); text-decoration: none;
}
.nav-dropdown a:hover { color: var(--terracotta); background: var(--paper); }

.nav-dropdown .group {
  display: block;
  padding: var(--space-3) var(--space-5) 0.2rem 3.2rem;
  font-family: var(--f-ui); font-size: var(--text-xs);
  text-transform: uppercase; letter-spacing: 0.09em;
  color: var(--dilute-light);
}
.nav-dropdown .lead { font-weight: 700; color: var(--gloss-soft); }


/* -- The sillybos tags: one journal, one label --------------- */

.tags-fold { border-top: 1px solid var(--rule); margin-top: var(--space-3); }

/* Wide enough for the capsa to stand beside the column, the list is simply
   there; the disclosure only exists for phones, so its summary is not. */
.tags-fold > summary { display: none; }

.tags-head {
  padding: var(--space-4) var(--space-5) 0.2rem;
  font-family: var(--f-ui); font-size: var(--text-xs);
  font-weight: 700; letter-spacing: 0.09em; text-transform: uppercase;
  color: var(--dilute-light);
  border-top: 1px solid var(--rule);
  margin-top: var(--space-2);
}
.tags-head:first-child { border-top: 0; margin-top: 0; }

.tag {
  display: flex; align-items: baseline; justify-content: space-between;
  gap: var(--space-2);
  position: relative;
  padding: 0.3rem var(--space-5);
  font-family: var(--f-ui); font-size: 0.78rem; line-height: 1.4;
  color: var(--gloss-soft); text-decoration: none;
}
.tag:hover { background: var(--paper); color: var(--gloss); }

.tag .jname { flex: 1 1 auto; min-width: 0; }
.tag .jmeta { flex: none; display: flex; align-items: baseline; gap: 0.3rem; }
.tag .jcount {
  font-family: var(--f-mono); font-size: 0.68rem;
  font-variant-numeric: tabular-nums; color: var(--dilute-light);
}

/* The diple proper, as it marks a row in the coverage table: a mark
   rather than a tint, so it survives a printout with background
   graphics off and does not depend on colour alone. */
.tag[aria-current="page"] { color: var(--gloss); font-weight: 700; background: var(--paper); }
.tag[aria-current="page"]::before {
  content: ""; position: absolute; left: var(--space-3); top: 0.62rem;
  width: 0; height: 0;
  border-left: 5px solid var(--terracotta);
  border-top: 4px solid transparent; border-bottom: 4px solid transparent;
}

/* Provenance, not status: how a record arrived is a quiet fact, so it
   is set in the dilute glaze rather than given a colour of its own. */
.src {
  font-family: var(--f-ui); font-size: 0.58rem; font-weight: 700;
  letter-spacing: 0.06em; text-transform: uppercase;
  padding: 0.12em 0.34em; border-radius: var(--radius-sm);
  border: 1px solid var(--rule); color: var(--dilute);
  background: var(--papyrus); white-space: nowrap;
}

/* Faience marks absence, and nothing else. A journal we cannot reach
   is the only thing in this column that is not here. */
.tags-head.absent { color: var(--faience); }
.tag.absent { color: var(--faience); cursor: default; }
.tag.absent:hover { background: none; }


/* -- The foot of the capsa ----------------------------------- */

.capsa-foot {
  flex: none;
  padding: var(--space-4) var(--space-5);
  border-top: 1px solid var(--rule);
  display: flex; flex-direction: column; gap: var(--space-3);
}

.figure-toggle {
  display: flex; align-items: center; gap: var(--space-2);
  font-family: var(--f-ui); font-size: var(--text-xs); font-weight: 700;
  padding: 0.35rem 0.7rem;
  color: var(--terracotta); background: transparent;
  border: 1px solid var(--terracotta); border-radius: var(--radius-sm);
}
.figure-toggle:hover { background: var(--terracotta-wash); }

.capsa-back {
  font-family: var(--f-ui); font-size: var(--text-sm);
  color: var(--dilute); text-decoration: none;
}
.capsa-back:hover { color: var(--terracotta); }



/* ============================================================
   Narrow viewports: the capsa lies down above the column rather
   than standing beside it. It stops being sticky, because a
   full-height sticky box on a phone is just a wall.
   ============================================================ */

@media (max-width: 62rem) {
  .layout { flex-direction: column; }
  .capsa {
    width: 100%;
    position: static;
    height: auto;
    border-right: 0;
    border-bottom: 1px solid var(--rule);
  }
  /* No nested scroll region. A scrollable box inside a scrolling page is
     a trap on touch, so the capsa simply gets as tall as it needs. */
  .capsa-nav { overflow: visible; }

  /* Seen from above, a capsa is a ring of tags rather than a column of
     them. Fifty-four stacked rows would bury the page, so they reflow
     into a wrapped field -- which is what the legacy sidebar did here
     too, and it was right to. */
  .tags-fold > summary {
    display: flex; align-items: center; gap: var(--space-3);
    padding: 0.55rem var(--space-5);
    font-family: var(--f-ui); font-size: var(--text-sm); font-weight: 700;
    color: var(--gloss-soft); cursor: pointer; list-style: none;
  }
  .tags-fold > summary::-webkit-details-marker { display: none; }
  /* The diple again, rotated: closed points right, open points down. */
  .tags-fold > summary::after {
    content: ""; margin-left: auto; width: 0; height: 0;
    border-left: 6px solid var(--terracotta);
    border-top: 5px solid transparent; border-bottom: 5px solid transparent;
    transition: transform var(--t-fast);
  }
  .tags-fold[open] > summary::after { transform: rotate(90deg); }
  .tags-count {
    font-family: var(--f-mono); font-size: 0.68rem;
    padding: 0.05em 0.4em; border-radius: var(--radius-sm);
    background: var(--terracotta-wash); color: var(--terracotta);
  }

  .tags {
    display: flex; flex-wrap: wrap; gap: var(--space-2);
    padding: var(--space-3) var(--space-5) var(--space-4);
  }
  .tags-head {
    width: 100%; border-top: 0;
    margin-top: var(--space-2); padding: var(--space-2) 0 0;
  }
  .tags-head:first-child { margin-top: 0; }
  .tag {
    padding: 0.26rem 0.6rem;
    border: 1px solid var(--rule); border-radius: var(--radius-sm);
    background: var(--papyrus);
  }
  /* The provenance chip inside a chip is one border too many. */
  .tag .src { display: none; }
  .tag[aria-current="page"] {
    border-color: var(--terracotta); color: var(--terracotta);
    padding-left: 1.15rem;
  }
  .tag[aria-current="page"]::before { left: 0.42rem; top: 0.6rem; }

  .column-inner { padding: var(--space-8) var(--space-5) var(--space-12); }
}

/* ============================================================
   Shell additions for the conference readers. The icon system, the
   capsa and the narrow-viewport rules above are lifted from the WPA-L
   Archive Reader (wpa-l-archive static/wpa.css), which took them from
   Pinakes. What follows is this site's own: the page furniture that
   sits in the column, the nav group labels, and the capsa search.
   ============================================================ */

.draft-banner {
  background: var(--warn-bg); color: var(--warn-fg);
  font: 600 var(--text-sm)/1.4 var(--f-ui);
  text-align: center; padding: var(--space-2) var(--space-4);
}

main.column { max-width: none; margin: 0; padding: 0; }
.column-inner { max-width: 72rem; }
.column-foot {
  max-width: 72rem; margin: 0; padding: var(--space-6) var(--space-8) var(--space-10);
  border-top: 1px solid var(--rule);
  font-family: var(--f-ui); font-size: var(--text-xs); color: var(--dilute);
}
.capsa-nav a, .capsa-foot a { margin: 0; }
.capsa-nav a:hover, .capsa-foot a:hover { text-decoration: none; }

.nav-group {
  padding: var(--space-4) var(--space-5) 0.2rem;
  font-family: var(--f-ui); font-size: var(--text-xs);
  font-weight: 700; letter-spacing: 0.09em; text-transform: uppercase;
  color: var(--dilute-light);
  border-top: 1px solid var(--rule); margin-top: var(--space-2);
}
.nav-group:first-child { border-top: 0; margin-top: 0; }

.capsa-search { padding: var(--space-3) var(--space-5) 0; }
.capsa-search input { width: 100%; }

.wordmark .name { font-size: 1.3rem; }
.capsa-back { margin: 0; }

@media (max-width: 62rem) {
  .column-foot { padding: var(--space-6) var(--space-5) var(--space-10); }
  .nav-group { border-top: 0; }
}
@media (max-width: 40rem) {
  .column-inner { padding: var(--space-6) var(--space-4) var(--space-10); }
  .column-foot { padding: var(--space-6) var(--space-4) var(--space-10); }
}

/* Chart colour: eight fixed hues, one per series, never cycled (same palette and rule as the WPA-L reader). */
:root {
  --cat-1: #A8462C; --cat-2: #008B78; --cat-3: #B0821A; --cat-4: #5A57A8;
  --cat-5: #3E7D2A; --cat-6: #8A3A73; --cat-7: #1466A0; --cat-8: #A83A5C; --cat-other: #8C8271;
}
@media (prefers-color-scheme: dark) {
  :root:not([data-theme="light"]) {
    --cat-1: #C96B50; --cat-2: #2FA890; --cat-3: #A8842A; --cat-4: #7F7BC8;
    --cat-5: #6BA34B; --cat-6: #B2689C; --cat-7: #4F93C7; --cat-8: #CB6E88; --cat-other: #877C69;
  }
}
:root[data-theme="dark"] {
  --cat-1: #C96B50; --cat-2: #2FA890; --cat-3: #A8842A; --cat-4: #7F7BC8;
  --cat-5: #6BA34B; --cat-6: #B2689C; --cat-7: #4F93C7; --cat-8: #CB6E88; --cat-other: #877C69;
}
.swatch { display: inline-block; width: .7rem; height: .7rem; border-radius: 50%; margin-right: .4rem; vertical-align: -1px; }
.picker { display: flex; flex-wrap: wrap; gap: .3rem 1rem; align-items: center; margin: .8rem 0; font-family: var(--f-ui); font-size: var(--text-sm); }
.picker label { white-space: nowrap; }
td.dim, .dim { color: var(--dilute-light); }
.matrix td, .matrix th { text-align: right; }
.matrix th:first-child, .matrix tbody th { text-align: left; }
