/* spread/spread.css -- The Spread's styles, moved out of spread/index.html unchanged (studio
   release 3, candidate C) so the /charts/ studio draws the same detail chart from the same
   rules. Every selector is scoped to the Spread's own classes. */
  /* Page-local styles. Every colour is a --cebe- token, in the SVG as well as the page, so the
     chart follows the theme toggle. */
  .sp-wrap {
    max-width: 1180px;
    margin: 0 auto;
    padding: 40px 16px 80px;
    font-family: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif;
    color: var(--cebe-text-primary);
  }
  .sp-wrap h1 {
    font-size: clamp(28px, 5vw, 42px);
    line-height: 1.15;
    font-weight: 800;
    margin: 0 0 14px;
    letter-spacing: -0.02em;
  }
  .sp-wrap p.sp-lede {
    font-size: 16px;
    line-height: 1.6;
    color: var(--cebe-text-secondary);
    margin: 0 0 24px;
    max-width: 820px;
  }
  .sp-wrap p.sp-status {
    font-family: 'JetBrains Mono', monospace;
    font-size: 12px;
    color: var(--cebe-text-muted);
    margin: 0 0 12px;
  }
  /* THE BLOCKS (RULINGS_2026-10-16-c): one block per company at its natural size, wrapping onto rows.
     A block wider than the page scrolls inside its own frame, with a swipe line above it and a
     right-edge fade until the reader reaches its end. The page itself never scrolls sideways. */
  .sp-fig-head { border: 1px solid var(--cebe-border-strong); border-radius: 10px; background: var(--cebe-surface-page); padding: 14px 14px 10px; margin: 0 0 16px; }
  .sp-fig-head h2 { font-size: 20px; font-weight: 800; margin: 0 0 6px; color: var(--cebe-text-primary); letter-spacing: -0.01em; }
  .sp-fig-head p { font-size: 13px; line-height: 1.5; color: var(--cebe-text-secondary); margin: 0 0 8px; }
  .sp-fig-head ul { list-style: none; margin: 0; padding: 0; display: flex; flex-wrap: wrap; gap: 4px 16px; font-size: 12px; color: var(--cebe-text-secondary); }
  .sp-fig-head li { display: flex; align-items: center; gap: 6px; }
  .sp-key { display: inline-block; width: 22px; height: 0; border-top: 3px solid var(--cebe-text-primary); }
  .sp-key.w1 { border-top: 2px dashed var(--cebe-text-muted); }
  .sp-key.dot { width: 10px; height: 10px; border: 0; border-radius: 50%; background: var(--cebe-brand-orange); }
  .sp-key.dia { width: 9px; height: 9px; border: 0; transform: rotate(45deg); background: var(--cebe-text-primary); margin: 0 2px; }
  .sp-blocks { display: flex; flex-wrap: wrap; gap: 16px; align-items: flex-start; margin: 0 0 16px; }
  .sp-block { flex: 0 0 auto; max-width: 100%; }
  /* Below tablet width every block is one column, full width (RULINGS_2026-10-16-e). */
  @media (max-width: 767.98px) { .sp-block { flex: 1 1 100%; width: 100% !important; } }
  .sp-swipe { font-family: 'JetBrains Mono', monospace; font-size: 12px; color: var(--cebe-text-secondary); margin: 0 0 8px; }
  .sp-swipe[hidden] { display: none !important; }
  .sp-fig-wrap { position: relative; }
  .sp-fig {
    margin: 0;
    border: 1px solid var(--cebe-border-strong);
    border-radius: 10px;
    background: var(--cebe-surface-page);
    overflow-x: auto;
    overflow-y: hidden;
    -webkit-overflow-scrolling: touch;
  }
  .sp-fig svg { display: block; max-width: none; }
  .sp-fig-wrap.overflows::after { content: ''; position: absolute; top: 1px; right: 1px; bottom: 1px; width: 56px; pointer-events: none;
    border-top-right-radius: 10px; border-bottom-right-radius: 10px; background: linear-gradient(to right, rgba(0,0,0,0), var(--cebe-surface-page)); transition: opacity 0.2s ease; }
  .sp-fig-wrap.overflows.at-end::after { opacity: 0; }
  .sp-fig-notes { margin: 0 0 32px; }
  .sp-fig-notes p { font-size: 12px; line-height: 1.55; color: var(--cebe-text-muted); margin: 0 0 6px; max-width: 980px; overflow-wrap: anywhere; }
  .sp-wrap h2.sp-sec {
    font-family: 'JetBrains Mono', monospace;
    font-size: 12px;
    letter-spacing: 0.14em;
    text-transform: uppercase;
    color: var(--cebe-text-muted);
    margin: 32px 0 12px;
  }
  .sp-wrap p.sp-note {
    font-size: 14px;
    line-height: 1.6;
    color: var(--cebe-text-secondary);
    margin: 0 0 12px;
    max-width: 860px;
    overflow-wrap: anywhere;
  }
  /* Each table scrolls inside its own frame, never the page, with the chart's right-edge fade while
     more is to the right (RULINGS_2026-10-16-b fix 2). Long cells wrap. */
  .sp-scroll { position: relative; margin: 0 0 16px; max-width: 100%; }
  .sp-table-wrap { overflow-x: auto; -webkit-overflow-scrolling: touch; border: 1px solid var(--cebe-border-subtle); border-radius: 8px; max-width: 100%; }
  .sp-scroll.overflows::after { content: ''; position: absolute; top: 1px; right: 1px; bottom: 1px; width: 56px; pointer-events: none;
    border-top-right-radius: 8px; border-bottom-right-radius: 8px; background: linear-gradient(to right, rgba(0,0,0,0), var(--cebe-surface-page)); transition: opacity 0.2s ease; }
  .sp-scroll.overflows.at-end::after { opacity: 0; }
  .sp-table { width: 100%; border-collapse: collapse; font-size: 13px; }
  .sp-table th, .sp-table td { text-align: left; padding: 8px 10px; border-bottom: 1px solid var(--cebe-border-subtle); vertical-align: top; }
  .sp-table th { color: var(--cebe-text-muted); font-weight: 600; font-size: 12px; white-space: nowrap; }
  .sp-table td { color: var(--cebe-text-secondary); }
  .sp-table td.n { font-family: 'JetBrains Mono', monospace; color: var(--cebe-text-primary); white-space: nowrap; }
  .sp-table td.w { white-space: normal; min-width: 15em; }
  .sp-table tr:last-child td { border-bottom: 0; }
  .sp-table td .sp-wrapcell { display: inline-block; min-width: 260px; white-space: normal; color: var(--cebe-text-secondary); }

  /* The chart. */
  .sp-svg-bg { fill: var(--cebe-surface-page); }
  .sp-panel { fill: var(--cebe-surface-card); stroke: var(--cebe-border-subtle); }
  .sp-grid { stroke: var(--cebe-border-subtle); stroke-width: 1; }
  .sp-zero { stroke: var(--cebe-border-strong); stroke-width: 1.5; }
  /* The lead band (since first preferred launch) is the heavy solid line; trailing 1y and 4y are
     context, thin and broken. Identity is carried by weight, pattern and a direct label. */
  .sp-band { fill: none; }
  .sp-band.lead { stroke: var(--cebe-text-primary); stroke-width: 3; }
  .sp-band.w1 { stroke: var(--cebe-text-muted); stroke-width: 1.5; stroke-dasharray: 7 5; }
  .sp-band.w4 { stroke: var(--cebe-text-muted); stroke-width: 1.5; stroke-dasharray: 2 4; stroke-linecap: round; }
  .sp-divider { stroke: var(--cebe-border-strong); stroke-width: 1; stroke-dasharray: 3 4; }
  .sp-mark { fill: var(--cebe-brand-orange); stroke: var(--cebe-surface-card); stroke-width: 2; }
  .sp-cap { fill: var(--cebe-surface-card); stroke: var(--cebe-brand-orange); stroke-width: 2; }
  .sp-capline { stroke: var(--cebe-brand-orange); stroke-width: 1.5; stroke-dasharray: 2 3; }
  /* Cost on net proceeds: a diamond beside the filed-rate dot. EST draws it hollow and broken,
     the way the site's charts draw an EST point. */
  .sp-cop { fill: var(--cebe-text-primary); stroke: var(--cebe-surface-card); stroke-width: 2; }
  .sp-cop.est { fill: var(--cebe-surface-card); stroke: var(--cebe-text-primary); stroke-width: 2; stroke-dasharray: 3 2; }
  .sp-t { font-family: 'Inter', sans-serif; fill: var(--cebe-text-primary); }
  .sp-m { font-family: 'JetBrains Mono', monospace; fill: var(--cebe-text-primary); }
  .sp-sec-t { fill: var(--cebe-text-secondary); }
  .sp-mut { fill: var(--cebe-text-muted); }
  .sp-acc { fill: var(--cebe-brand-orange-text); }
  .sp-wm { font-family: 'JetBrains Mono', monospace; fill: var(--cebe-text-muted); letter-spacing: 0.12em; }

  /* Muted metadata at 4.5:1 or more in both themes (CHATCOPILOT_2026-10-20h addendum 2 item 5):
     the dark token #666666 measures 3.29:1 on the panel card, so the page raises it to #8a8a8a,
     5.47:1 on the card and 5.76:1 on the page. The light token #4a4a4a already clears 7.87:1. */
  :root:not([data-theme="light"]) .sp-wrap { --cebe-text-muted: #8a8a8a; }

  /* THE TOP TABLE (CHATCOPILOT_2026-10-20h): one row per outstanding preferred, gap first, then
     the two inputs, then a track drawing the gap. The current page folds below it. */
  .sp-top { margin: 0 0 28px; }
  .sp-wrap p.sp-summary { font-size: 18px; line-height: 1.5; font-weight: 600; color: var(--cebe-text-primary); margin: 0 0 18px; }
  .sp-wrap h2.sp-top-head { font-family: 'JetBrains Mono', monospace; font-size: 13px; font-weight: 600; letter-spacing: 0.06em; color: var(--cebe-text-secondary); margin: 0 0 6px; }
  .sp-wrap p.sp-keyline { font-size: 13px; line-height: 1.5; color: var(--cebe-text-secondary); margin: 0 0 16px; display: flex; flex-wrap: wrap; gap: 4px 16px; align-items: center; }
  .sp-keyline span { display: inline-flex; align-items: center; gap: 6px; }
  .sp-group { border: 1px solid var(--cebe-border-strong); border-radius: 10px; background: var(--cebe-surface-card); padding: 14px 16px 6px; margin: 0 0 16px; }
  .sp-group h3 { font-size: 16px; font-weight: 800; margin: 0 0 2px; color: var(--cebe-text-primary); }
  .sp-group p.sp-group-sub { font-size: 13px; line-height: 1.5; color: var(--cebe-text-secondary); margin: 0 0 8px; }
  .sp-tt { width: 100%; border-collapse: collapse; table-layout: fixed; }
  .sp-tt th { text-align: left; vertical-align: bottom; font-size: 12px; font-weight: 600; line-height: 1.35; color: var(--cebe-text-secondary); padding: 8px 10px; border-bottom: 1px solid var(--cebe-border-strong); }
  .sp-tt td { vertical-align: middle; padding: 12px 10px; border-bottom: 1px solid var(--cebe-border-subtle); color: var(--cebe-text-primary); }
  .sp-tt tr:last-child td { border-bottom: 0; }
  .sp-tt .sp-c-ser { width: 17%; }
  .sp-tt .sp-c-gap { width: 21%; }
  .sp-tt .sp-c-rate { width: 15%; }
  .sp-tt .sp-c-btc { width: 19%; }
  .sp-tt .sp-c-track { width: 28%; }
  .sp-ser { font-size: 15px; font-weight: 700; }
  .sp-ser .sp-co { font-weight: 500; color: var(--cebe-text-secondary); }
  .sp-tag { display: inline-block; margin-top: 4px; font-family: 'JetBrains Mono', monospace; font-size: 11px; color: var(--cebe-text-secondary); border: 1px solid var(--cebe-border-strong); border-radius: 4px; padding: 1px 6px; }
  .sp-gap { font-size: 24px; line-height: 1.15; font-weight: 800; letter-spacing: -0.01em; font-variant-numeric: tabular-nums; }
  .sp-gap.ahead { color: var(--cebe-semantic-positive); }
  .sp-gap.behind { color: var(--cebe-semantic-negative); }
  .sp-gap.none { font-size: 15px; font-weight: 600; color: var(--cebe-text-secondary); }
  .sp-fig1 { font-family: 'JetBrains Mono', monospace; font-size: 14px; font-weight: 600; white-space: nowrap; }
  .sp-sub { display: block; font-family: 'JetBrains Mono', monospace; font-size: 12px; color: var(--cebe-text-secondary); margin-top: 2px; }
  .sp-none { font-size: 14px; color: var(--cebe-text-secondary); }
  .sp-lab { display: none; }
  /* The rate's in-force date, on hover, on focus and on tap. */
  .sp-ratewrap { position: relative; display: inline-block; }
  .sp-rate { display: inline-block; font: inherit; color: inherit; background: none; border: 0; padding: 0; margin: 0; cursor: help; text-align: left;
    text-decoration: underline dotted var(--cebe-text-secondary); text-decoration-thickness: 1px; text-underline-offset: 4px; }
  .sp-rate.sp-fig1 { font-family: 'JetBrains Mono', monospace; font-size: 14px; font-weight: 600; }
  .sp-rate:focus-visible { outline: 2px solid var(--cebe-brand-orange); outline-offset: 2px; }
  .sp-tip { display: none; position: absolute; z-index: 5; left: 0; top: calc(100% + 6px); width: 260px; max-width: 70vw; white-space: normal;
    font-family: 'Inter', sans-serif; font-size: 12px; font-weight: 500; line-height: 1.45; color: var(--cebe-text-primary);
    background: var(--cebe-surface-page); border: 1px solid var(--cebe-border-strong); border-radius: 6px; padding: 8px 10px; box-shadow: 0 4px 14px rgba(0,0,0,0.25); }
  .sp-ratewrap:hover .sp-tip, .sp-rate:focus + .sp-tip, .sp-ratewrap.open .sp-tip { display: block; }
  .sp-track { display: block; width: 100%; max-width: 320px; height: auto; }
  .sp-tr-axis, .sp-tr-tick { stroke: var(--cebe-border-strong); stroke-width: 1; }
  .sp-tr-zero { stroke: var(--cebe-text-secondary); stroke-width: 1.5; }
  .sp-tr-tl { font-family: 'JetBrains Mono', monospace; fill: var(--cebe-text-secondary); }
  .sp-tr-seg { stroke-width: 6; stroke-linecap: butt; }
  .sp-tr-seg.ahead { stroke: var(--cebe-semantic-positive); }
  .sp-tr-seg.behind { stroke: var(--cebe-semantic-negative); }
  .sp-tr-seg.level { stroke: var(--cebe-text-secondary); }
  .sp-tr-chev { fill: none; stroke: var(--cebe-surface-card) !important; stroke-width: 2; stroke-linecap: round; stroke-linejoin: round; }
  .sp-tr-rate { fill: var(--cebe-surface-card); stroke: var(--cebe-text-primary); stroke-width: 2.5; }
  .sp-tr-btc { fill: var(--cebe-text-primary); stroke: var(--cebe-surface-card); stroke-width: 1.5; }
  .sp-tr-pl { font-family: 'Inter', sans-serif; font-weight: 700; fill: var(--cebe-text-primary); }
  .sp-wrap p.sp-new { margin: 0 0 16px; font-size: 14px; line-height: 1.6; color: var(--cebe-text-secondary); }
  .sp-new strong { color: var(--cebe-text-primary); }
  .sp-wrap p.sp-formula { font-size: 14px; line-height: 1.6; color: var(--cebe-text-secondary); margin: 0 0 6px; max-width: 860px; }
  .sp-wrap p.sp-gapline { font-size: 14px; line-height: 1.5; color: var(--cebe-text-secondary); margin: -10px 0 16px; max-width: 860px; }
  .sp-howfold { margin: 10px 0 18px; border: 1px solid var(--cebe-border-subtle); border-radius: 8px; padding: 0 14px; }
  .sp-howfold summary { cursor: pointer; font-size: 14px; font-weight: 600; color: var(--cebe-brand-orange-text); padding: 11px 0; }
  .sp-howbody { padding: 0 0 6px; }
  .sp-more { font: inherit; font-size: 15px; font-weight: 700; color: var(--cebe-text-primary); background: var(--cebe-surface-card); border: 1px solid var(--cebe-border-strong);
    border-radius: 8px; padding: 12px 18px; min-height: 44px; cursor: pointer; }
  .sp-more:hover { background: var(--cebe-surface-card-hover); }
  .sp-more:focus-visible { outline: 2px solid var(--cebe-brand-orange); outline-offset: 2px; }
  .sp-detail { margin-top: 28px; padding-top: 8px; border-top: 1px solid var(--cebe-border-subtle); }
  .sp-detail[hidden] { display: none; }
  /* Per company, the dates and prices under its chart (addendum 2 item 5). */
  .sp-dates { margin: 8px 0 0; border: 1px solid var(--cebe-border-subtle); border-radius: 8px; padding: 0 12px; }
  .sp-dates summary { cursor: pointer; font-size: 13px; font-weight: 600; color: var(--cebe-text-primary); padding: 10px 0; }
  .sp-dates p { font-family: 'JetBrains Mono', monospace; font-size: 12px; font-weight: 700; color: var(--cebe-brand-orange-text); margin: 4px 0; }
  .sp-dates ul { margin: 0 0 10px; padding: 0 0 0 16px; font-family: 'JetBrains Mono', monospace; font-size: 12px; line-height: 1.6; color: var(--cebe-text-secondary); overflow-wrap: anywhere; }
  .sp-fill.ahead { fill: var(--cebe-semantic-positive); fill-opacity: 1; }
  .sp-fill.behind { fill: var(--cebe-semantic-negative); fill-opacity: 1; }

  /* Phone: one card per series, gap first, then the two inputs, then the track. */
  @media (max-width: 767.98px) {
    .sp-group { padding: 12px 12px 4px; }
    .sp-tt, .sp-tt tbody, .sp-tt tr, .sp-tt td { display: block; width: auto !important; }
    .sp-tt thead { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); }
    .sp-tt tr { padding: 12px 0; border-bottom: 1px solid var(--cebe-border-subtle); }
    .sp-tt tr:last-child { border-bottom: 0; }
    .sp-tt td { padding: 2px 0; border: 0; }
    .sp-tt td.sp-c-rate, .sp-tt td.sp-c-btc { display: flex; flex-wrap: wrap; align-items: baseline; gap: 2px 8px; }
    .sp-lab { display: inline; font-size: 13px; color: var(--cebe-text-secondary); }
    .sp-tt td.sp-c-rate .sp-sub, .sp-tt td.sp-c-btc .sp-sub { display: inline; margin: 0; }
    .sp-gap { font-size: 22px; }
    .sp-tt td.sp-c-track { padding-top: 8px; }
    .sp-track { max-width: none; }
    /* The headline above the track already prints the points; the track label would say it twice. */
    .sp-tr-pl { display: none; }
    .sp-tt td.sp-c-rate { position: relative; }
    .sp-ratewrap { position: static; }
    .sp-tip { left: 0; right: 0; width: auto; max-width: none; }
  }
