/* Oscillatory flow reactor page.
   Loaded after styles-alt.css and site-chrome.css. Every class is prefixed ofr-, and every SVG rule is scoped under an
   ofr- root (svg.ofr-d diagram, svg.ofr-ch timing chart, svg.ofr-b charts and drawings), so nothing here overrides or
   relies on the home-page .bars / .perf / .strip / table.data rules in styles-alt.css. Palette variables (--text,
   --muted, --line, --amber, --accent, --bg, --panel, --sans, --serif) come from styles-alt.css. */
:root { --ofr-cmp: #6f7e90; --ofr-cmp-text: #95a3b4; }

/* ---- shared text, captions, layout ---- */
.sec p.ofr-intro { max-width: 66ch; margin-top: 0; }
.ofr-fig { margin: 0; }
.ofr-txt > :first-child, .ofr-lead > :first-child { margin-top: 0; }
.sec p.ofr-head { font-family: var(--serif); font-weight: 400; font-size: 1.12rem; line-height: 1.25; margin: 0 0 6px; max-width: none; }
.ofr-cap { font-size: 0.84rem; color: var(--muted); margin: 12px 0 0; max-width: 78ch; }
.ofr-cap b { color: var(--text); font-weight: 500; }
.ofr-split { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 500px); gap: 52px; align-items: start; }
.ofr-duo { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 520px); gap: 52px; align-items: start; margin-top: 40px; }
.sec .ofr-duo h3 { font-family: var(--serif); font-weight: 400; font-size: 1.12rem; margin: 0 0 8px; }
.ofr-panels { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 44px; align-items: start; margin-top: 26px; }

/* ---- Fig. 2: the reactor system diagram with numbered callouts ---- */
.ofr-sysfig { margin: 26px 0 0; }
svg.ofr-d { width: 100%; max-width: 940px; height: auto; display: block; }
svg.ofr-d text { font-family: var(--sans); }
.ofr-d .lbl { font-size: 13px; fill: var(--muted); }
.ofr-d .bore { fill: var(--panel); stroke: none; }
.ofr-d .wall { fill: none; stroke: var(--muted); stroke-width: 1.6; stroke-linejoin: round; stroke-opacity: 0.85; }
.ofr-d .rod { stroke: var(--muted); stroke-width: 3; stroke-linecap: round; }
.ofr-d .piston { fill: var(--bg); stroke: var(--muted); stroke-width: 1.4; }
.ofr-d .arm { stroke: var(--muted); stroke-width: 1.3; }
.ofr-d .ahm { fill: var(--muted); }
.ofr-d .aha { fill: var(--amber); }
.ofr-d .valve { fill: rgba(242, 165, 65, 0.22); stroke: var(--amber); stroke-width: 1.4; stroke-linejoin: round; }
.ofr-d .act { fill: var(--bg); stroke: var(--amber); stroke-width: 1.4; }
.ofr-d .amb { stroke: var(--amber); stroke-width: 1.4; }
.ofr-d .ama { stroke: var(--amber); stroke-width: 1.6; }
.ofr-d .sync { fill: none; stroke: var(--amber); stroke-width: 1.2; stroke-dasharray: 4 4; stroke-opacity: 0.85; }
.ofr-d .cart .bf { fill: rgba(242, 165, 65, 0.14); stroke: none; }
.ofr-d .cart .br { stroke: var(--amber); stroke-width: 0.8; stroke-opacity: 0.45; }
.ofr-d .cart .be { fill: none; stroke: var(--amber); stroke-width: 1.5; stroke-linejoin: round; }
.ofr-d .cart .cf { fill: rgba(242, 165, 65, 0.26); stroke: var(--amber); stroke-width: 1.4; stroke-linejoin: round; }
.ofr-d .lead, .ofr-d .brkm { fill: none; stroke: var(--muted); stroke-width: 1; stroke-opacity: 0.7; }
.ofr-d .badge { transform-box: fill-box; transform-origin: center; }
.ofr-d .badge circle { fill: var(--amber); }
.ofr-d .badge text { fill: #1b1b1b; font-size: 14px; font-weight: 600; text-anchor: middle; }
ol.ofr-key { list-style: none; counter-reset: ofrk; display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 18px 28px; padding: 16px 0 0; margin: 14px 0 0; border-top: 1px solid var(--line); }
ol.ofr-key li { counter-increment: ofrk; position: relative; padding-left: 34px; font-size: 0.9rem; line-height: 1.5; color: var(--muted); }
ol.ofr-key li::before { content: counter(ofrk); position: absolute; left: 0; top: 1px; width: 23px; height: 23px; border-radius: 50%; background: var(--amber); color: #1b1b1b; font-size: 0.8rem; font-weight: 600; line-height: 23px; text-align: center; }
ol.ofr-key li b { display: block; color: var(--text); font-weight: 500; }

/* ---- Fig. 3: feed timing over two cycles (cycle-boundary ticks only) ---- */
svg.ofr-ch { width: 100%; height: auto; display: block; overflow: visible; }
svg.ofr-ch text { font-family: var(--sans); }
.ofr-ch .tick { font-size: 12px; fill: var(--muted); font-variant-numeric: tabular-nums; }
.ofr-ch .halo { paint-order: stroke; stroke: var(--bg); stroke-width: 5px; stroke-linejoin: round; }
.ofr-ch .cyc { fill: none; stroke: var(--muted); stroke-width: 1.2; stroke-opacity: 0.75; }
.ofr-ch .cbd { fill: none; stroke: var(--muted); stroke-width: 1; stroke-opacity: 0.3; stroke-dasharray: 2 4; }
.ofr-ch .cfill { fill: var(--ofr-cmp); }
.ofr-ch .gfill { fill: var(--amber); }
.ofr-ch .base { stroke: var(--muted); stroke-opacity: 0.6; }
.ofr-ch .brk { fill: none; stroke: var(--muted); stroke-width: 1; }
.ofr-ch .lab-g { fill: var(--amber); font-size: 13px; font-weight: 600; }
.ofr-ch .lab-c { fill: var(--ofr-cmp-text); font-size: 13px; font-weight: 500; }

/* ---- Figs. 4-7 and the reaction drawings: charts and drawings ---- */
svg.ofr-b { width: 100%; height: auto; display: block; }
svg.ofr-b text { font-family: var(--sans); }
.ofr-b .lab { font-size: 13px; fill: var(--muted); paint-order: stroke; stroke: var(--bg); stroke-width: 5px; stroke-linejoin: round; }
.ofr-b .val { font-size: 14px; fill: var(--text); font-variant-numeric: tabular-nums; }
.ofr-b .val.g { fill: var(--amber); font-weight: 600; font-size: 15px; }
.ofr-b .bar { fill: var(--ofr-cmp); }
.ofr-b .ico { fill: none; stroke: var(--muted); stroke-width: 1.3; stroke-linejoin: round; stroke-linecap: round; }
.ofr-b .ico .wall { stroke-opacity: 0.5; }
.ofr-b .ref { stroke: var(--muted); stroke-dasharray: 2 3; stroke-opacity: 0.6; }
.ofr-b .axis line { stroke: var(--muted); stroke-opacity: 0.6; }
.ofr-b .axis text { font-size: 11.5px; fill: var(--muted); font-variant-numeric: tabular-nums; }
.ofr-b .grid line { stroke: var(--line); }
.ofr-b .dot-c { fill: var(--ofr-cmp); }
.ofr-b .dot-g { fill: var(--amber); }
.ofr-b .link { stroke: var(--muted); stroke-opacity: 0.5; stroke-width: 2; }
.ofr-b .cl { fill: none; stroke: var(--ofr-cmp); stroke-width: 2; stroke-linejoin: round; }
.ofr-b .gl { fill: none; stroke: var(--amber); stroke-width: 2.2; stroke-linejoin: round; }
.ofr-b .note { font-size: 11.5px; fill: var(--muted); }
.ofr-b .glab { font-size: 13px; fill: var(--amber); paint-order: stroke; stroke: var(--bg); stroke-width: 5px; stroke-linejoin: round; }
.ofr-b .clab { font-size: 13px; fill: var(--muted); paint-order: stroke; stroke: var(--bg); stroke-width: 5px; stroke-linejoin: round; }
.ofr-b .part { fill: var(--amber); fill-opacity: 0.14; stroke: var(--amber); stroke-width: 1.4; stroke-linejoin: round; }
.ofr-b .shade path { fill: var(--amber); fill-opacity: 0.2; }
.ofr-b .wallc { stroke: var(--muted); stroke-width: 1.6; }
.ofr-b .axisl { stroke: var(--muted); stroke-opacity: 0.35; stroke-dasharray: 4 5; }
.ofr-b .mk circle { fill: var(--bg); stroke: var(--amber); stroke-width: 1.4; }
.ofr-b .mk text { font-size: 16px; fill: var(--amber); text-anchor: middle; font-weight: 600; }
.ofr-b .mk line { stroke: var(--amber); stroke-width: 1; stroke-opacity: 0.7; }
.ofr-b .node { fill: none; stroke: var(--muted); stroke-width: 1.4; }
.ofr-b .node.ok { stroke: var(--amber); fill: var(--amber); fill-opacity: 0.12; }
.ofr-b .arr { stroke: var(--muted); stroke-width: 1.4; fill: none; stroke-linecap: round; stroke-linejoin: round; }
.ofr-b .arr.d { stroke-dasharray: 3 3; }
.ofr-b .nt { font-size: 15px; fill: var(--text); text-anchor: middle; }
.ofr-b .nt.ok { fill: var(--amber); }
.ofr-b .nt.m { fill: var(--muted); }
.ofr-b .sol { fill: var(--muted); }

/* ---- the commercial case: three columns ---- */
.ofr-case { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 32px; }
.ofr-case > div { border-top: 1px solid var(--line); padding-top: 12px; }
.sec .ofr-case h3, .sec .ofr-fam h3 { font-family: var(--sans); font-weight: 500; font-size: 0.74rem; letter-spacing: 0.12em; text-transform: uppercase; color: var(--amber); margin: 0 0 8px; }
.sec .ofr-case p { margin: 0; font-size: 0.95rem; color: var(--muted); }

/* ---- results: the collapsed table of all internals ---- */
details.ofr-num { margin-top: 24px; max-width: 760px; }
details.ofr-num summary { cursor: pointer; color: var(--accent); font-size: 0.86rem; }
.ofr-tw { overflow-x: auto; }
table.ofr-t { width: 100%; border-collapse: collapse; font-size: 0.84rem; margin: 12px 0 6px; font-variant-numeric: tabular-nums; }
table.ofr-t caption { text-align: left; font-size: 0.84rem; color: var(--muted); padding: 0 0 8px; }
table.ofr-t th, table.ofr-t td { padding: 6px; text-align: right; border-bottom: 1px solid var(--line); }
table.ofr-t td:first-child, table.ofr-t thead th[rowspan] { text-align: left; }
table.ofr-t thead th { border-bottom: 1px solid var(--muted); font-weight: 500; color: var(--muted); }
table.ofr-t td.g { color: var(--amber); }

/* ---- two reaction families ---- */
.ofr-fam { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 48px; }
.ofr-fam svg { max-width: 340px; margin: 4px 0 12px; }
.sec .ofr-fam p { font-size: 0.95rem; margin: 0 0 10px; }
.sec .ofr-fam .ex { color: var(--muted); }
.sec .ofr-fam h3.study { color: var(--muted); display: flex; flex-wrap: wrap; align-items: center; gap: 6px 10px; }

/* ---- hardware: the cartridge drawing and its key ---- */
.ofr-cart { max-width: 820px; margin: 18px 0 0; }
.ofr-ckey { list-style: none; padding: 0; margin: 10px 0 0; display: flex; flex-wrap: wrap; gap: 6px 28px; font-size: 0.88rem; color: var(--muted); }
.ofr-ckey b { color: var(--amber); font-weight: 600; margin-right: 6px; }

/* ---- status and evidence: labelled list ---- */
dl.ofr-status { display: grid; grid-template-columns: 150px 1fr; gap: 10px 24px; margin: 18px 0 0; max-width: 860px; }
dl.ofr-status dt { color: var(--muted); font-size: 0.9rem; padding-top: 2px; }
dl.ofr-status dd { margin: 0; }
dl.ofr-status dd em { color: var(--amber); font-style: normal; }

@media (max-width: 860px) {
  ol.ofr-key { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .ofr-split, .ofr-duo { grid-template-columns: 1fr; gap: 24px; }
  .ofr-panels { grid-template-columns: 1fr; gap: 36px; }
  .ofr-split .ofr-fig, .ofr-duo .ofr-fig, .ofr-panels .ofr-fig { max-width: 520px; }
}
@media (max-width: 760px) {
  .ofr-case, .ofr-fam { grid-template-columns: 1fr; gap: 22px; }
}
@media (max-width: 640px) {
  .ofr-d .lbl { display: none; }
  .ofr-d .badge { transform: scale(2.1); }
  ol.ofr-key { grid-template-columns: 1fr; gap: 12px; }
  .ofr-ch .tick { font-size: 15px; }
  .ofr-ch .lab-g, .ofr-ch .lab-c { font-size: 14.5px; }
  .ofr-b .lab { font-size: 15px; }
  .ofr-b .val { font-size: 16px; }
  .ofr-b .val.g { font-size: 17px; }
  .ofr-b .axis text { font-size: 14px; }
  .ofr-b .note { font-size: 14px; }
  .ofr-b .glab, .ofr-b .clab { font-size: 15px; }
  .ofr-b .mk text { font-size: 22px; }
  .ofr-b .mk circle { r: 16px; }
  dl.ofr-status { grid-template-columns: 1fr; gap: 2px 0; }
  dl.ofr-status dd { margin-bottom: 12px; }
}
