/* Concentric Radar — Ember Terrarium track
   Zilla Slab + Cabin — distinct from home/shop/account */

body.rd-radar *,
body.rd-radar *::before,
body.rd-radar *::after { box-sizing: border-box; }

body.rd-radar {
  --void: #1C110D;
  --soil: #2A1A14;
  --glass: rgba(48, 28, 20, 0.58);
  --mist: #F6EDE4;
  --mute: #C4A992;
  --clay: #E07A5F;
  --moss: #7BAF7B;
  --honey: #F0C27A;
  --line: rgba(255, 214, 170, 0.18);
  --ease: cubic-bezier(0.22, 1, 0.36, 1);
  margin: 0;
  min-height: 100vh;
  color: var(--mist);
  font-family: 'Cabin', system-ui, sans-serif;
  background-color: var(--void);
  background-image:
    radial-gradient(circle at 50% 38%, rgba(224, 122, 95, 0.14), transparent 40%),
    radial-gradient(ellipse 50% 35% at 8% 100%, rgba(123, 175, 123, 0.1), transparent 50%),
    radial-gradient(ellipse 40% 30% at 95% 5%, rgba(240, 194, 122, 0.08), transparent 50%);
  -webkit-font-smoothing: antialiased;
}

.rd-root {
  min-height: 100vh;
  display: flex;
  flex-direction: column;
}

.rd-root > .page-main {
  flex: 1;
  width: 100%;
  max-width: none;
  padding: 0;
  margin: 0;
  display: flex;
  flex-direction: column;
}

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

.rd-stage {
  flex: 1;
  width: min(100% - 2rem, 980px);
  margin: 0 auto;
  padding: 1rem 0 2.2rem;
}

/* —— Mast —— */
.rd-mast {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 1rem;
  margin-bottom: 1.35rem;
}

.rd-mast-mark {
  display: inline-flex;
  align-items: center;
  gap: 0.65rem;
  color: var(--mist);
  text-decoration: none;
  min-width: 0;
}

.rd-mast-mark em {
  flex: 0 0 auto;
  width: 2rem;
  height: 2rem;
  display: grid;
  place-items: center;
  border-radius: 50%;
  border: 2px solid var(--honey);
  font-style: normal;
  font-size: 0.58rem;
  letter-spacing: 0.08em;
  font-weight: 700;
  background: var(--glass);
}

.rd-mast-mark strong {
  font-family: 'Zilla Slab', Georgia, serif;
  font-size: clamp(1.05rem, 2.2vw, 1.2rem);
  font-weight: 600;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.rd-mast-nav {
  display: flex;
  flex-wrap: wrap;
  justify-content: flex-end;
  gap: 0.28rem;
  padding: 0.28rem;
  border-radius: 999px;
  background: var(--glass);
  border: 1px solid var(--line);
  backdrop-filter: blur(18px);
}

.rd-mast-nav a {
  color: #EADFD4;
  text-decoration: none;
  padding: 0.42rem 0.78rem;
  border-radius: 999px;
  font-size: 0.8rem;
  font-weight: 600;
  transition: background 0.2s, color 0.2s;
}

.rd-mast-nav a.is-on,
.rd-mast-nav a:hover {
  background: var(--moss);
  color: var(--void);
}

.rd-mast-bag {
  display: inline-flex !important;
  align-items: center;
  gap: 0.35rem;
}

.rd-mast-bag.has-items {
  background: rgba(123, 175, 123, 0.22);
}

.rd-mast-bag em {
  font-style: normal;
  min-width: 1.15rem;
  text-align: center;
  background: var(--void);
  color: var(--honey);
  border-radius: 999px;
  padding: 0.05rem 0.35rem;
  font-size: 0.7rem;
  font-weight: 800;
}

/* —— Intro —— */
.rd-intro {
  text-align: center;
  margin-bottom: 0.5rem;
}

.rd-kicker {
  margin: 0 0 0.35rem;
  font-size: 0.68rem;
  letter-spacing: 0.16em;
  text-transform: uppercase;
  color: var(--honey);
  font-weight: 700;
}

.rd-intro h1 {
  margin: 0 0 0.45rem;
  font-family: 'Zilla Slab', Georgia, serif;
  font-size: clamp(2rem, 5vw, 3rem);
  font-weight: 700;
  letter-spacing: -0.02em;
  line-height: 1.08;
}

.rd-lede {
  margin: 0 auto 1.15rem;
  max-width: 38ch;
  color: var(--mute);
  font-size: 1.02rem;
  line-height: 1.55;
}

/* —— Concentric scope —— */
.rd-scope {
  position: relative;
  min-height: 32rem;
  display: grid;
  place-items: center;
  margin: 0 auto 1.5rem;
}

.rd-halo {
  position: absolute;
  inset: 0;
  display: grid;
  place-items: center;
  pointer-events: none;
}

.rd-circle {
  position: absolute;
  border-radius: 50%;
  border: 1px dashed rgba(240, 194, 122, 0.2);
  width: calc(26% + var(--ri) * 15.5%);
  aspect-ratio: 1;
}

.rd-circle.is-lit {
  border-style: solid;
  border-color: var(--moss);
  box-shadow: 0 0 26px rgba(123, 175, 123, 0.16);
}

.rd-stage[data-rd-state="found"] .rd-circle {
  animation: rd-expand 0.7s var(--ease) both;
  animation-delay: calc((4 - var(--ri)) * 0.08s);
}

.rd-stage[data-rd-state="miss"] .rd-circle {
  border-color: rgba(224, 122, 95, 0.35);
}

.rd-sweep {
  position: absolute;
  width: 44%;
  aspect-ratio: 1;
  border-radius: 50%;
  background: conic-gradient(from 0deg, transparent 0 82%, rgba(240, 194, 122, 0.2) 100%);
  animation: rd-spin 9s linear infinite;
  mask: radial-gradient(circle, transparent 40%, #000 41%);
  -webkit-mask: radial-gradient(circle, transparent 40%, #000 41%);
}

@keyframes rd-spin { to { transform: rotate(360deg); } }

@keyframes rd-expand {
  from { transform: scale(0.88); opacity: 0.25; }
  to { transform: scale(1); opacity: 1; }
}

.rd-hub {
  position: relative;
  z-index: 2;
  width: min(21rem, 88%);
  padding: 1.45rem 1.35rem 1.35rem;
  border-radius: 50%;
  aspect-ratio: 1;
  display: flex;
  flex-direction: column;
  justify-content: center;
  gap: 0.6rem;
  background: var(--glass);
  border: 2px solid rgba(240, 194, 122, 0.32);
  backdrop-filter: blur(22px);
  box-shadow:
    0 0 0 10px rgba(28, 17, 13, 0.32),
    0 18px 40px rgba(0, 0, 0, 0.28);
}

.rd-hub-head { text-align: center; margin-bottom: 0.15rem; }

.rd-hub-head h2 {
  margin: 0;
  font-family: 'Zilla Slab', Georgia, serif;
  font-size: 1.3rem;
  font-weight: 700;
}

.rd-hub-head p {
  margin: 0.2rem 0 0;
  color: var(--mute);
  font-size: 0.8rem;
}

.rd-field { display: grid; gap: 0.25rem; }

.rd-field span {
  font-size: 0.62rem;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: var(--mute);
  text-align: center;
  font-weight: 700;
}

.rd-field input {
  width: 100%;
  border: 1px solid var(--line);
  background: rgba(28, 17, 13, 0.52);
  color: var(--mist);
  border-radius: 999px;
  padding: 0.58rem 0.9rem;
  font: inherit;
  text-align: center;
}

.rd-field input::placeholder { color: rgba(196, 169, 146, 0.5); }

.rd-field input:focus {
  outline: none;
  border-color: var(--honey);
  box-shadow: 0 0 0 3px rgba(240, 194, 122, 0.14);
}

.rd-submit {
  border: 0;
  border-radius: 999px;
  padding: 0.7rem 0.9rem;
  background: linear-gradient(135deg, var(--moss), #5f945f);
  color: var(--void);
  font-weight: 800;
  font-size: 0.92rem;
  cursor: pointer;
  margin-top: 0.15rem;
  transition: filter 0.2s, transform 0.2s;
}

.rd-submit:hover {
  filter: brightness(1.06);
  transform: translateY(-1px);
}

/* —— Result echo —— */
.rd-echo {
  margin: 0 auto 1.4rem;
  width: min(36rem, 100%);
}

.rd-blip {
  padding: 1.3rem 1.35rem;
  border-radius: 1.6rem;
  background: var(--glass);
  border: 1px solid var(--line);
  backdrop-filter: blur(18px);
  animation: rd-expand 0.5s var(--ease);
}

.rd-blip-miss { border-color: rgba(224, 122, 95, 0.35); }

.rd-blip-idle h2,
.rd-blip-miss h2,
.rd-blip-head h2 {
  margin: 0.3rem 0 0.25rem;
  font-family: 'Zilla Slab', Georgia, serif;
  font-size: clamp(1.35rem, 3vw, 1.6rem);
  font-weight: 700;
}

.rd-blip-idle p,
.rd-blip-miss p,
.rd-blip-head p {
  margin: 0 0 0.95rem;
  color: var(--mute);
  line-height: 1.5;
}

.rd-live {
  display: inline-flex;
  align-items: center;
  gap: 0.4rem;
  font-size: 0.72rem;
  color: var(--moss);
  letter-spacing: 0.1em;
  text-transform: uppercase;
  font-weight: 700;
}

.rd-live i {
  width: 0.5rem;
  height: 0.5rem;
  border-radius: 50%;
  background: var(--moss);
  box-shadow: 0 0 0 5px rgba(123, 175, 123, 0.2);
  animation: rd-pulse 1.6s ease infinite;
}

@keyframes rd-pulse {
  0%, 100% { box-shadow: 0 0 0 4px rgba(123, 175, 123, 0.18); }
  50% { box-shadow: 0 0 0 8px rgba(123, 175, 123, 0.08); }
}

.rd-facts {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 0.55rem;
  margin-bottom: 0.95rem;
}

.rd-facts div {
  padding: 0.7rem 0.8rem;
  border-radius: 0.95rem;
  background: rgba(255, 236, 214, 0.05);
  border: 1px solid rgba(255, 214, 170, 0.08);
}

.rd-facts span {
  display: block;
  font-size: 0.68rem;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--mute);
  margin-bottom: 0.2rem;
}

.rd-facts strong {
  font-family: 'Zilla Slab', Georgia, serif;
  font-size: 1.02rem;
  word-break: break-word;
}

.rd-lines {
  list-style: none;
  margin: 0 0 1.05rem;
  padding: 0;
}

.rd-lines li {
  display: flex;
  justify-content: space-between;
  gap: 0.75rem;
  padding: 0.45rem 0;
  border-bottom: 1px dashed var(--line);
  color: var(--mute);
  font-size: 0.92rem;
}

.rd-lines em {
  font-style: normal;
  color: var(--honey);
  font-weight: 700;
  flex: 0 0 auto;
}

.rd-btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 0.7rem 1.15rem;
  border-radius: 999px;
  background: linear-gradient(135deg, var(--clay), #c46248);
  color: var(--void);
  text-decoration: none;
  font-weight: 800;
  font-size: 0.9rem;
  transition: filter 0.2s, transform 0.2s;
}

.rd-btn:hover {
  filter: brightness(1.06);
  transform: translateY(-1px);
  color: var(--void);
}

.rd-btn-ghost {
  background: transparent;
  color: var(--mist);
  border: 1px solid var(--line);
}
.rd-btn-ghost:hover {
  background: rgba(255, 236, 214, 0.06);
  color: var(--mist);
  transform: none;
  filter: none;
}

/* —— Delivery bands —— */
.rd-bands {
  list-style: none;
  margin: 0 0 1.25rem;
  padding: 0;
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 0.55rem;
}

.rd-band {
  padding: 0.9rem 0.85rem;
  border-radius: 1.15rem;
  background: var(--glass);
  border: 1px solid var(--line);
  display: grid;
  gap: 0.2rem;
  transition: border-color 0.2s, opacity 0.2s, box-shadow 0.2s;
}

.rd-band em {
  font-style: normal;
  font-size: 0.66rem;
  color: var(--honey);
  letter-spacing: 0.14em;
  font-weight: 700;
}

.rd-band strong {
  font-family: 'Zilla Slab', Georgia, serif;
  font-size: 1.05rem;
}

.rd-band span {
  color: var(--mute);
  font-size: 0.78rem;
  line-height: 1.35;
}

.rd-band.is-done { border-color: var(--moss); }
.rd-band.is-live {
  border-color: var(--clay);
  box-shadow: 0 0 0 3px rgba(224, 122, 95, 0.16);
}
.rd-band.is-wait,
.rd-band.is-idle { opacity: 0.55; }

/* —— Ports —— */
.rd-ports {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 0.55rem;
}

.rd-port {
  display: flex;
  flex-direction: column;
  gap: 0.2rem;
  padding: 0.9rem 0.95rem;
  border-radius: 1.1rem;
  background: var(--glass);
  border: 1px solid var(--line);
  color: var(--mist);
  text-decoration: none;
  transition: border-color 0.2s, transform 0.2s;
}

.rd-port span {
  font-size: 0.7rem;
  color: var(--mute);
}

.rd-port strong {
  font-family: 'Zilla Slab', Georgia, serif;
  font-size: 1.05rem;
}

.rd-port:hover {
  border-color: rgba(240, 194, 122, 0.45);
  transform: translateY(-2px);
  color: var(--mist);
}

.rd-foot {
  display: flex;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: 0.7rem;
  width: min(100% - 2rem, 980px);
  margin: 0 auto 1.3rem;
  padding: 0.95rem 1.15rem;
  border-radius: 1.25rem;
  background: var(--glass);
  border: 1px solid var(--line);
  color: var(--mute);
  font-size: 0.86rem;
}

.rd-foot a {
  color: var(--honey);
  text-decoration: none;
  font-weight: 700;
}
.rd-foot a:hover { color: var(--clay); }

@media (max-width: 860px) {
  .rd-scope { min-height: 28rem; }
  .rd-bands,
  .rd-ports { grid-template-columns: 1fr 1fr; }
}

@media (max-width: 640px) {
  .rd-stage { width: min(100% - 1.4rem, 980px); padding-top: 0.75rem; }

  .rd-mast {
    flex-direction: column;
    align-items: stretch;
  }

  .rd-mast-nav {
    border-radius: 1.15rem;
    justify-content: flex-start;
  }

  .rd-scope { min-height: 0; margin-bottom: 1.2rem; }

  .rd-halo { display: none; }

  .rd-hub {
    border-radius: 1.6rem;
    aspect-ratio: auto;
    width: 100%;
    padding: 1.25rem 1.15rem;
  }

  .rd-field span,
  .rd-field input { text-align: left; }

  .rd-facts { grid-template-columns: 1fr; }

  .rd-bands,
  .rd-ports { grid-template-columns: 1fr; }
}

@media (prefers-reduced-motion: reduce) {
  .rd-sweep,
  .rd-circle,
  .rd-blip,
  .rd-live i {
    animation: none !important;
  }
  .rd-submit,
  .rd-btn,
  .rd-port {
    transition: none !important;
  }
}
