/* Silk Road — Commentary.
   Index: the sited country (9c) — one continuous authored terrain, full-bleed, fading into
   the wings. Piece: opens in place off its marker, read from the ground it stands on. */

body.commentary { background: #FCFBF8; }

/* ---------- the country ---------- */

#mapwrap {
  position: relative;
  width: 100%;
  overflow-x: auto;
  overflow-y: hidden;
  background: #FCFBF8;
}

#stage {
  position: relative;
  width: 1600px;
  height: 1500px;
  transform-origin: top left;
}

.mk-lozenge {
  position: absolute;
  inset: 14px;
  border: 1.5px solid var(--espresso);
  background: #fff;
  transform: rotate(45deg);
  box-shadow: 0 4px 10px rgba(0, 0, 0, 0.14);
}
.mk-icon {
  position: absolute;
  inset: 22px;
  display: flex;
  align-items: center;
  justify-content: center;
}
.mk {
  position: absolute;
  width: 96px;
  height: 96px;
  z-index: 6;
  cursor: pointer;
  background: none;
  border: 0;
  padding: 0;
}
.mk:focus-visible { outline: 2px solid var(--espresso); outline-offset: 4px; }

.plate {
  position: absolute;
  box-sizing: border-box;
  width: 200px;
  background: rgba(234, 226, 209, 0.94);
  padding: 8px 11px;
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.12);
  z-index: 5;
  cursor: pointer;
  border: 0;
  font-family: inherit;
  text-align: left;
  transition: background 0.16s ease, box-shadow 0.16s ease;
}
.plate.r { border-left: 2px solid var(--espresso); transform: translateY(-50%); }
.plate.l { border-right: 2px solid var(--espresso); transform: translate(-100%, -50%); text-align: right; }
.plate:hover, .plate:focus-visible {
  background: rgba(234, 226, 209, 1);
  box-shadow: 0 6px 16px rgba(0, 0, 0, 0.2);
  outline: none;
}
.plate-top { display: flex; align-items: baseline; gap: 6px; }
.plate.l .plate-top { justify-content: flex-end; }
.plate-rn { font-size: 11px; font-weight: 900; color: var(--tan); }
.plate-sub {
  font-size: 8.5px; font-weight: 700; letter-spacing: 0.12em;
  text-transform: uppercase; color: var(--sand);
}
.plate-title {
  font-size: 13px; font-weight: 700; line-height: 1.22;
  margin: 3px 0 4px; text-wrap: pretty; color: #000;
}
.plate-land { font-size: 8.5px; font-style: italic; color: #8a7f70; }

.map-card {
  position: absolute;
  background: rgba(252, 251, 248, 0.92);
  border: 1.5px solid var(--espresso);
  padding: 12px 16px;
  box-shadow: 0 4px 14px rgba(0, 0, 0, 0.1);
  z-index: 7;
}
.legend {
  position: absolute;
  border: 1px solid var(--espresso);
  background: rgba(252, 251, 248, 0.92);
  padding: 10px 13px;
  width: 210px;
  z-index: 7;
}
.legend h6 {
  font-size: 8.5px; letter-spacing: 0.18em; text-transform: uppercase;
  color: var(--sand); font-weight: 700; margin: 0 0 7px;
}
.legend div { display: flex; flex-direction: column; gap: 4px; font-size: 10px; color: var(--ink); }

/* ---------- the piece ---------- */

.piece { padding-top: 26px; }

.backlink {
  display: inline-block;
  font-size: 11px; font-weight: 700; letter-spacing: 0.14em;
  text-transform: uppercase; text-decoration: none; color: var(--sand);
  margin-bottom: 26px;
}
.backlink:hover { color: var(--espresso); }

.piece-head { border-bottom: 1.5px solid #000; padding-bottom: 26px; margin-bottom: 30px; }
.piece-eyebrow {
  display: flex; align-items: baseline; gap: 10px;
  font-size: 10px; font-weight: 700; letter-spacing: 0.18em;
  text-transform: uppercase; color: var(--sand);
}
.piece-eyebrow .rn { font-family: 'Frank Ruhl Libre', serif; font-size: 15px; font-weight: 900; color: var(--tan); }
.piece-title {
  font-size: 40px; font-weight: 700; line-height: 1.12;
  margin: 12px 0 0; max-width: 15ch; text-wrap: pretty;
}
.piece-dek {
  font-size: 17px; line-height: 1.5; color: var(--ink);
  margin: 16px 0 0; max-width: 60ch; font-style: italic;
}

.piece-cols { display: flex; gap: 46px; align-items: flex-start; }
.piece-body { flex: 1 1 auto; max-width: 680px; min-width: 0; }
.piece-rail { flex: 0 0 240px; position: sticky; top: calc(var(--pin) + 10px); }

.piece-body h2 {
  font-family: 'Frank Ruhl Libre', serif;
  font-size: 13px; font-weight: 700; letter-spacing: 0.16em;
  text-transform: uppercase; color: var(--espresso);
  margin: 40px 0 12px; padding-top: 14px;
  border-top: 1px solid rgba(0, 0, 0, 0.18);
}
.piece-body h2:first-child { margin-top: 0; }
.piece-body p { font-size: 16px; line-height: 1.68; color: #1c1a17; margin: 0 0 16px; }

.pull {
  border-left: 3px solid var(--espresso);
  padding: 6px 0 6px 22px;
  margin: 34px 0;
  font-family: 'Frank Ruhl Libre', serif;
  font-size: 22px; line-height: 1.36; font-weight: 500; color: var(--espresso);
  text-wrap: pretty;
}

.placeholder {
  border: 1px solid rgba(74, 53, 38, 0.35);
  background: var(--cream);
  padding: 12px 16px;
  font-size: 12px; line-height: 1.5; color: var(--ink);
  margin-bottom: 30px;
}
.placeholder b {
  display: block; font-size: 9.5px; letter-spacing: 0.16em;
  text-transform: uppercase; color: var(--espresso); margin-bottom: 4px;
}

/* exhibit — house chart */
.exhibit { border-top: 1.5px solid #000; border-bottom: 1px solid rgba(0,0,0,0.2); padding: 18px 0 14px; margin: 36px 0; }
.exhibit-t { font-family: 'Frank Ruhl Libre', serif; font-size: 16px; font-weight: 700; margin: 0 0 2px; }
.exhibit-u { font-size: 11px; color: #8a8a8a; margin-bottom: 16px; }
.exhibit-row { display: flex; align-items: center; gap: 12px; margin-bottom: 9px; }
.exhibit-lab { flex: 0 0 148px; font-size: 12.5px; color: #333; text-align: right; }
.exhibit-track { flex: 1; height: 17px; position: relative; }
.exhibit-bar { height: 100%; background: var(--espresso); }
.exhibit-val { flex: 0 0 46px; font-size: 12.5px; font-weight: 600; font-variant-numeric: tabular-nums; color: var(--espresso); }
.exhibit-src { font-size: 10.5px; color: #999; margin-top: 12px; font-style: italic; }

/* locator */
.locator { border: 1px solid rgba(74, 53, 38, 0.3); background: rgba(252,251,248,0.9); padding: 12px; }
.locator h6 {
  font-size: 8.5px; letter-spacing: 0.18em; text-transform: uppercase;
  color: var(--sand); font-weight: 700; margin: 0 0 8px;
}
.locator-land { font-size: 12px; font-style: italic; color: var(--espresso); margin-top: 8px; }

.rail-block { margin-top: 26px; }
.rail-block h6 {
  font-size: 8.5px; letter-spacing: 0.18em; text-transform: uppercase;
  color: var(--sand); font-weight: 700; margin: 0 0 10px;
  border-top: 1px solid rgba(0,0,0,0.18); padding-top: 12px;
}
.kinds { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; }
.kind { text-align: center; }
.kind span { display: block; font-size: 9.5px; color: var(--ink); margin-top: 2px; }

/* foot of the piece — mandate stats live ONLY here, never on the index */
.piece-foot { border-top: 1.5px solid #000; margin-top: 44px; padding-top: 22px; }
.piece-metric { font-family: 'Frank Ruhl Libre', serif; font-size: 19px; font-weight: 700; }
.piece-metric + div { font-size: 9.5px; letter-spacing: 0.1em; text-transform: uppercase; color: #8a8a8a; }
.related { margin-top: 20px; display: flex; flex-direction: column; gap: 8px; }
.related a {
  font-size: 13px; text-decoration: none;
  border-bottom: 1px solid rgba(74,53,38,0.25); padding-bottom: 6px;
}
.related a:hover { border-bottom-color: var(--espresso); }
.related .v { font-variant-numeric: tabular-nums; color: #8a8a8a; font-size: 11.5px; }

.piece-nav { display: flex; justify-content: space-between; gap: 20px; margin-top: 40px; }
.piece-nav a { font-size: 12.5px; text-decoration: none; max-width: 46%; }
.piece-nav a span {
  display: block; font-size: 9px; letter-spacing: 0.14em;
  text-transform: uppercase; color: var(--sand); margin-bottom: 3px;
}
