/* ============================================================================
   Virtual poster styles — "Bimodal Network Graphs of Crowdfunded Literary
   Patronage." Standalone publication that coordinates with lawrenceevalyn.com:
   same palette and typefaces (Playfair Display + Roboto), but the full
   left sidebar is replaced by a slim topbar linking back to the homepage,
   so the page reads as its own publication rather than a page within the site.
   ============================================================================ */

:root {
  --bg:           #f1f1f9;  /* page background (matches site)      */
  --dark:         #262536;  /* sidebar/topbar indigo (matches site) */
  --accent:       #4c4a6c;  /* links + active state (matches site) */
  --accent-hover: #393751;  /* hover (matches site)                */
  --light:        #d3d3da;  /* light text on dark (matches site)   */
  --ink:          #2b2a38;  /* body text on light background        */
  --muted:        #6a6880;  /* captions, secondary text             */
  --serif: "Playfair Display", Georgia, serif;
  --sans:  "Roboto", system-ui, sans-serif;
}

* { box-sizing: border-box; }

body {
  background-color: var(--bg);
  color: var(--ink);
  margin: 0;
  padding: 0;
  font-family: var(--sans);
  line-height: 1.6;
}

/* --- Topbar (the reduced stand-in for the site's sidebar) ----------------- */

.topbar {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  z-index: 100;
  background-color: var(--dark);
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  padding: 12px 28px;
  box-shadow: 0 2px 8px rgba(38, 37, 54, 0.25);
}

.topbar .brand {
  display: flex;
  align-items: baseline;
  gap: 14px;
  min-width: 0;
}

.topbar .brand .name {
  font-family: var(--serif);
  font-weight: 600;
  font-size: 1.4rem;
  color: var(--light);
  text-decoration: none;
  white-space: nowrap;
}

.topbar .brand .tagline {
  font-family: var(--serif);
  font-style: italic;
  font-size: 0.9rem;
  color: var(--light);
  opacity: 0.7;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.topbar .home-link {
  font-family: var(--serif);
  font-size: 1rem;
  color: var(--light);
  text-decoration: none;
  padding: 8px 14px;
  border: 1px solid rgba(211, 211, 218, 0.4);
  border-radius: 3px;
  white-space: nowrap;
  transition: background-color 0.15s ease;
}

.topbar a:hover { background-color: var(--accent-hover); color: var(--light); }
.topbar .brand .name:hover { color: #ffffff; background: none; }

/* --- Poster body ---------------------------------------------------------- */

main.poster {
  max-width: 880px;
  margin: 0 auto;
  padding: 104px 28px 72px;   /* top padding clears the fixed topbar */
}

.poster-head { text-align: center; margin-bottom: 8px; }

.poster-head h1 {
  font-family: var(--serif);
  font-weight: 700;
  font-size: 2.5rem;
  line-height: 1.18;
  color: var(--dark);
  margin: 0 0 0px;
}

.poster-head h2.subhead {
   margin-top: 0;
   line-height: 1.18;
}

.poster-head .lede {
  font-size: 1.2rem;
  font-style: italic;
  color: var(--muted);
  max-width: 640px;
  margin: 0 auto 24px;
}

.byline {
  font-family: var(--serif);
  font-size: 1.1rem;
  color: var(--ink);
  margin: 4px 0;
}
.byline .affil { color: var(--muted); font-style: italic; font-size: 0.98rem; }

.venue {
  font-size: 0.95rem;
  color: var(--muted);
  margin-top: 6px;
}
.venue .placeholder {
  background: #e6e5f2;
  border: 1px dashed var(--accent);
  border-radius: 3px;
  padding: 1px 7px;
  font-style: italic;
}

/* The site's "* * *" colophon motif, reused as a section divider. */
.divider {
  font-family: var(--serif);
  text-align: center;
  color: var(--accent);
  letter-spacing: 0.6em;
  font-size: 1.1rem;
  margin: 44px 0 8px;
  user-select: none;
}

.poster section { margin-top: 8px; }

.poster h2 {
  font-family: var(--serif);
  font-weight: 700;
  font-size: 1.7rem;
  color: var(--dark);
  margin: 28px 0 12px;
}

.poster h3 {
  font-family: var(--serif);
  font-weight: 400;
  font-style: italic;
  font-size: 1.15rem;
  color: var(--accent);
  margin: 0 0 14px;
}

.poster p {
  font-size: 1.12rem;
  margin: 0 0 16px;
}

.poster a {
  color: var(--accent);
  font-weight: 600;
  text-decoration: none;
}
.poster a:hover { text-decoration: underline; }

.stat-strip {
  display: flex;
  flex-wrap: wrap;
  gap: 18px;
  justify-content: center;
  margin: 22px 0;
}
.stat {
  flex: 1 1 150px;
  max-width: 220px;
  text-align: center;
  padding: 14px 10px;
  background: #ffffff;
  border: 1px solid #e0dfee;
  border-radius: 4px;
}
.stat .num {
  font-family: var(--serif);
  font-weight: 700;
  font-size: 1.8rem;
  color: var(--accent);
  display: block;
}
.stat .label { font-size: 0.86rem; color: var(--muted); }

/* --- Figures -------------------------------------------------------------- */

figure.chord {
  margin: 24px 0 8px;
  text-align: center;
}
figure.chord img {
  width: 100%;
  max-width: 760px;
  height: auto;
}
figure.chord figcaption {
  font-size: 0.95rem;
  font-style: italic;
  color: var(--muted);
  max-width: 600px;
  margin: 10px auto 0;
  line-height: 1.5;
}

.overlap-table td.hit-strong {   /* the 8 — darkest, "hottest" cell */
  background: var(--accent);     /* #4c4a6c */
  color: #ffffff;                /* dark bg needs light text */
  font-weight: 700;
}
.overlap-table td.hit-weak {     /* the 1 — a touch lighter than before */
  background: #f0eff8;
  color: var(--accent);
  font-weight: 700;
}

/* Contain any floated aside (e.g. the pull quote) within its section. */
.poster section::after { content: ""; display: block; clear: both; }

/* --- Draft annotation (temporary editorial note, not final content) ------- */

.draft-note {
  background: #fff6e6;
  border: 1px dashed #c9a227;
  border-radius: 4px;
  color: #8a6d1a !important;
  font-family: var(--sans) !important;
  font-weight: 400 !important;
  font-size: 0.95rem !important;
  font-style: italic;
  padding: 10px 16px;
  margin: 16px 0 !important;
}

/* --- Pull quote (definition of "subscriber"), floated beside the prose ---- */

.pullquote {
  float: right;
  width: 280px;
  margin: 6px 0 16px 32px;
  padding: 4px 0 4px 20px;
  border-left: 4px solid var(--accent);
}
.pullquote p {
  font-family: var(--serif);
  font-size: 1.3rem;
  line-height: 1.4;
  font-style: italic;
  color: var(--dark);
  margin: 0;
}
.pullquote strong { font-style: normal; }

/* --- Pipeline diagram placeholder ----------------------------------------- */

.diagram-placeholder {
  margin: 24px 0 8px;
  text-align: center;
}
.placeholder-box {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 8px;
  min-height: 160px;
  padding: 28px 20px;
  background: repeating-linear-gradient(
    45deg, #ececf6, #ececf6 12px, #e4e3f0 12px, #e4e3f0 24px);
  border: 2px dashed var(--accent);
  border-radius: 6px;
  color: var(--accent);
}
.placeholder-label {
  font-family: var(--serif);
  font-style: italic;
  font-size: 1.25rem;
  text-transform: uppercase;
  letter-spacing: 0.08em;
}
.placeholder-hint { font-size: 0.95rem; color: var(--muted); }

/* --- Overlap matrix (shared-subscriber table) ----------------------------- */

figure.overlap { margin: 24px 0 8px; }
.overlap-table {
  width: 70%;
  border-collapse: collapse;
  font-size: 1rem;
  background: #ffffff;
  border: 1px solid #e0dfee;
  margin: 0 auto;
}
.overlap-table th,
.overlap-table td {
  padding: 12px 14px;
  border: 1px solid #e0dfee;
  text-align: center;
}
.overlap-table thead th {
  font-family: var(--serif);
  font-weight: 700;
  color: var(--dark);
  background: #ececf6;
  vertical-align: bottom;
}
.overlap-table tbody th {
  text-align: left;
  font-family: var(--sans);
  font-weight: 400;
  color: var(--ink);
  background: #f6f6fb;
}
.overlap-table .count {
  display: block;
  font-size: 0.82rem;
  color: var(--muted);
}
.overlap-table td { font-family: var(--serif); font-size: 1.4rem; }
.overlap-table .hit  { color: var(--accent); font-weight: 700; background: #e7e6f4; }
.overlap-table .zero { color: #b9b8c8; }
.overlap-table .diag { color: #cfcede; background: #fafafd; }
figure.overlap figcaption {
  font-size: 0.95rem;
  font-style: italic;
  color: var(--muted);
  max-width: 600px;
  margin: 10px auto 0;
  line-height: 1.5;
  text-align: center;
}
/* visually-hidden label for the table's empty corner cell */
.vh {
  position: absolute;
  width: 1px; height: 1px;
  padding: 0; margin: -1px;
  overflow: hidden; clip: rect(0 0 0 0);
  white-space: nowrap; border: 0;
}

/* --- Footer --------------------------------------------------------------- */

footer.poster-foot {
  max-width: 880px;
  margin: 0 auto;
  padding: 28px 28px 56px;
  border-top: 1px solid #d8d7e6;
  font-size: 0.98rem;
  color: var(--muted);
}
footer.poster-foot h2 {
  font-family: var(--serif);
  font-size: 1.2rem;
  color: var(--dark);
  margin: 8px 0 10px;
}
footer.poster-foot ul { margin: 0 0 18px; padding-left: 20px; }
footer.poster-foot li { margin-bottom: 8px; }
footer.poster-foot a { color: var(--accent); font-weight: 600; text-decoration: none; }
footer.poster-foot a:hover { text-decoration: underline; }

/* --- Responsive ----------------------------------------------------------- */

@media screen and (max-width: 700px) {
  .topbar { flex-wrap: wrap; padding: 10px 16px; gap: 8px; }
  .topbar .brand .tagline { display: none; }
  .poster-head h1 { font-size: 1.9rem; }
  main.poster { padding: 120px 16px 48px; }
  .poster p { font-size: 1.05rem; }

  /* Drop the pull-quote float so it sits full-width in the text flow. */
  .pullquote {
    float: none;
    width: auto;
    max-width: none;
    margin: 16px 0;
  }

  /* Let the overlap matrix scroll horizontally if it's too wide to fit. */
  figure.overlap { overflow-x: auto; }
  .overlap-table { font-size: 0.9rem; }
  .overlap-table td { font-size: 1.2rem; }
}

@media screen and (max-width: 420px) {
  .topbar { justify-content: center; }
  .topbar .home-link { width: 100%; text-align: center; }
}
