/* Folded board: every panel keeps the old kicker + heading header, collapses on tap,
   and remembers its state. New official layers reuse the same surfaces. */

/* ---- Folds ------------------------------------------------------------- */
.watch-rebuild details.watch-fold > summary { list-style: none; cursor: pointer; }
.watch-rebuild details.watch-fold > summary::-webkit-details-marker { display: none; }
.watch-rebuild .watch-fold > summary.watch-panel-header,
.watch-rebuild .watch-fold > summary.watch-rail-header { display: flex; align-items: center; gap: 12px; min-height: 52px; }
.watch-rebuild .watch-fold > summary > div:first-child { flex: 1 1 auto; min-width: 0; }
.watch-rebuild .watch-fold > summary h2 { white-space: normal; line-height: 1.15; }
.watch-rebuild .watch-fold > summary:hover { background: var(--watch-surface-3); }
.watch-rebuild .watch-fold > summary:focus-visible { outline: 2px solid var(--watch-accent); outline-offset: -2px; }
.watch-rebuild .watch-fold:not([open]) > summary { border-bottom: none; }
.watch-rebuild .watch-fold-meta {
  color: var(--watch-text-3); font-family: var(--watch-display); font-size: 0.74rem; font-weight: 600;
  letter-spacing: 0.08em; text-transform: uppercase; white-space: nowrap; font-variant-numeric: tabular-nums;
}
.watch-rebuild .watch-fold-chevron {
  flex-shrink: 0; width: 8px; height: 8px; margin: 0 4px 3px 0;
  border-right: 1.5px solid var(--watch-text-3); border-bottom: 1.5px solid var(--watch-text-3);
  transform: rotate(-45deg); transition: transform 160ms ease, border-color 160ms ease;
}
.watch-rebuild .watch-fold[open] > summary .watch-fold-chevron { transform: rotate(45deg); border-color: var(--watch-amber); margin-bottom: 0; margin-top: -3px; }
.watch-rebuild .watch-reference.watch-fold > summary::after { content: none; }
.watch-rebuild .watch-reference.watch-fold > summary.watch-panel-header { font-size: inherit; letter-spacing: normal; text-transform: none; }

/* Subfolds sit inside a panel body: quieter, one line, chevron on the right. */
.watch-rebuild .watch-subfold { margin-top: 10px; border: 1px solid color-mix(in oklab, var(--watch-border) 88%, black 12%); background: var(--watch-surface-2); }
.watch-rebuild .watch-subfold > summary {
  list-style: none; cursor: pointer; display: flex; align-items: center; gap: 8px; min-height: 40px; padding: 8px 12px;
  color: var(--watch-text-2); font-family: var(--watch-display); font-size: 0.76rem; font-weight: 700; letter-spacing: 0.12em; text-transform: uppercase;
}
.watch-rebuild .watch-subfold > summary::-webkit-details-marker { display: none; }
.watch-rebuild .watch-subfold > summary::after {
  content: ""; margin-left: auto; width: 7px; height: 7px; margin-bottom: 3px;
  border-right: 1.5px solid var(--watch-text-3); border-bottom: 1.5px solid var(--watch-text-3); transform: rotate(-45deg); transition: transform 160ms ease;
}
.watch-rebuild .watch-subfold[open] > summary::after { transform: rotate(45deg); border-color: var(--watch-amber); margin-bottom: 0; margin-top: -3px; }
.watch-rebuild .watch-subfold > summary:hover { color: var(--watch-text); background: var(--watch-surface-3); }
.watch-rebuild .watch-subfold > :not(summary) { padding: 0 12px 12px; }
.watch-rebuild .watch-subfold > .watch-indicator-list { padding: 0 8px 8px; }
.watch-rebuild .watch-subfold > .watch-table { padding: 0; width: 100%; }
.watch-rebuild .watch-subfold > .watch-note { margin: 0 12px 12px; }

/* ---- Monitor line -------------------------------------------------------- */
.watch-rebuild .watch-monitor-line {
  margin-top: 10px; padding: 8px 14px; display: flex; flex-wrap: wrap; align-items: baseline; gap: 4px 14px;
  border: 1px solid var(--watch-border); background: color-mix(in oklab, var(--watch-surface) 94%, var(--watch-amber) 6%);
  color: var(--watch-text-2); font-size: 0.8rem; line-height: 1.45;
}
.watch-rebuild .watch-monitor-label { color: var(--watch-muted, var(--watch-text-3)); font-family: var(--watch-display); font-size: 0.7rem; font-weight: 700; letter-spacing: 0.12em; text-transform: uppercase; white-space: nowrap; }
.watch-rebuild .watch-monitor-label strong { color: var(--watch-text); }
.watch-rebuild .watch-monitor-copy { flex: 1 1 320px; min-width: 0; }
.watch-rebuild .watch-inline-more { flex: 1 1 100%; }
.watch-rebuild .watch-inline-more > summary { list-style: none; cursor: pointer; display: inline-block; color: var(--watch-text-3); font-family: var(--watch-display); font-size: 0.7rem; font-weight: 700; letter-spacing: 0.12em; text-transform: uppercase; }
.watch-rebuild .watch-inline-more > summary::-webkit-details-marker { display: none; }
.watch-rebuild .watch-inline-more > summary::after { content: " ▾"; }
.watch-rebuild .watch-inline-more[open] > summary::after { content: " ▴"; }
.watch-rebuild .watch-inline-more-body p { margin: 6px 0 0; }

/* ---- Shared text roles -------------------------------------------------- */
.watch-rebuild .watch-caution { color: var(--watch-amber); }
.watch-rebuild .watch-footnote { margin: 10px 0 0; color: var(--watch-text-3); font-size: 0.74rem; line-height: 1.5; }
.watch-rebuild .watch-footnote a, .watch-rebuild .wb-warning a, .watch-rebuild .wb-document a, .watch-rebuild .wb-assessment a, .watch-rebuild .wb-source-list a, .watch-rebuild .watch-action-line a { color: var(--watch-accent); text-decoration: underline; text-underline-offset: 3px; }
.watch-rebuild .watch-analysis-overview { margin: 0; color: var(--watch-text); font-size: 0.9rem; line-height: 1.6; }
.watch-rebuild .watch-analysis-points { display: grid; gap: 8px; color: var(--watch-text-2); font-size: 0.82rem; line-height: 1.55; }
.watch-rebuild .watch-analysis-points p { margin: 0; }
.watch-rebuild .wb-tag { display: inline-block; padding: 2px 7px; border: 1px solid var(--watch-border); color: var(--watch-text-2); font-family: var(--watch-display); font-size: 0.66rem; font-weight: 700; letter-spacing: 0.1em; text-transform: uppercase; white-space: nowrap; }
.watch-rebuild .wb-tag.wb-kind-warning { color: var(--watch-amber); border-color: color-mix(in oklab, var(--watch-amber) 50%, transparent); }
.watch-rebuild .wb-tag.wb-kind-reported_incident { color: var(--watch-red); border-color: color-mix(in oklab, var(--watch-red) 50%, transparent); }
.watch-rebuild .wb-tag.wb-kind-investigation { color: var(--watch-cyan); border-color: color-mix(in oklab, var(--watch-cyan) 50%, transparent); }
.watch-rebuild .wb-tag.wb-kind-disrupted_plot { color: var(--watch-green); border-color: color-mix(in oklab, var(--watch-green) 50%, transparent); }
.watch-rebuild .wb-tag.wb-kind-assessment { color: var(--watch-violet); border-color: color-mix(in oklab, var(--watch-violet) 50%, transparent); }

/* ---- Indicator rows ------------------------------------------------------ */
.watch-rebuild .watch-indicator-row:not(.is-open) .watch-indicator-main > .watch-rationale { display: -webkit-box; -webkit-line-clamp: 3; -webkit-box-orient: vertical; overflow: hidden; }
.watch-rebuild .watch-indicator-toggle {
  display: flex; align-items: center; gap: 6px; width: 100%; padding: 0; margin: 0; border: 0; background: none;
  color: inherit; font: inherit; text-align: left; cursor: pointer;
}
.watch-rebuild .watch-indicator-toggle:focus-visible { outline: 2px solid var(--watch-accent); outline-offset: 2px; }
.watch-rebuild .watch-indicator-chevron { width: 6px; height: 6px; margin-bottom: 2px; border-right: 1.5px solid var(--watch-text-3); border-bottom: 1.5px solid var(--watch-text-3); transform: rotate(45deg); transition: transform 160ms ease; }
.watch-rebuild .watch-indicator-toggle[aria-expanded="true"] .watch-indicator-chevron { transform: rotate(-135deg); margin-bottom: -2px; border-color: var(--watch-amber); }
.watch-rebuild .watch-indicator-state { color: var(--watch-text-3); font-family: var(--watch-display); font-size: 0.68rem; font-weight: 700; letter-spacing: 0.1em; text-transform: uppercase; white-space: nowrap; }
.watch-rebuild .watch-indicator-row.is-active .watch-indicator-state { color: var(--watch-amber); }
.watch-rebuild .watch-indicator-row.is-context .watch-indicator-state { color: var(--watch-cyan); }
.watch-rebuild .watch-indicator-row.is-unknown .watch-indicator-state { color: var(--watch-orange); }
.watch-rebuild .watch-indicator-list.is-quiet { display: grid; gap: 6px; margin-top: 8px; }
.watch-rebuild .watch-indicator-list.is-quiet .watch-indicator-row { padding: 7px 10px; background: transparent; }
.watch-rebuild .watch-indicator-list.is-quiet .watch-indicator-meta { margin-top: 2px; }

/* ---- Official warnings --------------------------------------------------- */
.watch-rebuild .wb-warning { border-top: 1px solid color-mix(in oklab, var(--watch-border) 70%, transparent); }
.watch-rebuild .wb-warning:first-child { border-top: none; }
.watch-rebuild .wb-warning > summary { list-style: none; cursor: pointer; display: grid; gap: 3px; padding: 10px 2px; }
.watch-rebuild .wb-warning > summary::-webkit-details-marker { display: none; }
.watch-rebuild .wb-warning > summary:hover .wb-warning-title { color: var(--watch-accent); }
.watch-rebuild .wb-meta { color: var(--watch-text-3); font-size: 0.72rem; letter-spacing: 0.02em; font-variant-numeric: tabular-nums; }
.watch-rebuild .wb-warning-title { color: var(--watch-text); font-size: 0.9rem; font-weight: 600; line-height: 1.4; }
.watch-rebuild .wb-warning-body { padding: 0 2px 12px; color: var(--watch-text-2); font-size: 0.83rem; line-height: 1.55; }
.watch-rebuild .wb-warning-body p { margin: 0 0 8px; }
.watch-rebuild .wb-warning-body .watch-footnote { margin: 0 0 8px; }

/* ---- LT72 action line ---------------------------------------------------- */
.watch-rebuild .watch-action-line { display: grid; gap: 4px; padding: 12px 14px; border-bottom: 1px solid color-mix(in oklab, var(--watch-border) 60%, transparent); color: var(--watch-text-2); font-size: 0.82rem; line-height: 1.5; }
.watch-rebuild .watch-action-line strong { color: var(--watch-text); font-size: 0.88rem; }
.watch-rebuild .watch-action-line.is-attention { background: color-mix(in oklab, var(--watch-surface) 88%, var(--watch-amber) 12%); }
.watch-rebuild .watch-action-line .watch-footnote { margin: 2px 0 0; }
.watch-rebuild .watch-reference .ref-body ul.wb-checklist { list-style: none; padding: 0; margin: 0; display: grid; gap: 8px; }
.watch-rebuild .wb-checklist li { display: flex; align-items: center; gap: 10px; }
.watch-rebuild .wb-checklist label { display: flex; align-items: center; gap: 9px; flex: 1 1 auto; cursor: pointer; }
.watch-rebuild .wb-checklist input { width: 16px; height: 16px; accent-color: var(--watch-green); }
.watch-rebuild .wb-checklist a { color: var(--watch-accent); text-decoration: none; }

/* ---- Official documents -------------------------------------------------- */
.watch-rebuild .wb-filters { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 10px; margin-bottom: 10px; }
.watch-rebuild .wb-filters label { display: grid; gap: 4px; color: var(--watch-text-3); font-family: var(--watch-display); font-size: 0.68rem; font-weight: 700; letter-spacing: 0.12em; text-transform: uppercase; }
.watch-rebuild .wb-filters select, .watch-rebuild .wb-filters input {
  width: 100%; min-height: 36px; padding: 6px 9px; border: 1px solid var(--watch-border-strong); background: var(--watch-surface-2); color: var(--watch-text);
  font-family: var(--watch-sans); font-size: 0.84rem; letter-spacing: normal; text-transform: none;
}
.watch-rebuild .wb-filters select:focus-visible, .watch-rebuild .wb-filters input:focus-visible { outline: 2px solid var(--watch-accent); outline-offset: 1px; }
.watch-rebuild .wb-result-count { margin: 0 0 4px; color: var(--watch-text-3); font-size: 0.74rem; }
.watch-rebuild .wb-document { padding: 10px 0; border-top: 1px solid color-mix(in oklab, var(--watch-border) 70%, transparent); }
.watch-rebuild .wb-document-meta { display: flex; flex-wrap: wrap; align-items: center; gap: 4px 10px; color: var(--watch-text-3); font-size: 0.72rem; font-variant-numeric: tabular-nums; }
.watch-rebuild .wb-document-reading > summary { list-style: none; cursor: pointer; padding: 5px 0; color: var(--watch-text); font-size: 0.9rem; font-weight: 600; line-height: 1.4; }
.watch-rebuild .wb-document-reading > summary::-webkit-details-marker { display: none; }
.watch-rebuild .wb-document-reading > summary:hover { color: var(--watch-accent); }
.watch-rebuild .wb-document-reading > p, .watch-rebuild .wb-document-reading details p { margin: 6px 0; color: var(--watch-text-2); font-size: 0.83rem; line-height: 1.55; }
.watch-rebuild .wb-document-footer { display: flex; flex-wrap: wrap; gap: 4px 12px; margin: 6px 0; color: var(--watch-text-3); font-size: 0.72rem; }
.watch-rebuild .wb-document-reading details { margin-top: 8px; }
.watch-rebuild .wb-document-reading details > summary { cursor: pointer; color: var(--watch-text-3); font-size: 0.74rem; }
.watch-rebuild .wb-document blockquote { margin: 6px 0; padding: 6px 10px; border-left: 2px solid var(--watch-border-strong); color: var(--watch-text-2); font-size: 0.8rem; font-style: italic; }
.watch-rebuild #wb-more { margin-top: 10px; }

/* ---- Strategic baseline -------------------------------------------------- */
.watch-rebuild .wb-assessment { border-top: 1px solid color-mix(in oklab, var(--watch-border) 70%, transparent); }
.watch-rebuild .wb-assessment > summary { list-style: none; cursor: pointer; display: flex; align-items: center; justify-content: space-between; gap: 10px; padding: 10px 2px; color: var(--watch-text); font-size: 0.9rem; font-weight: 600; line-height: 1.4; }
.watch-rebuild .wb-assessment > summary::-webkit-details-marker { display: none; }
.watch-rebuild .wb-assessment > summary:hover { color: var(--watch-accent); }
.watch-rebuild .wb-assessment-body { padding: 0 2px 12px; color: var(--watch-text-2); font-size: 0.83rem; line-height: 1.55; }
.watch-rebuild .wb-assessment-body p { margin: 0 0 8px; }
.watch-rebuild .wb-assessment-body dl { display: grid; grid-template-columns: max-content minmax(0, 1fr); gap: 3px 12px; margin: 0 0 10px; font-size: 0.76rem; }
.watch-rebuild .wb-assessment-body dt { color: var(--watch-text-3); }
.watch-rebuild .wb-assessment-body dd { margin: 0; }

/* ---- Sources & method ---------------------------------------------------- */
.watch-rebuild .wb-source-list article { padding: 8px 0; border-top: 1px solid color-mix(in oklab, var(--watch-border) 60%, transparent); font-size: 0.78rem; }
.watch-rebuild .wb-source-list article:first-child { border-top: none; }
.watch-rebuild .wb-source-list article > div { display: flex; align-items: center; justify-content: space-between; gap: 10px; }
.watch-rebuild .wb-source-list p { margin: 4px 0 0; color: var(--watch-text-3); font-size: 0.74rem; line-height: 1.45; }
.watch-rebuild .wb-method { margin: 0; padding-left: 18px; color: var(--watch-text-2); font-size: 0.78rem; line-height: 1.5; display: grid; gap: 6px; }

/* ---- News: two-line summaries keep the rail scannable ------------------- */
.watch-rebuild .watch-news-item p { display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; }
.watch-rebuild .watch-news-item.is-hidden { display: none; }

/* ---- Observations inside the fold --------------------------------------- */
.watch-rebuild .watch-observations.watch-panel-body { padding: 0; }
.watch-rebuild .watch-observations .obs-group:first-of-type { border-top: none; }

@media (max-width: 940px) {
  .watch-rebuild .wb-filters { grid-template-columns: minmax(0, 1fr); }
  .watch-rebuild .watch-fold-meta { white-space: normal; text-align: right; }
}
@media (max-width: 640px) {
  .watch-rebuild .watch-command-strip { grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 8px; }
  .watch-rebuild .watch-command-strip .watch-command-cell:first-child { grid-column: 1 / -1; }
  .watch-rebuild .watch-command-cell { min-height: 0; padding: 10px 12px; }
  .watch-rebuild .watch-fold > summary.watch-panel-header, .watch-rebuild .watch-fold > summary.watch-rail-header { gap: 8px; padding: 11px 12px; }
  .watch-rebuild .watch-fold-meta { display: none; }
  .watch-rebuild .watch-monitor-line { font-size: 0.76rem; }
}

/* ---- Lamp board ---------------------------------------------------------- */
/* Indicators and regional measurements are lamps: a dot that is lit, ringed
   (unknown) or dim, a short label, a one-line status. Detail lives in one drawer. */
.watch-rebuild .watch-lamp-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(118px, 1fr)); gap: 8px; }
.watch-rebuild .watch-lamp-grid.is-regional { grid-template-columns: repeat(auto-fill, minmax(100px, 1fr)); }
.watch-rebuild .watch-lamp {
  --lamp: var(--watch-text-3);
  display: grid; gap: 7px; align-content: start; min-height: 86px; padding: 10px 11px; margin: 0;
  border: 1px solid var(--watch-border); border-radius: 2px; background: var(--watch-surface-2);
  color: var(--watch-text-2); font: inherit; text-align: left; text-decoration: none; cursor: pointer;
  transition: border-color 140ms ease, background-color 140ms ease;
}
.watch-rebuild .watch-lamp.tone-danger { --lamp: var(--watch-red); }
.watch-rebuild .watch-lamp.tone-warning { --lamp: var(--watch-amber); }
.watch-rebuild .watch-lamp.tone-context { --lamp: var(--watch-cyan); }
.watch-rebuild .watch-lamp.tone-success { --lamp: var(--watch-green); }
.watch-rebuild .watch-lamp.tone-unknown { --lamp: var(--watch-orange); }
.watch-rebuild .watch-lamp:hover { border-color: var(--watch-border-strong); background: var(--watch-surface-3); }
.watch-rebuild .watch-lamp:focus-visible { outline: 2px solid var(--watch-accent); outline-offset: 2px; }
.watch-rebuild .watch-lamp[aria-pressed="true"] { border-color: var(--watch-accent); box-shadow: inset 0 0 0 1px var(--watch-accent); }
.watch-rebuild .watch-lamp.is-lit {
  color: var(--watch-text);
  border-color: color-mix(in oklab, var(--lamp) 55%, transparent);
  background: color-mix(in oklab, var(--watch-surface-2) 86%, var(--lamp) 14%);
}
.watch-rebuild .watch-lamp-top { display: flex; align-items: center; justify-content: space-between; gap: 8px; min-height: 14px; }
.watch-rebuild .watch-lamp-dot {
  display: block; width: 10px; height: 10px; border-radius: 999px;
  background: color-mix(in oklab, var(--watch-text-3) 35%, transparent);
}
.watch-rebuild .watch-lamp.is-lit .watch-lamp-dot {
  background: var(--lamp);
  box-shadow: 0 0 0 4px color-mix(in oklab, var(--lamp) 22%, transparent), 0 0 12px color-mix(in oklab, var(--lamp) 80%, transparent);
}
.watch-rebuild .watch-lamp.is-ring .watch-lamp-dot { background: transparent; box-shadow: inset 0 0 0 1.5px var(--lamp); }
.watch-rebuild .watch-lamp-weight {
  color: var(--watch-text-3); font-family: var(--watch-display); font-size: 0.66rem; font-weight: 700; letter-spacing: 0.08em; font-variant-numeric: tabular-nums;
}
.watch-rebuild .watch-lamp.is-lit .watch-lamp-weight { color: var(--lamp); }
.watch-rebuild .watch-lamp-title { color: var(--watch-text); font-size: 0.82rem; font-weight: 600; line-height: 1.3; }
.watch-rebuild .watch-lamp.is-dim .watch-lamp-title { color: var(--watch-text-2); }
.watch-rebuild .watch-lamp-status {
  color: var(--watch-text-3); font-family: var(--watch-display); font-size: 0.66rem; font-weight: 700; letter-spacing: 0.08em; text-transform: uppercase; line-height: 1.2;
}
.watch-rebuild .watch-lamp.is-lit .watch-lamp-status, .watch-rebuild .watch-lamp.is-ring .watch-lamp-status { color: var(--lamp); }
.watch-rebuild .watch-regional-label { margin: 16px 0 8px; }
.watch-rebuild .watch-lamp-grid > .watch-empty { grid-column: 1 / -1; margin: 0; }

/* The drawer: one indicator article at a time, already open, chevron hidden. */
.watch-rebuild .watch-lamp-detail { margin-top: 10px; border: 1px solid var(--watch-border-strong); background: var(--watch-surface); }
.watch-rebuild .watch-lamp-detail-head { display: flex; align-items: center; justify-content: space-between; gap: 10px; padding: 8px 10px 0; }
.watch-rebuild .watch-lamp-close {
  width: 30px; height: 30px; border: 1px solid var(--watch-border); border-radius: 2px; background: var(--watch-surface-2);
  color: var(--watch-text-2); font-size: 1rem; line-height: 1; cursor: pointer;
}
.watch-rebuild .watch-lamp-close:hover { color: var(--watch-text); background: var(--watch-surface-3); }
.watch-rebuild .watch-lamp-detail .watch-indicator-row { border: 0; background: transparent; padding: 8px 10px 12px; }
.watch-rebuild .watch-lamp-detail .watch-indicator-toggle { pointer-events: none; cursor: default; }
.watch-rebuild .watch-lamp-detail .watch-indicator-chevron { display: none; }
.watch-rebuild .watch-lamp-detail .watch-indicator-name { font-size: 0.92rem; }

/* ---- Situation: clamped by default ---------------------------------------- */
.watch-rebuild .watch-analysis-overview.is-clamped { display: -webkit-box; -webkit-line-clamp: 4; -webkit-box-orient: vertical; overflow: hidden; }
.watch-rebuild .watch-clamp-toggle {
  margin-top: 8px; padding: 4px 0; border: 0; background: none; cursor: pointer;
  color: var(--watch-accent); font-family: var(--watch-display); font-size: 0.72rem; font-weight: 700; letter-spacing: 0.1em; text-transform: uppercase;
}
.watch-rebuild .watch-clamp-toggle:hover { color: var(--watch-text); }
.watch-rebuild .watch-clamp-toggle:focus-visible { outline: 2px solid var(--watch-accent); outline-offset: 2px; }
/* The row's own display rule would otherwise beat the hidden attribute. */
.watch-rebuild .watch-indicator-row[hidden], .watch-rebuild .watch-lamp-detail[hidden] { display: none; }
