/* Ordelvio Capital: reporting seasons on the Companies page (decisions/2026-10-06-card-seasons.md).
   The hero's season widget, the season strip, the season grid, the card calendar and the reports grouped by season.
   Observatory language of site.css: deep indigo field, glass panels, thin numerals, gold, sky and rose light.
   Every state has a shape as well as a colour (filled, ring, dashed ring, diamond, dash), so colour is never alone.
   No inline styles (the Content-Security-Policy forbids them): scripts set --seasons, --weeks and --n through CSSOM. */

:root {
  --st-live: #EABD4D;
  --st-due: #5AAFD9;
  --st-scheduled: rgba(236, 238, 246, .72);
  --st-waiting: #E07A9A;
  --st-quiet: rgba(236, 238, 246, .3);
  --grid-bg: #0B0C25;
  --grid-bg-2: #0E0F2C;
}

/* ------------------------------------------------------------------ state glyphs and the stacked bar */
.sg-glyph { flex: none; position: relative; display: inline-block; width: 12px; height: 12px; border-radius: 50%; }
.st-live .sg-glyph { border-radius: 3px; background: var(--st-live); }
.st-due .sg-glyph { background: var(--st-due); box-shadow: 0 0 10px rgba(90, 175, 217, .45); }
.st-backfill .sg-glyph { border: 1.5px solid var(--st-due); background: linear-gradient(90deg, var(--st-due) 50%, transparent 50%); }
.st-scheduled .sg-glyph { border: 1.5px solid var(--st-scheduled); }
.st-scheduled .sg-glyph.expected { border-style: dashed; border-color: rgba(236, 238, 246, .55); }
.st-scheduled .sg-glyph.undated { border-style: dotted; border-color: rgba(236, 238, 246, .4); }
.st-no_report .sg-glyph { height: 2px; width: 12px; border-radius: 2px; background: var(--st-quiet); }
.st-waiting_engine .sg-glyph { width: 9px; height: 9px; margin: 0 1.5px; border-radius: 1px; border: 1.5px solid var(--st-waiting); transform: rotate(45deg); }
.st-unknown .sg-glyph { width: 4px; height: 4px; margin: 0 4px; background: var(--faint); }

.state-bar { display: flex; gap: 2px; width: 100%; height: 8px; border-radius: 4px; overflow: hidden; background: rgba(255, 255, 255, .04); }
.state-bar .seg { flex: var(--n) 1 0; min-width: 2px; }
.state-bar .seg.st-live { background: var(--st-live); }
.state-bar .seg.st-due { background: var(--st-due); }
.state-bar .seg.st-backfill { background: repeating-linear-gradient(90deg, rgba(90, 175, 217, .85) 0 3px, rgba(90, 175, 217, .35) 3px 6px); }
.state-bar .seg.st-scheduled { background: rgba(236, 238, 246, .3); }
.state-bar .seg.st-no_report { background: rgba(236, 238, 246, .12); }
.state-bar .seg.st-waiting_engine { background: repeating-linear-gradient(135deg, rgba(224, 122, 154, .75) 0 3px, rgba(224, 122, 154, .3) 3px 6px); }
.state-bar .seg.st-unknown { background: rgba(236, 238, 246, .07); }

.state-legend { display: flex; flex-wrap: wrap; align-items: center; gap: 8px 20px; font-size: 12.5px; color: var(--muted); }
.state-legend li { display: inline-flex; align-items: center; gap: 8px; white-space: nowrap; }
.state-legend b { font-family: var(--font-mono); font-weight: 400; font-size: 12px; color: var(--text); }

/* ------------------------------------------------------------------ hero: intro beside the season widget */
.companies-head.seasons-head { grid-template-columns: minmax(0, 5fr) minmax(0, 7fr); }
.season-widget .widget-head { padding-bottom: 12px; border-bottom: 1px solid var(--line); }
.tsw-season { color: var(--gold); }
.tsw-body { display: grid; grid-template-columns: minmax(0, 1.2fr) minmax(0, 1fr); gap: 26px; margin-top: 16px; align-items: start; }
.tsw-stats { display: flex; align-items: baseline; flex-wrap: wrap; gap: 6px 22px; }
.tsw-stat { display: flex; align-items: baseline; gap: 7px; font-size: 13px; color: var(--muted); }
.tsw-stat b { font-weight: 200; font-size: 30px; line-height: 1; letter-spacing: -.03em; color: var(--text); font-variant-numeric: tabular-nums; }
.tsw-stat.lead { flex-basis: 100%; }
.tsw-stat.lead b { font-size: 58px; color: var(--gold); }
.tsw-bar { margin: 16px 0 4px; }
.tsw-next { margin-top: 18px; padding-top: 14px; border-top: 1px solid var(--line); }
.tsw-next ul { display: grid; gap: 6px; margin-top: 10px; }
.tsw-next li { display: grid; grid-template-columns: 112px minmax(0, 1fr) auto; gap: 12px; align-items: baseline; font-size: 14px; }
.tsw-next .d { font-family: var(--font-mono); font-size: 11.5px; letter-spacing: .04em; color: var(--gold); white-space: nowrap; }
.tsw-next .d.expected { color: var(--text-2); }
.tsw-next .n { min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.tsw-next .n button { color: var(--text); text-align: left; }
.tsw-next .n button:hover { color: var(--gold); }
.tsw-next .k { font-family: var(--font-mono); font-size: 10px; letter-spacing: .1em; text-transform: uppercase; color: var(--muted); }
.tsw-cards .latest-thumbs { margin: 0 0 10px; }

/* ------------------------------------------------------------------ the season strip */
.season-strip { padding-bottom: 30px; scroll-margin-top: 24px; }
.season-strip-panel { display: grid; grid-template-columns: minmax(0, 5fr) minmax(0, 7fr); gap: 20px 48px; align-items: center; padding: 28px 30px; }
.strip-title h2 { font-size: clamp(28px, 2.6vw, 40px); line-height: 1.08; margin-top: 8px; }
.strip-rule { margin-top: 12px; font-size: 15px; line-height: 1.55; color: var(--text-2); max-width: 60ch; }
.strip-sentence { font-family: var(--font-mono); font-size: 12px; letter-spacing: .06em; color: var(--text); font-variant-numeric: tabular-nums; }
.strip-meter { margin: 14px 0 14px; }
.strip-bar { height: 12px; border-radius: 6px; }

/* ------------------------------------------------------------------ the season grid */
.season-grid, .card-calendar { padding-top: 34px; scroll-margin-top: 86px; }
/* Bottom-aligned beside the legend; on phones site.css stacks the section head and aligns it left. */
@media (min-width: 601px) { .grid-head { align-items: flex-end; } }
.grid-sub { margin-top: 8px; font-size: 13px; color: var(--muted); }
.grid-sub b { color: var(--text); font-weight: 500; }
.grid-legend { justify-content: flex-end; }
.grid-legend .sg-marks { pointer-events: none; }

.sg-scroll {
  --co: 290px; --col-min: 250px; --row: 48px; --head: 66px; --sector-row: 54px;
  position: relative; max-height: min(calc(100vh - 150px), 880px); overflow: auto; overscroll-behavior-x: contain;
  border: 1px solid var(--line); border-radius: var(--radius); background: var(--grid-bg);
  scrollbar-color: rgba(255, 255, 255, .22) transparent; scrollbar-width: thin;
}
.sg-scroll:focus-visible { outline-offset: 2px; }
.sg-table { min-width: calc(var(--co) + var(--seasons, 2) * var(--col-min)); }
.sg-row {
  display: grid; grid-template-columns: var(--co) repeat(var(--seasons, 2), minmax(var(--col-min), 1fr));
  height: var(--row); border-bottom: 1px solid var(--line); background: var(--grid-bg);
}
.sg-row > * { min-width: 0; }
.sg-co { position: sticky; left: 0; z-index: 2; display: flex; align-items: center; gap: 12px; padding: 0 14px 0 18px; background: inherit; border-right: 1px solid var(--line); }
.sg-cell { display: flex; align-items: center; gap: 10px; padding: 0 18px; overflow: hidden; container-type: inline-size; border-right: 1px solid rgba(255, 255, 255, .04); }
.sg-row > .sg-cell:nth-child(2) { background: rgba(245, 209, 138, .028); }
.sg-row > .sg-cell:last-child { border-right: 0; }

.sg-header { position: sticky; top: 0; z-index: 4; height: var(--head); background: var(--grid-bg-2); border-bottom: 1px solid var(--line-2); }
.sg-header .sg-co { z-index: 5; }
.sg-season { display: grid; grid-template-columns: minmax(0, 1fr) auto; grid-template-rows: auto auto; align-content: center; column-gap: 12px; padding: 0 18px; border-right: 1px solid rgba(255, 255, 255, .04); position: relative; }
.sg-season:last-child { border-right: 0; }
.sg-season.now::before { content: ""; position: absolute; left: 0; right: 0; top: 0; height: 2px; background: var(--gold); box-shadow: 0 0 12px rgba(245, 209, 138, .55); }
.sg-season-name { font-weight: 250; font-size: 22px; line-height: 1.1; letter-spacing: -.02em; }
.sg-season.now .sg-season-name { color: var(--gold); }
.sg-season-sub { grid-row: 2; font-family: var(--font-mono); font-size: 10px; letter-spacing: .1em; text-transform: uppercase; color: var(--muted); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.sg-season-count { grid-row: 1 / 3; grid-column: 2; align-self: center; font-family: var(--font-mono); font-size: 11px; color: var(--text-2); white-space: nowrap; }

.sg-group { --sector-color: var(--sky); }
.sg-sector { position: sticky; top: var(--head); z-index: 3; height: var(--sector-row); background: var(--grid-bg-2); border-bottom: 1px solid color-mix(in srgb, var(--sector-color) 40%, transparent); }
.sg-sector .sg-co { z-index: 4; }
.sg-sector .g-icon { width: 30px; height: 30px; padding: 6px; flex: none; }
.sg-sector .g-icon::before { inset: -4px; }
.sg-sector-name { min-width: 0; font-family: var(--font-cond); font-weight: 500; font-size: 13px; letter-spacing: .18em; text-transform: uppercase; color: var(--sector-color); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.sg-sector-name small { display: block; margin-top: 2px; font-family: var(--font-sans); font-size: 11.5px; letter-spacing: 0; text-transform: none; color: var(--muted); }
.sg-sum { gap: 12px; }
.sg-bar { flex: 1 1 auto; max-width: 180px; height: 6px; }
.sg-sum-n { flex: none; font-family: var(--font-mono); font-size: 11px; color: var(--text-2); }

.sg-name { display: grid; gap: 1px; width: 100%; min-width: 0; text-align: left; padding: 4px 0; position: relative; }
.sg-name::before { content: ""; position: absolute; left: -10px; top: 50%; width: 2px; height: 16px; margin-top: -8px; border-radius: 2px; background: var(--sector-color); opacity: .75; }
.sg-nm { font-size: 14px; line-height: 1.25; color: var(--text); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.sg-tk { font-family: var(--font-mono); font-size: 10.5px; letter-spacing: .05em; color: var(--muted); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.sg-name:hover .sg-nm, .sg-name[aria-pressed="true"] .sg-nm { color: var(--gold); }
.sg-row:not(.sg-header):not(.sg-sector):hover { background: #11122F; }
.sg-row.is-chosen { background: #1A1830; box-shadow: inset 2px 0 0 var(--gold); }

.sg-words { min-width: 0; font-size: 12.5px; line-height: 1.3; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; color: var(--muted); }
.sg-lead { color: var(--text-2); }
.sg-short { display: none; }
.st-live .sg-lead { color: var(--text); font-family: var(--font-mono); font-size: 12px; letter-spacing: .02em; }
.st-live .sg-short { font-family: var(--font-mono); font-size: 12px; color: var(--text); }
.st-due .sg-lead, .st-due .sg-short { color: #A9DBF2; }
.st-scheduled .sg-lead { color: var(--text); }
.st-waiting_engine .sg-words, .st-waiting_engine .sg-lead, .st-no_report .sg-lead, .st-unknown .sg-lead { color: var(--muted); }
@container (max-width: 400px) {
  .sg-full { position: absolute; width: 1px; height: 1px; overflow: hidden; clip-path: inset(50%); white-space: nowrap; }
  .sg-short { display: inline; }
}

/* The two marks of a live cell: Summary (filled) and Technical sheet (ruled), each a small card shape. */
.sg-marks { flex: none; display: inline-flex; gap: 3px; }
.sg-card { display: grid; place-items: center; width: 20px; height: 26px; border-radius: 5px; transition: background .15s ease; }
.sg-card > span, .grid-legend .sg-card, .sg-card.missing { width: 12px; height: 16px; border-radius: 2px; }
.sg-card-summary > span, .grid-legend .sg-card-summary { background: linear-gradient(var(--space-0), var(--space-0)) 3px 4px / 6px 1px no-repeat, linear-gradient(var(--space-0), var(--space-0)) 3px 7px / 5px 1px no-repeat, var(--st-live); }
.sg-card-technical_sheet > span, .grid-legend .sg-card-technical_sheet { border: 1.5px solid var(--st-live); background: repeating-linear-gradient(180deg, transparent 0 3px, rgba(234, 189, 77, .55) 3px 4px); }
.sg-card.missing { border: 1px dashed var(--st-quiet); margin: 5px 4px; }
a.sg-card:hover, a.sg-card:focus-visible { background: rgba(245, 209, 138, .16); }
.grid-legend .sg-card { display: inline-block; }

/* ------------------------------------------------------------------ the card calendar (weeks of the season in progress) */
/* contain: paint keeps the wide week columns out of the page's scrollable area on phones (measured in mobile layout:
   without it the root reported a 989 px scroll width at 390 px although the scroller clips its content). */
.wk-scroll { overflow-x: auto; contain: paint; border: 1px solid var(--line); border-radius: var(--radius); background: linear-gradient(180deg, rgba(255, 255, 255, .045), rgba(255, 255, 255, .015)); scrollbar-color: rgba(255, 255, 255, .22) transparent; scrollbar-width: thin; }
.wk-grid { display: grid; grid-template-columns: repeat(var(--weeks, 13), minmax(78px, 1fr)); min-width: calc(var(--weeks, 13) * 78px); }
.wk-col { min-width: 0; padding: 0 6px 14px; border-right: 1px solid var(--line); }
.wk-col:last-child { border-right: 0; }
.wk-col.is-past { background: rgba(4, 5, 13, .22); }
.wk-col.is-now { background: rgba(245, 209, 138, .05); box-shadow: inset 0 2px 0 var(--gold); }
.wk-head { display: grid; grid-template-rows: 14px 16px 30px; align-content: start; height: 76px; padding: 10px 4px 0; border-bottom: 1px solid var(--line); }
.wk-day { grid-row: 2; font-family: var(--font-mono); font-size: 11px; letter-spacing: .06em; color: var(--text-2); white-space: nowrap; }
.wk-n { grid-row: 3; font-weight: 200; font-size: 24px; line-height: 30px; letter-spacing: -.03em; font-variant-numeric: tabular-nums; }
.wk-now { grid-row: 1; font-family: var(--font-mono); font-size: 9.5px; letter-spacing: .12em; text-transform: uppercase; color: var(--gold); white-space: nowrap; }
.wk-col.is-now .wk-day, .wk-col.is-now .wk-n { color: var(--gold); }
.wk-col.is-past .wk-n { color: var(--text-2); }
.wk-chips { display: grid; gap: 4px; padding-top: 10px; }
.wk-chip {
  display: block; width: 100%; height: 24px; padding: 0 4px; border-radius: 6px; border: 1px solid transparent;
  font-family: var(--font-mono); font-size: 11px; line-height: 22px; letter-spacing: .02em; text-align: center;
  white-space: nowrap; overflow: hidden; text-overflow: ellipsis; transition: border-color .12s ease, background .12s ease, color .12s ease;
}
.wk-chip.st-live, .wk-key.st-live { background: var(--st-live); color: var(--space-0); font-weight: 500; }
.wk-chip.st-due, .wk-key.st-due { background: rgba(90, 175, 217, .2); border-color: var(--st-due); color: #CDEBF8; }
.wk-chip.st-backfill { background: rgba(90, 175, 217, .1); border-color: rgba(90, 175, 217, .6); color: #CDEBF8; }
.wk-chip.st-scheduled, .wk-key.st-scheduled { border-color: rgba(236, 238, 246, .55); color: var(--text); }
.wk-chip.st-scheduled.expected, .wk-key.st-scheduled.expected { border-style: dashed; border-color: rgba(236, 238, 246, .32); color: var(--text-2); }
.wk-chip.st-scheduled.undated { border-style: dotted; border-color: rgba(236, 238, 246, .28); color: var(--text-2); }
.wk-chip.st-waiting_engine { border: 1px dashed rgba(224, 122, 154, .5); color: #F2B8C9; }
.wk-chip.st-no_report { border-color: var(--line-2); color: var(--muted); }
.wk-chip:hover, .wk-chip:focus-visible { border-color: var(--gold); }
.wk-chip.st-live:hover { background: var(--gold); }
.wk-chip.is-chosen { outline: 2px solid var(--gold); outline-offset: 1px; }
.wk-key { display: inline-block; width: 22px; height: 12px; border-radius: 4px; border: 1px solid transparent; }
.wk-apart { display: grid; gap: var(--gap); margin-top: var(--gap); }
.wk-apart-box { padding: 20px 22px; border: 1px solid var(--line); border-radius: var(--radius); background: linear-gradient(180deg, rgba(255, 255, 255, .04), rgba(255, 255, 255, .012)); }
.wk-apart-box h3 { font-family: var(--font-cond); font-weight: 500; font-size: 13px; letter-spacing: .18em; text-transform: uppercase; color: var(--text-2); }
.wk-apart-box h3 b { font-family: var(--font-sans); font-weight: 200; font-size: 26px; letter-spacing: -.02em; text-transform: none; color: var(--text); margin-right: 4px; }
.wk-apart-note { margin-top: 6px; font-size: 13px; color: var(--muted); }
.wk-apart-group { margin-top: 14px; }
.wk-apart-group .kicker { margin-bottom: 8px; }
.wk-chips.flow { grid-template-columns: repeat(auto-fill, minmax(92px, 1fr)); padding-top: 0; }

/* ------------------------------------------------------------------ reports grouped by season */
.season-group + .season-group { margin-top: 30px; }
.season-group-head { display: flex; align-items: baseline; gap: 12px; margin: 0 0 14px; padding-bottom: 10px; border-bottom: 1px solid var(--line); font-weight: 400; }
.season-group-sub { font-family: var(--font-mono); font-size: 11px; letter-spacing: .08em; text-transform: uppercase; color: var(--muted); }
.season-chip { display: inline-flex; align-items: center; height: 24px; padding: 0 10px; border-radius: 999px; border: 1px solid rgba(245, 209, 138, .5); background: rgba(245, 209, 138, .08); font-family: var(--font-mono); font-size: 11px; letter-spacing: .06em; color: var(--gold); white-space: nowrap; }
.season-group-head .season-chip { height: 28px; font-size: 12.5px; }
.season-chip.annual { border-color: rgba(129, 201, 232, .5); background: rgba(129, 201, 232, .08); color: var(--sky); }
.rt-kick { align-items: center; }
.rt-period { font-size: 12.5px; color: var(--muted); }
.rt-period b { font-family: var(--font-mono); font-weight: 400; font-size: 12px; color: var(--text-2); }

/* ------------------------------------------------------------------ narrower screens */
@media (max-width: 1320px) {
  .sg-scroll { --co: 250px; --col-min: 230px; }
  .tsw-body { grid-template-columns: minmax(0, 1fr); }
}
@media (max-width: 1100px) {
  .companies-head.seasons-head { grid-template-columns: minmax(0, 1fr); }
  .tsw-body { grid-template-columns: minmax(0, 1.2fr) minmax(0, 1fr); }
  .season-strip-panel { grid-template-columns: minmax(0, 1fr); }
}
@media (max-width: 720px) {
  .tsw-body { grid-template-columns: minmax(0, 1fr); gap: 18px; }
  .tsw-stat.lead b { font-size: 48px; }
  .season-strip { padding-bottom: 22px; }
  .season-strip-panel { padding: 22px 18px; gap: 16px; }
  .strip-sentence { font-size: 11.5px; line-height: 1.6; }
  .grid-legend { justify-content: flex-start; }
  .state-legend { gap: 6px 14px; font-size: 12px; }
  .state-legend li { white-space: normal; }
  .sg-scroll { --co: 132px; --col-min: 178px; --row: 52px; --head: 70px; --sector-row: 52px; max-height: min(72vh, 640px); border-radius: 14px; }
  .sg-co { padding: 0 8px 0 14px; gap: 8px; }
  .sg-cell { padding: 0 12px; gap: 8px; }
  .sg-season { padding: 0 12px; grid-template-columns: minmax(0, 1fr); }
  .sg-season-name { font-size: 18px; }
  .sg-season-count { grid-row: auto; grid-column: 1; font-size: 10px; }
  .sg-sector .g-icon { display: none; }
  .sg-sector-name { font-size: 11.5px; letter-spacing: .14em; }
  .sg-bar { max-width: 90px; }
  .sg-nm { font-size: 13px; }
  .wk-grid { grid-template-columns: repeat(var(--weeks, 13), 80px); min-width: 0; }
  .wk-apart-box { padding: 18px 16px; }
  .wk-chips.flow { grid-template-columns: repeat(auto-fill, minmax(78px, 1fr)); }
  .season-group-head { flex-wrap: wrap; row-gap: 6px; }
}
@media (prefers-reduced-motion: reduce) {
  .sg-card, .wk-chip { transition: none; }
}
@media (forced-colors: active) {
  .state-bar .seg, .sg-glyph, .sg-card > span, .wk-chip, .wk-key { border: 1px solid CanvasText; forced-color-adjust: none; }
  .wk-chip.is-chosen, .sg-row.is-chosen { outline: 2px solid Highlight; }
}
@media print {
  .sg-scroll { max-height: none; overflow: visible; }
  .sg-header, .sg-sector, .sg-co { position: static; }
}
