/* Home "at a glance" band (home-horizon.js). UI standard: 12-20px type, 4px grid, 32px controls (44px touch), 8px cards.
   Lane tints are neutral (teal, slate, violet) so red, orange and blue stay reserved for Priority. */
/* Same width as the home hero (home-workspace.css), so the band lines up with the hero and the update list. */
.hg-band { max-width: 1680px; margin: 16px auto 8px; padding: 0 24px; box-sizing: border-box; overflow-x: clip; display: grid; grid-template-columns: minmax(0, 1fr); gap: 16px; align-items: start; }
.hg-band[hidden] { display: none; }
.hg-card { background: var(--panel); border: 1px solid var(--line); border-radius: 8px; padding: 16px; min-width: 0; box-sizing: border-box; color: var(--ink); }
.hg-head { display: flex; align-items: center; gap: 8px; min-height: 28px; }
.hg-head h2 { margin: 0; font: 600 20px/28px var(--display, "Outfit", system-ui, sans-serif); color: var(--ink); }
.hg-ctl { display: flex; align-items: center; gap: 8px; flex-wrap: wrap; min-height: 32px; margin: 4px 0 8px; }
.hg-sub { font-size: 12px; line-height: 16px; color: var(--muted); }
.hg-spacer { flex: 1 1 auto; }
.hg-band a.hg-link, .hg-band button.hg-linkbtn { all: unset; cursor: pointer; font-size: 13px; line-height: 18px; font-weight: 600; color: var(--brand); white-space: nowrap; }
.hg-band a.hg-link:hover, .hg-band button.hg-linkbtn:hover { text-decoration: underline; }
.hg-band :is(a, button):focus-visible { outline: 3px solid var(--brand); outline-offset: 2px; border-radius: 4px; }
.hg-seg { display: inline-flex; border: 1px solid var(--line); border-radius: 6px; overflow: hidden; }
.hg-seg button { all: unset; box-sizing: border-box; cursor: pointer; height: 28px; padding: 0 10px; font-size: 13px; line-height: 18px; font-weight: 600; color: var(--brand); display: inline-flex; align-items: center; background: var(--panel); }
.hg-seg button + button { border-left: 1px solid var(--line); }
.hg-seg button[aria-pressed="true"] { background: var(--brand); color: #fff; }
.hg-band a.hz-btn { all: unset; box-sizing: border-box; cursor: pointer; display: inline-flex; align-items: center; height: 28px; padding: 0 10px; border-radius: 6px; border: 1px solid #848f9b; background: var(--panel); color: var(--brand); font-size: 13px; font-weight: 600; white-space: nowrap; }

/* Lane colours */
.l-std { --lane-bg: #e3eff2; --lane-fg: #0f4c5c; --lane-bd: #9cc3cd; }
.l-com { --lane-bg: #eef1f4; --lane-fg: #334155; --lane-bd: #c3ccd6; }
.l-pf  { --lane-bg: #f3effc; --lane-fg: #5b21b6; --lane-bd: #cdbdf0; }
.l-std-bar, .l-std-edge { --lane-edge: #5f9fb0; } .l-com-bar, .l-com-edge { --lane-edge: #7b8794; } .l-pf-bar, .l-pf-edge { --lane-edge: #8b6fd6; }

/* Timeline */
.hz-grid { display: grid; grid-template-columns: 184px minmax(0, 1fr); }
.hz-axis { position: relative; height: 20px; border-bottom: 1px solid var(--line); }
.hz-month { position: absolute; top: 0; padding-left: 4px; font-size: 12px; line-height: 16px; font-weight: 600; color: var(--muted); white-space: nowrap; }
.hz-lane-label { display: flex; flex-direction: column; justify-content: center; align-items: flex-start; gap: 2px; padding: 0 8px; border-left: 4px solid var(--lane-edge); border-bottom: 1px solid var(--line); font-size: 13px; line-height: 18px; font-weight: 600; }
.hz-track { position: relative; border-bottom: 1px solid var(--line); min-height: 44px; }
.hz-gl { position: absolute; top: 0; bottom: 0; width: 1px; background: var(--line); }
.hz-now { position: absolute; top: 0; bottom: 0; width: 2px; margin-left: -1px; background: var(--brand); pointer-events: none; }
.hz-now { font-style: normal; }
.hz-now span { font-style: normal; position: absolute; top: -20px; left: 4px; height: 18px; padding: 0 6px; border-radius: 999px; background: var(--brand); color: #fff; font-size: 12px; line-height: 18px; font-weight: 600; white-space: nowrap; }
.hg-band button.hz-pill { all: unset; box-sizing: border-box; position: absolute; z-index: 1; height: 28px; padding: 0 8px; border-radius: 6px; border: 1px solid var(--lane-bd); background: var(--lane-bg); color: var(--lane-fg); box-shadow: 0 0 0 2px var(--panel);
  font: 600 12px/26px var(--text, "Nunito Sans", system-ui, sans-serif); font-variant-numeric: tabular-nums; white-space: nowrap; cursor: pointer; }
.hg-band button.hz-pill.past { background: var(--panel); }
.hg-band button.hz-pill.more { border-style: dashed; }
.hg-band button.hz-pill.sel { outline: 2px solid var(--brand); outline-offset: 1px; }
.hg-band button.hz-pill:focus-visible { outline: 3px solid var(--brand); outline-offset: 2px; z-index: 2; }
.hz-empty { margin: 0; padding: 12px 8px; font-size: 13px; line-height: 18px; color: var(--muted); }
.hz-note { display: flex; align-items: center; gap: 12px; flex-wrap: wrap; padding: 8px; font-size: 13px; line-height: 18px; color: var(--muted); }
.hz-note b { color: var(--ink); font-weight: 600; }

/* Detail */
.hz-detail { margin-top: 12px; padding: 12px; border: 1px solid var(--line); border-left: 4px solid var(--lane-edge); border-radius: 8px; background: color-mix(in srgb, var(--bg) 60%, var(--panel)); display: grid; grid-template-columns: minmax(0, 1fr) auto; gap: 4px 16px; }
.hz-detail:focus { outline: none; } .hz-detail:focus-visible { outline: 3px solid var(--brand); outline-offset: 2px; }
body .hg-band .hz-detail h3, body.ui-scale main .hg-band .hz-detail h3 { margin: 0; font: 600 16px/24px var(--text, "Nunito Sans", system-ui, sans-serif); }
body .hg-band .hz-detail .meta, body.ui-scale main .hg-band .hz-detail .meta { margin: 0; font-size: 13px; line-height: 18px; color: var(--muted); }
.hz-detail .acts { display: flex; align-items: center; gap: 12px; }
body .hg-band .hz-detail ul, body.ui-scale main .hg-band .hz-detail ul { grid-column: 1 / -1; margin: 4px 0 0; padding-left: 18px; font-size: 13px; line-height: 18px; }
.hz-detail li { margin: 0 0 4px; }
.hg-band button.hz-x { all: unset; cursor: pointer; width: 28px; height: 28px; text-align: center; line-height: 28px; border-radius: 6px; color: var(--muted); font-size: 18px; }
.hz-items { grid-column: 1 / -1; margin: 4px 0; padding-left: 0; list-style: none; font-size: 13px; line-height: 18px; }
.hz-items li { padding: 4px 0; border-top: 1px solid var(--line); }
.hz-items .d { display: inline-block; min-width: 48px; font-weight: 600; font-variant-numeric: tabular-nums; }
.hz-items a { color: var(--brand); } .hz-items small { color: var(--muted); font-size: 12px; }
.hz-foot { margin: 8px 0 0; font-size: 12px; line-height: 16px; color: var(--muted); }

/* List view and phone agenda */
body .hg-band h3.hz-month-h, body.ui-scale main .hg-band h3.hz-month-h { margin: 8px 0 0; padding: 4px 0; font: 700 12px/16px var(--text, "Nunito Sans", system-ui, sans-serif); letter-spacing: .06em; text-transform: uppercase; color: var(--muted); }
.hz-rows { list-style: none; margin: 0; padding: 0; }
.hz-rows > li { border-top: 1px solid var(--line); }
.hz-rows .hz-detail { margin: 0 0 8px; }
.hg-band button.hz-row { all: unset; box-sizing: border-box; cursor: pointer; display: grid; grid-template-columns: 56px minmax(0, 1fr); gap: 8px; align-items: center; width: 100%; min-height: 36px; padding: 6px 0; font-size: 14px; line-height: 20px; }
.hz-row .d { font-size: 13px; font-weight: 600; font-variant-numeric: tabular-nums; }
.hz-row .t > span:first-child { display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; }
.hz-row .t { display: flex; flex-wrap: wrap; align-items: center; gap: 4px 8px; }
.hz-lane-chip { display: inline-flex; align-items: center; height: 22px; padding: 0 8px; border-radius: 999px; border: 1px solid var(--lane-bd); background: var(--lane-bg); color: var(--lane-fg); font-size: 12px; line-height: 16px; font-weight: 600; white-space: nowrap; }
.hz-phone summary { display: flex; align-items: center; gap: 8px; min-height: 44px; cursor: pointer; list-style: none; }
.hz-phone summary::-webkit-details-marker { display: none; }
.hz-phone summary::after { content: "⌄"; margin-left: auto; color: var(--brand); font-weight: 700; }
.hz-phone[open] summary::after { content: "⌃"; }
.hz-sum-t { font: 600 16px/24px var(--display, "Outfit", system-ui, sans-serif); white-space: nowrap; }
.hz-sum-s { min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; font-size: 13px; line-height: 18px; color: var(--muted); }
.hg-band button.hz-more-btn { all: unset; box-sizing: border-box; cursor: pointer; display: flex; justify-content: center; align-items: center; width: 100%; min-height: 44px; margin-top: 8px; border: 1px solid #848f9b; border-radius: 6px; color: var(--brand); font-size: 14px; font-weight: 600; }
.hz-cal { display: inline-block; margin-top: 12px; }

/* Tabs (Coming up · 90 days | This week by regulator) */
.hg-tabs { display: flex; gap: 16px; min-width: 0; }
.hg-band button.hg-tab { all: unset; box-sizing: border-box; cursor: pointer; height: 32px; padding: 0 2px; border-bottom: 2px solid transparent; font: 600 16px/28px var(--display, "Outfit", system-ui, sans-serif); color: var(--muted); white-space: nowrap; }
.hg-band button.hg-tab[aria-selected="true"] { color: var(--ink); border-bottom-color: var(--brand); }
.hg-band button.hg-tab:hover { color: var(--ink); }

/* Regulator map (home-map.js). Priority colours only: red critical, orange high, blue medium, grey low/info. */
.hm { --t-critical: var(--safety, #c0392b); --t-high: var(--inspection, #92400e); --t-medium: #2563a8; --t-low: #6b7785; --t-informational: #6b7785; }
.hm .t-critical { --t: var(--t-critical); } .hm .t-high { --t: var(--t-high); } .hm .t-medium { --t: var(--t-medium); } .hm .t-low, .hm .t-informational { --t: var(--t-low); }
.hm-chips button { gap: 6px; }
.hm-n { font-size: 12px; font-weight: 600; font-variant-numeric: tabular-nums; opacity: .8; }
.hm-body { display: grid; grid-template-columns: minmax(0, 1fr) 280px; gap: 16px; align-items: start; }
.hm-svg { display: block; width: 100%; height: auto; max-height: 380px; }
.hm-land { fill: color-mix(in srgb, var(--line) 70%, var(--panel)); stroke: var(--panel); stroke-width: .6; }
.hm-mk { cursor: pointer; outline: none; }
.hm-mk circle { fill: var(--t); stroke: var(--panel); stroke-width: 1.5; }
.hm-mk:hover circle { stroke: var(--ink); }
.hm-mk.sel circle, .hm-mk:focus-visible circle { fill: var(--t); stroke: var(--ink); stroke-width: 2.5; }
.hm-cnt { fill: #fff; font: 700 12px/1 var(--text, "Nunito Sans", system-ui, sans-serif); text-anchor: middle; pointer-events: none; }
.hm-lbl { fill: var(--ink); font: 600 12px/1 var(--text, "Nunito Sans", system-ui, sans-serif); paint-order: stroke; stroke: var(--panel); stroke-width: 3px; pointer-events: none; }
.hm-side { min-width: 0; padding: 12px; border: 1px solid var(--line); border-radius: 8px; background: color-mix(in srgb, var(--bg) 60%, var(--panel)); }
.hm-side:focus { outline: none; } .hm-side:focus-visible { outline: 3px solid var(--brand); outline-offset: 2px; }
body .hg-band .hm-side h3, body.ui-scale main .hg-band .hm-side h3 { margin: 0; font: 600 16px/24px var(--text, "Nunito Sans", system-ui, sans-serif); }
.hm-side-h { display: flex; align-items: center; justify-content: space-between; gap: 8px; }
body .hg-band .hm-side .meta { margin: 0 0 8px; font-size: 13px; line-height: 18px; color: var(--muted); }
.hm-side .hg-sub { margin: 8px 0 0; }
.hm-top, .hm-latest { list-style: none; margin: 8px 0 0; padding: 0; }
.hg-band button.hm-place { all: unset; box-sizing: border-box; cursor: pointer; display: flex; align-items: center; gap: 8px; width: 100%; min-height: 32px; font-size: 13px; line-height: 18px; border-top: 1px solid var(--line); }
.hm-place .nm { flex: 1 1 auto; min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.hm-place .ct { font-weight: 600; font-variant-numeric: tabular-nums; }
.hm-dot { display: inline-block; flex: none; width: 10px; height: 10px; border-radius: 50%; background: var(--t); }
.hm-latest li { display: grid; gap: 2px; padding: 4px 0; border-top: 1px solid var(--line); font-size: 13px; line-height: 18px; }
.hm-latest a { color: var(--brand); display: -webkit-box; -webkit-line-clamp: 1; -webkit-box-orient: vertical; overflow: hidden; }
.hm-latest small { color: var(--muted); font-size: 12px; }
.hm-tier { justify-self: start; display: inline-flex; align-items: center; height: 22px; padding: 0 8px; border-radius: 999px; border: 1px solid var(--t); color: var(--t); font-size: 12px; line-height: 16px; font-weight: 600; white-space: nowrap; }
.hm-side .acts { display: flex; flex-wrap: wrap; gap: 8px 16px; margin: 0 0 4px; }
.hm-legend { display: flex; flex-wrap: wrap; align-items: center; gap: 4px 12px; }
.hm-legend > span { display: inline-flex; align-items: center; gap: 4px; }
.hm-legend > span:last-child { flex-basis: 100%; }
.hg-band button.hm-place:hover .nm { color: var(--brand); text-decoration: underline; }
.hg-band .hm-phone a.hz-row { grid-template-columns: 40px minmax(0, 1fr); }
.hg-band a.hz-row { all: unset; box-sizing: border-box; cursor: pointer; display: grid; grid-template-columns: 56px minmax(0, 1fr); gap: 8px; align-items: center; width: 100%; min-height: 44px; padding: 6px 0; font-size: 14px; line-height: 20px; }
.hz-phone + .hz-phone { border-top: 1px solid var(--line); }
@media (max-width: 1100px) { .hm-body { grid-template-columns: minmax(0, 1fr); } }


@media (max-width: 640px) {
  .hg-band { margin: 12px auto 4px; padding: 0 12px; gap: 12px; }
  .hg-band .hg-card.hz { padding: 0 12px; }
  .hg-band button.hz-row { min-height: 44px; }
}
@media (pointer: coarse) { .hg-seg button, .hg-band a.hz-btn, .hg-band button.hg-tab, .hg-band button.hm-place { min-height: 44px; } }
.hz-phone a.hz-cal { display: inline-flex; align-items: center; min-height: 44px; margin: 4px 0 8px; }
/* dark theme: html[data-theme=dark], or the device setting when nothing is saved */
  :where([data-theme="dark"]) .l-std { --lane-bg: #1b2e35; --lane-fg: #9fd3e0; --lane-bd: #2f5561; }
  :where([data-theme="dark"]) .l-com { --lane-bg: #222a33; --lane-fg: #cbd5e1; --lane-bd: #3a4652; }
  :where([data-theme="dark"]) .l-pf { --lane-bg: #2a2340; --lane-fg: #c4b5fd; --lane-bd: #4c3d7a; }
  :where([data-theme="dark"]) .hz-now span { color: #0f1418; }
  :where([data-theme="dark"]) .hm { --t-medium: #6ea8e8; --t-low: #7d8a96; --t-informational: #7d8a96; }
@media (prefers-color-scheme: dark){
  :where(:not([data-theme])) .l-std { --lane-bg: #1b2e35; --lane-fg: #9fd3e0; --lane-bd: #2f5561; }
  :where(:not([data-theme])) .l-com { --lane-bg: #222a33; --lane-fg: #cbd5e1; --lane-bd: #3a4652; }
  :where(:not([data-theme])) .l-pf { --lane-bg: #2a2340; --lane-fg: #c4b5fd; --lane-bd: #4c3d7a; }
  :where(:not([data-theme])) .hz-now span { color: #0f1418; }
  :where(:not([data-theme])) .hm { --t-medium: #6ea8e8; --t-low: #7d8a96; --t-informational: #7d8a96; }
}
.hg-band button.hz-morelink { font-size: 12px; line-height: 16px; }
/* Events & Training: the same band inside the page column, under the view links. */
#events-glance.hg-band { max-width: none; margin: 12px 0 16px; padding: 0; }
.hz-teaser { display: flex; align-items: center; gap: 8px; flex-wrap: wrap; min-height: 32px; margin: 0; font-size: 13px; line-height: 18px; }
#events-glance .hg-card:has(> .hz-teaser) { padding: 8px 16px; }
