/* MOONFALL — one stylesheet for every page. */

@font-face {
  font-family: "Unbounded";
  src: url("/fonts/unbounded-var.woff2") format("woff2");
  font-weight: 400 800;
  font-display: swap;
}
@font-face {
  font-family: "Sora";
  src: url("/fonts/sora-var.woff2") format("woff2");
  font-weight: 300 700;
  font-display: swap;
}
@font-face {
  font-family: "IBM Plex Mono";
  src: url("/fonts/plexmono-400.woff2") format("woff2");
  font-weight: 400;
  font-display: swap;
}

:root {
  --bg: #05060f;
  --bg-2: #090b1d;
  --panel: #0c0f25;
  --panel-2: #11152f;
  --line: #1b2046;
  --line-2: #2a3163;
  --text: #e9e8f4;
  --muted: #9298c0;
  --dim: #646a94;
  --moon: #f3eedb;
  --moon-2: #d9d2f2;
  --ice: #8ce9ff;
  --rose: #ff9cc8;
  --sun: #ffd27a;
  --ok: #7ef0b5;
  --err: #ff7a8a;
  --radius: 18px;
  --radius-s: 11px;
  --display: "Unbounded", "Sora", system-ui, sans-serif;
  --text-font: "Sora", system-ui, -apple-system, "Segoe UI", sans-serif;
  --mono: "IBM Plex Mono", ui-monospace, "SFMono-Regular", Menlo, monospace;
  --shadow: 0 18px 50px rgba(0, 0, 0, 0.45);
  color-scheme: dark;
}

*,
*::before,
*::after {
  box-sizing: border-box;
}
[hidden] {
  display: none !important;
}
html {
  -webkit-text-size-adjust: 100%;
  scroll-behavior: smooth;
}
body {
  margin: 0;
  min-height: 100vh;
  display: flex;
  flex-direction: column;
  background:
    radial-gradient(1200px 600px at 85% -10%, rgba(80, 70, 180, 0.12), transparent 60%),
    radial-gradient(900px 500px at -10% 30%, rgba(40, 120, 170, 0.08), transparent 60%),
    var(--bg);
  color: var(--text);
  font: 400 15px/1.55 var(--text-font);
  overflow-x: hidden;
}
main {
  flex: 1 0 auto;
}
html.has-modal body {
  overflow: hidden;
}
img {
  max-width: 100%;
}
a {
  color: var(--ice);
  text-decoration: none;
}
a:hover {
  text-decoration: underline;
  text-underline-offset: 3px;
}
h1,
h2,
h3 {
  font-family: var(--display);
  font-weight: 600;
  letter-spacing: -0.01em;
  line-height: 1.15;
  margin: 0 0 0.5em;
}
h1 {
  font-size: clamp(28px, 4.6vw, 46px);
}
h2 {
  font-size: 17px;
}
h3 {
  font-size: 13px;
}
p {
  margin: 0 0 0.8em;
}
code {
  font-family: var(--mono);
  font-size: 0.92em;
  background: var(--panel-2);
  border: 1px solid var(--line);
  border-radius: 6px;
  padding: 0 5px;
}
:focus-visible {
  outline: 2px solid var(--ice);
  outline-offset: 2px;
}
::selection {
  background: rgba(140, 233, 255, 0.3);
}

.sr-only {
  position: absolute !important;
  width: 1px !important;
  height: 1px !important;
  min-height: 0 !important;
  padding: 0 !important;
  margin: -1px !important;
  border: 0 !important;
  overflow: hidden;
  clip: rect(0 0 0 0);
  white-space: nowrap;
}
.skip {
  position: absolute;
  left: 12px;
  top: -60px;
  z-index: 100;
  background: var(--moon);
  color: var(--bg);
  padding: 8px 14px;
  border-radius: 999px;
}
.skip:focus {
  top: 12px;
}
.wrap {
  width: min(1240px, 100% - 32px);
  margin-inline: auto;
}
.page {
  padding: 36px 0 64px;
}
.muted {
  color: var(--muted);
}
.small {
  font-size: 12.5px;
}
.mono {
  font-family: var(--mono);
}
.break {
  word-break: break-all;
}
.row {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
}
.gap {
  gap: 10px;
}
.eyebrow {
  font: 600 11px/1 var(--display);
  letter-spacing: 0.22em;
  text-transform: uppercase;
  color: var(--ice);
  margin-bottom: 14px;
}
.lede {
  color: var(--muted);
  font-size: 16.5px;
  max-width: 62ch;
}
.accent {
  color: var(--rose);
}
.page-head {
  margin-bottom: 28px;
}
.empty {
  color: var(--dim);
  padding: 14px 4px;
  list-style: none;
}

/* ---------- buttons ---------- */
.btn {
  --b: var(--line-2);
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  min-height: 40px;
  padding: 0 18px;
  border-radius: 999px;
  border: 1px solid var(--b);
  background: var(--panel-2);
  color: var(--text);
  font: 600 14px/1 var(--text-font);
  cursor: pointer;
  text-decoration: none;
  white-space: nowrap;
  transition: background 0.15s, border-color 0.15s, transform 0.1s, color 0.15s;
}
.btn:hover {
  text-decoration: none;
  border-color: var(--muted);
}
.btn:active {
  transform: translateY(1px);
}
.btn:disabled {
  opacity: 0.45;
  cursor: not-allowed;
  transform: none;
}
.btn[aria-busy] {
  cursor: progress;
  opacity: 0.8;
}
.btn-moon {
  background: linear-gradient(180deg, #fffaf0, var(--moon));
  border-color: transparent;
  color: #13132a;
  box-shadow: 0 0 0 1px rgba(255, 255, 255, 0.1), 0 6px 24px rgba(243, 238, 219, 0.14);
}
.btn-moon:hover {
  background: #fff;
  border-color: transparent;
}
.btn-ghost {
  background: transparent;
}
.btn-quiet {
  background: transparent;
  border-color: transparent;
  color: var(--muted);
}
.btn-glass {
  background: rgba(9, 11, 29, 0.6);
  backdrop-filter: blur(8px);
  -webkit-backdrop-filter: blur(8px);
  border-color: rgba(140, 150, 220, 0.25);
}
.btn-mini {
  min-height: 30px;
  padding: 0 12px;
  font-size: 12.5px;
}
.btn-mini[aria-pressed="true"] {
  border-color: var(--ice);
  color: var(--ice);
}
.btn-small {
  min-height: 34px;
  padding: 0 14px;
  font-size: 13px;
}
.btn-wide {
  width: 100%;
}
.btn-big {
  min-height: 52px;
  font-size: 15px;
}
.link-btn {
  background: none;
  border: 0;
  color: var(--muted);
  font: inherit;
  font-size: 12.5px;
  cursor: pointer;
  padding: 4px 0;
}
.link-btn:hover {
  color: var(--text);
}

/* ---------- badges, phases, pictures ---------- */
.badge {
  display: inline-flex;
  align-items: center;
  font: 600 10.5px/1 var(--text-font);
  letter-spacing: 0.04em;
  padding: 4px 8px;
  border-radius: 999px;
  border: 1px solid var(--line-2);
  color: var(--muted);
  white-space: nowrap;
}
.badge-fall {
  color: var(--rose);
  border-color: rgba(255, 156, 200, 0.45);
  background: rgba(255, 156, 200, 0.08);
}
.badge-cold {
  color: var(--dim);
}
.phase {
  display: inline-flex;
  align-items: center;
  gap: 5px;
  font: 600 10.5px/1 var(--text-font);
  letter-spacing: 0.06em;
  text-transform: uppercase;
  color: var(--muted);
  white-space: nowrap;
}
.phase::before {
  content: "";
  width: 6px;
  height: 6px;
  border-radius: 50%;
  background: currentColor;
}
.ph-sun {
  color: var(--sun);
}
.ph-planet {
  color: var(--ice);
}
.ph-full {
  color: var(--sun);
}
.ph-curve {
  color: var(--moon-2);
}

.pic {
  position: relative;
  display: inline-grid;
  place-items: center;
  flex: none;
  border-radius: 50%;
  background: radial-gradient(circle at 35% 30%, hsl(var(--hue, 230) 65% 60%), hsl(var(--hue, 230) 60% 16%));
  box-shadow: 0 0 0 1.5px var(--rim, var(--line-2));
  overflow: visible;
}
.pic img {
  width: 100%;
  height: 100%;
  border-radius: 50%;
  object-fit: cover;
  display: block;
}
.pic-letter {
  font: 700 14px/1 var(--display);
  color: rgba(255, 255, 255, 0.9);
}
.pic.is-sun {
  box-shadow: 0 0 0 2px var(--sun), 0 0 18px rgba(255, 210, 122, 0.45);
}
.pic.is-cold img,
.pic.is-cold .pic-letter {
  filter: grayscale(0.85) brightness(0.8);
}
.pic.is-planet::after {
  content: "";
  position: absolute;
  inset: 38% -22%;
  border-radius: 50%;
  border: 2px solid var(--rim, var(--ice));
  border-top-color: transparent;
  transform: rotate(-22deg);
  opacity: 0.8;
  pointer-events: none;
}
.pic-new {
  background: radial-gradient(circle at 35% 30%, #d6f6ff, #24506b);
  box-shadow: 0 0 0 2px var(--ice), 0 0 20px rgba(140, 233, 255, 0.3);
}

/* well meter */
.well {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  min-width: 0;
  flex-wrap: wrap;
}
.well-bar {
  position: relative;
  width: 74px;
  height: 6px;
  border-radius: 999px;
  background: var(--line);
  overflow: hidden;
  flex: none;
}
.well-fill {
  position: absolute;
  inset: 0 auto 0 0;
  border-radius: inherit;
  background: linear-gradient(90deg, #6b7fd6, var(--ice));
}
.well.is-ready .well-fill {
  background: linear-gradient(90deg, var(--ice), var(--rose));
}
.well-v {
  font: 12.5px/1 var(--mono);
  color: var(--muted);
}

/* progress */
.prog {
  display: block;
  height: 8px;
  border-radius: 999px;
  background: var(--line);
  overflow: hidden;
}
.prog-fill {
  display: block;
  height: 100%;
  border-radius: inherit;
  background: linear-gradient(90deg, #8e86d9, var(--moon));
}

.chips {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}
.chip {
  display: inline-flex;
  align-items: center;
  gap: 7px;
  padding: 4px 11px 4px 4px;
  border-radius: 999px;
  border: 1px solid var(--line-2);
  background: var(--panel-2);
  color: var(--text);
  font-size: 13px;
  font-weight: 600;
}
.chip:hover {
  border-color: var(--ice);
  text-decoration: none;
}

.kv {
  margin: 0;
  display: grid;
  gap: 8px;
}
.kv > div {
  display: flex;
  justify-content: space-between;
  gap: 12px;
  font-size: 13.5px;
}
.kv dt {
  color: var(--muted);
}
.kv dd {
  margin: 0;
  text-align: right;
  min-width: 0;
  overflow-wrap: anywhere;
}

/* ---------- top bar ---------- */
.bar {
  position: sticky;
  top: 0;
  z-index: 40;
  background: rgba(5, 6, 15, 0.78);
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
  border-bottom: 1px solid var(--line);
}
.bar-in {
  width: min(1320px, 100% - 24px);
  margin-inline: auto;
  min-height: 62px;
  display: flex;
  align-items: center;
  gap: 14px;
}
.logo {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  color: var(--text);
}
.logo:hover {
  text-decoration: none;
}
.logo img {
  display: block;
  border-radius: 8px;
}
.logo-word {
  font: 700 16px/1 var(--display);
  letter-spacing: 0.16em;
}
.cluster {
  font: 600 10px/1 var(--mono);
  letter-spacing: 0.1em;
  color: var(--sun);
  border: 1px solid rgba(255, 210, 122, 0.45);
  border-radius: 6px;
  padding: 4px 6px;
}
.nav {
  display: flex;
  align-items: center;
  gap: 4px;
  margin-left: 12px;
}
.nav a {
  color: var(--muted);
  font-weight: 600;
  font-size: 14px;
  padding: 8px 12px;
  border-radius: 999px;
}
.nav a:hover {
  color: var(--text);
  text-decoration: none;
  background: var(--panel-2);
}
.nav a[aria-current="page"] {
  color: var(--text);
  background: var(--panel-2);
  box-shadow: inset 0 0 0 1px var(--line-2);
}
.nav-x {
  display: inline-flex;
  align-items: center;
  gap: 7px;
}
.tide-chip {
  margin-left: auto;
  display: inline-flex;
  align-items: baseline;
  gap: 8px;
  padding: 7px 12px;
  border-radius: 999px;
  border: 1px solid var(--line-2);
  color: var(--text);
}
.tide-chip:hover {
  text-decoration: none;
  border-color: var(--ice);
}
.tide-chip-k {
  font: 600 10px/1 var(--display);
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--ice);
}
.tide-chip-v {
  font: 14px/1 var(--mono);
  min-width: 5ch;
}
.tide-chip.is-near {
  border-color: var(--rose);
}
.tide-chip.is-near .tide-chip-v {
  color: var(--rose);
}
.wallet-slot {
  display: flex;
}
.p-404 .wallet-slot {
  margin-left: auto;
}
.btn-wallet {
  min-height: 38px;
  gap: 10px;
}
.btn-wallet.is-on {
  background: transparent;
}
.wb-addr {
  font-family: var(--mono);
  font-weight: 400;
}
.wb-bal {
  color: var(--muted);
  font-weight: 500;
  font-size: 12.5px;
}
.menu-btn {
  display: none;
  width: 40px;
  height: 40px;
  border-radius: 12px;
  border: 1px solid var(--line-2);
  background: transparent;
  cursor: pointer;
  padding: 0 10px;
  flex-direction: column;
  justify-content: center;
  gap: 6px;
}
.menu-btn span {
  display: block;
  height: 2px;
  border-radius: 2px;
  background: var(--text);
}

/* ---------- the sky hero ---------- */
.hero {
  position: relative;
  height: max(460px, min(70vh, 820px));
  overflow: hidden;
  border-bottom: 1px solid var(--line);
  background: #03040b;
}
.sky-canvas {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  display: block;
  touch-action: none;
  outline: none;
}
.sky-canvas.is-dragging {
  cursor: grabbing !important;
}
.sky-canvas:focus-visible {
  box-shadow: inset 0 0 0 2px var(--ice);
}
.hud {
  position: absolute;
  top: 18px;
  z-index: 5;
  display: flex;
  flex-direction: column;
  gap: 12px;
  pointer-events: none;
}
.hud > * {
  pointer-events: auto;
}
.hud-left {
  left: 20px;
  align-items: flex-start;
}
.hud-right {
  right: 20px;
  align-items: flex-end;
  width: min(320px, 46vw);
}
.hero-h {
  font-size: clamp(16px, 2.1vw, 24px);
  font-weight: 600;
  margin: 0;
  pointer-events: none;
  text-shadow: 0 2px 18px rgba(0, 0, 0, 0.8);
}
.hero-h span {
  display: block;
}
.hero-h span + span {
  color: var(--rose);
}
.hero-hint {
  position: absolute;
  left: 50%;
  bottom: 12px;
  transform: translateX(-50%);
  margin: 0;
  font-size: 11.5px;
  color: var(--dim);
  white-space: nowrap;
  pointer-events: none;
}

/* tide clock */
.tide {
  display: flex;
  align-items: center;
  gap: 14px;
  padding: 12px 16px 12px 12px;
  border-radius: 20px;
  background: rgba(9, 11, 29, 0.66);
  border: 1px solid rgba(140, 150, 220, 0.22);
  backdrop-filter: blur(10px);
  -webkit-backdrop-filter: blur(10px);
}
.tide-face {
  position: relative;
  width: 104px;
  height: 104px;
  flex: none;
}
.tide-ring {
  width: 100%;
  height: 100%;
  display: block;
}
.tide-track {
  fill: none;
  stroke: rgba(140, 150, 220, 0.16);
  stroke-width: 5;
}
.tide-arc {
  fill: none;
  stroke: var(--ice);
  stroke-width: 5;
  stroke-linecap: round;
  transition: stroke-dashoffset 0.25s linear, stroke 0.3s;
}
.tide-ticks line {
  stroke: rgba(140, 150, 220, 0.35);
  stroke-width: 1.2;
}
.tide-mid {
  position: absolute;
  inset: 0;
  display: grid;
  place-content: center;
  text-align: center;
  gap: 2px;
}
.tide-time {
  font: 500 21px/1 var(--mono);
  letter-spacing: -0.02em;
}
.tide-cap {
  font-size: 9.5px;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--muted);
  max-width: 78px;
  line-height: 1.25;
}
.tide.is-near .tide-arc {
  stroke: var(--rose);
}
.tide.is-near .tide-face {
  animation: tide-pulse 1s ease-in-out infinite;
}
.tide.is-turning .tide-time {
  color: var(--rose);
}
@keyframes tide-pulse {
  50% {
    transform: scale(1.06);
    filter: drop-shadow(0 0 12px rgba(255, 156, 200, 0.55));
  }
}
.tide-stats {
  margin: 0;
  display: grid;
  gap: 8px;
}
.tide-stats dt {
  font: 600 9.5px/1 var(--display);
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--muted);
  margin-bottom: 3px;
}
.tide-stats dd {
  margin: 0;
  font: 15px/1 var(--mono);
}

/* search */
.find {
  position: relative;
  width: 100%;
}
.find input,
.field input,
.field textarea,
.field select {
  width: 100%;
  min-height: 42px;
  padding: 10px 14px;
  border-radius: 12px;
  border: 1px solid var(--line-2);
  background: var(--bg-2);
  color: var(--text);
  font: 14.5px/1.4 var(--text-font);
}
.find input {
  border-radius: 999px;
  padding-left: 16px;
  background: rgba(9, 11, 29, 0.72);
  backdrop-filter: blur(8px);
  -webkit-backdrop-filter: blur(8px);
}
.find input:focus,
.field input:focus,
.field textarea:focus {
  outline: none;
  border-color: var(--ice);
  box-shadow: 0 0 0 3px rgba(140, 233, 255, 0.15);
}
.find-list {
  position: absolute;
  top: calc(100% + 6px);
  left: 0;
  right: 0;
  z-index: 20;
  margin: 0;
  padding: 6px;
  list-style: none;
  border-radius: 14px;
  border: 1px solid var(--line-2);
  background: var(--panel);
  box-shadow: var(--shadow);
}
.find-opt {
  width: 100%;
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 7px 8px;
  border: 0;
  border-radius: 9px;
  background: none;
  color: var(--text);
  font: 600 13.5px/1.2 var(--text-font);
  text-align: left;
  cursor: pointer;
}
.find-opt .muted {
  font-weight: 400;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}
.find-opt:hover,
.find-opt:focus-visible {
  background: var(--panel-2);
}
.find-none {
  padding: 8px;
  color: var(--muted);
  font-size: 13px;
}

/* tooltip + side card */
.tip {
  position: absolute;
  z-index: 8;
  pointer-events: none;
  max-width: 270px;
}
.tip-in {
  display: flex;
  gap: 12px;
  padding: 12px 14px;
  border-radius: 16px;
  background: rgba(12, 15, 37, 0.92);
  border: 1px solid var(--line-2);
  box-shadow: var(--shadow);
}
.tip-body {
  min-width: 0;
}
.tip-name {
  margin: 0;
  font-weight: 700;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}
.tip-sym {
  margin: 0 0 8px;
  color: var(--muted);
  font-size: 13px;
  display: flex;
  gap: 8px;
  align-items: center;
  flex-wrap: wrap;
}
.tip-stats {
  margin: 0;
  display: grid;
  grid-template-columns: auto auto;
  gap: 4px 14px;
}
.tip-stats div {
  min-width: 0;
}
.tip-stats dt {
  font-size: 10px;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  color: var(--dim);
}
.tip-stats dd {
  margin: 0;
  font: 12.5px/1.3 var(--mono);
}
.side {
  position: absolute;
  z-index: 9;
  top: 76px;
  right: 20px;
  bottom: 20px;
  width: min(340px, 100% - 40px);
  overflow-y: auto;
  padding: 20px;
  border-radius: 22px;
  background: rgba(12, 15, 37, 0.9);
  border: 1px solid var(--line-2);
  box-shadow: var(--shadow);
  backdrop-filter: blur(14px);
  -webkit-backdrop-filter: blur(14px);
  animation: side-in 0.22s ease-out;
}
@keyframes side-in {
  from {
    transform: translateX(16px);
    opacity: 0;
  }
}
.side-x,
.modal-x,
.toast-x {
  border: 0;
  background: none;
  color: var(--muted);
  font-size: 22px;
  line-height: 1;
  cursor: pointer;
  padding: 2px 6px;
  border-radius: 8px;
}
.side-x {
  position: absolute;
  top: 12px;
  right: 12px;
}
.side-x:hover,
.modal-x:hover,
.toast-x:hover {
  color: var(--text);
}
.side-head {
  display: flex;
  align-items: center;
  gap: 14px;
  margin-bottom: 16px;
  padding-right: 26px;
}
.side-head > div {
  min-width: 0;
}
.side-name {
  margin: 0 0 4px;
  font-size: 17px;
  overflow-wrap: anywhere;
}
.side-sym {
  margin: 0;
  color: var(--muted);
  display: flex;
  gap: 8px;
  align-items: center;
  flex-wrap: wrap;
}
.side-k {
  margin: 16px 0 8px;
  font: 600 10px/1 var(--display);
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--muted);
}
.side .well-bar {
  width: 120px;
}
.side-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin-top: 20px;
}
.side-actions .btn-moon {
  flex: 1 1 100%;
}
.note-cold {
  margin-top: 14px;
  font-size: 13px;
  color: var(--dim);
}

/* dark sky */
.dark {
  position: absolute;
  inset: 0;
  z-index: 6;
  display: grid;
  place-content: center;
  justify-items: center;
  text-align: center;
  padding: 24px;
}
.hero.is-dark .hud,
.hero.is-dark .hero-hint {
  display: none;
}
.dark-k {
  font: 600 12px/1 var(--display);
  letter-spacing: 0.24em;
  text-transform: uppercase;
  color: var(--muted);
}
.dark-h {
  font-size: clamp(30px, 6vw, 60px);
  margin-bottom: 14px;
  background: linear-gradient(180deg, #fff, var(--sun));
  -webkit-background-clip: text;
  background-clip: text;
  color: transparent;
}
.dark-s {
  color: var(--muted);
  max-width: 44ch;
  margin-bottom: 22px;
}

/* totals strip */
.strip {
  border-bottom: 1px solid var(--line);
  background: linear-gradient(180deg, var(--bg-2), transparent);
}
.strip-in {
  width: min(1240px, 100% - 32px);
  margin-inline: auto;
  display: grid;
  grid-template-columns: repeat(6, 1fr);
}
.strip-in > div {
  padding: 18px 16px;
  border-left: 1px solid var(--line);
  min-width: 0;
}
.strip-in > div:first-child {
  border-left: 0;
  padding-left: 0;
}
.strip-k {
  display: block;
  font: 600 10px/1 var(--display);
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--muted);
  margin-bottom: 8px;
}
.strip-v {
  font: 14px/1 var(--mono);
  color: var(--muted);
}
.strip-v b {
  font-weight: 400;
  font-size: 20px;
  color: var(--text);
}

/* ---------- panels ---------- */
.panel {
  background: linear-gradient(180deg, var(--panel-2), var(--panel));
  border: 1px solid var(--line);
  border-radius: var(--radius);
  padding: 20px;
  min-width: 0;
}
.panel-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  flex-wrap: wrap;
  margin-bottom: 14px;
}
.panel-head h2 {
  margin: 0;
}
.sub-h {
  margin: 20px 0 10px;
  font: 600 10.5px/1 var(--display);
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--muted);
}
.cols {
  display: grid;
  grid-template-columns: minmax(0, 1fr) 360px;
  gap: 20px;
  padding: 28px 0 64px;
  align-items: start;
}
.side-col {
  display: grid;
  gap: 20px;
}

/* tabs */
.tabs {
  display: flex;
  gap: 4px;
  flex-wrap: wrap;
  padding: 4px;
  border-radius: 999px;
  background: var(--bg-2);
  border: 1px solid var(--line);
}
.tabs button {
  border: 0;
  background: none;
  color: var(--muted);
  font: 600 12.5px/1 var(--text-font);
  padding: 8px 12px;
  border-radius: 999px;
  cursor: pointer;
}
.tabs button:hover {
  color: var(--text);
}
.tabs button[aria-selected="true"] {
  background: var(--moon);
  color: #13132a;
}

/* the board */
.board-cols,
.brow {
  display: grid;
  grid-template-columns: 26px 36px minmax(0, 1.6fr) 74px 160px 54px 84px 96px;
  align-items: center;
  gap: 12px;
}
.board-cols {
  padding: 0 10px 8px;
  border-bottom: 1px solid var(--line);
  font: 600 9.5px/1 var(--display);
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--dim);
}
.board-cols span:nth-child(n + 4) {
  text-align: right;
}
.board-cols span:nth-child(5) {
  text-align: left;
}
.board {
  list-style: none;
  margin: 0 0 12px;
  padding: 0;
}
.brow {
  padding: 10px;
  border-radius: 14px;
  color: var(--text);
}
.brow:hover {
  background: var(--panel-2);
  text-decoration: none;
}
.board li + li .brow {
  border-top: 1px solid rgba(27, 32, 70, 0.6);
  border-radius: 0;
}
.board li + li .brow:hover {
  border-radius: 14px;
}
.brow.is-cold {
  opacity: 0.62;
}
.brow-rank {
  font: 12px/1 var(--mono);
  color: var(--dim);
  text-align: right;
}
.brow-id {
  display: grid;
  gap: 3px;
  min-width: 0;
}
.brow-name {
  font-weight: 600;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}
.brow-sym {
  display: flex;
  align-items: center;
  gap: 8px;
  font-size: 12.5px;
  color: var(--muted);
  min-width: 0;
  overflow: hidden;
  white-space: nowrap;
}
.brow-num,
.brow-par {
  font: 13px/1.2 var(--mono);
  text-align: right;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}
.brow-par {
  color: var(--muted);
  font-family: var(--text-font);
  font-weight: 600;
}
.brow-stat {
  color: var(--ice);
}
.brow-well .well {
  flex-wrap: nowrap;
}
.brow-well .badge {
  display: none;
}
.brow-well .well.is-ready .well-v {
  color: var(--rose);
}

/* feed */
.live-dot {
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background: var(--ok);
  box-shadow: 0 0 0 0 rgba(126, 240, 181, 0.5);
  animation: live 2.4s ease-out infinite;
}
@keyframes live {
  70% {
    box-shadow: 0 0 0 8px rgba(126, 240, 181, 0);
  }
  100% {
    box-shadow: 0 0 0 0 rgba(126, 240, 181, 0);
  }
}
.feed {
  list-style: none;
  margin: 0;
  padding: 0;
  max-height: 520px;
  overflow-y: auto;
}
.ev {
  display: grid;
  grid-template-columns: 10px minmax(0, 1fr);
  gap: 2px 10px;
  padding: 10px 0;
  border-top: 1px solid var(--line);
  font-size: 13.5px;
}
.ev:first-child {
  border-top: 0;
}
.ev-dot {
  width: 8px;
  height: 8px;
  margin-top: 6px;
  border-radius: 50%;
  background: var(--dim);
}
.ev-fall .ev-dot {
  background: var(--rose);
  box-shadow: 0 0 10px rgba(255, 156, 200, 0.6);
}
.ev-born .ev-dot {
  background: var(--ice);
}
.ev-planet .ev-dot {
  background: var(--sun);
}
.ev-text {
  overflow-wrap: anywhere;
}
.ev-meta {
  grid-column: 2;
  display: flex;
  gap: 10px;
  font-size: 11.5px;
  color: var(--dim);
}
.sym {
  font-weight: 700;
}
.tx {
  font-family: var(--mono);
  font-size: 11.5px;
}

.tides {
  list-style: none;
  margin: 0;
  padding: 0;
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 8px;
}
.tide-card {
  display: grid;
  gap: 3px;
  padding: 10px 12px;
  border-radius: 12px;
  border: 1px solid var(--line);
  background: var(--bg-2);
  min-width: 0;
}
.tide-card time {
  font: 11px/1 var(--mono);
  color: var(--dim);
}
.tc-big {
  font: 600 15px/1.2 var(--display);
  color: var(--rose);
}
.tide-card.is-calm .tc-big {
  color: var(--dim);
}
.tc-k {
  font-size: 11.5px;
  color: var(--muted);
  overflow-wrap: anywhere;
}

/* ---------- toasts + modal ---------- */
.toasts {
  position: fixed;
  z-index: 90;
  right: 16px;
  bottom: 16px;
  display: grid;
  gap: 8px;
  width: min(380px, calc(100% - 32px));
}
.toast {
  display: flex;
  align-items: flex-start;
  gap: 8px;
  padding: 12px 10px 12px 14px;
  border-radius: 14px;
  background: var(--panel-2);
  border: 1px solid var(--line-2);
  border-left: 3px solid var(--muted);
  box-shadow: var(--shadow);
  font-size: 14px;
  animation: toast-in 0.2s ease-out;
  transition: opacity 0.4s, transform 0.4s;
}
.toast-msg {
  flex: 1;
  overflow-wrap: anywhere;
}
.toast-ok {
  border-left-color: var(--ok);
}
.toast-err {
  border-left-color: var(--err);
}
.toast-fall {
  border-left-color: var(--rose);
}
.toast-info {
  border-left-color: var(--ice);
}
.toast.is-out {
  opacity: 0;
  transform: translateY(6px);
}
@keyframes toast-in {
  from {
    opacity: 0;
    transform: translateY(8px);
  }
}
.modal-back {
  position: fixed;
  inset: 0;
  z-index: 80;
  display: grid;
  place-items: center;
  padding: 16px;
  background: rgba(2, 3, 9, 0.72);
  backdrop-filter: blur(4px);
  -webkit-backdrop-filter: blur(4px);
}
.modal {
  width: min(440px, 100%);
  max-height: calc(100vh - 32px);
  overflow-y: auto;
  padding: 22px;
  border-radius: 22px;
  background: var(--panel);
  border: 1px solid var(--line-2);
  box-shadow: var(--shadow);
}
.modal-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 10px;
}
.modal-head h2 {
  margin: 0;
}
.wallet-list {
  display: grid;
  gap: 8px;
  margin-top: 14px;
}
.wallet-opt {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 10px 14px;
  border-radius: 14px;
  border: 1px solid var(--line-2);
  background: var(--panel-2);
  color: var(--text);
  font: 600 15px/1 var(--text-font);
  cursor: pointer;
}
.wallet-opt:hover {
  border-color: var(--ice);
}
.wallet-opt img {
  border-radius: 8px;
}
.wallet-noicon {
  width: 28px;
  height: 28px;
  border-radius: 8px;
  background: var(--line-2);
}
.wallet-none {
  color: var(--muted);
}
.wallet-bal {
  font: 18px/1 var(--mono);
  margin: 14px 0 18px;
}

/* ---------- forms ---------- */
.field {
  display: grid;
  gap: 7px;
  margin-bottom: 16px;
  min-width: 0;
}
.field-k {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  gap: 8px;
  font-size: 13px;
  font-weight: 600;
  color: var(--muted);
}
.opt {
  font-weight: 400;
  color: var(--dim);
  font-size: 12px;
}
.count {
  font: 11.5px/1 var(--mono);
  color: var(--dim);
}
.count.over {
  color: var(--err);
}
.help {
  font-size: 12.5px;
  color: var(--dim);
}
.field-row {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 14px;
}
.field textarea {
  resize: vertical;
  min-height: 96px;
}
[aria-invalid="true"] {
  border-color: var(--err) !important;
}
.prefixed,
.amount {
  position: relative;
  display: flex;
  align-items: center;
}
.prefixed > span {
  position: absolute;
  left: 14px;
  color: var(--dim);
  font-weight: 600;
}
.prefixed input {
  padding-left: 28px;
  text-transform: uppercase;
  font-family: var(--mono);
}
.amount input {
  padding-right: 64px;
  font: 17px/1.3 var(--mono);
}
.amount-u {
  position: absolute;
  right: 14px;
  color: var(--muted);
  font-size: 13px;
  font-weight: 600;
  max-width: 40%;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}
.presets {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
  margin-bottom: 16px;
}
.quote {
  margin: 0 0 14px;
  padding: 12px 14px;
  border-radius: 14px;
  background: var(--bg-2);
  border: 1px solid var(--line);
  display: grid;
  gap: 7px;
}
.quote > div {
  display: flex;
  justify-content: space-between;
  gap: 12px;
  font-size: 13.5px;
}
.quote dt {
  color: var(--muted);
}
.quote dd {
  margin: 0;
  font-family: var(--mono);
  text-align: right;
  overflow-wrap: anywhere;
}
.quote .total {
  padding-top: 7px;
  border-top: 1px solid var(--line);
  font-weight: 600;
}
.quote .total dd {
  color: var(--moon);
}
.is-hot {
  color: var(--rose);
}
.warn {
  color: var(--sun);
  font-size: 13px;
}
.form-err {
  color: var(--err);
  font-size: 14px;
  min-height: 1.2em;
}
.seg {
  display: grid;
  grid-auto-flow: column;
  grid-auto-columns: 1fr;
  gap: 4px;
  padding: 4px;
  margin-bottom: 16px;
  border-radius: 999px;
  border: 1px solid var(--line);
  background: var(--bg-2);
}
.seg button {
  min-height: 36px;
  border: 0;
  border-radius: 999px;
  background: none;
  color: var(--muted);
  font: 600 13.5px/1.1 var(--text-font);
  cursor: pointer;
  padding: 0 10px;
}
.seg button[aria-pressed="true"] {
  background: var(--moon);
  color: #13132a;
}
.seg button[data-side="sell"][aria-pressed="true"] {
  background: var(--rose);
}

/* ---------- body page ---------- */
.loading {
  color: var(--muted);
  padding: 60px 0;
  text-align: center;
}
.notfound {
  text-align: center;
  padding: 60px 0;
  display: grid;
  justify-items: center;
}
.bh {
  display: grid;
  grid-template-columns: 220px minmax(0, 1fr);
  gap: 36px;
  align-items: center;
  margin-bottom: 28px;
}
.orb {
  position: relative;
  width: 220px;
  height: 220px;
  display: grid;
  place-items: center;
  border-radius: 50%;
  background: radial-gradient(circle, rgba(140, 150, 230, 0.16), transparent 68%);
}
.orb::before {
  content: "";
  position: absolute;
  inset: 4px;
  border-radius: 50%;
  border: 1px dashed rgba(140, 150, 220, 0.25);
}
.orb .pic {
  box-shadow: 0 0 0 3px var(--rim), 0 0 60px color-mix(in srgb, var(--rim) 35%, transparent);
}
.orb .pic-letter {
  font-size: 64px !important;
}
.orb-sun {
  background: radial-gradient(circle, rgba(255, 200, 110, 0.35), transparent 70%);
}
.orb-sun .pic {
  box-shadow: 0 0 0 3px var(--sun), 0 0 80px rgba(255, 200, 110, 0.6);
}
.orb-planet .pic.is-planet::after {
  inset: 36% -26%;
  border-width: 4px;
}
.orb-cold {
  opacity: 0.75;
}
.bh-phase {
  display: flex;
  gap: 10px;
  align-items: center;
  margin-bottom: 10px;
}
.bh-name {
  margin-bottom: 6px;
  overflow-wrap: anywhere;
}
.bh-sym {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 8px 16px;
  font: 600 18px/1.2 var(--display);
  color: var(--ice);
  margin-bottom: 18px;
}
.bh-mint {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  font: 400 13px/1 var(--mono);
  color: var(--muted);
}
.bh-nums {
  display: flex;
  flex-wrap: wrap;
  gap: 10px 32px;
  margin: 0 0 18px;
}
.bh-nums dt {
  font: 600 9.5px/1 var(--display);
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--muted);
  margin-bottom: 6px;
}
.bh-nums dd {
  margin: 0;
  font: 14px/1 var(--mono);
  color: var(--muted);
}
.bh-nums b {
  font-weight: 400;
  font-size: 20px;
  color: var(--text);
}
.bh-prog {
  display: grid;
  gap: 7px;
  max-width: 560px;
  margin-bottom: 18px;
}
.bh-prog.is-done .prog-fill {
  background: linear-gradient(90deg, var(--ice), var(--sun));
}
.prog-l {
  font-size: 12.5px;
  color: var(--muted);
}
.desc {
  white-space: pre-wrap;
  overflow-wrap: anywhere;
  max-width: 68ch;
  color: var(--text);
}
.desc.is-empty {
  color: var(--dim);
  font-style: italic;
}
.links {
  list-style: none;
  padding: 0;
  margin: 0 0 18px;
  display: flex;
  flex-wrap: wrap;
  gap: 8px 18px;
}
.links a {
  font-weight: 600;
}
.bh-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
}
.btn-mini.btn,
.bh-mint .btn {
  min-height: 26px;
}
.body-grid {
  display: grid;
  grid-template-columns: minmax(0, 1fr) 380px;
  gap: 20px;
  align-items: start;
}
.body-main,
.body-side {
  display: grid;
  gap: 20px;
  min-width: 0;
}
.body-side {
  position: sticky;
  top: 80px;
}

.chain {
  overflow-x: auto;
  padding-bottom: 4px;
}
.chain-svg {
  display: block;
  margin: 0 auto;
  max-width: none;
}
.chain-orbit {
  stroke: rgba(150, 165, 235, 0.35);
  stroke-width: 1.5;
  stroke-dasharray: 3 5;
  fill: none;
}
.chain-grav {
  stroke: var(--rose);
  stroke-width: 1.6;
  fill: none;
  opacity: 0.85;
}
.chain-arrowhead {
  fill: var(--rose);
}
.chain-pct {
  fill: var(--rose);
  font: 600 12px var(--display);
}
.chain-disc {
  fill: #1a1f44;
}
.chain-disc.is-sun {
  fill: #e8a640;
}
.chain-rim {
  fill: none;
  stroke-width: 2;
}
.chain-rim.is-me {
  stroke-width: 3;
}
.chain-label {
  fill: var(--text);
  font: 600 12px var(--text-font);
}
.chain a:hover .chain-label {
  fill: var(--ice);
}
.grav-line {
  margin: 12px 0 0;
  color: var(--muted);
  font-size: 14px;
}
.grav-line a {
  font-weight: 700;
}

.well-big .well {
  width: 100%;
}
.well-big .well-bar {
  flex: 1 1 200px;
  height: 12px;
}
.well-big .well-v {
  font-size: 15px;
  color: var(--text);
}
.well-note {
  margin: 12px 0 0;
  color: var(--muted);
  font-size: 14px;
}
.fillers,
.falls {
  list-style: none;
  margin: 0;
  padding: 0;
}
.filler {
  display: grid;
  grid-template-columns: 26px minmax(0, 1fr) auto;
  align-items: center;
  gap: 4px 10px;
  padding: 8px 6px;
  border-radius: 12px;
  color: var(--text);
}
.filler .badge {
  grid-column: 2 / -1;
  justify-self: start;
}
.filler-id b,
.filler-id span {
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}
.filler:hover {
  background: var(--panel-2);
  text-decoration: none;
}
.filler-id {
  display: grid;
  min-width: 0;
}
.filler-v {
  font: 13px/1 var(--mono);
  color: var(--muted);
}
.fall {
  display: grid;
  grid-template-columns: 96px 100px minmax(0, 1fr) auto;
  gap: 4px 12px;
  align-items: baseline;
  padding: 10px 0;
  border-top: 1px solid var(--line);
  font-size: 13.5px;
}
.fall:first-child {
  border-top: 0;
}
.fall time {
  font: 12px/1 var(--mono);
  color: var(--dim);
}
.fall-v {
  font-family: var(--mono);
  color: var(--rose);
}
.fall-b {
  color: var(--muted);
}
.fall-from {
  grid-column: 2 / 4;
  font-size: 12.5px;
  color: var(--dim);
}
.fall .tx {
  grid-row: 1;
  grid-column: 4;
}

.trade-foot {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 10px;
  margin-top: 12px;
  flex-wrap: wrap;
}
.slip-box {
  margin-top: 10px;
  padding-top: 12px;
  border-top: 1px solid var(--line);
}
.slip-box .presets {
  margin-bottom: 10px;
}
.field-inline {
  grid-template-columns: auto 1fr;
  align-items: center;
  margin-bottom: 0;
}
.creator {
  border-color: rgba(255, 210, 122, 0.4);
}
.creator b {
  font-family: var(--mono);
  font-weight: 400;
  color: var(--sun);
}

/* ---------- launch page ---------- */
.gate {
  margin-bottom: 20px;
  padding: 14px 18px;
  border-radius: 14px;
  border: 1px solid rgba(255, 210, 122, 0.4);
  background: rgba(255, 210, 122, 0.06);
  color: var(--text);
}
.gate-ok {
  border-color: rgba(126, 240, 181, 0.45);
  background: rgba(126, 240, 181, 0.06);
}
.launch-grid {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(0, 440px);
  gap: 22px;
  align-items: start;
}
.launch-form {
  padding: 24px;
}
.drop {
  display: flex;
  align-items: center;
  gap: 16px;
  padding: 16px;
  border-radius: 16px;
  border: 1.5px dashed var(--line-2);
  background: var(--bg-2);
  cursor: pointer;
  transition: border-color 0.15s, background 0.15s;
}
.drop:hover,
.drop.is-over,
.drop:focus-within {
  border-color: var(--ice);
  background: rgba(140, 233, 255, 0.04);
}
.drop.has-file {
  border-style: solid;
}
.drop-txt {
  display: grid;
  gap: 4px;
  min-width: 0;
}
.drop-t {
  font-weight: 600;
  overflow-wrap: anywhere;
}
.drop-s {
  font-size: 12.5px;
  color: var(--dim);
}
.launch-side {
  display: grid;
  gap: 20px;
  min-width: 0;
}
.picker-wrap {
  position: relative;
  height: 320px;
  border-radius: 14px;
  overflow: hidden;
  border: 1px solid var(--line);
  margin-bottom: 12px;
}
.picker {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  display: block;
  touch-action: none;
}
.picker-hint {
  position: absolute;
  left: 12px;
  bottom: 8px;
  margin: 0;
  font-size: 11.5px;
  color: var(--dim);
  pointer-events: none;
}
.find-inline {
  margin-bottom: 14px;
}
.find-inline input {
  background: var(--bg-2);
  backdrop-filter: none;
}
.chosen {
  display: flex;
  align-items: center;
  gap: 12px;
}
.chosen:empty {
  display: none;
}
.chosen-id {
  min-width: 0;
}
.chosen-k {
  display: block;
  font: 600 9.5px/1 var(--display);
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--muted);
  margin-bottom: 4px;
}
.chosen-id b {
  font-family: var(--display);
  font-size: 15px;
}
.grav-preview {
  margin: 14px 0 0;
  padding: 12px 14px;
  border-radius: 12px;
  border: 1px solid rgba(255, 156, 200, 0.3);
  background: rgba(255, 156, 200, 0.05);
  font-size: 14px;
}
.grav-preview:empty {
  display: none;
}
.grav-preview b {
  color: var(--rose);
}
.grav-per {
  display: block;
  margin-top: 4px;
}
.genesis {
  display: grid;
  justify-items: center;
  text-align: center;
  padding: 18px 8px 6px;
}
.genesis-sun {
  width: 96px;
  height: 96px;
  border-radius: 50%;
  margin-bottom: 18px;
  background: radial-gradient(circle at 38% 34%, #fff6d8, #ffc560 55%, #d97d1e);
  box-shadow: 0 0 0 2px var(--sun), 0 0 60px rgba(255, 200, 110, 0.55);
}
.genesis-h {
  font: 600 18px/1.2 var(--display);
  color: var(--sun);
}
.preview {
  display: flex;
  align-items: center;
  gap: 16px;
}
.preview-name {
  margin: 0;
  font: 600 17px/1.2 var(--display);
  overflow-wrap: anywhere;
}
.preview-sym {
  margin: 4px 0 0;
  color: var(--ice);
  font-family: var(--mono);
}
.ticks {
  margin: 0;
  padding: 0;
  list-style: none;
  display: grid;
  gap: 10px;
}
.ticks li {
  position: relative;
  padding-left: 22px;
  color: var(--muted);
  font-size: 14px;
}
.ticks li::before {
  content: "";
  position: absolute;
  left: 2px;
  top: 7px;
  width: 9px;
  height: 9px;
  border-radius: 50%;
  border: 2px solid var(--ice);
}

/* ---------- how page ---------- */
.how-hero {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(0, 1fr);
  gap: 30px;
  align-items: center;
  margin-bottom: 36px;
}
.orrery {
  margin: 0;
}
.orrery canvas {
  display: block;
  width: 100%;
  aspect-ratio: 16 / 11;
  border-radius: var(--radius);
  border: 1px solid var(--line);
  background: radial-gradient(circle at 50% 52%, #0e1230, #04050d 70%);
}
.orrery figcaption {
  margin-top: 10px;
  font-size: 13px;
  color: var(--dim);
}
.steps {
  list-style: none;
  margin: 0 0 36px;
  padding: 0;
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 16px;
}
.steps li {
  position: relative;
  padding: 22px 20px 20px;
  border-radius: var(--radius);
  border: 1px solid var(--line);
  background: linear-gradient(180deg, var(--panel-2), var(--panel));
}
.steps h2 {
  font-size: 16px;
}
.steps p {
  color: var(--muted);
  font-size: 14px;
  margin: 0;
}
.step-n {
  display: inline-grid;
  place-items: center;
  width: 30px;
  height: 30px;
  margin-bottom: 14px;
  border-radius: 50%;
  border: 1px solid var(--ice);
  color: var(--ice);
  font: 600 13px/1 var(--display);
}
.how-grid {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(0, 1fr);
  gap: 20px;
  margin-bottom: 36px;
  align-items: start;
}
.calc-out {
  margin: 4px 0 0;
  display: grid;
  gap: 6px;
}
.calc-out > div {
  display: flex;
  justify-content: space-between;
  gap: 12px;
  padding: 6px 0;
  border-bottom: 1px solid var(--line);
  font-size: 14px;
}
.calc-out dt {
  color: var(--muted);
}
.calc-out dd {
  margin: 0;
  font-family: var(--mono);
  text-align: right;
}
.calc-out .is-key dd,
.calc-out .is-key dt {
  color: var(--rose);
  font-weight: 600;
}
.calc-out .is-sub {
  padding-left: 16px;
}
.calc-out .is-sub dd {
  color: var(--text);
}
.calc-line {
  margin: 14px 0 0;
  color: var(--muted);
  font-size: 14px;
}
.fees {
  width: 100%;
  border-collapse: collapse;
  font-size: 14px;
}
.fees th,
.fees td {
  padding: 9px 0;
  border-bottom: 1px solid var(--line);
  text-align: left;
  vertical-align: top;
}
.fees th {
  color: var(--muted);
  font-weight: 500;
  padding-right: 14px;
  white-space: nowrap;
}
.fees td {
  text-align: right;
}
.faq {
  max-width: 820px;
}
.faq h2 {
  font-size: 22px;
  margin-bottom: 16px;
}
.faq details {
  border-top: 1px solid var(--line);
  padding: 4px 0;
}
.faq details:last-child {
  border-bottom: 1px solid var(--line);
}
.faq summary {
  cursor: pointer;
  list-style: none;
  padding: 14px 32px 14px 0;
  position: relative;
  font-weight: 600;
  font-size: 15.5px;
}
.faq summary::-webkit-details-marker {
  display: none;
}
.faq summary::after {
  content: "+";
  position: absolute;
  right: 4px;
  top: 10px;
  font: 400 22px/1 var(--display);
  color: var(--ice);
  transition: transform 0.2s;
}
.faq details[open] summary::after {
  transform: rotate(45deg);
}
.faq details p {
  color: var(--muted);
  max-width: 70ch;
  padding-bottom: 8px;
}

/* ---------- 404 ---------- */
.lost {
  text-align: center;
  display: grid;
  justify-items: center;
  padding-top: 64px;
}
.lost .lede {
  margin-inline: auto;
}
.lost-orb {
  position: relative;
  width: 140px;
  height: 140px;
  margin-bottom: 26px;
  border-radius: 50%;
  border: 1px dashed var(--line-2);
}
.lost-orb span {
  position: absolute;
  top: -9px;
  left: calc(50% - 9px);
  width: 18px;
  height: 18px;
  border-radius: 50%;
  background: var(--moon);
  box-shadow: 0 0 20px rgba(243, 238, 219, 0.5);
  transform-origin: 9px 79px;
  animation: drift 14s linear infinite;
}
@keyframes drift {
  to {
    transform: rotate(360deg) translateY(-30px);
  }
}

/* ---------- footer ---------- */
.foot {
  border-top: 1px solid var(--line);
  background: var(--bg-2);
}
.foot-in {
  width: min(1240px, 100% - 32px);
  margin-inline: auto;
  padding: 34px 0;
  display: grid;
  grid-template-columns: minmax(0, 1.2fr) auto;
  gap: 18px 40px;
}
.foot-brand p {
  color: var(--muted);
  font-size: 14px;
  max-width: 52ch;
  margin-top: 10px;
}
.foot-nav {
  display: flex;
  flex-wrap: wrap;
  gap: 8px 20px;
  align-items: flex-start;
}
.foot-nav a {
  color: var(--muted);
  font-weight: 600;
  font-size: 14px;
}
.foot-legal {
  grid-column: 1 / -1;
  margin: 0;
  font-size: 12.5px;
  color: var(--dim);
  padding-top: 16px;
  border-top: 1px solid var(--line);
}

/* ---------- smaller screens ---------- */
@media (max-width: 1100px) {
  .cols,
  .body-grid {
    grid-template-columns: minmax(0, 1fr);
  }
  .body-side {
    position: static;
  }
  .side-col {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
  .steps {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
  .launch-grid {
    grid-template-columns: minmax(0, 1fr);
  }
  /* the orbit picker first, then the form, then the preview and the notes */
  .launch-side {
    display: contents;
  }
  .orbit-panel {
    order: -1;
  }
  .launch-side > .panel:not(.orbit-panel) {
    order: 1;
  }
}

@media (max-width: 900px) {
  .menu-btn {
    display: flex;
  }
  .nav {
    position: absolute;
    top: 100%;
    left: 0;
    right: 0;
    margin: 0;
    display: none;
    flex-direction: column;
    align-items: stretch;
    padding: 10px 12px 14px;
    background: rgba(5, 6, 15, 0.97);
    border-bottom: 1px solid var(--line);
  }
  body.nav-open .nav {
    display: flex;
  }
  .nav a {
    padding: 12px 14px;
    border-radius: 12px;
  }
  .board-cols {
    display: none;
  }
  .brow {
    grid-template-columns: 36px minmax(0, 1fr) auto;
    grid-template-areas:
      "pic id stat"
      "pic well well";
    gap: 4px 12px;
  }
  .brow-rank {
    display: none;
  }
  .brow > .pic {
    grid-area: pic;
    align-self: start;
  }
  .brow-id {
    grid-area: id;
  }
  .brow-stat {
    grid-area: stat;
  }
  .brow-well {
    grid-area: well;
  }
  .brow > .brow-num:not(.brow-stat),
  .brow-par {
    display: none;
  }
  .brow-sym .phase {
    display: none;
  }
  .brow-stat::before {
    content: attr(data-k);
    display: block;
    margin-bottom: 3px;
    color: var(--dim);
    font-size: 10px;
    text-transform: uppercase;
    letter-spacing: 0.06em;
  }
  .how-hero {
    grid-template-columns: minmax(0, 1fr);
  }
  .how-grid {
    grid-template-columns: minmax(0, 1fr);
  }
  .strip-in {
    grid-template-columns: repeat(3, 1fr);
  }
  .strip-in > div:nth-child(4) {
    border-left: 0;
    padding-left: 0;
  }
  .strip-in > div:nth-child(n + 4) {
    border-top: 1px solid var(--line);
  }
}

@media (max-width: 640px) {
  body {
    font-size: 14.5px;
  }
  .bar-in {
    gap: 8px;
    min-height: 56px;
  }
  .logo-word {
    font-size: 13px;
    letter-spacing: 0.1em;
  }
  .logo img {
    width: 24px;
    height: 24px;
  }
  .tide-chip {
    padding: 6px 9px;
  }
  .tide-chip-k {
    display: none;
  }
  .wb-bal {
    display: none;
  }
  .btn-wallet {
    padding: 0 12px;
  }
  .hero {
    height: max(380px, 60vh);
  }
  .hud {
    top: 10px;
  }
  .hud-left {
    left: 10px;
  }
  .hud-right {
    right: 10px;
    width: calc(100% - 20px);
    top: auto;
    bottom: 34px;
    flex-direction: row;
    align-items: center;
  }
  .hud-right .find {
    flex: 1;
  }
  .hero-h {
    display: none;
  }
  .tide {
    gap: 10px;
    padding: 8px 12px 8px 8px;
    border-radius: 16px;
  }
  .tide-face {
    width: 74px;
    height: 74px;
  }
  .tide-time {
    font-size: 15px;
  }
  .tide-cap {
    font-size: 8px;
    max-width: 58px;
  }
  .tide-stats dd {
    font-size: 13px;
  }
  .hud-left .btn {
    min-height: 28px;
  }
  .side {
    top: auto;
    left: 10px;
    right: 10px;
    bottom: 10px;
    width: auto;
    max-height: 72%;
    padding: 16px;
    animation-name: sheet-in;
  }
  @keyframes sheet-in {
    from {
      transform: translateY(16px);
      opacity: 0;
    }
  }
  .hero-hint {
    display: none;
  }
  .strip-in {
    grid-template-columns: repeat(2, 1fr);
  }
  .strip-in > div {
    padding: 14px 12px;
  }
  .strip-in > div:nth-child(odd) {
    border-left: 0;
    padding-left: 0;
  }
  .strip-in > div:nth-child(4) {
    border-left: 1px solid var(--line);
    padding-left: 12px;
  }
  .strip-in > div:nth-child(n + 3) {
    border-top: 1px solid var(--line);
  }
  .strip-v b {
    font-size: 17px;
  }
  .side-col {
    grid-template-columns: minmax(0, 1fr);
  }
  .panel {
    padding: 16px;
  }
  .tabs {
    border-radius: 16px;
  }
  .field-row {
    grid-template-columns: minmax(0, 1fr);
    gap: 0;
  }
  .bh {
    grid-template-columns: minmax(0, 1fr);
    justify-items: center;
    text-align: center;
    gap: 18px;
  }
  .orb {
    width: 180px;
    height: 180px;
  }
  .orb .pic {
    width: 136px !important;
    height: 136px !important;
  }
  .bh-phase,
  .bh-sym,
  .bh-nums,
  .links,
  .bh-actions {
    justify-content: center;
  }
  .bh-prog {
    margin-inline: auto;
    width: 100%;
  }
  .desc {
    text-align: left;
  }
  .fall {
    grid-template-columns: minmax(0, 1fr) auto;
  }
  .fall time {
    grid-column: 1 / -1;
  }
  .fall-from {
    grid-column: 1 / -1;
  }
  .fall .tx {
    grid-row: auto;
    grid-column: auto;
  }
  .steps {
    grid-template-columns: minmax(0, 1fr);
  }
  .picker-wrap {
    height: 260px;
  }
  .foot-in {
    grid-template-columns: minmax(0, 1fr);
  }
  .tides {
    grid-template-columns: minmax(0, 1fr);
  }
}

@media (max-width: 520px) {
  .tide-chip {
    display: none;
  }
  .p-sky .bar-in > .wallet-slot,
  .bar-in > .wallet-slot {
    margin-left: auto;
  }
  .logo {
    gap: 7px;
  }
  .logo-word {
    font-size: 12px;
    letter-spacing: 0.08em;
  }
  .cluster {
    font-size: 9px;
    padding: 3px 4px;
  }
  .menu-btn {
    width: 36px;
    height: 36px;
    padding: 0 9px;
  }
}

@media (prefers-reduced-motion: reduce) {
  *,
  *::before,
  *::after {
    animation: none !important;
    transition: none !important;
    scroll-behavior: auto !important;
  }
}
