/* -------------------------------------------
   LAYOUT & STYLE
   ------------------------------------------- */
html, body {
  margin: 0; padding: 0;
  width: 100%; height: 100%;
  overflow: hidden;
  font-family: 'Inter', sans-serif;
  background: #000;
}

:root { --corner-panel-width: 360px; }

body {
  background: radial-gradient(circle at center, #111827 0%, #000000 100%);
}

#neuralCanvas {
  position: absolute;
  top: 0; left: 0;
  width: 100%; height: 100%;
  z-index: 1;
}

/* -------------------------------------------
   UI: "STARBURST" FLUID ANIMATIONS
   ------------------------------------------- */
.ui-container {
    padding: 0.8rem 1.2rem;
    border-radius: 12px;
    background: rgba(255, 255, 255, 0.05);
    backdrop-filter: blur(10px);
    -webkit-backdrop-filter: blur(10px);
    border: 1px solid rgba(255, 255, 255, 0.1);

    transition:
        width 0.6s cubic-bezier(0.34, 1.56, 0.64, 1),
        height 0.6s cubic-bezier(0.34, 1.56, 0.64, 1),
        background 0.4s ease,
        border 0.4s ease,
        transform 0.6s cubic-bezier(0.34, 1.56, 0.64, 1),
        left 0.6s cubic-bezier(0.34, 1.56, 0.64, 1),
        right 0.6s cubic-bezier(0.34, 1.56, 0.64, 1),
        top 0.6s cubic-bezier(0.34, 1.56, 0.64, 1),
        bottom 0.6s cubic-bezier(0.34, 1.56, 0.64, 1);

    z-index: 10;
    position: absolute;
    overflow: hidden;
}
.ui-container:hover {
    background: rgba(255, 255, 255, 0.12);
    border: 1px solid rgba(255, 255, 255, 0.25);
    transform: scale(1.05);
    z-index: 20;
}

/* -------------------------------------------
   BUILD LEDGER: COMPACT LEFT-EDGE SUMMARY
   ------------------------------------------- */
#buildTelemetry {
  box-sizing: border-box;
  top: 50%; left: 20px;
  width: var(--corner-panel-width);
  padding: 0;
  color: #fff;
  background:
    linear-gradient(145deg, rgba(8, 16, 32, 0.5), rgba(4, 8, 18, 0.62)) padding-box,
    linear-gradient(115deg, rgba(96, 165, 250, 0.62), rgba(255, 255, 255, 0.14) 48%, rgba(239, 68, 68, 0.48)) border-box;
  border: 1px solid transparent;
  border-radius: 16px;
  box-shadow: 0 18px 54px rgba(0, 0, 0, 0.38), 0 0 34px rgba(59, 130, 246, 0.09);
  transform: translateY(-50%);
  z-index: 20;
  overflow: hidden;
}

#buildTelemetry:hover {
  background:
    linear-gradient(145deg, rgba(8, 16, 32, 0.6), rgba(4, 8, 18, 0.72)) padding-box,
    linear-gradient(115deg, rgba(96, 165, 250, 0.78), rgba(255, 255, 255, 0.2) 48%, rgba(239, 68, 68, 0.62)) border-box;
  border: 1px solid transparent;
  transform: translateY(-50%);
  z-index: 30;
}

#buildTelemetry.expanded {
  top: 50%; left: 50%;
  width: min(820px, calc(100vw - 48px));
  max-height: calc(100dvh - 40px);
  overflow-y: auto;
  padding: 1.25rem 1.4rem 1.15rem;
  border-radius: 20px;
  background:
    linear-gradient(145deg, rgba(8, 16, 32, 0.62), rgba(4, 8, 18, 0.74)) padding-box,
    linear-gradient(115deg, rgba(96, 165, 250, 0.78), rgba(255, 255, 255, 0.2) 48%, rgba(239, 68, 68, 0.62)) border-box;
  box-shadow: 0 32px 100px rgba(0, 0, 0, 0.5), 0 0 60px rgba(59, 130, 246, 0.1);
  transform: translate(-50%, -50%);
  z-index: 50;
}

#buildTelemetry.expanded:hover { transform: translate(-50%, -50%); }

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

.ledger-toggle {
  display: block;
  width: 100%;
  margin: 0;
  padding: 0;
  border: 0;
  color: inherit;
  background: transparent;
  font: inherit;
  text-align: left;
  cursor: pointer;
}

.ledger-toggle:focus-visible {
  outline: 2px solid #93c5fd;
  outline-offset: -3px;
}

.ledger-compact {
  display: block;
  padding: 0.95rem 1rem 0.82rem;
}

.ledger-compact-eyebrow,
.ledger-compact-label,
.ledger-compact-activity-label,
.ledger-compact-action {
  color: #cbd5e1;
  font-size: 0.58rem;
  font-weight: 700;
  letter-spacing: 0.12em;
  text-transform: uppercase;
}

.ledger-compact-eyebrow {
  display: flex;
  align-items: center;
  gap: 0.45rem;
  color: #dbeafe;
}

.ledger-compact-eyebrow::before {
  width: 6px;
  height: 6px;
  border-radius: 50%;
  background: #22c55e;
  box-shadow: 0 0 10px #22c55e;
  content: "";
}

.ledger-compact-commits {
  display: grid;
  grid-template-columns: auto 1fr;
  gap: 0.56rem;
  align-items: end;
  margin-top: 0.68rem;
}

.ledger-compact-commits strong {
  color: #fff;
  font-size: 2.05rem;
  font-variant-numeric: tabular-nums;
  line-height: 0.92;
  letter-spacing: -0.06em;
  text-shadow: 0 0 24px rgba(96, 165, 250, 0.22);
}

.ledger-compact-label {
  max-width: 105px;
  padding-bottom: 0.08rem;
  color: #dbeafe;
  line-height: 1.42;
}

.ledger-compact-activity {
  display: flex;
  align-items: end;
  justify-content: space-between;
  gap: 0.7rem;
  margin-top: 0.78rem;
  padding-top: 0.7rem;
  border-top: 1px solid rgba(147, 197, 253, 0.22);
}

.ledger-compact-activity-value {
  display: grid;
  gap: 0.08rem;
  text-align: right;
}

.ledger-compact-activity-value strong {
  color: #86efac;
  font-size: 1.05rem;
  font-variant-numeric: tabular-nums;
  line-height: 1;
}

.ledger-compact-activity-value small {
  color: #94a3b8;
  font-size: 0.56rem;
  font-weight: 700;
  letter-spacing: 0.09em;
}

.ledger-compact-action {
  display: flex;
  justify-content: space-between;
  margin-top: 0.75rem;
  color: #93c5fd;
}

.ledger-compact-action span { font-size: 0.82rem; line-height: 0.7; }

.ledger-expanded { width: 100%; }
.ledger-expanded[hidden] { display: none; }

#buildTelemetry.expanded .ledger-toggle {
  position: absolute;
  top: 0.65rem;
  right: 0.65rem;
  z-index: 2;
  display: grid;
  width: 44px;
  height: 44px;
  place-items: center;
  border: 1px solid rgba(255, 255, 255, 0.18);
  border-radius: 999px;
  color: #e2e8f0;
  background: rgba(15, 23, 42, 0.6);
}

#buildTelemetry.expanded .ledger-toggle::after {
  font-size: 1.4rem;
  font-weight: 300;
  line-height: 1;
  content: "×";
}

#buildTelemetry.expanded .ledger-compact { display: none; }
#buildTelemetry.expanded .ledger-header { padding-right: 3rem; }

.ledger-header,
.ledger-footer-top {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
}

.ledger-window,
.ledger-snapshot,
.activity-title,
.profile-title,
.inventory-anchor,
.panel-label {
  color: #94a3b8;
  font-size: 0.62rem;
  font-weight: 700;
  letter-spacing: 0.15em;
  text-transform: uppercase;
}

.ledger-window {
  display: inline-flex;
  align-items: center;
  gap: 0.55rem;
  color: #dbeafe;
}

.ledger-window::before {
  width: 7px; height: 7px;
  border-radius: 50%;
  background: #22c55e;
  box-shadow: 0 0 12px #22c55e;
  content: "";
  animation: statusPulse 2s ease-in-out infinite;
}

.ledger-window span { color: #64748b; }
.ledger-snapshot { text-align: right; line-height: 1.45; }
.ledger-snapshot time { color: #cbd5e1; }

.ledger-title {
  margin: 0.65rem 0 0;
  color: #f8fafc;
  font-size: clamp(0.72rem, 1.15vw, 0.86rem);
  line-height: 1.3;
  letter-spacing: 0.19em;
}

.ledger-main {
  display: grid;
  grid-template-columns: minmax(245px, 0.86fr) minmax(310px, 1.14fr);
  gap: 1.8rem;
  align-items: end;
  margin-top: 0.45rem;
}

.ledger-hero-line {
  display: flex;
  align-items: flex-end;
  gap: 0.85rem;
}

.ledger-number {
  color: #fff;
  font-size: clamp(4.8rem, 8.3vw, 6.7rem);
  font-variant-numeric: tabular-nums;
  font-weight: 700;
  line-height: 0.86;
  letter-spacing: -0.075em;
  text-shadow: 0 0 38px rgba(96, 165, 250, 0.23);
}

.ledger-number-label {
  max-width: 130px;
  padding-bottom: 0.48rem;
  color: #dbeafe;
  font-size: 0.68rem;
  font-weight: 700;
  line-height: 1.5;
  letter-spacing: 0.1em;
  text-transform: uppercase;
}

.ledger-insight {
  max-width: 340px;
  margin: 0.7rem 0 0;
  color: #94a3b8;
  font-size: 0.75rem;
  line-height: 1.55;
}

.ledger-insight strong { color: #f8fafc; }

.activity-panel {
  display: grid;
  grid-template-columns: 96px minmax(0, 1fr);
  gap: 1rem;
  align-items: center;
  padding: 0.45rem 0 0.15rem 1.35rem;
  border-left: 1px solid rgba(96, 165, 250, 0.28);
}

.activity-ring {
  --activity-rate: 84%;
  position: relative;
  display: grid;
  width: 96px;
  aspect-ratio: 1;
  place-items: center;
  border-radius: 50%;
  background: conic-gradient(from -90deg, #60a5fa 0 var(--activity-rate), rgba(255, 255, 255, 0.08) var(--activity-rate) 100%);
  box-shadow: 0 0 26px rgba(59, 130, 246, 0.16);
}

.activity-ring::before {
  position: absolute;
  inset: 8px;
  border: 1px solid rgba(147, 197, 253, 0.12);
  border-radius: inherit;
  background: linear-gradient(145deg, rgba(8, 16, 32, 0.98), rgba(4, 8, 18, 0.96));
  content: "";
}

.activity-ring-value {
  position: relative;
  display: grid;
  gap: 0.12rem;
  text-align: center;
}

.activity-ring-value strong {
  color: #f8fafc;
  font-size: 1.45rem;
  font-variant-numeric: tabular-nums;
  line-height: 1;
  letter-spacing: -0.04em;
}

.activity-ring-value small,
.activity-summary small {
  color: #94a3b8;
  font-size: 0.55rem;
  font-weight: 700;
  letter-spacing: 0.09em;
  line-height: 1.3;
  text-transform: uppercase;
}

.activity-summary {
  display: grid;
  align-content: center;
  gap: 0.28rem;
}

.activity-summary > strong {
  color: #fff;
  font-size: clamp(1.65rem, 3vw, 2.1rem);
  font-variant-numeric: tabular-nums;
  line-height: 1;
  letter-spacing: -0.05em;
}

.activity-summary .activity-title { color: #dbeafe; }

.ledger-evidence {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 0.65rem;
  margin: 1rem 0 0;
}

.ledger-proof {
  min-width: 0;
  padding: 0.72rem 0.8rem;
  border-top: 1px solid rgba(96, 165, 250, 0.4);
  background: linear-gradient(180deg, rgba(59, 130, 246, 0.09), transparent);
}

.ledger-proof dt {
  margin: 0;
  color: #cbd5e1;
  font-size: 0.59rem;
  font-weight: 700;
  letter-spacing: 0.1em;
  text-transform: uppercase;
}

.ledger-proof dd {
  margin: 0.28rem 0 0;
}

.ledger-proof dd > strong {
  display: block;
  color: #fff;
  font-size: clamp(1.35rem, 2.5vw, 1.8rem);
  font-variant-numeric: tabular-nums;
  font-weight: 700;
  line-height: 1;
}

.ledger-proof dd > small {
  display: block;
  margin-top: 0.35rem;
  color: #64748b;
  font-size: 0.6rem;
  line-height: 1.35;
}

.ledger-footer {
  display: grid;
  grid-template-columns: minmax(145px, 0.55fr) minmax(300px, 1.45fr) auto;
  gap: 1rem;
  align-items: end;
  margin-top: 0.85rem;
  padding-top: 0.85rem;
  border-top: 1px solid rgba(255, 255, 255, 0.1);
}

.inventory-anchor strong {
  display: block;
  margin-top: 0.2rem;
  color: #f8fafc;
  font-size: 1.05rem;
  font-variant-numeric: tabular-nums;
  letter-spacing: 0;
}

.profile-track {
  display: flex;
  height: 7px;
  margin-top: 0.42rem;
  overflow: hidden;
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.07);
}

.profile-segment { width: var(--profile-width); }
.profile-segment:nth-child(1) { background: #60a5fa; }
.profile-segment:nth-child(2) { background: #8b5cf6; }
.profile-segment:nth-child(3) { background: #f97316; }
.profile-segment:nth-child(4) { background: #475569; }

.profile-legend {
  display: flex;
  flex-wrap: wrap;
  gap: 0.25rem 0.65rem;
  margin-top: 0.4rem;
  color: #64748b;
  font-size: 0.55rem;
  font-weight: 600;
}

.profile-legend strong { color: #cbd5e1; font-weight: 600; }

.telemetry-github {
  display: inline-flex;
  min-height: 44px;
  align-items: center;
  justify-content: center;
  padding: 0 0.25rem;
  color: #93c5fd;
  font-size: 0.65rem;
  font-weight: 700;
  letter-spacing: 0.1em;
  text-decoration: none;
  white-space: nowrap;
}

.telemetry-github:focus-visible {
  outline: 2px solid #60a5fa;
  outline-offset: 4px;
  border-radius: 3px;
}

.ledger-projects {
  margin-top: 0.9rem;
  padding-top: 0.82rem;
  border-top: 1px solid rgba(147, 197, 253, 0.2);
}

.ledger-projects-heading {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  gap: 1rem;
}

.ledger-projects-kicker,
.ledger-projects h3 {
  margin: 0;
  font-size: 0.56rem;
  font-weight: 700;
  letter-spacing: 0.11em;
  line-height: 1.3;
  text-transform: uppercase;
}

.ledger-projects-kicker { color: #64748b; }
.ledger-projects h3 { color: #bfdbfe; }

.ledger-projects-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 0.62rem;
  margin-top: 0.62rem;
}

.ledger-project-link {
  display: grid;
  min-width: 0;
  align-content: start;
  gap: 0.35rem;
  padding: 0.62rem 0.72rem 0.66rem;
  border: 1px solid rgba(148, 163, 184, 0.2);
  border-radius: 10px;
  background:
    linear-gradient(135deg, rgba(37, 99, 235, 0.13), rgba(15, 23, 42, 0.34) 56%, rgba(139, 92, 246, 0.09));
  color: inherit;
  text-decoration: none;
  transition: border-color 180ms ease, background 180ms ease, transform 180ms ease;
}

.ledger-project-link:hover {
  border-color: rgba(147, 197, 253, 0.58);
  background:
    linear-gradient(135deg, rgba(37, 99, 235, 0.22), rgba(15, 23, 42, 0.44) 56%, rgba(139, 92, 246, 0.16));
  transform: translateY(-2px);
}

.ledger-project-link:focus-visible {
  outline: 2px solid #93c5fd;
  outline-offset: 3px;
}

.ledger-project-label {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 0.42rem;
  color: #e0efff;
  line-height: 0.9;
}

.ledger-project-label > span[aria-hidden] {
  color: #93c5fd;
  font-size: 0.88rem;
  line-height: 1;
}

.ledger-project-label .ledger-project-name {
  max-width: calc(100% - 1.5rem);
  color: #eff6ff;
  font-family: 'Space Grotesk', 'Inter', sans-serif;
  font-size: clamp(1rem, 1.35vw, 1.22rem);
  font-weight: 700;
  letter-spacing: -0.04em;
  line-height: 1.05;
  text-wrap: balance;
}

.ledger-project-description {
  color: #94a3b8;
  font-size: 0.57rem;
  line-height: 1.35;
}

.panel-toggle {
  position: absolute;
  inset: 0;
  z-index: 3;
  width: 100%;
  height: 100%;
  margin: 0;
  padding: 0;
  border: 0;
  border-radius: inherit;
  color: transparent;
  background: transparent;
  cursor: pointer;
}

.panel-toggle:focus-visible {
  outline: 2px solid #60a5fa;
  outline-offset: -3px;
}

#bitcoinInfo.expanded > .panel-toggle,
#quotesBox.expanded > .panel-toggle,
#locationHistory.expanded > .panel-toggle {
  inset: 0.65rem 0.65rem auto auto;
  width: 44px;
  height: 44px;
  border: 1px solid rgba(255, 255, 255, 0.18);
  border-radius: 999px;
  color: #e2e8f0;
  background: rgba(15, 23, 42, 0.82);
}

#bitcoinInfo.expanded > .panel-toggle::after,
#quotesBox.expanded > .panel-toggle::after,
#locationHistory.expanded > .panel-toggle::after {
  display: grid;
  place-items: center;
  width: 100%;
  height: 100%;
  font-size: 1.4rem;
  font-weight: 300;
  line-height: 1;
  content: "×";
}

.expanded > .genesis-data,
.expanded > .bio-content { padding-top: 2.5rem; }

/* -------------------------------------------
   TOP LEFT: LINKS
   ------------------------------------------- */
.top-left-links {
  top: 20px; left: 20px;
  z-index: 5; display: flex; width: var(--corner-panel-width); gap: 14px; align-items: center;
  box-sizing: border-box;
  padding: 0.95rem 1.15rem;
}
.site-name {
  padding-right: 14px;
  border-right: 1px solid rgba(255, 255, 255, 0.16);
  color: #fff;
  font-size: 1.04rem;
  font-weight: 700;
  letter-spacing: 0.03em;
  white-space: nowrap;
}
.social-links {
  display: inline-flex;
  align-items: center;
  gap: 14px;
}
.link-text {
  font-weight: 600; text-decoration: none; color: #fff; letter-spacing: 0.01em; font-size: 1.04rem;
  transition: color 160ms ease, transform 160ms ease;
}
.link-text:hover,
.link-text:focus-visible { color: #bfdbfe; transform: translateY(-1px); }

.double-struck-x {
  display: inline-flex;
  align-items: center;
  color: #fff;
  font-size: 1.4rem;
  font-weight: 700;
  line-height: 1;
  text-decoration: none;
  transition: color 160ms ease, transform 160ms ease;
}

.double-struck-x:hover,
.double-struck-x:focus-visible { color: #bfdbfe; transform: translateY(-1px); }

/* -------------------------------------------
   TOP RIGHT: BITCOIN
   ------------------------------------------- */
#bitcoinInfo {
  top: 20px; right: 20px;
  display: flex;
  box-sizing: border-box;
  width: var(--corner-panel-width);
  min-height: 54px;
  padding: 0.95rem 1.15rem;
  color: #eee;
  font-size: 0.9rem; font-weight: 400;
  text-align: right; line-height: 1.2;
  cursor: pointer;
  min-width: 0;
  height: auto;
  transform-origin: top right;
  align-items: center;
  justify-content: flex-end;
}

#bitcoinInfo.expanded {
  width: 400px;
  padding-bottom: 20px;
  background: rgba(20, 15, 10, 0.95);
  border: 1px solid rgba(247, 147, 26, 0.4);
  text-align: left;
  cursor: pointer;
  transform: none !important;
}

#bitcoinInfo:focus-visible,
.quotes:focus-visible {
  outline: 2px solid #60a5fa;
  outline-offset: 4px;
}

.btc-live-data {
  display: inline-flex;
  align-items: baseline;
  gap: 0.62rem;
  transition: opacity 0.2s;
  white-space: nowrap;
}
.btc-price { color: #fff; font-weight: 700; }
.btc-separator { color: rgba(255, 255, 255, 0.38); }
.btc-block { color: #b9c7da; font-family: monospace; font-size: 0.78rem; }
.expanded .btc-live-data { display: none; }

.genesis-data {
  display: none; opacity: 0;
  text-align: left; color: #e2e8f0; font-size: 0.9rem;
}
.expanded .genesis-data {
  display: block;
  animation: fadeIn 0.4s ease forwards 0.1s;
}
.genesis-hash {
  font-family: monospace; font-size: 0.75rem; color: #94a3b8; word-break: break-all; margin: 5px 0;
}
.genesis-quote {
  border-left: 2px solid #f7931a; padding-left: 10px; margin-top: 10px; font-style: italic; color: #fff;
}

/* -------------------------------------------
   BOTTOM LEFT: LOCATION HISTORY
   ------------------------------------------- */
#locationHistory {
  bottom: 20px; left: 20px;
  box-sizing: border-box;
  width: var(--corner-panel-width);
  font-size: 0.9rem; color: #ddd;
  line-height: 1.5;
  cursor: pointer;
  min-width: 0;
  transform-origin: bottom left;
}
#locationHistory .panel-label { margin: 0 5px 0.45rem; }
#locationHistory:active { transform: none; }

.clock-list {
    padding: 5px;
    white-space: nowrap;
}

.life-map {
  display: none;
  padding-top: 1.9rem;
  animation: fadeIn 0.38s ease both;
}

#locationHistory.expanded {
  width: min(860px, calc(100vw - 48px));
  padding: 1.15rem 1.25rem 1.2rem;
  background: rgba(9, 18, 34, 0.96);
  border: 1px solid rgba(124, 225, 195, 0.34);
  box-shadow: 0 30px 86px rgba(0, 0, 0, 0.5), 0 0 48px rgba(96, 165, 250, 0.12);
  cursor: zoom-out;
  transform: none !important;
  z-index: 40;
}

#locationHistory.expanded .location-summary { display: none; }
#locationHistory.expanded .life-map { display: block; }

.life-map-heading {
  margin: 0 0 0.22rem;
  color: #f2f7ff;
  font-size: 1.28rem;
  font-weight: 700;
  letter-spacing: -0.025em;
}

.life-map-copy {
  max-width: 64ch;
  margin: 0 0 0.95rem;
  color: #9fb1c7;
  font-size: 0.79rem;
  line-height: 1.55;
}

.life-map-frame {
  position: relative;
  isolation: isolate;
  overflow: hidden;
  border: 1px solid rgba(145, 199, 224, 0.2);
  border-radius: 16px;
  background:
    radial-gradient(circle at 72% 32%, rgba(55, 137, 180, 0.17), transparent 31%),
    radial-gradient(circle at 19% 67%, rgba(50, 147, 132, 0.1), transparent 34%),
    linear-gradient(145deg, rgba(7, 24, 46, 0.98), rgba(4, 12, 25, 0.98));
  box-shadow: inset 0 0 0 1px rgba(255, 255, 255, 0.018), inset 0 -28px 60px rgba(0, 0, 0, 0.12);
}

.life-map-frame::before {
  position: absolute;
  inset: 0;
  z-index: 0;
  background-image: radial-gradient(rgba(163, 204, 235, 0.18) 0.55px, transparent 0.65px);
  background-size: 12px 12px;
  opacity: 0.24;
  content: "";
  pointer-events: none;
}

.life-map-frame::after {
  position: absolute;
  z-index: 1;
  inset: -45% -24%;
  background: linear-gradient(112deg, transparent 46%, rgba(124, 225, 195, 0.075) 50%, transparent 54%);
  content: "";
  pointer-events: none;
  transform: translateX(-52%);
  animation: mapAmbientSweep 13s ease-in-out infinite;
}

.world-map-base {
  position: absolute;
  z-index: 1;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: fill;
  opacity: 0.24;
  filter: brightness(0) saturate(100%) invert(84%) sepia(16%) saturate(716%) hue-rotate(110deg) brightness(88%) contrast(83%);
  mix-blend-mode: screen;
  pointer-events: none;
  user-select: none;
}

.life-map-svg { position: relative; z-index: 2; display: block; width: 100%; height: auto; }
.route-underlay { fill: none; stroke: rgba(96, 151, 206, 0.22); stroke-linecap: round; stroke-width: 4.2; }
.route-leg { fill: none; stroke: #98cbff; stroke-linecap: round; stroke-width: 1.9; filter: drop-shadow(0 0 5px rgba(126, 210, 247, 0.65)); transition: opacity 430ms ease; }
.life-map .route-leg { opacity: 0; }
.life-map .route-leg.is-active,
.life-map .route-leg.is-complete { opacity: 0.95; }
.life-map .route-leg.is-traveled { opacity: 0.24; }
.life-map-traveler { fill: #fff7cf; opacity: 0; filter: drop-shadow(0 0 7px rgba(255, 226, 141, 0.98)); transition: opacity 180ms ease; }
.map-city { transform-box: fill-box; transform-origin: center; }
#locationHistory.expanded .map-city { animation: mapCityReveal 520ms cubic-bezier(0.2, 0.85, 0.3, 1) var(--city-delay) both; }
.map-dot-halo { fill: rgba(102, 220, 195, 0.12); }
.map-dot { fill: #edf9ff; stroke: #75e1ca; stroke-width: 2.05; filter: drop-shadow(0 0 6px rgba(124, 225, 195, 0.68)); }
.map-city--current .map-dot-halo { fill: rgba(255, 229, 152, 0.16); }
.map-city--current .map-dot { fill: #fff8d8; stroke: #ffe9a5; }
.map-dot-label { fill: #dce9fa; font-family: 'Inter', sans-serif; font-size: 11px; font-weight: 650; letter-spacing: 0.015em; paint-order: stroke; stroke: #071a2e; stroke-linejoin: round; stroke-width: 3.6px; }
.map-dot-label.is-san-francisco { fill: #fff1bd; }
.life-map-caption { margin: 0.78rem 0 0; color: #8194ac; font-size: 0.68rem; line-height: 1.5; }

@keyframes mapCityReveal {
  from { opacity: 0; transform: scale(0.54); }
  to { opacity: 1; transform: scale(1); }
}

@keyframes mapAmbientSweep {
  0%, 26%, 100% { transform: translateX(-52%); opacity: 0; }
  38%, 64% { opacity: 1; }
  76% { transform: translateX(52%); opacity: 0; }
}

/* -------------------------------------------
   BOTTOM RIGHT: QUOTES
   ------------------------------------------- */
.quotes {
  bottom: 20px; right: 20px;
  z-index: 15;
  box-sizing: border-box;
  width: var(--corner-panel-width);
  font-size: 1rem; font-style: italic; color: #eee; text-align: right;
  cursor: pointer;
  transform-origin: bottom right;
  display: flex; flex-direction: column; justify-content: center; align-items: flex-end;
}

.quotes.expanded {
  width: 500px;
  padding-bottom: 25px;
  background: rgba(15, 23, 42, 0.95);
  border: 1px solid rgba(96, 165, 250, 0.4);
  text-align: left; font-style: normal;
  cursor: pointer;
  transform: none !important;
}

.quote-author { display: block; margin-top: 8px; font-size: 0.85em; font-style: normal; color: #aaa; font-weight: 600; }

.bio-content { opacity: 0; display: none; color: #e2e8f0; text-align: left; }
.expanded .bio-content { display: block; animation: fadeIn 0.4s ease forwards 0.1s; }

.bio-name { display: block; font-size: 1.6rem; color: #fff; font-weight: 700; margin-bottom: 2px; }
.bio-headline { font-size: 1rem; font-weight: 600; color: #60a5fa; margin-bottom: 4px; text-transform: uppercase; letter-spacing: 1px; }
.bio-dates { font-size: 0.75rem; color: #94a3b8; margin-bottom: 12px; display: block; font-family: monospace; }
.bio-body { font-size: 0.95rem; line-height: 1.6; color: #cbd5e1; }

.quote-container { transition: opacity 0.2s ease; width: 100%; text-align: right; }
.quote-container .panel-label { margin-bottom: 0.45rem; text-align: right; }
.expanded .quote-container { display: none; }

@keyframes fadeIn { from { opacity: 0; transform: translateY(10px); } to { opacity: 1; transform: translateY(0); } }

/* Compact viewports: one deliberate, scrollable reading path. */
@media (max-width: 900px) {
  html, body {
    width: 100%;
    height: auto;
    min-height: 100%;
    overflow-x: hidden;
    overflow-y: auto;
  }

  body {
    box-sizing: border-box;
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(min(100%, 10rem), 1fr));
    gap: 12px;
    align-content: start;
    min-height: 100dvh;
    padding:
      max(12px, env(safe-area-inset-top))
      max(12px, env(safe-area-inset-right))
      max(18px, env(safe-area-inset-bottom))
      max(12px, env(safe-area-inset-left));
  }

  body.dialog-open,
  body.ledger-open { overflow: hidden; }

  #neuralCanvas { position: fixed; }

  body > .ui-container {
    position: relative;
    inset: auto;
    box-sizing: border-box;
    min-width: 0;
    width: auto;
    transform: none !important;
  }

  body > #buildTelemetry,
  body > #bitcoinInfo,
  body > #locationHistory,
  body > #quotesBox {
    top: auto;
    right: auto;
    bottom: auto;
    left: auto;
  }

  body > .ui-container:hover {
    border-color: rgba(255, 255, 255, 0.1);
    transform: none !important;
  }

  .ledger-window,
  .ledger-snapshot,
  .activity-title,
  .profile-title,
  .inventory-anchor,
  .panel-label {
    font-size: 0.7rem;
    letter-spacing: 0.12em;
  }

  .ledger-number-label,
  .ledger-proof dt,
  .profile-legend,
  .telemetry-github { font-size: 0.7rem; }

  .ledger-proof dd > small { font-size: 0.72rem; }

  .top-left-links {
    order: 1;
    flex-direction: column;
    align-items: flex-start;
    justify-content: center;
    gap: 0.34rem;
    padding: 0.64rem 0.78rem;
    width: auto;
  }

  .site-name {
    padding: 0;
    border: 0;
    font-size: 0.82rem;
  }

  .social-links { gap: 13px; }
  .link-text { font-size: 0.74rem; }
  .double-struck-x { font-size: 0.9rem; }
  .social-links a {
    display: inline-flex;
    min-height: 44px;
    align-items: center;
  }
  #dealsLink, #linkedInLink, #xLink { animation: none; }

  #bitcoinInfo {
    order: 2;
    width: auto;
    min-width: 0;
    padding: 0.64rem 0.72rem;
    font-size: 0.74rem;
    justify-content: stretch;
  }

  .btc-live-data {
    width: 100%;
    min-width: 0;
    justify-content: space-between;
    gap: 0.15rem;
    font-size: clamp(0.55rem, 2.55vw, 0.72rem);
  }

  .btc-block { font-size: 1em; }

  #buildTelemetry {
    grid-column: 1 / -1;
    order: 3;
    width: 100%;
    padding: 0;
    justify-self: stretch;
    border-radius: 16px;
  }

  #buildTelemetry:hover { transform: none; }

  body > #buildTelemetry.expanded {
    position: fixed;
    top: max(12px, env(safe-area-inset-top));
    bottom: max(12px, env(safe-area-inset-bottom));
    left: 50%;
    right: auto;
    width: min(820px, calc(100vw - 24px));
    max-height: none;
    padding: 1.05rem;
    overflow-y: auto;
    transform: translateX(-50%) !important;
    z-index: 100;
  }

  #buildTelemetry.expanded .ledger-expanded { padding-top: 2.6rem; }

  #locationHistory {
    grid-column: 1 / -1;
    order: 5;
    width: auto;
    min-width: 0;
    padding: 0.9rem 1rem;
    font-size: 0.8rem;
  }

  .clock-list {
    display: grid;
    gap: 0.24rem;
    padding: 0;
    white-space: normal;
  }

  .quotes {
    grid-column: 1 / -1;
    order: 4;
    display: block;
    min-width: 0;
    width: auto;
    padding: 0.9rem 1rem;
    text-align: left;
  }

  .quote-container,
  .quote-container .panel-label { text-align: left; }

  body > #quotesBox.expanded,
  body > #bitcoinInfo.expanded,
  body > #locationHistory.expanded {
    position: fixed;
    inset:
      max(12px, env(safe-area-inset-top))
      max(12px, env(safe-area-inset-right))
      max(12px, env(safe-area-inset-bottom))
      max(12px, env(safe-area-inset-left));
    width: auto;
    max-height: none;
    padding: 1.1rem;
    overflow-y: auto;
    z-index: 100;
  }

  body > #bitcoinInfo.expanded { bottom: auto; }

  #locationHistory.expanded .life-map { padding-top: 2.3rem; }
  .life-map-heading { font-size: 1.08rem; }
  .life-map-copy { font-size: 0.73rem; }
  .map-dot-label { font-size: 9px; }

  .quotes.expanded { align-items: stretch; }
  .quotes.expanded .bio-content { min-height: min-content; }
}

@media (max-width: 560px) {
  .ledger-window,
  .ledger-snapshot,
  .activity-title,
  .profile-title,
  .inventory-anchor,
  .panel-label { font-size: 0.7rem; letter-spacing: 0.12em; }
  .ledger-header { align-items: flex-start; }
  .ledger-window { display: grid; grid-template-columns: auto 1fr; gap: 0.15rem 0.48rem; }
  .ledger-window::before { grid-row: 1 / 3; align-self: center; }
  .ledger-window span { grid-column: 2; }
  .ledger-title { margin-top: 0.8rem; font-size: 0.75rem; }

  .ledger-main {
    grid-template-columns: 1fr;
    gap: 0.95rem;
    margin-top: 0.65rem;
  }

  .ledger-hero-line { flex-wrap: wrap; }
  .ledger-number { font-size: clamp(3.7rem, 25vw, 6.2rem); }
  .ledger-number-label { max-width: 120px; font-size: 0.7rem; }
  .ledger-insight { max-width: none; font-size: 0.83rem; line-height: 1.55; }

  .activity-panel {
    padding: 0.9rem 0 0;
    border-top: 1px solid rgba(96, 165, 250, 0.24);
    border-left: 0;
  }

  .ledger-evidence { grid-template-columns: 1fr; gap: 0.5rem; }
  .ledger-proof { min-height: 64px; padding: 0.72rem 0.8rem; }
  .ledger-proof dt { font-size: 0.68rem; }
  .ledger-proof dd > strong { font-size: 1.6rem; }
  .ledger-proof dd > small { margin-top: 0.2rem; font-size: 0.72rem; }

  .ledger-footer {
    grid-template-columns: 1fr;
    gap: 0.7rem;
    align-items: start;
  }

  .inventory-anchor strong { font-size: 1.15rem; }
  .profile-legend { font-size: 0.68rem; gap: 0.35rem 0.7rem; }
  .telemetry-github { justify-content: flex-start; padding: 0; }
  .ledger-projects-grid { grid-template-columns: 1fr; }
  .ledger-project-link { min-height: 0; }
  .ledger-project-name { font-size: clamp(1.05rem, 5vw, 1.25rem); }
}

@media (min-width: 561px) and (max-width: 900px) {
  body { grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); }
  #quotesBox, #locationHistory { grid-column: auto; }
  .ledger-footer { grid-template-columns: minmax(145px, 0.55fr) minmax(260px, 1.45fr) auto; }
}

@media (max-width: 355px) {
  .btc-live-data { gap: 0.5rem; font-size: 0.72rem; }
}

@media (hover: none), (pointer: coarse) {
  .ui-container:hover { transform: none; }
}

@keyframes pulse {
  0% { transform: scale(1); opacity: 0.9; }
  50% { transform: scale(1.05); opacity: 1; }
  100% { transform: scale(1); opacity: 0.9; }
}
#dealsLink,
#linkedInLink,
#xLink { animation: pulse 3s infinite ease-in-out; }
#linkedInLink { animation-delay: 1s; }
#xLink { animation-delay: 2s; }

@keyframes statusPulse {
  0%, 100% { opacity: 0.65; transform: scale(0.85); }
  50% { opacity: 1; transform: scale(1.12); }
}

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