/* Band-plan checker: same field-tool styles as the RF exposure check, plus band bars and result blocks */
:root {
  --bg: #0f1419;
  --surface: #1a222c;
  --border: #2d3a47;
  --text: #e8eef4;
  --muted: #8b9aab;
  --accent: #3d9cf0;
  --accent-press: #2a7fc4;
  --ok: #3ecf8e;
  --bad: #f07178;
  --focus: #ffd166;
  --radius: 10px;
  --font: system-ui, -apple-system, "Segoe UI", Roboto, Ubuntu, sans-serif;
  --mono: ui-monospace, "Cascadia Code", "SF Mono", Menlo, Consolas, monospace;
}

*,
*::before,
*::after {
  box-sizing: border-box;
}

html {
  color-scheme: dark;
}

body {
  margin: 0;

  /* max-width moved to content via gota-island-chrome.css */
  padding: 0 0 2.5rem;


  font-family: var(--font);
  font-size: 1.05rem;
  line-height: 1.45;
  color: var(--text);
  background: var(--bg);
}

.skip-link {
  position: absolute;
  left: -9999px;
  top: 0;
  background: var(--focus);
  color: #111;
  padding: 0.5rem 1rem;
  z-index: 100;
}

.skip-link:focus {
  left: 0.5rem;
  top: 0.5rem;
}

.visually-hidden {
  position: absolute;
  width: 1px;
  height: 1px;
  padding: 0;
  margin: -1px;
  overflow: hidden;
  clip: rect(0, 0, 0, 0);
  white-space: nowrap;
  border: 0;
}

.muted {
  color: var(--muted);
  font-weight: 400;
}

.island-hero {
  margin-bottom: 1rem;
}

.eyebrow {
  margin: 0;
  font-size: 0.8rem;
  letter-spacing: 0.04em;
  text-transform: uppercase;
  color: var(--muted);
}

.island-hero h1 {
  margin: 0.2rem 0;
  font-size: 1.75rem;
  letter-spacing: -0.02em;
}

.tagline {
  margin: 0;
  color: var(--muted);
  font-size: 0.95rem;
}

.facts {
  background: var(--surface);
  border: 1px solid var(--border);
  border-left: 3px solid var(--accent);
  border-radius: var(--radius);
  padding: 0.75rem 1rem;
  margin-bottom: 1.25rem;
  font-size: 0.92rem;
}

.facts p {
  margin: 0 0 0.5rem;
}

.facts p:last-child {
  margin-bottom: 0;
}

.facts a {
  color: var(--accent);
}

.facts ul {
  margin: 0.4rem 0 0;
  padding-left: 1.2rem;
}

.facts li {
  margin: 0.2rem 0;
}

.note {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 0.75rem 1rem;
  margin-bottom: 1.25rem;
  font-size: 0.9rem;
  color: var(--muted);
}

.note strong {
  color: var(--text);
}

.form-grid {
  display: grid;
  gap: 0.85rem;
  margin-bottom: 1.25rem;
}

.field {
  display: grid;
  gap: 0.35rem;
}

.field-row {
  display: grid;
  gap: 0.85rem;
}

@media (min-width: 28rem) {
  .field-row.two {
    grid-template-columns: 1fr 1fr;
  }
}

label {
  font-weight: 600;
  font-size: 0.95rem;
}

.hint {
  margin: 0;
  font-size: 0.82rem;
  color: var(--muted);
  font-weight: 400;
}

input[type="text"],
input[type="number"],
input[type="email"],
select,
textarea {
  font: inherit;
  font-family: var(--mono);
  padding: 0.65rem 0.75rem;
  border-radius: var(--radius);
  border: 1px solid var(--border);
  background: var(--surface);
  color: var(--text);
  width: 100%;
}

select {
  font-family: var(--font);
  cursor: pointer;
}

textarea {
  min-height: 4.5rem;
  resize: vertical;
  line-height: 1.4;
}

input:focus-visible,
select:focus-visible,
textarea:focus-visible,
button:focus-visible {
  outline: 3px solid var(--focus);
  outline-offset: 2px;
}

.locked {
  opacity: 0.85;
}

.locked input,
.locked select {
  background: #141a22;
  color: var(--muted);
}

.preview-block {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 0.85rem 1rem;
  margin-bottom: 0.75rem;
}

.preview-block h2 {
  margin: 0 0 0.6rem;
  font-size: 1.05rem;
}

.preview-toolbar {
  display: flex;
  flex-wrap: wrap;
  gap: 0.5rem;
  align-items: center;
  margin-bottom: 0.65rem;
}

#preview {
  margin: 0;
  white-space: pre-wrap;
  word-break: break-word;
  font-family: var(--mono);
  font-size: 0.82rem;
  line-height: 1.5;
  color: var(--text);
  max-height: 22rem;
  overflow: auto;
}

.primary,
.secondary,
.ghost {
  font: inherit;
  font-weight: 600;
  padding: 0.7rem 1rem;
  border-radius: var(--radius);
  border: 1px solid transparent;
  cursor: pointer;
}

.primary {
  background: var(--accent);
  color: #fff;
}

.primary:hover,
.primary:active {
  background: var(--accent-press);
}

.secondary {
  background: var(--surface);
  border-color: var(--border);
  color: var(--text);
}

.ghost {
  background: transparent;
  border-color: var(--border);
  color: var(--muted);
}

.feedback {
  min-height: 1.4em;
  margin: 0;
  font-weight: 600;
  font-size: 0.9rem;
}

.feedback.ok {
  color: var(--ok);
}

.feedback.bad {
  color: var(--bad);
}

.feedback.warn {
  color: var(--warn, #b26b00);
}

.cta-row {
  display: flex;
  flex-wrap: wrap;
  gap: 0.5rem;
  margin: 1rem 0 0;
}

.cta-row a {
  display: inline-block;
  text-decoration: none;
  text-align: center;
}

.site-footer {
  margin-top: 2.5rem;
  padding-top: 1rem;
  border-top: 1px solid var(--border);
  font-size: 0.82rem;
  color: var(--muted);
}

.site-footer a {
  color: var(--accent);
}

.site-footer p {
  margin: 0 0 0.6rem;
}

kbd {
  font-family: var(--mono);
  font-size: 0.85em;
  padding: 0.1em 0.35em;
  border-radius: 4px;
  border: 1px solid var(--border);
  background: var(--surface);
}

@media (prefers-reduced-motion: reduce) {
  * {
    transition: none !important;
  }
}

/* ---- RF exposure additions ---- */
:root {
  --warn: #ffd166;
}

input[type="number"] {
  -moz-appearance: textfield;
}

.kv {
  display: grid;
  grid-template-columns: 1fr;
  gap: 0.15rem 1rem;
  margin: 0 0 1rem;
  font-size: 0.92rem;
}

@media (min-width: 36rem) {
  .kv {
    grid-template-columns: minmax(12rem, 16rem) 1fr;
  }
}

.kv dt {
  color: var(--muted);
}

.kv dd {
  margin: 0 0 0.35rem;
  font-family: var(--mono);
}

.result-cards {
  display: grid;
  gap: 0.75rem;
  margin-bottom: 1rem;
}

@media (min-width: 40rem) {
  .result-cards {
    grid-template-columns: repeat(3, 1fr);
  }
}

.card {
  background: var(--bg);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 0.75rem 0.85rem;
}

.card-k {
  margin: 0 0 0.35rem;
  font-size: 0.82rem;
  color: var(--muted);
  font-weight: 600;
}

.card-v {
  margin: 0 0 0.4rem;
  font-family: var(--mono);
  font-size: 1.15rem;
  font-weight: 700;
  color: var(--text);
}

#results h3 {
  margin: 0.5rem 0 0.4rem;
  font-size: 1rem;
}

.checks {
  list-style: none;
  margin: 0 0 0.75rem;
  padding: 0;
  font-size: 0.92rem;
}

.checks li {
  padding: 0.4rem 0.6rem;
  margin: 0 0 0.35rem;
  border-radius: 6px;
  border-left: 3px solid var(--border);
  background: var(--bg);
}

.checks li.ok {
  border-left-color: var(--ok);
}

.checks li.bad {
  border-left-color: var(--bad);
}

.checks li.warn {
  border-left-color: var(--warn);
}

.method {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 0.75rem 1rem;
  margin: 1rem 0;
  font-size: 0.9rem;
}

.method summary {
  cursor: pointer;
  font-weight: 600;
}

.method ol {
  padding-left: 1.2rem;
}

.method li {
  margin: 0.35rem 0;
}

/* ---- band-plan additions ---- */
.parsed { color: var(--text); }
.parsed:empty { display: none; }
label.inline { font-weight: 400; font-size: 0.85rem; display: inline-flex; gap: 0.4rem; align-items: center; cursor: pointer; }
label.inline input { width: auto; margin: 0; }
.presets { display: flex; flex-wrap: wrap; gap: 0.4rem; align-items: center; }
.presets .ghost { padding: 0.4rem 0.7rem; font-size: 0.85rem; font-family: var(--mono); }
#results:focus { outline: none; }
.block { border: 1px solid var(--border); border-radius: var(--radius); padding: 0.7rem 0.85rem; margin: 0 0 0.85rem; background: var(--bg); }
.legal-block { border-left: 4px solid var(--accent); }
.custom-block { border-left: 4px solid #b48ead; }
#results .block h3 { margin: 0 0 0.55rem; display: flex; flex-wrap: wrap; gap: 0.5rem; align-items: center; }
.badge { font-size: 0.72rem; letter-spacing: 0.06em; font-weight: 800; padding: 0.15rem 0.45rem; border-radius: 4px; color: #0f1419; }
.badge.legal { background: var(--accent); }
.badge.custom { background: #b48ead; }
.verdict { display: grid; gap: 0.2rem; padding: 0.6rem 0.75rem; border-radius: 8px; margin: 0 0 0.6rem; border: 1px solid var(--border); background: var(--surface); }
.verdict-v { font-size: 1.3rem; font-weight: 800; }
.verdict-k { font-family: var(--mono); font-size: 0.85rem; color: var(--muted); }
.v-ok { border-color: var(--ok); } .v-ok .verdict-v { color: var(--ok); }
.v-warn { border-color: var(--warn); } .v-warn .verdict-v { color: var(--warn); }
.v-no { border-color: var(--bad); } .v-no .verdict-v { color: var(--bad); }
.checks li.info { border-left-color: var(--muted); }
.cite { display: inline-block; font-family: var(--mono); font-size: 0.75rem; color: var(--muted); border: 1px solid var(--border); border-radius: 4px; padding: 0 0.3rem; margin-left: 0.15rem; white-space: nowrap; }
.suggest { margin: 0 0 0.6rem; }
.suggest .ghost { padding: 0.3rem 0.6rem; font-size: 0.85rem; margin-left: 0.3rem; }
.chip { display: inline-block; font-size: 0.8rem; font-weight: 700; padding: 0.1rem 0.45rem; margin: 0 0.25rem 0.2rem 0; border-radius: 999px; border: 1px solid var(--border); background: var(--surface); }
.chip.me { border-color: var(--accent); color: var(--accent); }
.tag { font-size: 0.72rem; color: var(--muted); border: 1px dashed var(--border); border-radius: 4px; padding: 0 0.3rem; font-weight: 400; }
.fit { font-weight: 700; margin: 0 0 0.5rem; }
.fit-fits { color: var(--ok); } .fit-conflict { color: var(--bad); } .fit-mismatch { color: var(--warn); } .fit-none { color: var(--muted); }
.kind { display: inline-block; font-size: 0.72rem; font-weight: 700; padding: 0 0.35rem; border-radius: 4px; background: var(--surface); border: 1px solid var(--border); margin-right: 0.2rem; }
.k-beacon, .k-sat, .k-rptin, .k-rptout { border-color: var(--bad); }
.k-ft8, .k-ft4, .k-wspr, .k-digital { border-color: var(--accent); }
.k-qrp, .k-calling, .k-simplex { border-color: var(--ok); }
.band-range { font-family: var(--mono); color: var(--muted); margin: -0.3rem 0 0.6rem; }
.std { margin: 0 0 0.6rem; font-size: 0.88rem; }
.std summary { cursor: pointer; font-weight: 600; }
.std ul { margin: 0.4rem 0 0; padding-left: 1.2rem; }
.nowrap { white-space: nowrap; }
.muted { color: var(--muted); }
.table-wrap { overflow-x: auto; -webkit-overflow-scrolling: touch; margin: 0 0 0.5rem; }
table.ov, table.plan { border-collapse: collapse; width: 100%; font-size: 0.88rem; }
table.ov th, table.ov td, table.plan th, table.plan td { text-align: left; padding: 0.35rem 0.5rem; border-bottom: 1px solid var(--border); vertical-align: top; }
table.ov thead th, table.plan thead th { color: var(--muted); font-weight: 600; font-size: 0.8rem; }
table.ov td:nth-child(2), table.plan td:first-child { font-family: var(--mono); }
.linkish { font: inherit; font-weight: 600; color: var(--accent); background: none; border: 0; padding: 0; cursor: pointer; text-decoration: underline; text-underline-offset: 2px; text-align: left; }
.linkish:hover { color: var(--text); }
.bars { margin: 0.3rem 0 0.8rem; }
.bar-row { display: grid; grid-template-columns: 6.2rem 1fr; gap: 0.5rem; align-items: center; margin: 0 0 0.3rem; }
.bar-k { font-size: 0.8rem; color: var(--muted); text-align: right; }
.bar { position: relative; height: 1.1rem; background: var(--surface); border: 1px solid var(--border); border-radius: 4px; overflow: hidden; }
.seg { position: absolute; top: 0; bottom: 0; }
.seg-cw { background: #5c6f84; }
.seg-data { background: #3d9cf0; }
.seg-phone { background: #3ecf8e; }
.seg-all { background: linear-gradient(90deg, #3d9cf0, #3ecf8e); }
.mark { position: absolute; top: -2px; bottom: -2px; width: 3px; margin-left: -1px; background: var(--focus); box-shadow: 0 0 0 1px #0f1419; }
.bar-scale { display: flex; justify-content: space-between; margin-left: 6.7rem; font-family: var(--mono); font-size: 0.72rem; color: var(--muted); }
.legend { font-size: 0.75rem; color: var(--muted); margin: 0.35rem 0 0; display: flex; flex-wrap: wrap; gap: 0.25rem 0.6rem; align-items: center; }
.sw { display: inline-block; width: 0.9rem; height: 0.6rem; border-radius: 2px; margin-right: 0.2rem; vertical-align: middle; }
@media (max-width: 30rem) {
  .bar-row { grid-template-columns: 4.6rem 1fr; }
  .bar-scale { margin-left: 5.1rem; }
  .verdict-v { font-size: 1.15rem; }
}
@media (prefers-reduced-motion: reduce) { * { scroll-behavior: auto !important; } }

/* ---- PA QSO Party checker additions ---- */
:root { --warn: #f2c14e; }
.drop { border: 2px dashed var(--border); border-radius: var(--radius); padding: 1.1rem; text-align: center; background: var(--surface); }
.drop.over { border-color: var(--accent); background: var(--bg); }
.drop p { margin: 0.3rem 0; }
.row-inline { display: flex; flex-wrap: wrap; gap: 0.5rem; align-items: center; margin: 0.5rem 0; }
.table-wrap { overflow-x: auto; }
.grid-table { width: 100%; border-collapse: collapse; font-size: 0.88rem; }
.grid-table th, .grid-table td { text-align: left; padding: 0.35rem 0.5rem; border-bottom: 1px solid var(--border); vertical-align: top; }
.grid-table tr.total td { font-weight: 700; }
.grid-table tr.row-bad td:first-child { border-left: 3px solid var(--bad); }
.grid-table tr.row-warn td:first-child { border-left: 3px solid var(--warn); }
.grid-table select { min-width: 12rem; }
.lvl-bad { color: var(--bad); }
.lvl-warn { color: var(--warn); }
.cgrid { list-style: none; padding: 0; margin: 0.5rem 0 1rem; display: grid; grid-template-columns: repeat(auto-fill, minmax(6.2rem, 1fr)); gap: 0.3rem; }
.cgrid li { border: 1px solid var(--border); border-radius: 6px; padding: 0.3rem 0.4rem; font-size: 0.78rem; background: var(--bg); }
.cgrid li b { display: block; font-family: var(--mono); font-size: 0.95rem; }
.cgrid li span { color: var(--muted); }
.cgrid li.worked { border-color: var(--ok); background: rgba(62, 207, 142, 0.14); }
.cgrid li.need { opacity: 0.85; }
.cgrid.small { grid-template-columns: repeat(auto-fill, minmax(3.4rem, 1fr)); }
.bars { list-style: none; padding: 0; margin: 0; font-size: 0.82rem; font-family: var(--mono); }
.bars li { display: grid; grid-template-columns: 7.5rem 1fr 2.5rem; gap: 0.4rem; align-items: center; margin: 2px 0; }
.bars .bar { display: block; height: 0.8rem; background: var(--accent); border-radius: 3px; }
.top { margin: 0; padding-left: 1.4rem; font-size: 0.92rem; }
.stats-cols { display: grid; gap: 1rem; }
@media (min-width: 48rem) { .stats-cols { grid-template-columns: 1fr 1fr; } }
#cab-preview { white-space: pre; overflow: auto; max-height: 22rem; font-family: var(--mono); font-size: 0.8rem; background: var(--bg); border: 1px solid var(--border); border-radius: var(--radius); padding: 0.6rem; }
.preview-block h2 .count, h3 .count { font-weight: 400; color: var(--muted); font-size: 0.85rem; margin-left: 0.4rem; }
.label-like { display: block; font-weight: 600; margin-bottom: 0.25rem; }
.field label.inline { display: flex; margin: 0.15rem 0; }
.drop label.inline { display: inline-flex; }

/* Live from PoLo */
#relay-code { font-family: var(--mono); letter-spacing: 0.1em; }
#live-status:empty { display: none; }
#paste-ham2k { width: 100%; font-family: var(--mono); font-size: 0.8rem; }
.paste-ham2k summary { cursor: pointer; }

/* PAQP Live add-on box */
.addon-box { border: 2px solid var(--accent); border-radius: var(--radius); background: var(--surface); padding: 1rem 1.25rem; margin: 0 0 1.25rem; }
.addon-box h2 { margin: 0 0 0.4rem; font-size: 1.15rem; }
.addon-box p { margin: 0.4rem 0; }
.addon-actions a.primary, .addon-actions a.secondary { display: inline-block; text-decoration: none; }
/* site chrome mutes every link in body > aside with !important; the buttons need their own colours */
body > aside.addon-box .addon-actions a.primary { color: #fff !important; }
body > aside.addon-box .addon-actions a.secondary { color: var(--text) !important; }

/* More stats */
.more-stats { display: grid; gap: 0.5rem; }
details.stat { border: 1px solid var(--border); border-radius: var(--radius); background: var(--surface); padding: 0.5rem 0.9rem; }
details.stat > summary { cursor: pointer; font-weight: 600; padding: 0.25rem 0; }
details.stat[open] > summary { margin-bottom: 0.5rem; }
details.stat h4 { margin: 0.75rem 0 0.35rem; font-size: 0.95rem; }
details.sub > summary { cursor: pointer; margin: 0.5rem 0; }
ul.chips { list-style: none; display: flex; flex-wrap: wrap; gap: 0.3rem 0.4rem; padding: 0; margin: 0.25rem 0 0.5rem; }
ul.chips li { border: 1px solid var(--border); border-radius: 999px; padding: 0.1rem 0.55rem; font-size: 0.85rem; }

/* County map */
.map-wrap { position: relative; max-width: 900px; }
.pa-map svg { display: block; width: 100%; height: auto; }
.pa-map path { fill: var(--surface); stroke: var(--muted); stroke-width: 0.8; vector-effect: non-scaling-stroke; stroke-linejoin: round; cursor: default; }
.pa-map path.w { fill: var(--accent); }
.pa-map path.w.l1 { fill: color-mix(in srgb, var(--accent) 35%, var(--surface)); }
.pa-map path.w.l2 { fill: color-mix(in srgb, var(--accent) 58%, var(--surface)); }
.pa-map path.w.l3 { fill: color-mix(in srgb, var(--accent) 80%, var(--surface)); }
.pa-map path.w.l4 { fill: var(--accent); }
.pa-map path:hover, .pa-map path:focus { stroke: var(--text); stroke-width: 2.2; outline: none; }
.pa-map path:focus-visible { stroke-width: 3; }
.map-tip { position: absolute; pointer-events: none; background: var(--bg, #111); color: var(--text); border: 1px solid var(--border); border-radius: 6px; padding: 0.25rem 0.5rem; font-size: 0.85rem; white-space: nowrap; box-shadow: 0 2px 8px rgba(0,0,0,0.3); }
.map-legend { display: flex; flex-wrap: wrap; align-items: center; gap: 0.3rem 0.6rem; }
.map-legend .sw { display: inline-block; width: 1.1em; height: 0.8em; border: 1px solid var(--muted); border-radius: 2px; background: var(--surface); vertical-align: middle; }
.map-legend .sw.w { background: var(--accent); }
.map-legend .sw.w.l1 { background: color-mix(in srgb, var(--accent) 35%, var(--surface)); }
.map-legend .sw.w.l2 { background: color-mix(in srgb, var(--accent) 58%, var(--surface)); }
.map-legend .sw.w.l3 { background: color-mix(in srgb, var(--accent) 80%, var(--surface)); }
.map-credit { font-size: 0.78rem; margin-top: 0; }

/* in-app web view helpers (embed.js) */
.embed-box { border: 1px solid var(--border); border-left: 4px solid var(--focus); border-radius: var(--radius); padding: 0.6rem 0.8rem; margin: 0.75rem 0; }
.embed-box.small { padding: 0.35rem 0.6rem; }
.embed-box a.primary, .embed-box a.secondary { display: inline-block; text-decoration: none; }
.embed-choices { display: flex; flex-wrap: wrap; gap: 0.35rem; margin: 0.2rem 0; }
.embed-choice[aria-pressed="true"] { outline: 2px solid var(--focus); font-weight: 700; }
.embed-hidden { display: none !important; }
.embed-has-edit { position: relative; }
.embed-edit { margin-top: 0.25rem; }
.embed-url { width: 100%; min-height: 4rem; font-family: var(--mono); font-size: 0.75rem; }
/* keep header fields and their buttons clear of the sticky site header when scrolled to */
[data-hdr], .embed-choice, .embed-edit, .embed-box a, .embed-box button { scroll-margin-top: 6rem; scroll-margin-bottom: 2rem; }
