/* Fruitfly Orchard: dark, technical, quietly luxurious. No external fonts or assets. */

:root {
  --bg: #06090b;
  --bg-2: #0a1013;
  --panel: rgba(9, 15, 18, 0.55);
  --panel-solid: #0b1215;
  --line: #172225;
  --line-2: #22313a;
  --line-3: #2e4146;
  --text: #dfe8e6;
  --text-2: #a3b3b0;
  --text-3: #74878a;
  --mint: #7cffcb;
  --mint-dim: rgba(124, 255, 203, 0.12);
  --mint-line: rgba(124, 255, 203, 0.35);
  --amber: #ffb35c;
  --amber-dim: rgba(255, 179, 92, 0.1);
  --gold: #ffd66b;
  --gold-dim: rgba(255, 214, 107, 0.12);
  --danger: #ff8a94;
  --radius: 12px;
  --radius-sm: 8px;
  --sans: ui-sans-serif, -apple-system, BlinkMacSystemFont, "Segoe UI", Inter, Roboto, "Helvetica Neue", Arial, sans-serif;
  --mono: ui-monospace, "SF Mono", SFMono-Regular, Menlo, Consolas, "Liberation Mono", monospace;
  --gutter: clamp(16px, 4vw, 40px);
  color-scheme: dark;
}

*,
*::before,
*::after {
  box-sizing: border-box;
}

[hidden] {
  display: none !important;
}

html {
  -webkit-text-size-adjust: 100%;
  text-size-adjust: 100%;
  background: var(--bg);
}

body {
  margin: 0;
  min-height: 100vh;
  display: flex;
  flex-direction: column;
  font-family: var(--sans);
  font-size: 15px;
  line-height: 1.6;
  color: var(--text);
  /* No solid colour here: html paints --bg, and the aurora layer (body::before) sits between the two. */
  background:
    radial-gradient(1200px 600px at 78% -10%, rgba(124, 255, 203, 0.04), transparent 60%),
    radial-gradient(900px 500px at -10% 30%, rgba(255, 179, 92, 0.02), transparent 60%),
    radial-gradient(circle at 1px 1px, rgba(150, 200, 190, 0.05) 1px, transparent 1.2px) 0 0 / 22px 22px;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
}

img,
canvas {
  display: block;
  max-width: 100%;
}

h1,
h2,
h3,
p,
ul,
ol,
dl,
dd {
  margin: 0;
}

a {
  color: inherit;
}

button,
input {
  font: inherit;
  color: inherit;
}

::selection {
  background: rgba(124, 255, 203, 0.28);
}

:focus-visible {
  outline: 2px solid var(--mint);
  outline-offset: 2px;
  border-radius: 4px;
}

.mono {
  font-family: var(--mono);
  font-variant-numeric: tabular-nums;
  letter-spacing: -0.01em;
}

.label {
  font-size: 11px;
  font-weight: 500;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--text-3);
}

.muted {
  color: var(--text-3);
}

.small {
  font-size: 13px;
}

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

.nowrap {
  white-space: nowrap;
}

.accent-mint {
  color: var(--mint);
}

.accent-amber {
  color: var(--amber);
}

.accent-gold {
  color: var(--gold);
}

.sr-only {
  position: absolute;
  width: 1px;
  height: 1px;
  padding: 0;
  margin: -1px;
  overflow: hidden;
  clip: rect(0 0 0 0);
  white-space: nowrap;
  border: 0;
}

.skip-link {
  position: absolute;
  left: -9999px;
  top: 10px;
  z-index: 100;
  padding: 8px 12px;
  background: var(--panel-solid);
  border: 1px solid var(--mint-line);
  border-radius: var(--radius-sm);
  text-decoration: none;
}

.skip-link:focus {
  left: 16px;
}

.wrap {
  width: 100%;
  max-width: 1240px;
  margin-inline: auto;
  padding-inline: var(--gutter);
}

/* ------------------------------------------------------------------ header */
.site-header {
  position: sticky;
  top: 0;
  z-index: 20;
  background: rgba(6, 9, 11, 0.64);
  backdrop-filter: saturate(140%) blur(12px);
  -webkit-backdrop-filter: saturate(140%) blur(12px);
  border-bottom: 1px solid var(--line);
}

.header-inner {
  display: flex;
  align-items: center;
  gap: 28px;
  min-height: 60px;
}

.brand {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  text-decoration: none;
  flex-shrink: 0;
}

.brand-mark {
  width: 30px;
  height: 30px;
  border-radius: 8px;
}

.brand-word {
  font-size: 15px;
  font-weight: 600;
  letter-spacing: -0.01em;
  white-space: nowrap;
}

.brand-word-2 {
  font-weight: 400;
  color: var(--text-2);
}

.nav {
  display: flex;
  gap: 4px;
  flex: 1;
}

.nav a {
  position: relative;
  padding: 8px 12px;
  font-size: 13.5px;
  color: var(--text-2);
  text-decoration: none;
  border-radius: var(--radius-sm);
  white-space: nowrap;
  transition: color 0.15s ease, background-color 0.15s ease;
}

.nav a:hover {
  color: var(--text);
  background: rgba(255, 255, 255, 0.03);
}

.nav a[aria-current="page"] {
  color: var(--text);
}

.nav a[aria-current="page"]::after {
  content: "";
  position: absolute;
  left: 12px;
  right: 12px;
  bottom: -11px;
  height: 1px;
  background: var(--mint);
  box-shadow: 0 0 8px rgba(124, 255, 203, 0.6);
}

.header-actions {
  position: relative;
  display: flex;
  align-items: center;
  gap: 10px;
  flex-shrink: 0;
}

.mock-banner {
  padding: 6px var(--gutter);
  font-size: 12px;
  text-align: center;
  color: var(--amber);
  background: var(--amber-dim);
  border-bottom: 1px solid rgba(255, 179, 92, 0.2);
}

@media (max-width: 760px) {
  .header-inner {
    flex-wrap: wrap;
    gap: 0 12px;
    padding-block: 10px 0;
  }

  .brand {
    flex: 1;
  }

  .nav {
    order: 3;
    flex-basis: 100%;
    margin-inline: calc(var(--gutter) * -1);
    padding: 4px var(--gutter) 6px;
    overflow-x: auto;
    scrollbar-width: none;
  }

  .nav::-webkit-scrollbar {
    display: none;
  }

  .nav a[aria-current="page"]::after {
    bottom: 2px;
  }
}

@media (max-width: 400px) {
  .brand-word-2 {
    display: none;
  }

  .header-badge {
    display: none;
  }
}

/* ------------------------------------------------------------------ layout */
.main {
  flex: 1;
  display: flex;
  flex-direction: column;
  gap: 20px;
  padding-block: 12px 64px;
}

.main:focus {
  outline: none;
}

.grid-2 {
  display: grid;
  grid-template-columns: minmax(0, 1.4fr) minmax(0, 1fr);
  gap: 20px;
  align-items: stretch;
}

.fly-grid {
  display: grid;
  grid-template-columns: minmax(0, 1.15fr) minmax(0, 1fr);
  gap: 20px;
  align-items: stretch;
}

.history-grid {
  display: grid;
  grid-template-columns: minmax(0, 1.6fr) minmax(0, 1fr);
  gap: 20px;
  align-items: stretch;
}

@media (max-width: 960px) {
  .grid-2,
  .fly-grid,
  .history-grid {
    grid-template-columns: minmax(0, 1fr);
  }
}

/* ------------------------------------------------------------------ type blocks */
.hero,
.page-head {
  padding-block: clamp(24px, 6vw, 56px) 8px;
  max-width: 760px;
}

.eyebrow {
  font-family: var(--mono);
  font-size: 11.5px;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--mint);
  margin-bottom: 14px;
}

.hero h1,
.page-head h1 {
  font-size: clamp(30px, 5.2vw, 52px);
  line-height: 1.05;
  font-weight: 600;
  letter-spacing: -0.03em;
}

.page-head h1 {
  font-size: clamp(28px, 4.2vw, 42px);
}

.lede {
  margin-top: 16px;
  font-size: clamp(15px, 1.8vw, 17px);
  line-height: 1.65;
  color: var(--text-2);
  max-width: 64ch;
}

/* ------------------------------------------------------------------ panels */
.panel {
  position: relative;
  padding: clamp(16px, 2.4vw, 24px);
  background: var(--panel);
  backdrop-filter: blur(14px) saturate(130%);
  -webkit-backdrop-filter: blur(14px) saturate(130%);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  min-width: 0;
}

.panel::before {
  /* hairline top highlight */
  content: "";
  position: absolute;
  inset: 0 16px auto;
  height: 1px;
  background: linear-gradient(90deg, transparent, rgba(124, 255, 203, 0.16), transparent);
  pointer-events: none;
}

.panel-head {
  display: flex;
  flex-wrap: wrap;
  align-items: flex-end;
  justify-content: space-between;
  gap: 12px 20px;
  margin-bottom: 16px;
}

.panel-titles {
  display: flex;
  flex-direction: column;
  gap: 2px;
  min-width: 0;
}

.panel-title {
  font-size: 16px;
  font-weight: 600;
  letter-spacing: -0.01em;
}

.panel-sub {
  font-size: 12.5px;
  color: var(--text-3);
}

.panel-tools {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 10px;
}

.empty {
  padding: 16px 0;
  color: var(--text-3);
  font-size: 14px;
  list-style: none;
}

.notice {
  padding: 12px 14px;
  font-size: 13.5px;
  color: var(--text-2);
  background: rgba(255, 255, 255, 0.02);
  border: 1px solid var(--line-2);
  border-radius: var(--radius-sm);
}

.notice-sim {
  color: var(--text);
  background: var(--amber-dim);
  border-color: rgba(255, 179, 92, 0.3);
}

.notice-sim strong {
  color: var(--amber);
}

.notice-error {
  border-color: rgba(255, 138, 148, 0.35);
  color: var(--danger);
}

/* ------------------------------------------------------------------ controls */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  height: 38px;
  padding: 0 16px;
  font-size: 14px;
  font-weight: 500;
  white-space: nowrap;
  background: transparent;
  border: 1px solid var(--line-3);
  border-radius: var(--radius-sm);
  cursor: pointer;
  text-decoration: none;
  transition: border-color 0.15s ease, background-color 0.15s ease, color 0.15s ease, transform 0.1s ease;
}

.btn:hover {
  border-color: var(--mint-line);
  background: rgba(124, 255, 203, 0.05);
}

.btn:active {
  transform: translateY(1px);
}

.btn:disabled {
  opacity: 0.5;
  cursor: not-allowed;
  transform: none;
}

.btn-sm {
  height: 32px;
  padding: 0 12px;
  font-size: 13px;
}

.btn-xs {
  height: 26px;
  padding: 0 9px;
  font-size: 12px;
}

.btn-ghost {
  color: var(--text-2);
}

.btn-ghost:hover {
  color: var(--text);
}

.btn-ghost.is-connected {
  font-family: var(--mono);
  font-size: 12.5px;
  color: var(--mint);
  border-color: rgba(124, 255, 203, 0.28);
}

.btn-primary {
  color: #03120c;
  background: var(--mint);
  border-color: var(--mint);
  font-weight: 600;
}

.btn-primary:hover {
  background: #a3ffdb;
  border-color: #a3ffdb;
  box-shadow: 0 0 0 4px rgba(124, 255, 203, 0.12), 0 0 24px rgba(124, 255, 203, 0.2);
}

.btn-accent {
  color: var(--mint);
  border-color: rgba(124, 255, 203, 0.35);
  background: var(--mint-dim);
}

.btn-accent[aria-pressed="true"] {
  background: rgba(124, 255, 203, 0.2);
}

.seg {
  display: inline-flex;
  align-items: stretch;
  padding: 2px;
  border: 1px solid var(--line-2);
  border-radius: var(--radius-sm);
  background: rgba(0, 0, 0, 0.2);
  max-width: 100%;
  overflow-x: auto;
  scrollbar-width: none;
}

.seg::-webkit-scrollbar {
  display: none;
}

.seg button {
  min-height: 28px;
  padding: 0 10px;
  font-family: var(--mono);
  font-size: 12px;
  color: var(--text-2);
  background: transparent;
  border: 0;
  border-radius: 6px;
  cursor: pointer;
  white-space: nowrap;
  transition: background-color 0.15s ease, color 0.15s ease;
}

.seg button:hover {
  color: var(--text);
}

.seg button[aria-pressed="true"] {
  color: var(--mint);
  background: var(--mint-dim);
  box-shadow: inset 0 0 0 1px rgba(124, 255, 203, 0.25);
}

.seg-static {
  display: inline-flex;
  align-items: center;
  padding: 0 8px;
  font-size: 11px;
  white-space: nowrap;
}

.chip-toggle {
  min-height: 32px;
  padding: 0 12px;
  font-family: var(--mono);
  font-size: 12px;
  color: var(--text-2);
  background: transparent;
  border: 1px solid var(--line-2);
  border-radius: 999px;
  cursor: pointer;
  transition: all 0.15s ease;
}

.chip-toggle:hover {
  color: var(--text);
  border-color: var(--line-3);
}

.chip-toggle[aria-pressed="true"] {
  color: #e7d2ff;
  border-color: rgba(214, 160, 255, 0.45);
  background: rgba(214, 160, 255, 0.1);
}

.chip-toggle:last-child[aria-pressed="true"] {
  color: var(--mint);
  border-color: rgba(124, 255, 203, 0.35);
  background: var(--mint-dim);
}

.input {
  flex: 1;
  min-width: 0;
  height: 40px;
  padding: 0 12px;
  font-size: 13.5px;
  background: rgba(3, 6, 7, 0.7);
  border: 1px solid var(--line-2);
  border-radius: var(--radius-sm);
  transition: border-color 0.15s ease, box-shadow 0.15s ease;
}

.input::placeholder {
  color: var(--text-3);
}

.input:focus-visible {
  outline: none;
  border-color: var(--mint-line);
  box-shadow: 0 0 0 3px rgba(124, 255, 203, 0.14);
}

.input[aria-invalid="true"] {
  border-color: rgba(255, 138, 148, 0.6);
}

.form-row {
  display: flex;
  gap: 8px;
  margin-block: 6px;
}

@media (max-width: 480px) {
  .form-row {
    flex-direction: column;
  }
}

.form-error {
  min-height: 0;
  font-size: 13px;
  color: var(--danger);
}

.form-error:empty {
  display: none;
}

.link {
  color: var(--text);
  text-decoration: underline;
  text-decoration-color: rgba(124, 255, 203, 0.35);
  text-underline-offset: 3px;
  transition: color 0.15s ease, text-decoration-color 0.15s ease;
}

.link:hover {
  color: var(--mint);
  text-decoration-color: var(--mint);
}

/* ------------------------------------------------------------------ badges, tags, dots */
.badge {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  height: 22px;
  padding: 0 9px;
  font-family: var(--mono);
  font-size: 10.5px;
  font-weight: 500;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  border: 1px solid;
  border-radius: 999px;
  white-space: nowrap;
}

.badge-dot {
  width: 6px;
  height: 6px;
  border-radius: 50%;
  background: currentColor;
}

.badge-live {
  color: var(--mint);
  border-color: rgba(124, 255, 203, 0.35);
  background: var(--mint-dim);
}

.badge-live .badge-dot {
  box-shadow: 0 0 0 0 rgba(124, 255, 203, 0.6);
  animation: pulse 2.4s ease-out infinite;
}

.badge-sim {
  color: var(--amber);
  border-color: rgba(255, 179, 92, 0.45);
  background: var(--amber-dim);
}

.badge-pre {
  color: var(--text-2);
  border-color: var(--line-3);
}

@keyframes pulse {
  0% {
    box-shadow: 0 0 0 0 rgba(124, 255, 203, 0.55);
  }
  70% {
    box-shadow: 0 0 0 6px rgba(124, 255, 203, 0);
  }
  100% {
    box-shadow: 0 0 0 0 rgba(124, 255, 203, 0);
  }
}

.tag {
  display: inline-flex;
  align-items: center;
  height: 20px;
  padding: 0 7px;
  font-size: 11px;
  color: var(--text-2);
  border: 1px solid var(--line-2);
  border-radius: 5px;
  white-space: nowrap;
}

.tag-mint {
  color: var(--mint);
  border-color: rgba(124, 255, 203, 0.3);
}

.tag-gold {
  color: var(--gold);
  border-color: rgba(255, 214, 107, 0.35);
  background: var(--gold-dim);
}

.tag-amber {
  color: var(--amber);
  border-color: rgba(255, 179, 92, 0.3);
}

.dot {
  display: inline-block;
  width: 7px;
  height: 7px;
  margin-right: 7px;
  border-radius: 50%;
  vertical-align: 1px;
}

.dot-ok {
  background: var(--mint);
  box-shadow: 0 0 8px rgba(124, 255, 203, 0.7);
}

.dot-bad {
  background: var(--danger);
  box-shadow: 0 0 8px rgba(255, 138, 148, 0.6);
}

/* ------------------------------------------------------------------ status strip */
.status-strip {
  display: flex;
  flex-wrap: wrap;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: rgba(8, 13, 15, 0.45);
  backdrop-filter: blur(14px) saturate(130%);
  -webkit-backdrop-filter: blur(14px) saturate(130%);
  overflow: hidden;
}

.status-item {
  flex: 1 1 150px;
  padding: 10px 16px;
  border-right: 1px solid var(--line);
  min-width: 0;
}

.status-item:last-child {
  border-right: 0;
}

.status-item dt {
  margin-bottom: 2px;
}

.status-item dd {
  font-size: 14px;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.status-item dd.is-warn {
  color: var(--amber);
}

@media (max-width: 640px) {
  .status-item {
    flex-basis: 50%;
    border-bottom: 1px solid var(--line);
  }

  .status-item:nth-child(2n) {
    border-right: 0;
  }
}

/* ------------------------------------------------------------------ canvases */
.canvas-wrap {
  position: relative;
  overflow: hidden;
  border: 1px solid var(--line);
  border-radius: var(--radius-sm);
  background: #05080a;
  box-shadow: inset 0 0 0 1px rgba(0, 0, 0, 0.4), 0 20px 60px -30px rgba(0, 0, 0, 0.8);
}

.orchard-canvas {
  width: 100%;
  aspect-ratio: 1000 / 620;
  touch-action: pan-y;
}

.closeup-canvas {
  width: 100%;
  aspect-ratio: 4 / 3;
  touch-action: manipulation;
}

.brain-canvas {
  width: 100%;
  aspect-ratio: 16 / 10;
}

.orchard-canvas.is-pointing,
.closeup-canvas.is-pointing {
  cursor: pointer;
}

.orchard-canvas:focus-visible,
.closeup-canvas:focus-visible {
  outline: 2px solid var(--mint);
  outline-offset: -2px;
  border-radius: var(--radius-sm);
}

@media (max-width: 560px) {
  .brain-canvas {
    aspect-ratio: 4 / 3;
  }
}

.canvas-tip {
  position: absolute;
  left: 0;
  top: 0;
  z-index: 2;
  padding: 4px 8px;
  font-size: 11.5px;
  white-space: nowrap;
  color: var(--text);
  background: rgba(5, 9, 11, 0.92);
  border: 1px solid var(--line-3);
  border-radius: 6px;
  pointer-events: none;
  box-shadow: 0 8px 20px rgba(0, 0, 0, 0.5);
}

.canvas-overlay {
  position: absolute;
  left: 50%;
  top: 50%;
  transform: translate(-50%, -50%);
  max-width: calc(100% - 32px);
  padding: 6px 12px;
  font-size: 12px;
  text-align: center;
  color: var(--text-2);
  background: rgba(5, 9, 11, 0.85);
  border: 1px solid var(--line-2);
  border-radius: 999px;
  pointer-events: none;
}

.orchard-foot {
  display: flex;
  flex-wrap: wrap;
  justify-content: space-between;
  align-items: center;
  gap: 10px 24px;
  margin-top: 14px;
}

.canvas-hint {
  font-size: 12px;
  color: var(--text-3);
}

@media (hover: none) {
  .canvas-hint {
    display: none;
  }
}

.legend {
  display: flex;
  flex-wrap: wrap;
  gap: 6px 16px;
  padding: 0;
  list-style: none;
}

.legend-item {
  display: inline-flex;
  align-items: center;
  gap: 7px;
  font-size: 12px;
  color: var(--text-2);
  text-transform: capitalize;
}

.legend-note {
  text-transform: none;
  color: var(--text-3);
}

.swatch {
  width: 11px;
  height: 11px;
  border-radius: 50%;
  box-shadow: 0 0 10px -1px var(--glow, transparent);
}

.sw-fig {
  --glow: rgba(255, 170, 110, 0.7);
  background: radial-gradient(circle at 35% 30%, #f4c39a, #c9744f 45%, #4a2319);
}

.sw-pear {
  --glow: rgba(255, 210, 120, 0.7);
  background: radial-gradient(circle at 35% 30%, #f6e6a8, #cdb25a 45%, #4d4218);
}

.sw-plum {
  --glow: rgba(226, 150, 210, 0.6);
  background: radial-gradient(circle at 35% 30%, #d9a7cf, #8a4e7e 45%, #2b1530);
}

.sw-grape {
  --glow: rgba(196, 232, 150, 0.6);
  background: radial-gradient(circle at 35% 30%, #d3e9a8, #86a55e 45%, #223319);
}

.sw-berry {
  --glow: rgba(255, 128, 140, 0.6);
  background: radial-gradient(circle at 35% 30%, #ffb1b3, #c8485a 45%, #3f1119);
}

.sw-golden {
  --glow: rgba(255, 214, 107, 0.95);
  background: radial-gradient(circle at 35% 30%, #fff4c9, #ffc94d 45%, #7a4c0c);
}

/* ------------------------------------------------------------------ neural panel */
.neural-controls {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 8px;
  margin-bottom: 12px;
}

.brain-wrap {
  background: radial-gradient(ellipse at 50% 55%, rgba(124, 255, 203, 0.035), transparent 65%), #040708;
}

.readout {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(130px, 1fr));
  gap: 1px;
  margin-top: 12px;
  background: var(--line);
  border: 1px solid var(--line);
  border-radius: var(--radius-sm);
  overflow: hidden;
}

.readout:empty {
  display: none;
}

.readout-item {
  display: flex;
  flex-direction: column;
  gap: 2px;
  padding: 8px 12px;
  background: var(--panel-solid);
  min-width: 0;
}

.readout-value {
  font-size: 13.5px;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.model-caption {
  margin-top: 12px;
  font-size: 12px;
  color: var(--text-2);
}

.model-subcaption {
  margin-top: 2px;
  font-size: 12px;
  color: var(--text-3);
}

/* ------------------------------------------------------------------ golden feed */
.golden-list {
  margin: 0;
  padding: 0;
  list-style: none;
}

.golden-item {
  display: grid;
  grid-template-columns: auto minmax(0, 1fr) auto;
  align-items: center;
  gap: 12px;
  padding: 10px 0;
  border-top: 1px solid var(--line);
}

.golden-item:first-child {
  border-top: 0;
  padding-top: 0;
}

.golden-mark {
  width: 9px;
  height: 9px;
  border-radius: 50%;
  background: radial-gradient(circle at 35% 30%, #fff4c9, #ffc94d 50%, #7a4c0c);
  box-shadow: 0 0 10px rgba(255, 214, 107, 0.65);
}

.golden-main,
.golden-side {
  display: flex;
  flex-direction: column;
  min-width: 0;
  line-height: 1.35;
}

.golden-side {
  align-items: flex-end;
  text-align: right;
}

.golden-main .link {
  font-size: 13.5px;
}

.golden-side .mono {
  font-size: 13px;
  white-space: nowrap;
}

/* ------------------------------------------------------------------ stats */
.stats {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(130px, 1fr));
  gap: 16px 20px;
}

.stat {
  min-width: 0;
  padding-left: 12px;
  border-left: 1px solid var(--line-2);
}

.stat-value {
  margin-top: 2px;
  font-size: 18px;
  line-height: 1.3;
  color: var(--text);
  overflow-wrap: anywhere;
}

.stat-value.muted {
  color: var(--text-2);
}

.stat-lg .stat-value {
  font-size: clamp(22px, 3vw, 28px);
}

.unit {
  margin-left: 5px;
  font-size: 11px;
  letter-spacing: 0.06em;
  color: var(--text-3);
}

.stat-hint {
  margin-top: 2px;
  font-size: 12px;
  color: var(--text-3);
  overflow-wrap: anywhere;
}

.meter {
  height: 4px;
  margin-top: 8px;
  border-radius: 2px;
  background: rgba(255, 255, 255, 0.06);
  overflow: hidden;
}

.meter-fill {
  display: block;
  height: 100%;
  border-radius: inherit;
  background: linear-gradient(90deg, rgba(124, 255, 203, 0.35), var(--mint));
  box-shadow: 0 0 10px rgba(124, 255, 203, 0.5);
  transition: width 0.6s ease;
}

/* ------------------------------------------------------------------ my fly */
.lookup {
  display: flex;
  flex-wrap: wrap;
  align-items: flex-end;
  justify-content: space-between;
  gap: 12px 24px;
}

.lookup-form {
  flex: 1 1 420px;
  min-width: 0;
}

.lookup-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  padding-bottom: 26px;
}

@media (max-width: 640px) {
  .lookup-actions {
    padding-bottom: 0;
  }
}

.empty-panel p {
  margin-top: 8px;
  max-width: 64ch;
}

.fly-summary {
  display: flex;
  flex-direction: column;
  gap: 20px;
}

.fly-id {
  display: flex;
  flex-direction: column;
  gap: 6px;
  padding-bottom: 16px;
  border-bottom: 1px solid var(--line);
}

.fly-id-top {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
}

.fly-address {
  font-size: 14px;
  color: var(--text);
  overflow-wrap: anywhere;
}

.fly-links {
  display: flex;
  align-items: center;
  gap: 12px;
}

.stats-earn {
  padding-top: 16px;
  border-top: 1px solid var(--line);
}

.stats-earn .stat-value {
  font-size: 17px;
}

.claim-box {
  display: flex;
  flex-direction: column;
  gap: 10px;
  align-items: flex-start;
}

.btn-claim {
  height: 44px;
  padding: 0 22px;
  font-size: 15px;
}

.claim-msg {
  font-size: 13px;
  color: var(--text-2);
}

.claim-msg:empty {
  display: none;
}

.fly-caption {
  margin-top: 12px;
  font-size: 12.5px;
  color: var(--text-2);
  min-height: 1.6em;
}

/* ------------------------------------------------------------------ tables */
.table-wrap {
  overflow-x: auto;
  margin-inline: -4px;
  padding-inline: 4px;
}

table.data {
  width: 100%;
  border-collapse: collapse;
  font-size: 13px;
}

table.data th {
  padding: 0 8px 8px;
  font-size: 10.5px;
  font-weight: 500;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--text-3);
  text-align: left;
  border-bottom: 1px solid var(--line-2);
  white-space: nowrap;
}

table.data td {
  padding: 7px 8px;
  border-bottom: 1px solid var(--line);
  color: var(--text-2);
  vertical-align: middle;
}

table.data th:first-child,
table.data td:first-child {
  padding-left: 0;
}

table.data th:last-child,
table.data td:last-child {
  padding-right: 0;
}

table.data .num {
  text-align: right;
  white-space: nowrap;
}

table.data tbody tr {
  transition: background-color 0.12s ease;
}

table.data tbody tr:hover {
  background: rgba(255, 255, 255, 0.02);
}

table.data tr.is-golden td:first-child {
  position: relative;
  padding-left: 14px;
  color: var(--gold);
}

table.data tr.is-golden td:first-child::before {
  content: "";
  position: absolute;
  left: 0;
  top: 50%;
  width: 6px;
  height: 6px;
  margin-top: -3px;
  border-radius: 50%;
  background: var(--gold);
  box-shadow: 0 0 8px rgba(255, 214, 107, 0.8);
}

.table-more {
  margin-top: 12px;
}

/* ------------------------------------------------------------------ pool */
.stats-hero {
  grid-template-columns: repeat(auto-fit, minmax(170px, 1fr));
}

.balance-bar {
  display: flex;
  height: 6px;
  margin-top: 22px;
  border-radius: 3px;
  overflow: hidden;
  background: rgba(255, 255, 255, 0.05);
}

.balance-seg {
  display: block;
  height: 100%;
}

.seg-liab {
  background: rgba(160, 185, 180, 0.45);
}

.seg-free {
  background: linear-gradient(90deg, rgba(124, 255, 203, 0.5), var(--mint));
}

.balance-legend,
.split-legend {
  display: flex;
  flex-wrap: wrap;
  gap: 6px 18px;
  margin-top: 8px;
}

.key {
  display: inline-block;
  width: 10px;
  height: 10px;
  margin-right: 6px;
  border-radius: 2px;
  vertical-align: -1px;
}

.key-budget {
  background: rgba(124, 255, 203, 0.08);
  box-shadow: inset 0 1px 0 rgba(124, 255, 203, 0.6);
  border: 1px solid rgba(124, 255, 203, 0.2);
}

.key-alloc {
  background: var(--mint);
}

.key-gold {
  background: var(--gold);
}

.key-harvest {
  background: var(--amber);
}

.key-liab {
  background: rgba(160, 185, 180, 0.45);
}

.key-free {
  background: var(--mint);
}

.stats-split {
  display: grid;
  grid-template-columns: minmax(0, 2fr) minmax(0, 3fr);
  gap: 20px 32px;
  margin-top: 24px;
  padding-top: 20px;
  border-top: 1px solid var(--line);
}

@media (max-width: 760px) {
  .stats-split {
    grid-template-columns: minmax(0, 1fr);
  }
}

.group-label {
  margin-bottom: 12px;
}

.chart-wrap {
  position: relative;
}

.chart-canvas {
  width: 100%;
  height: 220px;
  touch-action: pan-y;
}

.chart-tip {
  position: absolute;
  left: 0;
  top: 0;
  z-index: 2;
  padding: 8px 10px;
  font-size: 11.5px;
  line-height: 1.55;
  white-space: nowrap;
  background: rgba(5, 9, 11, 0.94);
  border: 1px solid var(--line-3);
  border-radius: var(--radius-sm);
  pointer-events: none;
  box-shadow: 0 10px 24px rgba(0, 0, 0, 0.5);
}

.tip-title {
  margin-bottom: 4px;
  color: var(--text);
}

.split-bar {
  display: flex;
  height: 26px;
  border-radius: 6px;
  overflow: hidden;
  border: 1px solid var(--line-2);
}

.split-seg {
  display: flex;
  align-items: center;
  height: 100%;
  overflow: hidden;
  white-space: nowrap;
}


.seg-base {
  background: linear-gradient(90deg, rgba(124, 255, 203, 0.55), rgba(124, 255, 203, 0.85));
}

.seg-harvest {
  background: var(--amber);
}

.seg-gold {
  background: var(--gold);
  box-shadow: inset 1px 0 0 rgba(0, 0, 0, 0.3);
}

.rules-list {
  margin-top: 18px;
}

.rule-row {
  display: grid;
  grid-template-columns: minmax(120px, 11rem) minmax(0, 1fr);
  gap: 4px 16px;
  padding: 9px 0;
  border-top: 1px solid var(--line);
  font-size: 13.5px;
}

.rule-row dt {
  color: var(--text-3);
}

.rule-row dd {
  color: var(--text);
  overflow-wrap: anywhere;
}

@media (max-width: 480px) {
  .rule-row {
    grid-template-columns: minmax(0, 1fr);
  }
}

.rules-list + .small {
  margin-top: 12px;
}

/* ------------------------------------------------------------------ how it works */
.how {
  display: flex;
  flex-direction: column;
  gap: 20px;
}

.steps {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 20px;
  padding: 0;
  list-style: none;
}

@media (max-width: 860px) {
  .steps {
    grid-template-columns: minmax(0, 1fr);
  }
}

.step-num {
  display: block;
  margin-bottom: 18px;
  font-size: 12px;
  color: var(--mint);
}

.step-title {
  margin-bottom: 8px;
  font-size: 18px;
  font-weight: 600;
  letter-spacing: -0.01em;
}

.step p {
  color: var(--text-2);
  font-size: 14.5px;
}

.prose p {
  color: var(--text-2);
  max-width: 72ch;
}

.prose p + p,
.prose p + ul,
.prose .panel-title + p,
.prose .panel-title + ul {
  margin-top: 12px;
}

.ticks {
  padding: 0;
  list-style: none;
}

.ticks li {
  position: relative;
  padding: 7px 0 7px 22px;
  color: var(--text-2);
  font-size: 14.5px;
  max-width: 76ch;
}

.ticks li::before {
  content: "";
  position: absolute;
  left: 2px;
  top: 16px;
  width: 8px;
  height: 1px;
  background: var(--mint);
  box-shadow: 0 0 6px rgba(124, 255, 203, 0.8);
}

.ticks-amber li::before {
  background: var(--amber);
  box-shadow: 0 0 6px rgba(255, 179, 92, 0.7);
}

.ticks-warn li::before {
  background: var(--danger);
  box-shadow: none;
}

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

.split-list {
  margin-top: 14px;
  padding: 0;
  list-style: none;
}

.split-list li {
  padding: 6px 0;
  border-top: 1px solid var(--line);
  color: var(--text-2);
  font-size: 14px;
}

.split-list .mono {
  display: inline-block;
  min-width: 3.5em;
}

.golden-explainer {
  background: linear-gradient(180deg, rgba(255, 214, 107, 0.045), transparent 60%), var(--panel);
}

.two-col {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 12px 32px;
  margin-top: 20px;
}

@media (max-width: 760px) {
  .two-col {
    grid-template-columns: minmax(0, 1fr);
  }
}

.credit-list {
  margin-top: 12px;
  padding: 0;
  list-style: none;
}

.credit-list li {
  padding: 10px 0;
  border-top: 1px solid var(--line);
  font-size: 14px;
  color: var(--text-2);
}

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

.contract-full {
  margin-left: 4px;
}

@media (max-width: 640px) {
  .contract-full {
    display: none;
  }
}

.disclaimer {
  border-color: rgba(255, 138, 148, 0.22);
  background: linear-gradient(180deg, rgba(255, 138, 148, 0.04), transparent 70%), var(--panel);
}

.disclaimer .panel-title {
  margin-bottom: 8px;
}

/* ------------------------------------------------------------------ toasts */
.toasts {
  position: fixed;
  right: 20px;
  bottom: 20px;
  z-index: 50;
  display: flex;
  flex-direction: column;
  align-items: flex-end;
  gap: 8px;
  pointer-events: none;
}

.toast {
  display: flex;
  align-items: center;
  gap: 10px;
  max-width: min(420px, calc(100vw - 40px));
  padding: 10px 14px;
  font-size: 13.5px;
  color: var(--text);
  background: rgba(8, 13, 15, 0.96);
  border: 1px solid var(--line-3);
  border-radius: 10px;
  box-shadow: 0 16px 40px rgba(0, 0, 0, 0.55);
  opacity: 0;
  transform: translateY(8px);
  transition: opacity 0.3s ease, transform 0.3s ease;
}

.toast.is-in {
  opacity: 1;
  transform: translateY(0);
}

.toast-dot {
  flex-shrink: 0;
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background: var(--text-2);
}

.toast-ok .toast-dot {
  background: var(--mint);
  box-shadow: 0 0 8px rgba(124, 255, 203, 0.8);
}

.toast-error {
  border-color: rgba(255, 138, 148, 0.4);
}

.toast-error .toast-dot {
  background: var(--danger);
}

.toast-gold {
  border-color: rgba(255, 214, 107, 0.5);
  background: linear-gradient(90deg, rgba(255, 214, 107, 0.12), rgba(8, 13, 15, 0.96) 60%);
  box-shadow: 0 16px 40px rgba(0, 0, 0, 0.55), 0 0 30px -6px rgba(255, 214, 107, 0.35);
}

.toast-gold .toast-text {
  font-family: var(--mono);
  font-size: 13px;
  color: var(--gold);
}

.toast-gold .toast-dot {
  background: radial-gradient(circle at 35% 30%, #fff4c9, #ffc94d 50%, #7a4c0c);
  box-shadow: 0 0 10px rgba(255, 214, 107, 0.9);
}

@media (max-width: 560px) {
  .toasts {
    left: 16px;
    right: 16px;
    bottom: 16px;
    align-items: stretch;
  }

  .toast {
    max-width: none;
  }
}

/* ------------------------------------------------------------------ footer */
.site-footer {
  border-top: 1px solid var(--line);
  background: rgba(4, 7, 8, 0.45);
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
}

.footer-inner {
  display: flex;
  flex-direction: column;
  gap: 6px;
  padding-block: 28px 36px;
  font-size: 13px;
}

.footer-brand {
  display: flex;
  align-items: center;
  gap: 10px;
  margin-bottom: 6px;
  font-weight: 600;
}

.footer-brand img {
  border-radius: 5px;
}

/* ------------------------------------------------------------------ motion preferences */
@media (prefers-reduced-motion: reduce) {
  *,
  *::before,
  *::after {
    animation-duration: 0.001ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: 0.001ms !important;
    scroll-behavior: auto !important;
  }
}


/* ---------------------------------------------------------------- home: stacked right column */
.stack {
  display: flex;
  flex-direction: column;
  gap: inherit;
  min-width: 0;
}
.epoch-stats {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 1rem 1.25rem;
  margin: 0;
}
.epoch-stat {
  margin: 0;
  min-width: 0;
}
.epoch-stat dd {
  margin: 0.3rem 0 0;
}
.epoch-value {
  font-size: 1.02rem;
  font-variant-numeric: tabular-nums;
  overflow-wrap: anywhere;
}

/* ---------------------------------------------------------------- status strip: wrap instead of truncating on phones */
@media (max-width: 640px) {
  .status-item dd {
    white-space: normal;
    text-overflow: clip;
    overflow: visible;
  }
}

/* ---------------------------------------------------------------- v2: per-trade rewards */
:root {
  --teal: #5ac8dc;
  --teal-dim: rgba(90, 200, 220, 0.12);
}

.accent-teal {
  color: var(--teal);
}

.tag-teal {
  color: var(--teal);
  border-color: rgba(90, 200, 220, 0.3);
}

.key-instant {
  background: var(--mint);
}

.key-drip,
.key-reserve {
  background: var(--teal);
}

.key-ops {
  background: rgba(160, 185, 180, 0.45);
}

.seg-instant {
  background: linear-gradient(90deg, rgba(124, 255, 203, 0.55), rgba(124, 255, 203, 0.85));
}

.seg-reserve {
  background: linear-gradient(90deg, rgba(90, 200, 220, 0.5), var(--teal));
}

.seg-ops {
  background: rgba(160, 185, 180, 0.35);
  box-shadow: inset 1px 0 0 rgba(0, 0, 0, 0.3);
}

/* status strip: trading phase next to the mode badge */
.status-phase {
  margin-left: 8px;
  font-family: var(--sans);
  font-size: 11px;
  color: var(--text-3);
}

/* new rows in live trade lists */
@keyframes row-in {
  from {
    opacity: 0;
    background-color: var(--mint-dim);
  }
  to {
    opacity: 1;
    background-color: transparent;
  }
}

.is-new {
  animation: row-in 1.2s ease-out both;
}

/* home: live trade ticker */
.ticker-head {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  gap: 12px;
  margin-top: 18px;
  padding-top: 14px;
  border-top: 1px solid var(--line);
}

.ticker {
  margin: 8px 0 0;
  padding: 0;
  list-style: none;
}

.ticker-item {
  display: grid;
  grid-template-columns: 4.6em auto minmax(0, 1fr) auto;
  align-items: center;
  gap: 10px;
  padding: 7px 0;
  border-top: 1px solid var(--line);
  font-size: 13px;
}

.ticker-item:first-child {
  border-top: 0;
}

.ticker-time {
  font-size: 12px;
  color: var(--text-3);
  white-space: nowrap;
}

.ticker-amt {
  text-align: right;
  white-space: nowrap;
  color: var(--mint);
}

.ticker-amt .unit {
  margin-left: 4px;
}

@media (max-width: 400px) {
  .ticker-item {
    grid-template-columns: 4.2em auto minmax(0, 1fr);
  }

  .ticker-tx {
    display: none;
  }
}

/* my fly: live earnings */
.earn-block {
  display: flex;
  flex-direction: column;
  gap: 14px;
  padding-top: 16px;
  border-top: 1px solid var(--line);
}

.earn-hero .stat-value {
  font-size: clamp(26px, 4vw, 34px);
  line-height: 1.15;
  letter-spacing: -0.01em;
  color: var(--mint);
  font-variant-numeric: tabular-nums;
}

.earn-sub .stat-value {
  font-size: 16px;
}

.earn-note {
  max-width: 62ch;
  font-size: 12.5px;
  color: var(--text-3);
}

/* pool: excluded addresses disclosure */
.disclosure summary {
  cursor: pointer;
  list-style: none;
  color: var(--text);
}

.disclosure summary::-webkit-details-marker {
  display: none;
}

.disclosure summary::before {
  content: "▸";
  display: inline-block;
  margin-right: 6px;
  color: var(--text-3);
  transition: transform 0.15s ease;
}

.disclosure[open] summary::before {
  transform: rotate(90deg);
}

.addr-list {
  margin: 8px 0 0;
  padding: 0;
  list-style: none;
}

.addr-list li {
  padding: 3px 0;
  font-size: 12px;
  overflow-wrap: anywhere;
}


/* ---------------------------------------------------------------- v3: living background */
body::before {
  content: "";
  position: fixed;
  inset: -25vmax;
  z-index: -2;
  pointer-events: none;
  background:
    radial-gradient(42vmax 32vmax at 16% 10%, rgba(124, 255, 203, 0.3), transparent 66%),
    radial-gradient(38vmax 30vmax at 88% 6%, rgba(90, 200, 220, 0.24), transparent 64%),
    radial-gradient(46vmax 34vmax at 70% 84%, rgba(255, 179, 92, 0.2), transparent 68%),
    radial-gradient(34vmax 26vmax at 38% 54%, rgba(214, 160, 255, 0.14), transparent 70%),
    radial-gradient(60vmax 22vmax at 50% -8%, rgba(124, 255, 203, 0.12), transparent 70%);
  filter: blur(16px);
  animation: orchard-drift 54s ease-in-out infinite alternate;
}

body::after {
  content: "";
  position: fixed;
  inset: 0;
  z-index: -1;
  pointer-events: none;
  background:
    repeating-linear-gradient(60deg, rgba(175, 230, 215, 0.075) 0 1px, transparent 1px 42px),
    repeating-linear-gradient(-60deg, rgba(175, 230, 215, 0.055) 0 1px, transparent 1px 42px),
    radial-gradient(120vmax 78vmax at 50% -10%, transparent 58%, rgba(0, 0, 0, 0.42));
  -webkit-mask-image: linear-gradient(180deg, rgba(0, 0, 0, 0.9), rgba(0, 0, 0, 0.3) 55%, rgba(0, 0, 0, 0.55));
  mask-image: linear-gradient(180deg, rgba(0, 0, 0, 0.9), rgba(0, 0, 0, 0.3) 55%, rgba(0, 0, 0, 0.55));
}

@keyframes orchard-drift {
  from {
    transform: translate3d(-1.5%, -1%, 0) scale(1);
  }
  to {
    transform: translate3d(1.5%, 1.5%, 0) scale(1.05);
  }
}

/* ---------------------------------------------------------------- v3: orchard interactions */
.orchard-bar {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 10px 18px;
  margin-bottom: 12px;
}

.epoch-clock {
  display: flex;
  align-items: center;
  gap: 10px;
  flex: 1 1 240px;
  min-width: 0;
}

.epoch-bar {
  position: relative;
  flex: 1 1 90px;
  min-width: 70px;
  height: 4px;
  border-radius: 2px;
  background: rgba(255, 255, 255, 0.07);
  overflow: hidden;
}

.epoch-bar-fill {
  position: absolute;
  left: 0;
  top: 0;
  bottom: 0;
  width: var(--p, 0%);
  border-radius: inherit;
  background: linear-gradient(90deg, rgba(124, 255, 203, 0.35), var(--mint));
  box-shadow: 0 0 10px rgba(124, 255, 203, 0.45);
  transition: width 0.9s linear;
}

.epoch-countdown {
  font-size: 13px;
  color: var(--text-2);
  white-space: nowrap;
}

.zoom-seg button {
  min-width: 30px;
  justify-content: center;
}

.orchard-canvas.is-grabbing {
  cursor: grabbing;
}

.orchard-cols {
  display: grid;
  grid-template-columns: minmax(0, 1.05fr) minmax(0, 1fr);
  gap: 14px 28px;
  margin-top: 16px;
  padding-top: 14px;
  border-top: 1px solid var(--line);
}

.orchard-col {
  min-width: 0;
}

.roster {
  margin: 8px 0 0;
  padding: 0;
  list-style: none;
  max-height: 232px;
  overflow-x: hidden;
  overflow-y: auto;
  scrollbar-width: thin;
}

.roster-row {
  display: grid;
  grid-template-columns: auto minmax(0, 1fr) auto;
  align-items: center;
  gap: 10px;
  width: 100%;
  padding: 7px 8px 7px 4px;
  font: inherit;
  text-align: left;
  color: var(--text-2);
  background: transparent;
  border: 0;
  border-top: 1px solid var(--line);
  border-radius: 6px;
  cursor: pointer;
  transition: background-color 0.15s ease, color 0.15s ease;
}

.roster li:first-child .roster-row {
  border-top: 0;
}

.roster-row:hover,
.roster-row.is-hover,
.roster-row:focus-visible {
  color: var(--text);
  background: rgba(124, 255, 203, 0.06);
}

.roster-dot {
  width: 9px;
  height: 9px;
  border-radius: 50%;
  background: hsl(var(--fly-hue, 160) 62% 62%);
  box-shadow: 0 0 8px -1px hsl(var(--fly-hue, 160) 70% 60% / 0.8);
}

.roster-row.is-golden .roster-dot {
  background: radial-gradient(circle at 35% 30%, #fff4c9, #ffc94d 50%, #7a4c0c);
  box-shadow: 0 0 10px rgba(255, 214, 107, 0.7);
}

.roster-main {
  display: flex;
  flex-direction: column;
  gap: 2px;
  min-width: 0;
}

.roster-name {
  font-family: var(--mono);
  font-size: 12.5px;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.roster-state {
  font-size: 11.5px;
  color: var(--text-3);
}

.roster-bar {
  width: 54px;
  height: 4px;
  border-radius: 2px;
  background: rgba(255, 255, 255, 0.07);
  overflow: hidden;
}

.roster-bar span {
  display: block;
  height: 100%;
  width: var(--w, 50%);
  border-radius: inherit;
  background: linear-gradient(90deg, rgba(124, 255, 203, 0.3), var(--mint));
}

.fruit-strip {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
  margin: 8px 0 0;
  padding: 0;
  list-style: none;
}

.fruit-chip {
  display: inline-flex;
  align-items: center;
  gap: 7px;
  padding: 5px 10px;
  font-size: 12px;
  color: var(--text-2);
  background: rgba(0, 0, 0, 0.22);
  border: 1px solid var(--line-2);
  border-radius: 999px;
  cursor: pointer;
  transition: border-color 0.15s ease, color 0.15s ease, background-color 0.15s ease;
}

.fruit-chip:hover,
.fruit-chip:focus-visible {
  color: var(--text);
  border-color: var(--line-3);
  background: rgba(255, 255, 255, 0.04);
}

.fruit-chip.is-golden {
  color: var(--gold);
  border-color: rgba(255, 214, 107, 0.35);
  background: var(--gold-dim);
}

.fruit-feeders {
  font-family: var(--mono);
  font-size: 11px;
  color: var(--mint);
}

.col-note {
  margin-top: 8px;
  font-size: 12px;
  color: var(--text-3);
}

/* golden feed fills its column instead of leaving a ragged edge */
.golden-panel {
  display: flex;
  flex-direction: column;
}

.golden-scroll {
  flex: 1;
  min-height: 0;
  overflow-x: hidden;
  overflow-y: auto;
  scrollbar-width: thin;
}

/* live rewards sits full width under the two columns: stats in one row, ticker below */
.epoch-panel .epoch-stats {
  grid-template-columns: repeat(auto-fit, minmax(190px, 1fr));
}

/* ---------------------------------------------------------------- v3: phones */
@media (max-width: 860px) {
  .orchard-cols {
    grid-template-columns: minmax(0, 1fr);
  }

  .roster {
    max-height: 196px;
  }
}

@media (max-width: 560px) {
  /* Blur over the whole page is expensive on phones: keep the tint, drop the blur. */
  .panel,
  .status-strip,
  .site-footer {
    backdrop-filter: none;
    -webkit-backdrop-filter: none;
  }

  .panel,
  .status-strip {
    background: rgba(9, 15, 18, 0.72);
  }

  .main {
    gap: 14px;
    padding-block: 8px 48px;
  }

  .panel {
    padding: 14px;
  }

  .orchard-canvas {
    aspect-ratio: 5 / 4;
  }

  .orchard-bar {
    gap: 8px 12px;
  }

  .panel-head {
    margin-bottom: 12px;
  }

  .epoch-stats {
    gap: 12px 16px;
  }

  .golden-scroll {
    max-height: 340px;
  }

  .hero,
  .page-head {
    padding-block: clamp(18px, 5vw, 32px) 4px;
  }

  .orchard-foot {
    gap: 8px 16px;
  }
}


/* ---------------------------------------------------------------- v3: columns that end level everywhere */
/* A panel in a stretched grid becomes a flex column: its last block absorbs the spare height instead of
   leaving dead space, and a short/empty block is centred so the panel still looks deliberate. */
.flex-panel {
  display: flex;
  flex-direction: column;
}

.panel-scroll {
  flex: 1;
  min-height: 0;
  /* Only a safety net for a user-expanded list: a stretched panel fills exactly, with no dead space. */
  max-height: min(150vh, 1400px);
  overflow-x: hidden;
  overflow-y: auto;
  scrollbar-width: thin;
}

.panel-scroll > .empty,
.panel-scroll > .muted:only-child {
  display: grid;
  place-items: center;
  min-height: 100%;
  padding: 24px 0;
  text-align: center;
}

.panel-grow {
  flex: 1;
  min-height: 260px;
}

/* the close-up fills its column instead of holding a fixed aspect ratio */
.closeup-wrap.panel-grow .closeup-canvas {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  aspect-ratio: auto;
}

/* the live-trades table drops its least important column before it clips */
@media (max-width: 1499px) {
  .trades-table th:nth-child(5),
  .trades-table td:nth-child(5) {
    display: none;
  }
}

/* On a phone a six-column trade table can only be read by scrolling sideways: show the essentials instead. */
@media (max-width: 640px) {
  .ts-year {
    display: none;
  }

  /* Tighter type and padding so a four-column table fits a phone instead of scrolling sideways. */
  table.data {
    font-size: 12px;
  }

  table.data th,
  table.data td {
    padding: 6px 4px;
  }

  .trades-table th:nth-child(2),
  .trades-table td:nth-child(2),
  .trades-table th:nth-child(3),
  .trades-table td:nth-child(3),
  .history-grid table.data th:nth-child(4),
  .history-grid table.data td:nth-child(4) {
    display: none;
  }
}

@media (max-width: 960px) {
  .panel-grow {
    min-height: 0;
    aspect-ratio: 4 / 3;
  }

  .closeup-wrap.panel-grow .closeup-canvas {
    position: absolute;
  }

  .panel-scroll {
    max-height: min(96vh, 900px);
  }
}

/* ------------------------------------------------------------------ wallet picker (EIP-6963) */

.wallet-dialog {
  /* No padding on the dialog itself: a click whose target is the dialog is a click on the backdrop. */
  padding: 0;
  width: min(420px, calc(100vw - 32px));
  max-height: calc(100vh - 32px);
  color: var(--text);
  background: var(--panel-solid);
  border: 1px solid var(--line-2);
  border-radius: var(--radius);
  box-shadow: 0 24px 80px rgba(0, 0, 0, 0.6);
  overflow: auto;
}

.wallet-dialog::backdrop {
  background: rgba(3, 6, 8, 0.72);
  backdrop-filter: blur(4px);
  -webkit-backdrop-filter: blur(4px);
}

.wallet-dialog[open] {
  animation: wallet-in 0.16s ease-out;
}

@keyframes wallet-in {
  from {
    opacity: 0;
    transform: translateY(6px);
  }
}

.wallet-body {
  padding: 20px;
}

.wallet-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  margin-bottom: 14px;
}

.wallet-title {
  margin: 0;
  font-size: 17px;
  font-weight: 600;
  letter-spacing: -0.01em;
}

.wallet-close {
  width: 28px;
  padding: 0;
  font-size: 13px;
}

.wallet-list {
  display: grid;
  gap: 8px;
  margin: 0;
  padding: 0;
  list-style: none;
}

.wallet-option {
  display: flex;
  align-items: center;
  gap: 12px;
  width: 100%;
  min-height: 52px;
  padding: 10px 12px;
  font: inherit;
  font-size: 15px;
  font-weight: 500;
  color: var(--text);
  text-align: left;
  background: rgba(255, 255, 255, 0.02);
  border: 1px solid var(--line-2);
  border-radius: var(--radius-sm);
  cursor: pointer;
  transition: border-color 0.15s ease, background-color 0.15s ease;
}

.wallet-option:hover {
  border-color: var(--mint-line);
  background: rgba(124, 255, 203, 0.05);
}

.wallet-option:disabled {
  opacity: 0.55;
  cursor: progress;
}

.wallet-icon {
  flex: none;
  width: 32px;
  height: 32px;
  border-radius: 8px;
  object-fit: contain;
}

.wallet-icon-mono {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  /* The sans face: in the mono face an initial O reads as a zero. */
  font-family: var(--sans);
  font-size: 15px;
  font-weight: 600;
  color: var(--mint);
  background: var(--mint-dim);
  border: 1px solid rgba(124, 255, 203, 0.25);
}

.wallet-name {
  flex: 1;
  min-width: 0;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.wallet-last {
  flex: none;
  color: var(--mint);
  border-color: rgba(124, 255, 203, 0.3);
}

.wallet-empty p {
  margin: 0 0 10px;
}

.wallet-empty p:last-child {
  margin-bottom: 0;
}

.wallet-msg {
  min-height: 1.6em;
  margin: 12px 0 0;
  color: var(--text-2);
}

.wallet-msg.is-error {
  color: var(--danger);
}

.wallet-foot {
  margin: 8px 0 0;
  padding-top: 12px;
  border-top: 1px solid var(--line);
}

.wallet-icon-sm {
  flex: none;
  width: 16px;
  height: 16px;
  border-radius: 4px;
  object-fit: contain;
}

@media (prefers-reduced-motion: reduce) {
  .wallet-dialog[open] {
    animation: none;
  }
}

/* ------------------------------------------------------------------ account menu (connected wallet) */

.account-menu {
  position: absolute;
  top: calc(100% + 8px);
  right: 0;
  z-index: 60;
  width: 248px;
  max-width: calc(100vw - 32px);
  padding: 6px;
  background: var(--panel-solid);
  border: 1px solid var(--line-2);
  border-radius: var(--radius);
  box-shadow: 0 18px 48px rgba(0, 0, 0, 0.55);
}

.account-head {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 8px 8px 10px;
  margin-bottom: 4px;
  border-bottom: 1px solid var(--line);
}

.account-head .wallet-icon {
  width: 28px;
  height: 28px;
}

.account-id {
  min-width: 0;
}

.account-wallet {
  font-size: 13px;
  font-weight: 600;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.account-addr {
  font-size: 12px;
  color: var(--text-3);
}

.account-item {
  display: block;
  width: 100%;
  padding: 8px 10px;
  font: inherit;
  font-size: 14px;
  color: var(--text-2);
  text-align: left;
  background: transparent;
  border: 0;
  border-radius: var(--radius-sm);
  cursor: pointer;
}

.account-item:hover,
.account-item:focus-visible {
  color: var(--text);
  background: rgba(124, 255, 203, 0.07);
  outline: none;
}

.account-item-danger {
  color: var(--danger);
}

.account-item-danger:hover,
.account-item-danger:focus-visible {
  color: var(--danger);
  background: rgba(255, 138, 148, 0.08);
}
