/* ═══════════════════════════════════════════════════════════════════════════
   27-refinery.css — the TEXAS REFINERY OUTAGES research surface
   (#refinery-root). Built by static/js/refinery.js.
   ---------------------------------------------------------------------------
   Load order in static/css/app/ IS the cascade and this file is LAST, so
   nothing here fights for specificity and nothing here may be renumbered.

   THE DIALECT IS OURS, taken from 07-command-center.css, 05-chart-panels.css
   and 18-storms.css rather than invented: opaque --bg-tertiary cards, ONE
   hairline inset ring (never a 1px border — those bowtie in headless
   screenshots), --radius-lg, an in-card eyebrow, and every colour resolving
   through tokens.css so both themes follow for free.

   THE WORD IS THE ENCODING, COLOUR IS REINFORCEMENT (spec R5).
   tokens.css records that the categorical research ramp collapses to ΔE 3.92
   under deuteranopia in the dark theme, so nothing on this surface is carried
   by hue alone:
     * the verdict is a SENTENCE beginning with a bolded verdict WORD;
     * the three provenance tags print REPORTED / READ / CURATED as text and
       differ in weight and letterspacing as well as colour;
     * each row's class prints "Unplanned shutdown" / "Planned activity" /
       "Not an outage claim" in words, and the left rule that reinforces it
       also changes WIDTH, so it survives greyscale.
   Desaturate a screenshot of this board and every verdict is still readable.

   TYPOGRAPHIC PRIORITY (spec R1): the verdict line is the largest text on the
   page and has no number beside it. The evidence strip is deliberately small
   and monospaced-numeric — it supports the verdict, it does not compete.
   ═══════════════════════════════════════════════════════════════════════════ */

#refinery-root{
  position:absolute;inset:0;display:none;
  flex-direction:column;min-width:0;min-height:0;
  background:var(--bg-primary);
}
/* MPRefinery.show()/hide() owns this class, so the host needs no per-mode
   display rule of its own in 05-chart-panels.css. */
#refinery-root.rfy-on{display:flex;}

/* The stage's OTHER layers, hidden while this surface owns it. Declared here
   so wiring the view is a class toggle in research.js and nothing else.
   !important matches the existing .research-panel rules it has to beat. */
#research-view.rsx-mode-refinery #research-iframe,
#research-view.rsx-mode-refinery #rsx-index,
#research-view.rsx-mode-refinery .rf-surface,
#research-view.rsx-mode-refinery .research-panel{display:none!important;}

/* ── Scroller ──────────────────────────────────────────────────────────── */

.rfy-scroll{
  flex:1 1 auto;min-height:0;overflow-y:auto;overflow-x:hidden;
  scrollbar-width:thin;
  scrollbar-color:color-mix(in srgb, var(--accent) 22%, transparent) transparent;
}
.rfy-scroll::-webkit-scrollbar{width:0.375rem;height:0.375rem;}
.rfy-scroll::-webkit-scrollbar-track{background:transparent;}
.rfy-scroll::-webkit-scrollbar-thumb{background:var(--border-default);border-radius:0.25rem;}
.rfy-scroll:hover::-webkit-scrollbar-thumb{
  background:color-mix(in srgb, var(--accent) 28%, transparent);
}

.rfy-inner{
  display:flex;flex-direction:column;gap:0.75rem;
  padding:0.875rem 1rem 2rem;
  max-width:64rem;margin:0 auto;
}

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

.rfy-mast{
  display:flex;align-items:baseline;gap:0.5rem;flex-wrap:wrap;
  padding-bottom:0.125rem;
}
.rfy-code{
  font-size:0.625rem;font-weight:700;letter-spacing:0.09em;
  color:var(--accent);
  padding:0.125rem 0.3125rem;border-radius:0.1875rem;
  background:color-mix(in srgb, var(--accent) 12%, transparent);
}
.rfy-title{
  font-size:0.9375rem;font-weight:650;letter-spacing:-0.01em;
  color:var(--text-bright);margin:0;
}
.rfy-src{font-size:0.6875rem;color:var(--text-muted);}
.rfy-fresh{font-size:0.6875rem;color:var(--text-xmuted);margin-left:auto;}

.rfy-chip{
  font-size:0.5625rem;font-weight:700;letter-spacing:0.07em;
  padding:0.0625rem 0.3125rem;border-radius:0.125rem;
}
.rfy-live{color:var(--status-ok);background:color-mix(in srgb,var(--status-ok) 13%,transparent);}
.rfy-stale{color:var(--amber);background:color-mix(in srgb,var(--amber) 15%,transparent);}

/* ── Cards ─────────────────────────────────────────────────────────────── */

.rfy-card{
  background:var(--bg-tertiary);
  border-radius:var(--radius-lg, 0.5rem);
  box-shadow:inset 0 0 0 1px var(--border-subtle);   /* ring, never a border */
  padding:0.75rem 0.875rem;
}
.rfy-eyebrow{
  font-size:0.5625rem;font-weight:700;letter-spacing:0.1em;
  text-transform:uppercase;color:var(--text-xmuted);
  margin-bottom:0.5rem;
}
.rfy-muted{font-size:0.75rem;color:var(--text-muted);margin:0;line-height:1.55;}
.rfy-none{color:var(--text-xmuted);font-style:italic;}
.rfy-err{font-size:0.75rem;color:var(--red);margin:0;}

/* Seeded data must be unmistakable, in both themes and in greyscale: it is
   the widest, loudest element on the page and it says the word.
   NOT --toast-warn-fg: that token is a DARK ink intended to sit on the light
   --warn-surface, so on this striped amber panel it rendered near-invisible in
   the dark theme (measured in a real browser at 1440 — the banner was legible
   in light and effectively blank in dark, which is the one element that must
   never be missable). --amber has usable values in both themes. */
.rfy-synthetic{
  font-size:0.6875rem;font-weight:700;letter-spacing:0.06em;
  color:var(--amber);
  background:repeating-linear-gradient(135deg,
    color-mix(in srgb, var(--amber) 15%, transparent) 0 0.5rem,
    color-mix(in srgb, var(--amber) 8%, transparent) 0.5rem 1rem);
  box-shadow:inset 0 0 0 1px color-mix(in srgb, var(--amber) 45%, transparent);
  border-radius:var(--radius-lg, 0.5rem);
  padding:0.5rem 0.75rem;line-height:1.5;
}
.rfy-demo{
  font-size:0.5rem;font-weight:800;letter-spacing:0.09em;
  color:var(--amber);background:color-mix(in srgb,var(--amber) 16%,transparent);
  padding:0.0625rem 0.25rem;border-radius:0.125rem;
}

/* ── R1: the verdict. Largest text on the page, no number beside it. ───── */

.rfy-verdict{padding:0.9375rem 1rem;}
.rfy-vline{
  margin:0;font-size:1.0625rem;line-height:1.45;
  color:var(--text-secondary);font-weight:400;letter-spacing:-0.005em;
}
.rfy-vline b{
  color:var(--text-bright);font-weight:680;
  /* The verdict WORD carries the meaning; the rule beside it only reinforces
     it. No coloured edge line (owner, 2026-10-02). */
}
.rfy-v-live,.rfy-v-quiet,.rfy-v-unknown{box-shadow:inset 0 0 0 1px var(--border-subtle);}
.rfy-v-live{background:color-mix(in srgb, var(--amber) 6%, transparent);}

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

.rfy-eviz{
  display:flex;flex-wrap:wrap;gap:0.125rem 1.5rem;
  padding-bottom:0.625rem;
}
.rfy-ev{display:flex;flex-direction:column;gap:0.0625rem;min-width:5.5rem;}
.rfy-ev-k{
  font-size:0.5625rem;letter-spacing:0.05em;text-transform:uppercase;
  color:var(--text-xmuted);
}
.rfy-ev-v{
  font-size:0.8125rem;font-weight:600;color:var(--text-primary);
  font-variant-numeric:tabular-nums;
}

/* ── R3: standing caveats. INLINE, permanent, never behind a toggle. ───── */

.rfy-standing{
  display:flex;flex-direction:column;gap:0.375rem;
  padding:0.625rem 0;
  border-top:1px solid var(--border-subtle);
}
.rfy-warn{
  margin:0;font-size:0.6875rem;line-height:1.6;color:var(--text-muted);
}
.rfy-warn strong{color:var(--text-secondary);font-weight:650;}

/* ── R3: the info expander. A real button, not a title= tooltip. ───────── */

.rfy-info{border-top:1px solid var(--border-subtle);padding-top:0.5rem;}
.rfy-info-btn{
  display:flex;align-items:center;gap:0.375rem;width:100%;
  background:none;border:0;padding:0.25rem 0;cursor:pointer;
  font:inherit;font-size:0.6875rem;font-weight:600;
  color:var(--text-secondary);text-align:left;
}
.rfy-info-btn:hover{color:var(--text-bright);}
.rfy-info-btn:focus-visible{
  outline:1px solid var(--accent);outline-offset:-1px;border-radius:0.1875rem;
}
.rfy-caret{font-size:0.5625rem;color:var(--text-xmuted);}
.rfy-info-body{padding:0.25rem 0 0.125rem 0.875rem;}
.rfy-info-body p{
  margin:0 0 0.5rem;font-size:0.6875rem;line-height:1.65;color:var(--text-muted);
}
.rfy-info-body p:last-child{margin-bottom:0;}
.rfy-info-body b{color:var(--text-secondary);}

/* ── Rows ──────────────────────────────────────────────────────────────── */

.rfy-row{
  padding:0.6875rem 0 0.6875rem 0.75rem;
  border-top:1px solid var(--border-subtle);
}
.rfy-row:first-of-type{border-top:0;}

.rfy-r-head{
  display:flex;align-items:baseline;gap:0.5rem;flex-wrap:wrap;
  margin-bottom:0.25rem;
}
.rfy-fac{
  font-size:0.8125rem;font-weight:650;color:var(--text-bright);
  letter-spacing:-0.005em;
}
.rfy-when{
  font-size:0.625rem;color:var(--text-xmuted);margin-left:auto;
  font-variant-numeric:tabular-nums;
}

.rfy-r-meta,.rfy-r-read,.rfy-r-map{
  display:flex;align-items:center;gap:0.4375rem;flex-wrap:wrap;
  font-size:0.6875rem;color:var(--text-muted);margin-bottom:0.25rem;
}
.rfy-op{color:var(--text-secondary);font-weight:550;}
.rfy-unit,.rfy-dur,.rfy-cty{
  color:var(--text-muted);
  padding:0.0625rem 0.3125rem;border-radius:0.125rem;
  background:color-mix(in srgb, var(--text-muted) 8%, transparent);
}

/* The three provenance tags. Text first: each PRINTS its word, and the three
   differ in weight and letterspacing so greyscale still separates them. */
.rfy-tag{
  font-size:0.5rem;font-weight:800;letter-spacing:0.1em;
  padding:0.0625rem 0.25rem;border-radius:0.125rem;flex:none;
}
.rfy-t-rep{color:var(--text-secondary);background:color-mix(in srgb,var(--text-muted) 15%,transparent);}
.rfy-t-read{color:var(--azure);background:color-mix(in srgb,var(--azure) 14%,transparent);}
.rfy-t-cur{color:var(--bronze);background:color-mix(in srgb,var(--bronze) 16%,transparent);}

.rfy-verd{font-weight:650;color:var(--text-primary);}
.rfy-conf{color:var(--text-xmuted);font-style:italic;}

/* The filing's own words. Visually a quotation so it can never be mistaken
   for our summary. */
.rfy-quote{
  margin:0.3125rem 0 0.4375rem;padding:0.4375rem 0.625rem;
  border-radius:0.25rem;
  background:var(--bg-secondary);
  box-shadow:inset 0 0 0 1px var(--border-subtle);
  font-size:0.6875rem;line-height:1.6;color:var(--text-secondary);
}
.rfy-quote cite{
  display:block;margin-top:0.25rem;font-style:normal;
  font-size:0.5625rem;letter-spacing:0.03em;color:var(--text-xmuted);
}

.rfy-tkr{display:inline-flex;align-items:baseline;gap:0.3125rem;}
.rfy-tkr b{color:var(--text-bright);font-size:0.75rem;font-weight:700;}
.rfy-stake{font-size:0.5625rem;color:var(--text-xmuted);}
.rfy-own{font-size:0.5625rem;color:var(--text-xmuted);letter-spacing:0.02em;}

.rfy-why,.rfy-cap{
  margin:0.125rem 0 0.3125rem;font-size:0.625rem;line-height:1.6;
  color:var(--text-muted);
}
.rfy-cap b{color:var(--text-secondary);font-weight:650;}

.rfy-r-foot{
  display:flex;gap:0.75rem;align-items:center;
  font-size:0.5625rem;color:var(--text-xmuted);
}
.rfy-r-foot a{color:var(--accent);text-decoration:none;}
.rfy-r-foot a:hover{text-decoration:underline;}

/* ── Our own scored claims ─────────────────────────────────────────────── */

.rfy-nline{
  margin:0 0 0.5rem;font-size:0.6875rem;line-height:1.6;color:var(--text-muted);
}
.rfy-nline b{color:var(--text-secondary);}

.rfy-tbl{width:100%;border-collapse:collapse;font-size:0.6875rem;}
.rfy-tbl th{
  text-align:left;font-size:0.5625rem;font-weight:700;letter-spacing:0.06em;
  text-transform:uppercase;color:var(--text-xmuted);
  padding:0.25rem 0.5rem 0.25rem 0;
  border-bottom:1px solid var(--border-subtle);
}
.rfy-tbl td{
  padding:0.3125rem 0.5rem 0.3125rem 0;color:var(--text-muted);
  border-bottom:1px solid var(--border-subtle);
}
.rfy-tbl tr:last-child td{border-bottom:0;}
.rfy-tbl td b{color:var(--text-bright);}
.rfy-num{text-align:right;font-variant-numeric:tabular-nums;}

.rfy-prov{
  margin:0.25rem 0 0;font-size:0.5625rem;line-height:1.7;
  color:var(--text-xmuted);
}

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

@media (max-width:52rem){
  .rfy-inner{padding:0.75rem 0.625rem 2rem;}
  .rfy-vline{font-size:0.9375rem;}
  .rfy-when{margin-left:0;}
  .rfy-eviz{gap:0.125rem 1rem;}
}
