/* Layout refresh (Oct 2026): company header and navigation, trend tiles, the earnings-day dashboard on the home page,
   Flo's page guide and comparison table. Loaded after the other style sheets; uses the site's colour tokens only. */

/* ---------- company page: compact header ---------- */
.co-head { display: flex; flex-wrap: wrap; align-items: flex-end; justify-content: space-between; gap: 10px 24px; }
.co-title { display: flex; flex-wrap: wrap; align-items: center; gap: 6px 12px; min-width: 0; }
.co-title h1 { margin: 0; }
.co-title .tag.mono { font-size: 13px; background: var(--ink); color: var(--bg); border-color: var(--ink); }
.co-actions { display: flex; flex-wrap: wrap; gap: 8px; align-items: center; }
.co-actions .btn { text-decoration: none; }
.co-codes { font-size: 13px; color: var(--muted); }
.co-codes summary { cursor: pointer; list-style: none; color: var(--accent-ink); text-decoration: underline; text-underline-offset: 2px; }
.co-codes summary::-webkit-details-marker { display: none; }
.co-codes summary::after { content: ' ▾'; }
.co-codes[open] summary::after { content: ' ▴'; }
.co-codes[open] { display: flex; flex-wrap: wrap; gap: 4px 14px; }
.co-codes[open] summary { flex-basis: 100%; }

/* one navigation row that stays in reach while reading */
.page-head .co-tabs { position: sticky; top: 0; z-index: 20; background: var(--bg); }
.co-tabs { scrollbar-width: none; }
.co-tabs::-webkit-scrollbar { display: none; }

/* the period picker: on the chart's own controls (or above the page when there is no chart) */
.co-period { align-items: center; gap: 8px; }
.co-period-pick { display: inline-flex; align-items: center; gap: 6px; font-size: 13px; color: var(--muted); }
.co-period-pick select { font: inherit; font-size: 14px; color: var(--ink); background: var(--surface); border: 1px solid var(--line);
  border-radius: 8px; padding: 6px 28px 6px 10px; max-width: 260px; }
.co-period.in-chart { margin: 0; }

/* ---------- trend lines in the overview tiles ---------- */
.fx-spark { display: block; width: 100%; height: 28px; margin-top: 4px; overflow: visible; }
.fx-spark polyline { fill: none; stroke-width: 2; vector-effect: non-scaling-stroke; stroke-linejoin: round; stroke-linecap: round; }
.fx-spark circle { stroke: none; }
.fx-spark.rev polyline { stroke: var(--mk-rev); } .fx-spark.rev circle { fill: var(--mk-rev); }
.fx-spark.profit polyline { stroke: var(--mk-profit); } .fx-spark.profit circle { fill: var(--mk-profit); }
.fx-spark.cost polyline { stroke: var(--mk-cost); } .fx-spark.cost circle { fill: var(--mk-cost); }
.fx-tile .fx-warn { color: var(--warn-ink); }
@media (min-width: 1100px) { .fx-ov-grid { grid-template-columns: repeat(5, minmax(0, 1fr)); } }

/* ---------- home: hero beside the e-mail box ---------- */
.home-top { display: grid; grid-template-columns: minmax(0, 7fr) minmax(0, 5fr); gap: 24px; align-items: center; margin-bottom: 8px; }
.home-top .hero { margin: 0; }
.home-top .cta { margin: 0; display: grid; gap: 10px; padding: 18px 20px; }
.home-top .cta h2 { margin: 0; font-size: 17px; }
.home-top .cta p { margin: 0; font-size: 13.5px; }
.home-top .cta .cta-form { display: flex; gap: 8px; flex-wrap: wrap; }
.home-top .cta .cta-form input { flex: 1 1 180px; min-width: 0; }
@media (max-width: 900px) { .home-top { grid-template-columns: 1fr; } }
.home-top:has(> .cta[hidden]) { grid-template-columns: 1fr; }
.home-top:has(> .cta[hidden]) .hero { max-width: 820px; }

/* ---------- home: the earnings-day dashboard (web/earnings-day.js) ---------- */
#earnings-day .days { display: grid; grid-template-columns: repeat(7, minmax(0, 1fr)); gap: 8px; max-width: 1040px; margin: 0; }
@media (max-width: 720px) { #earnings-day .days { display: flex; overflow-x: auto; scrollbar-width: none; } #earnings-day .day { flex: none; min-width: 104px; } }
/* the daily report's own day strip follows the earnings-day picker above it */
.has-ed .daily .days { display: none; }
.ed { display: grid; grid-template-columns: minmax(0, 7fr) minmax(0, 5fr); gap: 16px; margin-top: 14px; }
.ed-col { display: grid; gap: 16px; min-width: 0; align-content: start; }
.ed-card { background: var(--surface); border: 1px solid var(--line); border-radius: 12px; padding: 16px 18px; min-width: 0; }
.ed-card h3 { margin: 0; font-size: 16px; }
.ed-card .muted { font-size: 12.5px; }
.ed-head { display: flex; flex-wrap: wrap; align-items: baseline; gap: 4px 10px; margin-bottom: 12px; }
.ed-sectors { display: grid; grid-template-columns: repeat(auto-fill, minmax(150px, 1fr)); gap: 8px; }
.ed-sec { display: grid; gap: 1px; padding: 9px 11px; border-radius: 8px; color: #1d1d1b; text-decoration: none; border: 1px solid rgba(0, 0, 0, .04); }
.ed-sec small { font-size: 12.5px; font-weight: 500; }
.ed-sec b { font-size: 20px; font-weight: 600; font-variant-numeric: tabular-nums; }
.ed-sec span { font-size: 11.5px; opacity: .85; }
.ed-sec:hover { outline: 2px solid var(--accent); outline-offset: -1px; color: #1d1d1b; }
.ed-key { display: flex; align-items: center; gap: 8px; margin-top: 10px; font-size: 12px; color: var(--muted); }
.ed-key i { display: inline-block; width: 140px; height: 8px; border-radius: 4px; background: linear-gradient(90deg, #f1f6f2, #7fbf9a); }
.ed-scatter { display: block; width: 100%; height: auto; }
.ed-scatter text { font-family: var(--sans); }
.ed-scatter a circle { fill: var(--mk-profit); fill-opacity: .26; stroke: var(--mk-profit); }
.ed-scatter a:hover circle, .ed-scatter a:focus circle { fill-opacity: .7; }
.ed-scatter .grid { stroke: var(--line); }
.ed-scatter .zero { stroke: var(--muted); }
.ed-scatter .tick { fill: var(--muted); font-size: 11px; }
.ed-scatter .axis { fill: var(--ink-2); font-size: 12px; }
.ed-scatter .lbl { fill: var(--ink); font-size: 12px; font-weight: 600; pointer-events: none; }
.ed-top { width: 100%; border-collapse: collapse; }
.ed-top th { font-size: 12px; font-weight: 500; color: var(--muted); text-align: left; padding: 6px 6px; border-bottom: 1px solid var(--line); }
.ed-top td { font-size: 14px; padding: 7px 6px; border-bottom: 1px solid var(--line); font-variant-numeric: tabular-nums; }
.ed-top tr:last-child td { border-bottom: 0; }
.ed-top .num { text-align: right; }
.ed-top a { font-weight: 600; text-decoration: none; }
.ed-top .nm { color: var(--muted); font-size: 13px; }
.ed-empty { color: var(--muted); font-size: 14px; margin: 6px 0 0; }
@media (max-width: 900px) { .ed { grid-template-columns: 1fr; } .ed-top .nm { display: none; } }

/* ---------- Flo: page guide ---------- */
.flo-tour-shade { position: fixed; inset: 0; z-index: 9400; pointer-events: none; }
.flo-tour-hole { position: fixed; z-index: 9401; border-radius: 10px; box-shadow: 0 0 0 4px #5fb88a, 0 0 0 9999px rgba(20, 20, 19, .55);
  transition: all .25s ease; pointer-events: none; }
.flo-tour-card { position: fixed; z-index: 9402; width: min(380px, calc(100vw - 24px)); background: var(--surface); color: var(--ink);
  border-radius: 14px; padding: 16px 18px; box-shadow: 0 16px 40px rgba(0, 0, 0, .28); font-size: 14px; line-height: 1.5; }
.flo-tour-card .ft-step { font-size: 12px; color: var(--muted); }
.flo-tour-card h3 { margin: 2px 0 6px; font-size: 16px; }
.flo-tour-card p { margin: 0; color: var(--ink-2); }
.flo-tour-card .ft-row { display: flex; align-items: center; gap: 8px; margin-top: 14px; }
.flo-tour-card .ft-dots { display: flex; gap: 5px; margin-right: auto; }
.flo-tour-card .ft-dots i { width: 7px; height: 7px; border-radius: 4px; background: var(--line); }
.flo-tour-card .ft-dots i.on { width: 18px; background: var(--accent); }
.flo-tour-card button { font: inherit; font-size: 14px; min-height: 36px; padding: 0 12px; border-radius: 8px; cursor: pointer; }
.flo-tour-card .ft-skip { border: 0; background: none; color: var(--muted); }
.flo-tour-card .ft-back { border: 1px solid var(--line); background: var(--surface); color: var(--ink); }
.flo-tour-card .ft-next { border: 0; background: var(--accent); color: #fff; font-weight: 500; }

/* ---------- Flo: comparison table, explain facts, watchlist ---------- */
.flo-cmp { width: 100%; border-collapse: collapse; margin: 8px 0 4px; font-size: 13px; }
.flo-cmp th { font-weight: 500; color: var(--muted); text-align: right; padding: 4px; font-size: 12px; vertical-align: bottom; }
.flo-cmp th:first-child, .flo-cmp td:first-child { text-align: left; }
.flo-cmp td { padding: 5px 4px; border-top: 1px solid var(--line); text-align: right; font-variant-numeric: tabular-nums; }
.flo-cmp .bar { display: block; height: 5px; border-radius: 3px; margin: 3px 0 0 auto; }
.flo-facts { margin: 8px 0 0; padding: 0; list-style: none; font-size: 13px; }
.flo-facts li { display: flex; justify-content: space-between; gap: 10px; padding: 4px 0; border-top: 1px solid var(--line); }
.flo-facts li b { font-variant-numeric: tabular-nums; }
.flo-watch-ev { display: flex; gap: 8px; padding: 8px 0; border-top: 1px solid var(--line); }
.flo-watch-ev .tk { flex: none; font: 500 11.5px var(--mono); background: var(--ink); color: var(--bg); border-radius: 4px; padding: 1px 5px; height: 17px; }

/* ---------- phones ---------- */
@media (max-width: 760px) {
  .co-head { align-items: stretch; }
  .co-actions { width: 100%; }
  .co-actions .btn { flex: 1 1 auto; justify-content: center; min-height: 42px; }
  .co-actions .co-long { display: none; }
  .co-period-pick select { max-width: 100%; }
  .co-period { flex-wrap: wrap; }
  .co-period.in-chart { width: 100%; }
  .co-period.in-chart .co-period-pick { flex: 1 1 100%; }
  .co-period.in-chart .co-period-pick select { flex: 1; }
  #app { padding-bottom: 96px; }               /* the last lines scroll clear of Flo */
}

/* the first screen: search and a real Sankey */
.hero h1 { font-size: clamp(30px, 5vw, 48px); letter-spacing: -.02em; line-height: 1.08; margin: 4px 0 6px; }
.hero-search { display: flex; gap: 8px; flex-wrap: wrap; margin-top: 6px; }
.hero-search input { flex: 1 1 260px; min-width: 0; font-size: 16px; padding: 11px 14px; border-radius: 10px; border: 1px solid var(--line); background: var(--surface); color: var(--ink); }
.hero-search input:focus { outline: 2px solid var(--accent); outline-offset: 1px; }
.hero-chips { display: flex; flex-wrap: wrap; gap: 6px; }
.hero-chips .chip { cursor: pointer; padding: 5px 11px; border-radius: 99px; border: 1px solid var(--line); background: var(--surface); color: var(--ink-2); font: inherit; font-size: 13px; }
.hero-chips .chip.on, .hero-chips .chip:hover { border-color: var(--accent); }
.hero-preview .hero-sk { background: #fcfcfb; border: 1px solid var(--line); border-radius: 14px; padding: 8px; overflow-x: auto; box-shadow: 0 2px 10px rgba(0,0,0,.05); }
.hero-preview .hero-sk svg { display: block; width: 100%; height: auto; min-width: 760px; }

/* the home page's plain HTML before the app starts (scripts/seo_home.py) */
.static-home { max-width: 860px; padding: 24px 0; }
.static-home h1 { font-size: clamp(28px, 4.5vw, 44px); margin: 0 0 8px; }
.static-home ul { columns: 2 260px; padding-left: 18px; }
