html {
  --night:#152940; --ink:#182a40; --muted:#526579; --line:#cdd6df; --canvas:#f5f7f9; --soft:#eaf0f6; --blue:#194e9a; --bolt:#ffcf38;
  --lumo-font-family:"Segoe UI",Inter,sans-serif; --lumo-primary-color:var(--blue); --lumo-primary-text-color:var(--blue);
  --lumo-body-text-color:var(--ink); --lumo-header-text-color:var(--ink); --lumo-border-radius-m:4px;
}
body { margin:0; background:var(--canvas); }
.shell { min-height:100vh; display:grid; grid-template-columns:218px minmax(0,1fr); }
.navigation { display:flex; flex-direction:column; gap:3px; padding:25px 12px 14px; color:white; background:var(--night); }
.brand { display:flex; align-items:center; gap:8px; margin:0 10px 30px; }
.brand > vaadin-icon { color:var(--bolt); width:24px; height:28px; }
.wordmark { font-size:23px; letter-spacing:.1em; font-weight:750; }
.nav { display:flex; align-items:center; gap:12px; padding:10px 13px; color:#dbe5f2; border-inline-start:3px solid transparent; }
.nav:hover,.nav.active { text-decoration:none; color:white; background:#243d5b; }
.nav.active { border-color:#87b2f0; }
.nav vaadin-icon,.logout vaadin-icon { width:16px; height:16px; }
.mobile-menu,.logout { color:white; }
.mobile-menu { display:none; }
.account { display:flex; flex-wrap:wrap; align-items:center; justify-content:space-between; gap:8px; margin-top:auto; padding:12px; border-top:1px solid #435468; }
.main-panel { box-sizing:border-box; min-width:0; width:min(100%,1440px); margin:0 auto; padding:clamp(18px,3.5vw,54px); overflow-wrap:anywhere; }
.page-head,.table-head,.setup,.plan-caption,.overview-section-head { display:flex; flex-wrap:wrap; align-items:center; justify-content:space-between; gap:12px; }
.page-head { padding-bottom:18px; margin-bottom:22px; border-bottom:1px solid var(--line); }
.title { flex:1 1 220px; min-width:0; }
.title h1,.login-panel h1 { font-size:clamp(28px,3vw,42px); margin:0; letter-spacing:-.045em; line-height:1.1; }
.title p { color:var(--muted); margin:6px 0 0; }
.section-symbol { display:none; }
vaadin-button { font-weight:620; }
.setup { margin-bottom:18px; border-left:3px solid var(--blue); padding:12px 16px; background:#eaf1fa; }
.setup h3,.empty h3 { margin:0 0 3px; font-size:1rem; }
.setup-copy span,.empty span { font-size:.88rem; }
.registry,.manual-article,.plan-frame { background:white; border-top:2px solid var(--night); border-bottom:1px solid var(--line); }
.registry { min-width:0; container:registry / inline-size; }
.table-head { padding:15px 18px; border-bottom:1px solid var(--line); }
.table-head h2,.plan-caption h2,.overview-section-head h2 { margin:0; font-size:1.22rem; letter-spacing:-.03em; }
.registry-title,.registry-tools,.map-legend { display:flex; align-items:center; gap:10px; flex-wrap:wrap; min-width:0; }
.registry-count { font: .84rem Consolas,monospace; color:var(--muted); }
.registry-tools vaadin-text-field { width:clamp(165px,20vw,290px); max-width:100%; padding:0; }
.registry vaadin-grid::part(header-cell) { background:var(--soft); font-weight:650; }
.registry vaadin-grid::part(body-cell) { border-color:var(--line); }
.registry > p,.trend-period { margin:12px 18px; font-size:.85rem; color:var(--muted); }
.registry-mobile,.history-list { display:none; }
.registry-mobile > vaadin-button { margin:10px 14px; }
.empty { display:grid; gap:4px; padding:24px 18px; color:var(--muted); justify-items:start; }
.empty vaadin-icon { color:var(--muted); width:20px; height:20px; }
.badge { font-size:.8rem; color:var(--muted); }
.badge.on { color:#19613f; }
.record-detail,.sample-kind { display:block; color:var(--muted); font-size:.83rem; }
.dialog-fields { display:flex; flex-direction:column; width:min(420px,72vw); gap:8px; }
.form-error { display:block; color:#982c22; margin-top:10px; }
.relay-fields { display:grid; grid-template-columns:repeat(auto-fit,minmax(min(100%,200px),1fr)); gap:4px 16px; }
.relay-notes { display:grid; gap:4px; }
.relay-fields > *,.relay-notes > * { width:100%; min-width:0; }
vaadin-dialog-overlay::part(footer) { border-top:1px solid var(--line); background:var(--canvas); }
.login-screen { box-sizing:border-box; min-height:100dvh; padding:18px; display:grid; place-items:center; }
.login-layout { width:min(100%,820px); display:grid; grid-template-columns:1fr 1fr; border:1px solid var(--line); }
.login-identity,.login-panel { padding:clamp(22px,4vw,44px); }
.login-identity { background:var(--night); color:white; }
.login-identity .brand { margin:0; }
.login-identity h2 { color:white; letter-spacing:-.04em; font-size:clamp(28px,3.5vw,45px); line-height:1.05; margin:58px 0 10px; }
.login-panel { background:white; }
.login-panel h1 { font-size:1.65rem; }
.login-panel vaadin-login-form { width:100%; margin-top:16px; }
vaadin-login-form-wrapper::part(form) { padding:0; }
.manual-body { display:grid; grid-template-columns:minmax(175px,230px) minmax(0,1fr); gap:20px; align-items:start; }
.manual-index { display:grid; gap:3px; }
.manual-index h2 { font-size:1rem; }
.manual-index a { padding:6px 10px; color:var(--ink); }
.manual-index a[aria-current="page"] { background:var(--soft); color:var(--blue); font-weight:650; }
.manual-toggle { display:none; }
.manual-article { padding:clamp(18px,3vw,35px); overflow-wrap:anywhere; }
.manual-article > h2 { margin-top:0; }
.manual-article p,.manual-article li,.manual-article dl { max-width:75ch; line-height:1.6; }
.manual-article dt { font-weight:650; }
.manual-article dd { margin:0 0 12px; }
.manual-article code { background:var(--soft); padding:0 3px; }
.back-link { display:inline-block; margin-bottom:12px; font-size:.86rem; }
.reading-trends { margin-bottom:20px; }
.trend-period,.trend-range { display:block; }
.trend-grid { display:grid; grid-template-columns:repeat(auto-fit,minmax(min(100%,320px),1fr)); gap:16px; padding:12px 18px 20px; }
.trend-card { min-width:0; border:1px solid var(--line); padding:12px; }
.trend-card h3 { margin:0; font-size:1rem; }
.trend-value,.trend-axis { display:flex; justify-content:space-between; flex-wrap:wrap; gap:4px; align-items:baseline; }
.trend-value { margin:6px 0 14px; }
.measure,.sample-time,.sample-value,.overview-value { font-family:Consolas,ui-monospace,monospace; font-variant-numeric:tabular-nums; }
.measure { font-size:1.65rem; font-weight:650; }
.trend-axis,.trend-range,.measure-period { font-size:.8rem; color:var(--muted); }
.trend-plot { height:122px; background:repeating-linear-gradient(to top,var(--line) 0 1px,transparent 1px 25%); }
.trend-plot svg { width:100%; height:100%; overflow:visible; }
.trend-plot path { fill:none; stroke:var(--blue); stroke-width:2; vector-effect:non-scaling-stroke; }
.trend-plot circle { fill:var(--blue); }
.trend-card:nth-child(even) .trend-plot path { stroke:#845121; }
.trend-card:nth-child(even) .trend-plot circle { fill:#845121; }
.plan-tools,.plan-caption { padding:12px 16px; background:white; }
.plan-tools { display:flex; flex-wrap:wrap; align-items:end; gap:8px 18px; margin:8px 0 15px; }
.plan-tools > *,.plan-switcher { max-width:100%; }
.plan-tools p { margin:0; font-size:.86rem; color:var(--muted); }
.plan-board { position:relative; isolation:isolate; overflow:hidden; border:1px solid var(--line); background:white; }
zeus-plan-canvas { display:block; }
.plan-pin { position:absolute; z-index:1; transform:translate(-50%,-50%); width:26px; height:26px; cursor:pointer; border:2px solid white; border-radius:50%; background:var(--blue); color:white; font-size:0; box-shadow:0 0 0 1px var(--night); }
.plan-pin::before { content:''; display:block; width:6px; height:6px; margin:auto; background:white; border-radius:50%; }
.plan-pin:focus-visible,.plan-pin:hover { outline:3px solid #954312; }
.plan-board:not(:has(zeus-plan-canvas[ready])) .plan-pin { visibility:hidden; }
.plan-pin.relay-pin { background:#814d19; border-radius:4px; }
.plan-pin.relay-pin::before { border-radius:1px; width:10px; height:3px; }
.map-legend { color:var(--muted); font-size:.8rem; }
.map-legend span::before { content:''; display:inline-block; width:9px; height:9px; background:var(--blue); border-radius:50%; margin-right:5px; }
.map-legend .relay-key::before { background:#814d19; border-radius:1px; }
.overview-links { display:flex; flex-wrap:wrap; gap:0 20px; border-bottom:1px solid var(--line); }
.overview .page-head { border:0; padding:0; margin-bottom:8px; }
.overview-links > * { padding:8px 0; }
.overview-links [aria-current] { border-bottom:3px solid var(--blue); font-weight:650; }
.overview-notice { display:flex; gap:9px; align-items:center; margin:15px 0; padding:10px 12px; background:var(--soft); border-inline-start:3px solid var(--blue); }
.overview-notice vaadin-icon { width:16px; height:16px; flex:none; }
.overview .setup { margin:14px 0; }
.overview-section { margin:20px 0; }
.overview-section-head { margin-bottom:8px; }
.overview-section-head a { font-size:.86rem; }
.overview-lines { border-top:2px solid var(--night); background:white; }
.overview-row,.overview-outcome { padding:12px 15px; border-bottom:1px solid var(--line); }
.overview-row { display:grid; grid-template-columns:minmax(0,1fr) minmax(0,auto); gap:10px; }
.overview-name a,.record-name { font-weight:650; }
.overview-name h3 { margin:0; font-size:1rem; }
.overview-value { text-align:right; }
.sample-value { font-weight:650; }
.sample-line { display:flex; gap:8px; justify-content:space-between; padding:3px 0; }
.sample-line span:last-child { text-align:right; font-variant-numeric:tabular-nums; }
.sample-phase h4 { margin:8px 0 2px; }
@container registry (max-width:54rem) {
  .registry-results > vaadin-grid,.history-results > vaadin-grid { display:none; }
  .registry-mobile,.history-list { display:block; }
  .record-card { display:grid; grid-template-columns:minmax(0,1fr) auto; align-items:start; gap:4px 10px; padding:12px 16px; border-bottom:1px solid var(--line); overflow-wrap:anywhere; }
  .record-symbol { display:none; }
  .record-body { display:grid; gap:3px; }
  .record-body a { font-weight:650; }
  .record-card > .record-detail { grid-column:1/-1; }
  .record-card vaadin-button { margin:0; justify-self:start; }
  .table-head,.registry-tools { align-items:flex-start; }
  .history-list vaadin-details { margin:0; border-bottom:1px solid var(--line); padding:0 14px; }
  .history-list vaadin-details-summary { min-height:44px; }
  .sample-summary { display:flex; flex-wrap:wrap; align-items:baseline; gap:2px 8px; overflow-wrap:anywhere; }
  .sample-time { font-size:.87rem; }
  .sample-body { padding:4px 0; }
}
@media(max-width:760px) {
  .shell { display:block; }
  .main-panel { padding:19px 14px; }
  .navigation { display:grid; grid-template-columns:repeat(2,minmax(0,1fr)); padding:10px 14px; }
  .brand,.account { grid-column:1/-1; margin:0; }
  .mobile-menu { display:inline-flex; margin:0 0 0 auto; background:transparent; }
  .navigation:not(.expanded) > :not(.brand) { display:none; }
  .page-head,.table-head,.setup { gap:9px; }
  .table-head { padding:12px 14px; }
  .registry-tools { width:100%; }
  .registry-tools vaadin-text-field { width:100%; }
  .manual-body { display:block; }
  .manual-toggle { display:inline-flex; }
  .manual-index { display:none; margin:8px 0; }
  .manual-index.opened { display:grid; }
  .manual-index h2 { display:none; }
  .login-layout { max-width:430px; grid-template-columns:1fr; }
  .login-identity h2 { margin-top:22px; }
}

.current-site { display:block; padding:6px 12px; color:#dce8fa; font-size:.84rem; overflow-wrap:anywhere; }
.site-row { background:white; border-bottom:1px solid var(--line); padding:14px; display:flex; gap:10px; align-items:center; flex-wrap:wrap; }
.site-name { flex:1 1 180px; }
.site-name h3 { margin:0; }
