body { background: radial-gradient(900px 420px at 10% -10%, color-mix(in srgb, var(--teal) 16%, transparent), transparent 60%), var(--bg); min-height: 100vh; }
.wrap { max-width: 760px; margin: 0 auto; padding: 24px 16px 48px; }
.head { display: flex; gap: 14px; align-items: center; margin-bottom: 16px; }
.head img { border-radius: 8px; }
h1 { font-size: calc(20px * var(--fs)); margin: 0 0 4px; letter-spacing: -0.02em; }
.head p { margin: 0; font-size: calc(13px * var(--fs)); }
.saved { margin-left: auto; font-size: calc(12px * var(--fs)); color: var(--teal); min-width: 50px; text-align: right; }
.panel { background: var(--panel); border: 1px solid color-mix(in srgb, var(--line) 40%, transparent); border-radius: 18px; padding: 14px 18px; margin-bottom: 14px; box-shadow: 0 16px 50px var(--shadow); }
h2 { font-size: calc(15px * var(--fs)); margin: 2px 0 10px; }
.row { display: flex; align-items: center; justify-content: space-between; gap: 16px; padding: 8px 0; border-top: 1px solid color-mix(in srgb, var(--line) 18%, transparent); font-size: calc(14px * var(--fs)); }
.row:first-of-type { border-top: 0; }
.row.strong span { font-weight: 650; }
.row.disabled { opacity: 0.7; }
.btns { display: flex; gap: 6px; flex: none; }
input[type=checkbox] { width: 20px; height: 20px; accent-color: var(--button-bg); flex: none; }
input[type=range] { width: 200px; accent-color: var(--button-bg); }
.field { display: flex; flex-direction: column; gap: 6px; font-size: calc(13px * var(--fs)); color: var(--muted); font-weight: 600; }
.input, .select { min-height: 38px; font: inherit; font-size: calc(14px * var(--fs)); color: var(--text); background: color-mix(in srgb, var(--panel-solid) 86%, transparent); border: 1.5px solid var(--line); border-radius: 10px; padding: 0 10px; }
.select { max-width: 360px; }
.hint { font-size: calc(12px * var(--fs)); color: var(--muted); margin: 6px 0 4px; }
.types { display: grid; grid-template-columns: repeat(auto-fill, minmax(220px, 1fr)); gap: 4px 14px; margin-top: 6px; }
.types fieldset { border: 0; margin: 0; padding: 6px 0; }
.types legend { font-size: calc(11px * var(--fs)); font-weight: 800; letter-spacing: 0.12em; text-transform: uppercase; color: var(--teal); padding: 0; margin-bottom: 4px; }
.types label { display: flex; gap: 8px; align-items: center; font-size: calc(13px * var(--fs)); padding: 2px 0; }
.types input { width: 16px; height: 16px; }
.types code { font-family: var(--mono); font-size: calc(10.5px * var(--fs)); color: var(--muted); }
.types.is-off { opacity: 0.45; pointer-events: none; }

h3 { font-size: calc(13px * var(--fs)); margin: 12px 0 6px; }
.checks { display: flex; flex-direction: column; gap: 4px; font-size: calc(13px * var(--fs)); }
.checks.cols { display: grid; grid-template-columns: repeat(auto-fill, minmax(170px, 1fr)); }
.checks label { display: flex; align-items: center; gap: 6px; }
.checks code { color: var(--muted); font-size: calc(11px * var(--fs)); }
.filter-summary { margin: 0 0 6px; padding: 6px 10px; border-radius: 10px; font-size: calc(13px * var(--fs)); font-weight: 650; color: #1A1200; background: #F5C451; display: inline-block; }
.group { margin: 8px 0 4px; }
.group-head { display: flex; align-items: center; gap: 8px; font-size: calc(12px * var(--fs)); font-weight: 800; letter-spacing: 0.06em; text-transform: uppercase; color: var(--teal); margin: 10px 0 4px; }
.group-head input { width: 16px; height: 16px; }
.cgrid { display: grid; grid-template-columns: repeat(auto-fill, minmax(165px, 1fr)); gap: 2px 12px; font-size: calc(13px * var(--fs)); }
.cgrid label { display: flex; gap: 6px; align-items: center; padding: 1px 0; }
.cgrid input { width: 16px; height: 16px; }
.cgrid code, .types .src { font-family: var(--mono); font-size: calc(10.5px * var(--fs)); color: var(--muted); }
.types .newtype { font-size: calc(10px * var(--fs)); font-weight: 800; color: var(--c-chp); }
.btn-xs { height: 26px; padding: 0 9px; font-size: calc(12px * var(--fs)); }
.btns .btn { height: 28px; padding: 0 10px; font-size: calc(12px * var(--fs)); }
h2 .src-pill { vertical-align: 2px; margin-right: 4px; }

/* 0.4.6: tidier layout — even row heights, aligned controls, Sources as one row per source with labelled checkboxes */
.panel { padding: 16px 20px; }
h2 { font-size: calc(15px * var(--fs)); margin: 0 0 8px; padding-bottom: 8px; border-bottom: 1px solid color-mix(in srgb, var(--line) 22%, transparent); display: flex; align-items: center; gap: 6px; }
h3 { font-size: calc(12px * var(--fs)); font-weight: 800; letter-spacing: 0.08em; text-transform: uppercase; color: var(--muted); margin: 16px 0 6px; }
h3 .muted { text-transform: none; letter-spacing: 0; font-weight: 500; }
.row { min-height: 40px; padding: 6px 0; line-height: 1.35; }
.row > span:first-child { min-width: 0; }
.hint { line-height: 1.45; margin: 4px 0 8px; }
.src-opt-head, .src-opt { display: grid; grid-template-columns: minmax(0, 1fr) 76px 76px; column-gap: 8px; align-items: center; }
.src-opt-head { font-size: calc(11px * var(--fs)); font-weight: 800; letter-spacing: 0.1em; text-transform: uppercase; color: var(--muted); padding: 4px 0 2px; }
.src-opt-head span:not(:first-child) { text-align: center; }
.src-desc { display: flex; align-items: center; gap: 10px; min-width: 0; }
.src-desc .src-pill { min-width: 76px; text-align: center; box-sizing: border-box; }
.src-text { font-size: calc(13.5px * var(--fs)); }
.chk { display: inline-flex; align-items: center; justify-content: center; gap: 6px; font-size: calc(12.5px * var(--fs)); color: var(--text); cursor: pointer; }
.chk input { width: 18px; height: 18px; }
.master-row { margin-top: 4px; }
@media (max-width: 520px) { .src-opt-head, .src-opt { grid-template-columns: minmax(0, 1fr) 64px 64px; } .src-desc { flex-wrap: wrap; gap: 4px 8px; } .src-text { font-size: calc(12.5px * var(--fs)); } .row { flex-wrap: wrap; } }

/* 0.4.8: AOR chips, Alerts switch, sound picker. On/off is always shown by text + shape, not colour alone. */
.aor-opt-chips { display: flex; flex-wrap: wrap; gap: 8px; margin: 4px 0 10px; }
.achip { display: inline-flex; align-items: center; gap: 6px; height: 34px; padding: 0 12px; border-radius: 8px; font: inherit; font-size: calc(14px * var(--fs)); font-weight: 700; cursor: pointer; }
.achip.is-on { border: 2px solid var(--text); background: color-mix(in srgb, var(--teal) 16%, transparent); color: var(--text); }
.achip.is-off { border: 2px dashed var(--line); background: transparent; color: var(--text); } /* 0.5.1: not greyed / struck through */
.achip-mark { font-weight: 900; }
.achip-mark:empty { display: none; }
.achip-state { font-size: calc(11px * var(--fs)); text-transform: uppercase; letter-spacing: 0.06em; }
.achip-n { font-size: calc(11px * var(--fs)); font-weight: 600; padding: 0 6px; border: 1px solid currentColor; border-radius: 999px; line-height: 16px; }
.achip:focus-visible, .big-tog:focus-visible { outline: 2px solid var(--amber); outline-offset: 2px; }
.aor-counties { display: flex; flex-direction: column; gap: 4px; font-size: calc(12.5px * var(--fs)); line-height: 1.45; margin-bottom: 4px; }
.aor-line.is-off { color: var(--muted); }
.aor-line.is-off b { text-decoration: line-through; }
.group.is-off .group-head { font-style: italic; } /* 0.5.1: no dimming — the counties stay clearly clickable */
.alerts-row > span:first-child { display: flex; flex-direction: column; gap: 2px; font-size: calc(15px * var(--fs)); }
.alerts-sub { font-weight: 400 !important; font-size: calc(12px * var(--fs)); }
.big-tog { flex: none; display: inline-grid; grid-template-columns: auto auto; grid-template-rows: auto auto; column-gap: 8px; align-items: center; min-width: 170px; padding: 8px 14px; border-radius: 12px; font: inherit; cursor: pointer; text-align: left; }
.big-tog .bt-ic { grid-row: 1 / 3; font-size: calc(22px * var(--fs)); }
.big-tog .bt-t { font-size: calc(16px * var(--fs)); font-weight: 800; letter-spacing: 0.02em; }
.big-tog .bt-sub { font-size: calc(11px * var(--fs)); color: var(--muted); }
.big-tog.is-on { border: 3px solid var(--text); background: color-mix(in srgb, var(--teal) 18%, transparent); color: var(--text); }
.big-tog.is-off { border: 3px dashed var(--muted); background: transparent; color: var(--text); }
.sound-pick { border-top: 1px solid color-mix(in srgb, var(--line) 18%, transparent); }
.sound-opt .chk-l { display: flex; align-items: center; gap: 10px; cursor: pointer; font-size: calc(14px * var(--fs)); }
.sound-opt input[type=radio] { width: 18px; height: 18px; accent-color: var(--button-bg); flex: none; }
.sound-opt:has(input:checked) { box-shadow: inset 4px 0 0 var(--text); padding-left: 10px; }
.sound-opt:has(input:checked) b::after { content: " ✓ selected"; font-size: calc(11px * var(--fs)); font-weight: 700; color: var(--muted); }

/* ---- 0.5.2: embedded in the Incoming settings sheet (?embed=1) ---- */
html.embed, html.embed body { background: transparent; }
html.embed .wrap { padding: 4px 10px 16px; max-width: none; }
html.embed .wrap > .head, html.embed #aorOptChips, html.embed #sec-aor > .hint, html.embed .row:has(#openIncoming) { display: none; }
#sec-about .about-line { margin: 0; font-size: calc(12.5px * var(--fs, 1)); line-height: 1.45; }
html.embed body { min-height: 0; background: transparent; }
