/* Editorial app (src/Editorial.jsx). Every class is `ed-` prefixed so this file can
   move with the app in the repo split without touching app.css. */

.ed-lede { color: var(--text-muted); font-size: 13.5px; max-width: 760px; margin: -6px 0 18px; }
.ed-muted { color: var(--text-muted); font-size: 12.5px; }
.ed-mono { font-family: var(--font-mono, ui-monospace, Menlo, monospace); font-size: 12px; }
.ed-break { word-break: break-all; }
.ed-crumbs { font-size: 12px; color: var(--text-muted); margin-bottom: 4px; }
.ed-crumbs a { color: inherit; text-decoration: underline; text-underline-offset: 2px; }
.ed-sec { font-family: var(--font-display); font-size: 20px; color: var(--text-strong); margin: 0 0 10px;
  display: flex; align-items: center; gap: 8px; text-transform: uppercase; letter-spacing: .01em; }

/* Shows grid */
.ed-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(250px, 1fr)); gap: 14px; }
.ed-card { display: block; background: var(--surface-card); border: 1px solid var(--border-hair); border-radius: 10px;
  padding: 16px 18px; margin-bottom: 14px; color: inherit; text-decoration: none; min-width: 0; }
.ed-grid .ed-card { margin-bottom: 0; }
.ed-show { border-top: 5px solid var(--lc-yellow); cursor: pointer; }
.ed-show:hover { box-shadow: 0 4px 14px rgba(14, 18, 24, .08); }
.ed-show h3 { font-family: var(--font-display); font-size: 26px; line-height: 1; margin: 2px 0 4px; color: var(--text-strong); text-transform: uppercase; }
.ed-prefix { font-size: 11px; font-weight: 800; letter-spacing: .08em; color: var(--text-muted); text-transform: uppercase; }
.ed-stats { display: flex; gap: 22px; margin-top: 14px; }
.ed-n { font-family: var(--font-display); font-size: 30px; line-height: .9; color: var(--text-strong); }
.ed-l { font-size: 10px; letter-spacing: .12em; text-transform: uppercase; color: var(--text-muted); font-weight: 700; margin-top: 3px; }
.ed-bar { height: 5px; background: var(--lc-slate-200); border-radius: 3px; margin-top: 12px; overflow: hidden; }
.ed-bar i { display: block; height: 100%; background: var(--lc-ink); }

/* Filters */
.ed-filters { display: flex; gap: 8px; flex-wrap: wrap; align-items: center; margin: 0 0 14px; }
.ed-input { border: 1px solid var(--lc-slate-200); border-radius: 6px; padding: 8px 11px; font-size: 13.5px;
  font-family: var(--font-text); background: var(--surface-card); color: var(--text-body); max-width: 100%; }
.ed-filters > .ed-input:first-child { width: 340px; }
.ed-filters > .ed-input--big { flex: 1; min-width: 240px; font-size: 15px; padding: 11px 13px; }
.ed-chip { border: 1px solid var(--lc-slate-200); background: var(--surface-card); border-radius: 20px; padding: 5px 12px;
  font-size: 12.5px; font-weight: 600; cursor: pointer; color: var(--text-body); font-family: var(--font-text); }
.ed-chip.on { background: var(--lc-ink); color: #fff; border-color: var(--lc-ink); }

/* Month groups */
.ed-season { background: var(--surface-card); border: 1px solid var(--border-hair); border-radius: 10px; margin-bottom: 10px; overflow: hidden; }
.ed-season__h { display: flex; align-items: center; gap: 12px; width: 100%; padding: 11px 16px; cursor: pointer; background: none;
  border: none; text-align: left; font-family: var(--font-text); color: var(--text-body); }
.ed-season__h:hover { background: var(--lc-paper-2, #FBF8E6); }
.ed-season__t { font-family: var(--font-display); font-size: 21px; color: var(--text-strong); text-transform: uppercase; }

/* Episode table */
.ed-tablewrap { overflow-x: auto; }
.ed-table { width: 100%; border-collapse: collapse; table-layout: fixed; min-width: 720px; }
.ed-table td { overflow: hidden; }
.ed-table thead th { text-align: left; font-size: 10.5px; letter-spacing: .1em; text-transform: uppercase; color: var(--text-muted);
  font-weight: 700; padding: 9px 12px; border-bottom: 2px solid var(--rule-ink); background: var(--surface-card); }
.ed-table tbody td { padding: 10px 12px; border-top: 1px solid var(--border-hair); font-size: 13.5px; vertical-align: top; }
.ed-click { cursor: pointer; }
.ed-click:hover { background: var(--lc-paper-2, #FBF8E6); }
.ed-ttl { font-weight: 700; color: var(--text-strong); }
.ed-why { font-size: 11.5px; color: var(--lc-red-deep); margin-top: 3px; }

/* Matter chips + dots */
.ed-mchip { display: inline-flex; max-width: 100%; align-items: center; gap: 5px; border: 1px solid var(--lc-slate-200);
  background: var(--surface-card); border-radius: 5px; padding: 2px 8px; font-size: 12px; font-weight: 600; cursor: pointer;
  margin: 2px 4px 2px 0; color: var(--text-body); font-family: var(--font-text); }
.ed-mchip:hover { border-color: var(--lc-ink); }
.ed-mchip.is-proposed { border-style: dashed; }
.ed-mchip__lab { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.ed-dot { width: 7px; height: 7px; border-radius: 50%; flex: none; display: inline-block; }
.ed-dot.confirmed { background: #1f6b3f; }
.ed-dot.proposed { background: var(--lc-yellow-deep); }

.ed-pill { display: inline-block; padding: 2px 9px; border-radius: 20px; font-size: 11px; font-weight: 700; white-space: nowrap; }
.ed-pill.ok { background: #D8EFE0; color: #1f6b3f; }
.ed-pill.warn { background: #FCEEBE; color: #7a5b00; }
.ed-pill.n { background: #E7E5DF; color: #5b5b55; }

/* Episode page */
.ed-ephead { background: var(--lc-navy); color: #fff; border-radius: 10px; padding: 22px 24px; margin: 8px 0 18px; }
.ed-ephead h1 { font-family: var(--font-display); font-size: 36px; line-height: 1; margin: 10px 0 6px; text-transform: uppercase; overflow-wrap: anywhere; }
.ed-ephead__sub { color: var(--text-on-dark-mut); font-size: 13px; }
.ed-ephead__meta { display: flex; gap: 22px; flex-wrap: wrap; margin-top: 14px; }
.ed-ephead__meta .k { font-size: 10px; letter-spacing: .12em; text-transform: uppercase; color: var(--text-on-dark-mut); font-weight: 700; }
.ed-ephead__meta .v { font-size: 14px; font-weight: 700; margin-top: 3px; }
.ed-showtag { display: inline-block; background: var(--lc-yellow); color: #000; font-size: 11px; font-weight: 800; padding: 3px 9px;
  border-radius: 4px; letter-spacing: .04em; text-decoration: none; text-transform: uppercase; }
.ed-cols { display: grid; grid-template-columns: 1.4fr 1fr; gap: 16px; align-items: start; }
.ed-cols > div { min-width: 0; }
.ed-kv { display: grid; grid-template-columns: 110px 1fr; gap: 8px 12px; font-size: 13.5px; }
.ed-kv > div { min-width: 0; }
.ed-k { font-size: 11px; letter-spacing: .08em; text-transform: uppercase; color: var(--text-muted); font-weight: 700; padding-top: 2px; }
.ed-pre { white-space: pre-wrap; }
.ed-linkrow { display: flex; align-items: flex-start; gap: 10px; padding: 10px 0; border-top: 1px solid var(--border-hair); }
.ed-linkrow:first-of-type { border-top: none; }
.ed-linkrow > .ed-dot { margin-top: 6px; }
.ed-lab { font-weight: 700; color: var(--text-strong); text-decoration: underline; text-decoration-color: var(--lc-slate-300); text-underline-offset: 3px; }
.ed-person { color: inherit; font-weight: 600; text-decoration: underline; text-decoration-color: var(--lc-slate-300); text-underline-offset: 3px; }
.ed-ext { color: var(--text-link, inherit); display: inline-flex; align-items: center; gap: 4px; overflow-wrap: anywhere; }
.ed-clip { font-size: 12.5px; color: var(--text-body); margin-top: 4px; display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; }
.ed-note { font-size: 12px; color: var(--text-muted); background: var(--lc-paper, #F6F4EE); border-left: 3px solid var(--lc-yellow); padding: 8px 10px; }

/* Matter page → Coverage → Episodes */
.ed-cov-row { display: flex; gap: 12px; align-items: baseline; padding: 8px 0; border-top: 1px solid var(--border-hair); font-size: 13.5px; }
.ed-cov-row:first-child { border-top: none; }
.ed-cov-row .ed-cov-date { width: 96px; flex: none; color: var(--text-muted); font-size: 12.5px; }
.ed-cov-row .ed-cov-show { width: 150px; flex: none; color: var(--text-muted); font-size: 12.5px; }
.ed-cov-row .ed-cov-title { flex: 1; min-width: 0; }

@media (max-width: 980px) { .ed-cols { grid-template-columns: 1fr; } }
@media (max-width: 640px) {
  .ed-table { min-width: 0; }
  .ed-table .ed-opt { display: none; }
  .ed-cov-row { flex-wrap: wrap; }
  .ed-cov-row .ed-cov-show { width: auto; }
  .ed-ephead h1 { font-size: 28px; }
  .ed-kv { grid-template-columns: 1fr; gap: 2px 0; }
  .ed-kv .ed-k { padding-top: 8px; }
}
.ed-nowrap { white-space: nowrap; }

/* Link Review (src/EditorialReview.jsx, E2c) */
.ed-lr-stats { display: flex; gap: 22px; }
.ed-lr-stats > div { text-align: right; }
.ed-lr-stats b { display: block; font-family: var(--font-display); font-size: 30px; line-height: .9; color: var(--text-strong); }
.ed-lr-stats span { font-size: 10px; letter-spacing: .12em; text-transform: uppercase; color: var(--text-muted); font-weight: 700; }
.ed-lr-tabs { display: flex; gap: 6px; margin: 4px 0 14px; flex-wrap: wrap; }
.ed-chip b { margin-left: 4px; font-weight: 800; opacity: .75; }
.ed-lr-find { flex: 1; min-width: 200px; }
.ed-lr-bulk { display: flex; justify-content: space-between; align-items: center; gap: 12px; flex-wrap: wrap;
  background: var(--lc-paper, #F6F4EE); border-left: 3px solid var(--lc-yellow); padding: 9px 12px; margin-bottom: 14px; font-size: 13px; }
.ed-lr-bulk-act, .ed-lr-gact { display: inline-flex; align-items: center; gap: 10px; flex-wrap: wrap; }
.ed-lr-show .ed-sec { margin-top: 18px; gap: 10px; }
.ed-lr-show .ed-sec .ed-muted { font-family: var(--font-text); text-transform: none; letter-spacing: 0; font-size: 12.5px; }
.ed-lr-card { padding: 12px 16px 6px; }
.ed-lr-mhead { display: flex; align-items: baseline; gap: 10px; flex-wrap: wrap; padding-bottom: 6px; }
.ed-lr-mlink { background: none; border: none; padding: 0; font-family: var(--font-text); font-size: 15px; font-weight: 800;
  color: var(--text-strong); cursor: pointer; text-align: left; text-decoration: underline; text-decoration-color: var(--lc-slate-300); text-underline-offset: 3px; }
.ed-lr-wt { font-style: italic; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; max-width: 420px; }
.ed-lr-look { color: #7a5b00; font-weight: 700; }
.ed-lr-row { display: flex; gap: 10px; padding: 10px 0; border-top: 1px solid var(--border-hair); }
.ed-lr-row.is-sel { background: rgba(252, 238, 33, .12); }
.ed-lr-check { padding-top: 2px; flex: none; }
.ed-lr-body { flex: 1; min-width: 0; }
.ed-lr-top { display: flex; align-items: flex-start; gap: 10px; }
.ed-lr-ep { flex: 1; min-width: 0; font-weight: 700; color: var(--text-strong); text-decoration: none; overflow-wrap: anywhere; }
.ed-lr-ep:hover { text-decoration: underline; }
.ed-lr-meta { display: inline-flex; gap: 6px; align-items: center; flex: none; }
.ed-lr-src { font-size: 10.5px; font-weight: 700; letter-spacing: .06em; text-transform: uppercase; padding: 2px 7px; border-radius: 4px; background: #E7E5DF; color: #5b5b55; }
.ed-lr-src--ai { background: rgba(40, 90, 200, .10); color: #24509e; }
.ed-lr-src--title_match { background: rgba(35, 140, 70, .12); color: #1c6b39; }
.ed-lr-mark { background: rgba(252, 238, 33, .65); color: inherit; padding: 0 1px; border-radius: 2px; }
.ed-lr-ev { margin-top: 5px; font-size: 12.5px; line-height: 1.5; color: var(--text-muted); overflow-wrap: anywhere; }
.ed-lr-quote { border-left: 2px solid var(--lc-slate-200); padding-left: 8px; margin: 4px 0; color: var(--text-body); }
.ed-lr-why { color: #24509e; margin-top: 2px; }
.ed-lr-warn { color: #7a5b00; margin-top: 3px; font-weight: 600; }
.ed-lr-actions { display: flex; align-items: center; justify-content: flex-end; gap: 12px; margin-top: 8px; flex-wrap: wrap; }
.ed-lr-actions .lc-input { max-width: 320px; }
.ed-lr-role { width: auto; padding: 4px 8px; font-size: 12.5px; }
.ed-lr-picker { margin-top: 8px; display: flex; flex-direction: column; gap: 4px; max-width: 620px; }
.ed-lr-pick { text-align: left; background: var(--surface-card); border: 1px solid var(--border-hair); border-radius: 6px; padding: 6px 10px;
  font-family: var(--font-text); font-size: 13px; cursor: pointer; color: var(--text-body); }
.ed-lr-pick:hover:not(:disabled) { border-color: var(--lc-ink); }
.ed-lr-pick:disabled { opacity: .55; cursor: default; }
.ed-lr-chosen { margin-top: 8px; font-size: 13px; background: #D8EFE0; border-radius: 6px; padding: 6px 10px; }
.ed-lr-person { display: inline-flex; align-items: center; gap: 6px; border: 1px solid var(--lc-slate-200); border-radius: 5px;
  padding: 2px 4px 2px 8px; margin: 2px 6px 2px 0; font-size: 12.5px; font-weight: 600; }
.ed-lr-warnchip { font-size: 10.5px; font-weight: 700; background: #FCEEBE; color: #7a5b00; border-radius: 4px; padding: 1px 6px; }
.ed-lr-x { background: none; border: none; cursor: pointer; font-size: 15px; line-height: 1; color: var(--text-muted); padding: 0 4px; }
.ed-lr-x:hover { color: var(--lc-red, #E71D25); }
.ed-lr-add { display: flex; gap: 6px; align-items: center; }
.ed-lr-add .ed-input { flex: 1; min-width: 0; }
@media (max-width: 640px) {
  .ed-lr .page-head { flex-direction: column; align-items: flex-start; gap: 12px; }
  .ed-lr-stats { gap: 18px; }
  .ed-lr-stats > div { text-align: left; }
  .ed-lr-top { flex-direction: column; gap: 4px; }
  .ed-lr-actions { justify-content: flex-start; }
  .ed-lr-wt { display: none; }
}

/* ---- Material (E3b): Link Review → Material, episode page, request "Used in" ---- */
.ed-mat-ic { padding-top: 2px; color: var(--lc-ink-soft, #5b5b55); }
.ed-mat-ic svg { width: 16px; height: 16px; }
.ed-mat-what { min-width: 0; overflow-wrap: anywhere; }
.ed-mat-path { font-family: var(--font-mono, ui-monospace, monospace); font-size: 12px; overflow-wrap: anywhere; }
.ed-mat-matters { margin: -4px 0 4px; }

/* Day view (#ed-day): week strip + one date across every show. */
.ed-daynav { display: flex; align-items: stretch; gap: 8px; margin: 0 0 12px; }
.ed-daynav > .ed-chip { display: inline-flex; align-items: center; }
.ed-week { display: grid; grid-template-columns: repeat(7, minmax(0, 1fr)); gap: 6px; flex: 1; min-width: 0; }
.ed-wday { display: flex; flex-direction: column; align-items: flex-start; gap: 2px; padding: 7px 10px; cursor: pointer; text-align: left;
           border: 1px solid var(--lc-slate-200); border-radius: 8px; background: var(--surface-card); color: var(--text-strong); min-width: 0; }
.ed-wday:hover { border-color: var(--lc-ink); }
.ed-wday.on { background: var(--lc-ink); color: #fff; border-color: var(--lc-ink); }
.ed-wday.is-today:not(.on) { border-color: var(--lc-ink); box-shadow: inset 0 -3px 0 var(--lc-ink); }
.ed-wday__d { font-weight: 700; font-size: 13px; white-space: nowrap; }
.ed-wday__n { font-size: 11.5px; opacity: .75; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; max-width: 100%; }
a.ed-season__h { text-decoration: none; color: inherit; }
@media (max-width: 640px) {
  .ed-week { display: flex; overflow-x: auto; }
  .ed-wday { flex: 0 0 74px; }
}
.ed-shift { font-size: 11.5px; font-weight: 700; color: var(--lc-red-deep); margin-top: 3px; }
.ed-ephead__note { font-size: 11px; opacity: .7; margin-top: 2px; }

/* Sponsors (0143) */
.ed-sponsors { display: flex; flex-wrap: wrap; gap: 4px; margin-top: 4px; }
.ed-sponsor { display: inline-block; font-size: 11px; font-weight: 700; padding: 2px 8px; border-radius: 4px;
              background: #E4ECF7; color: #1d3a63; border: 1px solid #c9d7ec; white-space: nowrap; }
.ed-sponsor i { font-style: normal; font-weight: 500; opacity: .75; }
.ed-kpis { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 10px; margin-bottom: 14px; }
.ed-kpis .ed-card { margin: 0; }
.ed-table--tight { min-width: 0; table-layout: auto; }
.ed-table--tight tbody td { padding: 7px 10px; }
.ed-delta { font-size: 11.5px; font-weight: 700; color: var(--text-muted); margin-left: 4px; }
.ed-delta.up { color: #1f6b3f; }
.ed-delta.down { color: var(--lc-red-deep); }
@media (max-width: 640px) { .ed-kpis { grid-template-columns: 1fr; } }
