/*
  Overview. An operational page with one place for the eye to land.

  Left column, what is yours: the next action, set large, with the page's only
  blue button; then what else is waiting; then the last thing verified.
  Right column, how the work is running: the period's totals, the trend, how
  fresh the evidence is.
  Below, on request: scheduled checks and the records behind every day.

  The order of sizes is the order of reading: the next action is the largest
  type on the page, numbers come second, headings and labels stay small. Words
  that would repeat on every row are said once or folded away.

  Layout follows the width of the page column, not the window, so it holds in
  the rail layout, the phone layout and anything between. Tokens come from
  workspace.css.
*/
.ov-sr { position: absolute; width: 1px; height: 1px; overflow: hidden; clip-path: inset(50%); white-space: nowrap; }
/* The page's name is already lit in the rail. Here it is a label, so the next action is the headline. */
main:has(> .ov-home) > h1 { font-size: var(--t-meta); font-weight: 600; letter-spacing: .02em; color: var(--muted); }
.ov-home { display: grid; gap: var(--s7); min-width: 0; container-type: inline-size; }
.ov-home section { margin: 0; }
.ov-home table { min-width: 0; }
.ov-home time { white-space: nowrap; }
.ov-grid { display: grid; grid-template-columns: minmax(0, 1fr); gap: var(--s7); align-items: start; }
.ov-col { display: grid; grid-template-columns: minmax(0, 1fr); gap: var(--s6); align-content: start; min-width: 0; }
@container (min-width: 52rem) {
  .ov-lead, .ov-register-layout { grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); }
  /* Side by side, the right column starts level with the next action, without a rule above it. */
  .ov-lead > .ov-col + .ov-col > .ov-block:first-child { padding-top: 0; border-top: 0; }
}

/* A block is a ruled section: hairline, small heading, content. No box. */
.ov-block { min-width: 0; padding-top: var(--s4); border-top: 1px solid var(--line); overflow-wrap: anywhere; }
.ov-block > header {
  display: flex;
  flex-wrap: wrap;
  align-items: baseline;
  justify-content: space-between;
  gap: var(--s2) var(--s4);
  margin-bottom: var(--s4);
}
.ov-block h2 { margin: 0; font-size: var(--t-body); letter-spacing: 0; }
.ov-block h3 { margin: var(--s5) 0 var(--s2); font-size: var(--t-label); font-weight: 500; color: var(--muted); }
/* The heading takes the free width, so one link or two sit together at the far edge. */
.ov-block > header > h2 { flex: 1 1 auto; }
.ov-block > header > a { font-size: var(--t-meta); color: var(--secondary-ink); }
.ov-block > .empty { margin: 0; }

/* The next action. The blue rule, the light and the blue button are on only when something waits for a person. */
.ov-priority { min-width: 0; padding: var(--s1) 0 var(--s1) var(--s5); border-left: 2px solid var(--signal); overflow-wrap: anywhere; }
.ov-eyebrow { display: flex; flex-wrap: wrap; align-items: center; gap: var(--s1) var(--s3); max-inline-size: none; margin: 0; font-size: var(--t-meta); }
.ov-status { display: inline-flex; align-items: center; gap: var(--s2); font-weight: 600; color: var(--ink); }
.ov-status::before { content: ""; width: var(--s2); height: var(--s2); border-radius: var(--r-pill); background: var(--signal); }
.ov-waiting { color: var(--muted); }
.ov-record-title span { display: inline-block; }
.ov-record-title {
  max-inline-size: none;
  margin: var(--s3) 0;
  font-size: var(--t-title);
  font-weight: 600;
  line-height: 1.1;
  letter-spacing: -.02em;
  color: var(--ink);
  text-wrap: balance;
}
.ov-record-title-long { font-size: var(--t-section); line-height: 1.3; letter-spacing: -.01em; }
.ov-priority-meta { display: flex; flex-wrap: wrap; align-items: center; gap: var(--s2) var(--s3); }
.ov-priority h2 { margin: 0; font-size: var(--t-body); font-weight: 400; letter-spacing: 0; color: var(--secondary-ink); }
.ov-tag {
  display: inline-block;
  padding: 0 var(--s2);
  border: 1px solid var(--line);
  border-radius: var(--r-control);
  font-size: var(--t-label);
  font-weight: 500;
  line-height: var(--s5);
  color: var(--secondary-ink);
}
/* The first link is the action. A second one, when there is one, stays a plain link beside it. */
.ov-priority-action { display: flex; flex-wrap: wrap; align-items: center; gap: var(--s3) var(--s5); margin-top: var(--s5); }
.ov-priority-action a:first-child {
  display: inline-flex;
  align-items: center;
  min-height: var(--s7);
  padding: 0 var(--s5);
  border: 1px solid var(--signal-fill);
  border-radius: var(--r-control);
  background: var(--signal-fill);
  color: var(--on-ink);
  font-weight: 600;
  text-decoration: none;
}
.ov-priority-action a:first-child:hover { background: var(--ink); border-color: var(--ink); color: var(--on-ink); }
.ov-reason { margin-top: var(--s4); font-size: var(--t-meta); color: var(--muted); }
.ov-reason p { margin: var(--s2) 0 var(--s1); color: var(--secondary-ink); }
.ov-reason small { font-size: var(--t-label); }
/* Nothing waiting, or a suggestion: calm. No light, and a quiet button. */
.ov-priority-empty { border-left-color: var(--line); }
.ov-priority-empty h2 { margin-bottom: var(--s2); font-size: var(--t-title); font-weight: 600; line-height: 1.1; letter-spacing: -.02em; color: var(--ink); }
.ov-priority-clear h2::before { content: "✓ "; content: "✓ " / ""; color: var(--status-good); }
.ov-priority-empty p { margin: 0; color: var(--secondary-ink); }
.ov-priority-empty .ov-priority-action a { min-height: var(--control); padding: 0 var(--s4); background: transparent; border-color: var(--control-line); color: var(--ink); font-size: var(--t-meta); }
.ov-priority-empty .ov-priority-action a:hover { background: var(--hover); border-color: var(--control-line); color: var(--ink); }
@container (min-width: 52rem) {
  .ov-record-title { font-size: var(--t-figure); }
  .ov-record-title-long { font-size: var(--t-title); line-height: 1.15; letter-spacing: -.02em; }
}

/* Rows: a name on the left, one number on the right, and at most one quiet line under the name. */
.ov-rows { list-style: none; margin: 0; padding: 0; }
.ov-rows li {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  align-items: baseline;
  gap: var(--s1) var(--s4);
  padding: var(--s3) 0;
  border-top: 1px solid var(--line);
}
.ov-rows li:first-child { padding-top: 0; border-top: 0; }
/* A row's name is its link. It is underlined under the pointer or focus, not at rest. */
.ov-rows a, .ov-checks strong a { text-decoration-line: none; }
.ov-rows a:hover, .ov-rows a:focus-visible, .ov-checks strong a:hover, .ov-checks strong a:focus-visible { text-decoration-line: underline; }
:is(.ov-queue, .ov-cases) .ov-rows a { font-weight: 500; }
.ov-tools .ov-rows { font-size: var(--t-meta); }
.ov-rows li > span:nth-child(2) { font-size: var(--t-meta); color: var(--muted); white-space: nowrap; }
.ov-row-meta { grid-column: 1 / -1; display: flex; flex-wrap: wrap; align-items: center; gap: var(--s1) var(--s2); font-size: var(--t-meta); color: var(--muted); }
.ov-row-meta:empty { display: none; }
.ov-verified {
  display: flex;
  flex-wrap: wrap;
  align-items: baseline;
  gap: var(--s1) var(--s3);
  padding-top: var(--s4);
  border-top: 1px solid var(--line);
  font-size: var(--t-meta);
  color: var(--muted);
}
.ov-verified h2 { margin: 0; font-size: var(--t-meta); font-weight: 500; letter-spacing: 0; }
.ov-verified h2::before { content: "✓ "; content: "✓ " / ""; font-weight: 600; color: var(--status-good); }
.ov-verified a { margin-left: auto; color: var(--secondary-ink); }
.ov-counts { display: flex; flex-wrap: wrap; gap: var(--s3) var(--s6); margin: 0; }
.ov-counts div { display: flex; align-items: baseline; gap: var(--s2); }
.ov-counts dd { font-size: var(--t-title); font-weight: 500; line-height: 1; letter-spacing: -.02em; }
.ov-counts dt { font-size: var(--t-meta); }
.ov-fact { max-inline-size: none; margin: 0; font-size: var(--t-meta); }
.ov-fact strong { font-weight: 500; }

/* Period totals. Each number carries its own small series and its change; none stands alone. */
.ov-kpis { display: grid; grid-template-columns: repeat(auto-fit, minmax(6.5rem, 1fr)); gap: var(--s4); margin: 0; }
.ov-kpi { display: grid; grid-template-columns: auto minmax(0, 1fr); align-items: end; gap: var(--s1) var(--s2); min-width: 0; }
.ov-kpi dt { grid-column: 1 / -1; font-size: var(--t-label); color: var(--muted); }
.ov-kpi dd { display: contents; }
.ov-kpi-value { font-size: var(--t-title); font-weight: 500; line-height: 1; letter-spacing: -.02em; color: var(--ink); white-space: nowrap; }
.ov-kpi-value small { margin-left: var(--s1); font-size: var(--t-label); font-weight: 400; letter-spacing: 0; color: var(--muted); }
.ov-spark, .ov-bullet { width: 100%; max-width: 5rem; overflow: visible; }
.ov-spark { height: var(--s5); }
.ov-bullet { height: var(--s2); align-self: center; }
.ov-delta { grid-column: 1 / -1; font-size: var(--t-label); color: var(--secondary-ink); }
.ov-kpi-note { max-inline-size: none; margin: var(--s2) 0 var(--s5); font-size: var(--t-label); color: var(--muted); }
.ov-bullet-range { fill: var(--grid); }
.ov-bullet-value { fill: var(--data); }
.ov-bullet-target { stroke: var(--ink); stroke-width: 2; vector-effect: non-scaling-stroke; }

/*
  The trend is a line: straight segments, a point on every day with records,
  a break where a day has none. Gridlines are faint and horizontal. The latest
  value is labelled at the line's end, so there is no legend to look up.
*/
.ov-trace { fill: none; stroke: var(--data); stroke-width: 1.5; stroke-linejoin: round; stroke-linecap: round; vector-effect: non-scaling-stroke; }
.ov-pt, .ov-pt-hole { fill: none; stroke: var(--data); stroke-width: 6; stroke-linecap: round; vector-effect: non-scaling-stroke; }
.ov-spark .ov-pt { stroke-width: 4; }
.ov-pt-hole { stroke: var(--page); stroke-width: 3; }
.ov-pt-current { stroke: var(--signal); stroke-width: 8; }
.ov-gridline { stroke: var(--grid); stroke-width: 1; vector-effect: non-scaling-stroke; }
.ov-baseline { stroke: var(--line); stroke-width: 1; vector-effect: non-scaling-stroke; }
/* The plot keeps a gutter at its right edge for the last value's label. The dates under it stop at the same line. */
.ov-figure { --ov-end: 4.5rem; margin: 0; }
.ov-chart > .empty { margin: 0 0 var(--s4); font-size: var(--t-meta); }
.ov-plot { display: grid; grid-template-columns: var(--s6) minmax(0, 1fr) var(--ov-end); height: 10rem; }
.ov-axis, .ov-end { position: relative; font-size: var(--t-label); color: var(--muted); }
.ov-axis span { position: absolute; right: var(--s2); line-height: 1; transform: translateY(-50%); }
.ov-axis-max { top: 10%; }
.ov-axis-mid { top: 55%; }
.ov-axis-zero { top: 100%; }
.ov-canvas { position: relative; border-bottom: 1px solid var(--line); }
.ov-line { position: absolute; inset: 0; width: 100%; height: 100%; overflow: visible; pointer-events: none; }
.ov-bars { position: absolute; inset: 0; display: flex; }
.ov-bar { position: relative; flex: 1; min-width: 0; }
.ov-bar:hover, .ov-bar[aria-current] { background: var(--hover); }
.ov-bar:focus-visible { outline-offset: -2px; }
.ov-bar-missing::after, .ov-bar-unavailable::after {
  content: "";
  position: absolute;
  left: 25%;
  right: 25%;
  bottom: var(--s1);
  border-top: 1px dashed var(--muted);
}
.ov-end span { position: absolute; left: var(--s2); line-height: 1; white-space: nowrap; transform: translateY(50%); }
.ov-end strong { margin-right: var(--s1); font-size: var(--t-meta); color: var(--ink); }
.ov-at-0 { bottom: 0; }
.ov-at-1 { bottom: 7.5%; }
.ov-at-2 { bottom: 15%; }
.ov-at-3 { bottom: 22.5%; }
.ov-at-4 { bottom: 30%; }
.ov-at-5 { bottom: 37.5%; }
.ov-at-6 { bottom: 45%; }
.ov-at-7 { bottom: 52.5%; }
.ov-at-8 { bottom: 60%; }
.ov-at-9 { bottom: 67.5%; }
.ov-at-10 { bottom: 75%; }
.ov-at-11 { bottom: 82.5%; }
.ov-at-12 { bottom: 90%; }
.ov-dates { display: flex; justify-content: space-between; padding: var(--s2) var(--ov-end) 0 var(--s6); font-size: var(--t-label); color: var(--muted); }
.ov-figure figcaption { display: flex; flex-wrap: wrap; align-items: center; gap: var(--s1) var(--s4); margin-top: var(--s3); font-size: var(--t-label); color: var(--muted); }
.ov-figure figcaption span { display: inline-flex; align-items: center; gap: var(--s2); }
.ov-key { width: var(--s2); height: var(--s2); border-radius: var(--r-pill); background: var(--data); }
.ov-key-partial { background: none; border: 2px solid var(--data); }
.ov-key-unknown { width: var(--s3); height: 0; border-radius: 0; background: none; border-top: 1px dashed var(--muted); }
.ov-chart footer { margin-top: var(--s3); font-size: var(--t-meta); }

/* Source register, scheduled checks and the records of one day */
.ov-day-picker { display: flex; flex-wrap: wrap; align-items: end; gap: var(--s3); }
.ov-days { margin-top: var(--s4); font-size: var(--t-meta); }
.ov-days summary, .ov-history-list summary { color: var(--secondary-ink); }
.ov-days .table { margin-top: var(--s3); }
.ov-register-note { margin: 0 0 var(--s3); }
.ov-register-note h3, .ov-register-note p { margin: var(--s1) 0; }
/* With a day open, the day is the page's headline. */
.ov-register-note h3 { font-size: var(--t-title); font-weight: 600; line-height: 1.1; letter-spacing: -.02em; color: var(--ink); }
.ov-register-note h3 + p { color: var(--ink); }
.ov-register-note p { font-size: var(--t-meta); color: var(--muted); }
.ov-register-note + .ov-history-list, .ov-day-picker + .ov-register-note { margin-top: var(--s4); }
.ov-history-list { list-style: none; padding: 0; margin: 0; }
.ov-history-list li { display: flex; gap: var(--s3); padding: var(--s3) 0; border-top: 1px solid var(--line); }
.ov-history-list li div { display: grid; gap: var(--s1); min-width: 0; }
.ov-history-list li p { margin: 0; }
.ov-history-list small { color: var(--muted); }
.ov-history-list :target { background: var(--hover); }
.ov-event { flex: none; color: var(--muted); }
/* Scheduled checks sit side by side, each in the same order, so one can be read against the next. */
.ov-checks { display: grid; grid-template-columns: repeat(auto-fit, minmax(min(100%, 22rem), 1fr)); gap: var(--s6) var(--s7); }
.ov-checks li { display: block; padding: 0; border-top: 0; font-size: var(--t-meta); }
.ov-checks strong { font-size: var(--t-body); }
.ov-checks dl { gap: var(--s1) var(--s4); margin-block: var(--s2); }
/* The controls a check read stay label beside value at every width: the pairs are short, and stacked they double the page. */
.ov-checks li > div > dl { grid-template-columns: max-content minmax(0, 1fr); }
.ov-checks li > div > dl dd + dt { margin-top: 0; }
.ov-checks details dl { margin-block: var(--s2) 0; }
.ov-checks details p { margin-top: var(--s2); color: var(--secondary-ink); }
.ov-check { font-weight: 500; }
.ov-history-list .ov-check { color: var(--secondary-ink); }
.ov-check::before { font-weight: 600; }
.ov-check-observed::before { content: "✓ "; content: "✓ " / ""; color: var(--status-good); }
.ov-check-partial::before, .ov-check-unavailable::before, .ov-check-missing::before { content: "! "; content: "! " / ""; color: var(--status-warn); }
.ov-history-list :is(.ov-check-partial, .ov-check-unavailable, .ov-check-missing) { color: var(--status-warn); }
.ov-check-when { color: var(--muted); }
/* A saved brief's other formats sit beside its name, quieter than it. */
.ov-copies { display: inline-flex; gap: var(--s3); margin-left: var(--s2); font-size: var(--t-meta); font-weight: 400; }
/* The same view for a script. */
.ov-foot { margin: 0; font-size: var(--t-meta); }
.ov-foot a { color: var(--muted); }

@container (max-width: 30rem) {
  .ov-priority { padding-left: var(--s4); }
  .ov-kpis { grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); }
  .ov-plot { grid-template-columns: var(--s6) minmax(0, 1fr); }
  .ov-end { display: none; }
  .ov-dates { padding-right: 0; }
  .ov-verified a { margin-left: 0; }
  .ov-register :is(th, td) { padding-inline: var(--s1); }
  .ov-register th { white-space: normal; }
  .ov-register td:first-child a { white-space: nowrap; }
}
