/* Online Consultations dashboard, Phase 4C.29A (v4 adds the Weekday, Clinical/Admin and MoM sections in 4C.29B;
 * v5, Phase 4C.35, is the monolith's presentation: see the block headed "Phase 4C.35" below).
 *
 * Versioned in the filename so a cached stylesheet cannot outlive a layout
 * change: a new version is a new file, never an edited one under the same name.
 *
 * No @import, no url() to another origin, no web font. The strict CSP admits no
 * external stylesheet source and this file adds no dependency on one. The tokens
 * are the NWRS tool's, so the two read as one product; they are restated here
 * rather than shared because a stylesheet is a tool's own and the vendored chart
 * script reads them from this scope.
 *
 * Colours are checked against WCAG 2.1 AA on white: --oc-ink is 15.3:1,
 * --oc-quiet 5.9:1. Colour is never the only signal — every series is labelled,
 * comparator lines are dashed, every state is a sentence, and the table beneath a
 * chart carries the values.
 */

.oc {
  --oc-ink: #16202b;
  --oc-quiet: #55636f;
  --oc-line: #d4dbe2;
  --oc-surface: #f6f8fa;
  --oc-accent: #10496b;
  --oc-card-line: #dfe7ef;
  --oc-shadow: 0 2px 8px rgba(15, 23, 42, 0.04);
  --oc-tab-ink: #52637a;
  --oc-tab-active-line: #9ec5fe;
  --oc-tab-active-bg: #eef6ff;
  --oc-kpi-ink: #26364d;
  --oc-notice-bg: #fff8e6;
  --oc-notice-line: #e6c34a;
  --oc-notice-ink: #5a4500;
  --oc-series-1: #10496b;
  --oc-series-2: #1d6b52;
  --oc-series-3: #8a4b1f;
  --oc-series-4: #4c3f7a;

  color: var(--oc-ink);
  max-width: none;
  margin: 0;
  padding: 0 12px 2rem;
}

.oc h1 { font-size: 1.75rem; line-height: 1.2; margin: 0 0 0.25rem; overflow-wrap: anywhere; }
.oc h2 { font-size: 1.15rem; margin: 2rem 0 0.75rem; }
.oc-lede { color: var(--oc-quiet); margin: 0 0 1.5rem; }
.oc-lede-tight { margin: 0 0 1rem; max-width: 46rem; line-height: 1.55; }
.oc-quiet { color: var(--oc-quiet); }
.oc-code { font-variant-numeric: tabular-nums; font-weight: 600; overflow-wrap: anywhere; }
.oc-identity { margin: 0 0 0.25rem; }
.oc code { overflow-wrap: anywhere; }

/* One visible focus treatment for every interactive element. */
.oc a:focus-visible,
.oc select:focus-visible,
.oc input:focus-visible,
.oc button:focus-visible,
.oc summary:focus-visible {
  outline: 3px solid var(--oc-accent);
  outline-offset: 2px;
}

/* The organisation and filter panel is laid out in the Phase 4C.35 block below. */
.oc-filterbar { margin: 0 0 1rem; }
.oc-label { display: block; font-size: 0.8rem; font-weight: 700; line-height: 1.25; color: #334155; margin: 0; padding: 0; }
/* The chip is the shared picker's. Inside this tool it takes the tool's own
 * neutral border and its own accent: the picker's teal is a shared default this
 * tool has no platform state to justify, and the modal it opens is unchanged.
 * A long practice name wraps rather than being cut. */
.oc .epick-chip { --epick-accent: var(--oc-accent); max-width: none; width: 100%; min-height: 2.75rem; padding: 6px 12px; box-sizing: border-box; }
.oc .epick-chip.is-set { border-color: var(--hs-border-strong, var(--oc-line)); }
.oc .epick-chip-value { white-space: normal; overflow-wrap: anywhere; line-height: 1.3; }
.oc-filterbar-org { min-width: 0; }
/* The page with nothing chosen shows the same chip under a plain label. */
.oc-filterbar-org .oc-label { margin-bottom: 4px; }

/* The no-script selector's own field: a label over one input, on the page with
   nothing chosen. */
.oc-field { display: flex; flex-direction: column; gap: 0.25rem; }
.oc-field label { font-size: 0.85rem; font-weight: 600; }
.oc-field select,
.oc-field input[type="search"] {
  min-height: 2.75rem;
  min-width: 12rem;
  padding: 0.35rem 0.5rem;
  border: 1px solid var(--oc-line);
  border-radius: 4px;
  background: #fff;
  color: inherit;
  font: inherit;
}

.oc-button {
  padding: 12px 20px;
  border: 1px solid var(--hs-aqua, #0d5bb8);
  border-radius: 6px;
  background: var(--hs-aqua, #0d5bb8);
  color: #fff;
  font: inherit;
  font-size: 16px;
  font-weight: 800;
  line-height: 1.25;
  cursor: pointer;
}
.oc-button-secondary {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 12px 20px;
  border: 1px solid #d6e0ea;
  border-radius: 6px;
  background: #fff;
  color: #334155;
  font: inherit;
  font-size: 16px;
  font-weight: 700;
  line-height: 1.25;
  text-decoration: none;
  cursor: pointer;
}
.oc-button-secondary[hidden] { display: none; }

/* Link to this view. The field is the link; the button is a convenience that
 * exists only once a script has shown it. The status line is a live region that
 * is present, and empty, from first paint so an announcement is heard. */
.oc-share { display: flex; flex-wrap: wrap; align-items: center; gap: 4px 10px; margin: 10px 0 0; }
.oc-share .oc-label { flex: 0 0 auto; }
.oc-share-input {
  flex: 1 1 22rem;
  min-width: 0;
  min-height: 2.25rem;
  padding: 0.25rem 0.5rem;
  border: 1px solid var(--hs-border-strong, var(--oc-line));
  border-radius: 6px;
  background: var(--oc-surface);
  color: inherit;
  font: inherit;
  font-size: 0.85rem;
  box-sizing: border-box;
}
.oc-share .oc-button-secondary { min-height: 2.25rem; padding: 0 14px; font-size: 0.875rem; }
.oc-copy-status { flex: 0 1 auto; font-size: 0.8125rem; font-weight: 600; color: var(--oc-ink); }
.oc-copy-status:empty { display: none; }
.oc-fineprint { margin: 8px 0 0; font-size: 0.75rem; line-height: 1.45; color: var(--oc-quiet); max-width: 70rem; }
.oc-fineprint + .oc-fineprint { margin-top: 2px; }

/* The selector, on the page with nothing chosen. */
.oc-selector { margin: 0 0 2rem; }
.oc-selector-form {
  display: flex;
  flex-wrap: wrap;
  gap: 1rem;
  align-items: flex-end;
  padding: 1rem;
  margin-bottom: 1rem;
  background: var(--oc-surface);
  border: 1px solid var(--oc-line);
  border-radius: 6px;
}
.oc-selector-form .oc-field { flex: 1 1 20rem; }
.oc-org-list { list-style: none; padding: 0; margin: 0; display: grid; gap: 0.5rem; }
.oc-org-list form { margin: 0; }
.oc-org-choice {
  display: flex;
  flex-wrap: wrap;
  gap: 0.25rem 0.75rem;
  align-items: baseline;
  width: 100%;
  padding: 0.75rem 1rem;
  border: 1px solid var(--oc-line);
  border-radius: 6px;
  background: var(--oc-surface);
  color: var(--oc-accent);
  font: inherit;
  font-weight: 600;
  text-align: left;
  cursor: pointer;
}
.oc-org-name { flex: 1 1 auto; min-width: 0; overflow-wrap: anywhere; }
.oc-org-code { font-variant-numeric: tabular-nums; font-weight: 600; color: var(--oc-quiet); font-size: 0.9rem; }

.oc-plain { list-style: none; margin: 0; padding: 0; font-size: 0.9rem; font-weight: 700; }
.oc-plain li { overflow-wrap: anywhere; }

/* Cards, summaries and tables. */
.oc-card {
  background: #fff;
  border: 1px solid var(--oc-card-line);
  border-radius: 8px;
  box-shadow: var(--oc-shadow);
  padding: 1.125rem;
  margin: 0 0 1.25rem;
  min-width: 0;
}
.oc-card > h2 { margin-top: 0; font-size: 1rem; font-weight: 800; }
.oc-card > :last-child { margin-bottom: 0; }
.oc-summary { display: grid; grid-template-columns: repeat(auto-fit, minmax(13rem, 1fr)); gap: 0.75rem 1.25rem; margin: 0 0 1rem; }
.oc-summary dt { font-size: 0.8rem; color: var(--oc-quiet); }
.oc-summary dd { margin: 0.15rem 0 0; font-size: 1.25rem; font-weight: 700; font-variant-numeric: tabular-nums; }

/* A wide table scrolls inside its own box; the page never scrolls sideways. */
.oc-table-scroll { overflow-x: auto; margin: 0 0 1rem; }
.oc-table { position: relative; width: 100%; border-collapse: collapse; font-variant-numeric: tabular-nums; font-size: 0.875rem; }
.oc-table caption { text-align: left; color: var(--oc-quiet); font-size: 0.9rem; padding-bottom: 0.5rem; }
.oc-table th,
.oc-table td { text-align: left; padding: 0.5rem 0.6rem; border-bottom: 1px solid var(--oc-line); }
.oc-table thead th { border-bottom: 2px solid var(--oc-ink); font-size: 0.8rem; }
.oc-table .oc-num { text-align: right; }
.oc-table tbody tr:nth-child(even) { background: var(--oc-surface); }
.oc-table tr[data-selected] { font-weight: 700; }
.oc-table tfoot th,
.oc-table tfoot td { border-top: 2px solid var(--oc-ink); font-weight: 700; }
.oc-row-unknown th { font-style: italic; }

/* Heatmap (Phase 4C.29D): five discrete intensity levels, never the only
   signal — every cell keeps its own numeral or stated reason as real text,
   so the colour is an enhancement, not the information. Levels are quintiles
   of the month's own maximum (`{% widthratio %}` in the template), not the
   source's continuous per-pixel gradient. Contrast against white is checked
   at WCAG 2.1 AA (--oc-heat-4's text is white; the rest keep --oc-ink). */
.oc-heatmap-table .oc-heat-cell { text-align: center; font-weight: 600; }
.oc-heatmap-table .oc-heat-absent { color: var(--oc-quiet); font-weight: 400; }
.oc-heat-0 { background: #eef4f8; }
.oc-heat-1 { background: #c9e0ec; }
.oc-heat-2 { background: #8ec2dc; }
.oc-heat-3 { background: #4a94bd; color: #fff; }
.oc-heat-4 { background: var(--oc-accent); color: #fff; }
.oc-heat-legend { display: flex; align-items: center; gap: 0.35rem; flex-wrap: wrap; margin: 0.5rem 0 1rem; font-size: 0.8rem; color: var(--oc-quiet); }
.oc-heat-legend-swatch { display: inline-flex; align-items: center; gap: 0.3rem; padding: 0.15rem 0.5rem; border-radius: 3px; border: 1px solid var(--oc-line); }
.oc-tag {
  display: inline-block;
  margin-left: 0.4rem;
  padding: 0.05rem 0.4rem;
  border: 1px solid var(--oc-quiet);
  border-radius: 3px;
  font-size: 0.7rem;
  font-style: normal;
  font-weight: 600;
  color: var(--oc-ink);
  white-space: nowrap;
}

/* Absent values. The reason is announced, and shown on screen for a headline
   tile; the dash alone never carries it. */
.oc-absent { color: var(--oc-quiet); }
.oc-state { font-size: 0.7rem; font-weight: 700; color: var(--oc-quiet); letter-spacing: 0; text-transform: none; }
.oc-sr {
  position: absolute;
  width: 1px;
  height: 1px;
  margin: -1px;
  padding: 0;
  overflow: hidden;
  clip: rect(0 0 0 0);
  white-space: nowrap;
  border: 0;
}

.oc-notice {
  margin: 0 0 1rem;
  padding: 0.75rem 1rem;
  border: 1px solid var(--oc-notice-line);
  border-left-width: 4px;
  border-radius: 6px;
  background: var(--oc-notice-bg);
  color: var(--oc-notice-ink);
  line-height: 1.5;
}
.oc-empty {
  padding: 1.25rem;
  border: 1px solid var(--oc-line);
  border-radius: 6px;
  background: var(--oc-surface);
}
.oc-empty h2 { margin-top: 0; }
.oc-month-links { display: flex; flex-wrap: wrap; gap: 0.5rem 1rem; list-style: none; margin: 0; padding: 0; }
.oc-state-card { border-left: 4px solid var(--oc-quiet); }
.oc-state-card p { max-width: 46rem; line-height: 1.6; }

/* A chart box has a height because a canvas without one collapses to nothing;
   `hidden` until the script has something to draw, so no empty frame is left
   behind when JavaScript never arrives. */
.oc-chart { position: relative; height: 20rem; margin: 0.75rem 0 0; padding: 0.75rem; border: 1px solid var(--oc-line); border-radius: 6px; background: #fff; }
.oc-chart[hidden] { display: none; }
.oc-chart canvas { max-width: 100%; }

/* How to read these figures: a native disclosure, closed until asked for. The
 * body is set in two balanced columns from tablet width up, so a short topic never
 * leaves half a card empty, and in one column below it. There is no height, no
 * overflow and no script. */
.oc-card.oc-notes { margin-top: 1.5rem; padding: 0; color: var(--oc-quiet); font-size: 0.925rem; }
.oc-notes-summary {
  display: flex;
  align-items: center;
  gap: 0.75rem;
  padding: 0.85rem 1.125rem;
  color: var(--oc-ink);
  font-size: 1rem;
  font-weight: 800;
  cursor: pointer;
  list-style: none;
  border-radius: 8px;
}
.oc-notes-summary::-webkit-details-marker { display: none; }
.oc-notes-summary:focus-visible { outline-offset: -3px; }
.oc-notes-title { flex: 1 1 auto; min-width: 0; }
.oc-notes-hint { flex: 0 0 auto; font-size: 0.75rem; font-weight: 600; color: var(--oc-quiet); }
.oc-notes-hint-close { display: none; }
.oc-notes[open] .oc-notes-hint-open { display: none; }
.oc-notes[open] .oc-notes-hint-close { display: inline; }
.oc-notes-chevron {
  flex: 0 0 auto;
  width: 0.55rem;
  height: 0.55rem;
  margin: -0.2rem 0.2rem 0 0;
  border: solid currentColor;
  border-width: 0 2px 2px 0;
  color: var(--oc-quiet);
  transform: rotate(45deg);
}
.oc-notes[open] .oc-notes-chevron { margin: 0.2rem 0.2rem 0 0; transform: rotate(-135deg); }
.oc-notes-body { padding: 0.25rem 1.125rem 0.5rem; border-top: 1px solid var(--oc-card-line); column-count: 1; column-gap: 2.5rem; padding-top: 1rem; }
.oc-note { break-inside: avoid; margin: 0 0 1rem; }
.oc-note h3 { margin: 0 0 0.15rem; font-size: 0.95rem; font-weight: 700; color: var(--oc-ink); }
.oc-note p { margin: 0; max-width: 62ch; line-height: 1.6; }
.oc-note code { overflow-wrap: anywhere; }

@media (min-width: 768px) { .oc-notes-body { column-count: 2; } }
@media (max-width: 46rem) {
  .oc { padding: 0 0.75rem 3rem; }
  .oc h1 { font-size: 1.4rem; }
  .oc-chart { height: 16rem; padding: 0.5rem; }
  .oc-field select { min-width: 0; width: 100%; }
}
/* Phase 4C.29B: the month-on-month scorecard. Each chip names its month, its
   direction and its size in words; the border weight is a second cue for size
   that does not depend on colour, and nothing is judged good or bad. */
.oc-chips {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(9rem, 1fr));
  gap: 0.5rem;
  margin: 0 0 1rem;
  padding: 0;
  list-style: none;
}
.oc-chip {
  padding: 0.5rem 0.65rem;
  border: 1px solid var(--oc-line);
  border-radius: 6px;
  background: var(--oc-surface);
  font-variant-numeric: tabular-nums;
}
.oc-chip[data-size="moderate"] { border-width: 2px; border-color: var(--oc-quiet); }
.oc-chip[data-size="large"] { border-width: 3px; border-color: var(--oc-ink); }
.oc-chip-month { display: block; font-size: 0.75rem; color: var(--oc-quiet); }
.oc-chip-change { display: block; font-size: 1rem; font-weight: 700; overflow-wrap: anywhere; }
.oc-chip-size { display: block; font-size: 0.75rem; color: var(--oc-quiet); }

/* A bank holiday is named where it falls, and the calendar's reach is stated. */
.oc-holidays { margin: 0 0 1rem; padding-left: 1.1rem; }
.oc-summary dd .oc-state { display: block; margin-top: 0.15rem; }
.oc-summary dd small { display: block; font-size: 0.75rem; font-weight: 400; color: var(--oc-quiet); }

/* ==== Phase 4C.35: the monolith's presentation ===================================
 *
 * Values are the monolith's `online_consultations.html` (pinned `cb02cf0`): the same
 * type scale, colours, radii, shadows, card hierarchy, KPI cards, tab rail and chart
 * boxes. What is different is only what the Intelligence shell, the strict CSP and the
 * full-width workspace require, and each such difference is listed in
 * `docs/migration-online-consultations-ui-parity-4c35.md`. No inline style exists: every
 * width, height and colour below is a class, and a script that must size a chart box
 * does it through the CSSOM, which the policy admits.
 */
.oc { --oc-theme: var(--hs-aqua, #0d5bb8); --oc-title: #111827; --oc-label: #6b7c85; --oc-card-shadow: 0 1px 6px rgba(0, 0, 0, 0.06); }

/* Attribution banner and data-source footer */
.oc-attribution,
.oc-datasource { background: #f0f4ff; border-left: 4px solid var(--oc-theme); border-radius: 0 6px 6px 0; color: #4b5563; font-size: 13px; line-height: 1.5; }
.oc-attribution { padding: 14px 18px; margin: 0 0 28px; }
.oc-datasource { padding: 20px 24px; margin: 40px 0 0; }
.oc-datasource h2 { margin: 0 0 8px; font-size: 1rem; font-weight: 500; color: var(--oc-title); }
.oc-datasource p { margin: 0; }

/* The lookup card: View, organisation, month and period */
.oc-filterbar { background: #fff; border: 0; border-radius: 8px; box-shadow: var(--oc-card-shadow); padding: 20px; margin: 0 0 28px; }
.oc-controls { display: flex; flex-wrap: wrap; gap: 12px; align-items: flex-end; }
.oc-control { display: flex; flex-direction: column; gap: 4px; min-width: 0; }
.oc-control-org { flex: 1 1 18rem; }
.oc-control-month,
.oc-control-period { flex: 0 1 11rem; }
.oc-control select { width: 100%; min-height: 2.75rem; padding: 10px 14px; border: 1px solid #d1d9e0; border-radius: 6px; background: #fff; color: var(--oc-title); font: inherit; font-size: 14px; box-sizing: border-box; }
.oc-label { font-size: 11px; font-weight: 700; letter-spacing: 0.06em; text-transform: uppercase; color: var(--oc-label); }
.oc-controls-actions { display: flex; gap: 8px; align-items: stretch; }
.oc-controls .oc-button,
.oc-controls .oc-button-secondary { min-height: 2.75rem; padding: 0 22px; font-size: 14px; box-sizing: border-box; white-space: nowrap; }
.oc-button { background: var(--oc-theme); border-color: var(--oc-theme); font-weight: 700; }
.oc .epick-chip { border-radius: 6px; border-color: #d1d9e0; }
.oc-modes { display: inline-flex; background: #eef2f7; border-radius: 10px; padding: 4px; }
.oc-mode { display: inline-flex; align-items: center; border: 0; background: none; padding: 9px 18px; font-size: 13px; font-weight: 700; color: #64748b; border-radius: 7px; text-decoration: none; min-height: 2.25rem; box-sizing: border-box; }
.oc-mode.is-active { background: #fff; color: var(--oc-theme); box-shadow: 0 1px 2px rgba(15, 23, 42, 0.12); }
.oc-hint { font-size: 12px; color: #9ca3af; margin: 8px 0 0; }
.oc-hint strong { font-weight: 700; }
.oc-share { margin-top: 12px; }

/* The tab rail: a card grid with an icon over each label */
.oc-sections { background: none; border: 0; box-shadow: none; padding: 0; margin: 18px 0 22px; }
.oc-sections ul { display: grid; grid-template-columns: repeat(7, minmax(0, 1fr)); gap: 8px; margin: 0; padding: 0; list-style: none; }
.oc-sections li { display: flex; min-width: 0; margin: 0; }
.oc-section-link { position: relative; display: flex; flex-direction: column-reverse; align-items: center; justify-content: flex-end; gap: 7px; width: 100%; min-height: 0; padding: 13px 8px 11px; border: 1px solid #e6ebf1; border-radius: 12px; background: #fff; color: #64748b; font-size: 11.5px; font-weight: 700; line-height: 1.15; text-align: center; text-decoration: none; box-sizing: border-box; transition: transform 0.1s, box-shadow 0.12s, border-color 0.12s; }
a.oc-section-link { background: #fff; border-color: #e6ebf1; color: #64748b; font-weight: 700; }
a.oc-section-link:hover { background: #fff; border-color: #bcd0ea; box-shadow: 0 3px 10px rgba(13, 91, 184, 0.08); transform: translateY(-1px); }
.oc-section-link.is-current,
a.oc-section-link.is-current { background: linear-gradient(135deg, #0d3b6e, #0d5bb8); border-color: transparent; color: #fff; text-decoration: none; box-shadow: 0 6px 16px rgba(13, 91, 184, 0.28); }
.oc-section-link.is-unavailable { background: var(--oc-surface); border: 1px dashed var(--oc-line); color: var(--oc-quiet); font-weight: 400; cursor: default; }
.oc-ico { width: 17px; height: 17px; fill: none; stroke: currentColor; stroke-width: 2; stroke-linecap: round; stroke-linejoin: round; flex: 0 0 auto; color: #94a3b8; transition: color 0.12s; }
.oc-section-link.is-current .oc-ico { color: #fff; }
.oc-pcn-entry { margin: -8px 0 16px; }

/* KPI cards */
.oc-kpi-row { display: flex; flex-wrap: wrap; gap: 12px; margin: 0 0 20px; padding: 0; }
.oc-kpi-row + .oc-kpi-row { margin-top: -8px; }
.oc-kpi-row-secondary { margin-bottom: 28px; }
.oc-kpi-card { background: #fff; border-left: 3px solid var(--oc-theme); border-radius: 8px; box-shadow: var(--oc-card-shadow); padding: 14px 18px; min-width: 130px; flex: 1 1 130px; box-sizing: border-box; }
.oc-kpi-label { font-size: 10px; font-weight: 700; letter-spacing: 0.07em; text-transform: uppercase; color: var(--oc-label); margin: 0 0 4px; line-height: 1.25; }
.oc-kpi-value { font-size: 1.4rem; font-weight: 700; color: var(--oc-title); line-height: 1.2; margin: 0; font-variant-numeric: tabular-nums; overflow-wrap: anywhere; }
.oc-kpi-value.oc-kpi-text-value { font-size: 1.05rem; }
.oc-kpi-sub { font-size: 11px; color: #9ca3af; margin: 2px 0 0; line-height: 1.3; }
.oc-kpi-card-secondary { border-left-color: #c7d8f5; background: #f8fafc; }
.oc-kpi-card-secondary .oc-kpi-value { font-size: 1.05rem; }
.oc-kpi-value .oc-state { font-size: 11px; font-weight: 600; }

/* Cards, titles, rows */
.oc-card { border: 0; border-radius: 8px; box-shadow: var(--oc-card-shadow); padding: 16px 20px; margin: 0 0 16px; }
.oc-card > h2,
.oc-chart-title { font-size: 13px; font-weight: 700; color: var(--oc-title); margin: 0 0 12px; line-height: 1.35; }
.oc-card > h3 { font-size: 13px; font-weight: 700; color: var(--oc-title); margin: 16px 0 8px; }
.oc-chart-title .oc-sub { font-weight: 400; color: #9ca3af; font-size: 11px; }
.oc-row { display: grid; grid-template-columns: repeat(12, minmax(0, 1fr)); gap: 16px; margin: 0 0 16px; }
.oc-row > .oc-card { margin: 0; min-width: 0; }
.oc-col-4 { grid-column: span 4; }
.oc-col-5 { grid-column: span 5; }
.oc-col-6 { grid-column: span 6; }
.oc-col-7 { grid-column: span 7; }
.oc-col-8 { grid-column: span 8; }
.oc-col-12 { grid-column: span 12; }
.oc-lede-tight { font-size: 12px; margin: 0 0 12px; max-width: none; color: #6b7280; }

/* Summary: label left, value right */
.oc-summary { display: grid; grid-template-columns: 1fr 1fr; gap: 6px 12px; font-size: 13px; margin: 0; }
.oc-summary > div { display: contents; }
.oc-summary dt { color: var(--oc-label); font-weight: 400; font-size: 13px; }
.oc-summary dd { margin: 0; font-weight: 600; color: var(--oc-title); font-size: 13px; font-variant-numeric: tabular-nums; overflow-wrap: anywhere; }
.oc-summary dd small { display: block; font-size: 11px; font-weight: 400; color: var(--oc-quiet); }

/* Running text inside a card is the monolith's 12-13px, not the page's body size */
.oc-card p { font-size: 12.5px; line-height: 1.55; max-width: none; }
.oc-card .oc-lede-tight { font-size: 12px; }
.oc-card .oc-state { font-size: 11px; }

/* Chart boxes carry no frame; the card is the frame */
.oc-chart { position: relative; height: 280px; margin: 0; padding: 0; border: 0; border-radius: 0; background: none; }
.oc-chart.oc-chart-tall { height: 380px; }
.oc-chart.oc-chart-donut { height: 340px; }
.oc-chart.oc-chart-mid { height: 350px; }
.oc-chart.oc-chart-xl { height: 400px; }
.oc-chart[hidden] { display: none; }
.oc-chart canvas { max-width: 100%; }

/* The table behind a chart: a native disclosure, closed until asked for */
.oc-tabledisc { margin: 12px 0 0; }
.oc-tabledisc > summary { cursor: pointer; font-size: 12px; font-weight: 700; color: var(--oc-theme); padding: 4px 0; }
.oc-tabledisc[open] > summary { margin-bottom: 8px; }
.oc-tabledisc .oc-table-scroll { margin: 0 0 0.5rem; }
.oc-tabledisc .oc-quiet { font-size: 12px; }
.oc-tabledisc-first { margin-top: 0; }

/* Weekday */
.oc-wd-note { background: #f1f7fb; border: 1px solid #d6e4ef; border-radius: 8px; padding: 10px 14px; margin: 0 0 14px; font-size: 13px; color: #37505f; }
.oc-bh-flag { display: inline-block; margin-left: 6px; background: #fde9c8; color: #8a5a12; border-radius: 20px; padding: 2px 10px; font-weight: 600; font-size: 12px; }
.oc-seg { display: inline-flex; gap: 2px; background: #eef2f5; border-radius: 8px; padding: 3px; margin: 0 0 12px; }
.oc-seg[hidden] { display: none; }
.oc-seg button { border: 0; background: transparent; color: #5a6b76; border-radius: 6px; padding: 5px 12px; font-size: 12px; font-weight: 700; cursor: pointer; font-family: inherit; }
.oc-seg button[aria-pressed="true"] { background: #00849b; color: #fff; }
.oc-up { color: #c0392b; font-weight: 700; }
.oc-down { color: #2e7d32; font-weight: 700; }

/* Month-on-month: alert and traffic-light scorecard */
.oc-alert { margin-top: 16px; padding: 10px 12px; border-radius: 6px; font-size: 12px; border: 1px solid; }
.oc-alert[data-direction="up"] { background: #d1fae5; color: #065f46; border-color: #a7f3d0; }
.oc-alert[data-direction="down"] { background: #fee2e2; color: #991b1b; border-color: #fecaca; }
.oc-chips { display: flex; flex-wrap: wrap; gap: 8px; padding: 4px 0; margin: 0; list-style: none; }
.oc-chip { padding: 6px 10px; border: 0; border-radius: 6px; font-size: 12px; font-weight: 600; text-align: center; min-width: 80px; background: #f3f4f6; color: #6b7280; }
.oc-chip[data-size="small"] { background: #d1fae5; color: #065f46; }
.oc-chip[data-size="moderate"] { background: #fef3c7; color: #92400e; }
.oc-chip[data-size="large"] { background: #fee2e2; color: #991b1b; }
.oc-chip-month { font-size: 10px; font-weight: 400; color: inherit; }
.oc-chip-change { font-size: 12px; color: inherit; }
.oc-chip-size { font-size: 10px; font-weight: 400; color: inherit; }

/* Heatmap: the monolith's white-to-blue ramp, in eleven steps (a class each, no inline style) */
.oc-heatmap-table { border-collapse: collapse; font-size: 11px; white-space: nowrap; min-width: 100%; width: auto; }
.oc-heatmap-table caption { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); }
.oc-heatmap-table th { padding: 4px 6px; color: var(--oc-label); font-weight: 600; text-align: center; font-size: 10px; border: 0; }
.oc-heatmap-table thead th { border-bottom: 0; }
.oc-heatmap-table tbody th { padding: 4px 10px 4px 0; color: #374151; font-weight: 600; text-align: right; font-size: 11px; }
.oc-heatmap-table tbody tr:nth-child(even) { background: none; }
.oc-heatmap-table td { padding: 0; border: 0; }
.oc-heatmap-table .oc-heat-cell { width: 52px; min-width: 52px; height: 26px; text-align: center; border-radius: 3px; font-size: 10px; font-weight: 400; border: 2px solid #fff; background-clip: padding-box; }
.oc-heat-0 { background: rgb(255, 255, 255); color: #374151; }
.oc-heat-1 { background: rgb(230, 240, 250); color: #374151; }
.oc-heat-2 { background: rgb(204, 224, 245); color: #374151; }
.oc-heat-3 { background: rgb(179, 209, 240); color: #374151; }
.oc-heat-4 { background: rgb(153, 193, 235); color: #374151; }
.oc-heat-5 { background: rgb(128, 177, 230); color: #374151; }
.oc-heat-6 { background: rgb(102, 162, 225); color: #374151; }
.oc-heat-7 { background: rgb(77, 146, 220); color: #fff; }
.oc-heat-8 { background: rgb(51, 131, 215); color: #fff; }
.oc-heat-9 { background: rgb(26, 115, 210); color: #fff; }
.oc-heat-10 { background: rgb(0, 100, 205); color: #fff; }
.oc-heat-absent { background: #f6f8fa; color: var(--oc-quiet); }
.oc-heat-legend { display: flex; align-items: center; gap: 6px; flex-wrap: wrap; margin: 10px 0 0; font-size: 11px; color: #9ca3af; }
.oc-heat-legend-swatch { display: inline-block; width: 18px; height: 12px; border-radius: 2px; border: 1px solid #e5e7eb; padding: 0; }
.oc-heat-legend-swatch[class*="oc-heat-"] { font-size: 0; }
.oc-heat-legend-max { color: #6b7280; }

/* Insights */
.oc-insight { border-left: 4px solid #00b4d9; background: #fff; border-radius: 4px; padding: 12px 16px; margin: 0 0 10px; box-shadow: 0 1px 4px rgba(0, 0, 0, 0.06); }
.oc-insight[data-severity="high"] { border-left-color: #e74c3c; }
.oc-insight[data-severity="moderate"] { border-left-color: #f39c12; }
.oc-insight[data-severity="low"] { border-left-color: #27ae60; }
.oc-insight-badge { display: inline-block; background: #00b4d9; color: #fff; font-size: 10px; font-weight: 700; letter-spacing: 1px; text-transform: uppercase; padding: 2px 8px; border-radius: 3px; margin-right: 8px; }
.oc-insight[data-severity="high"] .oc-insight-badge { background: #e74c3c; }
.oc-insight[data-severity="moderate"] .oc-insight-badge { background: #f39c12; }
.oc-insight[data-severity="low"] .oc-insight-badge { background: #27ae60; }
.oc-insight strong { font-size: 13px; }
.oc-insight p { margin: 4px 0 0; font-size: 12px; color: #666; max-width: none; }

/* Two weekday cards in one column, the control choosing between them */
.oc-stack { display: grid; gap: 16px; align-content: start; min-width: 0; }
.oc-stack > .oc-card { margin: 0; }
.oc-summary-flow { margin: 16px 0 0; }
.oc-heatmap-scroll { margin: 0; }

/* Plain tables keep the monolith's small, tight type */
.oc-card .oc-table { font-size: 12px; }
.oc-card .oc-table th,
.oc-card .oc-table td { padding: 6px 8px; }
.oc-card .oc-table thead th { border-bottom: 2px solid #e8edf2; color: var(--oc-label); font-size: 11px; font-weight: 700; }
.oc-card .oc-table td,
.oc-card .oc-table tbody th { border-bottom: 1px solid #f0f3f6; }
.oc-table tr[data-selected] { background: #fff5f5; }

@media (max-width: 1280px) {
  .oc-col-4, .oc-col-5, .oc-col-6, .oc-col-7, .oc-col-8 { grid-column: 1 / -1; }
}
@media (max-width: 1100px) { .oc-sections ul { grid-template-columns: repeat(4, minmax(0, 1fr)); } }
@media (max-width: 640px) {
  .oc-kpi-card { min-width: calc(50% - 6px); flex-basis: calc(50% - 6px); }
  .oc-control-org, .oc-control-month, .oc-control-period { flex: 1 1 100%; }
  .oc-controls-actions { flex: 1 1 100%; flex-wrap: wrap; }
  .oc-controls-actions > * { flex: 1 1 0; }
  .oc-share-input { flex-basis: 100%; }
  .oc-summary { grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); }
}
@media (max-width: 560px) { .oc-sections ul { grid-template-columns: repeat(2, minmax(0, 1fr)); } }

@media print {
  .oc-filterbar, .oc-sections { display: none; }
  .oc-notes-chevron, .oc-notes-hint { display: none; }
  .oc-chart { display: none; }
  .oc-card, .oc-kpi { box-shadow: none; border-color: #cbd5e1; break-inside: avoid; }
  .oc-table tbody tr:nth-child(even) { background: transparent; }
}
