/* Filing Change Radar — proof-first financial filing workbench. */
* { box-sizing: border-box; }

:root {
  --ff-review: var(--act);
  --ff-watch: var(--warn);
  --ff-source: var(--info);
  --ff-covered: var(--ok);
  --ff-radius: 16px;
  --ff-radius-sm: 11px;
  --ff-glass: color-mix(in srgb, var(--panel) 88%, transparent);
  --ff-soft: color-mix(in srgb, var(--panel2) 70%, transparent);
  --ff-border: color-mix(in srgb, var(--text) 12%, transparent);
  --ff-border-strong: color-mix(in srgb, var(--text) 23%, transparent);
  --ff-shadow: 0 24px 70px -38px rgba(0, 0, 0, .72), inset 0 1px 0 rgba(255, 255, 255, .035);
}

html[data-theme="light"] {
  --ff-glass: color-mix(in srgb, var(--panel) 94%, transparent);
  --ff-soft: color-mix(in srgb, var(--panel2) 85%, var(--panel));
  --ff-border: color-mix(in srgb, #1b2430 11%, transparent);
  --ff-border-strong: color-mix(in srgb, #1b2430 21%, transparent);
  --ff-shadow: 0 20px 58px -38px rgba(22, 31, 45, .32), inset 0 1px 0 rgba(255, 255, 255, .8);
}

body.ff-page {
  min-width: 320px;
  margin: 0;
  padding: 18px;
  overflow-x: hidden;
  color: var(--text);
  background:
    radial-gradient(circle at 14% -5%, color-mix(in srgb, var(--info) 8%, transparent), transparent 31rem),
    radial-gradient(circle at 86% 14%, color-mix(in srgb, var(--act) 5%, transparent), transparent 28rem),
    var(--bg);
  font: 400 13px/1.55 var(--font-ui);
  -webkit-font-smoothing: antialiased;
}

.ff-page button,
.ff-page input,
.ff-page select { font: inherit; }

.ff-page button,
.ff-page select { color: inherit; }

.ff-page a { color: inherit; }

.ff-page [hidden] { display: none !important; }

.ff-workspace {
  position: relative;
  z-index: 1;
  display: grid;
  width: min(100%, 1480px);
  margin: 18px auto 0;
  gap: 16px;
}

.ff-main { min-width: 0; }

.ff-hero {
  display: flex;
  align-items: flex-end;
  justify-content: space-between;
  gap: 24px;
  padding: 24px 4px 22px;
}

.ff-eyebrow,
.ff-kicker {
  margin: 0 0 5px;
  color: var(--ink-info, var(--info));
  font-size: 10px;
  font-weight: 800;
  letter-spacing: .12em;
  text-transform: uppercase;
}

.ff-hero h1 {
  margin: 0;
  font-size: clamp(27px, 3.1vw, 43px);
  line-height: 1.02;
  letter-spacing: -.045em;
}

.ff-deck {
  max-width: 700px;
  margin: 10px 0 0;
  color: var(--muted);
  font-size: 14px;
}

.ff-run-meta {
  display: grid;
  grid-template-columns: repeat(4, minmax(94px, auto));
  margin: 0;
  padding: 0;
  gap: 8px;
}

.ff-run-meta > div {
  min-width: 0;
  padding-left: 12px;
  border-left: 1px solid var(--ff-border);
}

.ff-run-meta dt {
  color: var(--muted);
  font-size: 9px;
  font-weight: 700;
  letter-spacing: .08em;
  text-transform: uppercase;
}

.ff-run-meta dd {
  max-width: 180px;
  margin: 4px 0 0;
  overflow: hidden;
  font-family: var(--font-mono);
  font-size: 10px;
  font-variant-numeric: tabular-nums;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.ff-run-meta[data-freshness="current"] { --ff-freshness-ink: var(--ok); }
.ff-run-meta[data-freshness="stale"] { --ff-freshness-ink: var(--warn); }
.ff-run-meta[data-freshness="degraded"] { --ff-freshness-ink: var(--act); }
.ff-run-meta[data-freshness="unavailable"] { --ff-freshness-ink: var(--muted); }
#ff-freshness-status {
  color: var(--ff-freshness-ink, inherit);
  font-family: var(--font-ui);
  font-weight: 800;
  letter-spacing: .06em;
  text-transform: uppercase;
}

.ff-context-card,
.ff-tabs,
.ff-panel,
.ff-evidence,
.ff-receipt-inspector,
.ff-data-notice {
  border: 1px solid var(--ff-border);
  background: var(--ff-glass);
  box-shadow: var(--ff-shadow);
  backdrop-filter: saturate(145%) blur(18px);
  -webkit-backdrop-filter: saturate(145%) blur(18px);
}

.ff-context-card {
  position: relative;
  z-index: 20;
  display: grid;
  grid-template-columns: minmax(230px, .9fr) minmax(240px, 1.4fr) auto;
  align-items: end;
  min-height: 86px;
  padding: 14px 16px;
  border-radius: var(--ff-radius);
  gap: 18px;
}

.ff-company-picker > label,
.ff-desk-asof > label,
.ff-topic-filter > span,
.ff-period-controls label > span {
  display: block;
  margin-bottom: 5px;
  color: var(--muted);
  font-size: 9px;
  font-weight: 800;
  letter-spacing: .08em;
  text-transform: uppercase;
}

.ff-combobox-wrap { position: relative; }

.ff-search-icon {
  position: absolute;
  z-index: 2;
  top: 50%;
  left: 12px;
  display: grid;
  color: var(--muted);
  transform: translateY(-50%);
  pointer-events: none;
}

.ff-company-search,
.ff-topic-filter select,
.ff-period-controls select {
  width: 100%;
  min-height: 42px;
  border: 1px solid var(--ff-border);
  border-radius: 10px;
  outline: 0;
  color: var(--text);
  background: var(--gbtn-bg);
  box-shadow: inset 0 1px 0 var(--gbtn-sheen);
}

.ff-company-search {
  padding: 9px 40px 9px 36px;
  appearance: none;
}

.ff-company-search::placeholder { color: var(--muted); opacity: .85; }

.ff-search-clear {
  position: absolute;
  z-index: 3;
  top: 50%;
  right: 5px;
  width: 34px;
  height: 34px;
  padding: 0;
  border: 0;
  border-radius: 8px;
  color: var(--muted);
  background: transparent;
  font-size: 21px;
  cursor: pointer;
  transform: translateY(-50%);
}

.ff-company-options {
  position: absolute;
  z-index: 90;
  top: calc(100% + 7px);
  right: 0;
  left: 0;
  max-height: min(360px, 56vh);
  overflow-y: auto;
  padding: 6px;
  border: 1px solid var(--glass-brd, var(--ff-border));
  border-radius: 12px;
  background: var(--glass-bg, var(--panel));
  box-shadow: var(--glass-shadow, var(--popover-shadow));
  backdrop-filter: var(--glass-blur, blur(20px));
}

.ff-company-option {
  display: grid;
  grid-template-columns: 54px minmax(0, 1fr);
  width: 100%;
  min-height: 48px;
  padding: 7px 9px;
  border: 1px solid transparent;
  border-radius: 9px;
  text-align: left;
  background: transparent;
  cursor: pointer;
  gap: 10px;
}

.ff-company-option:hover,
.ff-company-option.is-active {
  border-color: var(--ff-border);
  background: var(--gbtn-bg-hover);
}

.ff-option-symbol {
  align-self: center;
  font-family: var(--font-mono);
  font-size: 12px;
  font-weight: 800;
}

.ff-option-name,
.ff-option-sector {
  display: block;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.ff-option-name { font-size: 12px; font-weight: 600; }
.ff-option-sector { color: var(--muted); font-size: 10px; }

.ff-search-empty {
  padding: 12px;
  color: var(--muted);
  text-align: center;
}

.ff-company-identity {
  display: flex;
  align-items: center;
  min-width: 0;
  padding-bottom: 2px;
  gap: 10px;
}

.ff-company-mark {
  display: grid;
  flex: 0 0 42px;
  width: 42px;
  height: 42px;
  place-items: center;
  border: 1px solid color-mix(in srgb, var(--info) 34%, var(--ff-border));
  border-radius: 11px;
  color: var(--ink-info, var(--info));
  background: color-mix(in srgb, var(--info) 9%, var(--panel2));
  font-family: var(--font-mono);
  font-size: 11px;
  font-weight: 900;
  letter-spacing: -.03em;
}

.ff-company-identity > div:last-child { min-width: 0; }

.ff-company-name {
  overflow: hidden;
  font-size: 14px;
  font-weight: 750;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.ff-company-detail {
  margin-top: 2px;
  overflow: hidden;
  color: var(--muted);
  font-size: 10px;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.ff-company-action {
  display: inline-flex;
  align-items: center;
  justify-self: end;
  min-height: 38px;
  padding: 7px 11px;
  border: 1px solid var(--ff-border);
  border-radius: 999px;
  color: var(--muted);
  background: var(--ff-soft);
  font-size: 11px;
  font-weight: 750;
  white-space: nowrap;
  gap: 7px;
}

.ff-company-action[data-action="high"] {
  border-color: color-mix(in srgb, var(--ff-review) 42%, var(--ff-border));
  color: var(--ff-review);
  background: color-mix(in srgb, var(--ff-review) 9%, var(--panel));
}

.ff-company-action[data-action="watch"] {
  border-color: color-mix(in srgb, var(--ff-watch) 43%, var(--ff-border));
  color: var(--ff-watch);
  background: color-mix(in srgb, var(--ff-watch) 9%, var(--panel));
}

.ff-company-action[data-action="limited"] {
  border-color: color-mix(in srgb, var(--muted) 48%, var(--ff-border));
  color: var(--muted);
  background: color-mix(in srgb, var(--muted) 7%, var(--panel));
}

.ff-company-action[data-action="covered"] {
  border-color: color-mix(in srgb, var(--ff-covered) 40%, var(--ff-border));
  color: var(--ff-covered);
  background: color-mix(in srgb, var(--ff-covered) 8%, var(--panel));
}

.ff-action-glyph {
  display: grid;
  width: 18px;
  height: 18px;
  place-items: center;
  border: 1px solid currentColor;
  border-radius: 50%;
  font-family: var(--font-mono);
  font-size: 11px;
  font-weight: 900;
}

.ff-data-notice {
  margin-top: 12px;
  padding: 10px 13px;
  border: 1px solid var(--ff-border);
  border-radius: 9px;
  color: var(--muted);
  font-size: 11px;
}

.ff-data-notice.is-error {
  display: flex;
  align-items: center;
  justify-content: space-between;
  color: var(--text);
  gap: 12px;
}

.ff-data-notice.is-error .ff-notice-icon {
  border-color: var(--ff-tint-act-43-border);
  color: var(--act);
}

.ff-retry {
  min-height: 36px;
  padding: 6px 13px;
  border: 1px solid var(--gbtn-brd);
  border-radius: 9px;
  background: var(--gbtn-bg);
  cursor: pointer;
}

.ff-tabs {
  position: sticky;
  z-index: 14;
  top: 8px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-top: 12px;
  padding: 6px;
  border-radius: 13px;
  gap: 12px;
}

.ff-tablist { display: flex; min-width: 0; gap: 3px; }

.ff-tab {
  display: inline-flex;
  align-items: center;
  min-height: 42px;
  padding: 8px 13px;
  border: 1px solid transparent;
  border-radius: 9px;
  color: var(--muted);
  background: transparent;
  font-size: 11px;
  font-weight: 750;
  cursor: pointer;
  gap: 7px;
}

.ff-tab:hover { color: var(--text); background: var(--gbtn-bg); }

.ff-tab.is-active {
  border-color: var(--gbtn-brd);
  color: var(--text);
  background: var(--gbtn-bg-hover);
  box-shadow: inset 0 1px 0 var(--gbtn-sheen);
}

.ff-tab-index {
  color: var(--muted);
  font-family: var(--font-mono);
  font-size: 8px;
}

.ff-tab.is-active .ff-tab-index { color: var(--ink-info, var(--info)); }

.ff-view-status {
  max-width: 35%;
  padding-right: 8px;
  overflow: hidden;
  color: var(--muted);
  font-family: var(--font-mono);
  font-size: 9px;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.ff-panel {
  min-height: 380px;
  margin-top: 12px;
  padding: 18px;
  border-radius: var(--ff-radius);
}

.ff-panel:focus { outline: none; }

.ff-panel-head {
  display: flex;
  align-items: flex-end;
  justify-content: space-between;
  min-height: 67px;
  padding: 1px 2px 15px;
  border-bottom: 1px solid var(--ff-border);
  gap: 24px;
}

.ff-panel-head h2 {
  margin: 0;
  font-size: 18px;
  line-height: 1.2;
  letter-spacing: -.025em;
}

.ff-panel-head p:not(.ff-kicker) {
  max-width: 700px;
  margin: 5px 0 0;
  color: var(--muted);
  font-size: 11px;
}

.ff-filter-summary {
  flex: 0 0 auto;
  color: var(--muted);
  font-family: var(--font-mono);
  font-size: 10px;
}

.ff-filterbar {
  display: flex;
  align-items: end;
  justify-content: space-between;
  padding: 13px 0;
  gap: 12px;
}

.ff-segmented {
  display: inline-flex;
  padding: 3px;
  border: 1px solid var(--ff-border);
  border-radius: 11px;
  background: var(--ff-soft);
  gap: 2px;
}

.ff-filter {
  display: inline-flex;
  align-items: center;
  min-height: 36px;
  padding: 6px 10px;
  border: 1px solid transparent;
  border-radius: 8px;
  color: var(--muted);
  background: transparent;
  font-size: 10px;
  font-weight: 700;
  cursor: pointer;
  gap: 5px;
}

.ff-filter:hover { color: var(--text); }

.ff-filter.is-active {
  border-color: var(--ff-border);
  color: var(--text);
  background: var(--panel);
  box-shadow: 0 3px 10px rgba(0, 0, 0, .12);
}

.ff-filter-count {
  min-width: 18px;
  padding: 1px 5px;
  border-radius: 99px;
  color: var(--muted);
  background: var(--panel2);
  font-family: var(--font-mono);
  font-size: 9px;
  text-align: center;
}

.ff-filter-symbol {
  display: inline-grid;
  width: 15px;
  height: 15px;
  place-items: center;
  border: 1px solid currentColor;
  border-radius: 50%;
  font-family: var(--font-mono);
  font-size: 9px;
  font-weight: 900;
}

.ff-filter-symbol-review { color: var(--ff-review); }
.ff-filter-symbol-watch { color: var(--ff-watch); }

.ff-topic-filter { width: min(220px, 31%); }

.ff-topic-filter select,
.ff-period-controls select {
  min-height: 38px;
  padding: 6px 32px 6px 10px;
  cursor: pointer;
}

.ff-findings { display: grid; gap: 9px; }

.ff-finding {
  position: relative;
  display: grid;
  grid-template-columns: auto minmax(0, 1fr) auto;
  width: 100%;
  min-height: 116px;
  padding: 14px;
  overflow: hidden;
  border: 1px solid var(--ff-border);
  border-radius: 13px;
  color: var(--text);
  text-align: left;
  background: color-mix(in srgb, var(--panel2) 45%, transparent);
  cursor: pointer;
  transition: border-color .16s ease, background .16s ease, transform .16s ease;
  gap: 12px;
}


.ff-finding:hover {
  border-color: var(--ff-border-strong);
  background: color-mix(in srgb, var(--panel2) 70%, transparent);
  transform: translateY(-1px);
}

.ff-finding.is-selected {
  border-color: color-mix(in srgb, var(--info) 48%, var(--ff-border));
  background: color-mix(in srgb, var(--info) 6%, var(--panel2));
}

.ff-priority-mark {
  display: grid;
  width: 28px;
  height: 28px;
  margin-top: 1px;
  place-items: center;
  border: 1px solid currentColor;
  border-radius: 50%;
  font-family: var(--font-mono);
  font-size: 12px;
  font-weight: 900;
}

.ff-finding[data-priority="high"] .ff-priority-mark { color: var(--ff-review); }
.ff-finding[data-priority="watch"] .ff-priority-mark { color: var(--ff-watch); }

.ff-finding-copy { min-width: 0; }

.ff-finding-overline {
  display: flex;
  align-items: center;
  margin-bottom: 4px;
  color: var(--muted);
  font-size: 9px;
  font-weight: 700;
  letter-spacing: .04em;
  text-transform: uppercase;
  gap: 7px;
}

.ff-priority-label { color: var(--text); }
.ff-finding[data-priority="high"] .ff-priority-label { color: var(--ff-review); }
.ff-finding[data-priority="watch"] .ff-priority-label { color: var(--ff-watch); }

.ff-finding h3 {
  margin: 0;
  font-size: 13px;
  line-height: 1.3;
  letter-spacing: -.01em;
}

.ff-finding-summary {
  display: -webkit-box;
  max-width: 800px;
  margin: 5px 0 0;
  overflow: hidden;
  color: var(--muted);
  font-size: 11px;
  -webkit-box-orient: vertical;
  -webkit-line-clamp: 2;
}

.ff-finding-periods {
  align-self: center;
  min-width: 112px;
  color: var(--muted);
  font-family: var(--font-mono);
  font-size: 9px;
  text-align: right;
}

.ff-finding-periods strong {
  display: block;
  margin-bottom: 4px;
  color: var(--text);
  font-size: 10px;
}

.ff-empty-state {
  display: grid;
  min-height: 230px;
  padding: 28px;
  place-items: center;
  border: 1px dashed var(--ff-border-strong);
  border-radius: 13px;
  color: var(--muted);
  text-align: center;
}

.ff-empty-state > div { max-width: 500px; }

.ff-empty-state h3 {
  margin: 8px 0 5px;
  color: var(--text);
  font-size: 14px;
}

.ff-empty-state p { margin: 0; font-size: 11px; }

.ff-empty-mark {
  display: inline-grid;
  width: 34px;
  height: 34px;
  place-items: center;
  border: 1px solid var(--ff-border-strong);
  border-radius: 50%;
  color: var(--muted);
  font-family: var(--font-mono);
  font-size: 15px;
}

.ff-evidence,
.ff-receipt-inspector {
  display: none;
  min-width: 0;
  border-radius: var(--ff-radius);
}

.ff-evidence-head {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  padding: 17px 18px 14px;
  border-bottom: 1px solid var(--ff-border);
  gap: 12px;
}

.ff-evidence-head h2 {
  margin: 0;
  font-size: 16px;
  line-height: 1.25;
  letter-spacing: -.02em;
}

.ff-evidence-close {
  display: none;
  flex: 0 0 42px;
  width: 42px;
  height: 42px;
  padding: 0;
  border: 1px solid var(--gbtn-brd);
  border-radius: 10px;
  color: var(--muted);
  background: var(--gbtn-bg);
  font-size: 22px;
  cursor: pointer;
}

.ff-evidence.is-open .ff-evidence-close { display: block; }

.ff-evidence-body { padding: 16px 18px 22px; }

.ff-evidence-empty {
  display: grid;
  min-height: 260px;
  place-content: center;
  color: var(--muted);
  text-align: center;
}

.ff-evidence-empty p { max-width: 290px; margin: 10px auto 0; }

.ff-proof-badge {
  display: inline-flex;
  align-items: center;
  min-height: 28px;
  margin-bottom: 10px;
  padding: 4px 9px;
  border: 1px solid currentColor;
  border-radius: 999px;
  font-size: 9px;
  font-weight: 800;
  letter-spacing: .03em;
  text-transform: uppercase;
  gap: 6px;
}

.ff-proof-badge[data-priority="high"] { color: var(--ff-review); }
.ff-proof-badge[data-priority="watch"] { color: var(--ff-watch); }

.ff-proof-summary {
  margin: 0 0 14px;
  color: var(--muted);
  font-size: 12px;
}

.ff-proof-basis {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  margin-bottom: 2px;
  padding: 9px;
  border: 1px solid var(--ff-border);
  border-radius: 10px;
  background: var(--ff-soft);
  gap: 6px;
}

.ff-proof-basis > span {
  min-width: 0;
  overflow: hidden;
  color: var(--muted);
  font-family: var(--font-mono);
  font-size: 8px;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.ff-proof-basis b {
  display: block;
  margin-bottom: 2px;
  color: var(--text);
  font-family: var(--font-ui);
  font-size: 8px;
  letter-spacing: .04em;
  text-transform: uppercase;
}

.ff-proof-section {
  padding: 14px 0;
  border-top: 1px solid var(--ff-border);
}

.ff-proof-section h3 {
  margin: 0 0 9px;
  color: var(--muted);
  font-size: 9px;
  font-weight: 800;
  letter-spacing: .09em;
  text-transform: uppercase;
}

.ff-value-grid { display: grid; gap: 6px; }

.ff-value-row {
  display: grid;
  grid-template-columns: minmax(0, 1.25fr) repeat(3, minmax(58px, .7fr));
  align-items: center;
  min-height: 52px;
  padding: 7px 9px;
  border: 1px solid var(--ff-border);
  border-radius: 9px;
  background: var(--ff-soft);
  gap: 7px;
}

.ff-value-label { font-size: 10px; font-weight: 700; }

.ff-value-cell {
  min-width: 0;
  text-align: right;
}

.ff-value-cell small {
  display: block;
  color: var(--muted);
  font-size: 8px;
  font-weight: 700;
  letter-spacing: .05em;
  text-transform: uppercase;
}

.ff-value-cell strong {
  display: block;
  overflow: hidden;
  font-family: var(--font-mono);
  font-size: 10px;
  font-variant-numeric: tabular-nums;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.ff-proof-code {
  display: block;
  margin: 0;
  padding: 10px 11px;
  overflow-wrap: anywhere;
  border: 1px solid var(--ff-border);
  border-radius: 9px;
  color: var(--text);
  background: var(--ff-soft);
  font-family: var(--font-mono);
  font-size: 10px;
  line-height: 1.55;
  white-space: pre-wrap;
}

.ff-threshold {
  margin: 8px 0 0;
  color: var(--muted);
  font-size: 10px;
}

.ff-threshold strong { color: var(--ff-watch); }

.ff-receipts,
.ff-limitations,
.ff-detector-list,
.ff-source-limitations {
  margin: 0;
  padding: 0;
  list-style: none;
}

.ff-receipt {
  display: grid;
  grid-template-columns: 24px minmax(0, 1fr) auto;
  align-items: start;
  padding: 9px 0;
  border-bottom: 1px solid var(--ff-border);
  gap: 8px;
}

.ff-receipt:last-child { border-bottom: 0; }

.ff-receipt-icon {
  display: grid;
  width: 23px;
  height: 23px;
  place-items: center;
  border: 1px solid color-mix(in srgb, var(--ff-source) 45%, var(--ff-border));
  border-radius: 7px;
  color: var(--ff-source);
  font-family: var(--font-mono);
  font-size: 9px;
  font-weight: 900;
}

.ff-receipt-label { font-size: 10px; font-weight: 700; }
.ff-receipt-basis { margin-top: 2px; color: var(--muted); font-size: 9px; }
.ff-receipt-date { color: var(--muted); font-family: var(--font-mono); font-size: 8px; }

a.ff-receipt-link {
  color: var(--ink-link, var(--link));
  text-decoration: underline;
  text-decoration-color: color-mix(in srgb, var(--link) 35%, transparent);
  text-underline-offset: 3px;
}

.ff-limitations li,
.ff-source-limitations li {
  position: relative;
  margin: 6px 0;
  padding-left: 14px;
  color: var(--muted);
  font-size: 10px;
}

.ff-limitations li::before,
.ff-source-limitations li::before {
  position: absolute;
  left: 0;
  color: var(--ink-warn, var(--warn));
  content: "—";
}

.ff-table-wrap {
  margin-top: 14px;
  overflow-x: auto;
  border: 1px solid var(--ff-border);
  border-radius: 12px;
}

.ff-table {
  width: 100%;
  min-width: 1040px;
  border-collapse: collapse;
  font-size: 10px;
}

.ff-table th,
.ff-table td {
  padding: 10px 9px;
  border-bottom: 1px solid var(--ff-border);
  text-align: right;
  font-variant-numeric: tabular-nums;
  white-space: nowrap;
}

.ff-table th {
  color: var(--muted);
  background: var(--ff-soft);
  font-size: 8px;
  font-weight: 800;
  letter-spacing: .04em;
  text-transform: uppercase;
}

.ff-table th:first-child,
.ff-table td:first-child { position: sticky; left: 0; text-align: left; }
.ff-table th:first-child { z-index: 2; background: var(--panel2); }
.ff-table td:first-child { background: var(--panel); font-weight: 750; }
.ff-table tbody tr:last-child td { border-bottom: 0; }

.ff-table .ff-period-filed {
  display: block;
  margin-top: 2px;
  color: var(--muted);
  font-family: var(--font-mono);
  font-size: 8px;
  font-weight: 400;
}

.ff-period-controls {
  display: grid;
  grid-template-columns: minmax(120px, 1fr) auto minmax(120px, 1fr);
  align-items: end;
  width: min(430px, 48%);
  gap: 8px;
}

.ff-period-arrow {
  display: grid;
  height: 38px;
  place-items: center;
  color: var(--muted);
}

.ff-compare-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  margin-top: 14px;
  gap: 9px;
}

.ff-compare-card {
  min-width: 0;
  padding: 13px;
  border: 1px solid var(--ff-border);
  border-radius: 12px;
  background: var(--ff-soft);
}

.ff-compare-card h3 {
  margin: 0 0 11px;
  font-size: 11px;
}

.ff-compare-values {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 7px;
}

.ff-compare-value {
  min-width: 0;
  padding: 8px;
  border-radius: 8px;
  background: color-mix(in srgb, var(--panel) 65%, transparent);
}

.ff-compare-value span {
  display: block;
  overflow: hidden;
  color: var(--muted);
  font-size: 8px;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.ff-compare-value strong {
  display: block;
  margin-top: 3px;
  overflow: hidden;
  font-family: var(--font-mono);
  font-size: 12px;
  font-variant-numeric: tabular-nums;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.ff-compare-delta {
  margin-top: 8px;
  color: var(--muted);
  font-family: var(--font-mono);
  font-size: 9px;
}

.ff-trace-grid {
  display: grid;
  grid-template-columns: minmax(260px, .75fr) minmax(0, 1.45fr);
  margin-top: 14px;
  gap: 12px;
}

.ff-trace-card {
  padding: 14px;
  border: 1px solid var(--ff-border);
  border-radius: 12px;
  background: var(--ff-soft);
}

.ff-trace-card + .ff-trace-card { margin-top: 9px; }

.ff-trace-card h3 {
  margin: 0 0 9px;
  font-size: 12px;
}

.ff-trace-card p { margin: 6px 0; color: var(--muted); font-size: 10px; }

.ff-coverage-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  margin: 10px 0 13px;
  gap: 6px;
}

.ff-coverage-stat {
  padding: 8px;
  border: 1px solid var(--ff-border);
  border-radius: 8px;
  background: var(--panel);
}

.ff-coverage-stat small { display: block; color: var(--muted); font-size: 8px; }
.ff-coverage-stat strong { display: block; margin-top: 2px; font-family: var(--font-mono); font-size: 11px; }

.ff-source-link {
  display: inline-flex;
  align-items: center;
  min-height: 38px;
  margin-top: 7px;
  padding: 7px 10px;
  border: 1px solid color-mix(in srgb, var(--ff-source) 38%, var(--ff-border));
  border-radius: 9px;
  color: var(--ink-link, var(--link));
  background: color-mix(in srgb, var(--ff-source) 7%, var(--panel));
  font-size: 10px;
  font-weight: 700;
  text-decoration: none;
  gap: 7px;
}

.ff-detector-list { display: grid; gap: 6px; }

.ff-detector-item {
  padding: 8px;
  border: 1px solid var(--ff-border);
  border-radius: 8px;
  background: var(--panel);
}

.ff-detector-name { font-size: 10px; font-weight: 750; }
.ff-detector-meta { margin-top: 2px; color: var(--muted); font-family: var(--font-mono); font-size: 8px; }

.ff-trace-findings { display: grid; gap: 8px; }

.ff-trace-finding {
  padding: 12px;
  border: 1px solid var(--ff-border);
  border-radius: 10px;
  background: var(--ff-soft);
}

.ff-trace-finding-head {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 12px;
}

.ff-trace-finding h3 { margin: 0; font-size: 11px; }
.ff-trace-finding .ff-proof-code { margin-top: 9px; }

.ff-trace-open {
  flex: 0 0 auto;
  min-height: 34px;
  padding: 5px 10px;
  border: 1px solid var(--gbtn-brd);
  border-radius: 8px;
  color: var(--ink-link, var(--link));
  background: var(--gbtn-bg);
  font-size: 9px;
  font-weight: 750;
  cursor: pointer;
}

.ff-trace-open:hover { border-color: var(--gbtn-brd-hover); background: var(--gbtn-bg-hover); }

.ff-trace-receipts {
  display: flex;
  flex-wrap: wrap;
  margin-top: 8px;
  gap: 6px;
}

.ff-trace-receipt {
  display: inline-flex;
  align-items: center;
  min-height: 30px;
  padding: 4px 8px;
  border: 1px solid var(--ff-border);
  border-radius: 8px;
  color: var(--ink-link, var(--link));
  background: var(--panel);
  font-size: 9px;
  text-decoration: none;
  gap: 5px;
}

/* Sources & Receipt — a separate provenance reading layer. The blue/slate
   treatment is intentionally neutral: coverage is a recorded scope, never a
   company grade or a decision cue. */
.ff-source-tabs {
  display: inline-flex;
  min-height: 44px;
  margin-top: 16px;
  padding: 4px;
  border: 1px solid var(--ff-border);
  border-radius: 12px;
  background: var(--ff-soft);
  gap: 4px;
}

.ff-source-tab {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 34px;
  padding: 6px 11px;
  border: 1px solid transparent;
  border-radius: 8px;
  color: var(--muted);
  background: transparent;
  font-size: 10px;
  font-weight: 750;
  cursor: pointer;
  gap: 6px;
}

.ff-source-tab:hover { color: var(--text); background: var(--gbtn-bg); }
.ff-source-tab.is-active {
  border-color: var(--gbtn-brd);
  color: var(--text);
  background: var(--gbtn-bg-hover);
  box-shadow: inset 0 1px 0 var(--gbtn-sheen);
}
.ff-source-tab-mark { color: var(--ff-source); font-family: var(--font-mono); font-size: 12px; }

.ff-receipt-surface { margin-top: 14px; }

.ff-receipt-intro {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  padding: 18px 18px 16px;
  border: 1px solid color-mix(in srgb, var(--ff-source) 32%, var(--ff-border));
  border-radius: 14px 14px 0 0;
  background:
    linear-gradient(118deg, color-mix(in srgb, var(--ff-source) 11%, transparent), transparent 57%),
    var(--ff-soft);
  gap: 18px;
}

.ff-receipt-intro h3,
.ff-receipt-card h3 { margin: 0; font-size: 14px; letter-spacing: -.018em; }
.ff-receipt-intro p:not(.ff-kicker) { max-width: 660px; margin: 6px 0 0; color: var(--muted); font-size: 11px; }
.ff-receipt-live-mark {
  display: grid;
  flex: 0 0 auto;
  width: 34px;
  height: 34px;
  place-items: center;
  border: 1px solid color-mix(in srgb, var(--ff-source) 48%, var(--ff-border));
  border-radius: 11px;
  color: var(--ff-source);
  background: color-mix(in srgb, var(--ff-source) 8%, var(--panel));
  font-family: var(--font-mono);
  font-size: 17px;
}

.ff-receipt-identity {
  display: grid;
  grid-template-columns: minmax(180px, 1.35fr) repeat(3, minmax(100px, .65fr));
  border: 1px solid var(--ff-border);
  border-top: 0;
  background: var(--panel);
}

.ff-receipt-identity > div { min-width: 0; padding: 11px 13px; border-right: 1px solid var(--ff-border); }
.ff-receipt-identity > div:last-child { border-right: 0; }
.ff-receipt-identity-main > span,
.ff-receipt-stat small {
  display: block;
  color: var(--muted);
  font-size: 8px;
  font-weight: 800;
  letter-spacing: .07em;
  text-transform: uppercase;
}
.ff-receipt-identity-main code {
  display: block;
  margin-top: 3px;
  overflow: hidden;
  color: var(--text);
  font-size: 10px;
  text-overflow: ellipsis;
  white-space: nowrap;
}
.ff-receipt-stat { min-width: 0; }
.ff-receipt-stat strong { display: block; margin-top: 3px; overflow: hidden; font-family: var(--font-mono); font-size: 10px; text-overflow: ellipsis; white-space: nowrap; }

.ff-receipt-card {
  margin-top: 10px;
  padding: 15px;
  border: 1px solid var(--ff-border);
  border-radius: 13px;
  background: var(--ff-soft);
}
.ff-receipt-card-head {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 14px;
}
.ff-receipt-card-head .ff-kicker { margin-bottom: 4px; }
.ff-receipt-card > p { margin: 8px 0 0; color: var(--muted); font-size: 10px; }
.ff-receipt-scope-mark,
.ff-receipt-micro {
  display: inline-flex;
  align-items: center;
  min-height: 24px;
  padding: 3px 7px;
  border: 1px solid color-mix(in srgb, var(--ff-source) 35%, var(--ff-border));
  border-radius: 999px;
  color: var(--ff-source);
  background: color-mix(in srgb, var(--ff-source) 7%, var(--panel));
  font-family: var(--font-mono);
  font-size: 8px;
  font-weight: 800;
  white-space: nowrap;
}

.ff-receipt-limits {
  display: grid;
  margin: 12px 0 0;
  padding: 0;
  list-style: none;
  gap: 5px;
}
.ff-receipt-limits li {
  padding: 7px 9px 7px 22px;
  border: 1px solid var(--ff-border);
  border-radius: 8px;
  color: var(--muted);
  background: var(--panel);
  font-size: 9px;
}
.ff-receipt-limits li::before { position: absolute; margin-left: -13px; color: var(--ff-source); content: "—"; }

.ff-receipt-status-grid {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  margin-top: 12px;
  gap: 7px;
}
.ff-receipt-status-grid > div {
  display: grid;
  align-content: space-between;
  min-height: 83px;
  padding: 9px;
  border: 1px solid var(--ff-border);
  border-radius: 9px;
  background: var(--panel);
  gap: 8px;
}
.ff-receipt-status-grid strong { color: var(--text); font-family: var(--font-mono); font-size: 18px; letter-spacing: -.04em; }
.ff-receipt-status {
  display: inline-flex;
  align-items: center;
  width: fit-content;
  min-height: 21px;
  padding: 3px 6px;
  border: 1px solid var(--ff-border-strong);
  border-radius: 999px;
  color: var(--muted);
  background: color-mix(in srgb, var(--panel2) 50%, transparent);
  font-size: 8px;
  font-weight: 750;
  line-height: 1.25;
}
.ff-receipt-status.is-all { color: var(--ff-source); border-color: color-mix(in srgb, var(--ff-source) 38%, var(--ff-border)); }
.ff-receipt-status.is-partial { color: color-mix(in srgb, var(--ff-source) 72%, var(--muted)); }
.ff-receipt-status.is-none,
.ff-receipt-status.is-not-evaluable { color: var(--muted); }

.ff-receipt-stats { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); margin-top: 12px; gap: 7px; }
.ff-receipt-stats .ff-receipt-stat { padding: 9px; border: 1px solid var(--ff-border); border-radius: 9px; background: var(--panel); }
.ff-receipt-clocks { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); margin: 10px 0 0; gap: 7px; }
.ff-receipt-clocks > div { min-width: 0; padding-left: 9px; border-left: 1px solid var(--ff-border); }
.ff-receipt-clocks dt { color: var(--muted); font-size: 8px; font-weight: 800; letter-spacing: .06em; text-transform: uppercase; }
.ff-receipt-clocks dd { margin: 3px 0 0; overflow: hidden; font-family: var(--font-mono); font-size: 9px; text-overflow: ellipsis; white-space: nowrap; }

.ff-receipt-root-note { max-width: 690px; }
.ff-receipt-root-list { display: grid; margin-top: 11px; gap: 6px; }
.ff-receipt-root {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto auto;
  align-items: center;
  width: 100%;
  min-height: 58px;
  padding: 9px 10px;
  border: 1px solid var(--ff-border);
  border-radius: 10px;
  color: var(--text);
  background: var(--panel);
  text-align: left;
  cursor: pointer;
  gap: 9px;
}
.ff-receipt-root:hover,
.ff-receipt-root.is-selected { border-color: color-mix(in srgb, var(--ff-source) 46%, var(--ff-border)); background: color-mix(in srgb, var(--ff-source) 6%, var(--panel)); }
.ff-receipt-root-id { min-width: 0; }
.ff-receipt-root-id code { display: block; overflow: hidden; font-size: 10px; text-overflow: ellipsis; white-space: nowrap; }
.ff-receipt-root-id small { display: block; margin-top: 3px; color: var(--muted); font-family: var(--font-mono); font-size: 8px; }
.ff-receipt-root-arrow { color: var(--ff-source); font-size: 18px; }
.ff-receipt-pager { display: flex; align-items: center; justify-content: space-between; margin-top: 10px; gap: 8px; }
.ff-receipt-pager span { color: var(--muted); font-family: var(--font-mono); font-size: 8px; text-align: center; }
.ff-receipt-pager button,
.ff-receipt-retry {
  min-height: 36px;
  padding: 6px 11px;
  border: 1px solid var(--gbtn-brd);
  border-radius: 9px;
  color: var(--text);
  background: var(--gbtn-bg);
  font-size: 9px;
  font-weight: 750;
  cursor: pointer;
}
.ff-receipt-pager button:hover,
.ff-receipt-retry:hover { border-color: var(--gbtn-brd-hover); background: var(--gbtn-bg-hover); }
.ff-receipt-pager button:disabled { opacity: .46; cursor: not-allowed; }

.ff-receipt-empty {
  display: grid;
  grid-template-columns: auto minmax(0, 430px);
  min-height: 225px;
  place-content: center;
  padding: 22px;
  color: var(--muted);
  text-align: left;
  gap: 12px;
}
.ff-receipt-empty h3 { margin: 0; color: var(--text); font-size: 13px; }
.ff-receipt-empty p { margin: 6px 0 0; font-size: 10px; }
.ff-receipt-empty .ff-receipt-retry { margin-top: 12px; }

.ff-receipt-inspector { display: none; }
.ff-receipt-inspector-id { display: block; margin-top: 4px; color: var(--muted); font-size: 9px; font-weight: 500; }
.ff-receipt-inspector-summary { padding-bottom: 13px; border-bottom: 1px solid var(--ff-border); }
.ff-receipt-inspector-summary p { margin: 8px 0 0; color: var(--muted); font-size: 10px; }
.ff-receipt-boundary { padding: 8px 9px; border: 1px solid var(--ff-border); border-radius: var(--r-ctl, 8px); }
.ff-receipt-waterfall { display: grid; margin-top: 12px; gap: 8px; }
.ff-receipt-waterfall-row { padding: 11px; border: 1px solid var(--ff-border); border-radius: 10px; background: var(--ff-soft); }
.ff-receipt-waterfall-row.is-recorded { border-color: color-mix(in srgb, var(--ff-source) 32%, var(--ff-border)); }
.ff-receipt-waterfall-head { display: grid; grid-template-columns: 24px minmax(0, 1fr) auto; align-items: start; gap: 8px; }
.ff-receipt-waterfall-index { display: grid; width: 23px; height: 23px; place-items: center; border: 1px solid color-mix(in srgb, var(--ff-source) 44%, var(--ff-border)); border-radius: 7px; color: var(--ff-source); font-family: var(--font-mono); font-size: 9px; font-weight: 900; }
.ff-receipt-waterfall-head strong { display: block; font-size: 10px; }
.ff-receipt-waterfall-head code { display: block; margin-top: 2px; overflow: hidden; color: var(--muted); font-size: 8px; text-overflow: ellipsis; white-space: nowrap; }
.ff-receipt-leaf-state { padding: 3px 5px; border: 1px solid var(--ff-border); border-radius: 999px; color: var(--muted); font-size: 8px; white-space: nowrap; }
.ff-receipt-waterfall-fields { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); margin: 10px 0 0; gap: 6px; }
.ff-receipt-waterfall-fields > div { min-width: 0; padding: 7px; border: 1px solid var(--ff-border); border-radius: 7px; background: var(--panel); }
.ff-receipt-waterfall-fields dt { color: var(--muted); font-size: 7px; font-weight: 800; letter-spacing: .06em; text-transform: uppercase; }
.ff-receipt-waterfall-fields dd { margin: 3px 0 0; overflow-wrap: anywhere; color: var(--text); font-size: 9px; }
.ff-receipt-unmatched { margin: 10px 0 0; padding: 8px 9px; border: 1px solid var(--ff-border-strong); border-radius: var(--r-ctl, 8px); color: var(--muted); background: var(--panel); font-size: 9px; }
.ff-receipt-projection { margin-top: 8px; padding-top: 8px; border-top: 1px solid var(--ff-border); }
.ff-receipt-projection summary { color: var(--ink-link, var(--link)); font-size: 9px; font-weight: 700; cursor: pointer; }


/* Wave 2 disclosure surfaces — evidence comes before interpretation. */
.ff-disclosure-toolbar {
  display: grid;
  grid-template-columns: minmax(0, 230px) minmax(0, 1fr);
  align-items: end;
  padding: 13px 0;
  border-bottom: 1px solid var(--ff-border);
  gap: 16px;
}

.ff-disclosure-toolbar .ff-topic-filter { width: 100%; }

.ff-lexical-note {
  grid-column: 1 / -1;
  max-width: none;
  margin: 0;
  padding-top: 9px;
  border-top: 1px solid color-mix(in srgb, var(--ff-border) 72%, transparent);
  color: var(--muted);
  font-size: 10px;
  line-height: 1.45;
}

.ff-lexical-note > .ff-lexical-glyph {
  display: inline-grid;
  width: 18px;
  height: 18px;
  margin-right: 6px;
  place-items: center;
  border: 1px solid color-mix(in srgb, var(--ff-source) 48%, var(--ff-border));
  border-radius: 50%;
  color: var(--ff-source);
  font-family: var(--font-mono);
  font-size: 9px;
  vertical-align: text-bottom;
}

.ff-disclosure-feed,
.ff-redline-list {
  display: grid;
  padding-top: 12px;
  gap: 9px;
}

.ff-disclosure-card,
.ff-redline-card {
  position: relative;
  display: grid;
  width: 100%;
  overflow: hidden;
  border: 1px solid var(--ff-border);
  border-radius: 13px;
  color: var(--text);
  text-align: left;
  background: color-mix(in srgb, var(--panel2) 43%, transparent);
  cursor: pointer;
  transition: border-color .16s ease, background .16s ease, transform .16s ease;
}

.ff-disclosure-card {
  grid-template-columns: auto minmax(0, 1fr) auto;
  min-height: 112px;
  padding: 14px;
  gap: 12px;
}

.ff-disclosure-card::before,
.ff-redline-card::before {
  position: absolute;
  top: 12px;
  bottom: 12px;
  left: 0;
  width: 3px;
  border-radius: 0 4px 4px 0;
  background: var(--ff-source);
  content: "";
}

.ff-disclosure-card:hover,
.ff-redline-card:hover {
  border-color: var(--ff-border-strong);
  background: color-mix(in srgb, var(--panel2) 74%, transparent);
  transform: translateY(-1px);
}

.ff-disclosure-card.is-selected,
.ff-redline-card.is-selected {
  border-color: color-mix(in srgb, var(--info) 52%, var(--ff-border));
  background: color-mix(in srgb, var(--info) 6%, var(--panel2));
}

.ff-disclosure-mark {
  display: grid;
  width: 28px;
  height: 28px;
  margin-top: 1px;
  place-items: center;
  border: 1px solid color-mix(in srgb, var(--ff-source) 60%, var(--ff-border));
  border-radius: 50%;
  color: var(--ff-source);
  font-family: var(--font-mono);
  font-size: 12px;
  font-weight: 900;
}

.ff-disclosure-copy,
.ff-redline-copy { min-width: 0; }

.ff-disclosure-card h3 {
  margin: 0;
  font-size: 13px;
  line-height: 1.3;
  letter-spacing: -.01em;
}

.ff-observed-label { color: var(--ff-source); }

.ff-redline-card {
  grid-template-columns: minmax(112px, auto) minmax(0, 1fr) auto;
  align-items: center;
  min-height: 94px;
  padding: 12px 14px;
  gap: 13px;
}

.ff-redline-operation {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 25px;
  padding: 4px 8px;
  border: 1px solid var(--ff-border);
  border-radius: 999px;
  color: var(--muted);
  background: var(--ff-soft);
  font-size: 8px;
  font-weight: 800;
  letter-spacing: .04em;
  text-align: center;
  text-transform: uppercase;
}

.ff-redline-operation[data-operation="added"] { color: var(--ink-ok, var(--ok)); }
.ff-redline-operation[data-operation="removed"] { color: var(--ink-act, var(--act)); }
.ff-redline-operation[data-operation="table"] { color: var(--ink-warn, var(--warn)); }

.ff-redline-copy p {
  display: -webkit-box;
  max-width: 800px;
  margin: 0;
  overflow: hidden;
  color: var(--muted);
  font-family: var(--font-mono);
  font-size: 10px;
  line-height: 1.5;
  -webkit-box-orient: vertical;
  -webkit-line-clamp: 2;
}

.ff-redline-open {
  display: inline-flex;
  align-items: center;
  color: var(--ink-link, var(--link));
  font-size: 10px;
  font-weight: 750;
  gap: 5px;
}

.ff-timeline {
  position: relative;
  margin-top: 16px;
}

.ff-timeline-rail {
  position: absolute;
  top: 20px;
  bottom: 20px;
  left: 15px;
  width: 1px;
  background: linear-gradient(var(--ff-source), color-mix(in srgb, var(--ff-source) 5%, transparent));
}

.ff-timeline-list {
  display: grid;
  gap: 10px;
}

.ff-timeline-card {
  position: relative;
  margin-left: 0;
  padding: 15px 15px 15px 47px;
  border: 1px solid var(--ff-border);
  border-radius: 13px;
  background: var(--ff-soft);
}

.ff-timeline-node {
  position: absolute;
  z-index: 1;
  top: 17px;
  left: 5px;
  display: grid;
  width: 21px;
  height: 21px;
  place-items: center;
  border: 1px solid color-mix(in srgb, var(--ff-source) 70%, var(--ff-border));
  border-radius: 50%;
  color: var(--ff-source);
  background: var(--panel);
  font-family: var(--font-mono);
  font-size: 8px;
  font-weight: 900;
}

.ff-timeline-card .ff-kicker { margin-bottom: 3px; }
.ff-timeline-card h3 { margin: 0; font-size: 13px; }

.ff-timeline-card dl {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  margin: 12px 0 4px;
  gap: 7px;
}

.ff-timeline-card dl > div {
  min-width: 0;
  padding: 7px;
  border: 1px solid var(--ff-border);
  border-radius: 8px;
  background: var(--panel);
}

.ff-timeline-card dt {
  color: var(--muted);
  font-size: 8px;
  font-weight: 800;
  letter-spacing: .05em;
  text-transform: uppercase;
}

.ff-timeline-card dd {
  margin: 3px 0 0;
  overflow-wrap: anywhere;
  font-family: var(--font-mono);
  font-size: 9px;
  font-variant-numeric: tabular-nums;
}

.ff-accession { color: var(--text); }
.ff-timeline-link { margin-top: 8px; }
.ff-timeline-unavailable { display: block; margin-top: 8px; color: var(--muted); font-size: 9px; }

.ff-disclosure-honesty,
.ff-disclosure-alternative {
  margin: -4px 0 14px;
  padding: 8px 10px;
  border: 1px solid color-mix(in srgb, var(--ff-watch) 26%, var(--ff-border));
  border-radius: 9px;
  color: var(--muted);
  background: color-mix(in srgb, var(--ff-watch) 5%, var(--panel));
  font-size: 10px;
  line-height: 1.5;
}

.ff-disclosure-alternative { margin-top: -7px; }

.ff-diff-card {
  overflow: hidden;
  border: 1px solid var(--ff-border);
  border-radius: 10px;
  background: var(--ff-soft);
}

.ff-diff-card-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 8px 10px;
  border-bottom: 1px solid var(--ff-border);
  color: var(--muted);
  font-size: 8px;
  font-weight: 750;
  letter-spacing: .04em;
  text-transform: uppercase;
  gap: 8px;
}

.ff-diff-machine-note { color: var(--ff-source); }
.ff-diff-edit + .ff-diff-edit { border-top: 1px solid var(--ff-border); }

.ff-diff-line {
  display: grid;
  grid-template-columns: 15px minmax(0, 1fr);
  padding: 8px 10px;
  color: var(--muted);
  font-family: var(--font-mono);
  font-size: 10px;
  line-height: 1.5;
  overflow-wrap: anywhere;
  gap: 7px;
}

.ff-diff-line.is-prior { background: color-mix(in srgb, var(--act) 8%, transparent); }
.ff-diff-line.is-current { background: color-mix(in srgb, var(--ok) 8%, transparent); }
.ff-diff-line.is-prior > span:first-child { color: var(--ink-act, var(--act)); }
.ff-diff-line.is-current > span:first-child { color: var(--ink-ok, var(--ok)); }

.ff-redline-fallback {
  margin: 0;
  padding: 10px;
  color: var(--muted);
  font-size: 10px;
}

.ff-disclosure-receipts { display: grid; gap: 8px; }

.ff-disclosure-receipt {
  padding: 10px;
  border: 1px solid var(--ff-border);
  border-radius: 10px;
  background: var(--ff-soft);
}

.ff-disclosure-receipt-head {
  display: grid;
  grid-template-columns: 23px minmax(0, 1fr) auto;
  align-items: center;
  gap: 8px;
}

.ff-disclosure-receipt-head strong { display: block; font-size: 10px; }
.ff-filing-role {
  display: inline-flex;
  margin-left: 6px;
  padding: 1px 5px;
  border: 1px solid var(--ff-border);
  border-radius: 999px;
  color: var(--muted);
  font-family: var(--font-mono);
  font-size: 7px;
  font-weight: 700;
  letter-spacing: .08em;
  line-height: 1.35;
  text-transform: uppercase;
  vertical-align: 1px;
}
.ff-filing-role.is-current { border-color: color-mix(in srgb, var(--ok) 42%, var(--ff-border)); color: var(--ink-ok, var(--ok)); }
.ff-filing-role.is-prior { border-color: color-mix(in srgb, var(--act) 38%, var(--ff-border)); color: var(--ink-act, var(--act)); }
.ff-disclosure-accession { display: block; margin-top: 2px; color: var(--muted); font-family: var(--font-mono); font-size: 8px; overflow-wrap: anywhere; }
.ff-disclosure-receipt .ff-receipt-link { display: inline-flex; align-items: center; font-size: 9px; gap: 4px; }

.ff-source-excerpt {
  margin: 10px 0 0;
  padding: 9px 10px;
  border: 1px solid var(--ff-border);
  color: var(--text);
  background: color-mix(in srgb, var(--ff-source) 5%, var(--panel));
  font-size: 10px;
  line-height: 1.55;
  overflow-wrap: anywhere;
}

.ff-loading {
  display: flex;
  min-height: 250px;
  align-items: center;
  justify-content: center;
  color: var(--muted);
  gap: 9px;
}

.ff-loading-dot {
  width: 9px;
  height: 9px;
  border: 2px solid var(--ff-border-strong);
  border-top-color: var(--info);
  border-radius: 50%;
  animation: ff-spin .8s linear infinite;
}

/* The scrim, the analysis drawer and the receipt inspector live INSIDE the workspace,
   whose z-index: 1 makes it a stacking context below the site header layer (the nav
   search sits at 110): without this lift the header painted over the open modal. */
body.ff-modal-open .ff-workspace { z-index: 200; }

.ff-scrim {
  position: fixed;
  z-index: 180;
  inset: 0;
  background: rgba(5, 8, 13, .62);
  backdrop-filter: blur(4px);
  -webkit-backdrop-filter: blur(4px);
}

.ff-modal-open { overflow: hidden !important; }
body.ff-modal-open #mmb-launch,
body.ff-modal-open #mmb-boot {
  opacity: 0 !important;
  pointer-events: none !important;
  visibility: hidden !important;
}

.ff-page :is(button, input, select, a[href], [tabindex]):focus-visible {
  outline: 2px solid color-mix(in srgb, var(--info) 82%, #fff);
  outline-offset: 2px;
}

@keyframes ff-spin { to { transform: rotate(360deg); } }

@media (min-width: 1100px) {
  body.ff-page { padding: 26px max(28px, calc((100vw - 1480px) / 2)); }

  .ff-workspace[data-tab="radar"],
  .ff-workspace[data-tab="disclosures"],
  .ff-workspace[data-tab="redlines"],
  .ff-workspace[data-tab="peers"],
  .ff-workspace[data-tab="trace"][data-source-mode="receipt"] {
    grid-template-columns: minmax(0, 1fr) minmax(370px, 430px);
    align-items: start;
  }

  .ff-workspace[data-tab="radar"] .ff-evidence,
  .ff-workspace[data-tab="disclosures"] .ff-evidence,
  .ff-workspace[data-tab="redlines"] .ff-evidence,
  .ff-workspace[data-tab="peers"] .ff-evidence,
  .ff-workspace[data-tab="trace"][data-source-mode="receipt"] .ff-receipt-inspector {
    position: sticky;
    top: 18px;
    display: block;
    max-height: calc(100vh - 36px);
    overflow-y: auto;
  }

  .ff-evidence.is-open {
    position: fixed;
    z-index: 190;
    top: 12px;
    right: 12px;
    bottom: 12px;
    display: block;
    width: min(560px, calc(100vw - 32px));
    max-height: none;
    overflow-y: auto;
    transform: translateX(0);
    animation: ff-analysis-open .22s ease;
    box-shadow: var(--ff-shadow);
  }
}

@media (min-width: 701px) and (max-width: 1300px) {
  .ff-tabs { display: block; padding: 5px 6px; }
  .ff-tablist {
    overflow-x: auto;
    padding-bottom: 2px;
    scrollbar-width: none;
  }
  .ff-tablist::-webkit-scrollbar { display: none; }
  .ff-tab { flex: 0 0 auto; }
  .ff-view-status {
    display: block;
    max-width: none;
    padding: 5px 7px 1px;
    text-align: right;
  }
}

@media (max-width: 1099px) {
  .ff-evidence,
  .ff-receipt-inspector {
    position: fixed;
    z-index: 190;
    top: 12px;
    right: 12px;
    bottom: 12px;
    display: block;
    width: min(560px, calc(100vw - 32px));
    overflow-y: auto;
    visibility: hidden;
    transform: translateX(calc(100% + 28px));
    transition: transform .22s ease, visibility 0s linear .22s;
  }

  .ff-evidence.is-open,
  .ff-receipt-inspector.is-open {
    visibility: visible;
    transform: translateX(0);
    transition-delay: 0s;
  }

  .ff-evidence-close { display: block; }
}

@media (max-width: 900px) {
  .ff-hero { align-items: flex-start; flex-direction: column; }
  .ff-run-meta { width: 100%; }
  .ff-run-meta > div:first-child { padding-left: 0; border-left: 0; }

  .ff-context-card {
    grid-template-columns: minmax(220px, 1fr) minmax(240px, 1.2fr);
  }

  .ff-company-action { grid-column: 1 / -1; justify-self: start; }
  .ff-compare-head { align-items: stretch; flex-direction: column; }
  .ff-period-controls { width: 100%; }
  .ff-trace-grid { grid-template-columns: 1fr; }
  .ff-receipt-identity { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .ff-receipt-identity > div:nth-child(2) { border-right: 0; }
  .ff-receipt-identity > div:nth-child(n + 3) { border-top: 1px solid var(--ff-border); }
  .ff-timeline-card dl { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .ff-timeline-card dl > div:last-child { grid-column: 1 / -1; }

  .ff-table-wrap { overflow: visible; border: 0; }
  .ff-table { display: block; min-width: 0; }
  .ff-table thead { position: absolute; width: 1px; height: 1px; overflow: hidden; clip-path: inset(50%); }
  .ff-table tbody { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 9px; }
  .ff-table tr { display: grid; padding: 11px; border: 1px solid var(--ff-border); border-radius: 11px; background: var(--ff-soft); }
  .ff-table td,
  .ff-table td:first-child {
    position: static;
    display: grid;
    grid-template-columns: minmax(110px, 1fr) minmax(0, 1fr);
    align-items: baseline;
    padding: 6px 0;
    border-bottom: 1px solid var(--ff-border);
    background: transparent;
    text-align: right;
    white-space: normal;
    gap: 8px;
  }
  .ff-table td::before {
    color: var(--muted);
    font-size: 8px;
    font-weight: 800;
    letter-spacing: .03em;
    text-align: left;
    text-transform: uppercase;
    content: attr(data-label-en);
  }
  html[data-lang="zh"] .ff-table td::before { content: attr(data-label-zh); }
  .ff-table td:first-child { padding-top: 0; font-size: 12px; }
  .ff-table td:first-child::before { align-self: center; }
  .ff-table td:last-child { padding-bottom: 0; border-bottom: 0; }
}

@media (max-width: 700px) {
  body.ff-page { padding: 10px; }
  .ff-workspace { margin-top: 10px; }

  .ff-hero { padding: 18px 3px; gap: 16px; }
  .ff-hero h1 { font-size: 29px; }
  .ff-deck { font-size: 12px; }

  .ff-run-meta { grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 9px 0; }
  .ff-run-meta > div { padding-left: 9px; }
  .ff-run-meta > div:nth-child(n + 3) { padding-top: 8px; border-top: 1px solid var(--ff-border); }
  .ff-run-meta > div:nth-child(odd) { padding-left: 0; border-left: 0; }
  .ff-run-meta dd { max-width: none; }

  .ff-context-card { grid-template-columns: 1fr; align-items: stretch; padding: 12px; gap: 12px; }
  .ff-company-action { grid-column: auto; justify-self: start; }

  .ff-tabs { top: 4px; display: block; padding: 4px; overflow: hidden; }
  .ff-tablist { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); }
  .ff-tab { justify-content: center; min-width: 0; padding: 7px 4px; font-size: 9.5px; }
  .ff-tab-index { display: none; }
  .ff-view-status { max-width: none; padding: 5px 7px 2px; text-align: center; }

  .ff-panel { min-height: 320px; padding: 13px; }
  .ff-panel-head { align-items: flex-start; flex-direction: column; min-height: 0; padding-bottom: 12px; gap: 8px; }
  .ff-filter-summary { align-self: flex-start; }
  .ff-filterbar { align-items: stretch; flex-direction: column; }
  .ff-disclosure-toolbar { grid-template-columns: 1fr; align-items: stretch; }
  .ff-disclosure-toolbar .ff-topic-filter { width: 100%; }
  .ff-lexical-note { max-width: none; }
  .ff-segmented { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); }
  .ff-filter { justify-content: center; min-width: 0; padding: 5px 3px; }
  .ff-filter-symbol { display: none; }
  .ff-topic-filter { width: 100%; }
  .ff-source-tabs { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); width: 100%; }
  .ff-source-tab { min-height: 40px; padding: 6px 8px; }
  .ff-receipt-intro { padding: 14px; }
  .ff-receipt-identity { grid-template-columns: 1fr; }
  .ff-receipt-identity > div,
  .ff-receipt-identity > div:nth-child(2) { border-right: 0; border-top: 1px solid var(--ff-border); }
  .ff-receipt-identity > div:first-child { border-top: 0; }
  .ff-receipt-card { padding: 12px; }
  .ff-receipt-status-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .ff-receipt-stats,
  .ff-receipt-clocks { grid-template-columns: 1fr; }
  .ff-receipt-clocks > div { padding: 7px 0 0; border-top: 1px solid var(--ff-border); border-left: 0; }
  .ff-receipt-clocks > div:first-child { padding-top: 0; border-top: 0; }
  .ff-receipt-root { grid-template-columns: minmax(0, 1fr) auto; }
  .ff-receipt-root .ff-receipt-status { grid-column: 1; grid-row: 2; }
  .ff-receipt-root-arrow { grid-column: 2; grid-row: 1 / span 2; }

  .ff-finding { grid-template-columns: auto minmax(0, 1fr); min-height: 124px; padding: 12px; }
  .ff-finding-periods { grid-column: 2; min-width: 0; text-align: left; }
  .ff-finding-periods strong { display: inline; margin-right: 5px; }

  .ff-disclosure-card {
    grid-template-columns: auto minmax(0, 1fr);
    min-height: 124px;
    padding: 12px;
  }
  .ff-disclosure-card .ff-finding-periods { grid-column: 2; min-width: 0; text-align: left; }
  .ff-disclosure-card .ff-finding-periods strong { display: inline; margin-right: 5px; }
  .ff-redline-card {
    grid-template-columns: minmax(0, 1fr) auto;
    align-items: start;
    padding: 12px;
  }
  .ff-redline-operation { justify-self: start; }
  .ff-redline-copy { grid-column: 1 / -1; grid-row: 2; }
  .ff-redline-open { grid-column: 2; grid-row: 1; align-self: center; }
  .ff-timeline-card { padding: 13px 12px 13px 42px; }
  .ff-timeline-card dl { grid-template-columns: 1fr; }
  .ff-timeline-card dl > div:last-child { grid-column: auto; }
  .ff-disclosure-receipt-head { grid-template-columns: 23px minmax(0, 1fr); }
  .ff-disclosure-receipt .ff-receipt-link { grid-column: 2; justify-self: start; }
  .ff-diff-card-head { align-items: flex-start; flex-direction: column; }

  .ff-evidence,
  .ff-receipt-inspector {
    top: auto;
    right: 0;
    bottom: 0;
    left: 0;
    width: 100vw;
    max-height: calc(100dvh - 28px);
    border-width: 1px 0 0;
    border-radius: 18px 18px 0 0;
    transform: translateY(calc(100% + 16px));
    transition: transform .24s ease, visibility 0s linear .24s;
  }

  .ff-evidence::before,
  .ff-receipt-inspector::before {
    display: block;
    width: 42px;
    height: 4px;
    margin: 8px auto 0;
    border-radius: 99px;
    background: var(--ff-border-strong);
    content: "";
  }

  .ff-evidence.is-open,
  .ff-receipt-inspector.is-open { transform: translateY(0); }
  .ff-evidence-head { padding: 11px 14px 12px; }
  .ff-evidence-body { padding: 14px 14px 24px; }
  .ff-value-row { grid-template-columns: minmax(0, 1fr) repeat(3, minmax(48px, .65fr)); padding: 7px; gap: 4px; }
  .ff-value-label { font-size: 9px; }
  .ff-value-cell strong { font-size: 9px; }
  .ff-receipt-waterfall-fields { grid-template-columns: 1fr; }
  .ff-receipt-empty { grid-template-columns: 1fr; min-height: 205px; place-content: center start; }

  .ff-table tbody { grid-template-columns: 1fr; }
  .ff-compare-grid { grid-template-columns: 1fr; }
  .ff-period-controls { grid-template-columns: minmax(0, 1fr) auto minmax(0, 1fr); }
  .ff-period-controls select { font-size: 10px; }
  .ff-coverage-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
}

@media (max-width: 420px) {
  .ff-tab { font-size: 9px; }
  .ff-filter { font-size: 9px; }
  .ff-value-row { grid-template-columns: minmax(0, 1.05fr) repeat(3, minmax(42px, .6fr)); }
  .ff-value-cell small { font-size: 7px; }
  .ff-value-cell strong { font-size: 8px; }
}

@keyframes ff-analysis-open {
  from { transform: translateX(28px); opacity: 0; }
  to { transform: translateX(0); opacity: 1; }
}

@media (prefers-reduced-motion: reduce) {
  .ff-finding,
  .ff-disclosure-card,
  .ff-redline-card,
  .ff-evidence,
  .ff-receipt-inspector { transition: none; }
  .ff-evidence.is-open { animation: none; }
  .ff-loading-dot { animation-duration: 1.8s; }
}

/* ── Access gate ───────────────────────────────────────────────────────────
   The surface a visitor meets when the workbench cannot be read: signed out,
   unentitled, mid-refresh, or covering nobody this run.

   Deliberately appended after the responsive blocks above. The gated layout
   has to beat `.ff-workspace[data-tab="radar"] .ff-evidence { display:block }`
   at >=1100px, and both selectors carry the same specificity — so source order
   is what decides it. Moving this block earlier silently restores a sticky,
   empty evidence rail beside the wall.

   Every state borrows an ink the page already uses for that meaning, so the
   four are distinguishable at a glance without introducing a colour: --info
   marks structure and sources, --ff-review marks "this wants your attention",
   --ff-watch marks "hold on", and --muted marks "nothing is wrong here". */
.ff-gate {
  margin-top: 12px;
  padding: 0;
  border: 1px solid var(--ff-border);
  border-radius: var(--ff-radius);
  background: var(--ff-glass);
  box-shadow: var(--ff-shadow);
  backdrop-filter: saturate(145%) blur(18px);
  -webkit-backdrop-filter: saturate(145%) blur(18px);
}

.ff-gate[aria-busy="true"] { opacity: .62; }

.ff-gate-state {
  --ff-gate-ink: var(--info);
  position: relative;
  padding: 26px 28px 24px 31px;
  border-radius: var(--ff-radius) var(--ff-radius) 0 0;
  background: linear-gradient(118deg, color-mix(in srgb, var(--ff-gate-ink) 9%, transparent), transparent 62%);
}

.ff-gate-state::before {
  position: absolute;
  top: 26px;
  bottom: 24px;
  left: 0;
  width: 3px;
  border-radius: 0 3px 3px 0;
  background: var(--ff-gate-ink);
  content: "";
}

.ff-gate-state[data-state="upgrade"] { --ff-gate-ink: var(--ff-review); }
.ff-gate-state[data-state="unavailable"] { --ff-gate-ink: var(--ff-watch); }
.ff-gate-state[data-state="empty"] { --ff-gate-ink: var(--muted); }

.ff-gate-chip {
  display: inline-flex;
  align-items: center;
  margin: 0 0 9px;
  color: var(--ff-gate-ink);
  font-size: 10px;
  font-weight: 800;
  letter-spacing: .12em;
  text-transform: uppercase;
  gap: 7px;
}

.ff-gate-dot {
  width: 7px;
  height: 7px;
  border-radius: 50%;
  background: currentColor;
}

.ff-gate-state h2 {
  max-width: 640px;
  margin: 0;
  font-size: clamp(20px, 2.1vw, 26px);
  line-height: 1.14;
  letter-spacing: -.032em;
}

.ff-gate-stance {
  max-width: 560px;
  margin: 9px 0 0;
  color: var(--muted);
  font-size: 13px;
  line-height: 1.5;
}

.ff-gate-note {
  margin: 14px 0 0;
  color: var(--muted);
  font-size: 12px;
  font-weight: 700;
}

.ff-gate-actions {
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  margin-top: 18px;
  gap: 10px;
}

.ff-page .ff-gate-primary {
  min-height: 42px;
  padding: 12px 19px;
  border: 1px solid var(--ff-gate-ink);
  border-radius: 10px;
  color: #fff;
  background: var(--ff-gate-ink);
  box-shadow: 0 9px 22px -12px color-mix(in srgb, var(--ff-gate-ink) 85%, transparent);
  font-size: 12.5px;
  font-weight: 760;
  cursor: pointer;
  transition: transform .16s ease, filter .16s ease;
}

.ff-gate-primary:hover { transform: translateY(-1px); filter: brightness(1.06); }
/* P2 repair item 5: white on the raw gate ink measured 1.83:1 (dark) and
   2.33:1 (light). The primary is a SOLID fill carrying white text, so it takes
   theme.css's fill grade (--fill-*, hue mixed toward black), which clears AA in
   both themes; chip, rule and wash keep the raw --ff-gate-ink. The measured
   failure was also a cascade bug: `.ff-page button { color: inherit; }` (0,1,1)
   beat the primary's own white text (0,1,0), so the CTA painted inherited
   body ink. The primary now carries `.ff-page` too, which restores its white. */
.ff-gate-state { --ff-gate-fill: var(--fill-info, var(--info)); }
.ff-gate-state[data-state="upgrade"] { --ff-gate-fill: var(--fill-act, var(--act)); }
.ff-gate-state[data-state="unavailable"] { --ff-gate-fill: var(--fill-warn, var(--warn)); }
.ff-page .ff-gate-primary { border-color: var(--ff-gate-fill); background: var(--ff-gate-fill); }

.ff-gate-secondary {
  min-height: 42px;
  padding: 12px 17px;
  border: 1px solid var(--gbtn-brd);
  border-radius: 10px;
  color: var(--text);
  background: var(--gbtn-bg);
  box-shadow: inset 0 1px 0 var(--gbtn-sheen);
  font-size: 12.5px;
  font-weight: 700;
  cursor: pointer;
}

.ff-gate-secondary:hover { background: var(--gbtn-bg-hover); }

.ff-gate-preview {
  padding: 22px 28px 26px;
  border-top: 1px solid var(--ff-border);
}

/* One column per fact, not a fixed three: the count-bearing fourth item is
   present only when the build supplies a summary, so the row has to size
   itself. Three facts make three columns, four make four, with no
   count-specific rule to keep in step with the template. */
.ff-gate-facts {
  display: grid;
  grid-auto-flow: column;
  grid-auto-columns: minmax(0, 1fr);
  margin: 0 0 22px;
  padding: 0;
  gap: 14px;
}

.ff-gate-facts > div {
  min-width: 0;
  padding-left: 13px;
  border-left: 1px solid var(--ff-border);
}

.ff-gate-facts dt {
  color: var(--muted);
  font-size: 9px;
  font-weight: 700;
  letter-spacing: .08em;
  text-transform: uppercase;
}

.ff-gate-facts dd {
  margin: 5px 0 0;
  font-size: 12px;
  font-weight: 650;
  /* A value long enough to wrap is otherwise left with a one-word last line;
     balancing splits it evenly instead. */
  text-wrap: balance;
}

.ff-gate-steps {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  margin: 0;
  padding: 0;
  gap: 18px;
  list-style: none;
}

.ff-gate-steps > li { min-width: 0; }

.ff-gate-step-index {
  color: var(--ink-info, var(--info));
  font-family: var(--font-mono);
  font-size: 9px;
  font-weight: 700;
  letter-spacing: .06em;
}

.ff-gate-steps h3 {
  margin: 6px 0 5px;
  font-size: 14px;
  letter-spacing: -.02em;
}

.ff-gate-steps p {
  margin: 0;
  color: var(--muted);
  font-size: 11.5px;
  line-height: 1.5;
}

/* The signature: the evidence inspector's own furniture, shown empty. The
   withheld slots are ruled placeholders rather than a blurred or invented
   sample — a blur becomes a dirty smudge in light mode, and a sample would put
   a fabricated finding into a public byte. */
.ff-gate-anatomy {
  margin-top: 24px;
  padding: 20px 22px 18px;
  border: 1px solid var(--ff-border);
  border-radius: var(--ff-radius-sm);
  background: var(--ff-soft);
}

.ff-gate-anatomy h3 {
  margin: 0 0 16px;
  font-size: 15px;
  letter-spacing: -.02em;
}

.ff-gate-slots {
  position: relative;
  display: grid;
  margin: 0;
  padding: 0;
  gap: 12px;
  list-style: none;
}

/* The margin rule an auditor ticks against, with the slot marks punched
   through it. */
.ff-gate-slots::before {
  position: absolute;
  z-index: 0;
  top: 11px;
  bottom: 11px;
  left: 10px;
  width: 1px;
  background: var(--ff-border-strong);
  content: "";
}

.ff-gate-slots > li {
  position: relative;
  z-index: 1;
  display: grid;
  grid-template-columns: 21px minmax(0, 178px) minmax(0, 232px);
  align-items: center;
  justify-content: start;
  min-width: 0;
  gap: 14px;
}

.ff-gate-slot-index {
  display: grid;
  width: 21px;
  height: 21px;
  place-items: center;
  border: 1px solid var(--ff-border-strong);
  border-radius: 50%;
  color: var(--muted);
  background: var(--panel);
  font-family: var(--font-mono);
  font-size: 8px;
  font-weight: 700;
}

.ff-gate-slot-label {
  min-width: 0;
  font-size: 11.5px;
  font-weight: 650;
}

/* Two ruled lines standing in for the withheld value. Ragged lengths, set per
   slot, so it reads as text held back rather than as a table underline. */
.ff-gate-rule {
  height: 8px;
  color: var(--ff-border-strong);
  background-image: linear-gradient(currentColor, currentColor), linear-gradient(currentColor, currentColor);
  background-repeat: no-repeat;
  background-position: 0 1px, 0 6px;
  background-size: 100% 1px, 58% 1px;
}

.ff-gate-slots > li:nth-child(2) .ff-gate-rule { background-size: 82% 1px, 44% 1px; }
.ff-gate-slots > li:nth-child(3) .ff-gate-rule { background-size: 94% 1px, 31% 1px; }
.ff-gate-slots > li:nth-child(4) .ff-gate-rule { background-size: 66% 1px, 0 0; }

.ff-gate-anatomy-foot {
  margin: 16px 0 0;
  padding-top: 13px;
  border-top: 1px solid var(--ff-border);
  color: var(--muted);
  font-size: 10.5px;
  line-height: 1.5;
}

.ff-gate-limit {
  max-width: 720px;
  margin: 20px 0 0;
  color: var(--muted);
  font-size: 10.5px;
  line-height: 1.55;
}

/* Gated layout: one surface at a time. Leaving the tab bar, the company picker
   and the run clocks live over a wall is what made the old error state read as
   a broken page rather than a closed door. */
.ff-workspace.ff-gated { grid-template-columns: minmax(0, 1fr); }

.ff-workspace.ff-gated .ff-context-card,
.ff-workspace.ff-gated .ff-tabs,
.ff-workspace.ff-gated .ff-panel,
.ff-workspace.ff-gated .ff-evidence,
.ff-workspace.ff-gated .ff-receipt-inspector { display: none; }

/* The desk header is workbench chrome: it hides with the workbench when the
   gate replaces it (§1.5) — a stranger never meets issuer controls. */
.ff-workspace.ff-gated .ff-desk-header { display: none; }

/* Light is a design target, not a token swap. The tint that reads as a soft
   wash on the dark canvas becomes a highlighter smear on white, so it drops to
   a trace and the ink deepens to carry the state instead. */
html[data-theme="light"] .ff-gate-state {
  background: linear-gradient(118deg, color-mix(in srgb, var(--ff-gate-ink) 5%, transparent), transparent 58%);
}

html[data-theme="light"] .ff-gate-chip { color: color-mix(in srgb, var(--ff-gate-ink) 78%, #202a38); }
html[data-theme="light"] .ff-gate-state[data-state="empty"] .ff-gate-chip { color: var(--muted); }
html[data-theme="light"] .ff-gate-anatomy { background: color-mix(in srgb, var(--panel2) 55%, #fff); }
html[data-theme="light"] .ff-gate-slot-index { background: #fff; }

@media (max-width: 900px) {
  .ff-gate-facts { grid-auto-flow: row; }
  .ff-gate-facts,
  .ff-gate-steps { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  /* Only an ODD last fact is an orphan in two columns — three facts leave one,
     four pair up cleanly — so the span is conditioned on the count instead of
     firing on whichever item happens to be last. */
  .ff-gate-facts > div:nth-child(odd):last-child,
  .ff-gate-steps > li:last-child { grid-column: 1 / -1; }
}

@media (max-width: 700px) {
  .ff-gate-state { padding: 20px 16px 20px 19px; }
  .ff-gate-state::before { top: 20px; bottom: 20px; }
  .ff-gate-state h2 { font-size: 21px; }
  .ff-gate-stance { font-size: 12.5px; }
  .ff-gate-actions { flex-direction: column; align-items: stretch; }
  .ff-gate-primary,
  .ff-gate-secondary { width: 100%; }

  .ff-gate-preview { padding: 18px 16px 22px; }
  .ff-gate-facts,
  .ff-gate-steps { grid-template-columns: minmax(0, 1fr); }
  .ff-gate-facts > div:nth-child(odd):last-child,
  .ff-gate-steps > li:last-child { grid-column: auto; }
  .ff-gate-facts { gap: 11px; }

  .ff-gate-anatomy { padding: 16px 15px 15px; }
  /* The label and its withheld rule stack, so the margin rule would run past
     the last tick — it retires and each slot keeps its own mark. */
  .ff-gate-slots::before { display: none; }
  .ff-gate-slots { gap: 14px; }
  .ff-gate-slots > li { grid-template-columns: 21px minmax(0, 1fr); }
  .ff-gate-rule { grid-column: 2; }
}

@media (prefers-reduced-motion: reduce) {
  .ff-page .ff-gate-primary { transition: none; }
  .ff-gate-primary:hover { transform: none; }
}

/* ── Insight-first experience ──────────────────────────────────────────────
   The data contract underneath this page remains the proof-first workbench.
   These rules change the order in which a person meets it: meaning first,
   numbers second, source proof always one click away. */
:root {
  --ff-indigo: #6d6af8;
  --ff-cyan: #27c2d8;
  --ff-coral: #f26b66;
  --ff-amber: #f0a84a;
  --ff-ink-soft: color-mix(in srgb, var(--text) 72%, var(--muted));
  --ff-card: color-mix(in srgb, var(--panel) 94%, transparent);
}

/* P2 R8: the canvas wash rides theme tokens only — the retired indigo/cyan
   hexes are gone, so light and dark each mix their own canvas. */
body.ff-page {
  background:
    radial-gradient(circle at 4% 4%, var(--ff-tint-info-11), transparent 31rem),
    radial-gradient(circle at 92% 15%, var(--ff-tint-act-8), transparent 30rem),
    linear-gradient(160deg, var(--ff-tint-bg-94-info), var(--bg) 46%, var(--ff-tint-bg-96-act));
}

.ff-workspace { width: min(100%, 1540px); gap: 20px; }

.ff-hero {
  position: relative;
  display: grid;
  grid-template-columns: minmax(0, 1fr) 330px;
  min-height: 260px;
  align-items: center;
  padding: 36px 42px;
  overflow: hidden;
  border: 1px solid color-mix(in srgb, var(--ff-indigo) 25%, var(--ff-border));
  border-radius: 26px;
  background:
    linear-gradient(118deg, color-mix(in srgb, var(--ff-indigo) 14%, var(--panel)) 0%, color-mix(in srgb, var(--panel) 96%, transparent) 56%, color-mix(in srgb, var(--ff-cyan) 10%, var(--panel)) 100%);
  box-shadow: 0 35px 80px -48px color-mix(in srgb, var(--ff-indigo) 62%, #000);
}

.ff-hero::before {
  position: absolute;
  width: 440px;
  height: 440px;
  top: -275px;
  right: -85px;
  border: 1px solid color-mix(in srgb, var(--ff-cyan) 25%, transparent);
  border-radius: 50%;
  box-shadow: 0 0 0 55px color-mix(in srgb, var(--ff-indigo) 4%, transparent), 0 0 0 112px color-mix(in srgb, var(--ff-cyan) 3%, transparent);
  content: "";
}

.ff-hero-copy { position: relative; z-index: 2; max-width: 820px; }
.ff-eyebrow { color: color-mix(in srgb, var(--ff-cyan) 72%, var(--text)); font-size: 11px; }
.ff-hero h1 { max-width: 680px; font-size: clamp(36px, 3.7vw, 54px); line-height: .98; letter-spacing: -.05em; }
.ff-deck { max-width: 720px; margin-top: 17px; color: var(--ff-ink-soft); font-size: 15px; line-height: 1.65; }

.ff-hero-promise { display: flex; flex-wrap: wrap; margin-top: 22px; gap: 8px; }
.ff-hero-promise span {
  display: inline-flex;
  align-items: center;
  min-height: 30px;
  padding: 5px 10px;
  border: 1px solid color-mix(in srgb, var(--text) 13%, transparent);
  border-radius: 999px;
  color: var(--ff-ink-soft);
  background: color-mix(in srgb, var(--panel) 74%, transparent);
  font-size: 10px;
  font-weight: 700;
  gap: 6px;
}
.ff-hero-promise span::before { width: 5px; height: 5px; border-radius: 50%; background: var(--ff-cyan); content: ""; }
.ff-hero-promise span:nth-child(2)::before { background: var(--ff-indigo); }
.ff-hero-promise span:nth-child(3)::before { background: var(--ff-amber); }

.ff-hero-visual { position: relative; z-index: 2; width: 300px; height: 210px; justify-self: end; }
.ff-document {
  position: absolute;
  width: 136px;
  height: 174px;
  padding: 30px 20px 18px;
  border: 1px solid color-mix(in srgb, var(--text) 18%, transparent);
  border-radius: 17px;
  background: color-mix(in srgb, var(--panel) 91%, transparent);
  box-shadow: 0 28px 45px -27px rgba(0, 0, 0, .58);
}
.ff-document::before { position: absolute; top: 16px; left: 20px; width: 42px; height: 7px; border-radius: 99px; background: currentColor; opacity: .48; content: ""; }
.ff-document span { display: block; height: 7px; margin: 11px 0; border-radius: 99px; background: color-mix(in srgb, currentColor 18%, transparent); }
.ff-document span:nth-child(2) { width: 82%; }
.ff-document span:nth-child(3) { width: 93%; }
.ff-document span:nth-child(4) { width: 64%; }
.ff-document-prior { top: 25px; left: 14px; color: var(--muted); transform: rotate(-7deg); }
.ff-document-current { top: 4px; right: 10px; color: var(--ff-indigo); transform: rotate(5deg); }
.ff-document-current span:nth-child(3) { background: color-mix(in srgb, var(--ff-coral) 42%, transparent); }
.ff-document-signal { position: absolute; right: -8px; bottom: 26px; width: 27px; height: 27px; border: 6px solid color-mix(in srgb, var(--panel) 92%, transparent); border-radius: 50%; background: var(--ff-coral); box-shadow: 0 8px 18px -8px var(--ff-coral); }
.ff-compare-arc { position: absolute; top: 16px; left: 52px; width: 184px; color: var(--ff-cyan); opacity: .7; }
.ff-visual-caption { position: absolute; right: 21px; bottom: 1px; padding: 5px 9px; border-radius: 999px; color: var(--ff-indigo); background: color-mix(in srgb, var(--ff-indigo) 11%, var(--panel)); font-size: 9px; font-weight: 800; letter-spacing: .06em; text-transform: uppercase; }

.ff-run-meta dd { max-width: 100%; font-family: var(--font-ui); font-size: 10px; font-weight: 650; }

.ff-context-card { margin-top: 16px; grid-template-columns: minmax(260px, .9fr) minmax(260px, 1.25fr) auto; min-height: 96px; padding: 16px 18px; border-radius: 18px; }
.ff-company-search { min-height: 48px; border-radius: 12px; background: color-mix(in srgb, var(--panel2) 58%, var(--panel)); }
.ff-company-mark { width: 48px; height: 48px; flex-basis: 48px; border-radius: 14px; background: linear-gradient(145deg, color-mix(in srgb, var(--ff-indigo) 18%, var(--panel)), color-mix(in srgb, var(--ff-cyan) 10%, var(--panel))); }
.ff-company-name { font-size: 15px; }
.ff-company-action { min-height: 42px; padding: 8px 13px; }

.ff-data-notice { display: grid; grid-template-columns: 24px minmax(0, 1fr); align-items: start; margin-top: 12px; padding: 11px 14px; border-left: 0; border-radius: 13px; color: var(--ff-ink-soft); background: color-mix(in srgb, var(--ff-amber) 7%, var(--panel)); box-shadow: none; gap: 9px; }
.ff-data-notice { border-style: solid; border-width: 1px; border-color: var(--ff-border); } /* even border on every edge (design doctrine 2026-10-18): the line above keeps its pre-existing bytes */
.ff-notice-icon { display: grid; width: 22px; height: 22px; place-items: center; border: 1px solid color-mix(in srgb, var(--ff-amber) 55%, var(--ff-border)); border-radius: 50%; color: var(--ff-amber); font-family: var(--font-mono); font-size: 10px; font-weight: 900; }
.ff-coverage-details { margin-top: 4px; }
.ff-coverage-details summary { width: max-content; color: var(--text); font-size: 10px; font-weight: 750; cursor: pointer; }
.ff-coverage-details p { max-width: 900px; margin: 6px 0 0; }

.ff-overview {
  display: grid;
  grid-template-columns: minmax(0, 1.42fr) minmax(300px, .72fr);
  margin-top: 16px;
  overflow: hidden;
  border: 1px solid var(--ff-border);
  border-radius: 22px;
  background: var(--ff-card);
  box-shadow: var(--ff-shadow);
}
.ff-overview-lead { min-width: 0; padding: 23px; }
.ff-overview-heading { display: flex; align-items: flex-start; justify-content: space-between; gap: 18px; }
.ff-overview-heading h2 { margin: 0; font-size: 23px; line-height: 1.12; letter-spacing: -.035em; }
.ff-overview-heading p { max-width: 620px; margin: 7px 0 0; color: var(--muted); font-size: 11px; }
.ff-overview-status { flex: 0 0 auto; display: inline-flex; min-height: 30px; align-items: center; padding: 5px 10px; border: 1px solid var(--ff-border); border-radius: 999px; color: var(--muted); background: var(--ff-soft); font-size: 9px; font-weight: 800; }
.ff-overview-status[data-state="attention"] { border-color: color-mix(in srgb, var(--ff-coral) 44%, var(--ff-border)); color: var(--ff-coral); background: color-mix(in srgb, var(--ff-coral) 8%, var(--panel)); }
.ff-overview-status[data-state="watch"] { border-color: color-mix(in srgb, var(--ff-amber) 44%, var(--ff-border)); color: var(--ff-amber); background: color-mix(in srgb, var(--ff-amber) 8%, var(--panel)); }
.ff-overview-status[data-state="clear"] { border-color: color-mix(in srgb, var(--ok) 38%, var(--ff-border)); color: var(--ink-ok, var(--ok)); background: color-mix(in srgb, var(--ok) 7%, var(--panel)); }

.ff-quick-signal { position: relative; display: grid; grid-template-columns: 56px minmax(0, 1fr) auto; align-items: center; min-height: 145px; margin-top: 19px; padding: 18px; overflow: hidden; border: 1px solid var(--ff-tint-info-32-border); border-radius: var(--r-panel, 14px); background: linear-gradient(132deg, var(--ff-tint-info-11-panel2), var(--ff-tint-info-5-panel) 76%); gap: 16px; }
.ff-quick-signal::after { position: absolute; width: 150px; height: 150px; top: -90px; right: -40px; border: 22px solid var(--ff-tint-info-8); border-radius: var(--r-pill, 999px); content: ""; }
.ff-quick-signal[data-priority="high"] { border-color: var(--ff-tint-act-43-border); background: linear-gradient(132deg, var(--ff-tint-act-10-panel2), var(--ff-tint-info-5-panel) 78%); }
.ff-quick-signal[data-priority="clear"] { border-color: color-mix(in srgb, var(--ok) 34%, var(--ff-border)); background: linear-gradient(132deg, color-mix(in srgb, var(--ok) 8%, var(--panel2)), var(--panel)); }
.ff-quick-signal-icon { display: grid; width: 56px; height: 56px; place-items: center; border-radius: var(--r-panel, 14px); color: var(--info); background: var(--ff-tint-info-12-panel); }
.ff-quick-signal[data-priority="high"] .ff-quick-signal-icon { color: var(--act); background: var(--ff-tint-act-12-panel); }
.ff-quick-signal-icon svg { width: 32px; height: 32px; }
.ff-quick-signal-copy { position: relative; z-index: 1; min-width: 0; }
.ff-quick-signal-label { color: var(--info); font-size: 9px; font-weight: 850; letter-spacing: .08em; text-transform: uppercase; }
.ff-quick-signal[data-priority="high"] .ff-quick-signal-label { color: var(--act); }
.ff-quick-signal h3 { margin: 4px 0 0; font-size: 18px; line-height: 1.2; letter-spacing: -.02em; }
.ff-quick-signal p { max-width: 690px; margin: 7px 0 0; color: var(--ff-ink-soft); font-size: 11px; line-height: 1.55; }
.ff-quick-signal-open { position: relative; z-index: 2; min-height: 42px; padding: 8px 13px; border: 1px solid var(--ff-tint-info-38-border); border-radius: var(--r-btn, 10px); color: var(--text); background: var(--ff-tint-info-10-panel); font-size: 10px; font-weight: 800; cursor: pointer; white-space: nowrap; }
.ff-quick-signal-open:hover { background: var(--ff-tint-info-16-panel); }

.ff-overview-side { display: grid; grid-template-rows: auto 1fr; padding: 18px; border-left: 1px solid var(--ff-border); background: color-mix(in srgb, var(--panel2) 43%, transparent); gap: 13px; }
.ff-snapshot-stats { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 9px; }
.ff-snapshot-stat { position: relative; min-height: 100px; padding: 13px; overflow: hidden; border: 1px solid var(--ff-border); border-radius: 14px; background: color-mix(in srgb, var(--panel) 76%, transparent); }
.ff-snapshot-stat-icon { display: grid; width: 23px; height: 23px; place-items: center; border-radius: 8px; color: var(--ff-indigo); background: color-mix(in srgb, var(--ff-indigo) 10%, transparent); font-size: 10px; font-weight: 900; }
.ff-snapshot-stat.is-attention .ff-snapshot-stat-icon { color: var(--ff-coral); background: color-mix(in srgb, var(--ff-coral) 11%, transparent); }
.ff-snapshot-stat.is-watch .ff-snapshot-stat-icon { color: var(--ff-amber); background: color-mix(in srgb, var(--ff-amber) 11%, transparent); }
.ff-snapshot-stat.is-source .ff-snapshot-stat-icon { color: var(--ff-cyan); background: color-mix(in srgb, var(--ff-cyan) 11%, transparent); }
.ff-snapshot-stat strong { display: block; margin-top: 8px; font-family: var(--font-mono); font-size: 20px; line-height: 1; }
.ff-snapshot-stat small { display: block; margin-top: 5px; color: var(--muted); font-size: 9px; font-weight: 700; }
.ff-next-steps { align-self: end; padding: 14px; border: 1px solid var(--ff-border); border-radius: 15px; background: color-mix(in srgb, var(--panel) 78%, transparent); }
.ff-next-steps-title { display: block; margin-bottom: 8px; color: var(--muted); font-size: 9px; font-weight: 850; letter-spacing: .08em; text-transform: uppercase; }
.ff-next-steps button,
.ff-view-guide-actions button,
.ff-proof-action-grid button { display: grid; grid-template-columns: auto minmax(0, 1fr) auto; width: 100%; min-height: 38px; align-items: center; padding: 7px 3px; border: 0; border-top: 1px solid var(--ff-border); color: var(--text); text-align: left; background: transparent; font-size: 10px; font-weight: 700; cursor: pointer; gap: 9px; }
.ff-next-steps button:first-of-type { border-top: 0; }
.ff-next-steps button > span:first-child { color: var(--ff-indigo); font-family: var(--font-mono); font-size: 8px; }
.ff-next-steps button:hover { color: var(--ff-indigo); }

.ff-tabs { top: 8px; display: block; padding: 7px; overflow: hidden; border-radius: 17px; background: color-mix(in srgb, var(--panel) 94%, transparent); }
.ff-tablist { display: grid; grid-template-columns: 1.05fr 1.55fr 1fr; width: 100%; gap: 7px; }
/* P2 repair item 1: Verify now holds three tabs, so fixed fr tracks cut
   "Peers"/"同业". Each group track floors at its own max-content and the bar
   scrolls rather than clips if a locale ever outgrows it. */
.ff-tabs { overflow-x: auto; overflow-y: hidden; }
.ff-tablist { grid-template-columns: minmax(max-content, 1.05fr) minmax(max-content, 1.55fr) minmax(max-content, 1fr); }
.ff-tab-group { position: relative; display: flex; min-width: 0; padding: 17px 4px 3px; border: 1px solid var(--ff-border); border-radius: 12px; background: color-mix(in srgb, var(--panel2) 33%, transparent); gap: 3px; }
.ff-tab-group-label { position: absolute; top: 3px; left: 9px; color: var(--muted); font-size: 7px; font-weight: 850; letter-spacing: .09em; text-transform: uppercase; }
.ff-tab { flex: 1 1 auto; justify-content: center; min-height: 39px; padding: 7px 9px; border-radius: 9px; font-size: 9.5px; white-space: nowrap; gap: 5px; }
.ff-tab-icon { display: inline-grid; width: 17px; height: 17px; place-items: center; border-radius: 6px; color: var(--muted); background: color-mix(in srgb, var(--text) 5%, transparent); font-size: 9px; }
.ff-tab.is-active { border-color: color-mix(in srgb, var(--ff-indigo) 35%, var(--ff-border)); color: var(--text); background: linear-gradient(145deg, color-mix(in srgb, var(--ff-indigo) 13%, var(--panel)), color-mix(in srgb, var(--ff-cyan) 6%, var(--panel))); }
.ff-tab.is-active .ff-tab-icon { color: var(--ff-indigo); background: color-mix(in srgb, var(--ff-indigo) 12%, transparent); }
.ff-view-status { max-width: none; padding: 6px 8px 1px; text-align: right; }

.ff-panel { min-height: 540px; padding: 22px; border-radius: 20px; }
.ff-panel-head { min-height: 76px; }
.ff-panel-head h2 { font-size: 21px; }
.ff-panel-head p:not(.ff-kicker) { font-size: 11px; line-height: 1.55; }
.ff-filterbar { padding: 16px 0; }
.ff-segmented { border-radius: 12px; }
.ff-filter { min-height: 38px; padding: 7px 11px; }
.ff-finding { min-height: 122px; padding: 16px; border-radius: 16px; background: color-mix(in srgb, var(--panel2) 57%, transparent); gap: 14px; }
.ff-finding::before { top: 16px; bottom: 16px; width: 4px; }
.ff-finding:hover { border-color: color-mix(in srgb, var(--ff-indigo) 30%, var(--ff-border)); box-shadow: 0 16px 34px -30px var(--ff-indigo); }
.ff-finding.is-selected { border-color: color-mix(in srgb, var(--ff-indigo) 48%, var(--ff-border)); background: linear-gradient(132deg, color-mix(in srgb, var(--ff-indigo) 9%, var(--panel2)), color-mix(in srgb, var(--ff-cyan) 4%, var(--panel))); }
.ff-finding h3 { font-size: 14px; }
.ff-finding-summary { font-size: 11.5px; line-height: 1.55; }
.ff-finding-periods { min-width: 132px; font-family: var(--font-ui); font-size: 9px; font-weight: 750; }

.ff-evidence,
.ff-receipt-inspector { border-radius: 20px; background: var(--ff-card); }
.ff-evidence-head { padding: 20px 21px 16px; background: linear-gradient(118deg, var(--ff-tint-info-7), transparent 62%); }
.ff-evidence-head h2 { font-size: 18px; }
.ff-evidence-body { padding: 18px 21px 24px; }
.ff-proof-badge { margin-bottom: 12px; }
.ff-signal-meaning { margin-bottom: 14px; padding: 14px; border: 1px solid color-mix(in srgb, var(--ff-indigo) 28%, var(--ff-border)); border-radius: 14px; background: linear-gradient(135deg, color-mix(in srgb, var(--ff-indigo) 9%, var(--panel)), color-mix(in srgb, var(--ff-cyan) 4%, var(--panel))); }
.ff-signal-meaning > span { color: var(--ff-indigo); font-size: 8px; font-weight: 850; letter-spacing: .08em; text-transform: uppercase; }
.ff-signal-meaning p { margin: 5px 0 0; color: var(--text); font-size: 12px; font-weight: 620; line-height: 1.58; }
.ff-proof-basis { border-radius: 12px; }
.ff-proof-section h3 { color: var(--text); font-size: 9px; }
.ff-value-row { border-radius: 11px; }
.ff-proof-action-grid { display: grid; gap: 0; }
.ff-proof-action-grid button { grid-template-columns: minmax(0, 1fr) auto; min-height: 41px; padding: 8px 2px; }
.ff-proof-action-grid button:first-child { border-top: 0; }
.ff-proof-action-grid button:hover { color: var(--ff-indigo); }
.ff-proof-details { border-top: 1px solid var(--ff-border); }
.ff-proof-details summary { position: relative; padding: 15px 24px 15px 0; color: var(--text); font-size: 10px; font-weight: 800; cursor: pointer; list-style: none; }
.ff-proof-details summary::-webkit-details-marker { display: none; }
.ff-proof-details summary::after { position: absolute; top: 50%; right: 3px; color: var(--ff-indigo); font-size: 16px; content: "+"; transform: translateY(-50%); }
.ff-proof-details[open] summary::after { content: "−"; }
.ff-proof-details > div { padding: 0 0 16px; }

.ff-view-guide { display: grid; min-height: 430px; place-content: center; }
.ff-view-guide-icon { display: grid; width: 54px; height: 54px; margin-bottom: 15px; place-items: center; border-radius: 17px; color: var(--ff-indigo); background: linear-gradient(145deg, color-mix(in srgb, var(--ff-indigo) 15%, var(--panel)), color-mix(in srgb, var(--ff-cyan) 8%, var(--panel))); font-size: 21px; }
.ff-view-guide > p { max-width: 340px; margin: 0 0 18px; color: var(--ff-ink-soft); font-size: 12px; line-height: 1.65; }
.ff-view-guide-actions { border-top: 1px solid var(--ff-border); }
.ff-view-guide-actions button { grid-template-columns: minmax(0, 1fr) auto; }
.ff-view-guide-actions button:first-child { border-top: 0; }
.ff-view-guide-actions button:hover { color: var(--ff-indigo); }

.ff-trace-details summary { position: relative; padding: 13px 25px 13px 0; color: var(--text); font-size: 10px; font-weight: 800; cursor: pointer; list-style: none; }
.ff-trace-details summary::-webkit-details-marker { display: none; }
.ff-trace-details summary::after { position: absolute; top: 50%; right: 2px; color: var(--ff-indigo); font-size: 15px; content: "+"; transform: translateY(-50%); }
.ff-trace-details[open] summary::after { content: "−"; }
.ff-trace-details > div { padding: 0 0 10px; }

.ff-workspace.ff-gated .ff-overview { display: none; }

html[data-theme="light"] .ff-overview,
html[data-theme="light"] .ff-evidence,
html[data-theme="light"] .ff-panel { background: var(--panel); }
html[data-theme="light"] .ff-quick-signal { border-color: var(--line); background: var(--panel); }
html[data-theme="light"] .ff-quick-signal[data-priority="high"] { border-color: var(--ff-tint-act-30-line); background: var(--panel); }

@media (min-width: 1100px) {
  body.ff-page { padding-right: max(28px, calc((100vw - 1540px) / 2)); padding-left: max(28px, calc((100vw - 1540px) / 2)); }
  .ff-workspace,
  .ff-workspace[data-tab="radar"],
  .ff-workspace[data-tab="statements"],
  .ff-workspace[data-tab="disclosures"],
  .ff-workspace[data-tab="redlines"],
  .ff-workspace[data-tab="timeline"],
  .ff-workspace[data-tab="compare"],
  .ff-workspace[data-tab="trace"],
  .ff-workspace[data-tab="peers"] { grid-template-columns: minmax(0, 1fr) minmax(370px, 420px); align-items: start; }
  .ff-main { grid-column: 1; }
  .ff-workspace .ff-evidence { position: sticky; grid-column: 2; grid-row: 1; top: 18px; display: block; max-height: calc(100vh - 36px); overflow-y: auto; }
  /* The opened analysis drawer is a modal (aria-modal, scrim, inert main): it leaves the
     docked column and overlays at the right edge instead of widening the grid track. */
  .ff-workspace .ff-evidence.is-open { position: fixed; top: 12px; right: 12px; bottom: 12px; max-height: none; }
  .ff-workspace[data-tab="trace"][data-source-mode="receipt"] .ff-evidence { display: none; }
  .ff-workspace[data-tab="trace"][data-source-mode="receipt"] .ff-receipt-inspector { position: sticky; grid-column: 2; grid-row: 1; top: 18px; display: block; max-height: calc(100vh - 36px); overflow-y: auto; }
}

@media (max-width: 1180px) {
  .ff-hero { grid-template-columns: minmax(0, 1fr) 250px; padding: 32px; }
  .ff-hero-visual { width: 240px; transform: scale(.86); transform-origin: right center; }
  .ff-overview { grid-template-columns: minmax(0, 1fr); }
  .ff-overview-side { grid-template-columns: 1fr 1fr; grid-template-rows: auto; align-items: stretch; border-top: 1px solid var(--ff-border); border-left: 0; }
  .ff-next-steps { align-self: stretch; }
}

@media (min-width: 701px) and (max-width: 1099px) {
  .ff-tablist { display: flex; overflow-x: auto; scroll-snap-type: x proximity; }
  .ff-tab-group { flex: 0 0 auto; scroll-snap-align: start; }
  .ff-overview { grid-template-columns: minmax(0, 1fr); }
  /* A43 tablet (820): the five-column desk row's minimum (200px + 150px
     floors, the as-of controls, the 140px source strip, the export button and
     four gaps) exceeds the 752px band; the header's single auto track then
     grew to that min-content, so the saved-views row overflowed with it
     (measured: 4 elements wider than the viewport, page 878px wide). Three
     rows: company picker + identity, as-of + export, then the source strip
     at full width. Phones (<=700) keep their own one-band layout. */
  .ff-desk-header { min-width: 0; grid-template-columns: minmax(0, 1fr); }
  .ff-desk-row {
    grid-template-columns: minmax(0, 1fr) auto;
    grid-template-areas: "picker identity" "asof export" "meta meta";
  }
  .ff-company-picker { grid-area: picker; min-width: 0; }
  .ff-company-identity { grid-area: identity; min-width: 0; }
  .ff-desk-asof { grid-area: asof; min-width: 0; }
  .ff-desk-row > .ff-run-meta { grid-area: meta; width: 100%; }
  .ff-desk-export { grid-area: export; justify-self: end; }
}

@media (max-width: 900px) {
  .ff-hero { grid-template-columns: minmax(0, 1fr); min-height: 0; }
  .ff-hero-visual { position: absolute; right: 8px; bottom: -55px; opacity: .22; }
  .ff-hero-copy { max-width: 680px; }
  .ff-overview-side { grid-template-columns: 1fr; }
  .ff-context-card { grid-template-columns: minmax(220px, 1fr) minmax(0, 1fr); }
}

@media (max-width: 700px) {
  body.ff-page { padding: 8px; }
  .ff-hero { padding: 21px 18px 22px; border-radius: 20px; }
  .ff-hero h1 { font-size: 35px; }
  .ff-deck { margin-top: 13px; font-size: 12px; line-height: 1.55; }
  .ff-hero-visual { display: none; }
  .ff-hero-promise { flex-wrap: nowrap; margin-top: 17px; overflow-x: auto; gap: 6px; scrollbar-width: none; }
  .ff-hero-promise::-webkit-scrollbar { display: none; }
  .ff-hero-promise span { flex: 0 0 auto; min-height: 27px; padding: 4px 8px; font-size: 8.5px; }
  .ff-run-meta { width: calc(100% - 16px); grid-template-columns: repeat(2, minmax(0, 1fr)); margin-top: -10px; padding: 9px 5px; }
  .ff-run-meta > div { min-width: 0; padding: 0 7px; }
  .ff-run-meta > div:nth-child(3) { grid-column: auto; margin-top: 0; padding: 0 7px; border-top: 0; border-left: 1px solid var(--ff-border); }
  .ff-run-meta dt { overflow: hidden; font-size: 7px; text-overflow: ellipsis; white-space: nowrap; }
  .ff-run-meta dd { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
  .ff-context-card { margin-top: 12px; grid-template-columns: minmax(0, 1fr) auto; padding: 13px; border-radius: 16px; gap: 11px 8px; }
  .ff-company-picker { grid-column: 1 / -1; }
  .ff-company-identity { min-width: 0; }
  .ff-company-identity > div:last-child { min-width: 0; }
  .ff-company-detail { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
  .ff-company-action { align-self: center; white-space: nowrap; }
  .ff-data-notice { grid-template-columns: 22px minmax(0, 1fr); }
  .ff-overview { margin-top: 12px; border-radius: 18px; }
  .ff-overview-lead { padding: 17px; }
  .ff-overview-heading { display: grid; gap: 10px; }
  .ff-overview-heading h2 { font-size: 21px; }
  .ff-overview-status { justify-self: start; }
  .ff-quick-signal { grid-template-columns: 44px minmax(0, 1fr); min-height: 0; padding: 14px; gap: 12px; }
  .ff-quick-signal-icon { width: 44px; height: 44px; border-radius: 13px; }
  .ff-quick-signal-icon svg { width: 26px; height: 26px; }
  .ff-quick-signal h3 { font-size: 15px; }
  .ff-quick-signal-open { grid-column: 1 / -1; width: 100%; }
  .ff-overview-side { padding: 13px; }
  .ff-snapshot-stat { min-height: 91px; }
  .ff-tabs { top: 4px; padding: 5px; border-radius: 14px; }
  .ff-tablist { display: flex; grid-template-columns: none; overflow-x: auto; scroll-snap-type: x mandatory; scrollbar-width: none; gap: 6px; }
  .ff-tablist::-webkit-scrollbar { display: none; }
  .ff-tab-group { flex: 0 0 auto; padding: 4px; scroll-snap-align: start; }
  .ff-tab-group-label { display: none; }
  .ff-tab { flex: 0 0 auto; min-width: 104px; padding: 7px 9px; font-size: 9.5px; }
  .ff-view-status { padding-top: 5px; text-align: left; }
  .ff-panel { min-height: 430px; padding: 15px; border-radius: 17px; }
  .ff-finding { min-height: 0; padding: 14px; border-radius: 14px; }
  .ff-finding-periods { font-family: var(--font-ui); }
  .ff-evidence-body { padding: 14px 14px 28px; }
  .ff-signal-meaning { padding: 12px; }
  .ff-view-guide { min-height: 280px; }
}

/* ── P2 desk header + lead brief (spec §1.2–§1.4) ─────────────────────────
   DARK TREATMENT (command centre): .ff-desk-header sits as a var(--panel)
   slab on the token-mixed canvas; the active as-of carries a restrained
   --info fill plus a 1px ring — no drop-shadow bloom, no second aurora.
   LIGHT TREATMENT (research workspace): white var(--panel) material, a
   hairline var(--line) edge and the theme's --card-shadow elevation token —
   shadow instead of glow, and the active as-of drops the ring for a 1px
   --info hairline with a 4% tint. The two themes intentionally differ in
   mechanism, not just tokens (R8 / AM2). */
.ff-desk-header {
  display: grid;
  gap: 8px;
  padding: 12px 16px 10px;
  border: 1px solid var(--line);
  border-radius: var(--r-panel, 14px);
  background: var(--panel);
}
.ff-desk-row {
  display: grid;
  /* The as-of column is sized to its controls: a fixed 160px floor let the
     date input overflow into Source status at 1440 (P2 judge repair). */
  grid-template-columns: minmax(200px, 1fr) minmax(150px, .8fr) max-content minmax(140px, .6fr) auto;
  align-items: end;
  gap: 12px;
}
.ff-desk-stamp {
  margin: 0;
  color: var(--muted);
  font-size: var(--fs-micro);
  font-variant-numeric: tabular-nums;
}
/* A43 r3 (P0 first-viewport repair): the stamp line is a flex row that also
   carries the pinned saved-view badge and the closed Desk tools disclosure
   (saved views + the retained-holding reader). Closed, the row is exactly one
   stamp line tall at every viewport, so the desk band keeps the 10-12 fold
   geometry the P0 contract pins (lead at 370 / 500); open, the disclosure
   drops under the stamp at the full band width. The summary keeps its native
   marker and focus outline. */
.ff-desk-stamp-row {
  display: flex;
  flex-wrap: wrap;
  align-items: baseline;
  gap: 0 12px;
  min-width: 0;
}
.ff-desk-stamp-row > .ff-desk-stamp { min-width: 0; }
.ff-desk-tools { margin-left: auto; min-width: 0; }
.ff-desk-tools > summary {
  margin: 0;
  padding: 0;
  color: var(--muted);
  font-size: var(--fs-micro);
  font-weight: 700;
  line-height: inherit;
  white-space: nowrap;
  cursor: pointer;
}
.ff-desk-tools > summary:hover { color: var(--text); }
.ff-desk-tools[open] { flex: 1 1 100%; margin-left: 0; }
.ff-desk-tools-body { display: grid; gap: 12px; padding-top: 8px; }
.ff-desk-tools-body > .ff-asof-controls--saved { margin-top: 0; }
.ff-desk-tools-body > .ff-holding-research { margin: 0; }
.ff-desk-asof > label,
.ff-desk-export { align-self: end; }
.ff-asof-controls { display: flex; gap: 6px; align-items: center; }
/* X2-s saved-views row (seat r2 R2-5/R2-6): a governed modifier on the
   as-of control block. It wraps (at 390 the select, the name and the actions
   fold onto their own lines), and the select column takes the free row width
   so a pinned name and the unavailable marker read whole at 1440. */
.ff-asof-controls--saved {
  flex-wrap: wrap;
  margin-top: 8px;
}
.ff-asof-controls--saved > .ff-topic-filter {
  flex: 1 1 260px;
  width: auto;
  min-width: 0;
}
.ff-asof-latest,
.ff-export-btn,
.ff-export-link {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 36px;
  padding: 0 12px;
  border: 1px solid var(--line);
  border-radius: var(--r-btn, 10px);
  background: var(--panel2);
  color: var(--text);
  font-size: var(--fs-label);
  font-weight: 700;
  text-decoration: none;
  cursor: pointer;
}
.ff-asof-latest.is-active {
  border-color: var(--ff-tint-info-45-line);
  color: var(--text);
  background: var(--ff-tint-info-18-panel);
  box-shadow: 0 0 0 1px var(--ff-tint-info-35);
}
/* P2 r3 item b: the Latest control stays one line at 390 — CJK breaks between
   glyphs, so a flex-squeezed "最新" wrapped to two lines while "Latest"
   (one word) never could. No other change to this control. */
.ff-asof-latest { white-space: nowrap; }
.ff-asof-input {
  min-height: 36px;
  padding: 0 10px;
  border: 1px solid var(--line);
  border-radius: var(--r-btn, 10px);
  background: var(--panel2);
  color: var(--text);
}
/* The disabled export dims and lets hover fall through to .ff-desk-export,
   which carries the same cause tip (item 11). A disabled source control never
   dims: its number keeps full --text ink (item 2). */
.ff-export-btn:disabled {
  opacity: .46;
  cursor: not-allowed;
  pointer-events: none;
}
.ff-source-control:disabled { cursor: not-allowed; }
/* The run-meta strip is desk furniture now: no floating card, no backdrop. */
.ff-run-meta {
  display: grid;
  /* Source status never truncates its one word; Built from takes the ellipsis. */
  grid-template-columns: max-content minmax(0, 1fr);
  gap: 8px;
  width: auto;
  margin: 0;
  padding: 0;
  border: 0;
  background: transparent;
  box-shadow: none;
  backdrop-filter: none;
}
/* Stacked in the desk row: from 701px the row leaves this column its 140px
   floor, so a side-by-side pair cut Built from to one letter. Stacked, Source
   status and Built from each get the full column; at 390 the row collapses and
   the pair stays side by side (P2 judge repair). */
@media (min-width: 701px) {
  .ff-run-meta { grid-template-columns: minmax(0, 1fr); gap: 4px; }
}
#ff-overview { margin-top: 12px; }
.ff-quick-signal {
  grid-template-columns: 48px minmax(0, 1fr) auto;
  min-height: 0;
}
.ff-quick-signal-magnitude {
  margin: 6px 0 0;
  font-family: var(--font-mono);
  font-size: var(--fs-md);
  font-variant-numeric: tabular-nums;
}

/* LIGHT TREATMENT: white material + hairline + elevation token (AM2/R-C —
   the spec's rgba shadow literal is served by --card-shadow instead). */
html[data-theme="light"] .ff-desk-header {
  border: 1px solid var(--line);
  background: var(--panel);
  box-shadow: var(--card-shadow);
}
html[data-theme="light"] .ff-asof-latest.is-active {
  border-color: var(--info);
  background: var(--ff-tint-info-4-panel);
  box-shadow: none;
}
html[data-theme="light"] .ff-quick-signal { box-shadow: none; }

@media (min-width: 1100px) {
  .ff-overview { grid-template-columns: minmax(0, 1.6fr) minmax(240px, .55fr); }
}
@media (max-width: 700px) {
  .ff-desk-row { grid-template-columns: minmax(0, 1fr); }
  .ff-run-meta { width: auto; margin: 0; padding: 0; }
  .ff-desk-export { justify-self: stretch; }
  .ff-export-btn,
  .ff-export-link { width: 100%; }
  .ff-quick-signal { grid-template-columns: 40px minmax(0, 1fr); }
  .ff-quick-signal-open { grid-column: 1 / -1; width: 100%; }
}

/* ── P2 source controls (§2, R3) ──────────────────────────────────────────
   Every number is a control into #ff-evidence. DARK: a ghost button on
   var(--panel2) with a 1px var(--line) edge; hover adds a restrained --info
   fill and no bloom. LIGHT: a white chip with a hairline that lifts with the
   theme's --popover-shadow token on hover (AM2/R-C) — shadow, not glow. An
   unavailable span is shown, never dimmed (P2 repair item 2, superseding the
   §2.3 46% opacity): the number keeps full --text ink, the control drops its
   fill for a dashed --line edge, and the visible "Source span unavailable"
   label (§2.1) prints once per value row in the evidence rail. */
.ff-source-control {
  display: inline-flex;
  align-items: center;
  /* safe: a value wider than its control clips at the trailing edge, never the
     leading one, so a sign (+/−) can never be the part that disappears. */
  justify-content: safe flex-end;
  min-height: 26px;
  padding: 2px 8px;
  border: 1px solid var(--line);
  border-radius: var(--r-ctl, 8px);
  color: var(--text);
  background: var(--panel2);
  font-family: var(--font-mono);
  font-size: 10px;
  font-variant-numeric: tabular-nums;
  cursor: pointer;
  gap: 6px;
}
.ff-source-control:hover {
  background: var(--ff-tint-info-12-panel2);
}
.ff-source-control.is-unavailable,
.ff-source-control.is-unavailable:hover {
  border-style: dashed;
  border-color: var(--line);
  color: var(--text);
  background: transparent;
  box-shadow: none;
  cursor: not-allowed;
}
.ff-value-row-unavail {
  display: block;
  margin-top: 3px;
  color: var(--muted);
  font-size: 9px;
  font-weight: 650;
  line-height: 1.3;
  white-space: normal;
}
.ff-compact.tnum { font-variant-numeric: tabular-nums; white-space: nowrap; }
.ff-source-unavail {
  color: var(--muted);
  font-family: var(--font-ui);
  font-size: 9px;
  white-space: nowrap;
}
/* Table cells and compare values swap their old <strong> for the control. */
.ff-table td .ff-source-control,
.ff-compare-value .ff-source-control,
.ff-value-cell .ff-source-control {
  display: inline-flex;
  max-width: 100%;
  overflow: hidden;
  text-overflow: ellipsis;
}
.ff-value-cell .ff-source-control { justify-self: end; }
/* Narrow sheets stack each value row: the metric spans the row and the three
   values share the next line. Four tracks in a 362px row left the change track
   70px wide, and a ZH "+4 个百分点" overflowed it and lost its sign. */
@media (max-width: 700px) {
  .ff-value-row { grid-template-columns: repeat(3, minmax(0, 1fr)); row-gap: 6px; }
  .ff-value-label { grid-column: 1 / -1; }
  .ff-value-cell small { font-size: 9px; }
}
/* Narrow value cells keep the VALUE legible when a span is unavailable:
   the end-aligned control used to clip its own number and print a
   left-cut "an unavailable". The notice stays in the accessible name,
   the muted ink, the not-allowed cursor and the data-tip. */
.ff-table td .ff-source-control.is-unavailable .ff-source-unavail,
.ff-compare-value .ff-source-control.is-unavailable .ff-source-unavail,
.ff-value-cell .ff-source-control.is-unavailable .ff-source-unavail {
  position: absolute;
  width: 1px;
  height: 1px;
  margin: -1px;
  overflow: hidden;
  clip-path: inset(50%);
  white-space: nowrap;
}
/* The span variant rides inside card buttons; the card keeps the click. */
.ff-redline-copy .ff-source-control,
.ff-finding-periods .ff-source-control {
  padding: 1px 6px;
  font-size: 9px;
}
/* Drawer: exact bytes, compact secondary, bounded excerpt. */
.ff-exact {
  display: block;
  margin: 0;
  padding: 10px 11px;
  overflow-wrap: anywhere;
  border: 1px solid var(--ff-border);
  border-radius: var(--r-btn, 10px);
  color: var(--text);
  background: var(--ff-soft);
  font-family: var(--font-mono);
  font-size: 11px;
  line-height: 1.5;
}
.ff-span-excerpt {
  margin: 0;
  padding: 9px 10px;
  border: 1px solid var(--ff-border);
  color: var(--text);
  background: var(--ff-tint-info-5-panel);
  font-size: 10px;
  line-height: 1.55;
  overflow-wrap: anywhere;
}
.ff-proof-compact-line {
  margin: 7px 0 0;
  color: var(--muted);
  font-size: 10px;
}
.ff-proof-compact-line b { color: var(--text); font-size: 9px; letter-spacing: .04em; text-transform: uppercase; }

html[data-theme="light"] .ff-source-control {
  border-color: var(--line);
  background: var(--panel);
}
html[data-theme="light"] .ff-source-control:hover {
  background: var(--panel);
  box-shadow: var(--popover-shadow);
}
html[data-theme="light"] .ff-evidence {
  border-color: var(--line);
  box-shadow: var(--popover-shadow);
}

/* ── P2 revisions panel (§3, R4) ───────────────────────────────────────────
   Same period, three source vintages. DARK: the restated column that moved
   against its root takes a 6% --warn fill and nothing else. LIGHT: the same
   tint plus a 1px left hairline — a ruled correction, not a glow. */
.ff-revisions { padding: 13px 0; border-bottom: 1px solid var(--ff-border); }
.ff-revisions h3 { margin: 0 0 4px; font-size: 14px; letter-spacing: -.018em; }
.ff-revisions > p { margin: 0 0 11px; color: var(--muted); font-size: 11px; }
.ff-revisions-echo { margin: 0 0 8px; color: var(--muted); font-family: var(--font-mono); font-size: 9px; }
.ff-revisions-absence { color: var(--muted); font-size: 10px; white-space: normal; }
.ff-revisions-table tr.is-restated td:last-child {
  background: var(--ff-tint-warn-6);
}
html[data-theme="light"] .ff-revisions-table tr.is-restated td:last-child {
  background: var(--ff-tint-warn-6);
}
.ff-revisions-retry { margin-top: 9px; }
.ff-revisions-retry button {
  min-height: 36px;
  padding: 6px 11px;
  border: 1px solid var(--gbtn-brd);
  border-radius: var(--r-btn, 10px);
  color: var(--text);
  background: var(--gbtn-bg);
  font-size: 9px;
  font-weight: 750;
  cursor: pointer;
}
.ff-revisions-retry button:hover { border-color: var(--gbtn-brd-hover); background: var(--gbtn-bg-hover); }

/* ── P2 statement tree (spec row 6) ────────────────────────────────────────
   As-reported labels lead, values are source controls, and the normalized
   state table stays as the honest fallback when the tree cannot be opened. */
.ff-statement-notice {
  margin: 0 0 12px;
  padding: 9px 11px;
  border: 1px solid var(--ff-border);
  border-radius: var(--r-btn, 10px);
  color: var(--muted);
  background: var(--ff-soft);
  font-size: 10.5px;
  line-height: 1.5;
}
.ff-statement-block { margin-top: 14px; }
.ff-statement-block--withheld {
  padding: 14px 16px;
  border: 1px dashed var(--ff-border-strong);
  border-radius: var(--r-btn, 10px);
  background: var(--ff-soft);
}
.ff-statement-block--withheld .ff-statement-withheld-copy {
  margin: 0;
  color: var(--muted);
  font-size: 12.5px;
  line-height: 1.55;
}
.ff-statement-block h3 {
  margin: 0 0 8px;
  font-size: 13px;
  letter-spacing: -.015em;
}
.ff-statement-table td.ff-statement-label {
  max-width: 320px;
  overflow: hidden;
  text-overflow: ellipsis;
}

/* ── P2 peer panel (§4, R5) ────────────────────────────────────────────────
   DARK: included rows ride var(--panel2); excluded rows take an 8% --muted
   fill with no strikethrough (struck text reads as deleted data). LIGHT:
   included rows are white with a hairline; excluded rows keep the 8% fill
   and gain a dashed hairline — a ruled exclusion, not an erasure. */
.ff-peer-policy {
  margin: 12px 0 0;
  padding: 8px 10px;
  border: 1px solid var(--ff-border);
  border-radius: var(--r-btn, 10px);
  color: var(--muted);
  background: var(--ff-soft);
  font-size: 10px;
}
.ff-peer-metric { width: min(240px, 100%); margin-top: 12px; }
.ff-peer-subhead {
  margin: 16px 0 8px;
  color: var(--muted);
  font-size: 9px;
  font-weight: 800;
  letter-spacing: .08em;
  text-transform: uppercase;
}
.ff-peer-row {
  display: flex;
  align-items: center;
  margin-top: 6px;
  padding: 8px 10px;
  border: 1px solid var(--ff-border);
  border-radius: var(--r-btn, 10px);
  background: var(--panel2);
  gap: 10px;
}
.ff-peer-row.is-anchor {
  border-color: var(--ff-tint-info-40-border);
}
.ff-peer-anchor {
  padding: 2px 6px;
  border: 1px solid var(--ff-tint-info-40-border);
  border-radius: var(--r-pill, 999px);
  color: var(--ink-info, var(--info));
  font-size: 8px;
  font-weight: 800;
  letter-spacing: .06em;
  text-transform: uppercase;
}
.ff-peer-ticker { min-width: 52px; font-family: var(--font-mono); font-size: 11px; font-weight: 800; }
.ff-peer-value { display: inline-flex; min-width: 0; }
.ff-peer-period { margin-left: auto; color: var(--muted); font-family: var(--font-mono); font-size: 9px; }
.ff-peer-rank { color: var(--muted); font-family: var(--font-mono); font-size: 10px; }
.ff-peer-exclusion {
  margin-top: 5px;
  padding: 7px 10px;
  border: 1px solid var(--ff-border);
  border-radius: var(--r-btn, 10px);
  background: var(--ff-tint-muted-8);
  color: var(--muted);
  font-size: 10px;
}
.ff-peer-exclusion summary { cursor: pointer; list-style: none; }
.ff-peer-exclusion summary::-webkit-details-marker { display: none; }
.ff-peer-exclusion code {
  display: block;
  margin-top: 4px;
  color: var(--muted);
  font-size: 9px;
}
html[data-theme="light"] .ff-peer-row {
  border-color: var(--line);
  background: var(--panel);
}
html[data-theme="light"] .ff-peer-exclusion {
  border-color: var(--ff-tint-muted-40-line);
  border-style: dashed;
}

/* ── P2 export entry (§5, R6) ──────────────────────────────────────────────
   DARK: a quiet var(--panel2) chip that gains a restrained 1px --info ring
   on keyboard focus. LIGHT: a white chip with a hairline that lifts with the
   --popover-shadow token on hover — shadow, not glow. */
.ff-export-btn:not(:disabled):hover {
  border-color: var(--ff-tint-info-40-line);
}
.ff-export-btn:not(:disabled):focus-visible {
  outline: none;
  border-color: var(--info);
  box-shadow: 0 0 0 1px var(--ff-tint-info-45);
}
html[data-theme="light"] .ff-export-btn:not(:disabled):hover {
  border-color: var(--line);
  background: var(--panel);
  box-shadow: var(--popover-shadow);
}


/* ── P2 repair round (seat consolidated list, 2026-10-12) ─────────────────
   Item 14: the page title is a real h1 on the eyebrow scale. */
.ff-desk-header h1.ff-eyebrow {
  margin: 0;
  font-size: 11px;
  font-weight: 800;
  line-height: 1.3;
  letter-spacing: .12em;
}
/* Item 10: the method facts live inside "How this signal was detected". */
.ff-proof-method {
  margin: 0 0 10px;
  color: var(--ff-ink-soft);
  font-size: 11px;
  line-height: 1.5;
}
/* Item 6 (LIGHT only): amber on cream measured 1.91:1; the watch pill ink
   takes theme.css's text-grade --ink-warn, keeping the hue at >= 4.5:1. */
html[data-theme="light"] .ff-overview-status[data-state="watch"] {
  color: var(--ink-warn, var(--warn));
}
/* Item 12 (LIGHT only, spec §1.4): the research workspace is plain material —
   no lavender canvas wash, no indigo/cyan card gradients, no ring ornament. */
html[data-theme="light"] body.ff-page { background: var(--bg); }
html[data-theme="light"] .ff-finding.is-selected,
html[data-theme="light"] .ff-signal-meaning,
html[data-theme="light"] .ff-evidence-head,
html[data-theme="light"] .ff-tab.is-active { background: var(--panel); }
html[data-theme="light"] .ff-company-mark { background: var(--panel2); }
html[data-theme="light"] .ff-quick-signal::after { display: none; }
/* R-a: from 701px the run-meta strip names the source, so the stamp's copy of
   it is a phone-only fact. */
@media (min-width: 701px) {
  .ff-desk-stamp-source { display: none; }
}
/* R-a: at <=700px the desk header is one band — picker, company, as-of +
   export on one row, one stamp line. Labels stay in the accessibility tree;
   the stamp carries as-of, freshness and source, so the run-meta strip folds
   away. Item 13: the lead copy reserves the copilot orb's lane. */
@media (max-width: 700px) {
  .ff-desk-header { gap: 6px; padding: 10px 12px 9px; }
  .ff-desk-row { grid-template-columns: minmax(0, 1fr) auto; align-items: center; gap: 8px; }
  .ff-company-picker,
  .ff-company-identity { grid-column: 1 / -1; }
  .ff-company-picker > label,
  .ff-desk-asof > label {
    position: absolute;
    width: 1px;
    height: 1px;
    margin: -1px;
    overflow: hidden;
    clip-path: inset(50%);
    white-space: nowrap;
  }
  .ff-desk-row > .ff-run-meta { display: none; }
  .ff-desk-asof { grid-column: 1; min-width: 0; }
  .ff-asof-controls { min-width: 0; }
  .ff-asof-input { width: 100%; min-width: 0; }
  .ff-desk-export { grid-column: 2; justify-self: end; }
  .ff-export-btn,
  .ff-export-link { width: auto; padding: 0 10px; }
  .ff-quick-signal-copy { padding-right: 46px; }
  /* P2 r3 item c: page-local launcher clearance. The shared copilot stub
     #mmb-boot is a fixed 54x54 box at right:16/bottom:16(+safe-area); its
     measured rect at 390 is x 320-374, y 774-828, and the coverage stat sat
     under it. Reserve 54px launcher + 16px right offset + 8px gap from the
     viewport edge so the stat row's boxes end at x <= 312. Scoped to this
     page's <=700px block only; nothing changes at >=701px. */
  .ff-snapshot-stats { padding-right: 78px; }
}
