/* ==========================================================================
   WIRE.RAMIFY.CC | Branch-Typed File Drop Tree
   ========================================================================== */

:root {
  --bg-void: #050806;
  --bg-deep: #0a100c;
  --bg-surface: rgba(11, 18, 13, 0.8);

  --ink-primary: #f2ede2;
  --ink-secondary: #a9b5a5;
  --ink-muted: #71806f;

  --sap-lime: #c8f269;
  --sap-moss: #72de88;
  --sap-teal: #54c4b0;
  --sap-amber: #ebaa4c;
  --sap-coral: #ef7663;
  --sap-violet: #b694f6;

  --hairline: rgba(200, 242, 105, 0.14);
  --hairline-strong: rgba(200, 242, 105, 0.4);
  --hairline-mineral: rgba(242, 237, 226, 0.09);

  --font-display: 'Fraunces', 'Iowan Old Style', Georgia, serif;
  --font-sans: 'Plus Jakarta Sans', -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif;
  --font-mono: 'JetBrains Mono', ui-monospace, SFMono-Regular, Menlo, monospace;

  --ease-sprout: cubic-bezier(0.22, 1, 0.36, 1);
  --ease-tendril: cubic-bezier(0.34, 1.45, 0.64, 1);

  --container-max: 1280px;
  --radius-sm: 12px;
  --radius-md: 18px;
  --radius-lg: 24px;
  --radius-pill: 999px;
}

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

html {
  scroll-behavior: smooth;
  color-scheme: dark;
  background-color: var(--bg-void);
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
  overflow-x: clip;
}

body {
  min-height: 100dvh;
  background:
    radial-gradient(ellipse 90% 55% at 50% -8%, rgba(84, 196, 176, 0.12), transparent 68%),
    radial-gradient(ellipse 65% 48% at 90% 24%, rgba(200, 242, 105, 0.08), transparent 62%),
    radial-gradient(ellipse 65% 50% at 10% 76%, rgba(235, 170, 76, 0.07), transparent 62%),
    linear-gradient(180deg, var(--bg-void) 0%, var(--bg-deep) 60%, #050806 100%);
  color: var(--ink-primary);
  font-family: var(--font-sans);
  line-height: 1.5;
  overflow-x: clip;
  position: relative;
}

::selection {
  background: rgba(200, 242, 105, 0.28);
  color: var(--ink-primary);
}

#wire-canvas {
  position: fixed;
  inset: 0;
  width: 100%;
  height: 100%;
  z-index: 0;
  pointer-events: none;
}

.grain-overlay {
  position: fixed;
  inset: 0;
  z-index: 1;
  pointer-events: none;
  opacity: 0.035;
  background-image: url("data:image/svg+xml,%3Csvg viewBox='0 0 200 200' xmlns='http://www.w3.org/2000/svg'%3E%3Cfilter id='n'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='0.85' numOctaves='3' stitchTiles='stitch'/%3E%3C/filter%3E%3Crect width='100%25' height='100%25' filter='url(%23n)'/%3E%3C/svg%3E");
}

.page-shell {
  position: relative;
  z-index: 3;
  max-width: var(--container-max);
  margin: 0 auto;
  min-height: 100dvh;
  display: flex;
  flex-direction: column;
  padding: clamp(12px, 2.4vw, 24px) clamp(12px, 3vw, 40px) 28px;
}

/* TOPBAR */
.topbar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  padding: 9px 14px;
  border: 1px solid var(--hairline-mineral);
  border-radius: var(--radius-pill);
  background: rgba(9, 14, 10, 0.78);
  backdrop-filter: blur(18px) saturate(135%);
  -webkit-backdrop-filter: blur(18px) saturate(135%);
  margin-bottom: clamp(14px, 2.4vw, 22px);
  box-shadow: 0 12px 36px rgba(0, 0, 0, 0.36);
  animation: topbarReveal 0.75s var(--ease-sprout) both;
}

.topbar-brand {
  display: flex;
  align-items: center;
  gap: 10px;
  text-decoration: none;
  color: var(--ink-primary);
  min-width: 0;
}

.brand-seal {
  width: 32px;
  height: 32px;
  border-radius: 50%;
  background: radial-gradient(circle at 35% 30%, rgba(84, 196, 176, 0.25), rgba(14, 21, 16, 0.92));
  border: 1px solid var(--hairline-strong);
  display: grid;
  place-items: center;
  flex-shrink: 0;
}

.brand-seal svg { width: 18px; height: 18px; }

.brand-name {
  font-family: var(--font-display);
  font-weight: 600;
  font-size: clamp(1rem, 2.2vw, 1.15rem);
  white-space: nowrap;
}

.brand-parent {
  font-family: var(--font-mono);
  font-size: 0.67rem;
  padding: 3px 9px;
  border-radius: var(--radius-pill);
  border: 1px solid var(--hairline-mineral);
  color: var(--ink-muted);
  text-decoration: none;
  transition: color 0.2s ease, border-color 0.2s ease;
}

.brand-parent:hover {
  color: var(--sap-lime);
  border-color: var(--hairline-strong);
}

.topbar-center {
  display: flex;
  align-items: center;
  gap: 12px;
  font-family: var(--font-mono);
  font-size: 0.73rem;
  color: var(--ink-secondary);
}

.live-pill {
  display: inline-flex;
  align-items: center;
  gap: 7px;
  padding: 4px 11px;
  border-radius: var(--radius-pill);
  border: 1px solid rgba(114, 222, 136, 0.28);
  background: rgba(114, 222, 136, 0.09);
  color: var(--sap-moss);
  font-family: var(--font-mono);
  font-size: 0.7rem;
  letter-spacing: 0.05em;
  white-space: nowrap;
}

.live-dot {
  width: 7px;
  height: 7px;
  border-radius: 50%;
  background: var(--sap-lime);
  box-shadow: 0 0 10px var(--sap-lime);
  position: relative;
  flex-shrink: 0;
}

.live-dot::after {
  content: '';
  position: absolute;
  inset: -4px;
  border-radius: 50%;
  border: 1px solid var(--sap-lime);
  animation: pulseRing 2.4s var(--ease-sprout) infinite;
}

.topbar-actions {
  display: flex;
  align-items: center;
  gap: 6px;
  flex-shrink: 0;
}

.icon-btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 6px;
  padding: 7px 11px;
  border-radius: var(--radius-pill);
  border: 1px solid var(--hairline-mineral);
  background: rgba(255, 255, 255, 0.03);
  color: var(--ink-secondary);
  font-family: var(--font-mono);
  font-size: 0.71rem;
  cursor: pointer;
  transition: all 0.25s var(--ease-sprout);
  white-space: nowrap;
}

.icon-btn:hover {
  border-color: var(--hairline-strong);
  color: var(--ink-primary);
  background: rgba(200, 242, 105, 0.1);
  transform: translateY(-1px);
}

.icon-btn.is-active {
  border-color: rgba(200, 242, 105, 0.5);
  color: var(--sap-lime);
  background: rgba(200, 242, 105, 0.14);
}

.icon-btn svg { width: 14px; height: 14px; flex-shrink: 0; }

.kbd-hint {
  padding: 1px 6px;
  border-radius: 5px;
  background: rgba(255, 255, 255, 0.08);
  border: 1px solid rgba(255, 255, 255, 0.1);
  font-size: 0.65rem;
  color: var(--ink-muted);
}

@media (max-width: 900px) {
  .topbar-center, .brand-parent { display: none; }
}

@media (max-width: 600px) {
  .btn-label-hide, .kbd-hint { display: none; }
  .icon-btn { width: 34px; height: 34px; padding: 0; }
}

/* HERO */
.hero-intro {
  text-align: center;
  max-width: 820px;
  margin: 0 auto clamp(12px, 2vw, 18px);
}

.etymology-tag {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  flex-wrap: wrap;
  gap: 4px 8px;
  max-width: 100%;
  padding: 6px 14px;
  border-radius: 16px;
  border: 1px solid var(--hairline);
  background: rgba(84, 196, 176, 0.06);
  margin-bottom: 10px;
  font-family: var(--font-mono);
  font-size: clamp(0.68rem, 1.8vw, 0.74rem);
  line-height: 1.4;
  color: var(--ink-secondary);
  cursor: pointer;
  transition: border-color 0.25s ease, background 0.25s ease;
  animation: riseIn 0.75s 0.05s var(--ease-sprout) both;
}

.etymology-tag:hover {
  border-color: var(--hairline-strong);
  background: rgba(200, 242, 105, 0.09);
}

.etymology-tag strong { color: var(--sap-lime); font-weight: 500; }
.etymology-tag .sep { color: var(--ink-muted); }

.hero-title {
  font-family: var(--font-display);
  font-variation-settings: "opsz" 144, "SOFT" 70, "WONK" 1;
  font-size: clamp(2.05rem, 4.8vw, 3.65rem);
  font-weight: 500;
  line-height: 1.08;
  letter-spacing: -0.025em;
  color: var(--ink-primary);
  margin-bottom: 8px;
}

.title-line {
  display: block;
  overflow: hidden;
  padding-bottom: 0.2em;
  margin-bottom: -0.14em;
}

.title-line-inner {
  display: inline-block;
  animation: titleMaskUp 0.9s var(--delay, 0.1s) var(--ease-sprout) both;
}

.hero-title .italic-ramus {
  font-style: italic;
  font-weight: 300;
  background: linear-gradient(115deg, var(--sap-teal) 6%, var(--sap-lime) 52%, var(--sap-amber) 100%);
  background-size: 180% 180%;
  -webkit-background-clip: text;
  background-clip: text;
  color: transparent;
  animation: sapShimmer 9s ease-in-out infinite alternate;
}

.hero-lead {
  font-size: clamp(0.86rem, 1.2vw, 0.97rem);
  color: var(--ink-secondary);
  max-width: 60ch;
  margin: 0 auto;
  animation: riseIn 0.85s 0.22s var(--ease-sprout) both;
}

/* BRANCH FILTER CHIPS */
.branch-filter-bar {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 8px;
  margin-bottom: 14px;
  animation: riseIn 0.85s 0.25s var(--ease-sprout) both;
}

.branch-chip {
  display: inline-flex;
  align-items: center;
  gap: 7px;
  padding: 6px 12px;
  border-radius: var(--radius-pill);
  border: 1px solid var(--hairline-mineral);
  background: rgba(9, 15, 11, 0.78);
  color: var(--ink-secondary);
  font-family: var(--font-mono);
  font-size: 0.71rem;
  cursor: pointer;
  transition: all 0.22s var(--ease-sprout);
}

.branch-chip:hover {
  border-color: rgba(var(--chip-rgb, 200, 242, 105), 0.55);
  color: var(--ink-primary);
  transform: translateY(-1px);
}

.branch-chip.is-active {
  border-color: var(--chip-color, var(--sap-lime));
  background: rgba(var(--chip-rgb, 200, 242, 105), 0.14);
  color: var(--ink-primary);
}

.branch-dot {
  width: 7px;
  height: 7px;
  border-radius: 50%;
}

.chip-count {
  padding: 1px 6px;
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.06);
  font-size: 0.65rem;
  color: var(--ink-muted);
}

.branch-chip.is-active .chip-count {
  color: var(--ink-primary);
  background: rgba(255, 255, 255, 0.12);
}

/* TREE STAGE */
.arboretum-panel {
  position: relative;
  display: flex;
  flex-direction: column;
  border-radius: var(--radius-lg);
  border: 1px solid var(--hairline);
  background:
    radial-gradient(ellipse 75% 58% at 50% 94%, rgba(200, 242, 105, 0.1), transparent 64%),
    linear-gradient(175deg, rgba(13, 22, 16, 0.88), rgba(6, 10, 7, 0.95));
  box-shadow:
    0 28px 80px rgba(0, 0, 0, 0.58),
    inset 0 1px 0 rgba(255, 255, 255, 0.05);
  padding: clamp(12px, 2vw, 20px);
  margin-bottom: 16px;
  overflow: hidden;
  animation: riseIn 0.95s 0.18s var(--ease-sprout) both;
}

.arboretum-stage {
  position: relative;
  width: 100%;
  height: clamp(540px, 65vh, 660px);
}

#wire-tree-canvas {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  pointer-events: none;
  z-index: 1;
}

.arboretum-root-core {
  position: absolute;
  left: 50%;
  top: 90%;
  transform: translate(-50%, -50%);
  z-index: 3;
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 7px 14px;
  border-radius: var(--radius-pill);
  border: 1px solid rgba(200, 242, 105, 0.58);
  background: rgba(10, 16, 12, 0.94);
  box-shadow: 0 0 28px rgba(200, 242, 105, 0.22);
  font-family: var(--font-mono);
  font-size: 0.7rem;
  letter-spacing: 0.08em;
  color: var(--sap-lime);
  white-space: nowrap;
  pointer-events: none;
}

.arboretum-root-core::before {
  content: '';
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background: var(--sap-lime);
  box-shadow: 0 0 12px var(--sap-lime);
}

.wire-branch-hubs,
.wire-leaves {
  position: absolute;
  inset: 0;
  pointer-events: none;
}

.wire-branch-hubs { z-index: 2; }
.wire-leaves { z-index: 4; }

.wire-hub {
  pointer-events: auto;
  position: absolute;
  transform: translate(-50%, -50%);
  display: inline-flex;
  align-items: center;
  gap: 7px;
  padding: 6px 11px 6px 8px;
  border-radius: 999px;
  border: 1px solid rgba(var(--branch-rgb), 0.35);
  background: rgba(8, 13, 10, 0.9);
  backdrop-filter: blur(10px);
  color: var(--ink-primary);
  cursor: pointer;
  box-shadow: 0 8px 22px rgba(0, 0, 0, 0.45);
  transition: all 0.24s var(--ease-tendril);
  animation: budPop 0.65s var(--stagger, 0.2s) var(--ease-sprout) both;
}

.wire-hub.is-dormant {
  opacity: 0.48;
  border-style: dashed;
}

.wire-hub.is-filtered-out {
  opacity: 0;
  pointer-events: none;
}

.wire-hub:hover,
.wire-hub.is-hot,
.wire-hub.is-branch-active {
  opacity: 1;
  transform: translate(-50%, -52%) scale(1.06);
  border-color: var(--branch-color);
  box-shadow: 0 10px 26px rgba(0, 0, 0, 0.56), 0 0 22px rgba(var(--branch-rgb), 0.3);
}

.wire-hub-icon {
  width: 22px;
  height: 22px;
  border-radius: 50%;
  background: rgba(var(--branch-rgb), 0.14);
  display: grid;
  place-items: center;
  flex-shrink: 0;
}

.wire-hub-icon svg { width: 13px; height: 13px; }

.wire-hub-copy {
  display: flex;
  flex-direction: column;
  text-align: left;
  line-height: 1.15;
}

.wire-hub-name {
  font-size: 0.72rem;
  font-weight: 600;
  white-space: nowrap;
}

.wire-hub-count {
  font-family: var(--font-mono);
  font-size: 0.58rem;
  color: var(--branch-color);
  white-space: nowrap;
}

/* FILE BLOSSOM / FRUIT LEAF */
.wire-leaf {
  pointer-events: auto;
  position: absolute;
  transform: translate(-50%, -50%);
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 7px 12px 7px 8px;
  border-radius: 14px;
  border: 1px solid rgba(var(--leaf-rgb), 0.42);
  background: rgba(9, 15, 11, 0.94);
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
  color: var(--ink-primary);
  font-family: var(--font-sans);
  text-align: left;
  cursor: pointer;
  box-shadow: 0 10px 26px rgba(0, 0, 0, 0.5), 0 0 18px rgba(var(--leaf-rgb), 0.1);
  transition: transform 0.28s var(--ease-tendril), border-color 0.24s ease, box-shadow 0.28s ease, opacity 0.24s ease;
  animation: budPop 0.7s var(--stagger, 0.25s) var(--ease-sprout) both;
  max-width: 215px;
}

.wire-leaf:hover,
.wire-leaf.is-active,
.wire-leaf.is-selected {
  transform: translate(-50%, -54%) scale(1.07);
  border-color: var(--leaf-color);
  box-shadow: 0 14px 34px rgba(0, 0, 0, 0.65), 0 0 28px rgba(var(--leaf-rgb), 0.36);
  z-index: 6;
}

.wire-leaf.is-dimmed { opacity: 0.34; }

.wire-leaf-ext {
  min-width: 34px;
  height: 28px;
  padding: 0 6px;
  border-radius: 9px;
  background: rgba(var(--leaf-rgb), 0.14);
  border: 1px solid rgba(var(--leaf-rgb), 0.28);
  display: grid;
  place-items: center;
  font-family: var(--font-mono);
  font-size: 0.6rem;
  font-weight: 500;
  flex-shrink: 0;
}

.wire-leaf-copy {
  display: flex;
  flex-direction: column;
  min-width: 0;
  line-height: 1.18;
}

.wire-leaf-name {
  font-size: 0.79rem;
  font-weight: 600;
  color: var(--ink-primary);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.wire-leaf-meta {
  font-family: var(--font-mono);
  font-size: 0.61rem;
  color: var(--leaf-color);
  opacity: 0.92;
  white-space: nowrap;
}

@media (max-width: 839px) {
  .arboretum-stage { height: 610px; }
  .arboretum-root-core {
    top: 93%;
    font-size: 0.62rem;
    padding: 6px 11px;
  }
  .wire-hub {
    padding: 5px 8px 5px 6px;
    gap: 5px;
  }
  .wire-hub-name { font-size: 0.65rem; }
  .wire-hub-count { font-size: 0.54rem; }
  .wire-leaf {
    max-width: 162px;
    padding: 6px 9px 6px 6px;
    gap: 6px;
  }
  .wire-leaf-ext {
    min-width: 28px;
    height: 24px;
    font-size: 0.54rem;
  }
  .wire-leaf-name { font-size: 0.71rem; }
  .wire-leaf-meta { font-size: 0.56rem; }
}

/* INSPECTOR DOCK */
.arboretum-inspector {
  margin-top: 12px;
  padding: 12px 15px;
  border-radius: var(--radius-sm);
  border: 1px solid var(--hairline-mineral);
  background: rgba(6, 9, 7, 0.74);
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 10px 14px;
}

.inspector-left {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 8px 10px;
  min-width: 0;
  flex: 1 1 280px;
}

.inspector-badge {
  font-family: var(--font-mono);
  font-size: 0.69rem;
  padding: 3px 10px;
  border-radius: var(--radius-pill);
  background: rgba(200, 242, 105, 0.12);
  color: var(--sap-lime);
  border: 1px solid rgba(200, 242, 105, 0.32);
  white-space: nowrap;
}

.inspector-status {
  font-family: var(--font-mono);
  font-size: 0.69rem;
  color: var(--ink-muted);
  white-space: nowrap;
}

.inspector-desc {
  width: 100%;
  font-size: 0.86rem;
  font-weight: 500;
  color: var(--ink-primary);
  line-height: 1.4;
  word-break: break-all;
}

.inspector-meta {
  width: 100%;
  font-family: var(--font-mono);
  font-size: 0.69rem;
  color: var(--ink-muted);
}

.inspector-actions {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 8px;
  flex-shrink: 0;
}

.inspector-link {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 8px 15px;
  border-radius: var(--radius-pill);
  border: 1px solid rgba(200, 242, 105, 0.56);
  background: rgba(200, 242, 105, 0.16);
  font-family: var(--font-mono);
  font-size: 0.74rem;
  font-weight: 500;
  color: var(--sap-lime);
  text-decoration: none;
  white-space: nowrap;
  cursor: pointer;
  transition: transform 0.2s var(--ease-tendril), background 0.2s ease;
}

.inspector-link:hover {
  transform: translateY(-1px);
  background: rgba(200, 242, 105, 0.26);
}

.inspector-link[hidden],
.inspector-btn[hidden],
.inspector-clear[hidden] {
  display: none;
}

.inspector-btn {
  display: inline-flex;
  align-items: center;
  padding: 7px 12px;
  border-radius: var(--radius-pill);
  border: 1px solid var(--hairline-mineral);
  background: rgba(255, 255, 255, 0.04);
  font-family: var(--font-mono);
  font-size: 0.7rem;
  color: var(--ink-secondary);
  cursor: pointer;
  transition: all 0.2s ease;
}

.inspector-btn:hover {
  border-color: var(--hairline-strong);
  color: var(--ink-primary);
}

.inspector-btn.is-copied {
  border-color: var(--sap-moss);
  color: var(--sap-moss);
}

.inspector-clear {
  width: 30px;
  height: 30px;
  border-radius: 50%;
  border: 1px solid var(--hairline-mineral);
  background: rgba(255, 255, 255, 0.04);
  color: var(--ink-muted);
  font-size: 0.9rem;
  cursor: pointer;
}

.inspector-clear:hover {
  color: var(--ink-primary);
  border-color: var(--hairline-strong);
}

/* TELEMETRY BAR */
.telemetry-block {
  border-radius: var(--radius-md);
  border: 1px solid var(--hairline);
  background: var(--bg-surface);
  backdrop-filter: blur(16px);
  padding: 14px 18px;
  display: grid;
  grid-template-columns: minmax(180px, 240px) minmax(0, 1fr);
  gap: 16px 22px;
  align-items: center;
  animation: riseIn 0.95s 0.28s var(--ease-sprout) both;
}

@media (max-width: 820px) {
  .telemetry-block {
    grid-template-columns: 1fr;
    gap: 12px;
  }
}

.telemetry-wave-wrap {
  display: flex;
  flex-direction: column;
  gap: 6px;
  min-width: 0;
}

.telemetry-kicker {
  font-family: var(--font-mono);
  font-size: 0.65rem;
  letter-spacing: 0.13em;
  text-transform: uppercase;
  color: var(--ink-muted);
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
}

#sap-waveform {
  width: 100%;
  height: 58px;
  display: block;
  border-radius: 10px;
  background: rgba(5, 8, 6, 0.68);
  border: 1px solid rgba(255, 255, 255, 0.05);
}

.telemetry-stats {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 12px 16px;
  min-width: 0;
}

@media (max-width: 640px) {
  .telemetry-stats {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
}

.stat-cell {
  min-width: 0;
  display: flex;
  flex-direction: column;
  gap: 4px;
}

.stat-label {
  font-family: var(--font-mono);
  font-size: 0.64rem;
  letter-spacing: 0.09em;
  text-transform: uppercase;
  color: var(--ink-muted);
}

.stat-value {
  font-family: var(--font-mono);
  font-size: clamp(0.84rem, 1.8vw, 0.96rem);
  font-weight: 500;
  color: var(--ink-primary);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.stat-sub {
  font-family: var(--font-mono);
  font-size: 0.67rem;
  color: var(--sap-moss);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.mini-bar {
  height: 4px;
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.07);
  overflow: hidden;
  margin-top: 2px;
}

.mini-bar-fill {
  height: 100%;
  width: 0%;
  border-radius: 999px;
  background: linear-gradient(90deg, var(--sap-teal), var(--sap-lime));
  transition: width 0.8s var(--ease-sprout);
}

.mini-bar-fill--amber {
  background: linear-gradient(90deg, var(--sap-moss), var(--sap-amber));
}

/* COLOPHON & PALETTE */
.colophon {
  margin-top: 18px;
  padding-top: 12px;
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 8px 16px;
  font-size: 0.78rem;
  color: var(--ink-muted);
}

.colophon-quote {
  font-family: var(--font-display);
  font-style: italic;
  font-size: 0.92rem;
  color: var(--ink-secondary);
}

.colophon-meta {
  font-family: var(--font-mono);
  font-size: 0.69rem;
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}

.palette-backdrop {
  position: fixed;
  inset: 0;
  z-index: 50;
  background: rgba(4, 7, 5, 0.78);
  backdrop-filter: blur(12px);
  display: grid;
  place-items: start center;
  padding: min(14vh, 100px) 16px 24px;
  opacity: 0;
  pointer-events: none;
  transition: opacity 0.22s ease;
}

.palette-backdrop.is-open { opacity: 1; pointer-events: auto; }

.palette-box {
  width: 100%;
  max-width: 560px;
  border-radius: var(--radius-lg);
  border: 1px solid var(--hairline-strong);
  background: rgba(11, 17, 13, 0.96);
  box-shadow: 0 28px 80px rgba(0, 0, 0, 0.75);
  overflow: hidden;
  transform: translateY(-10px) scale(0.98);
  transition: transform 0.24s var(--ease-sprout);
}

.palette-backdrop.is-open .palette-box { transform: translateY(0) scale(1); }

.palette-input-row {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 16px 18px;
  border-bottom: 1px solid var(--hairline-mineral);
}

.palette-input {
  width: 100%;
  background: transparent;
  border: none;
  outline: none;
  color: var(--ink-primary);
  font-family: var(--font-sans);
  font-size: 1rem;
}

.palette-input::placeholder { color: var(--ink-muted); }
.palette-results { max-height: 360px; overflow-y: auto; padding: 8px; }

.palette-item {
  width: 100%;
  background: transparent;
  border: none;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  padding: 11px 14px;
  border-radius: 12px;
  color: var(--ink-primary);
  cursor: pointer;
  transition: background 0.16s ease;
}

.palette-item:hover,
.palette-item.is-selected { background: rgba(200, 242, 105, 0.13); }
.palette-item-title { font-weight: 600; font-size: 0.92rem; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.palette-item-sub { font-family: var(--font-mono); font-size: 0.72rem; color: var(--ink-muted); }

@keyframes topbarReveal { from { opacity: 0; transform: translateY(-12px); } to { opacity: 1; transform: translateY(0); } }
@keyframes riseIn { from { opacity: 0; transform: translateY(16px); } to { opacity: 1; transform: translateY(0); } }
@keyframes titleMaskUp { from { opacity: 0; transform: translateY(110%); } to { opacity: 1; transform: translateY(0); } }
@keyframes budPop { from { opacity: 0; scale: 0.82; } to { opacity: 1; scale: 1; } }
@keyframes pulseRing { 0% { transform: scale(0.8); opacity: 0.85; } 80%, 100% { transform: scale(2.2); opacity: 0; } }
@keyframes sapShimmer { 0% { background-position: 0% 50%; } 100% { background-position: 100% 50%; } }

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