:root {
  --bg: #f6f5f2;
  --surface: #ffffff;
  --surface-2: #efede8;
  --text: #1d1c1a;
  --muted: #6b675f;
  --border: #dedad2;
  --accent: #d97706;
  --accent-strong: #b45309;
  --accent-soft: #fdf1e1;
  --ok: #15803d;
  --ok-soft: #e8f6ec;
  --warn: #b45309;
  --warn-soft: #fff4e0;
  --bad: #b91c1c;
  --bad-soft: #fdecec;
  --info-soft: #eaf1fb;
  --shadow: 0 1px 2px rgba(0, 0, 0, .05), 0 6px 20px rgba(0, 0, 0, .06);
  --radius: 12px;
  --font: 'Inter', system-ui, -apple-system, 'Segoe UI', Roboto, sans-serif;
  --mono: 'Share Tech Mono', ui-monospace, monospace;
  color-scheme: light;
}

@media (prefers-color-scheme: dark) {
  :root:not([data-theme="light"]) {
    --bg: #141412;
    --surface: #1d1c1a;
    --surface-2: #262522;
    --text: #ecebe7;
    --muted: #a19d94;
    --border: #36342f;
    --accent: #f59e0b;
    --accent-strong: #fbbf24;
    --accent-soft: #3a2a10;
    --ok: #4ade80;
    --ok-soft: #14301d;
    --warn: #fbbf24;
    --warn-soft: #362a0f;
    --bad: #f87171;
    --bad-soft: #3a1717;
    --info-soft: #182434;
    --shadow: 0 1px 2px rgba(0, 0, 0, .4), 0 6px 20px rgba(0, 0, 0, .3);
    color-scheme: dark;
  }
}

:root[data-theme="dark"] {
  --bg: #141412; --surface: #1d1c1a; --surface-2: #262522; --text: #ecebe7; --muted: #a19d94; --border: #36342f;
  --accent: #f59e0b; --accent-strong: #fbbf24; --accent-soft: #3a2a10; --ok: #4ade80; --ok-soft: #14301d;
  --warn: #fbbf24; --warn-soft: #362a0f; --bad: #f87171; --bad-soft: #3a1717; --info-soft: #182434;
  color-scheme: dark;
}

* { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; }
body {
  margin: 0;
  background: var(--bg);
  color: var(--text);
  font: 15px/1.55 var(--font);
  min-height: 100vh;
  display: flex;
  flex-direction: column;
}
main { flex: 1; outline: none; }
a { color: var(--accent-strong); }
h1 { font-size: clamp(1.7rem, 3.5vw, 2.3rem); line-height: 1.15; margin: .4em 0 .3em; letter-spacing: -.02em; }
h2 { font-size: 1.3rem; margin: 1.6em 0 .5em; letter-spacing: -.01em; }
h3 { font-size: 1.05rem; margin: .2em 0 .4em; }
code, kbd { font-family: ui-monospace, SFMono-Regular, Menlo, monospace; font-size: .88em; }
code { background: var(--surface-2); padding: .1em .35em; border-radius: 5px; }
kbd {
  display: inline-block; min-width: 1.6em; text-align: center; padding: .05em .4em;
  background: var(--surface); border: 1px solid var(--border); border-bottom-width: 2px; border-radius: 6px;
  font-weight: 600; white-space: nowrap;
}
.container { width: 100%; max-width: 1180px; margin: 0 auto; padding: 0 16px; }
.muted { color: var(--muted); }
.small { font-size: .86rem; }
.center { text-align: center; }
.lead { font-size: 1.08rem; color: var(--muted); max-width: 60ch; }
.eyebrow { text-transform: uppercase; letter-spacing: .12em; font-size: .78rem; font-weight: 700; color: var(--accent-strong); margin: 0; }
[hidden] { display: none !important; }

/* ----------------------------------------------------------------- header */
.site-header {
  position: sticky; top: 0; z-index: 20;
  display: flex; align-items: center; gap: 16px;
  padding: 10px 16px;
  background: color-mix(in srgb, var(--bg) 88%, transparent);
  backdrop-filter: blur(10px);
  border-bottom: 1px solid var(--border);
}
.brand { display: flex; align-items: center; gap: 10px; font-weight: 700; font-size: 1.1rem; color: var(--text); text-decoration: none; }
.brand-mark {
  width: 18px; height: 26px; border-radius: 4px; background: #222; position: relative;
  box-shadow: inset 0 7px 0 -2px #222, inset 0 -12px 0 0 #222;
}
.brand-mark::before { content: ''; position: absolute; left: 3px; top: 5px; width: 12px; height: 7px; border-radius: 2px; background: var(--accent); }
.brand-mark::after { content: ''; position: absolute; left: 3px; top: -8px; width: 4px; height: 9px; border-radius: 2px; background: #222; }
.site-nav { display: flex; gap: 4px; margin-left: auto; flex-wrap: wrap; }
.site-nav a { padding: 6px 12px; border-radius: 8px; text-decoration: none; color: var(--muted); font-weight: 500; }
.site-nav a:hover { background: var(--surface-2); color: var(--text); }
.site-nav a.active { background: var(--accent-soft); color: var(--accent-strong); }
.sound-toggle, .nav-toggle {
  border: 1px solid var(--border); background: var(--surface); color: var(--text);
  border-radius: 8px; padding: 5px 9px; cursor: pointer; font-size: 1rem;
}
.nav-toggle { display: none; margin-left: auto; }
@media (max-width: 820px) {
  .nav-toggle { display: block; }
  .site-nav { display: none; position: absolute; top: 100%; left: 0; right: 0; flex-direction: column; background: var(--surface); border-bottom: 1px solid var(--border); padding: 8px 16px; }
  body.nav-open .site-nav { display: flex; }
}
.site-footer { border-top: 1px solid var(--border); margin-top: 48px; padding: 20px 16px; color: var(--muted); font-size: .82rem; text-align: center; }
.site-footer p { max-width: 80ch; margin: 0 auto; }

/* ----------------------------------------------------------------- buttons & inputs */
.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 6px;
  padding: 8px 14px; border-radius: 9px; border: 1px solid var(--border);
  background: var(--surface); color: var(--text); font: inherit; font-weight: 600;
  text-decoration: none; cursor: pointer; transition: background .15s, border-color .15s;
}
.btn:hover { border-color: var(--muted); }
.btn:disabled { opacity: .45; cursor: not-allowed; }
.btn.primary { background: var(--accent); border-color: var(--accent); color: #1a1205; }
.btn.primary:hover { background: var(--accent-strong); }
.btn.danger { color: var(--bad); }
.btn.small { padding: 5px 10px; font-size: .85rem; }
.btn.tiny { padding: 1px 7px; font-size: .8rem; border-radius: 6px; }
.btn-row { display: flex; flex-wrap: wrap; gap: 8px; align-items: center; margin-top: 10px; }
.linkish { background: none; border: 0; padding: 0; color: var(--accent-strong); cursor: pointer; font: inherit; text-decoration: underline; }
.input {
  font: inherit; padding: 8px 11px; border: 1px solid var(--border); border-radius: 9px;
  background: var(--surface); color: var(--text); width: 100%;
}
.input:focus, .cell:focus { outline: 2px solid var(--accent); outline-offset: 0; }
.input.narrow { width: 110px; flex: none; }
.field { display: grid; gap: 4px; margin-bottom: 10px; font-size: .88rem; font-weight: 600; }
.check { display: inline-flex; align-items: center; gap: 6px; font-size: .9rem; cursor: pointer; }

/* ----------------------------------------------------------------- panels & notes */
.panel {
  background: var(--surface); border: 1px solid var(--border); border-radius: var(--radius);
  padding: 16px 18px; box-shadow: var(--shadow); margin-bottom: 16px;
}
.panel-title { font-size: .8rem; text-transform: uppercase; letter-spacing: .1em; color: var(--muted); margin: 0 0 10px; }
.note { padding: 8px 12px; border-radius: 9px; background: var(--info-soft); margin: 8px 0; }
.note.ok { background: var(--ok-soft); }
.note.warn { background: var(--warn-soft); }
.status.ok { color: var(--ok); }
.status.warn, .quick-msg.bad { color: var(--warn); }
.status.bad { color: var(--bad); }
.quick-msg.ok { color: var(--ok); }
.help-kicker { font-size: .75rem; text-transform: uppercase; letter-spacing: .08em; color: var(--accent-strong); font-weight: 700; }
.help-value { font-family: var(--mono); font-size: 1.05rem; }
.kv { border-collapse: collapse; width: 100%; font-size: .9rem; margin: 6px 0; }
.kv th { text-align: left; font-weight: 500; color: var(--muted); padding: 3px 12px 3px 0; white-space: nowrap; width: 1%; }
.kv td { padding: 3px 0; }
.listing { font-family: var(--mono); font-size: 1.15rem; background: var(--surface-2); padding: 4px 10px; border-radius: 7px; display: inline-block; }

/* ----------------------------------------------------------------- home */
.hero { display: grid; grid-template-columns: 1.2fr 1fr; gap: 32px; align-items: center; padding-top: 24px; }
.hero h1 { font-size: clamp(2rem, 5vw, 3.2rem); }
.cta { display: flex; gap: 10px; flex-wrap: wrap; margin: 20px 0 8px; }
.hero-radio { display: flex; justify-content: center; }
@media (max-width: 820px) { .hero { grid-template-columns: 1fr; } }
.features { display: grid; grid-template-columns: repeat(auto-fit, minmax(210px, 1fr)); gap: 14px; margin-top: 40px; }
.feature {
  background: var(--surface); border: 1px solid var(--border); border-radius: var(--radius); padding: 18px;
  color: var(--text); text-decoration: none; box-shadow: var(--shadow); transition: transform .15s, border-color .15s;
}
.feature:hover { transform: translateY(-2px); border-color: var(--accent); }
.feature p { color: var(--muted); font-size: .9rem; margin: 0; }
.feature-icon { font-size: 1.6rem; }
.callout { margin-top: 32px; }
.callout h2 { margin-top: 0; }
.callout { background: var(--accent-soft); border-radius: var(--radius); padding: 20px; max-width: calc(1180px - 32px); }

/* ----------------------------------------------------------------- simulator layout */
.sim-layout { display: grid; grid-template-columns: minmax(300px, 380px) 1fr; gap: 28px; padding-top: 20px; align-items: start; }
.sim-radio { position: sticky; top: 70px; }
.radio-slot { display: flex; justify-content: center; }
@media (max-width: 820px) {
  .sim-layout { grid-template-columns: 1fr; }
  .sim-radio { position: static; }
}
.stations { list-style: none; padding: 0; margin: 0; display: grid; gap: 8px; font-size: .9rem; }
.stations li { padding-bottom: 8px; border-bottom: 1px solid var(--border); }
.stations li:last-child { border-bottom: 0; }
table.mini { width: 100%; border-collapse: collapse; font-size: .82rem; font-family: ui-monospace, monospace; }
table.mini th { text-align: left; color: var(--muted); font-weight: 500; border-bottom: 1px solid var(--border); padding: 3px 6px 3px 0; }
table.mini td { padding: 3px 6px 3px 0; border-bottom: 1px solid var(--border); }
.report h4 { margin: 4px 0; font-size: 1.05rem; }
.report.ok h4 { color: var(--ok); }
.report.bad h4 { color: var(--bad); }
.report ul { padding-left: 0; list-style: none; margin: 6px 0; }
.report li { margin: 5px 0; }
.report .reply { font-style: italic; background: var(--surface-2); padding: 8px 12px; border-radius: 9px; }

/* ----------------------------------------------------------------- the radio */
/* Modelled on the classic UV-5R: display at the top, grille with VFO/MR, A/B,
   BAND and the busy light, then a 4x4 keypad. */
.radio {
  --body: #161718;
  --body-2: #262729;
  --key: #1c1d1f;
  position: relative; width: 310px; max-width: 100%; user-select: none; -webkit-user-select: none;
  padding-top: 70px; touch-action: manipulation;
}
.radio-top { position: absolute; top: 0; left: 30px; right: 30px; height: 84px; }
.radio-antenna {
  position: absolute; left: 12px; top: 0; width: 34px; height: 84px; border-radius: 16px 16px 4px 4px;
  background: linear-gradient(90deg, #0d0d0d, #2e2e2e 45%, #0d0d0d);
}
.radio-antenna::after { content: ''; position: absolute; bottom: 0; left: -6px; right: -6px; height: 22px; border-radius: 5px; background: #121212; }
.radio-torch {
  position: absolute; left: 50%; bottom: 10px; width: 20px; height: 14px; transform: translateX(-50%);
  border-radius: 7px 7px 2px 2px; background: #b9bec2; box-shadow: inset 0 -3px 0 #7a7f84;
}
.radio-torch.on { background: #fffbe6; box-shadow: 0 -6px 26px 10px rgba(255, 245, 190, .9); }
.radio-knob {
  position: absolute; right: 18px; bottom: 10px; width: 46px; height: 44px; border-radius: 8px 8px 3px 3px; border: 0; cursor: pointer;
  background: repeating-linear-gradient(90deg, #111 0 3px, #2c2c2c 3px 5px); box-shadow: inset 0 3px 4px rgba(255, 255, 255, .15);
}
.radio-knob:focus-visible, .rkey:focus-visible { outline: 3px solid var(--accent); outline-offset: 2px; }

.radio-body { position: relative; display: flex; }
.radio-side { position: absolute; left: -24px; top: 96px; display: flex; flex-direction: column; gap: 10px; width: 26px; z-index: 1; }
.radio-strap { position: absolute; right: -12px; top: 150px; width: 14px; height: 150px; border-radius: 0 8px 8px 0; background: linear-gradient(90deg, #111, #262626); }
.radio-face {
  position: relative; flex: 1; background: linear-gradient(170deg, var(--body-2), var(--body) 45%);
  border-radius: 30px 30px 40px 40px; padding: 14px 16px 16px; border: 2px solid #0a0a0a;
  box-shadow: 0 18px 40px rgba(0, 0, 0, .35), inset 0 1px 0 rgba(255, 255, 255, .08);
}
.lcd-bezel { background: #0b0b0c; border-radius: 16px; padding: 8px; box-shadow: inset 0 2px 6px rgba(0, 0, 0, .8); }

.radio-grille {
  display: grid; grid-template-columns: 58px 1fr 58px; grid-template-rows: 1fr auto;
  gap: 6px 8px; margin: 14px 0 12px; min-height: 150px;
}
.grille-left { grid-row: 1 / 3; display: flex; flex-direction: column; align-items: center; justify-content: space-between; gap: 10px; }
.grille-slots {
  grid-column: 2 / 4; grid-row: 1;
  background: repeating-linear-gradient(90deg, transparent 0 4px, #050505 4px 22px, transparent 22px 28px) 0 0 / 28px 16px,
    transparent;
  -webkit-mask: repeating-linear-gradient(180deg, #000 0 5px, transparent 5px 13px);
  mask: repeating-linear-gradient(180deg, #000 0 5px, transparent 5px 13px);
  border-radius: 6px; opacity: .9;
}
.grille-bottom { grid-column: 2 / 4; grid-row: 2; display: flex; align-items: center; justify-content: space-between; gap: 8px; }
.radio-brand {
  flex: 1; text-align: center; color: #d6d6d6; font-weight: 800; font-style: italic; letter-spacing: .08em; font-size: .95rem;
  border: 1px solid #3a3a3a; border-radius: 5px; padding: 2px 6px; background: #121212;
}
.radio-led { width: 18px; height: 16px; border-radius: 4px; background: #5b5f63; box-shadow: inset 0 1px 2px rgba(0, 0, 0, .6); }
.radio-led.tx { background: #ff3b30; box-shadow: 0 0 12px 3px rgba(255, 59, 48, .8); }
.radio-led.rx { background: #34d058; box-shadow: 0 0 12px 3px rgba(52, 208, 88, .8); }
.radio-model {
  width: max-content; margin: 12px auto 0; color: #8b8b8b; font-size: .75rem; font-weight: 700; letter-spacing: .1em;
  border: 1px solid #3b3b3b; border-radius: 6px; padding: 1px 10px; background: #202020;
}
.radio-keypad { display: grid; grid-template-columns: repeat(4, 1fr); gap: 9px 8px; }

.rkey {
  position: relative; border: 0; border-radius: 10px; cursor: pointer; font: 600 1.05rem var(--font); color: #f2f2f2;
  background: linear-gradient(#2b2c2f, var(--key)); box-shadow: 0 3px 0 #000, inset 0 1px 0 rgba(255, 255, 255, .1), 0 0 0 1px #000;
  height: 40px; display: flex; align-items: center; justify-content: center; gap: 3px; line-height: 1;
  transition: transform .05s, box-shadow .05s;
}
.rkey-sub { font-size: .5rem; font-weight: 700; color: #cfd2d6; letter-spacing: .02em; align-self: center; }
.rkey.digit .rkey-main { font-size: 1.2rem; }
.rkey.fn { font-size: .78rem; letter-spacing: .02em; }
.rkey.fn .rkey-main { transform: scaleY(1.1); }
.rkey.face { width: 58px; height: 34px; font-size: .72rem; border-radius: 9px; }
.rkey.vfo { background: linear-gradient(#f06a2b, #d4501a); color: #fff; box-shadow: 0 0 0 2px #7a2a0b, 0 3px 0 #000; }
.rkey.ab { background: linear-gradient(#3b8fe6, #1f6fca); color: #fff; box-shadow: 0 0 0 2px #0f3f78, 0 3px 0 #000; }
.rkey.band { width: 50px; height: 30px; border-radius: 50%; font-size: .65rem; }
.rkey.side { width: 26px; height: 46px; border-radius: 9px 0 0 9px; font-size: .5rem; writing-mode: vertical-rl; transform: rotate(180deg); box-shadow: none; background: linear-gradient(90deg, #3a3a3a, #1c1c1c); }
.rkey.side.call { background: linear-gradient(90deg, #f07a2e, #c75414); color: #fff; height: 40px; }
.rkey.side.ptt { height: 110px; font-size: .72rem; }
.rkey.pressed, .rkey:active { transform: translateY(2px); box-shadow: 0 1px 0 #000, 0 0 0 1px #000; filter: brightness(1.25); }
.rkey.side.pressed, .rkey.side:active { transform: rotate(180deg) translateX(-2px); }
.rkey.hl { animation: pulse 1.2s ease-in-out infinite; }
@keyframes pulse {
  0%, 100% { box-shadow: 0 3px 0 #000, 0 0 0 0 rgba(245, 158, 11, .9); }
  50% { box-shadow: 0 3px 0 #000, 0 0 0 6px rgba(245, 158, 11, .45); }
}
.radio.off .lcd { filter: none; }

/* LCD */
.lcd {
  --lcd-bg: #a9c7e0;
  --lcd-ink: #10202e;
  --lcd-ghost: rgba(16, 32, 46, .09);
  background: var(--lcd-bg); color: var(--lcd-ink); border-radius: 8px; padding: 6px 8px 8px;
  box-shadow: inset 0 0 14px rgba(0, 0, 0, .3); font-family: var(--mono);
  transition: background .2s;
}
.lcd.bl-blue { --lcd-bg: #9fc6ea; }
.lcd.bl-orange { --lcd-bg: #f4b860; }
.lcd.bl-purple { --lcd-bg: #c89af0; }
.lcd.bl-off { --lcd-bg: #8e9a8c; }
.lcd.lcd-off { --lcd-bg: #4f5650; --lcd-ghost: transparent; }
.lcd.lcd-off * { visibility: hidden; }
.lcd.alarm { animation: alarm .4s steps(2) infinite; }
@keyframes alarm { 50% { --lcd-bg: #ff6b5e; background: #ff6b5e; } }
.lcd-status { display: flex; align-items: center; gap: 8px; height: 14px; font-size: .65rem; }
.lcd-signal { display: flex; align-items: flex-end; gap: 1px; height: 12px; }
.lcd-signal i { width: 3px; background: var(--lcd-ghost); }
.lcd-signal i:nth-child(1) { height: 3px; } .lcd-signal i:nth-child(2) { height: 5px; } .lcd-signal i:nth-child(3) { height: 7px; }
.lcd-signal i:nth-child(4) { height: 9px; } .lcd-signal i:nth-child(5) { height: 12px; }
.lcd-signal i.on { background: var(--lcd-ink); }
.lcd-battery { margin-left: auto; display: flex; gap: 1px; border: 1px solid var(--lcd-ink); padding: 1px; border-radius: 2px; }
.lcd-battery i { width: 5px; height: 6px; background: var(--lcd-ghost); }
.lcd-battery i.on { background: var(--lcd-ink); }
.seg { color: var(--lcd-ghost); }
.seg.on { color: var(--lcd-ink); }
.lcd-line {
  display: grid; grid-template-columns: 12px 1fr auto; grid-template-areas: 'arrow icons icons' 'arrow text small';
  align-items: center; column-gap: 4px; margin-top: 2px;
}
.lcd-arrow { grid-area: arrow; color: var(--lcd-ghost); font-size: .7rem; }
.lcd-line.selected .lcd-arrow { color: var(--lcd-ink); }
.lcd-line.menu .lcd-arrow { color: var(--lcd-ghost); }
.lcd-icons { grid-area: icons; display: flex; gap: 7px; font-size: .62rem; line-height: 1; font-family: var(--font); font-weight: 700; height: 10px; }
.lcd-text { grid-area: text; font-size: 2rem; line-height: 1.1; letter-spacing: .02em; text-align: right; white-space: pre; overflow: hidden; }
.lcd-small { grid-area: small; font-size: .85rem; width: 30px; text-align: right; align-self: end; margin-bottom: 4px; }
.lcd-line.blink .lcd-text { animation: blink 1s steps(1) infinite; }
@keyframes blink { 50% { opacity: .25; } }

.voice-bubble {
  position: absolute; top: 40px; right: -8px; background: var(--surface); color: var(--text); border: 1px solid var(--border);
  padding: 6px 12px; border-radius: 16px 16px 16px 4px; font-size: .85rem; box-shadow: var(--shadow); pointer-events: none;
}

/* ----------------------------------------------------------------- lessons */
.lesson-list { list-style: none; padding: 0; display: grid; gap: 10px; max-width: 760px; }
.lesson-card {
  display: flex; gap: 16px; align-items: center; padding: 14px 16px; border-radius: var(--radius); background: var(--surface);
  border: 1px solid var(--border); color: var(--text); text-decoration: none; box-shadow: var(--shadow);
}
.lesson-card:hover { border-color: var(--accent); }
.lesson-num {
  flex: none; width: 36px; height: 36px; border-radius: 50%; display: grid; place-items: center; font-weight: 700;
  background: var(--surface-2);
}
.lesson-card.done .lesson-num { background: var(--ok-soft); color: var(--ok); }
.lesson-info { display: grid; gap: 1px; }
.lesson-meta { font-size: .75rem; text-transform: uppercase; letter-spacing: .08em; color: var(--accent-strong); font-weight: 700; }
.lesson-head { display: flex; justify-content: space-between; }
.lesson-title { font-size: 1.5rem; margin: .3em 0 .5em; }
.progress { height: 6px; background: var(--surface-2); border-radius: 3px; overflow: hidden; margin: 8px 0 14px; }
.progress-bar { height: 100%; width: 0; background: var(--accent); transition: width .3s; }
.step { min-height: 90px; font-size: 1rem; }
.step-count { font-size: .78rem; color: var(--muted); font-weight: 600; margin-bottom: 4px; }
.step-text p:first-child { margin-top: 0; }
.step.complete { position: relative; }
.step.complete::after {
  content: '✓ Nice!'; position: absolute; right: 0; top: -4px; background: var(--ok-soft); color: var(--ok);
  font-weight: 700; padding: 3px 10px; border-radius: 99px; font-size: .85rem;
}
.why summary { cursor: pointer; color: var(--accent-strong); font-weight: 600; font-size: .9rem; }
.why p { color: var(--muted); font-size: .92rem; }
.celebrate { text-align: center; padding: 10px 0; }
.celebrate-icon { font-size: 2.4rem; }
.celebrate h2 { margin: .2em 0; }

/* ----------------------------------------------------------------- menu guide */
.menu-tools { display: grid; gap: 10px; margin: 18px 0; max-width: 720px; }
.chips { display: flex; gap: 6px; flex-wrap: wrap; }
.chip { border: 1px solid var(--border); background: var(--surface); color: var(--text); padding: 5px 12px; border-radius: 99px; cursor: pointer; font: inherit; font-size: .85rem; }
.chip.active { background: var(--accent-soft); border-color: var(--accent); color: var(--accent-strong); font-weight: 600; }
.menu-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(300px, 1fr)); gap: 14px; }
.menu-card { background: var(--surface); border: 1px solid var(--border); border-radius: var(--radius); padding: 14px 16px; box-shadow: var(--shadow); }
.menu-card header { display: flex; align-items: center; gap: 8px; }
.menu-card p { margin: .4em 0; }
.menu-num { font-weight: 700; color: var(--muted); min-width: 1.6em; }
.menu-lcd { font-family: var(--mono); background: #9fc6ea; color: #10202e; padding: 1px 8px; border-radius: 4px; font-size: 1.05rem; }
.tag { margin-left: auto; font-size: .7rem; text-transform: uppercase; letter-spacing: .06em; color: var(--muted); border: 1px solid var(--border); padding: 1px 7px; border-radius: 99px; }
.key-recipe kbd { font-size: .75rem; }

/* ----------------------------------------------------------------- guide */
.prose { max-width: 820px; }
.prose p, .prose li { max-width: 72ch; }
.decoder h2 { margin-top: 0; }
.decoder-form { display: flex; gap: 8px; }
.keyseq { line-height: 2.1; }
.table { border-collapse: collapse; width: 100%; font-size: .9rem; }
.table th, .table td { text-align: left; padding: 7px 10px; border-bottom: 1px solid var(--border); vertical-align: top; }
.table th { color: var(--muted); font-weight: 600; font-size: .8rem; }
.diagram { width: 100%; height: auto; color: var(--text); margin: 8px 0; }
.diagram .d-tower path { stroke: var(--muted); stroke-width: 3; fill: none; }
.diagram .d-tower circle { fill: var(--accent); }
.diagram .d-radio rect { fill: #2a2b2e; }
.diagram .d-radio .d-lcd { fill: #9fc6ea; }
.diagram .d-up { stroke: var(--bad); stroke-width: 2.5; fill: none; color: var(--bad); stroke-dasharray: 6 4; }
.diagram .d-down { stroke: var(--ok); stroke-width: 2.5; fill: none; color: var(--ok); stroke-dasharray: 6 4; }
.diagram text { fill: var(--text); font: 13px var(--font); }
.diagram .d-label { font-weight: 700; }
.diagram .d-sub { fill: var(--muted); font-size: 11.5px; }
.diagram .d-tx { fill: var(--bad); font-weight: 700; }
.diagram .d-rx { fill: var(--ok); font-weight: 700; }

/* ----------------------------------------------------------------- programmer */
.prog-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 16px; }
@media (max-width: 820px) { .prog-grid { grid-template-columns: 1fr; } }
.checklist { padding-left: 1.2em; margin: 0; }
.checklist li { margin-bottom: 6px; }
.log { max-height: 180px; overflow: auto; background: var(--surface-2); padding: 8px; border-radius: 8px; font-size: .75rem; white-space: pre-wrap; }
.table-toolbar { display: flex; justify-content: space-between; align-items: center; flex-wrap: wrap; gap: 8px; }
.table-toolbar .panel-title { margin: 0; }
.table-toolbar .btn-row { margin: 0; }
.quick-add { display: flex; gap: 8px; margin-top: 12px; }
.table-scroll { overflow-x: auto; margin-top: 8px; }
.channels { font-size: .85rem; white-space: nowrap; }
.channels td { padding: 3px 5px; }
.channels tr.empty td { color: var(--muted); }
.channels tr.invalid { background: var(--bad-soft); }
.cell { font: inherit; font-family: ui-monospace, monospace; padding: 3px 5px; border: 1px solid var(--border); border-radius: 6px; background: var(--surface); color: var(--text); }
.cell:disabled { opacity: .35; }
.cell.bad { border-color: var(--bad); background: var(--bad-soft); }

@media (max-width: 480px) {
  .quick-add, .decoder-form { flex-wrap: wrap; }
  .input.narrow { flex: 1; }
}
@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { animation: none !important; transition: none !important; }
}
