/* Band plan reference page. Self-contained like hardware.css -- this page
   does not load the main app's stylesheet chain, so everything it needs is
   here. Never move any of this back into an inline <style>: style-src 'self'
   blocks it and the page renders unstyled with a 200 and a correct <title>. */

:root {
  color-scheme: dark;
  --bg: #071019;
  --panel: #102332;
  --line: #285064;
  --text: #eefaff;
  --muted: #a8bfcd;
  --cyan: #5ee6ff;
  --green: #78f0b3;
  --amber: #ffc766;
  --orange: #ff9d5c;
  --red: #ff7a82;
}

* { box-sizing: border-box; }

body {
  margin: 0;
  min-height: 100vh;
  background: radial-gradient(circle at 75% 0, #123b52 0, transparent 34rem), var(--bg);
  color: var(--text);
  font: 16px/1.55 system-ui, -apple-system, "Segoe UI", sans-serif;
}

.shell { width: min(1100px, calc(100% - 1.2rem)); margin: auto; }
main { padding: clamp(2.5rem, 7vw, 5rem) 0; }

h1 {
  font-size: clamp(2rem, 6vw, 3.75rem);
  line-height: 1.05;
  letter-spacing: -.04em;
  margin: .2rem 0 1rem;
}
.lede { max-width: 760px; color: var(--muted); font-size: 1.1rem; }

.tag {
  display: inline-flex;
  border-radius: 999px;
  padding: .35rem .65rem;
  background: rgba(120, 240, 179, .12);
  color: var(--green);
  font-size: .78rem;
  font-weight: 850;
  letter-spacing: .07em;
  text-transform: uppercase;
}

.skip-link {
  position: fixed;
  left: 1rem;
  top: -5rem;
  z-index: 100;
  padding: .8rem 1rem;
  border-radius: 10px;
  color: #031018;
  background: var(--cyan);
  font-weight: 800;
  text-decoration: none;
}
.skip-link:focus { top: 1rem; }

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

/* --- legend ------------------------------------------------------------- */

.legend {
  display: grid;
  grid-template-columns: auto minmax(0, 1fr);
  gap: .5rem .8rem;
  align-items: center;
  margin: 2rem 0 1.5rem;
  padding: 1.1rem 1.2rem;
  border: 1px solid var(--line);
  border-radius: 18px;
  background: rgba(16, 35, 50, .72);
}
.legend small { color: var(--muted); font-size: .86rem; }

.caution {
  display: inline-flex;
  justify-content: center;
  padding: .3rem .6rem;
  border-radius: 999px;
  font-size: .72rem;
  font-weight: 850;
  letter-spacing: .04em;
  white-space: nowrap;
}
.caution-none { background: rgba(120, 240, 179, .16); color: var(--green); }
.caution-privacy { background: rgba(255, 199, 102, .16); color: var(--amber); }
.caution-safety { background: rgba(255, 157, 92, .16); color: var(--orange); }
.caution-restricted { background: rgba(255, 122, 130, .18); color: var(--red); }

/* --- toolbar ------------------------------------------------------------ */

.bandplan-toolbar { display: grid; gap: .4rem; margin-bottom: 1rem; }
.bandplan-toolbar label { color: var(--muted); font-size: .8rem; }
.bandplan-toolbar input {
  width: 100%;
  padding: .75rem .9rem;
  border-radius: 12px;
  border: 1px solid var(--line);
  background: rgba(7, 16, 25, .8);
  color: var(--text);
  font: inherit;
}
.bandplan-toolbar input:focus-visible { outline: 3px solid rgba(94, 230, 255, .35); outline-offset: 2px; }
.bandplan-count { color: var(--muted); font-size: .78rem; font-variant-numeric: tabular-nums; }

/* --- table -------------------------------------------------------------- */

/* The table scrolls inside its own container so the page body never scrolls
   sideways on a phone -- this page is meant to be usable in the field. */
.bandplan-scroll {
  overflow-x: auto;
  border: 1px solid var(--line);
  border-radius: 18px;
  background: rgba(16, 35, 50, .6);
}

.bandplan { width: 100%; border-collapse: collapse; min-width: 760px; }
.bandplan thead th {
  position: sticky;
  top: 0;
  padding: .85rem 1rem;
  background: #0d1f2c;
  border-bottom: 1px solid var(--line);
  color: var(--cyan);
  font-size: .72rem;
  letter-spacing: .1em;
  text-transform: uppercase;
  text-align: left;
}
.bandplan tbody tr { border-bottom: 1px solid rgba(40, 80, 100, .45); }
.bandplan tbody tr:last-child { border-bottom: none; }
.bandplan tbody tr:hover { background: rgba(94, 230, 255, .05); }
.bandplan td, .bandplan tbody th {
  padding: .8rem 1rem;
  vertical-align: top;
  text-align: left;
  font-weight: 400;
}
.bandplan tbody th { color: var(--cyan); font-weight: 800; font-variant-numeric: tabular-nums; white-space: nowrap; }
.bandplan td strong { display: block; }
.bandplan td small { display: block; margin-top: .2rem; color: var(--muted); font-size: .82rem; }
.bandplan-empty { color: var(--muted); text-align: center; padding: 2rem 1rem; }

/* --- footer bits -------------------------------------------------------- */

.note {
  margin-top: 1.5rem;
  padding: 1rem;
  border-radius: 14px;
  background: rgba(94, 230, 255, .08);
  border: 1px solid rgba(94, 230, 255, .22);
  color: #cceaf4;
}

.actions { display: flex; gap: .65rem; flex-wrap: wrap; margin-top: 1.25rem; }
.button {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 46px;
  border-radius: 999px;
  padding: .75rem 1rem;
  background: var(--cyan);
  color: #031018;
  text-decoration: none;
  font-weight: 850;
}
.secondary { background: #193a4e; color: var(--text); border: 1px solid #376079; }

footer { padding: 2rem 0 4rem; color: var(--muted); }

@media (max-width: 700px) {
  .legend { grid-template-columns: minmax(0, 1fr); }
  .legend small { margin-bottom: .4rem; }
}
