﻿/* station.css — the station desk: the shell and the design tokens of SLog's everyday (non-contest) pages.
   ONE token set (the --sd-* variables), light and dark; every logbook page is built from these and nothing else.
   Every rule is scoped to the .station shell (MainLayout) or to its own lb-/op-/lg- classes: the contest workspace
   has its own layout and skins, uses none of these classes, and is not touched by this file.
   Palette (six named colours): Ink #18222D · Logsheet #EEF2F0 · Slate #233140 · Dial amber #E3A02B ·
   Carrier blue #2A6DB0 · Confirmed green #2E8B5A; brick red #B5392C is functional (refusals, delete) only. */

/* ---- type: self-hosted, OFL (wwwroot/fonts) ---- */
@font-face { font-family: "Source Sans 3"; font-weight: 400; font-style: normal; font-display: swap;
  src: url("../fonts/source-sans-3-latin-400-normal.woff2") format("woff2");
  unicode-range: U+0000-00FF,U+0131,U+0152-0153,U+02BB-02BC,U+02C6,U+02DA,U+02DC,U+0304,U+0308,U+0329,U+2000-206F,U+20AC,U+2122,U+2191,U+2193,U+2212,U+2215,U+FEFF,U+FFFD; }
@font-face { font-family: "Source Sans 3"; font-weight: 600; font-style: normal; font-display: swap;
  src: url("../fonts/source-sans-3-latin-600-normal.woff2") format("woff2");
  unicode-range: U+0000-00FF,U+0131,U+0152-0153,U+02BB-02BC,U+02C6,U+02DA,U+02DC,U+0304,U+0308,U+0329,U+2000-206F,U+20AC,U+2122,U+2191,U+2193,U+2212,U+2215,U+FEFF,U+FFFD; }
@font-face { font-family: "Source Sans 3"; font-weight: 400; font-style: normal; font-display: swap;
  src: url("../fonts/source-sans-3-latin-ext-400-normal.woff2") format("woff2");
  unicode-range: U+0100-02BA,U+02BD-02C5,U+02C7-02CC,U+02CE-02D7,U+02DD-02FF,U+1D00-1DBF,U+1E00-1E9F,U+1EF2-1EFF,U+2020,U+20A0-20AB,U+20AD-20C0,U+2113,U+2C60-2C7F,U+A720-A7FF; }
@font-face { font-family: "Source Sans 3"; font-weight: 600; font-style: normal; font-display: swap;
  src: url("../fonts/source-sans-3-latin-ext-600-normal.woff2") format("woff2");
  unicode-range: U+0100-02BA,U+02BD-02C5,U+02C7-02CC,U+02CE-02D7,U+02DD-02FF,U+1D00-1DBF,U+1E00-1E9F,U+1EF2-1EFF,U+2020,U+20A0-20AB,U+20AD-20C0,U+2113,U+2C60-2C7F,U+A720-A7FF; }
@font-face { font-family: "Source Sans 3"; font-weight: 400; font-style: normal; font-display: swap;
  src: url("../fonts/source-sans-3-cyrillic-400-normal.woff2") format("woff2");
  unicode-range: U+0301,U+0400-045F,U+0490-0491,U+04B0-04B1,U+2116; }
@font-face { font-family: "Source Sans 3"; font-weight: 600; font-style: normal; font-display: swap;
  src: url("../fonts/source-sans-3-cyrillic-600-normal.woff2") format("woff2");
  unicode-range: U+0301,U+0400-045F,U+0490-0491,U+04B0-04B1,U+2116; }
@font-face { font-family: "Atkinson Hyperlegible Mono"; font-weight: 400; font-style: normal; font-display: swap;
  src: url("../fonts/atkinson-hyperlegible-mono-latin-400-normal.woff2") format("woff2");
  unicode-range: U+0000-00FF,U+0131,U+0152-0153,U+02BB-02BC,U+02C6,U+02DA,U+02DC,U+0304,U+0308,U+0329,U+2000-206F,U+20AC,U+2122,U+2191,U+2193,U+2212,U+2215,U+FEFF,U+FFFD; }
@font-face { font-family: "Atkinson Hyperlegible Mono"; font-weight: 700; font-style: normal; font-display: swap;
  src: url("../fonts/atkinson-hyperlegible-mono-latin-700-normal.woff2") format("woff2");
  unicode-range: U+0000-00FF,U+0131,U+0152-0153,U+02BB-02BC,U+02C6,U+02DA,U+02DC,U+0304,U+0308,U+0329,U+2000-206F,U+20AC,U+2122,U+2191,U+2193,U+2212,U+2215,U+FEFF,U+FFFD; }
@font-face { font-family: "Atkinson Hyperlegible Mono"; font-weight: 400; font-style: normal; font-display: swap;
  src: url("../fonts/atkinson-hyperlegible-mono-latin-ext-400-normal.woff2") format("woff2");
  unicode-range: U+0100-02BA,U+02BD-02C5,U+02C7-02CC,U+02CE-02D7,U+02DD-02FF,U+1E00-1E9F,U+1EF2-1EFF,U+2020,U+20A0-20AB,U+20AD-20C0,U+2113,U+2C60-2C7F,U+A720-A7FF; }
@font-face { font-family: "Atkinson Hyperlegible Mono"; font-weight: 700; font-style: normal; font-display: swap;
  src: url("../fonts/atkinson-hyperlegible-mono-latin-ext-700-normal.woff2") format("woff2");
  unicode-range: U+0100-02BA,U+02BD-02C5,U+02C7-02CC,U+02CE-02D7,U+02DD-02FF,U+1E00-1E9F,U+1EF2-1EFF,U+2020,U+20A0-20AB,U+20AD-20C0,U+2113,U+2C60-2C7F,U+A720-A7FF; }

/* ---- tokens: light (default) ---- */
:root {
  --sd-ink: #18222D;
  --sd-logsheet: #EEF2F0;
  --sd-slate: #233140;
  --sd-amber: #E3A02B;
  --sd-blue: #2A6DB0;
  --sd-green: #2E8B5A;
  --sd-red: #B5392C;

  --sd-page: var(--sd-logsheet);
  --sd-panel: #F9FBFA;
  --sd-sunken: #E2E8E5;
  --sd-rule: #CAD3CE;
  --sd-rule-strong: #98A7A0;
  --sd-text: var(--sd-ink);
  --sd-text-2: #4D5C66;
  --sd-bar: var(--sd-slate);
  --sd-bar-text: #E6ECEF;
  --sd-bar-text-2: #A9B7C2;
  --sd-field: #FFFFFF;

  --sd-accent: var(--sd-amber);
  --sd-accent-text: #7F5300;      /* amber as text on a light ground */
  --sd-accent-wash: #FAEED3;
  --sd-action: var(--sd-blue);
  --sd-action-text: #1F5C99;
  --sd-action-wash: #DEE9F5;
  --sd-ok-text: #1E6A42;
  --sd-ok-wash: #D9EEE2;
  --sd-ok: var(--sd-green);
  /* The green behind white text (the LoTW chip): darkened so small bold text reads at 4.5:1 or better (L6). */
  --sd-ok-solid: color-mix(in srgb, var(--sd-green) 85%, #000);
  --sd-bad-text: #9C2E22;
  --sd-bad-wash: #F6DEDA;
  --sd-bad: var(--sd-red);
  --sd-worked: #7C8A93;           /* worked, nothing new: neutral, never a colour */
  --sd-focus: #B26F00;

  --sd-sans: "Source Sans 3", "Segoe UI", system-ui, sans-serif;
  --sd-mono: "Atkinson Hyperlegible Mono", "Cascadia Mono", Consolas, monospace;
  --sd-fs-label: 12.5px;
  --sd-fs: 15px;
  --sd-fs-h: 18px;
  --sd-fs-call: 26px;
  --sd-radius: 4px;
  --sd-bar-h: 44px;
}

/* ---- tokens: dark (the switch, or the system when the switch was never used) ---- */
:root[data-theme="dark"] {
  --sd-page: var(--sd-ink);
  --sd-panel: var(--sd-slate);
  --sd-sunken: #1D2935;
  --sd-rule: #36475B;
  --sd-rule-strong: #54677E;
  --sd-text: #E6ECEF;
  --sd-text-2: #A4B2BE;
  --sd-bar: var(--sd-slate);
  --sd-bar-text: #E6ECEF;
  --sd-bar-text-2: #A9B7C2;
  --sd-field: #18222D;

  --sd-accent-text: #F0BA52;
  --sd-accent-wash: #3F3620;
  --sd-action-text: #7FB2E3;
  --sd-action-wash: #213A55;
  --sd-ok-text: #74C99C;
  --sd-ok-wash: #1E3B2F;
  --sd-bad-text: #F09184;
  --sd-bad-wash: #48241F;
  --sd-worked: #8494A0;
  --sd-focus: var(--sd-amber);
}

/* ---- the shell ---- */
body:has(> .station) { background: var(--sd-page); }

.station { color-scheme: light; }
:root[data-theme="dark"] .station { color-scheme: dark; }

.station {
  min-height: 100vh;
  display: flex;
  flex-direction: column;
  background: var(--sd-page);
  color: var(--sd-text);
  font-family: var(--sd-sans);
  font-size: var(--sd-fs);
  line-height: 1.4;
  font-variant-numeric: tabular-nums;

  /* Bootstrap's own variables follow the tokens, so the pages still built from Bootstrap (QSL, billing, account,
     voice) sit in the same shell in both themes. */
  --bs-body-bg: var(--sd-page);
  --bs-body-color: var(--sd-text);
  --bs-body-font-family: var(--sd-sans);
  --bs-secondary-color: var(--sd-text-2);
  --bs-border-color: var(--sd-rule);
  --bs-link-color-rgb: 42, 109, 176;
  --bs-emphasis-color: var(--sd-text);
  --bs-tertiary-bg: var(--sd-sunken);
  --bs-secondary-bg: var(--sd-sunken);
  --bs-card-bg: var(--sd-panel);
}

.station a { color: var(--sd-action-text); }
.station ::selection { background: var(--sd-accent); color: var(--sd-ink); }

/* Visible keyboard focus, everywhere, the same. */
.station :focus-visible {
  outline: 2px solid var(--sd-focus);
  outline-offset: 1px;
  box-shadow: none;
}

.st-bar {
  position: sticky; top: 0; z-index: 30;
  display: flex; align-items: center; gap: 4px;
  height: var(--sd-bar-h); padding: 0 16px;
  background: var(--sd-bar); color: var(--sd-bar-text);
  border-bottom: 1px solid var(--sd-rule-strong);
}
.st-brand {
  display: inline-flex; flex-direction: column; justify-content: center; line-height: 1.05;
  font-weight: 600; font-size: 17px; letter-spacing: .01em; color: var(--sd-bar-text) !important; text-decoration: none; margin-right: 14px;
}
.st-brand b { color: var(--sd-amber); font-weight: 600; }
/* The release under the wordmark (UX B1): SlogBuildInfo.Version, the one source. */
.st-ver { font-size: 10px; font-weight: 500; letter-spacing: .03em; color: var(--sd-bar-text-2); font-family: var(--sd-mono); }
.st-nav { display: flex; align-items: stretch; height: 100%; gap: 2px; overflow-x: auto; scrollbar-width: none; }
.st-nav a {
  display: flex; align-items: center; padding: 0 11px; white-space: nowrap;
  color: var(--sd-bar-text-2); text-decoration: none; border-bottom: 3px solid transparent; border-top: 3px solid transparent;
}
.st-nav a:hover { color: var(--sd-bar-text); }
.st-nav a.active { color: var(--sd-bar-text); border-bottom-color: var(--sd-amber); }
.st-bar :focus-visible { outline-color: var(--sd-amber); outline-offset: -3px; }
.st-tools { margin-left: auto; display: flex; align-items: center; gap: 12px; white-space: nowrap; }
.st-clock { font-family: var(--sd-mono); font-size: 15px; color: var(--sd-bar-text); }
.st-clock-u { font-size: var(--sd-fs-label); color: var(--sd-bar-text-2); margin-left: 4px; }
.st-tool {
  background: transparent; color: var(--sd-bar-text-2); border: 1px solid transparent; border-radius: var(--sd-radius);
  font: inherit; font-size: 14px; padding: 3px 8px; cursor: pointer; text-decoration: none; list-style: none;
}
.st-tool:hover { color: var(--sd-bar-text); border-color: var(--sd-rule-strong); }
.st-tool::-webkit-details-marker { display: none; }
.st-menu { position: relative; }
.st-menu-list {
  position: absolute; right: 0; top: calc(100% + 6px); min-width: 150px; margin: 0; padding: 4px; list-style: none;
  background: var(--sd-panel); border: 1px solid var(--sd-rule-strong); border-radius: var(--sd-radius); z-index: 40;
}
.st-menu-list a { display: block; padding: 4px 10px; color: var(--sd-text); text-decoration: none; border-radius: 3px; }
.st-menu-list a:hover { background: var(--sd-sunken); }
.st-menu-list a.active { font-weight: 600; box-shadow: inset 3px 0 0 var(--sd-accent); }
/* The open contest (UX B2): a live dot and its name in the Contest item; on a phone the dot on the Menu button. */
.st-live { display: inline-flex; align-items: center; gap: 5px; margin-left: 7px; max-width: 14em; color: var(--sd-bar-text); font-size: 12.5px; }
.st-live-name { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.st-live-dot { display: inline-block; flex: none; width: 8px; height: 8px; border-radius: 50%; background: var(--sd-amber); box-shadow: 0 0 0 0 var(--sd-amber); animation: st-live-pulse 2s ease-out infinite; }
@keyframes st-live-pulse { from { box-shadow: 0 0 0 0 color-mix(in srgb, var(--sd-amber) 60%, transparent); } to { box-shadow: 0 0 0 6px transparent; } }
/* The Menu button: only on a phone. */
.st-nav-toggle { display: none; align-items: center; gap: 6px; }
.st-burger, .st-burger::before, .st-burger::after { display: block; width: 14px; height: 2px; background: currentColor; border-radius: 1px; }
.st-burger { position: relative; }
.st-burger::before, .st-burger::after { content: ""; position: absolute; left: 0; }
.st-burger::before { top: -5px; }
.st-burger::after { top: 5px; }
/* The account menu: the callsign, the station's setup, theme, language, log out. */
.st-account-btn { display: inline-flex; align-items: center; gap: 4px; }
.st-call { font-family: var(--sd-mono); color: var(--sd-bar-text); font-weight: 700; }
.st-caret { font-size: 11px; }
.st-account-list { min-width: 220px; padding: 6px; }
.st-who { color: var(--sd-text-2, var(--sd-text)); font-size: 13px; padding: 4px 10px 6px; border-bottom: 1px solid var(--sd-rule); margin-bottom: 4px; overflow: hidden; text-overflow: ellipsis; }
.st-unverified-help { display: block; font-size: 12px; padding: 0 10px 6px; color: var(--sd-action-text); }
.st-account-links { list-style: none; margin: 0; padding: 0 0 4px; border-bottom: 1px solid var(--sd-rule); }
.st-account-row { padding: 4px 4px 0; }
.st-account-list .st-tool { color: var(--sd-text); width: 100%; text-align: left; }
.st-account-list .st-tool:hover { border-color: var(--sd-rule-strong); }
.st-langs { padding: 4px 0; border-bottom: 1px solid var(--sd-rule); }
.st-langs-h { display: block; padding: 2px 10px; font-size: var(--sd-fs-label); color: var(--sd-text-2, var(--sd-text)); text-transform: uppercase; letter-spacing: .05em; }
.st-langs ul { list-style: none; margin: 0; padding: 0; display: grid; grid-template-columns: 1fr 1fr; }
.st-langs a { display: block; padding: 3px 10px; color: var(--sd-text); text-decoration: none; border-radius: 3px; }
.st-langs a:hover { background: var(--sd-sunken); }
.st-langs a.active { font-weight: 600; box-shadow: inset 3px 0 0 var(--sd-accent); }
.st-flag { font-size: var(--sd-fs-label); color: var(--sd-ink); background: var(--sd-amber); border-radius: 3px; padding: 0 5px; margin-left: 6px; white-space: nowrap; flex: 0 0 auto; }
.st-theme-ico { display: inline-block; width: 12px; height: 12px; border-radius: 50%; border: 1.5px solid currentColor; background: linear-gradient(90deg, currentColor 50%, transparent 50%); vertical-align: -1px; margin-right: 6px; }

.st-main { flex: 1; width: 100%; max-width: 2200px; padding: 14px 18px 28px; }
.station h1 { font-size: 22px; font-weight: 600; margin: 0; }
.station h1:focus { outline: none; }
.station h2 { font-size: var(--sd-fs-h); font-weight: 600; margin: 0; }

.station ~ #blazor-error-ui {
  color-scheme: light only; background: lightyellow; color: #18222D; bottom: 0; box-sizing: border-box; display: none; left: 0;
  padding: 0.6rem 1.25rem 0.7rem 1.25rem; position: fixed; width: 100%; z-index: 1000;
}
.station ~ #blazor-error-ui .dismiss { cursor: pointer; position: absolute; right: 0.75rem; top: 0.5rem; }

/* ---- shared pieces of the logbook pages ---- */
.lb-head { display: flex; align-items: center; gap: 12px; flex-wrap: wrap; margin-bottom: 12px; }
.lb-head .lb-spacer { flex: 1; }
.lb-sub { color: var(--sd-text-2); margin: 2px 0 12px; max-width: 78ch; }
.lb-mono { font-family: var(--sd-mono); }
.lb-muted { color: var(--sd-text-2); }
.lb-label { display: block; font-size: var(--sd-fs-label); color: var(--sd-text-2); margin-bottom: 2px; white-space: nowrap; }

.lb-btn {
  display: inline-flex; align-items: center; gap: 6px; font: inherit; font-size: 14px; line-height: 1.2; cursor: pointer;
  padding: 6px 12px; border-radius: var(--sd-radius); border: 1px solid var(--sd-rule-strong);
  background: var(--sd-panel); color: var(--sd-text) !important; text-decoration: none; white-space: nowrap;
}
.lb-btn:hover { border-color: var(--sd-text-2); }
.lb-btn.is-primary { background: var(--sd-action); border-color: var(--sd-action); color: #fff !important; font-weight: 600; }
.lb-btn.is-primary:hover { filter: brightness(1.08); }
.lb-btn.is-danger { color: var(--sd-bad-text) !important; border-color: var(--sd-bad); }
.lb-btn.is-danger.is-armed { background: var(--sd-bad); color: #fff !important; }
.lb-btn.is-quiet { border-color: transparent; background: transparent; color: var(--sd-action-text) !important; padding-left: 6px; padding-right: 6px; }
.lb-btn.is-quiet:hover { border-color: var(--sd-rule-strong); }
.lb-btn:disabled, .lb-btn.is-disabled { opacity: .55; cursor: default; }
.lb-btn.is-disabled { pointer-events: none; }
.lb-btn kbd { font-family: var(--sd-mono); font-size: 12px; background: transparent; color: inherit; opacity: .75; padding: 0; }

.lb-in, .lb-sel {
  font: inherit; font-size: var(--sd-fs); color: var(--sd-text); background: var(--sd-field);
  border: 1px solid var(--sd-rule-strong); border-radius: var(--sd-radius); padding: 4px 7px; width: 100%; min-width: 0; height: 32px;
}
.lb-in::placeholder { color: var(--sd-text-2); opacity: .8; }
.lb-in.is-data { font-family: var(--sd-mono); }
.lb-in.is-call { font-family: var(--sd-mono); text-transform: uppercase; }
.lb-in.is-call::placeholder { text-transform: none; font-family: var(--sd-sans); }
.lb-in:disabled, .lb-sel:disabled, .lb-in[readonly] { background: var(--sd-sunken); color: var(--sd-text); opacity: 1; border-style: dashed; }
.lb-in:focus-visible, .lb-sel:focus-visible { outline: 2px solid var(--sd-focus); outline-offset: 0; border-color: var(--sd-focus); }

.lb-note { border-left: 4px solid var(--sd-rule-strong); background: var(--sd-panel); padding: 7px 12px; margin: 8px 0; border-radius: 0 var(--sd-radius) var(--sd-radius) 0; }
.lb-note.is-refusal { border-left-color: var(--sd-bad); background: var(--sd-bad-wash); color: var(--sd-bad-text); }
.lb-note.is-warn { border-left-color: var(--sd-accent); background: var(--sd-accent-wash); }
.lb-note.is-ok { border-left-color: var(--sd-ok); background: var(--sd-ok-wash); }
.lb-note b, .lb-note strong { font-weight: 600; }

.lb-panel { background: var(--sd-panel); border: 1px solid var(--sd-rule); border-radius: var(--sd-radius); min-width: 0; overflow-x: auto; }
.lb-panel .lb-table td, .lb-panel .lb-table th { padding-left: 6px; padding-right: 6px; }
.lb-panel .lb-table td:first-child, .lb-panel .lb-table th:first-child { padding-left: 12px; }
.lb-panel .lb-table tr:last-child td { border-bottom: 0; }
.lb-panel-h { display: flex; align-items: baseline; gap: 10px; padding: 7px 12px; border-bottom: 1px solid var(--sd-rule); }
.lb-panel-h h2 { font-size: var(--sd-fs); font-weight: 600; }
.lb-panel-h .lb-muted { font-size: var(--sd-fs-label); }
.lb-panel-b { padding: 10px 12px; }
.lb-empty { color: var(--sd-text-2); padding: 10px 12px; margin: 0; }

/* The log table: dense, ruled like a log sheet, numbers and calls in the mono face. */
.lb-table { width: 100%; border-collapse: collapse; font-size: var(--sd-fs); }
.lb-table th {
  text-align: left; font-weight: 400; font-size: var(--sd-fs-label); color: var(--sd-text-2); white-space: nowrap;
  padding: 5px 8px; border-bottom: 1px solid var(--sd-rule-strong); background: var(--sd-panel);
}
.lb-table td { padding: 0 8px; height: 30px; border-bottom: 1px solid var(--sd-rule); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; max-width: 22ch; }
.lb-table td.is-wide { max-width: 34ch; }
.lb-table td.is-rest { width: 100%; max-width: 0; }   /* takes what is left of the row and cuts with an ellipsis */
.lb-table td.is-data, .lb-table td.is-call { font-family: var(--sd-mono); font-size: 14.5px; }
.lb-table td.is-call { font-weight: 700; }
.lb-table tbody tr:hover td { background: var(--sd-sunken); }
.lb-table tr.is-selected td { background: var(--sd-accent-wash); }
.lb-table tr.is-open td { box-shadow: inset 0 1px 0 var(--sd-accent), inset 0 -1px 0 var(--sd-accent); }
.lb-table th button { all: unset; cursor: pointer; color: inherit; }
.lb-table th button:hover { color: var(--sd-text); }
.lb-table th button:focus-visible { outline: 2px solid var(--sd-focus); outline-offset: 2px; }
.lb-table th .lb-sorted { color: var(--sd-text); font-weight: 600; }
.lb-table input[type="checkbox"] { width: 15px; height: 15px; accent-color: var(--sd-blue); vertical-align: -2px; }
.lb-rowbtn { all: unset; cursor: pointer; font-family: var(--sd-mono); font-weight: 700; color: var(--sd-text); }
.lb-rowbtn:hover { text-decoration: underline; }
.lb-rowbtn:focus-visible { outline: 2px solid var(--sd-focus); outline-offset: 2px; }

/* QSL chips: one letter-pair per channel; outline = sent, filled green = confirmed. */
.lb-chips { display: inline-flex; gap: 3px; vertical-align: middle; }
.lb-chip {
  font-family: var(--sd-sans); font-size: 11.5px; line-height: 16px; padding: 0 5px; border-radius: 3px; cursor: default;
  border: 1px solid var(--sd-rule); color: var(--sd-worked);
}
.lb-chip.is-sent { border-color: var(--sd-rule-strong); color: var(--sd-text); }
.lb-chip.is-cfm { background: var(--sd-ok-solid); border-color: var(--sd-ok-solid); color: #fff; font-weight: 600; }

/* The verdict: words first, colour second. Amber = you want this. */
.lb-verdict { display: inline-block; font-weight: 600; padding: 2px 10px; border-radius: 3px; border: 1px solid transparent; }
.lb-verdict.v-new { background: var(--sd-amber); color: var(--sd-ink); }
.lb-verdict.v-band, .lb-verdict.v-slot { background: var(--sd-accent-wash); border-color: var(--sd-amber); color: var(--sd-accent-text); }
.lb-verdict.v-mode { background: var(--sd-action-wash); border-color: var(--sd-blue); color: var(--sd-action-text); }
.lb-verdict.v-worked { background: var(--sd-sunken); color: var(--sd-text-2); border-color: var(--sd-rule-strong); }
.lb-verdict.v-cfm { background: var(--sd-ok-wash); color: var(--sd-ok-text); border-color: var(--sd-ok); }

/* ---- Operate ---- */
.op-rig { display: flex; align-items: flex-end; gap: 10px; flex-wrap: wrap; padding: 0 2px 10px; }
.op-rig .op-f { width: 9.5em; }
.op-rig .op-f.is-freq { width: 11em; }
.op-rig .op-f.is-freq .lb-in { font-family: var(--sd-mono); font-size: 18px; font-weight: 700; height: 36px; }
.op-rig .op-f .lb-sel { height: 36px; }
.op-link { display: inline-flex; align-items: center; gap: 7px; height: 36px; color: var(--sd-text-2); font-size: 14px; }
.op-lamp { width: 9px; height: 9px; border-radius: 50%; background: transparent; border: 1.5px solid var(--sd-worked); }
.op-link.is-up .op-lamp { background: var(--sd-ok); border-color: var(--sd-ok); }
.op-link.is-up { color: var(--sd-ok-text); }
.op-time { margin-left: auto; text-align: right; color: var(--sd-text-2); font-size: 14px; line-height: 1.3; }
.op-time b { font-family: var(--sd-mono); font-weight: 400; color: var(--sd-text); font-size: 15px; }

/* The entry line — the one bold element: a ruled line of the log, the call large over an amber rule. */
.op-line {
  display: grid; grid-template-columns: minmax(11em, 1.5fr) 4.6em 4.6em minmax(7em, 1.1fr) minmax(8em, 1.3fr) 6.6em minmax(10em, 2.2fr) auto;
  gap: 0 10px; align-items: end;
  background: var(--sd-panel); border: 1px solid var(--sd-rule); border-bottom: 3px solid var(--sd-amber);
  border-radius: var(--sd-radius) var(--sd-radius) 0 0; padding: 10px 12px 12px;
}
.op-line .lb-in { border-width: 0 0 1px 0; border-radius: 0; background: transparent; padding-left: 2px; height: 36px; font-size: 17px; }
.op-line .lb-in:focus-visible { outline: none; border-bottom: 2px solid var(--sd-focus); background: var(--sd-accent-wash); }
.op-line .op-call .lb-in { font-size: var(--sd-fs-call); font-weight: 700; height: 44px; letter-spacing: .02em; }
.op-line .lb-btn { height: 36px; }
.op-line .lb-in.is-data::placeholder { color: var(--sd-text); opacity: .55; }
.op-under { min-height: 40px; }
.op-under .lb-note { margin-top: 0; border-radius: 0 0 var(--sd-radius) var(--sd-radius); }
.op-keys { color: var(--sd-text-2); font-size: var(--sd-fs-label); padding: 6px 2px 0; }
.op-keys kbd { font-family: var(--sd-mono); font-size: 12px; background: var(--sd-sunken); color: var(--sd-text); border: 1px solid var(--sd-rule); border-radius: 3px; padding: 0 4px; }

/* The FT8 / FT4 data window on the desk (FA): the contest's window and its one layout (data-window.css), given the
   station's palette here — no rule of its layout is repeated. */
.op-data { margin-top: 8px; border: 1px solid var(--sd-rule); border-radius: var(--sd-radius); background: var(--sd-panel); overflow: hidden; }
.op-data .datamode {
  --d-bg: var(--sd-panel); --d-bar: var(--sd-sunken); --d-field: var(--sd-field); --d-text: var(--sd-text); --d-muted: var(--sd-text-2);
  --d-dim: var(--sd-worked); --d-line: var(--sd-rule); --d-edge: var(--sd-rule-strong); --d-ctl: var(--sd-field); --d-ctl-text: var(--sd-text);
  --d-radius: var(--sd-radius); --d-accent: var(--sd-action-text); --d-tx: var(--sd-accent-text); --d-tx-bg: var(--sd-accent-wash);
  --d-sent: var(--sd-accent-text); --d-new: var(--sd-action-text); --d-mult: var(--sd-accent-text); --d-dupe: var(--sd-worked);
  --d-other: var(--sd-action-text); --d-worked: var(--sd-ok-text); --d-cq: var(--sd-ok-wash); --d-forme: var(--sd-bad-wash);
  --d-forme-edge: var(--sd-bad); --d-problem-bg: var(--sd-bad-wash); --d-problem: var(--sd-bad-text); --d-font: 14px;
  --d-mono: var(--sd-mono); --d-sans: var(--sd-sans);
  min-height: 360px; background: var(--d-bg);
}
.op-data .datamode .ph { display: flex; align-items: center; gap: 8px; padding: 6px 10px; background: var(--sd-bar); color: var(--sd-bar-text); font-family: var(--sd-sans); font-size: var(--sd-fs-label); }
.op-data .datamode .ph .ttl { font-weight: 600; }
.op-data .datamode .ph .meta { margin-left: auto; color: var(--sd-bar-text-2); }
.op-data .datamode .ph .dot { width: 8px; height: 8px; border-radius: 50%; background: var(--sd-ok); }
.op-data .datamode .ph .dot.amber { background: var(--sd-accent); }

.op-desk { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1fr) 300px; gap: 12px; align-items: start; margin-top: 4px; }
.op-desk .op-spots { grid-column: 3; grid-row: 1 / span 2; }
.op-lookup-main { display: flex; align-items: baseline; gap: 10px; flex-wrap: wrap; }
.op-prefix { font-family: var(--sd-mono); font-weight: 700; font-size: 20px; border: 1.5px solid var(--sd-text); border-radius: 3px; padding: 0 7px; line-height: 1.35; }
.op-entity { font-size: 20px; font-weight: 600; }
.op-facts { display: grid; grid-template-columns: repeat(4, auto); gap: 6px 22px; margin: 10px 0 0; justify-content: start; }
.op-facts dt { font-size: var(--sd-fs-label); color: var(--sd-text-2); font-weight: 400; }
.op-facts dd { margin: 0; font-family: var(--sd-mono); font-size: 17px; }
.op-facts dd small { font-family: var(--sd-sans); font-size: var(--sd-fs-label); color: var(--sd-text-2); }
.op-callbook { margin: 10px 0 0; padding-top: 8px; border-top: 1px solid var(--sd-rule); }
.op-verdict-row { display: flex; align-items: center; gap: 10px; margin-top: 10px; flex-wrap: wrap; }

.wb { border-collapse: collapse; }
.wb th { font-weight: 400; font-size: var(--sd-fs-label); color: var(--sd-text-2); padding: 2px 3px; text-align: center; font-family: var(--sd-mono); }
.wb th[scope="row"] { text-align: left; padding-right: 10px; font-family: var(--sd-sans); }
.wb td { padding: 2px; }
.wb-cell { display: block; width: 30px; height: 22px; border-radius: 3px; border: 1px solid var(--sd-rule); position: relative; }
.wb-cell.e-worked { background: var(--sd-worked); border-color: var(--sd-worked); }
.wb-cell.e-cfm { background: var(--sd-ok); border-color: var(--sd-ok); }
.wb-cell.c-worked::after, .wb-cell.c-cfm::after {
  content: ""; position: absolute; inset: 5px 9px; border-radius: 50%; background: var(--sd-panel);
}
.wb-cell.c-cfm::after { inset: 4px 8px; box-shadow: 0 0 0 1.5px var(--sd-panel); background: var(--sd-ink); }
.wb-cell.is-here { outline: 2px solid var(--sd-amber); outline-offset: 1px; }
.wb th.is-here { color: var(--sd-accent-text); font-weight: 700; }
.wb-legend { display: flex; gap: 14px; flex-wrap: wrap; margin-top: 10px; font-size: var(--sd-fs-label); color: var(--sd-text-2); }
.wb-legend span { display: inline-flex; align-items: center; gap: 5px; }
.wb-legend .wb-cell { width: 18px; height: 14px; display: inline-block; }
.wb-legend .wb-cell.c-worked::after { inset: 3px 5px; }

.op-spots .lb-table td { max-width: 11ch; }
.op-spot { all: unset; cursor: pointer; display: block; width: 100%; }
.op-spots tr.is-click { cursor: pointer; }
.op-spots-scroll { max-height: 520px; overflow-y: auto; }

/* ---- Logbook list ---- */
.lg-filter { display: grid; grid-template-columns: 11em 7em 8em 10em 10em 12em 15.5em 13em auto; gap: 8px; align-items: end; margin-bottom: 8px; }
/* A contact made unattended (FT8 / FT4 Auto, FA-4): a small badge beside the call. */
.lg-auto-badge { margin-left: 6px; padding: 0 4px; border-radius: 3px; font-size: 10px; font-weight: 700; letter-spacing: .04em;
  color: var(--sd-accent-text); background: var(--sd-accent-wash); vertical-align: middle; }
.lg-filter .lg-count { justify-self: end; color: var(--sd-text-2); white-space: nowrap; padding-bottom: 6px; }
.lg-count b { font-family: var(--sd-mono); color: var(--sd-text); font-weight: 700; }
.lg-bar { display: flex; align-items: center; gap: 10px; flex-wrap: wrap; min-height: 36px; margin-bottom: 6px; }
.lg-bar .lb-sel { width: auto; }
.lg-selbar { display: flex; align-items: center; gap: 8px; flex-wrap: wrap; padding: 4px 10px; background: var(--sd-accent-wash); border: 1px solid var(--sd-amber); border-radius: var(--sd-radius); }
.lg-body { display: flex; gap: 12px; align-items: stretch; }
.lg-scroll { flex: 1; min-width: 0; height: calc(100vh - 236px); min-height: 300px; overflow: auto; background: var(--sd-panel); border: 1px solid var(--sd-rule); border-radius: var(--sd-radius); }
.lg-scroll .lb-table thead th { position: sticky; top: 0; z-index: 2; }
.lg-scroll .lb-table td { height: 30px; }
.lg-drawer {
  flex: 0 0 400px; max-width: 400px; background: var(--sd-panel); border: 1px solid var(--sd-rule-strong); border-top: 3px solid var(--sd-amber);
  border-radius: var(--sd-radius); padding: 12px 14px; height: calc(100vh - 236px); min-height: 300px; overflow-y: auto;
  animation: lg-drawer-in .14s ease-out;
}
@keyframes lg-drawer-in { from { transform: translateX(16px); opacity: 0; } to { transform: none; opacity: 1; } }
.lg-drawer-h { display: flex; align-items: center; gap: 8px; margin-bottom: 10px; }
.lg-drawer-h h2 { font-family: var(--sd-mono); font-size: 20px; font-weight: 700; flex: 1; }

/* ---- the contact's fields (edit page and drawer): the entry line's fields in the entry line's order ---- */
.qf { display: grid; grid-template-columns: repeat(12, minmax(0, 1fr)); gap: 10px 10px; }
.qf > div { grid-column: span 4; min-width: 0; }
.qf > .qf-2 { grid-column: span 2; }
.qf > .qf-3 { grid-column: span 3; }
.qf > .qf-6 { grid-column: span 6; }
.qf > .qf-8 { grid-column: span 8; }
.qf > .qf-12 { grid-column: span 12; }
.qf.is-narrow > div { grid-column: span 6; }
.qf.is-narrow > .qf-2, .qf.is-narrow > .qf-3 { grid-column: span 6; }
.qf.is-narrow > .qf-8, .qf.is-narrow > .qf-12 { grid-column: span 12; }
.qf-actions { display: flex; gap: 8px; align-items: center; margin-top: 14px; flex-wrap: wrap; }
.qf-check { display: flex; gap: 8px; align-items: flex-start; margin-top: 10px; }
.qf-check input { margin-top: 3px; accent-color: var(--sd-blue); }
.ed-wrap { max-width: 860px; }

/* ---- awards, map, import ---- */
.aw { display: grid; grid-template-columns: 9em minmax(0, 1fr) 7em; gap: 6px 14px; align-items: center; max-width: 900px; }
.aw-name { font-weight: 600; }
.aw-meter { height: 14px; background: var(--sd-sunken); border: 1px solid var(--sd-rule); border-radius: 2px; position: relative; overflow: hidden; }
.aw-meter i { position: absolute; left: 0; top: 0; bottom: 0; display: block; }
.aw-meter i.is-worked { background: var(--sd-worked); }
.aw-meter i.is-cfm { background: var(--sd-ok); }
.aw-num { font-family: var(--sd-mono); text-align: right; }
.aw-list { display: flex; flex-wrap: wrap; gap: 4px 6px; margin: 8px 0 22px; max-width: 1100px; }
.aw-list span { border: 1px solid var(--sd-rule); border-radius: 3px; padding: 0 6px; font-size: 14px; background: var(--sd-panel); }
.mp { max-width: 1280px; border: 1px solid var(--sd-rule-strong); border-radius: var(--sd-radius); overflow: hidden; background: var(--sd-panel); }
.mp svg { display: block; width: 100%; height: auto; }
.mp-sea { fill: #DCE8EE; } .mp-grat { stroke: #B4C8D3; } .mp-night { fill: var(--sd-ink); fill-opacity: .34; stroke: var(--sd-amber); }
.mp-dot { fill: var(--sd-blue); stroke: #fff; }
:root[data-theme="dark"] .mp-sea { fill: #1D2935; } :root[data-theme="dark"] .mp-grat { stroke: #36475B; }
:root[data-theme="dark"] .mp-night { fill: #0B1117; fill-opacity: .55; } :root[data-theme="dark"] .mp-dot { fill: #7FB2E3; stroke: var(--sd-ink); }
.im-form { display: flex; gap: 8px; align-items: center; flex-wrap: wrap; max-width: 640px; }
.im-form input[type="file"] { font: inherit; color: var(--sd-text); flex: 1; min-width: 16em; border: 1px dashed var(--sd-rule-strong); border-radius: var(--sd-radius); padding: 8px; background: var(--sd-panel); }

/* ---- the local-agent control (the contest's component, dressed for the station shell) ---- */
.station .agent-ctl { position: relative; font-family: var(--sd-sans); }
.station .agent-pill { display: inline-flex; align-items: center; gap: 7px; height: 36px; background: var(--sd-panel); border: 1px solid var(--sd-rule-strong); border-radius: var(--sd-radius); padding: 0 12px; color: var(--sd-text); cursor: pointer; font: inherit; font-size: 14px; }
.station .agent-lbl { font-size: 0; }
.station .agent-lbl::before { content: "Agent"; font-size: 14px; }
.station .agent-state { color: var(--sd-text-2); }
.station .agent-dot { width: 9px; height: 9px; border-radius: 50%; border: 1.5px solid var(--sd-worked); flex: 0 0 auto; }
.station .agent-ctl.is-connected .agent-dot, .station .agent-ctl.is-keying .agent-dot { background: var(--sd-ok); border-color: var(--sd-ok); }
.station .agent-ctl.is-connected .agent-state { color: var(--sd-ok-text); }
.station .agent-ctl.is-connecting .agent-dot { background: var(--sd-amber); border-color: var(--sd-amber); }
.station .agent-pop { position: absolute; top: 40px; left: 0; z-index: 25; width: 310px; max-height: calc(100vh - 160px); overflow-y: auto; background: var(--sd-panel); border: 1px solid var(--sd-rule-strong); border-radius: var(--sd-radius); padding: 12px; display: flex; flex-direction: column; gap: 9px; box-shadow: 0 10px 24px rgba(24, 34, 45, .28); }
.station .agent-pop-h, .station .agent-cfg-h { display: flex; align-items: center; justify-content: space-between; font-weight: 600; }
.station .agent-pop-close, .station .agent-cfg-refresh { background: transparent; border: 1px solid transparent; border-radius: 3px; color: var(--sd-text-2); cursor: pointer; font: inherit; font-size: 13px; padding: 1px 6px; }
.station .agent-pop-close:hover, .station .agent-cfg-refresh:hover { border-color: var(--sd-rule-strong); color: var(--sd-text); }
.station .agent-f { display: flex; flex-direction: column; gap: 2px; font-size: var(--sd-fs-label); color: var(--sd-text-2); }
.station .agent-f input, .station .agent-f select, .station .agent-f textarea { background: var(--sd-field); border: 1px solid var(--sd-rule-strong); border-radius: var(--sd-radius); color: var(--sd-text); font-family: var(--sd-mono); font-size: 13px; padding: 5px 8px; }
.station .agent-actions { display: flex; align-items: center; justify-content: space-between; gap: 10px; }
.station .agent-btn { border: 1px solid var(--sd-rule-strong); border-radius: var(--sd-radius); padding: 5px 14px; font: inherit; font-size: 14px; cursor: pointer; background: var(--sd-panel); color: var(--sd-text); }
.station .agent-btn.on { background: var(--sd-action); border-color: var(--sd-action); color: #fff; }
.station .agent-btn:disabled { opacity: .55; cursor: default; }
.station .agent-status-line { display: inline-flex; align-items: center; gap: 6px; font-size: var(--sd-fs-label); color: var(--sd-text-2); }
.station .agent-err, .station .agent-cfg-row.err { font-size: 13px; color: var(--sd-bad-text); background: var(--sd-bad-wash); border-left: 3px solid var(--sd-bad); padding: 5px 8px; }
.station .agent-cfg-row.ok { font-size: 13px; color: var(--sd-ok-text); background: var(--sd-ok-wash); border-left: 3px solid var(--sd-ok); padding: 5px 8px; }
.station .agent-help, .station .agent-cfg-wait, .station .agent-cat-civ { font-size: var(--sd-fs-label); color: var(--sd-text-2); margin: 0; }
.station .agent-help code { font-family: var(--sd-mono); color: var(--sd-text); }
.station .agent-setup-link { font-size: 13px; }
.station .agent-cfg { display: flex; flex-direction: column; gap: 9px; border-top: 1px solid var(--sd-rule); padding-top: 10px; }
.station .agent-cfg-results { display: flex; flex-direction: column; gap: 4px; }
.station .agent-cat-sep { margin-top: 8px; padding-top: 7px; border-top: 1px solid var(--sd-rule); font-weight: 600; font-size: 13px; }
.station .agent-hint { margin: -2px 0 6px; font-size: 12px; line-height: 1.35; color: var(--sd-muted, #666); }
.station .agent-check { display: flex; align-items: center; gap: 7px; font-size: 13px; color: var(--sd-text); }

/* ---- the start page (UX D1): next steps, the open contest, QSL cards to send, the agent, the latest contacts ---- */
.station .hm-steps { display: flex; gap: 8px; flex-wrap: wrap; }
.station .hm-grid { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 12px; }
.station .hm-recent { grid-column: 1 / -1; }
.station .hm-grid .lb-panel-b p { margin: 0 0 8px; }
.station .hm-live { display: flex; align-items: center; gap: 8px; font-weight: 600; }
.station .hm-actions { display: flex; gap: 8px; flex-wrap: wrap; }
.station .hm-agent-state { display: inline-flex; align-items: center; gap: 7px; font-weight: 600; }
.station .hm-agent-state.is-ok .st-agent-dot { background: var(--sd-green); }
.station .hm-agent-state.is-connecting .st-agent-dot { background: var(--sd-text-2); }
.station .hm-out { max-width: 40rem; padding-top: 24px; }
/* The operating page while a contest is open (UX D4): the intake's refusal up front, with the way to the contest. */
.station .op-contest-open { display: flex; align-items: center; gap: 12px; flex-wrap: wrap; margin-bottom: 10px; }

/* ---- responsive: down to a laptop (1366) and below ---- */
/* ---- the settings hub (UX B4): one page, one section per setting (SettingsCatalog), station controls only ---- */
.station .set-page { max-width: 980px; }
.station .set-toc { display: flex; flex-wrap: wrap; gap: 4px 6px; margin: 0 0 12px; }
.station .set-toc a { font-size: 13px; padding: 3px 9px; border: 1px solid var(--sd-rule-strong); border-radius: var(--sd-radius); color: var(--sd-text); text-decoration: none; background: var(--sd-panel); }
.station .set-toc a:hover { border-color: var(--sd-text-2); }
.station .set-sec { margin-bottom: 14px; scroll-margin-top: 60px; }
.station .set-sec .lb-sub { margin-top: 0; }
.station .set-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(200px, 1fr)); gap: 8px 12px; }
.station .set-f { display: flex; flex-direction: column; gap: 2px; min-width: 0; margin: 0 0 8px; }
.station .set-grid .set-f { margin: 0; }
.station .set-full { grid-column: 1 / -1; }
.station .set-area { height: auto; min-height: 52px; }
.station .set-upper { text-transform: uppercase; }
.station .set-hint { font-size: var(--sd-fs-label); margin: 4px 0 8px; }
.station .set-check { display: flex; align-items: center; gap: 7px; font-size: 14px; margin: 0 0 6px; }
.station .set-actions { display: flex; align-items: center; flex-wrap: wrap; gap: 8px; margin-top: 6px; }
.station .set-msg { font-size: 13px; }
.station .set-msg.is-ok { color: var(--sd-ok-text); }
.station .set-msg.is-bad { color: var(--sd-bad-text); }
.station .set-tag { display: inline-block; font-size: 12px; padding: 1px 7px; border-radius: 3px; border: 1px solid var(--sd-rule-strong); color: var(--sd-text-2); white-space: nowrap; }
.station .set-tag.is-ok { color: var(--sd-ok-text); border-color: var(--sd-ok); background: var(--sd-ok-wash); }
.station .set-tag.is-warn { color: var(--sd-bad-text); border-color: var(--sd-amber, var(--sd-bad)); }
.station .set-cards { display: grid; grid-template-columns: repeat(auto-fit, minmax(280px, 1fr)); gap: 12px; margin-bottom: 12px; }
.station .set-card { border: 1px solid var(--sd-rule); border-radius: var(--sd-radius); padding: 10px 12px; min-width: 0; }
.station .set-card h3, .station .set-h3 { font-size: 15px; font-weight: 600; margin: 0 0 4px; }
.station .set-h3 { margin-top: 16px; scroll-margin-top: 60px; }
.station .set-order { margin: 0 0 6px; padding-left: 1.6em; display: grid; gap: 4px; max-width: 24rem; }
.station .set-order li > span { display: inline-block; min-width: 9rem; }
.station .set-order .lb-btn { padding: 0 8px; height: 26px; margin-left: 4px; }
.station .set-card-h { display: flex; align-items: baseline; justify-content: space-between; gap: 8px; }
.station .station-form { max-width: 42rem; }
.station .set-scroll { overflow-x: auto; margin-bottom: 12px; }
.station .set-row-actions { text-align: right; white-space: nowrap; }
.station .set-row-actions .lb-btn { margin-left: 4px; }
.station .set-theme { color: var(--sd-text); border: 1px solid var(--sd-rule-strong); background: var(--sd-panel); border-radius: var(--sd-radius); height: 32px; padding: 0 12px; }
.station .set-appearance { display: flex; flex-wrap: wrap; align-items: flex-start; gap: 18px; }
.station .set-dl { display: grid; grid-template-columns: max-content 1fr; gap: 4px 14px; margin: 0; }
.station .set-dl dt { color: var(--sd-text-2); font-weight: 400; }
.station .set-dl dd { margin: 0; display: flex; flex-wrap: wrap; gap: 8px; align-items: baseline; }
.station .set-sec .cluster-form { display: flex; flex-direction: column; gap: 9px; max-width: 34rem; }
.station .set-sec .st-langs ul { display: flex; flex-wrap: wrap; gap: 4px 10px; list-style: none; padding: 0; margin: 2px 0 0; }

/* The QSL page (UX B5): station buttons; its fixed-size previews never push the page wider than a phone. */
.station .qsl-seg { display: inline-flex; gap: 4px; margin-bottom: 12px; flex-wrap: wrap; }
.station .qsl-preview-frame { max-width: 100%; }

@media (max-width: 1440px) {
  .op-desk { grid-template-columns: minmax(0, 1fr) minmax(0, 1fr) 270px; }
  .op-line { grid-template-columns: minmax(9.5em, 1.4fr) 4.2em 4.2em minmax(6em, 1fr) minmax(7em, 1.2fr) 6.2em minmax(8em, 1.8fr) auto; gap: 0 8px; }
  .lg-filter { grid-template-columns: 9em 6em 7em 9.6em 9.6em 10em 15em auto; }
  .lg-drawer { flex-basis: 360px; }
}
@media (max-width: 1180px) {
  .op-desk { grid-template-columns: minmax(0, 1fr) 270px; }
  .op-desk .op-spots { grid-column: 2; grid-row: 1 / span 4; }
  .op-line { grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 8px 10px; }
  .op-line .op-call { grid-column: span 2; }
  .op-line .op-comment { grid-column: span 3; }
  .lg-filter { grid-template-columns: repeat(4, minmax(0, 1fr)); }
  .lg-body { flex-direction: column; }
  .lg-drawer { flex-basis: auto; max-width: none; height: auto; order: -1; }
  .st-nav a { padding: 0 8px; }
  .st-live { max-width: 8em; }
}
@media (max-width: 760px) {
  .st-bar { padding: 0 8px; }
  .st-clock { display: none; }
  /* The items fold into the Menu button (UX B2): the same nav, opened under the bar. */
  .st-nav-toggle { display: inline-flex; }
  .st-nav { display: none; }
  .st-bar.is-menu-open .st-nav {
    display: flex; flex-direction: column; position: absolute; top: 100%; left: 0; right: 0; height: auto; gap: 0;
    background: var(--sd-bar); border-bottom: 1px solid var(--sd-rule-strong); padding: 4px 0 8px; box-shadow: 0 8px 18px rgba(0, 0, 0, .25);
  }
  .st-bar.is-menu-open .st-nav a { padding: 11px 18px; border: 0; border-left: 3px solid transparent; }
  .st-bar.is-menu-open .st-nav a.active { border-left-color: var(--sd-amber); }
  .st-live { max-width: none; }
  .st-tools { gap: 6px; }
  .st-agent-lbl { display: none; }
  .st-brand { margin-right: 6px; }
  .st-account-list { position: fixed; left: 8px; right: 8px; top: calc(var(--sd-bar-h) + 4px); min-width: 0; }
  .st-main { padding: 10px; }
  .op-desk { grid-template-columns: minmax(0, 1fr); }
  .op-desk .op-spots { grid-column: 1; grid-row: auto; }
  .op-line { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .op-line .op-comment { grid-column: span 2; }
  .lg-filter { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .qf > div, .qf > .qf-2, .qf > .qf-3 { grid-column: span 6; }
  .op-time { margin-left: 0; text-align: left; }
  .station .hm-grid { grid-template-columns: minmax(0, 1fr); }
}

/* ---- calm: no motion for those who ask for none ---- */
@media (prefers-reduced-motion: reduce) {
  .station *, .station *::before, .station *::after { animation: none !important; transition: none !important; scroll-behavior: auto !important; }
}

@media print {
  .st-bar { display: none; }
}

/* ===================== The local agent: header status icon and the version notice (ADR-20) ===================== */
/* The agent button is a connect/disconnect toggle (green on, red off, pulsing while it tries); the update marker sits
   beside it, apart (amber; its own link to the setup page); the pairing prompt drops below it. */
.st-agent-wrap { position: relative; display: inline-flex; align-items: center; gap: 4px; }
.st-agent { display: inline-flex; align-items: center; gap: 6px; color: var(--sd-bar-text-2); background: transparent; font: inherit; font-size: 14px;
  border: 1px solid transparent; border-radius: var(--sd-radius); padding: 3px 8px; cursor: pointer; }
.st-agent:hover { color: var(--sd-bar-text); border-color: var(--sd-rule-strong); }
.st-agent:focus-visible { outline: 2px solid var(--sd-amber); outline-offset: 1px; }
.st-agent-dot { width: 10px; height: 10px; border-radius: 50%; background: var(--sd-red); flex: 0 0 auto; }
.st-agent.is-ok .st-agent-dot { background: var(--sd-green); }
.st-agent.is-connecting .st-agent-dot { background: var(--sd-bar-text-2); animation: st-agent-pulse .6s ease-in-out infinite alternate; }
@keyframes st-agent-pulse { from { opacity: 1; } to { opacity: .25; } }
.st-bar a.st-agent-upd, .st-agent-upd { font-size: 11px; font-weight: 700; text-transform: uppercase; letter-spacing: .4px; line-height: 1;
  color: var(--sd-ink); background: var(--sd-amber); border-radius: var(--sd-radius); padding: 3px 5px; text-decoration: none; }
.st-agent-upd.is-required { box-shadow: 0 0 0 2px var(--sd-red); }
.st-agent-upd:hover, .st-agent-upd:focus-visible { filter: brightness(1.1); text-decoration: underline; }
/* The offline state beside it (ADR-26 §P1): green offline-ready, amber something to know (provisional, changes to send,
   the Sync inbox), grey not ready; a link to the Sync inbox, the reasons in its tooltip. */
.st-bar a.st-offline, .st-offline { font-size: 11px; font-weight: 600; line-height: 1; white-space: nowrap; text-decoration: none;
  border-radius: var(--sd-radius); padding: 3px 6px; border: 1px solid var(--sd-rule-strong); color: var(--sd-bar-text-2); }
.st-bar a.st-offline.is-ok, .st-offline.is-ok { border-color: var(--sd-green); color: var(--sd-green); }
.st-bar a.st-offline.is-warn, .st-offline.is-warn { background: var(--sd-amber); border-color: var(--sd-amber); color: var(--sd-ink); }
.st-offline.is-off { opacity: .85; }
.st-offline:hover, .st-offline:focus-visible { text-decoration: underline; }
.st-agent-pop { position: absolute; top: calc(100% + 6px); right: 0; width: 290px; z-index: 60; display: flex; flex-direction: column; gap: 9px;
  padding: 12px; background: var(--sd-panel); color: var(--sd-text); border: 1px solid var(--sd-rule-strong); border-radius: var(--sd-radius);
  box-shadow: 0 10px 28px rgba(0,0,0,.3); font-size: 13px; }
.st-agent-pop-h { display: flex; align-items: center; justify-content: space-between; font-weight: 700; }
.st-agent-pop-close { background: transparent; border: none; color: inherit; cursor: pointer; opacity: .7; }
.st-agent-pop-close:hover { opacity: 1; }
.st-agent-pop .agent-f { display: flex; flex-direction: column; gap: 3px; font-size: 12px; color: var(--sd-text-2); }
.st-agent-pop .agent-f input { background: var(--sd-field); color: var(--sd-text); border: 1px solid var(--sd-rule-strong); border-radius: var(--sd-radius);
  font-family: ui-monospace, monospace; font-size: 13px; padding: 5px 8px; }
.st-agent-pop .agent-actions { display: flex; align-items: center; justify-content: space-between; gap: 10px; }
.st-agent-pop .agent-btn { border: 1px solid var(--sd-rule-strong); border-radius: var(--sd-radius); padding: 5px 14px; font-weight: 600; cursor: pointer;
  background: var(--sd-action); color: #fff; }
.st-agent-pop .agent-btn.off { background: transparent; color: var(--sd-text); }
.st-agent-pop .agent-status-line { font-size: 12px; text-transform: uppercase; color: var(--sd-text-2); }
.st-agent-pop .agent-status-line .agent-dot { display: none; }
.st-agent-pop .agent-err { font-size: 12px; color: var(--sd-bad-text); border-left: 3px solid var(--sd-red); padding: 4px 8px; }
/* The pairing prompt (ADR-21): discovery message, code field, replace confirmation, agent address — header popup and pages. */
.st-agent-pop .agent-pairing, .station .agent-pairing { display: flex; flex-direction: column; gap: 9px; white-space: normal; }
.st-agent-pop .agent-pair, .station .agent-pair { display: flex; flex-direction: column; gap: 8px; align-items: flex-start; }
.st-agent-pop .agent-pair-msg, .station .agent-pair-msg { font-size: 13px; line-height: 1.4; color: var(--sd-text-2); overflow-wrap: anywhere; }
.st-agent-pop .agent-pair-code, .station .agent-pair-code { display: flex; align-items: flex-end; gap: 8px; margin: 0; width: 100%; }
.st-agent-pop .agent-pair-code .agent-f, .station .agent-pair-code .agent-f { flex: 1 1 auto; }
.st-agent-pop .agent-pair-code input, .station .agent-pair-code input { letter-spacing: 1px; text-transform: uppercase; }
.st-agent-pop .agent-adv summary, .station .agent-adv summary { cursor: pointer; font-size: 12px; color: var(--sd-text-2); }
.st-agent-pop .agent-err, .station .agent-pair .agent-err { white-space: normal; overflow-wrap: anywhere; }
.st-agent-pop .agent-setup-link { font-size: 12px; }
.station .agent-ver-note { display: flex; flex-wrap: wrap; align-items: baseline; gap: 4px 10px; font-size: 13px; line-height: 1.35;
  padding: 6px 30px 6px 9px; position: relative; border-left: 3px solid var(--sd-amber); background: color-mix(in srgb, var(--sd-amber) 16%, transparent); }
.station .agent-ver-note.is-required { border-left-color: var(--sd-red); background: color-mix(in srgb, var(--sd-red) 14%, transparent); }
.station .agent-ver-msg { flex: 1 1 14rem; }
.station .agent-ver-link { font-weight: 600; white-space: nowrap; }
.station .agent-ver-dismiss { position: absolute; top: 3px; right: 4px; background: transparent; border: none; cursor: pointer; color: inherit; opacity: .7; font-size: 12px; }
.station .agent-ver-dismiss:hover { opacity: 1; }
/* ADR-22 §6: Update now, its confirmation, the update's steps and outcome. */
.station .agent-ver-note.is-ok { border-left-color: var(--sd-green, #2DA44E); background: color-mix(in srgb, var(--sd-green, #2DA44E) 14%, transparent); }
.station .agent-ver-sub { flex: 1 1 100%; }
.station .agent-ver-sub code { overflow-wrap: anywhere; }
.station .agent-ver-update { border: 0; border-radius: 4px; padding: 1px 10px; font-weight: 600; background: var(--sd-amber); color: #1b1b1b; cursor: pointer; }
.station .agent-ver-update:disabled { opacity: .5; cursor: default; }
.station .agent-ver-cancel { background: transparent; border: 1px solid currentColor; border-radius: 4px; padding: 0 8px; color: inherit; opacity: .8; cursor: pointer; }
.station .agent-ver-line { font-size: 12px; opacity: .8; }
.station .agent-setup-ver .agent-ver-note { margin-bottom: 14px; }
/* Beside the connection control (station pages: /operate): a bubble under the pill while its popup is closed. */
.station .agent-ctl > .agent-ver-note { position: absolute; top: 40px; left: 0; z-index: 24; width: 300px; background: var(--sd-panel); color: var(--sd-text);
  box-shadow: 0 4px 14px rgba(0,0,0,.18); }
.station .agent-ctl.ver-update .agent-dot, .station .agent-ctl.ver-required .agent-dot { background: var(--sd-amber); border-color: var(--sd-amber); }

/* ---- the local-agent hardware setup: a microHAM-Router-style tabbed config window (ADR-23).
   ONE implementation (AgentHardwareWizard over its snapshot); the skin only styles it. Dense, utilitarian:
   a tab strip, the selected tab's fields in a panel, and a persistent Apply/Save bar. Tokens only. */
.station .hw-setup { font-size: 14px; }
.station .hw-setup .hw-tabs {
  display: flex; flex-wrap: wrap; gap: 2px; margin: 10px 0 0;
  border-bottom: 1px solid var(--sd-rule-strong);
}
.station .hw-setup .hw-tab {
  appearance: none; cursor: pointer; font-family: var(--sd-sans); font-size: 13px; font-weight: 600;
  color: var(--sd-text-2); background: var(--sd-sunken);
  border: 1px solid var(--sd-rule); border-bottom: none; border-radius: var(--sd-radius) var(--sd-radius) 0 0;
  padding: 5px 14px; margin-bottom: -1px; line-height: 1.2;
}
.station .hw-setup .hw-tab:hover { color: var(--sd-text); }
.station .hw-setup .hw-tab:focus-visible { outline: 2px solid var(--sd-focus); outline-offset: -2px; }
.station .hw-setup .hw-tab.is-on {
  color: var(--sd-text); background: var(--sd-panel);
  border-color: var(--sd-rule-strong); border-bottom: 1px solid var(--sd-panel);
}
.station .hw-setup .hw-panel {
  border: 1px solid var(--sd-rule-strong); border-top: none;
  background: var(--sd-panel); padding: 14px clamp(12px, 2vw, 18px);
}
/* The persistent STATUS bar (auto-apply, no Save button): the compact live-applied grid, then the apply outcome. */
.station .hw-setup .hw-statusbar {
  display: flex; flex-direction: column; gap: 6px;
  border: 1px solid var(--sd-rule); border-top: none; border-radius: 0 0 var(--sd-radius) var(--sd-radius);
  background: var(--sd-sunken); padding: 10px clamp(12px, 2vw, 18px);
}
.station .hw-setup .hw-status-lines {
  display: grid; grid-template-columns: auto 1fr; gap: 2px 12px;
  font-size: 12.5px; line-height: 1.4;
}
.station .hw-setup .hw-status-k { color: var(--sd-text-2); white-space: nowrap; }
.station .hw-setup .hw-status-v { color: var(--sd-text); font-family: var(--sd-mono); overflow-wrap: anywhere; }
.station .hw-setup .hw-applied { color: var(--sd-ok-text); font-size: 12.5px; }
.station .hw-setup .hw-applied.is-busy { opacity: .55; }
.station .hw-setup .hw-applied-tick { font-weight: 700; }
.station .hw-setup .hw-apply-error { color: var(--sd-bad-text); font-size: 12.5px; font-weight: 600; }
@media (max-width: 34rem) {
  .station .hw-setup .hw-status-lines { grid-template-columns: 1fr; gap: 0 0; }
  .station .hw-setup .hw-status-k { margin-top: 4px; }
}


/* ---- Virtual Cockpit (ADR-32): the operator-side remote-operate client, scoped to the station shell ---- */
.station .virtual-cockpit { display: flex; flex-direction: column; gap: 8px; padding: 12px 14px; border: 1px solid var(--sd-rule); border-radius: 10px; background: var(--sd-panel); color: var(--sd-text); font-size: 13px; max-width: 640px; }
.station .virtual-cockpit .vc-head { display: flex; align-items: center; gap: 10px; }
.station .virtual-cockpit .vc-title { font-weight: 700; }
.station .virtual-cockpit .vc-link { margin-left: auto; font-size: 11.5px; font-weight: 700; text-transform: uppercase; letter-spacing: .04em; padding: 2px 8px; border-radius: 999px; background: var(--sd-sunken); color: var(--sd-text-2); }
.station .virtual-cockpit .vc-link-operate { background: var(--sd-ok-wash); color: var(--sd-ok-text); }
.station .virtual-cockpit .vc-link-watch { background: var(--sd-action-wash); color: var(--sd-action-text); }
.station .virtual-cockpit .vc-link-disarmed, .station .virtual-cockpit .vc-link-fault { background: var(--sd-bad-wash); color: var(--sd-bad-text); }
.station .virtual-cockpit .vc-role { font-size: 11.5px; color: var(--sd-text-2); }
.station .virtual-cockpit .vc-conn { display: flex; gap: 8px; }
.station .virtual-cockpit .vc-station { flex: 1; min-width: 0; padding: 6px 9px; border: 1px solid var(--sd-rule); border-radius: 7px; background: var(--sd-field); color: var(--sd-text); }
.station .virtual-cockpit button { cursor: pointer; border: 1px solid var(--sd-rule); border-radius: 7px; background: var(--sd-sunken); color: var(--sd-text); padding: 6px 12px; font-weight: 600; }
.station .virtual-cockpit button:disabled { opacity: .5; cursor: not-allowed; }
.station .virtual-cockpit .vc-connect { background: var(--sd-action); color: var(--sd-bar-text); border-color: transparent; }
.station .virtual-cockpit .vc-rig { display: flex; align-items: baseline; gap: 12px; padding: 8px 10px; border-radius: 8px; background: var(--sd-bar); color: var(--sd-bar-text); font-variant-numeric: tabular-nums; }
.station .virtual-cockpit .vc-rig.is-waiting { opacity: .6; }
.station .virtual-cockpit .vc-freq { font-size: 20px; font-weight: 700; }
.station .virtual-cockpit .vc-mode { font-weight: 700; color: var(--sd-amber); }
.station .virtual-cockpit .vc-split, .station .virtual-cockpit .vc-rit { font-size: 11px; font-weight: 700; color: var(--sd-bar-text-2); }
.station .virtual-cockpit .vc-rig .vc-ptt { margin-left: auto; font-weight: 700; font-size: 12px; padding: 1px 8px; border-radius: 999px; background: var(--sd-slate); }
.station .virtual-cockpit .vc-rig .vc-ptt.is-tx { background: var(--sd-red); color: var(--sd-bar-text); }
.station .virtual-cockpit .vc-audio, .station .virtual-cockpit .vc-operate, .station .virtual-cockpit .vc-foot { display: flex; align-items: center; gap: 10px; flex-wrap: wrap; }
.station .virtual-cockpit .vc-audio-toggle.is-on { background: var(--sd-ok-wash); color: var(--sd-ok-text); }
.station .virtual-cockpit .vc-audio-degraded { font-size: 11.5px; color: var(--sd-accent-text); }
.station .virtual-cockpit .vc-operate { padding-top: 6px; border-top: 1px dashed var(--sd-rule); }
.station .virtual-cockpit .vc-tune, .station .virtual-cockpit .vc-cw { display: flex; gap: 6px; }
.station .virtual-cockpit .vc-tune-freq, .station .virtual-cockpit .vc-cw-line { padding: 6px 9px; border: 1px solid var(--sd-rule); border-radius: 7px; background: var(--sd-field); color: var(--sd-text); }
.station .virtual-cockpit .vc-cw-line { min-width: 180px; }
.station .virtual-cockpit .vc-ptt-btn { min-width: 110px; padding: 10px 16px; font-size: 14px; background: var(--sd-slate); color: var(--sd-bar-text); border-color: transparent; user-select: none; touch-action: none; }
.station .virtual-cockpit .vc-ptt-btn.is-keyed { background: var(--sd-red); }
.station .virtual-cockpit .vc-foot { font-size: 12px; color: var(--sd-text-2); }
.station .virtual-cockpit .vc-fault { color: var(--sd-bad-text); font-weight: 600; }
.station .virtual-cockpit .vc-deadman { margin-left: auto; font-size: 11px; font-weight: 700; }
.station .virtual-cockpit .vc-deadman.is-alive { color: var(--sd-ok-text); }
.station .virtual-cockpit .vc-deadman.is-stale { color: var(--sd-bad-text); }
.station .vc-page-head h1 { margin: 0 0 4px; }
.station .vc-page-sub { color: var(--sd-text-2); margin: 0 0 14px; }
