/* Phase 2 Cobalt surfaces (docs/feature-factory/07-phase2-brief.md section B, theme contract 08):
   the header account links, the broker strip, the hero visual, tabs, the benefits band and the dark data panels.
   Loads after fxcs-blocks.css. Tokens only; every motion has a reduced-motion fallback at the end. */

/* ---------- header: wordmark, links, then the account links (fxcs/member-nav, 05 "Member blocks") ---------- */
.fxcs-header .fxcs-member-nav { flex: none; }
.fxcs-member-nav__list { display: flex; flex-wrap: nowrap; align-items: center; gap: var(--space-sm); margin: 0; padding: 0; list-style: none; }
.fxcs-member-nav__item { margin: 0; }
.fxcs-member-nav__logout { margin: 0; }
.fxcs-member-nav__link:not(.wp-element-button) {
  display: inline-flex; align-items: center; min-height: 44px; padding: 0; border: 0; background: none; cursor: pointer;
  font: 500 var(--text-sm)/1 var(--font-display); color: var(--color-ink-2); text-decoration: none; white-space: nowrap;
}
.fxcs-member-nav__link:not(.wp-element-button):hover, .fxcs-member-nav__link[aria-current="page"]:not(.wp-element-button) { color: var(--color-ink); text-decoration: underline; text-decoration-color: var(--color-accent); text-underline-offset: 0.2em; }
.fxcs-member-nav__link:not(.wp-element-button):focus-visible { outline: 2px solid var(--color-focus); outline-offset: 3px; }
a.fxcs-member-nav__link--signup.wp-element-button { min-height: 44px; padding: 0 var(--space-md); font-size: var(--text-sm); white-space: nowrap; }
a.fxcs-member-nav__link--signup[aria-current="page"] { box-shadow: var(--shadow-key-press); transform: translateY(2px); }

/* ---------- broker strip: name chips with the headline rebate, under the header ---------- */
.fxcs-strip { background: var(--color-paper-2); border-bottom: var(--rule-hair) solid var(--color-rule); }
.fxcs-strip .fxcs-strip__inner { display: flex; align-items: center; gap: var(--space-md); min-height: 3.25rem; }
.fxcs-strip .fxcs-strip__inner > * { margin: 0; }
.fxcs-strip__label { flex: none; font: 500 var(--text-sm)/1.2 var(--font-display); color: var(--color-muted); white-space: nowrap; }
.fxcs-strip .fxcs-strip__list { display: flex; flex: 1 1 auto; min-width: 0; gap: var(--space-sm); padding: var(--space-xs) var(--space-2xs); overflow-x: auto; overscroll-behavior-x: contain; scrollbar-width: none; }
.fxcs-strip__list::-webkit-scrollbar { display: none; }
@media (max-width: 40rem) { .fxcs-strip__label { position: absolute; width: 1px; height: 1px; overflow: hidden; clip-path: inset(50%); white-space: nowrap; } }
.fxcs-strip .fxcs-strip__list > * { margin: 0; }
.fxcs-chip { position: relative; flex: none; display: inline-flex; align-items: baseline; gap: var(--space-sm); padding: var(--space-xs) var(--space-md); background: var(--color-key-face); border: var(--rule-hair) solid var(--color-rule); border-radius: var(--radius-input); box-shadow: var(--shadow-card); }
.fxcs-chip > * { margin: 0; }
.fxcs-chip__name { font: 600 var(--text-md)/1.2 var(--font-display); letter-spacing: -0.01em; }
.fxcs-chip__name a { color: var(--color-ink); text-decoration: none; }
.fxcs-chip__name a::after { content: ""; position: absolute; inset: 0; }
.fxcs-chip:hover { border-color: var(--color-rule-2); }
.fxcs-chip:hover .fxcs-chip__name a { text-decoration: underline; text-decoration-color: var(--color-accent); text-underline-offset: 0.2em; }
.fxcs-chip__name a:focus-visible { outline: none; }
.fxcs-chip:has(a:focus-visible) { outline: 2px solid var(--color-focus); outline-offset: 2px; }
.fxcs-chip .wp-block-fxcs-rate-badge { font: 400 var(--text-sm)/1.2 var(--font-outlier); font-variant-numeric: tabular-nums; color: var(--color-ink); white-space: nowrap; }
.fxcs-chip .fxcs-note.is-pending, .fxcs-chip .is-pending { display: inline-flex; align-items: baseline; padding: 0; background: none; border: 0; font: 500 var(--text-sm)/1.2 var(--font-display); color: var(--color-ink-2); white-space: nowrap; max-width: none; }
@supports (corner-shape: bevel) { .fxcs-chip { border-radius: var(--cut) 3px var(--cut) 3px; corner-shape: bevel round bevel round; } }

/* ---------- the hero visual: the rebate flow drawn as a Cobalt glyph field (assets/svg/hero-flow.svg) ---------- */
.fxcs-hero-visual { margin: 0; min-width: 0; }
.fxcs-hero-visual .fxcs-hv { display: block; width: 100%; height: auto; }
@media (max-width: 60rem) { .fxcs-hero-visual .fxcs-hv { max-width: 40rem; } }
.fxcs-hv__field { font-family: var(--font-outlier); }
.fxcs-hv__g1 { fill: var(--color-glyph-1); }
.fxcs-hv__g2 { fill: var(--color-glyph-2); }
.fxcs-hv__g3 { fill: var(--color-glyph-3); }
.fxcs-hv__g4 { fill: var(--color-glyph-4); }
.fxcs-hv__g5 { fill: var(--color-accent-deep); }
.fxcs-hv__rule, .fxcs-hv__tick { fill: none; stroke: var(--color-rule-2); stroke-width: 1; }
.fxcs-hv__node { fill: var(--color-accent-deep); }
.fxcs-hv__wire { fill: none; stroke-width: 1.5; stroke-linejoin: round; stroke-dasharray: 1; stroke-dashoffset: 0; }
.fxcs-hv__wire--a { stroke: var(--color-glyph-3); }
.fxcs-hv__wire--b { stroke: var(--color-glyph-4); }
.fxcs-hv__wire--c { stroke: var(--color-accent); }
.fxcs-hv__end { fill: var(--color-paper); stroke: var(--color-glyph-4); stroke-width: 1; }
.fxcs-hv__end--c { fill: var(--color-accent); stroke: none; }
.fxcs-hv__label { font-family: var(--font-display); font-weight: 500; fill: var(--color-ink-2); }
.fxcs-hv__label--in { fill: var(--color-muted); }
.fxcs-hv__label--rule, .fxcs-hv__label--c { fill: var(--color-ink); font-weight: 600; }
@media (prefers-reduced-motion: no-preference) {
  .fxcs-hv__wire { stroke-dashoffset: 1; animation: fxcs-draw var(--dur-long) var(--ease-out) forwards; }
  .fxcs-hv__wire--b { animation-delay: var(--dur-short); }
  .fxcs-hv__wire--c { animation-delay: var(--dur-long); }
}
@keyframes fxcs-draw { to { stroke-dashoffset: 0; } }
/* with the visual, the home hero is copy on the left half and the drawing on the right half */
@media (min-width: 60.0625rem) {
  .fxcs-hero.fxcs-hero--home:has(> .fxcs-hero-visual) { row-gap: 0; align-items: start; }
  .fxcs-hero.fxcs-hero--home:has(> .fxcs-hero-visual) > :not(.fxcs-hero-visual) { grid-column: 1 / span 6; align-self: start; }
  .fxcs-hero.fxcs-hero--home:has(> .fxcs-hero-visual) > :not(.fxcs-hero-visual):not(:first-child) { margin-block-start: var(--space-lg) !important; }
  .fxcs-hero.fxcs-hero--home > .fxcs-hero-visual { grid-column: 7 / span 6; grid-row: 1 / span 8; align-self: center; justify-self: end; width: 100%; }
}
@media (max-width: 60rem) { .fxcs-hero-visual .fxcs-hv { margin-inline: auto; } }
@media (max-width: 40rem) { .fxcs-hv__label { display: none; } }

/* ---------- tabs (theme contract 08 §3): stacked numbered cards without JS, key tabs with JS ---------- */
.fxcs-tabs { counter-reset: fxcs-tab; display: grid; gap: var(--space-md); }
.fxcs-tabs.fxcs-tabs > * { margin: 0; }
.fxcs-tabs__panel { counter-increment: fxcs-tab; display: grid; gap: var(--space-sm); align-content: start; padding: var(--space-lg) var(--space-xl); background: var(--color-key-face); border: var(--rule-hair) solid var(--color-rule); border-radius: var(--radius-card); box-shadow: var(--shadow-card); }
.fxcs-tabs__panel.fxcs-tabs__panel > * { margin: 0; }
.fxcs-tabs__panel > :is(.wp-block-buttons, .wp-block-fxcs-partner-cta, ul, ol) { margin-block-start: var(--space-xs); }
.fxcs-tabs__title { display: flex; align-items: baseline; gap: var(--space-sm); font-size: var(--text-title); }
.fxcs-tabs__title::before { content: counter(fxcs-tab); flex: none; font: 500 var(--text-sm)/1 var(--font-outlier); color: var(--color-accent); }
.fxcs-tabs__list { display: grid; grid-template-columns: repeat(auto-fit, minmax(min(100%, 11rem), 1fr)); gap: var(--space-xs); max-width: 48rem; padding: var(--space-xs); background: var(--color-paper-3); border: var(--rule-hair) solid var(--color-rule); border-radius: var(--radius-card); }
.fxcs-tabs__tab {
  display: grid; align-content: start; gap: var(--space-2xs); min-height: 4rem; padding: var(--space-sm) var(--space-md); text-align: left;
  background: var(--color-key-face); border: var(--rule-hair) solid var(--color-rule-2); border-radius: var(--radius-input); box-shadow: var(--shadow-key);
  font: 500 var(--text-md)/1.2 var(--font-display); color: var(--color-ink); cursor: pointer;
  transition: transform var(--dur-micro) var(--ease-out), box-shadow var(--dur-micro) var(--ease-out);
}
.fxcs-tabs__tab:hover { transform: translateY(-1px); }
.fxcs-tabs__tab[aria-selected="true"] { background: var(--color-paper-2); box-shadow: var(--shadow-key-press); transform: translateY(2px); }
.fxcs-tabs__tab:focus-visible { outline: 2px solid var(--color-focus); outline-offset: 2px; }
.fxcs-tabs__num { font: 500 var(--text-xs)/1 var(--font-outlier); color: var(--color-accent); }
.fxcs-tabs__label { overflow-wrap: break-word; min-width: 0; }
.fxcs-tabs.is-tabbed { gap: var(--space-lg); }
.fxcs-tabs.is-tabbed .fxcs-tabs__title { position: absolute; width: 1px; height: 1px; overflow: hidden; clip-path: inset(50%); white-space: nowrap; }
.fxcs-tabs.is-tabbed > .fxcs-tabs__panel:focus-visible { outline: 2px solid var(--color-focus); outline-offset: 3px; }
.fxcs-tabs.is-tabbed > .fxcs-tabs__panel[hidden] { padding: 0; border: 0; box-shadow: none; }
@supports (corner-shape: bevel) { .fxcs-tabs__panel, .fxcs-tabs__list { border-radius: var(--cut-l) 4px var(--cut-l) 4px; corner-shape: bevel round bevel round; } }
@media (max-width: 40rem) { .fxcs-tabs__panel { padding: var(--space-md); } }

/* ---------- benefits band (theme contract 08 §5): four items on paper-2 between hairlines ---------- */
.fxcs-benefits { counter-reset: fxcs-benefit; padding: var(--section-gap-s) var(--space-xl); background: var(--color-paper-2); border-block: var(--rule-hair) solid var(--color-rule); }
.fxcs-benefits.fxcs-benefits > * { margin: 0; }
.fxcs-benefits.fxcs-benefits > .wp-block-heading { margin-block-end: var(--space-xl); max-width: 24ch; }
.fxcs-benefits.fxcs-benefits > p { max-width: 60ch; margin-block-end: var(--space-xl); color: var(--color-ink-2); }
.fxcs-benefits__list.fxcs-benefits__list > * { margin: 0; }
.fxcs-benefits__list { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: var(--space-xl) var(--gap-columns); }
.fxcs-benefit { counter-increment: fxcs-benefit; display: grid; align-content: start; gap: var(--space-sm); min-width: 0; padding-top: var(--space-md); border-top: var(--rule-hair) solid var(--color-rule-2); }
.fxcs-benefit.fxcs-benefit > * { margin: 0; }
.fxcs-benefit::before { content: counter(fxcs-benefit, decimal-leading-zero); display: flex; align-items: center; gap: var(--space-xs); font: 500 var(--text-sm)/1 var(--font-outlier); color: var(--color-accent); }
.fxcs-benefit h3 { font-size: var(--text-title); line-height: 1.15; }
.fxcs-benefit p { font-size: var(--text-md); line-height: 1.55; color: var(--color-ink-2); }
@media (max-width: 60rem) { .fxcs-benefits__list { grid-template-columns: repeat(2, minmax(0, 1fr)); } .fxcs-benefits { padding: var(--space-2xl) var(--space-lg); } }
@media (max-width: 40rem) { .fxcs-benefits__list { grid-template-columns: minmax(0, 1fr); } .fxcs-benefits { padding: var(--space-xl) var(--space-md); } }

/* ---------- dark data panels: rate and compare tables (always), and the Dark panel block style ---------- */
:is(.wp-block-fxcs-rate-table, .wp-block-fxcs-compare-table, .wp-block-table.is-style-dark-panel, .wp-block-group.is-style-dark-panel) {
  --panel-ink: var(--color-graphite-ink); --panel-muted: var(--color-graphite-muted); --panel-rule: var(--color-graphite-rule); --panel-rule-2: var(--color-graphite-rule-2);
  background: var(--color-graphite); color: var(--panel-ink); border: var(--rule-hair) solid var(--panel-rule); border-radius: var(--radius-card); box-shadow: var(--shadow-card);
}
@supports (corner-shape: bevel) { :is(.wp-block-fxcs-rate-table, .wp-block-fxcs-compare-table, .wp-block-table.is-style-dark-panel, .wp-block-group.is-style-dark-panel) { border-radius: var(--cut-l) 4px var(--cut-l) 4px; corner-shape: bevel round bevel round; } }
:is(.wp-block-fxcs-rate-table, .wp-block-fxcs-compare-table) > .fxcs-table { background: transparent; border: 0; box-shadow: none; }
.wp-block-group.is-style-dark-panel { padding: var(--space-lg) var(--space-xl); }
.wp-block-group.is-style-dark-panel > * + * { margin-block-start: var(--space-md); }
.wp-block-group.is-style-dark-panel :is(h2, h3, h4, strong) { color: var(--panel-ink); }
.wp-block-group.is-style-dark-panel > .wp-block-table { padding: 0; }
.wp-block-table.is-style-dark-panel { padding: var(--space-md) var(--space-xl); }
/* the sheet on graphite: muted heads, graphite ink figures, graphite hairlines, cobalt-2 for links and focus */
:is(.wp-block-fxcs-rate-table, .wp-block-fxcs-compare-table, .is-style-dark-panel) :is(.fxcs-table__table, table) caption { color: var(--panel-ink); }
:is(.wp-block-fxcs-rate-table, .wp-block-fxcs-compare-table, .is-style-dark-panel) :is(thead th, th.is-num) { color: var(--panel-muted); border-bottom-color: var(--panel-rule-2); }
:is(.wp-block-fxcs-rate-table, .wp-block-fxcs-compare-table, .is-style-dark-panel) :is(td, tbody th) { color: var(--panel-ink); border-top-color: var(--panel-rule); }
:is(.wp-block-fxcs-rate-table, .wp-block-fxcs-compare-table, .is-style-dark-panel) :is(.is-num, tbody th a, .is-pending, .sub) { color: var(--panel-ink); }
:is(.wp-block-fxcs-rate-table, .wp-block-fxcs-compare-table, .is-style-dark-panel) td.is-text, :is(.wp-block-fxcs-rate-table, .wp-block-fxcs-compare-table, .is-style-dark-panel) .sub { color: var(--panel-muted); }
:is(.wp-block-fxcs-rate-table, .wp-block-fxcs-compare-table, .is-style-dark-panel) .is-pending::before { border-color: var(--panel-muted); }
:is(.wp-block-fxcs-rate-table, .wp-block-fxcs-compare-table, .is-style-dark-panel) .is-num { color: var(--color-accent-2); }
:is(.wp-block-fxcs-rate-table, .wp-block-fxcs-compare-table, .is-style-dark-panel) tr.is-pointed > * { background: var(--color-graphite-2); }
:is(.wp-block-fxcs-rate-table, .wp-block-fxcs-compare-table, .is-style-dark-panel) tr.is-pointed > :first-child { box-shadow: inset 2px 0 0 var(--color-accent-2); }
:is(.wp-block-fxcs-rate-table, .wp-block-fxcs-compare-table, .is-style-dark-panel) a:not(.wp-element-button) { color: var(--panel-ink); text-decoration-color: var(--panel-muted); }
:is(.wp-block-fxcs-rate-table, .wp-block-fxcs-compare-table, .is-style-dark-panel) a:not(.wp-element-button):hover { text-decoration-color: var(--color-accent-2); }
:is(.wp-block-fxcs-rate-table, .wp-block-fxcs-compare-table, .is-style-dark-panel) :focus-visible { outline-color: var(--color-accent-2); }
:is(.wp-block-fxcs-rate-table, .wp-block-fxcs-compare-table, .is-style-dark-panel) :is(.fxcs-table__meta, figcaption, .wp-element-caption) { color: var(--panel-muted); border-top-color: var(--panel-rule-2); }
:is(.wp-block-fxcs-rate-table, .wp-block-fxcs-compare-table, .is-style-dark-panel) :is(.fxcs-table__meta time, figcaption time) { color: var(--panel-ink); }
.wp-block-fxcs-compare-table .fxcs-table__table :is(tbody th, thead th:first-child) { background: var(--color-graphite); }
.wp-block-fxcs-compare-table .fxcs-table__table tr.is-pointed > th:first-child { background: var(--color-graphite-2); }
/* no rate yet: the panel holds the note, set on graphite */
:is(.wp-block-fxcs-rate-table, .wp-block-fxcs-compare-table).is-empty { padding: var(--space-md); }
:is(.wp-block-fxcs-rate-table, .wp-block-fxcs-compare-table).is-empty > .fxcs-note.is-pending { background: var(--color-graphite-2); border-color: var(--panel-rule-2); color: var(--panel-ink); }
:is(.wp-block-fxcs-rate-table, .wp-block-fxcs-compare-table) .fxcs-note.is-pending { background: var(--color-graphite-2); border-color: var(--panel-rule-2); color: var(--panel-ink); }
@media (max-width: 60rem) { .wp-block-group.is-style-dark-panel, .wp-block-table.is-style-dark-panel { padding: var(--space-md); } }

/* ---------- reduced motion ---------- */
@media (prefers-reduced-motion: reduce) {
  .fxcs-tabs__tab { transition: none; }
  .fxcs-tabs__tab:hover, .fxcs-tabs__tab[aria-selected="true"] { transform: none; }
  .fxcs-hv__wire { animation: none; stroke-dashoffset: 0; }
}
