/*
 * The Move: a dated publication page. Every colour is a shared theme token, so light and dark
 * follow the site-wide selection exactly as the dated Daily Tape pages do.
 */

.mv-page {
  width: min(100%, var(--layout-box-page));
  margin: 0 auto;
  padding: var(--rhythm-page-top-clear) var(--layout-gutter) 4rem;
  color: var(--theme-ink-primary);
  font-family: var(--sans);
  overflow-wrap: anywhere;
}

.mv-page a { color: var(--theme-ink-link); text-underline-offset: 0.18em; }
.mv-page a:hover { color: var(--theme-ink-link-hover); }
.mv-page a:focus-visible, .mv-page summary:focus-visible, .mv-page button:focus-visible {
  outline: 2px solid var(--theme-focus-ring);
  outline-offset: 2px;
}

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

.mv-num { font-family: var(--mono); font-variant-numeric: tabular-nums; white-space: nowrap; }
.mv-up { color: var(--theme-status-positive-ink); }
.mv-down { color: var(--theme-status-negative-ink); }
.mv-flat, .mv-quiet { color: var(--theme-ink-muted); }
.mv-held-ink { color: var(--theme-status-warning-ink); }
.mv-fine { font-size: 0.82rem; line-height: 1.5; color: var(--theme-ink-muted); max-width: 62ch; }
.mv-none { font-size: 0.86rem; color: var(--theme-ink-muted); margin: 0.25rem 0 0; }
.mv-lede { max-width: 66ch; color: var(--theme-ink-secondary); line-height: 1.6; }

/* ── Masthead ─────────────────────────────────────────────────────────────── */

.mv-masthead { max-width: 900px; padding-bottom: 2rem; border-bottom: 1px solid var(--theme-rule-strong); }

.mv-eyebrow {
  margin: 0 0 0.9rem;
  font-size: 0.72rem;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--theme-ink-muted);
}

.mv-masthead h1 {
  margin: 0;
  font-family: var(--serif-display);
  font-weight: 500;
  font-size: clamp(2.2rem, 6vw, 3.6rem);
  line-height: 1.05;
  letter-spacing: -0.01em;
}
.mv-arrow { color: var(--theme-ink-muted); font-weight: 300; padding: 0 0.1em; }

.mv-standfirst {
  margin: 1.1rem 0 0;
  max-width: 64ch;
  font-size: 1.06rem;
  line-height: 1.6;
  color: var(--theme-ink-secondary);
}

.mv-market {
  display: grid;
  grid-template-columns: minmax(0, 1.4fr) minmax(0, 1fr) minmax(0, 1fr);
  gap: 1.5rem;
  margin: 1.8rem 0 0;
}
.mv-market div { border-top: 1px solid var(--theme-rule-standard); padding-top: 0.7rem; min-width: 0; }
.mv-market dt {
  font-size: 0.72rem; letter-spacing: 0.08em; text-transform: uppercase; color: var(--theme-ink-muted);
}
.mv-market dd {
  margin: 0.3rem 0 0;
  font-family: var(--mono);
  font-variant-numeric: tabular-nums;
  font-size: 1.35rem;
}
.mv-market .mv-market-main dd { font-size: 2rem; }
.mv-market dd small { display: block; margin-top: 0.2rem; font-size: 0.78rem; color: var(--theme-ink-muted); }

.mv-hashline { margin: 1.4rem 0 0; font-size: 0.78rem; color: var(--theme-ink-muted); }
.mv-hash {
  font-family: var(--mono);
  font-size: 0.78rem;
  color: var(--theme-mono-ink);
  background: var(--theme-mono-surface);
  padding: 0.05em 0.35em;
  border-radius: 2px;
  word-break: break-all;
  overflow-wrap: anywhere;
  user-select: all;
}

/* ── Sections ─────────────────────────────────────────────────────────────── */

.mv-section { margin-top: 3rem; }
.mv-section > h2 {
  margin: 0 0 1.1rem;
  padding-bottom: 0.5rem;
  border-bottom: 1px solid var(--theme-rule-standard);
  font-size: 0.78rem;
  font-weight: 600;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--theme-ink-secondary);
}

.mv-qualification {
  padding: 1.2rem 1.4rem;
  border: 1px solid var(--theme-status-warning-ink);
  background: var(--theme-status-warning-surface);
}
.mv-qualification > h2 { color: var(--theme-ink-primary); }
.mv-qualification p { margin-bottom: 0; }
.mv-scope--qualified { border-top-color: var(--theme-status-warning-ink); }
.mv-scope--qualified h3 { margin: 0 0 0.8rem; font-family: var(--serif-display); font-weight: 500; }

/* ── Key visual: reconciliation strip ─────────────────────────────────────── */

.mv-strip { margin: 0 0 2rem; }
.mv-legend {
  display: flex; flex-wrap: wrap; gap: 0.4rem 1.2rem;
  font-size: 0.78rem; color: var(--theme-ink-muted); margin-bottom: 0.8rem;
}
.mv-legend span { display: inline-flex; align-items: center; gap: 0.4rem; }
.mv-key { display: inline-block; width: 14px; height: 10px; }
.mv-key--named { background: linear-gradient(90deg, var(--theme-status-negative-ink) 50%, var(--theme-status-positive-ink) 50%); }
.mv-key--unresolved { background: repeating-linear-gradient(135deg, var(--theme-ink-muted) 0 2px, transparent 2px 4px); }
.mv-key--held { background: var(--theme-status-warning-surface); border: 1px solid var(--theme-status-warning-ink); }
.mv-key--market { width: 2px; height: 14px; background: var(--theme-ink-primary); }

.mv-strip-row {
  display: grid;
  grid-template-columns: 5.5rem minmax(0, 1fr);
  align-items: center;
  gap: 0.8rem;
  padding: 0.35rem 0;
}
.mv-strip-k { font-size: 0.86rem; font-weight: 600; }
.mv-strip-track {
  position: relative;
  display: block;
  height: 38px;
  background: var(--theme-surface-inset);
  border-radius: 2px;
}
.mv-strip-track--unavailable {
  display: flex; align-items: center; padding: 0 0.6rem;
  font-size: 0.8rem; color: var(--theme-ink-muted);
}
.mv-seg { position: absolute; height: 9px; min-width: 2px; }
.mv-seg--named { top: 4px; }
.mv-seg--unresolved { top: 14.5px; }
.mv-seg--held { top: 25px; }
.mv-seg--named.mv-seg--down { background: var(--theme-status-negative-ink); }
.mv-seg--named.mv-seg--up { background: var(--theme-status-positive-ink); }
.mv-seg--unresolved { background: repeating-linear-gradient(135deg, var(--theme-ink-muted) 0 2px, transparent 2px 5px); }
.mv-seg--held {
  background: var(--theme-status-warning-surface);
  box-shadow: inset 0 0 0 1px var(--theme-status-warning-ink);
}
.mv-zero { position: absolute; top: 0; bottom: 0; width: 1px; background: var(--theme-rule-strong); }
.mv-market-mark {
  position: absolute; top: -3px; bottom: -3px; width: 2px; margin-left: -1px;
  background: var(--theme-ink-primary);
}

.mv-strip figcaption { margin: 0.8rem 0 0; font-size: 0.84rem; color: var(--theme-ink-secondary); max-width: 70ch; }

.mv-ledger, .mv-held-table {
  width: 100%;
  border-collapse: collapse;
  font-size: 0.86rem;
}
.mv-ledger { margin-top: 1.1rem; }
.mv-ledger th, .mv-ledger td, .mv-held-table th, .mv-held-table td {
  padding: 0.45rem 0.6rem 0.45rem 0;
  border-bottom: 1px solid var(--theme-rule-subtle);
  text-align: left;
  vertical-align: baseline;
}
.mv-ledger thead th, .mv-held-table thead th {
  font-size: 0.7rem; font-weight: 600; letter-spacing: 0.08em; text-transform: uppercase;
  color: var(--theme-ink-muted); border-bottom-color: var(--theme-rule-standard);
}
.mv-ledger td.mv-num, .mv-held-table .mv-num { text-align: right; }
.mv-ledger thead th:not(:first-child) { text-align: right; }
.mv-unavailable { color: var(--theme-ink-muted); font-style: italic; }

/* ── Scopes ───────────────────────────────────────────────────────────────── */

.mv-scopes { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 2rem; }
.mv-scope { min-width: 0; border-top: 2px solid var(--theme-ink-primary); padding-top: 0.8rem; }
.mv-scope-head h3 { margin: 0; font-family: var(--serif-display); font-weight: 500; font-size: 1.5rem; }
.mv-scope-sum { margin: 0.3rem 0 0.8rem; font-size: 0.86rem; color: var(--theme-ink-secondary); }
.mv-scope-sum .mv-num { font-size: 1rem; }

.mv-movers-grid { display: grid; gap: 1rem; }
.mv-movers h4, .mv-aside-block h4 {
  margin: 0 0 0.4rem;
  display: flex; justify-content: space-between; gap: 0.6rem;
  font-size: 0.7rem; font-weight: 600; letter-spacing: 0.08em; text-transform: uppercase;
  color: var(--theme-ink-muted);
}
.mv-movers ol { list-style: none; margin: 0; padding: 0; }
.mv-mover {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  grid-template-rows: auto 4px;
  column-gap: 0.6rem;
  padding: 0.35rem 0 0.4rem;
  border-bottom: 1px solid var(--theme-rule-subtle);
}
.mv-mover-k { font-size: 0.92rem; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.mv-mover-v { font-family: var(--mono); font-size: 0.86rem; font-variant-numeric: tabular-nums; text-align: right; }
.mv-bar { grid-column: 1 / -1; margin-top: 0.3rem; height: 3px; background: transparent; }
.mv-bar span { display: block; height: 100%; }
.mv-mover.mv-up .mv-bar span { background: var(--theme-status-positive-ink); }
.mv-mover.mv-down .mv-bar span { background: var(--theme-status-negative-ink); }

.mv-aside {
  margin-top: 1.1rem;
  padding: 0.8rem 0.9rem;
  background: var(--theme-surface-raised);
  border: 1px solid var(--theme-rule-subtle);
  display: grid;
  gap: 0.9rem;
}
.mv-aside-list { list-style: none; margin: 0; padding: 0; font-size: 0.84rem; }
.mv-aside-list li { display: flex; justify-content: space-between; gap: 0.6rem; padding: 0.2rem 0; }
.mv-aside-list small { color: var(--theme-ink-muted); }
.mv-aside .mv-fine { margin: 0 0 0.4rem; font-size: 0.78rem; }
.mv-held-detail summary { cursor: pointer; font-size: 0.84rem; color: var(--theme-ink-link); }
.mv-held-table { margin-top: 0.5rem; font-size: 0.78rem; }

/* ── Narrative ────────────────────────────────────────────────────────────── */

.mv-narrative p { max-width: 68ch; margin: 0 0 0.8rem; line-height: 1.65; font-size: 1rem; }
.mv-narrative p:first-of-type { font-family: var(--serif-display); font-size: 1.25rem; line-height: 1.45; }

/* ── Evidence ─────────────────────────────────────────────────────────────── */

.mv-ev-grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 1.5rem 2.5rem; }
.mv-ev-group { min-width: 0; }
.mv-ev-group h3 { margin: 0 0 0.4rem; font-size: 0.9rem; font-weight: 600; }
.mv-ev-group dl { margin: 0; }
.mv-ev-row { padding: 0.45rem 0; border-bottom: 1px solid var(--theme-rule-subtle); }
.mv-ev-row dt { font-size: 0.72rem; letter-spacing: 0.06em; text-transform: uppercase; color: var(--theme-ink-muted); }
.mv-ev-row dd { margin: 0.2rem 0 0; font-size: 0.86rem; }
.mv-ev-row dd small { display: block; margin-top: 0.2rem; font-size: 0.76rem; color: var(--theme-ink-muted); }

/* ── Citation and links ───────────────────────────────────────────────────── */

.mv-cite-main {
  margin: 0 0 0.8rem;
  padding: 1rem 1.1rem;
  max-width: 76ch;
  border-left: 3px solid var(--theme-ink-primary);
  background: var(--theme-surface-raised);
  font-size: 0.96rem;
  line-height: 1.6;
  overflow-wrap: anywhere;
}
.mv-cite-forms { margin: 1rem 0 0; max-width: 76ch; }
.mv-cite-form { padding: 0.6rem 0; border-top: 1px solid var(--theme-rule-subtle); }
.mv-cite-form dt { font-size: 0.82rem; font-weight: 600; }
.mv-cite-form dt small { font-weight: 400; color: var(--theme-ink-muted); }
.mv-cite-form dd { margin: 0.3rem 0 0; }
.mv-cite-form blockquote { margin: 0; font-size: 0.88rem; line-height: 1.55; color: var(--theme-ink-secondary); }
.mv-copy {
  margin-top: 0.4rem;
  font: inherit;
  font-size: 0.8rem;
  padding: 0.3rem 0.8rem;
  color: var(--theme-ink-primary);
  background: transparent;
  border: 1px solid var(--theme-rule-interactive);
  border-radius: 2px;
  cursor: pointer;
}
.mv-copy:hover { background: var(--theme-surface-hover); }

.mv-tiers { display: grid; grid-template-columns: repeat(5, minmax(0, 1fr)); gap: 1.5rem; }
.mv-tier { min-width: 0; border-top: 1px solid var(--theme-rule-standard); padding-top: 0.6rem; }
.mv-tier h3 { margin: 0 0 0.5rem; font-size: 0.92rem; font-weight: 600; }
.mv-tier h3 small {
  display: block; margin-top: 0.15rem;
  font-size: 0.68rem; font-weight: 400; letter-spacing: 0.08em; text-transform: uppercase;
  color: var(--theme-ink-muted);
}
.mv-tier[data-tier="move"] { border-top: 2px solid var(--theme-ink-primary); }
.mv-links ul { list-style: none; margin: 0; padding: 0; }
.mv-links li { padding: 0.25rem 0; font-size: 0.9rem; }
.mv-signal { margin: 0; font-size: 0.9rem; color: var(--theme-ink-secondary); line-height: 1.5; }

/* ── Narrow screens ───────────────────────────────────────────────────────── */

@media (max-width: 1000px) {
  .mv-scopes { grid-template-columns: minmax(0, 1fr); }
  .mv-ev-grid { grid-template-columns: minmax(0, 1fr); }
  .mv-tiers { grid-template-columns: repeat(2, minmax(0, 1fr)); }
}

@media (max-width: 640px) {
  .mv-market { grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); }
  .mv-market .mv-market-main { grid-column: 1 / -1; }
  .mv-strip-row { grid-template-columns: minmax(0, 1fr); gap: 0.3rem; }
  .mv-tiers { grid-template-columns: minmax(0, 1fr); }
  .mv-ledger { display: block; overflow-x: auto; }
}

/* Figures and table headings never break mid-token; a narrow table scrolls instead. */
.mv-ledger th, .mv-ledger td { overflow-wrap: normal; white-space: nowrap; }
.mv-scope .mv-fine { margin: 0 0 1rem; }
.mv-narrative p, .mv-standfirst, .mv-scope-sum { overflow-wrap: normal; }

/* ── /move home ───────────────────────────────────────────────────────────── */

.mv-latest-range { margin: 0 0 0.4rem; font-family: var(--serif-display); font-size: clamp(1.6rem, 4vw, 2.4rem); line-height: 1.15; }
.mv-latest-range a { color: var(--theme-ink-primary); text-decoration-thickness: 1px; }
.mv-handoff { font-weight: 600; }
.mv-records { list-style: none; margin: 0; padding: 0; max-width: 980px; }
.mv-record { padding: 0.9rem 0; border-bottom: 1px solid var(--theme-rule-subtle); }
.mv-record-head { display: flex; flex-wrap: wrap; justify-content: space-between; gap: 0.4rem 1rem; font-size: 1.05rem; }
.mv-record-scopes { display: flex; flex-wrap: wrap; gap: 0.3rem 1.6rem; margin: 0.4rem 0 0; font-size: 0.84rem; }
.mv-record-scopes div { display: flex; gap: 0.45rem; }
.mv-record-scopes dt { color: var(--theme-ink-muted); }
.mv-record-scopes dd { margin: 0; }
.mv-record-hash { margin: 0.45rem 0 0; font-size: 0.76rem; color: var(--theme-ink-muted); }
