/* ============================================================
   cutfilemanager — visual identity
   Grounded in the subject: antenna range instrumentation.
   Two functional accent colors (co-pol / cross-pol) reused
   everywhere they have meaning, not as decoration.
   ============================================================ */

:root {
  --bg: #0e1420;
  --panel: #141c2c;
  --panel-2: #182238;
  --line: #2a3b52;
  --line-soft: #1c2738;
  --text: #ecf1f7;
  --text-muted: #8d9bb0;
  --co: #e8935b;      /* co-pol amber */
  --co-dim: #6b4a30;
  --xpol: #5fd3c4;     /* cross-pol teal */
  --xpol-dim: #2f5a53;
  --danger: #e0674f;
}

* { box-sizing: border-box; }

html { -webkit-text-size-adjust: 100%; }

body {
  margin: 0;
  background: var(--bg);
  background-image:
    radial-gradient(circle at 78% 8%, rgba(95, 211, 196, 0.06), transparent 40%),
    radial-gradient(circle at 15% 85%, rgba(232, 147, 91, 0.05), transparent 45%);
  color: var(--text);
  font-family: "Space Grotesk", "Segoe UI", system-ui, sans-serif;
  line-height: 1.5;
}

.mono {
  font-family: "IBM Plex Mono", ui-monospace, "SFMono-Regular", monospace;
}

a { color: inherit; }

/* ---------- Nav ---------- */

.nav {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 22px clamp(20px, 5vw, 64px);
  border-bottom: 1px solid var(--line-soft);
}

.nav .mark {
  display: flex;
  align-items: baseline;
  gap: 10px;
  font-weight: 600;
  font-size: 17px;
  letter-spacing: 0.01em;
}

.nav .mark .dot {
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background: var(--co);
  box-shadow: 0 0 0 3px var(--co-dim);
  flex: none;
}

.nav .tag {
  color: var(--text-muted);
  font-size: 13px;
}

.nav-right {
  display: flex;
  align-items: center;
  gap: 22px;
}

.nav-right a {
  color: var(--text-muted);
  text-decoration: none;
  font-size: 13px;
}

.nav-right a:hover {
  color: var(--co);
}

.nav-right .nav-donate {
  color: var(--co);
}

/* ---------- Donation amount picker ---------- */

.amount-grid {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 10px;
  margin-top: 18px;
}

.amount-option {
  position: relative;
  display: block;
}

.amount-option input {
  position: absolute;
  opacity: 0;
  width: 0;
  height: 0;
}

.amount-option span {
  display: block;
  text-align: center;
  padding: 14px 8px;
  border: 1px solid var(--line);
  cursor: pointer;
  font-family: "IBM Plex Mono", monospace;
  font-size: 14px;
  color: var(--text-muted);
}

.amount-option input:checked + span {
  border-color: var(--co);
  color: var(--co);
  background: rgba(232, 147, 91, 0.06);
}

/* ---------- Upload mode toggle (single/multi frequency) ---------- */

.mode-toggle {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 10px;
  margin-bottom: 14px;
}

.hint {
  font-size: 12.5px;
  color: var(--text-muted);
  line-height: 1.5;
  margin: 8px 0 0;
}

.custom-amount-input {
  width: 100%;
  margin-top: 12px;
  background: var(--panel);
  border: 1px solid var(--line);
  color: var(--text);
  padding: 12px 14px;
  font-family: "Space Grotesk", sans-serif;
  font-size: 14.5px;
}

.custom-amount-input:focus {
  outline: none;
  border-color: var(--xpol);
}

.donate-box h2 {
  font-size: 22px;
  font-weight: 600;
  margin: 0 0 8px;
}

.donate-box .sub {
  color: var(--text-muted);
  font-size: 14.5px;
  margin: 0 0 4px;
  line-height: 1.5;
}

.donate-box.embedded {
  margin-top: 28px;
  padding-top: 24px;
  border-top: 1px solid var(--line-soft);
}

/* ---------- Hero ---------- */

.hero {
  display: grid;
  grid-template-columns: 1.05fr 0.95fr;
  gap: 48px;
  align-items: end;
  max-width: 1180px;
  margin: 0 auto;
  padding: clamp(36px, 6vw, 84px) clamp(20px, 5vw, 64px) 40px;
}

@media (max-width: 860px) {
  .hero { grid-template-columns: 1fr; }
}

.hero h1 {
  font-size: clamp(30px, 4.2vw, 46px);
  line-height: 1.12;
  font-weight: 600;
  letter-spacing: -0.01em;
  margin: 0 0 18px;
  max-width: 15ch;
}

.hero p.lead {
  color: var(--text-muted);
  font-size: 16.5px;
  max-width: 46ch;
  margin: 0 0 32px;
}

/* ---------- Upload panel ---------- */

.upload-panel {
  background: var(--panel);
  border: 1px solid var(--line);
  padding: 22px;
}

.dropzone {
  border: 1px dashed var(--line);
  padding: 28px 20px;
  text-align: center;
  transition: border-color 0.15s ease, background 0.15s ease;
}

.dropzone.is-dragover {
  border-color: var(--co);
  background: rgba(232, 147, 91, 0.06);
}

.dropzone .filename {
  color: var(--text-muted);
  font-size: 13px;
  margin-top: 4px;
  min-height: 1.2em;
}

.dropzone .glyph {
  font-family: "IBM Plex Mono", monospace;
  font-size: 22px;
  color: var(--xpol);
  margin-bottom: 10px;
}

.dropzone input[type="file"] { display: none; }

.dropzone label.browse {
  color: var(--co);
  cursor: pointer;
  text-decoration: underline;
  text-underline-offset: 3px;
  text-decoration-color: var(--co-dim);
}

.btn-primary {
  width: 100%;
  margin-top: 16px;
  padding: 14px 18px;
  background: var(--co);
  color: #1a1006;
  border: none;
  font-family: inherit;
  font-weight: 600;
  font-size: 15px;
  cursor: pointer;
}

.btn-primary:hover { background: #f0a370; }
.btn-primary:focus-visible { outline: 2px solid var(--xpol); outline-offset: 2px; }

.readout {
  display: flex;
  margin-top: 18px;
  border-top: 1px solid var(--line-soft);
  padding-top: 14px;
}

.readout .field {
  flex: 1;
  padding: 0 14px;
  border-left: 1px solid var(--line-soft);
}
.readout .field:first-child { padding-left: 0; border-left: none; }

.readout .field .k {
  font-size: 10.5px;
  color: var(--text-muted);
  letter-spacing: 0.02em;
}
.readout .field .v {
  font-family: "IBM Plex Mono", monospace;
  font-size: 13px;
  color: var(--text);
  margin-top: 3px;
}

/* ---------- Polar pattern visual ---------- */

.pattern-frame {
  position: relative;
  aspect-ratio: 1 / 1;
  background: var(--panel);
  border: 1px solid var(--line);
}

.pattern-frame svg { display: block; width: 100%; height: 100%; }

.pattern-legend {
  position: absolute;
  bottom: 16px;
  left: 16px;
  display: flex;
  gap: 18px;
  font-family: "IBM Plex Mono", monospace;
  font-size: 11.5px;
}

.pattern-legend .item { display: flex; align-items: center; gap: 7px; color: var(--text-muted); }
.pattern-legend .swatch { width: 14px; height: 2px; }
.pattern-legend .swatch.co { background: var(--co); }
.pattern-legend .swatch.xp { background: var(--xpol); }

@media (prefers-reduced-motion: no-preference) {
  .sweep { animation: sweep-rotate 5s linear infinite; transform-origin: 200px 200px; }
}
@keyframes sweep-rotate {
  from { transform: rotate(0deg); }
  to   { transform: rotate(360deg); }
}

/* ---------- Steps ---------- */

.steps {
  max-width: 1180px;
  margin: 0 auto;
  padding: 40px clamp(20px, 5vw, 64px) 88px;
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 1px;
  background: var(--line-soft);
  border: 1px solid var(--line-soft);
}

@media (max-width: 720px) {
  .steps { grid-template-columns: 1fr; }
}

.step {
  background: var(--bg);
  padding: 26px 24px;
}

.step .n {
  font-family: "IBM Plex Mono", monospace;
  font-size: 12px;
  color: var(--co);
}

.step h3 {
  font-size: 16.5px;
  font-weight: 600;
  margin: 8px 0 6px;
}

.step p {
  color: var(--text-muted);
  font-size: 14px;
  margin: 0;
}

/* ---------- Status / result page ---------- */

.status-wrap {
  max-width: 720px;
  margin: 0 auto;
  padding: clamp(40px, 8vw, 96px) clamp(20px, 5vw, 40px);
}

.status-panel {
  background: var(--panel);
  border: 1px solid var(--line);
  padding: 32px;
}

.status-badge {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  font-family: "IBM Plex Mono", monospace;
  font-size: 12px;
  padding: 5px 10px;
  border: 1px solid var(--line);
  color: var(--text-muted);
  margin-bottom: 18px;
}

.status-badge .led {
  width: 7px;
  height: 7px;
  border-radius: 50%;
  background: var(--text-muted);
}
.status-badge.busy .led { background: var(--xpol); box-shadow: 0 0 0 3px var(--xpol-dim); }
.status-badge.ok .led { background: var(--co); box-shadow: 0 0 0 3px var(--co-dim); }
.status-badge.err .led { background: var(--danger); box-shadow: 0 0 0 3px rgba(224,103,79,0.25); }

.status-panel h1 {
  font-size: 24px;
  margin: 0 0 8px;
}

.status-panel p.desc {
  color: var(--text-muted);
  font-size: 15px;
  margin: 0 0 8px;
}

.job-id {
  font-family: "IBM Plex Mono", monospace;
  font-size: 12px;
  color: var(--text-muted);
  margin-bottom: 28px;
}

.mini-radar {
  width: 64px;
  height: 64px;
  margin-bottom: 20px;
}


.disclaimer {
  margin-top: 20px;
  padding: 14px 16px;
  background: rgba(232, 147, 91, 0.06);
  border: 1px solid var(--co-dim);
  border-left: 3px solid var(--co);
}

.disclaimer p {
  margin: 0;
  font-size: 13px;
  line-height: 1.6;
  color: var(--text-muted);
}

.disclaimer strong {
  color: var(--text);
  font-weight: 600;
}

.freq-heading {
  margin: 24px 0 8px;
  font-size: 14px;
  font-family: "IBM Plex Mono", monospace;
  color: var(--co);
  font-weight: 500;
}
.freq-heading:first-of-type {
  margin-top: 20px;
}

/* ---------- Persistent background watermark (radiation pattern) ---------- */

.bg-pattern {
  position: fixed;
  inset: 0;
  z-index: -1;
  pointer-events: none;
  opacity: 0.05;
  display: flex;
  align-items: center;
  justify-content: center;
  overflow: hidden;
}

.bg-pattern svg {
  width: 130vmax;
  height: 130vmax;
  flex: none;
}

/* ---------- Download buttons ---------- */

.download-all {
  display: block;
  width: 100%;
  text-align: center;
  text-decoration: none;
  margin-top: 20px;
  margin-bottom: 4px;
}

.downloads {
  list-style: none;
  margin: 14px 0 0;
  padding: 0;
  border-top: 1px solid var(--line-soft);
}

.downloads li {
  border-bottom: 1px solid var(--line-soft);
  padding: 8px 0;
}

.downloads .download-btn {
  display: flex;
  justify-content: space-between;
  align-items: center;
  width: 100%;
  padding: 10px 14px;
  text-decoration: none;
  border-color: var(--line);
  color: var(--text);
}

.downloads .download-btn:hover {
  border-color: var(--co);
  color: var(--co);
  background: rgba(232, 147, 91, 0.06);
}

.download-btn .fmt {
  font-family: "IBM Plex Mono", monospace;
  font-size: 11px;
  color: var(--text-muted);
}

/* ---------- Feedback box ---------- */

.feedback-section {
  border-top: 1px solid var(--line-soft);
}

.feedback-inner {
  max-width: 720px;
  margin: 0 auto;
  padding: clamp(40px, 8vw, 72px) clamp(20px, 5vw, 40px);
}

.feedback-inner h2 {
  font-size: 19px;
  font-weight: 600;
  margin: 0 0 6px;
}

.feedback-inner p.sub {
  color: var(--text-muted);
  font-size: 14px;
  margin: 0 0 20px;
}

.feedback-form textarea,
.feedback-form input[type="email"] {
  width: 100%;
  background: var(--panel);
  border: 1px solid var(--line);
  color: var(--text);
  font-family: "Space Grotesk", sans-serif;
  font-size: 14.5px;
  padding: 12px 14px;
}

.feedback-form textarea {
  resize: vertical;
  min-height: 90px;
  margin-bottom: 10px;
}

.feedback-form input[type="email"] {
  margin-bottom: 14px;
}

.feedback-form textarea:focus,
.feedback-form input[type="email"]:focus {
  outline: none;
  border-color: var(--xpol);
}

.feedback-form .row {
  display: flex;
  align-items: center;
  gap: 14px;
}

.feedback-form .website-field { display: none; } /* honeypot */

.btn-secondary {
  padding: 12px 22px;
  background: transparent;
  border: 1px solid var(--xpol);
  color: var(--xpol);
  font-family: inherit;
  font-weight: 600;
  font-size: 14px;
  cursor: pointer;
}

.btn-secondary:hover { background: rgba(95, 211, 196, 0.08); }
.btn-secondary:disabled { opacity: 0.5; cursor: default; }

.feedback-status {
  font-size: 13px;
  color: var(--text-muted);
  min-height: 1.2em;
}

.feedback-status.ok { color: var(--xpol); }
.feedback-status.err { color: var(--danger); }

