:root {
  color-scheme: dark;
  --ink: #fbf2dc;
  --muted: #c0ae8c;
  --paper: #111010;
  --surface: #191716;
  --raised: #25211d;
  --line: #4c3d29;
  --photo-matte: #100e0b;
  --yellow: #ffdc8b;
  --gold: #eac172;
  font: 16px/1.55 system-ui, sans-serif;
}
* { box-sizing: border-box; }
body { margin: 0; color: var(--ink); background: var(--paper); }
a { color: var(--gold); }
a:hover { text-decoration-thickness: 2px; }
h1, h2, h3, p { margin-top: 0; }
h1, h2, h3 { line-height: 1.1; margin-bottom: .6em; }
h2 { font-size: clamp(1.6rem, 3.25vw, 2.35rem); letter-spacing: -.035em; }
h3 { font-size: 1.25rem; }
.wrap { width: min(1280px, 100% - 3rem); margin-inline: auto; }
.top { background: #050505; border-bottom: 1px solid var(--line); }
.header-inner {
  min-height: 86px;
  display: grid;
  grid-template-columns: 1fr auto 1fr;
  gap: .75rem;
  align-items: center;
}
.brand, .operator-link { color: inherit; text-decoration: none; font-size: .9rem; }
.brand { display: flex; align-items: center; gap: .8rem; font-weight: 750; letter-spacing: .08em; }
.brand strong { font-weight: 500; color: var(--muted); }
.brand-mark { width: 76px; height: 77px; object-fit: contain; flex: none; }
.crossed-flags { display: block; width: 143px; height: auto; }
.operator-link {
  justify-self: end;
  border: 1px solid var(--line);
  border-radius: .35rem;
  padding: .56rem .8rem;
  white-space: nowrap;
}
.operator-link:hover { border-color: var(--gold); }
.operator-link span { color: var(--yellow); margin-left: .2rem; }

.hero {
  isolation: isolate;
  position: relative;
  overflow: hidden;
  background: radial-gradient(ellipse at 72% 30%, #31231b, #1b1714 53%, #10100f 100%);
  border-bottom: 1px solid var(--line);
}
.hero::before {
  content: "";
  position: absolute;
  z-index: -1;
  inset: 0 auto 0 0;
  width: min(58%, 53rem);
  background: url("branding/macedonia-map.webp") center 48% / 85% auto no-repeat;
  mix-blend-mode: screen;
  filter: grayscale(1) invert(1);
  opacity: .08;
  pointer-events: none;
}
.hero-inner {
  display: grid;
  grid-template-columns: minmax(0, .86fr) minmax(0, 1.36fr);
  align-items: center;
  padding-block: clamp(1.9rem, 4.8vw, 4rem);
  gap: clamp(1.1rem, 3.75vw, 4.75rem);
}
.hero-content { min-width: 0; }
.eyebrow { color: var(--gold); font-size: .73rem; font-weight: 750; letter-spacing: .14em; }
.hero h1 {
  font: 900 clamp(4rem, 7.8vw, 8rem)/.84 "Arial Narrow", "DejaVu Sans", system-ui, sans-serif;
  letter-spacing: -.075em;
  margin: .19em 0 .23em;
}
.hero h1 span {
  display: block;
  color: var(--yellow);
  font-size: .54em;
  line-height: 1;
  letter-spacing: -.045em;
  margin-top: .25em;
}
.hero-location { color: var(--muted); font-size: .73rem; letter-spacing: .13em; }
.hero-location span { color: #e47465; padding-inline: .3rem; }
.search {
  margin-top: clamp(1.6rem, 3vw, 3.25rem);
  padding: 1.05rem 1.08rem 1.16rem;
  background: #131110;
  border: 1px solid var(--line);
  border-radius: .55rem;
}
.search h2 { font-size: 1.18rem; margin-bottom: .6rem; letter-spacing: -.02em; }
.search-row { display: flex; gap: .5rem; }
.search-row input { flex: 1; }
.search-row input::placeholder { text-transform: none; }
.search-row button span { padding-left: .25rem; }
.group-card {
  margin: 0;
  padding: .5rem;
  min-width: 0;
  color: var(--muted);
  background: #121212;
  border: 1px solid #725d39;
  border-radius: .65rem;
}
.group-card img { display: block; width: 100%; height: auto; border-radius: .33rem; }
.group-card figcaption {
  display: flex;
  flex-wrap: wrap;
  justify-content: space-between;
  gap: .2rem 1rem;
  padding: .58rem .45rem .08rem;
  font-size: .84rem;
}

.stat-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  margin: 0;
  border-block: 1px solid var(--line);
}
.stat-grid div {
  display: flex;
  flex-wrap: wrap;
  align-items: baseline;
  gap: 0 .7rem;
  padding: .9rem 1rem;
}
.stat-grid div + div { border-left: 1px solid var(--line); }
.stat-grid dt { order: 1; color: var(--muted); font-size: .88rem; }
.stat-grid dd { margin: 0; font-size: clamp(1.45rem, 2.8vw, 2.2rem); font-variant-numeric: tabular-nums; line-height: 1; }
section.log-stats { padding-block: 1.7rem; }
.activation-section { margin-bottom: 1.6rem; }
#results { scroll-margin-top: 1rem; }
form label { font-size: .89rem; font-weight: 650; }
input, select, button, .button { border: 1px solid var(--line); border-radius: .4rem; padding: .67rem .8rem; font: inherit; min-width: 0; }
input, select { width: 100%; color: var(--ink); background: var(--surface); }
input[name=call], input[name=callsign], input[name=air_alias] { text-transform: uppercase; }
button, .button { background: var(--gold); border-color: var(--gold); color: #171004; white-space: nowrap; font-weight: 650; cursor: pointer; }
.button { display: inline-block; text-decoration: none; }
button:hover, .button:hover { background: var(--yellow); }
.quiet { background: transparent; color: var(--gold); }
.quiet:hover { background: var(--surface); }
:focus-visible { outline: 3px solid var(--yellow); outline-offset: 2px; }
.section { padding-block: 2.5rem; }
.section + .section { padding-top: .95rem; }
.section > p { color: var(--muted); }
.cards { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 1.1rem; }
.card { background: var(--surface); border: 1px solid var(--line); border-radius: .7rem; overflow: hidden; }
.card img { display: block; width: 100%; height: auto; aspect-ratio: 3/2; object-fit: contain; background: var(--photo-matte); }
.card div { padding: .85rem 1rem; display: flex; flex-wrap: wrap; justify-content: space-between; gap: .2rem .5rem; font-size: .86rem; }
.card span, .log p, small { color: var(--muted); }
small { display: block; }
footer { padding: 1rem 0; background: var(--surface); color: var(--muted); font-size: .85rem; }
footer .wrap, .page-top { display: flex; justify-content: space-between; align-items: center; flex-wrap: wrap; gap: .4rem 1rem; }
.table-wrap { overflow-x: auto; border: 1px solid var(--line); border-radius: .65rem; background: var(--surface); }
table { border-collapse: collapse; width: 100%; text-align: left; }
th, td { padding: .72rem .85rem; border-bottom: 1px solid var(--line); white-space: nowrap; }
th { background: var(--raised); font-size: .86rem; }
tr:last-child td { border-bottom: 0; }
.utc { font-variant-numeric: tabular-nums; }
.download { font-size: .9rem; padding: .42rem .65rem; }
.narrow { max-width: 490px; min-height: 65vh; }
.inner-heading { font-size: clamp(2rem, 6vw, 3.2rem); letter-spacing: -.06em; margin-bottom: .25em; }
.dashboard { display: grid; grid-template-columns: minmax(0, 1.3fr) minmax(0,1fr); gap: 1.4rem; }
.panel { background: var(--surface); padding: 1.1rem; border: 1px solid var(--line); border-radius: .7rem; margin-bottom: .9rem; min-width: 0; }
.form { display: grid; justify-items: start; gap: .75rem; }
.form label, .form .two { width: 100%; }
.form label input, .form label select { margin-top: .24rem; }
.form input[type=file] { background: var(--paper); }
.form .check { display: flex; align-items: start; gap: .5rem; }
.form .check input { width: auto; margin-top: .32rem; }
.form p { margin: 0; }
.actions, .operators { display: flex; align-items: center; flex-wrap: wrap; gap: .6rem 1rem; }
.operators { margin: 1rem 0 1.3rem; }
.operators a { padding: .38rem .57rem; border: 1px solid var(--line); border-radius: .4rem; }
.operators [aria-current] { background: var(--gold); color: #171004; }
.notice { background: var(--raised); padding: .75rem 1rem; border-radius: .45rem; }
details > summary { cursor: pointer; font-weight: 700; }
details[open] > summary, .log .form { margin-bottom: .75rem; }
.manual-qso { margin: .8rem 0 1rem; }
.manual-qso > summary { color: var(--gold); }
.hint { font-size: .84rem; color: var(--muted); }
.two { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: .5rem; }

@media (max-width: 820px) {
  .hero-inner, .dashboard { grid-template-columns: 1fr; }
  .hero-inner { gap: 1.5rem; }
  .hero h1 { font-size: clamp(4rem, 13vw, 7.2rem); }
  .hero::before { width: 100%; background-position: right top; background-size: min(76%, 35rem); }
  .cards { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .search { max-width: 36rem; }
  .stat-grid div { align-content: start; }
}
@media (max-width: 540px) {
  .wrap { width: calc(100% - 1.5rem); }
  .header-inner { min-height: 64px; gap: .3rem; }
  .brand { gap: .16rem; font-size: .74rem; letter-spacing: .015em; }
  .brand strong { display: none; }
  .brand-mark { width: 46px; height: 49px; }
  .crossed-flags { width: clamp(72px, 22vw, 116px); }
  .operator-link { font-size: .73rem; padding: .38rem .45rem; }
  .operator-link span { display: none; }
  .stat-grid div { flex-direction: column; align-items: start; gap: .35rem; padding-inline: .55rem; }
  .stat-grid dt { font-size: .73rem; }
  .cards { gap: .55rem; }
  .card div { padding: .5rem; }
}
@media (max-width: 365px) {
  .hero h1 { font-size: 3.65rem; }
  .search-row { flex-wrap: wrap; }
  .search-row input { flex-basis: 100%; }
  .search-row button { width: 100%; }
}
