/* ══════════════════════════════════════════════════════════════════════
   MEANWHILE  ·  page-scoped

   A day-book of the War of the Ring: one chart, thirty-one days, ten
   threads. The map is a WORK (it wears the kit's gilt); the strip, the
   book and the legend are FURNITURE (hairline, the room's ground).
   Everything spends the proto's tokens; the only thing minted here is
   the ten thread inks, which have to read on cream paper, not on the
   room's dark ground — so they are pigments, not the site palette.
   ══════════════════════════════════════════════════════════════════════ */
.mw{ max-width:1180px; margin-inline:auto; }
.mw .pageTitle{ font-size:clamp(40px,5vw,78px); letter-spacing:-.01em; }
.mw .pageLede{ max-width:66ch; }
.mw .mwHead{ max-width:760px; }

/* ── Thread inks (pigments on paper) ─────────────────────────────── */
.mw{
  --ink-frodo:#9c2a1c;   --ink-aragorn:#2f5b7d;  --ink-gandalf:#6e5a92;
  --ink-pippin:#c0611c;  --ink-merry:#237a76;    --ink-rohan:#a8781a;
  --ink-ents:#3a6b3c;    --ink-gondor:#6f7c8c;   --ink-enemy:#1c1a1a;
  --paper:#f3e8d6;
}
.mwT--frodo, .mwEntry--frodo, .mwChip--frodo{ --ink:var(--ink-frodo); }
.mwT--aragorn, .mwEntry--aragorn, .mwChip--aragorn{ --ink:var(--ink-aragorn); }
.mwT--gandalf, .mwEntry--gandalf, .mwChip--gandalf{ --ink:var(--ink-gandalf); }
.mwT--pippin, .mwEntry--pippin, .mwChip--pippin{ --ink:var(--ink-pippin); }
.mwT--merry, .mwEntry--merry, .mwChip--merry{ --ink:var(--ink-merry); }
.mwT--rohan, .mwEntry--rohan, .mwChip--rohan{ --ink:var(--ink-rohan); }
.mwT--ents, .mwEntry--ents, .mwChip--ents{ --ink:var(--ink-ents); }
.mwT--gondor, .mwEntry--gondor, .mwChip--gondor{ --ink:var(--ink-gondor); }
.mwT--enemy, .mwEntry--enemy, .mwChip--enemy{ --ink:var(--ink-enemy); }

/* ── The strip: thirty-one days on one rule ──────────────────────── */
.mwStrip{
  margin-top:clamp(28px,4vh,48px);
  border-top:1px solid rgba(201,168,117,.22);
  border-bottom:1px solid rgba(201,168,117,.22);
  padding:clamp(14px,2vh,22px) 0;
}
.mwStripTop{
  display:flex; align-items:baseline; justify-content:space-between; gap:18px; flex-wrap:wrap;
}
.mwDate{
  font-family:var(--font-display); font-weight:400;
  font-size:clamp(30px,3.2vw,46px); line-height:1; color:var(--warm-gold);
  min-width:9ch;
}
.mwOrdinal{
  font-family:var(--font-serif); font-size:10.5px; letter-spacing:.24em;
  text-transform:uppercase; color:rgba(201,168,117,.75);
}
.mwVerbs{ display:flex; align-items:center; gap:6px; margin-left:auto; }
.mwBtn{
  appearance:none; background:transparent; cursor:pointer;
  border:1px solid rgba(201,168,117,.32); color:var(--warm-gold);
  font-family:var(--font-serif); font-size:10.5px; letter-spacing:.2em; text-transform:uppercase;
  padding:9px 14px; min-height:36px; line-height:1;
  transition:border-color .25s ease, color .25s ease, background .25s ease;
}
.mwBtn:hover{ border-color:rgba(232,200,154,.7); color:#fff5e2; }
.mwBtn:focus-visible{ outline:1px solid var(--warm-gold); outline-offset:3px; }
.mwBtn.is-on{ background:rgba(201,168,117,.14); }
.mwBtn--arrow{ padding:9px 12px; font-size:13px; letter-spacing:0; }

.mwTicks{
  display:flex; align-items:flex-end; gap:0; margin-top:clamp(12px,1.8vh,18px);
  position:relative; padding-top:8px;
}
.mwTicks::before{
  content:''; position:absolute; left:0; right:0; top:8px; height:1px;
  background:rgba(201,168,117,.28);
}
.mwTick{
  appearance:none; border:0; background:transparent; cursor:pointer; padding:0;
  flex:1 1 0; display:flex; flex-direction:column; align-items:center; gap:6px;
  color:rgba(160,168,181,.7); font-family:var(--font-serif); font-size:10.5px; letter-spacing:.04em;
  transition:color .2s ease;
}
.mwTick i{ display:block; width:1px; height:9px; background:rgba(201,168,117,.45); transition:height .2s ease, background .2s ease; }
.mwTick.is-past{ color:rgba(201,168,117,.7); }
.mwTick.is-past i{ background:rgba(201,168,117,.65); }
.mwTick:hover{ color:#fff5e2; }
.mwTick.is-on{ color:#fff5e2; }
.mwTick.is-on i{ height:18px; width:2px; background:var(--warm-gold); }
.mwTick:focus-visible{ outline:1px solid var(--warm-gold); outline-offset:2px; }
.mwMonths{
  display:flex; justify-content:space-between; margin-top:8px;
  font-family:var(--font-serif); font-size:10.5px; letter-spacing:.24em; text-transform:uppercase;
  color:rgba(201,168,117,.55);
}
.mwMonths span:first-child{ flex:0 0 19.35%; }   /* Feb 25–30 is 6 of 31 ticks */

/* ── The stage: chart + book ─────────────────────────────────────── */
.mwStage{
  display:grid; grid-template-columns:minmax(0,1.55fr) minmax(300px,1fr);
  gap:clamp(20px,2.6vw,38px); margin-top:clamp(22px,3.2vh,36px); align-items:start;
}
.mwChart{ position:sticky; top:clamp(12px,3vh,28px); }
.mwPanel{ position:relative; }
.mwPanel img{ display:block; width:100%; height:auto; }
.mwSvg{ position:absolute; inset:0; width:100%; height:100%; overflow:visible; }
.mwPanel[data-panel="war"]{
  aspect-ratio:1639 / 1039; background:var(--paper); overflow:hidden;
  cursor:grab; touch-action:none; user-select:none; -webkit-user-select:none;
}
.mwPanel.is-dragging{ cursor:grabbing; }
.mwWorld{ position:absolute; inset:0; transform-origin:0 0; will-change:transform; }
.mwWorld img{ position:absolute; inset:0; width:100%; height:100%; }
.mwZoom{
  position:absolute; top:8px; right:8px; display:flex; flex-direction:column; gap:3px; z-index:2;
}
.mwZoom button{
  appearance:none; cursor:pointer; width:30px; height:30px; padding:0;
  border:1px solid rgba(60,40,20,.45); background:rgba(243,232,214,.92); color:#3a2a1a;
  font-family:var(--font-serif); font-size:17px; line-height:1;
  transition:background .2s ease, opacity .2s ease;
}
.mwZoom button:hover{ background:#fff8ea; }
.mwZoom button:disabled{ opacity:.35; cursor:default; }
.mwZoom button:focus-visible{ outline:1px solid #3a2a1a; outline-offset:2px; }


/* Cartography marks */
.mwAmbient text{
  font-family:var(--font-display); font-style:italic; font-size:28px; letter-spacing:.06em;
  fill:#3a2a1c; text-anchor:middle; pointer-events:none;
  /* A letterform-fitted paper clearing, never a scrim: the halo is the
     paper's own colour drawn under the glyphs, so a name can sit on a
     mountain range and still read. */
  paint-order:stroke fill; stroke:var(--paper); stroke-width:7px; stroke-linejoin:round; stroke-linecap:round;
}
.mwTrail{
  fill:none; stroke:var(--ink); stroke-width:4.5; stroke-linecap:round; stroke-linejoin:round;
  stroke-dasharray:1 11; opacity:.55; transition:opacity .3s ease;
}
.mwStation{ fill:var(--ink); opacity:.6; transition:opacity .3s ease; }
.mwMark{ cursor:default; transition:opacity .3s ease; }
.mwMark .mwHalo{ fill:var(--ink); opacity:.16; }
.mwMark .mwRing{ fill:var(--ink); stroke:var(--paper); stroke-width:4; }
.mwMark .mwTickLine{ stroke:var(--ink); stroke-width:4; stroke-linecap:round; }
.mwMark text{
  font-family:var(--font-serif); font-size:30px; font-weight:700; fill:var(--paper);
  text-anchor:middle; dominant-baseline:middle; pointer-events:none;
}
.mwMark.is-ghost .mwRing{ fill:var(--paper); stroke:var(--ink); stroke-width:4; }
.mwMark.is-ghost text{ fill:var(--ink); }
.mwMark.is-ghost .mwHalo{ opacity:0; }
.mwMark.is-ghost .mwTickLine{ opacity:.5; }
.mwMark:hover .mwHalo{ opacity:.3; }
.mwT.is-dim{ opacity:.12; }
.mwT.is-solo{ opacity:1; }

/* The day-book */
.mwBook{ display:flex; flex-direction:column; }
.mwEntry{
  display:grid; grid-template-columns:30px minmax(0,1fr); gap:12px; align-items:start;
  padding:13px 0; border-top:1px solid rgba(201,168,117,.14);
  transition:opacity .3s ease, background .25s ease;
}
.mwEntry:first-child{ border-top:0; padding-top:2px; }
.mwEntry.is-dim{ opacity:.28; }
.mwEntry.is-lit{ background:rgba(201,168,117,.06); }
.mwGlyph{
  display:inline-flex; align-items:center; justify-content:center;
  width:26px; height:26px; border-radius:50%; margin-top:2px;
  background:var(--ink); color:var(--paper);
  font-family:var(--font-serif); font-size:12px; font-weight:700;
  box-shadow:0 0 0 1.5px var(--paper);
}
.mwEntry--enemy .mwGlyph{ box-shadow:0 0 0 1.5px rgba(232,200,154,.55); }
.mwWho{
  font-family:var(--font-serif); font-size:10.5px; letter-spacing:.22em; text-transform:uppercase;
  color:rgba(232,200,154,.85);
}
.mwWhere{
  font-family:var(--font-display); font-style:italic; font-size:14.5px; letter-spacing:.02em;
  color:rgba(160,168,181,.85); margin-left:10px;
}
.mwEntryBody p{
  margin:5px 0 0; font-family:var(--font-display); font-size:17.5px; line-height:1.5;
  color:rgba(232,228,221,.86); text-wrap:pretty;
}
.mwEp{
  color:inherit; text-decoration:none;
  border-bottom:1px dotted rgba(201,168,117,.6);
  transition:border-color .2s ease, color .2s ease;
}
.mwEp:hover{ color:#fff5e2; border-bottom:1px solid var(--warm-gold); }
.mwEp:focus-visible{ outline:1px solid var(--warm-gold); outline-offset:2px; }
.mwInf{ font-style:italic; text-transform:none; letter-spacing:.04em; color:rgba(160,168,181,.7); }
.mwRef{
  display:block; margin-top:5px;
  font-family:var(--font-serif); font-size:10px; letter-spacing:.16em; text-transform:uppercase;
  color:rgba(201,168,117,.62);
}
.mwAside{ margin-top:16px; border-top:1px solid rgba(201,168,117,.3); padding-top:12px; }
.mwAside p{
  margin:0; font-family:var(--font-display); font-size:16.5px; line-height:1.5;
  color:rgba(232,200,154,.9);
}
.mwAside p + p{ margin-top:9px; }
.mwAside p span{
  display:block; font-family:var(--font-serif); font-size:10px; letter-spacing:.24em;
  text-transform:uppercase; color:rgba(201,168,117,.7); margin-bottom:3px;
}
.mwSync{ font-style:italic; }

/* The legend, which is also the solo control */
.mwLegend{
  display:flex; flex-wrap:wrap; gap:6px 10px; margin-top:clamp(18px,2.4vh,26px);
}
.mwChip{
  appearance:none; border:1px solid rgba(201,168,117,.2); background:transparent; cursor:pointer;
  display:inline-flex; align-items:center; gap:8px; padding:5px 11px 5px 6px;
  color:rgba(232,228,221,.8); font-family:var(--font-display); font-size:14px; letter-spacing:.02em;
  transition:opacity .25s ease, border-color .25s ease, background .25s ease;
}
.mwChip b{
  display:inline-flex; align-items:center; justify-content:center; width:20px; height:20px;
  border-radius:50%; background:var(--ink); color:var(--paper);
  font-family:var(--font-serif); font-size:10px; box-shadow:0 0 0 1px var(--paper);
}
.mwChip:hover{ border-color:rgba(232,200,154,.55); }
.mwChip.is-solo{ border-color:var(--warm-gold); background:rgba(201,168,117,.12); }
.mwChip.is-dim{ opacity:.4; }
.mwChip:focus-visible{ outline:1px solid var(--warm-gold); outline-offset:2px; }
.mwLegendRow{ display:flex; align-items:center; gap:16px; margin-top:14px; flex-wrap:wrap; }
.mwLegendRow .mwLegendNote{ margin-top:0; }
.mwEntry.is-quiet p{ color:rgba(160,168,181,.8); font-style:italic; }
.mwLegendNote{
  margin-top:10px; font-family:var(--font-serif); font-size:10.5px; letter-spacing:.14em;
  text-transform:uppercase; color:rgba(160,168,181,.6);
}

/* Colophon + closing plate */
.mwAfter{ margin-top:clamp(40px,6vh,72px); max-width:760px; }
.mwAfter .prose{ font-size:18.5px; }
.mwPlate{ margin-top:clamp(26px,4vh,40px); max-width:900px; }
.mwPlate .plateCaption{ margin-top:12px; }

@media (max-width: 900px){
  .mwStage{ grid-template-columns:1fr; }
  .mwChart{ position:static; }
  .mwTick span{ display:none; }
  .mwTick.is-on span, .mwTick:nth-child(5n+1) span{ display:block; }
    .mwAmbient text{ font-size:34px; }
}

/* The whole month as text: a real, readable fallback (and the indexable
   copy of the day-book), folded until asked for. */
.mwText{ margin-top:clamp(28px,4vh,44px); max-width:760px; border-top:1px solid rgba(201,168,117,.22); padding-top:14px; }
.mwText summary{
  cursor:pointer; list-style:none; display:inline-flex; align-items:center; gap:.55em;
  font-family:var(--font-serif); font-size:10.5px; letter-spacing:.2em; text-transform:uppercase;
  color:var(--warm-gold); padding:8px 0;
}
.mwText summary::-webkit-details-marker{ display:none; }
.mwText summary::after{ content:'\2193'; transition:transform .3s ease; }
.mwText[open] summary::after{ transform:rotate(180deg); }
.mwText summary:hover{ color:#fff5e2; }
.mwTextBody{ margin-top:14px; font-family:var(--font-display); color:rgba(232,228,221,.84); }
.mwTextLede{ font-size:17.5px; line-height:1.55; margin:0 0 18px; }
.mwDay{ margin-top:22px; }
.mwDay h2{ font-family:var(--font-display); font-weight:400; font-size:22px; color:var(--warm-gold); margin:0 0 8px; }
.mwDay ul{ margin:0; padding:0; list-style:none; }
.mwDay li{ font-size:16px; line-height:1.5; padding:5px 0; border-top:1px solid rgba(201,168,117,.1); }
.mwDay li strong{ font-family:var(--font-serif); font-weight:400; font-size:10.5px; letter-spacing:.18em; text-transform:uppercase; color:rgba(232,200,154,.85); margin-right:6px; }
.mwDay li em{ color:rgba(160,168,181,.85); }
.mwDay li small{ display:block; font-family:var(--font-serif); font-size:10px; letter-spacing:.14em; text-transform:uppercase; color:rgba(201,168,117,.6); margin-top:2px; }
.mwDay li a{ color:inherit; text-decoration:none; border-bottom:1px dotted rgba(201,168,117,.6); }
.mwDay li a:hover{ color:#fff5e2; border-bottom-style:solid; }
.mwDaySync{ font-size:15.5px; line-height:1.5; color:rgba(232,200,154,.9); margin:8px 0 0; font-style:italic; }
.mwDaySync strong{ font-style:normal; font-family:var(--font-serif); font-weight:400; font-size:10px; letter-spacing:.2em; text-transform:uppercase; color:rgba(201,168,117,.7); margin-right:6px; }
