/* Desktop view: loaded only for windows at least 1000 px wide (media attribute of the link in index.html). The markup is the same as on
   the phone; the page becomes a grid: top bar; analog meter | frequency with the indicators below it | band keys (three wide); scope
   settings; wide scope | sliders and below them the mode keys (three wide, right of the waterfall); filter / memory keys | TX key above
   the VFO wheel. The phone layout (style.css) is untouched below 1000 px. */

body { align-items: stretch; }
main {
  max-width: none;
  width: 100%;
  height: 100dvh;
  padding: 0.6rem 1.2rem 0.7rem;
  overflow-y: auto; /* a very low window scrolls instead of cutting off the bottom row */
  overflow-x: hidden;
  display: grid;
  grid-template-columns: clamp(19rem, 24vw, 28rem) minmax(0, 1fr) clamp(16rem, 18vw, 22rem); /* the gauge column grows with the window */
  grid-template-rows: auto auto auto auto auto auto auto auto auto auto minmax(2rem, 1fr) auto auto;
  grid-template-areas:
    "status status status"
    "meter  fstat  bands"
    "meter  freq   bands"
    "meter  vinfo  bands"
    "meter  .      bands"
    "dkm    dkm    dkm"
    "stitle stitle ."
    "scope  scope  levels"
    "scope  scope  mem"
    "scope  scope  tx"
    "scope  scope  tx"
    "scope  scope  modes"
    "wfs    wfs    modes";
  gap: 0.45rem 1.2rem;
}
main > * { min-width: 0; }

.dk-only { display: block; }
.status-row { grid-area: status; margin: 0; }
.freq-row { grid-area: freq; align-self: center; margin: 0 -0.8rem; } /* reaches 0.8rem into the gaps to the meter and to the band keys */
.vfo-info { grid-area: vinfo; justify-self: start; margin: 0; } /* group | channel | name at the front, under the first digit (desktop.js sets the left margin) */
.meter { display: none; } /* the bar of the phone: the analog meter takes its place */
#dk-meter { grid-area: meter; margin-top: 0.7rem; } /* a little lower */
#indicators { grid-area: modes; display: grid; grid-template-columns: repeat(4, 3.3rem); justify-content: space-between; gap: 0.3rem; align-content: start; margin: 1.2rem 0 0; } /* right of the waterfall, under the sliders (swapped with the mode keys) */
.scope-controls { display: none; } /* its controls sit in the scope title bar (desktop.js) */
.scope-wrap { grid-area: scope; aspect-ratio: auto; height: auto; align-self: stretch; min-height: 0; max-height: none; margin: 0; } /* style.css limits the height to the phone width: not here */
#dk-bands { grid-area: bands; align-self: start; margin-top: calc(var(--ink-top, 0px) + 0.9rem); } /* the top of the keys on the line of the digits (their ink, see desktop.js syncInk) */
#dk-modes { grid-area: dkm; align-self: start; margin: 0; } /* one row under the meter, starting at the left */
.selects { grid-area: mem; align-self: start; flex-wrap: wrap; margin: 1.2rem 0 0; } /* SCAN / SKIP / >VFO / MEM: right of the waterfall */
.selects #band-btn, .selects #mode-btn { display: none; } /* replaced by the band and mode keys */
main > .levels { display: contents; } /* its two children are grid items: the sliders at the top right, the TX key above the wheel */
.level-col { grid-area: levels; align-self: start; width: 100%; margin: 0; } /* as wide as the three band keys above (3 x 4.6rem + 2 gaps) */
#tx-button { grid-area: tx; aspect-ratio: auto; height: min(78%, 9rem); min-height: 2.4rem; width: min(100%, 9rem); justify-self: center; align-self: center; margin: 0.8rem 0 0; transform: none; font-size: 2rem; line-height: 1; padding: 0; overflow: hidden; display: flex; align-items: center; justify-content: center; } /* square while there is room (9 rem), with less height it stays as wide and gets flatter, in the middle of the space between the memory keys and the bottom edge (the area spans the spacer, the TX row and the scale row) */
main > .tune-wheel { grid-area: auto; grid-column: 3; grid-row: 6 / 8; width: 100%; margin: 0; align-self: center; position: relative; z-index: 2; } /* as wide as the band keys, vertically centred between them and the sliders (it lies over the right end of the mode key row's cell, which stays empty there) */

/* a larger frequency display: its size follows the width of the centre column (container query units), so it fits at 1000 px as well as on a big screen */
.freq-row { container-type: inline-size; justify-self: stretch; justify-content: center; }
.freq { font-size: min(6.25rem, calc((100cqw - 4.5rem) / 5.2)); }

/* ---- analog meter: the gauge of open890rc (static SVG, colours sampled from its reference bitmap) and its mode keys */
/* the dial (scales, numbers) is a little subdued so it does not glow; the needle is a light grey (not glaring white). The clone in the settings window has the same class and so the same colours. */
svg.meter-analog { --dial-white: #c2c7cc; --dial-red: #c6282c; }
#dk-meter .meter-analog { display: block; width: 100%; height: auto; cursor: pointer; user-select: none; -webkit-user-select: none; touch-action: manipulation; }
.m-yellow .ln { fill: none; stroke: var(--dial-white); stroke-width: 4.8; } /* colours as on the IC-7610 / IC-705 display: white scales, red above S9 and for ALC */
.m-yellow .t { fill: none; stroke: var(--dial-white); stroke-width: 3.2; }
.m-yellow .fill { fill: var(--dial-white); }
.m-yellow .alc { fill: var(--dial-red); }
.m-orange .band { fill: none; stroke: var(--dial-red); stroke-width: 7.5; }
.m-orange .t { fill: none; stroke: var(--dial-red); stroke-width: 2.4; }
.m-yellow .t.tt { stroke-width: 5; } .m-orange .t.tt { stroke-width: 5; } /* the tick marks of the upper scales (signal strength and power) a little thicker */
.m-text .lb, .m-text .lo { font-family: "Helvetica Neue", Helvetica, Arial, sans-serif; font-weight: 700; }
.m-text .lb { fill: var(--dial-white); }
.m-text .lo { fill: var(--dial-red); font-size: 19.5px; }
.m-text .sS { font-size: 30px; }
.m-text .sd { font-size: 16.5px; }
.m-text .sn { font-size: 16px; }
.m-text .sl { font-size: 19.5px; }
.analog-alc-led { fill: #3a1515; stroke: #1c0a0a; stroke-width: 0.8px; }
.analog-alc-led.on { fill: #ff2b1c; filter: drop-shadow(0 0 3px #ff2b1c); }
.analog-needle-shadow { stroke: #000; stroke-opacity: 0.75; stroke-width: 4.2px; stroke-linecap: round; }
.analog-needle { stroke: #b4b8ba; stroke-width: 4.2px; stroke-linecap: round; } /* no CSS transition: the spring in desktop.js moves it every frame */
.analog-dbm { font-size: 26px; font-family: sans-serif; font-weight: 600; fill: #3f9fd0; } /* a darker blue */
.meter-overlay-source-hidden { visibility: hidden; } /* while a live copy of the gauge is shown in the settings window: same box, nothing reflows */
.meter-mode-row { display: flex; justify-content: center; gap: 0.45rem; margin-top: 0.9rem; } /* the PWR / SWR / ALC keys a bit lower, away from the gauge */
.meter-mode-btn {
  display: flex; flex-direction: column; align-items: center; width: 2.3rem; box-sizing: border-box; gap: 0.14rem; padding: 0.14rem 0 0.14rem;
  background: linear-gradient(#2a2a2d, #19191b); border: 1px solid #3a3a3e; border-radius: 4px; color: #bdb8a4; font: inherit; font-size: 0.56rem;
  font-weight: 700; letter-spacing: 0.05em; cursor: pointer;
}
.meter-mode-btn .mm-slit { width: 4px; height: 4px; border-radius: 50%; background: #3b3b3e; box-shadow: inset 0 1px 1px rgba(0, 0, 0, 0.6); }
.meter-mode-btn.active .mm-slit { background: rgb(128, 156, 36); box-shadow: 0 0 2px rgba(128, 156, 36, 0.55); }
.meter-mode-btn.active { color: #a3ae72; }
.meter-overlay-gauge { margin-bottom: 0.7rem; }
.meter-overlay-gauge svg { display: block; width: 100%; height: auto; }

/* ---- band and mode keys */
.dk-keys { display: grid; gap: 0.4rem; align-content: start; }
#dk-bands { grid-template-columns: repeat(3, minmax(0, 1fr)); } /* narrower keys (were 5.1 rem) */
#dk-modes { display: flex; flex-wrap: wrap; justify-content: center; width: 29.1rem; max-width: 100%; margin-inline: auto; gap: 0.3rem; } /* two rows, centred: LSB-FM, WFM-DATA (six keys per row) */
#dk-modes .dk-key { flex: 0 0 4.6rem; } /* as small as the band keys */
#dk-modes .dk-key { padding: 0.34rem 0; font-size: 0.88rem; }
.dk-key {
  font: inherit; font-size: 0.95rem; color: #e6e9ec; padding: 0.42rem 0; border-radius: 5px; cursor: pointer;
  background: linear-gradient(#2a2d2a 0%, #1b1c1b 50%, #0e0e0e 100%); border: 1px solid #3d3f3d;
}
.dk-key:hover { border-color: #5a6068; }
.dk-key:active { filter: brightness(1.3); }
.dk-key.current { background: linear-gradient(#2e5175 0%, #22456a 45%, #0e2c49 100%); border-color: #3d6c9c; }
.dk-key:disabled { color: #50565c; cursor: default; filter: none; }
body.idle .dk-only { opacity: 0.4; pointer-events: none; }

/* a low window: smaller keys, so the band and mode keys (stacked right of the scope) fit */
@media (max-height: 820px) { .dk-key { padding: 0.26rem 0; font-size: 0.85rem; } .dk-keys { gap: 0.3rem; } #indicators { margin-top: 0.8rem; } .selects { margin-top: 0.8rem; } }

/* the logo as large as the power key (desktop only: the phone keeps its original size) */
.icom-logo { height: 1.5rem; margin-bottom: -0.2rem; }

/* Offset scale under the waterfall (as in open890rc): values only, no ticks */
.wf-scale { grid-area: wfs; position: relative; height: 1.05rem; margin-top: -0.35rem; pointer-events: none; user-select: none; }
.wf-scale span { position: absolute; top: 0; font-family: "Helvetica Neue", Arial, system-ui, sans-serif; font-size: 0.7rem; line-height: 1.05rem; color: #2b9fcc; opacity: 0.8; white-space: nowrap; }
.scope-wrap:not(.live) + .wf-scale { visibility: hidden; } /* with the scope: hidden, not removed (no jump) */

/* the band keys (top right, next to the frequency) smaller than the mode keys */
#dk-bands { gap: 0.3rem; }
#dk-bands .dk-key { padding: 0.34rem 0; font-size: 0.88rem; }

/* the right-hand icons (mic, record, settings) on the same line as the power key and the logo: the phone lets them hang 3 px lower */
#mic-keep-warm, #record-button, #settings-button { margin-bottom: -0.2rem; }

/* BUSY / TX, VFO and the filter key (FIL1-3) in a column right of the frequency; together exactly as tall as the digits (their ink spans 0.1885em..0.843em of the line box, measured) */
.freq-row .leds {
  font-size: min(6.25rem, calc((100cqw - 4.5rem) / 5.2)); /* the size of .freq: em = the frequency font */
  align-self: flex-start; height: max(0.6545em, 3.1rem); width: 3.1rem; /* centred on the ink of the digits; at a narrow window it keeps a minimum height */
  margin-top: max(0px, calc(0.5157em - max(0.6545em, 3.1rem) / 2));
}
.freq-row .leds > * { flex: 1 1 0; min-height: 0; display: flex; align-items: center; justify-content: center; padding: 0; width: 100%; box-sizing: border-box; }
.freq-row .leds .led, .freq-row .leds .vfo-tag { font-size: 0.78rem; }
.freq-row .leds #filter-btn { height: auto; font-size: 0.78rem; border-radius: 4px; letter-spacing: 0; background: #101110; border: 1px solid #343834; color: #a4aba4; } /* the same quiet look as the VFO key beside it (the key row's white-on-black style was brighter) */
.freq-row .leds #filter-btn .dot { display: none; }
.selects { width: 100%; flex-wrap: nowrap; gap: 0.3rem; }
.selects .lcd-btn { font-size: 0.85rem; padding: 0; }
.selects #mem-btn { flex: 1 1 0; min-width: 0; }
/* SCAN / SKIP / >VFO are always shown; outside memory mode (the app marks them hidden) they are dimmed and do nothing */
.selects #scan-btn[hidden], .selects #skip-btn[hidden], .selects #tovfo-btn[hidden] { display: block; color: #4a504a; pointer-events: none; }

/* the kB/s and delay details open only on a click, not when the mouse just passes over them */
.audio-info:not(.show):hover .traffic-tip { display: none; }

/* the spectrum / waterfall split follows --spec-frac (set by the divider; default one third) */
#spectrum { height: calc(var(--spec-frac, 0.3333) * 100%); }
#waterfall { top: calc(var(--spec-frac, 0.3333) * 100%); height: calc((1 - var(--spec-frac, 0.3333)) * 100%); }
.scope-split { position: absolute; left: 0; right: 0; top: calc(var(--spec-frac, 0.3333) * 100%); height: 10px; margin-top: -5px; z-index: 4; cursor: ns-resize; touch-action: none; }
.scope-split::after { content: ""; position: absolute; left: 50%; top: 4px; width: 36px; height: 2px; margin-left: -18px; border-radius: 1px; background: rgba(255, 255, 255, 0.25); }
.scope-split:hover::after, .scope-split.drag::after { background: rgba(255, 255, 255, 0.7); }
.scope-wrap:not(.live) .scope-split { display: none; }

/* the kB/s and ms readout opens its details on a click: show that it can be clicked (hand cursor) */
.audio-info .traffic { cursor: pointer; opacity: 0.8; } /* the readout is discreet: dimmer, same size (the detail box beside it keeps its own look) */
.audio-info.show .traffic { opacity: 0.9; }

/* a narrow window: smaller mode keys, so the first row does not reach the wheel at the right (it lies over the end of that row's cell) */
@media (max-width: 1120px) { #dk-modes { width: 25.5rem; } #dk-modes .dk-key { flex-basis: 4rem; } }

/* ---- status boxes above the frequency: MET (meter mode), BW, SFT and the passband symbol */
#dk-status.dk-only { grid-area: fstat; display: flex; align-items: center; justify-content: center; gap: 0.5rem; margin: 0; }
.st-box { display: inline-flex; align-items: baseline; gap: 0.45rem; padding: 0.12rem 0.55rem; border: 1px solid #5b6168; border-radius: 4px; background: #0b0c0d; font-family: "Helvetica Neue", Helvetica, Arial, sans-serif; font-size: 0.82rem; line-height: 1.15; white-space: nowrap; }
.st-k { color: #9fa6ad; letter-spacing: 0.03em; }
.st-v { color: #f1f3f4; font-weight: 600; min-width: 1.3rem; text-align: right; }
#st-met { width: 2.2rem; text-align: left; } /* fixed: Po / SWR / ALC must not change the width of the box */
#st-bw { min-width: 2rem; }
.st-graph { width: 5rem; height: 1.7rem; display: block; }
body.idle #dk-status { opacity: 0.4; }

/* ---- the title bar of the scope (radio style): name in the middle, the scope mode in a blue field on the right */
.dk-scope-title { container: scopetitle / inline-size; position: relative; grid-area: stitle; display: flex; align-items: center; justify-content: space-between; gap: 0.6rem; height: 1.6rem; padding: 0 0.45rem; margin: 0; background: linear-gradient(#2a3430, #232c28); border-top: 1px solid #0a0d0b; border-bottom: 1px solid #0a0d0b; border-radius: 3px 3px 0 0; font-family: "Helvetica Neue", Helvetica, Arial, sans-serif; }
.dk-scope-name { position: absolute; left: 50%; top: 50%; transform: translate(-50%, -50%); pointer-events: none; color: #a9b0aa; font-size: 0.85rem; letter-spacing: 0.04em; }
.dk-scope-left, .dk-scope-right { min-width: 0; display: flex; align-items: center; gap: 0.4rem; }
.dk-scope-left { flex: 1 1 0; }
.dk-scope-right { flex: none; justify-content: flex-end; margin-left: auto; } /* the title is centred on the bar itself (absolute), whatever the two sides hold */
.dk-scope-mode, .dk-scope-main { flex: none; padding: 0 0.7rem; min-width: 2.6rem; height: 1rem; display: flex; align-items: center; justify-content: center; border-radius: 2px; color: #c3cad3; font-size: 0.68rem; font-weight: 500; letter-spacing: 0.03em; line-height: 1; padding-bottom: 0.5px; border: 1px solid; } /* pills as on the radio's display */
.dk-scope-mode { background: linear-gradient(#2f62b3, #1d4585); border-color: #5f8fd6; }
#st-scopemode { min-width: 3.8rem; } /* the widest of CENT, FIX, SCR-C and SCR-F (60.5 px): the pill keeps its size when the mode changes */
.dk-scope-main { background: linear-gradient(#c7342e, #9a2420); border-color: #d96c66; color: #e6cfcd; }
/* Smooth / Hold / Auto: pills like the radio's own indicators, lit blue when on */
.dk-scope-title label.sw { position: relative; display: flex; flex: none; cursor: pointer; }
.dk-scope-title label.sw input { position: absolute; inset: 0; opacity: 0; margin: 0; cursor: pointer; }
.dk-scope-title label.sw span { height: 1rem; padding: 0 0.5rem; min-width: 2.2rem; display: flex; align-items: center; justify-content: center; border-radius: 2px; border: 1px solid #4a5159; background: linear-gradient(#343c38, #262d29); color: #7f8782; font-size: 0.68rem; font-weight: 500; letter-spacing: 0.03em; line-height: 1; padding-bottom: 0.5px; }
.dk-scope-title label.sw input:checked + span { background: linear-gradient(#2f62b3, #1d4585); border-color: #5f8fd6; color: #c3cad3; }
.dk-scope-title label.sw input:focus-visible + span { outline: 2px solid #5f8fd6; outline-offset: 1px; }
.dk-scope-grid { flex: none; margin-left: 0.15rem; color: #7d8681; font-size: 0.72rem; letter-spacing: 0.02em; white-space: nowrap; } /* quiet, as the radio shows it */
/* the scope settings (width, colours, levels) in the title bar */
.dk-scope-left select { flex: none; height: 1.15rem; padding: 0 0.3rem; font-size: 0.72rem; color: #dde1dd; background: #151a17; border: 1px solid #4a5159; border-radius: 3px; }
.dk-scope-left .dual-slider { flex: 0 1 5rem; width: 5rem; min-width: 2.5rem; } /* half as wide as before */
@container scopetitle (max-width: 760px) { .dk-scope-name { display: none; } } /* only when the bar is really too narrow for name and controls */
.scope-wrap { border-radius: 0 0 3px 3px; margin-top: -0.45rem; border: 3px solid #28312d; border-top: 0; box-sizing: border-box; } /* the frame runs round the outside, in the colour of the title bar (it continues it) */ /* directly under the title bar: no grid gap between them */

/* the model line of the radio's front panel in the top bar, between the data rate and the mic key */
.dk-model.dk-only { display: flex; align-items: center; gap: 0.7rem; flex: none; height: 1.5rem; line-height: 1; margin: 0 1.1rem -0.2rem auto; white-space: nowrap; user-select: none; color: #6f7883; font-family: "Helvetica Neue", Helvetica, Arial, sans-serif; }
.dk-model-text { font-size: 0.62rem; letter-spacing: 0.1em; } /* centred on the row, level with the middle of the logo and the icons */
.dk-model-name { align-self: center; font-size: 1.15rem; font-weight: 700; letter-spacing: 0.04em; color: #7e8893; }

/* the data rate / delay readout directly right of the logo (left aligned); the model line then sits in the middle of the free space */
.audio-info { flex: none; text-align: left; margin-left: 0.4rem; margin-right: 0; margin-bottom: -0.35rem; } /* the text on the baseline of the ICOM letters (they end at y = 33.0, the text baseline was 30.3) */
.status-row:has(#status:not(:empty)) .dk-model { display: none; } /* a message in the top bar has the middle to itself */

/* the clock right of the passband symbol (time of this computer, seconds small, the offset to UTC below), as on the radio's display */
.st-clock { display: flex; flex-direction: column; align-items: flex-start; justify-content: center; margin-left: 0.35rem; line-height: 1; font-family: "Helvetica Neue", Helvetica, Arial, sans-serif; font-variant-numeric: tabular-nums; white-space: nowrap; }
.st-time { color: #aab0b8; font-size: 1.2rem; font-weight: 500; letter-spacing: 0.02em; }
.st-time small { margin-left: 0.22rem; font-size: 0.8rem; color: #8d949c; }
.st-utc { margin-top: 0.12rem; font-size: 0.62rem; color: #6c737b; letter-spacing: 0.03em; }
@media (max-width: 1150px) { .st-clock { display: none; } } /* a narrow window: no room beside the boxes */

/* the pill texts exactly in the middle: where the browser can trim the text box to the capitals, it does (no guessing with the font metrics) */
@supports (text-box: trim-both cap alphabetic) {
  .dk-scope-mode, .dk-scope-main, .dk-scope-title label.sw span { text-box: trim-both cap alphabetic; padding-bottom: 0; }
}

/* the mode keys are lifted up under the frequency (desktop.js sets --dk-lift): a transform, so the rows below, and with them the scope title bar, stay where they are */
#dk-modes { transform: translateY(var(--dk-lift, 0px)); }

/* AT / ATT / PAMP / AGC in one row under the meter: only as wide as needed, all four the same */
#dk-meter { position: relative; }
.dk-meter-inds { position: absolute; top: calc(100% + 0.5rem); left: 0; right: 0; display: flex; justify-content: center; gap: 0.3rem; }
.dk-meter-inds .ind { flex: none; width: 3.3rem; padding: 0.26rem 0; font-size: 0.74rem; }
body.idle .dk-meter-inds { opacity: 0.4; pointer-events: none; } /* standby: dimmed like the other indicators */

/* indicators that do not exist in the current mode stay in place, greyed out like AT without a tuner (the app marks them hidden) */
#indicators .ind[hidden], .dk-meter-inds .ind[hidden] { display: block; color: #4a504a; pointer-events: none; }

/* the middle column gets narrow: smaller mode keys, so both rows stay clear of the meter */
@media (max-width: 1060px) { #dk-modes { width: 21.5rem; } #dk-modes .dk-key { flex-basis: 3.3rem; } }

/* BUSY / TX: the field of the VFO and FIL keys, backlit when it is on: the whole field glows (green BUSY, red TX), brighter in the middle, darker to the edges; no lamp frame, no gloss */
.freq-row .leds .busy-led { border-radius: 4px; border: 1px solid #343834; background: #101110; color: #4d6a42; text-shadow: none; box-shadow: none; }
.freq-row .leds .busy-led.on { background: #4fc23a; border-color: #4fc23a; color: #0b1a06; box-shadow: none; } /* a plain LED: flat colour, no glow */
.freq-row .leds .busy-led.tx { background: #e02a2a; border-color: #e02a2a; color: #fff; box-shadow: none; }
/* the same lettering on BUSY / TX, VFO and FIL as on the indicators (ATT, PAMP ...): the page font, 0.78rem, regular weight, 0.02em spacing; no fade when the lamp switches */
.freq-row .leds .busy-led, .freq-row .leds .vfo-tag, .freq-row .leds #filter-btn { font: inherit; font-size: 0.78rem; font-weight: 400; letter-spacing: 0.02em; transition: none; }

/* NB, NR, NOTCH, DUP ... exactly as big as ATT, PAMP and AGC under the meter (3.3rem wide, same padding and lettering); MEM in front of SCAN */
#indicators .ind { padding: 0.26rem 0; font-size: 0.74rem; }
.selects #mem-btn { order: -1; }

/* the indicators under the sliders in this order (the four columns spread over the whole width):
   NB NR NOTCH TSQL / SSB/W COMP TONE DCS / DUP SPLIT */
#ind-nb { order: 1; } #ind-nr { order: 2; } #ind-anf { order: 3; } #ind-tsql { order: 4; }
#ind-tbw { order: 5; } #ind-comp { order: 6; } #ind-tone { order: 7; } #ind-dcs { order: 8; }
#ind-dup { order: 9; } #ind-split { order: 10; }

/* group and channel of the memory line a little darker (they were too bright) */
.vi-num { color: #437c93; }
.vi-sep { background: #284d5e; }

/* a low window: tighter rows, so the (small, square) TX key still fits above the bottom edge */
@media (max-height: 700px) { main { row-gap: 0.28rem; } #indicators { margin-top: 0.4rem; } .selects { margin-top: 0.4rem; } #tx-button { min-height: 2.4rem; margin-top: 0.4rem; } }

/* the functions that are on, as plain small text in a row under the Hz digits (no frame; only SPLIT keeps its pill), at the right end of the digits */
.freq-flags { top: calc(100% + 3px); right: -3.89rem; gap: 0.6rem; } /* the row ends under the right edge of the FIL1 key (SPLIT included), not under the last digit: with many marks on, they stay clear of the memory line (group | channel name) on the left */ /* (the phone keeps the row partly in the empty space under the digits) */
.split-badge { width: var(--fil-w, 3.1rem); height: var(--fil-h, 1.16rem); padding-left: 0; padding-right: 0; font-size: 0.78rem; } /* as big as the FIL key above (size copied by desktop.js) */
.freq-flag { font-size: 0.7rem; font-weight: 500; letter-spacing: 0.05em; line-height: 1.05rem; color: #6b7a85; } /* dim: they are only information */
.freq-flag[hidden] { display: none; }

.split-badge { order: 2; } /* SPLIT always at the right end of the row, the other marks come in front of it */
.split-badge[hidden] { visibility: hidden; } /* it keeps its place while split is off, so the marks do not jump when it is switched */

/* RIT and XIT knobs right of SPLIT in the third row of the indicators */
.rit-knob-wrap { display: flex; align-self: start; }
#rit-knob-wrap { order: 11; grid-column: 3; }
#xit-knob-wrap { order: 12; grid-column: 4; }
#indicators { row-gap: 0.6rem; align-items: start; } #ind-dup, #ind-split { align-self: center; } /* the taller knobs must not stretch DUP / SPLIT */ /* more air between the NB / SSB/W / DUP rows */
.rit-knob { width: 2.3rem; height: 2.3rem; }
.rit-knob-label { min-height: 0.8rem; white-space: nowrap; }
body.idle .rit-knob-wrap { opacity: 0.4; pointer-events: none; }
.vi-name { transform: translateY(-1.5px); } /* both share the baseline, but the lower-case name looks too low next to the tall digits: lifted so its middle sits on the middle of the digits */

/* indicator keys (AT, ATT, PAMP, NB, NR, DUP ...) as rubber keys like the band and mode keys: grey face, blue face when on (test of design 1) */
.ind { border-radius: 5px; background: linear-gradient(#6a7174 0%, #50565a 32%, #3d4145 70%, #2e3336 100%); border-color: #1b1e20; box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.18); color: #c9ccce; letter-spacing: 0.03em; }
.ind.on { background: linear-gradient(#2e5175 0%, #22456a 45%, #0e2c49 100%); border-color: #3d6c9c; color: #d8f0ff; text-shadow: none; }
.ind.unavail, .ind.nofn, #indicators .ind[hidden], .dk-meter-inds .ind[hidden] { background: linear-gradient(#34383b, #2a2e30); border-color: #1b1e20; box-shadow: none; color: #5b6166; }
/* AI-NR (RNNoise in the browser): the NR key lights orange instead of blue */
.ind.on.ai { background: linear-gradient(#6a7174 0%, #50565a 32%, #3d4145 70%, #2e3336 100%); border-color: #1b1e20; box-shadow: inset 0 0 0 1.5px #d98a30; color: #f0c48a; text-shadow: none; }

.freq-flag.ai { color: #cf6445; }

/* FT8 decoder output: lower LEFT part of the scope (the FT8 key beside the mode keys switches it) (desktop only; the phone has none: this file is not used there) */
#ft8.dk-only { position: absolute; left: 6px; bottom: 6px; z-index: 4; display: flex; flex-direction: column; align-items: flex-start; gap: 4px; width: 46%; max-width: 460px; height: 58%; justify-content: flex-end; pointer-events: none; }
.ft8-panel { pointer-events: auto; flex: 1 1 auto; min-height: 0; width: 100%; background: rgba(0, 0, 0, 0.6); border: 1px solid #28312d; border-radius: 3px; overflow: hidden; display: flex; flex-direction: column; position: relative; }
.ft8-size { position: absolute; right: 0; bottom: 0; width: 14px; height: 14px; cursor: nwse-resize; touch-action: none; background: linear-gradient(135deg, transparent 0 55%, #6f7a74 55% 62%, transparent 62% 72%, #6f7a74 72% 79%, transparent 79%); }
.ft8-head { flex: none; display: flex; justify-content: space-between; align-items: center; padding: 1px 6px 1px 5px; font: 600 0.62rem ui-monospace, "SF Mono", Menlo, Consolas, monospace; letter-spacing: 0; white-space: pre; color: #9ab3a3; background: rgba(40, 49, 45, 0.85); cursor: grab; touch-action: none; user-select: none; } /* the column names stand over the columns of the list (same font and padding) */
.ft8-head .cols, .ft8-line { display: grid; grid-template-columns: 5ch 5ch minmax(0, 1.3fr) minmax(0, 1fr) 14ch; column-gap: 1ch; }
.ft8-head .cols { flex: 1; min-width: 0; }
.ft8-head .cols > span, .ft8-line > span { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.ft8-head .r, .ft8-line .r { text-align: right; }
.ft8-head .sortable { cursor: pointer; }
.ft8-head .sortable:hover { color: #d6efe0; }
.ft8-head .sortable.sorted { color: #bfe8c9; }
.ft8-head .sortable.sorted::after { content: " " attr(data-arrow); }
.ft8-head .r.sortable.sorted::after { content: attr(data-arrow); margin-left: 0.2em; }
.ft8-line { white-space: nowrap; }
.ft8-head:active { cursor: grabbing; }
.ft8-head .grip { letter-spacing: -0.1em; color: #6f7a74; }
/* while FT8 runs, USB and DATA are lit as well, but greyed: they belong to FT8 (the FT8 key itself stays blue) */
body.ft8-on #dk-modes .dk-key.current:not(#dk-ft8) { background: linear-gradient(#4a5560 0%, #3d4852 45%, #2b343c 100%); border-color: #66727e; color: #c9d2da; }
.ft8-panel[hidden] { display: none; }
.ft8-log { flex: 1; overflow-y: auto; padding: 2px 5px; font: 0.66rem/1.35 ui-monospace, "SF Mono", Menlo, Consolas, monospace; color: #cfd8d3; text-align: left; white-space: pre; user-select: text; }
.ft8-note { color: #6f7883; font-style: italic; }
.ft8-line .t { color: #8fb3c9; }
.ft8-line.cq { color: #9be3ae; }
.ft8-log::-webkit-scrollbar { width: 5px; }
.ft8-log::-webkit-scrollbar-thumb { background: #3a4540; border-radius: 3px; }
