/* FreqAF site: the phone frame and the interface illustrations inside it.
   These are drawings in FreqAF's design language, shown until real
   screenshots are dropped into assets/screens/ (see the README there). */

.phone {
  position: relative; width: min(100%, 302px); padding: 9px; border-radius: 46px;
  background: linear-gradient(160deg, #222A3D 0%, #0C1018 38%, #0A0D14 100%);
  box-shadow:
    0 0 0 1px rgba(148, 163, 184, 0.22),
    inset 0 0 0 1.5px rgba(0, 0, 0, 0.7),
    0 60px 100px -50px rgba(0, 0, 0, 0.95),
    0 34px 70px -36px rgba(44, 198, 255, 0.3);
}
.phone::before {
  /* camera */
  content: ''; position: absolute; left: 50%; top: 20px; z-index: 3;
  width: 9px; height: 9px; margin-left: -4.5px; border-radius: 50%;
  background: #04060A; box-shadow: 0 0 0 1.5px #1A2132;
}
.phone-screen {
  position: relative; overflow: hidden; isolation: isolate;
  aspect-ratio: 9 / 19.5; border-radius: 37px; background: var(--bg-app);
}
.phone-screen > img { width: 100%; height: 100%; object-fit: cover; }
.device.has-shot .phone::before { display: none; }

.ui {
  position: absolute; inset: 0; display: flex; flex-direction: column;
  font-size: 12px; line-height: 1.3; color: var(--text);
  -webkit-user-select: none; user-select: none; cursor: default;
}
.ui svg { display: inline-block; }
.ui i { font-style: normal; }
.ui small { font-size: inherit; }

.ui-status { flex: none; height: 36px; padding: 8px 22px 0; display: flex; align-items: center; justify-content: space-between; font-size: 11px; font-weight: 600; }
.ui-status-r { display: flex; align-items: center; gap: 4px; }
.ui-status-r i { display: block; width: 11px; height: 8px; border-radius: 2px; background: var(--text); opacity: 0.85; }
.ui-status-r i:first-child { clip-path: polygon(0 100%, 100% 0, 100% 100%); border-radius: 0; }
.ui-status-r i:nth-child(2) { clip-path: polygon(50% 100%, 0 25%, 22% 0, 78% 0, 100% 25%); border-radius: 0; }
.ui-status-r i:last-child { width: 18px; border-radius: 2.5px; }

.ui-bar { flex: none; display: flex; align-items: center; justify-content: space-between; gap: 10px; padding: 6px 16px 12px; }
.ui-title { font-size: 20px; font-weight: 650; letter-spacing: -0.025em; line-height: 1.15; }
.ui-sub { margin-top: 3px; font-size: 10px; color: var(--text-muted); }
.ui-back { margin-right: 8px; font-weight: 400; color: var(--accent); }
.ui-iconbtn {
  width: 34px; height: 34px; flex: none; display: grid; place-items: center;
  border-radius: 11px; background: var(--bg-surface-2); border: 1px solid var(--border-strong);
  font-size: 18px; line-height: 1; color: var(--text-muted);
}
.ui-iconbtn svg { width: 15px; height: 15px; }

.ui-tabs {
  flex: none; margin-top: auto; height: 56px; padding-bottom: 5px;
  display: grid; grid-template-columns: repeat(4, 1fr); align-items: center;
  border-top: 1px solid var(--border); background: rgba(9, 12, 19, 0.94);
  font-size: 9.5px; font-weight: 500; color: var(--text-faint);
}
.ui-tabs span { display: grid; justify-items: center; gap: 3px; }
.ui-tabs svg { width: 18px; height: 18px; }
.ui-tabs .on { color: var(--accent); }

.st { display: inline-flex; align-items: center; gap: 5px; height: 21px; padding: 0 9px; border-radius: 999px; font-size: 9.5px; font-weight: 500; white-space: nowrap; }
.st i { width: 5px; height: 5px; border-radius: 50%; background: currentColor; }
.st-clear { color: var(--clear); background: rgba(52, 211, 153, 0.12); }
.st-caution { color: var(--caution); background: rgba(251, 191, 36, 0.12); }
.st-conflict { color: var(--conflict); background: rgba(251, 90, 107, 0.14); }

/* Home: transmitter list */
.ui-sum { flex: none; display: flex; gap: 6px; padding: 0 14px 12px; }
.txl { flex: 1; min-height: 0; overflow: hidden; padding: 0 12px; display: grid; gap: 6px; align-content: start; }
.txr { --c: var(--clear); position: relative; padding: 8px 11px 9px 17px; border-radius: 13px; background: var(--bg-surface); border: 1px solid var(--border); }
.txr::before { content: ''; position: absolute; left: 7px; top: 10px; bottom: 10px; width: 3px; border-radius: 3px; background: var(--c); }
.txr[data-state='caution'] { --c: var(--caution); border-color: rgba(251, 191, 36, 0.22); }
.txr[data-state='conflict'] { --c: var(--conflict); border-color: rgba(251, 90, 107, 0.3); background: linear-gradient(90deg, rgba(251, 90, 107, 0.09), rgba(251, 90, 107, 0) 70%), var(--bg-surface); }
.txr-top { display: flex; align-items: baseline; justify-content: space-between; gap: 8px; }
.txr-name { display: inline-flex; align-items: center; gap: 5px; font-size: 12.5px; font-weight: 600; }
.txr-name svg { width: 10px; height: 10px; color: var(--text-muted); }
.txr-f { font-size: 14px; font-weight: 600; letter-spacing: -0.01em; }
.txr-f small { margin-left: 4px; font-size: 8.5px; font-weight: 500; letter-spacing: 0.02em; color: var(--text-faint); }
.txr-chips { margin-top: 6px; display: flex; gap: 4px; }
.txr-chips i { padding: 2px 5px; border-radius: 5px; font-size: 8.5px; font-weight: 500; letter-spacing: 0.02em; color: var(--clear); background: rgba(52, 211, 153, 0.1); }
.txr-chips .c-caution { color: var(--caution); background: rgba(251, 191, 36, 0.16); }
.txr-chips .c-conflict { color: var(--conflict); background: rgba(251, 90, 107, 0.18); }
.ui-fab {
  position: absolute; right: 14px; bottom: 68px; z-index: 2;
  display: inline-flex; align-items: center; gap: 7px; height: 42px; padding: 0 17px 0 14px; border-radius: 15px;
  background: linear-gradient(180deg, var(--accent-glow), var(--accent)); color: #04121C;
  font-size: 12.5px; font-weight: 650;
  box-shadow: 0 14px 28px -8px rgba(44, 198, 255, 0.65), 0 0 0 4px rgba(7, 9, 15, 0.6);
}
.ui-fab svg { width: 15px; height: 15px; }

/* Transmitter frequency */
.fq { flex: none; padding: 0 16px 12px; }
.fq-read { font-size: 35px; font-weight: 600; letter-spacing: -0.035em; line-height: 1.05; }
.fq-read small { margin-left: 7px; font-size: 11px; font-weight: 500; letter-spacing: 0; color: var(--text-muted); }
.fq-meta { margin-top: 9px; display: flex; align-items: center; gap: 10px; font-size: 10px; color: var(--text-faint); }
.fq-plot { flex: none; position: relative; height: 170px; margin: 0 12px; overflow: hidden; border-radius: 13px; background: #080B12; border: 1px solid var(--border); }
.fq-plot svg { position: absolute; left: 0; top: 0; width: 100%; height: calc(100% - 21px); }
.fq-axis { position: absolute; left: 0; right: 0; bottom: 0; height: 21px; padding: 0 8px; display: flex; align-items: center; justify-content: space-between; border-top: 1px solid var(--border); font-size: 8.5px; color: var(--text-faint); }
.fq-axis span:nth-child(2) { color: var(--clear); }
.fq-tag { position: absolute; padding: 1px 5px; border-radius: 4px; font-size: 8px; font-weight: 500; letter-spacing: 0.06em; }
.fq-tag-tv { right: 5px; top: 7px; color: var(--excluded); background: #10151F; }
.fq-tag-old { left: 31.7%; top: 52px; transform: translateX(-50%); color: var(--conflict); background: rgba(251, 90, 107, 0.16); }
.fq-pin { position: absolute; left: 50%; top: 5px; width: 10px; height: 10px; margin-left: -5px; border-radius: 50%; background: var(--clear); box-shadow: 0 0 0 4px rgba(52, 211, 153, 0.22); }
.chk { flex: none; margin: 10px 12px 0; padding: 1px 12px; border-radius: 13px; background: var(--bg-surface); border: 1px solid var(--border); font-size: 10.5px; }
.chk li { display: grid; grid-template-columns: 1fr auto 14px; align-items: center; gap: 10px; height: 27px; }
.chk li + li { border-top: 1px solid var(--border); }
.chk span { color: var(--text-muted); }
.chk b { font-weight: 500; }
.chk svg { width: 13px; height: 13px; color: var(--clear); }
.ui-actions { flex: none; display: grid; grid-template-columns: 1fr 1.5fr; gap: 8px; padding: 10px 12px 0; }
.ui-btn { height: 38px; display: inline-flex; align-items: center; justify-content: center; gap: 6px; border-radius: 12px; background: var(--bg-surface-2); border: 1px solid var(--border-strong); font-size: 12px; font-weight: 600; }
.ui-btn svg { width: 13px; height: 13px; }
.ui-btn.is-primary { border-color: transparent; background: linear-gradient(180deg, var(--accent-glow), var(--accent)); color: #04121C; }

/* Live analyzer */
.seg { flex: none; margin: 0 12px 10px; padding: 3px; display: grid; grid-template-columns: 1fr 1fr; gap: 3px; border-radius: 11px; background: var(--bg-surface); border: 1px solid var(--border); font-size: 10px; text-align: center; }
.seg span { padding: 6px 0; border-radius: 8px; color: var(--text-muted); }
.seg .on { background: var(--bg-surface-3); color: var(--text); box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.05); }
.lv { flex: 1; min-height: 0; margin: 0 12px; display: flex; flex-direction: column; overflow: hidden; border-radius: 13px; border: 1px solid var(--border); background: #080B12; }
.lv-spec { position: relative; flex: 0 0 44%; background: linear-gradient(rgba(148, 163, 184, 0.06) 1px, transparent 1px) 0 0 / 100% 25%; }
.lv-fall { position: relative; flex: 1; min-height: 0; background: linear-gradient(180deg, #0B1626, #080B12); }
.lv canvas, .lv noscript img { position: absolute; inset: 0; width: 100%; height: 100%; }
.lv-key { position: absolute; left: 8px; top: 7px; display: flex; align-items: center; gap: 5px; font-size: 8.5px; color: var(--text-muted); }
.lv-key i { display: block; width: 10px; height: 2px; border-radius: 2px; }
.lv-key .k-live { background: var(--accent); }
.lv-key .k-hold { margin-left: 6px; background: rgba(231, 236, 243, 0.7); }
.lv-axis { flex: none; height: 19px; padding: 0 6px; display: flex; align-items: center; justify-content: space-between; border-top: 1px solid var(--border); border-bottom: 1px solid var(--border); font-size: 8.5px; color: var(--text-faint); }
.tog { flex: none; display: flex; gap: 6px; padding: 10px 12px; font-size: 10px; }
.tog span { display: inline-flex; align-items: center; gap: 6px; height: 27px; padding: 0 11px; border-radius: 999px; color: var(--accent); border: 1px solid var(--accent-line); background: var(--accent-soft); }
.tog i { width: 6px; height: 6px; border-radius: 50%; background: var(--accent); }

/* TX monitor */
.mon { flex: 1; min-height: 0; padding: 0 12px 10px; display: grid; grid-template-columns: 1fr 1fr; grid-auto-rows: minmax(0, 1fr); gap: 8px; }
.mon li { position: relative; min-height: 0; padding: 9px 10px 10px; display: flex; flex-direction: column; border-radius: 13px; background: var(--bg-surface); border: 1px solid var(--border); }
.mon-top { display: flex; align-items: baseline; justify-content: space-between; gap: 6px; font-size: 11.5px; font-weight: 600; }
.mon-top b { font-size: 12px; font-weight: 600; }
.mon-f { margin-top: 1px; font-size: 9.5px; color: var(--text-muted); }
.mon svg { flex: 1; min-height: 0; width: 100%; margin-top: 6px; }
.mon polyline { fill: none; stroke: var(--accent); stroke-width: 1.4; stroke-linejoin: round; stroke-linecap: round; vector-effect: non-scaling-stroke; }
.mon-bar { flex: none; height: 4px; margin-top: 7px; overflow: hidden; border-radius: 4px; background: var(--bg-surface-3); }
.mon-bar i { display: block; width: var(--lv); height: 100%; border-radius: 4px; background: var(--spectrum); }
/* the transmitter being measured right now */
.mon li::after {
  content: ''; position: absolute; inset: -1px; border-radius: 13px; pointer-events: none;
  border: 1.5px solid var(--accent); box-shadow: 0 0 0 3px rgba(44, 198, 255, 0.14);
  opacity: 0; animation: mon-cycle 9.6s linear infinite; animation-delay: calc(var(--i) * 1.2s);
}
@keyframes mon-cycle { 0% { opacity: 0; } 1.5% { opacity: 1; } 11% { opacity: 1; } 13.5% { opacity: 0; } 100% { opacity: 0; } }
@media (prefers-reduced-motion: reduce) {
  .mon li::after { animation: none; }
  .mon li:first-child::after { opacity: 1; }
}
