/* YOUR NUMBER — the quietest page on the platform. It holds someone's real
   money, so the design does one thing: make the number legible and the mix
   obvious, then get out of the way. Same voice as the Desk (void ground,
   serif for ideas, mono for figures); the accent is the platform green,
   because this page is the one that belongs to the user. */
* { box-sizing: border-box; }
html { background: #07090e; }
body {
  margin: 0;
  background: transparent;
  color: #eef2f7;
  font-family: 'Jost', system-ui, sans-serif;
  -webkit-font-smoothing: antialiased;
}

/* ── the ambient layer (Visual Doctrine, phase 5) ──────────────────────────
   The quietest sky on the platform: a green dawn far below the fold's
   horizon, scrimmed back toward the void so the number stays the loudest
   thing on the page. position:fixed (iOS ignores background-attachment:
   fixed) — the page scrolls over a still sky. z-index:-1 paints under
   content but over the html ground; body must stay transparent. */
body::before {
  content: '';
  position: fixed;
  inset: 0;
  z-index: -1;
  pointer-events: none;
  background:
    linear-gradient(180deg, rgba(7,9,14,0.5), rgba(7,9,14,0.78) 82%),
    url('/img/ambient/plan.webp') center / cover no-repeat,
    #07090e;
}
@media (prefers-reduced-data: reduce) {
  body::before { background: #07090e; }
}
main { max-width: 640px; margin: 0 auto; padding: 0 18px calc(48px + env(safe-area-inset-bottom)); }
.hidden { display: none !important; }
.quiet { color: #8b96a6; font-size: 13px; line-height: 1.55; }

/* chrome */
#bar {
  position: sticky; top: 0; z-index: 5;
  display: flex; align-items: center; gap: 12px;
  padding: calc(10px + env(safe-area-inset-top)) 16px 10px;
  background: linear-gradient(rgba(7,9,14,0.94), rgba(7,9,14,0.75));
  backdrop-filter: blur(6px);
}
#homeLink {
  color: #aeb8c7; text-decoration: none; font-size: 20px; line-height: 1;
  min-width: 44px; min-height: 44px; display: inline-flex; align-items: center; justify-content: center;
  border: 1px solid rgba(140,160,190,0.25); border-radius: 10px;
}
.bar-title, #privChip {
  font-family: 'Spline Sans Mono', ui-monospace, monospace;
  font-size: 10.5px; letter-spacing: 0.22em;
}
.bar-title { color: #62d6a4; }
.bar-spacer { flex: 1; }
#privChip {
  letter-spacing: 0.1em; color: #8b96a6;
  border: 1px solid rgba(140,160,190,0.28); border-radius: 99px; padding: 5px 10px;
  white-space: nowrap;
}

.sec {
  font-family: 'Spline Sans Mono', ui-monospace, monospace;
  font-size: 10px; font-weight: 600; letter-spacing: 0.26em;
  color: #62d6a4; margin: 30px 0 8px;
}

/* the headline */
#hero { padding-top: 12px; }
#hero .sec { margin-top: 14px; }
#number {
  font-family: 'Fraunces', Georgia, serif;
  font-weight: 600;
  font-size: clamp(40px, 13vw, 66px);
  line-height: 1.02;
  letter-spacing: -0.02em;
  margin: 0 0 8px;
  font-variant-numeric: tabular-nums;
}
#numberSub { margin: 0; font-size: 13.5px; color: #8b96a6; line-height: 1.5; }
#goalLine { margin-top: 14px; }
.gbar { display: block; height: 8px; border-radius: 4px; background: rgba(140,160,190,0.14); overflow: hidden; }
.gbar i { display: block; height: 100%; background: #62d6a4; }
.gtxt {
  display: block; margin-top: 6px; cursor: pointer;
  font-family: 'Spline Sans Mono', ui-monospace, monospace; font-size: 11.5px; color: #aeb8c7;
}
.linky {
  appearance: none; background: none; border: 0; padding: 0;
  color: #62d6a4; font: inherit; font-size: 14px; cursor: pointer;
  border-bottom: 1px solid rgba(98,214,164,0.4);
}

/* the invitation */
#empty { padding: 26px 0 8px; }
#empty h2 {
  font-family: 'Fraunces', Georgia, serif; font-weight: 600;
  font-size: clamp(24px, 6.4vw, 31px); line-height: 1.18; margin: 0 0 12px; text-wrap: balance;
}
#empty p { font-size: 15.5px; line-height: 1.6; color: #ccd5e0; margin: 0 0 12px; }
#empty em { color: #eef2f7; font-style: italic; }

/* the mix */
#mixBar { display: flex; height: 12px; border-radius: 6px; overflow: hidden; gap: 1px; }
#mixBar i { display: block; min-width: 3px; }
#mixCap {
  margin: 8px 0 10px;
  font-family: 'Spline Sans Mono', ui-monospace, monospace;
  font-size: 11.5px; line-height: 1.55; color: #aeb8c7;
}
#mixLesson, #doors a {
  display: inline-block; color: #62d6a4; text-decoration: none; font-size: 14px;
}
#mixLesson { border-bottom: 1px solid rgba(98,214,164,0.35); padding-bottom: 1px; }

/* the ledger */
#holdings { display: flex; flex-direction: column; gap: 5px; }
.hold {
  display: flex; align-items: center; gap: 11px; width: 100%;
  padding: 11px 13px; border-radius: 11px;
  background: rgba(16,20,28,0.66); border: 1px solid rgba(140,160,190,0.16);
  color: #eef2f7; font: inherit; text-align: left; cursor: pointer;
}
.hold:active { background: rgba(22,28,40,0.85); }
.dot { width: 9px; height: 9px; border-radius: 50%; flex: 0 0 9px; }
.hnm { flex: 1; min-width: 0; font-size: 14.5px; font-weight: 500; }
.hnm i {
  display: block; font-style: normal; margin-top: 2px;
  font-family: 'Spline Sans Mono', ui-monospace, monospace; font-size: 10.5px; color: #8b96a6;
  overflow: hidden; text-overflow: ellipsis; white-space: nowrap;
}
.hval {
  font-family: 'Spline Sans Mono', ui-monospace, monospace;
  font-size: 14px; font-variant-numeric: tabular-nums; white-space: nowrap;
}

/* history */
#spark { height: 110px; }
#spark svg { display: block; }
#histCap { margin: 8px 0 0; font-size: 12.5px; line-height: 1.55; color: #8b96a6; }

/* buttons */
button.primary, button.ghost {
  appearance: none; cursor: pointer; border-radius: 11px;
  font-family: 'Spline Sans Mono', ui-monospace, monospace;
  font-size: 11.5px; letter-spacing: 0.16em; padding: 13px 18px;
}
button.primary { background: #62d6a4; color: #06120d; border: 0; font-weight: 600; }
button.ghost { background: none; color: #aeb8c7; border: 1px solid rgba(140,160,190,0.3); }
button.ghost.danger { color: #e0716d; border-color: rgba(224,113,109,0.4); }
#emptyAdd { margin-top: 6px; width: 100%; }
#addBtn { margin-top: 10px; width: 100%; }
.row { display: flex; flex-wrap: wrap; gap: 8px; margin-top: 12px; }
.row button { flex: 1 1 auto; }

/* fineprint + doors */
#fine { margin-top: 40px; border-top: 1px solid rgba(140,160,190,0.15); padding-top: 18px; }
#fine p { font-size: 12.5px; line-height: 1.55; color: #8b96a6; margin: 0 0 16px; }
/* the doors are their own row each, so they get thumb height — 16px of text in
   a column gap is a 16px target, and these are the page's exits. */
#doors { display: flex; flex-direction: column; }
#doors a { display: block; padding: 14px 0; }
.term {
  appearance: none; background: none; border: 0; padding: 0; margin: 0; font: inherit;
  color: inherit; cursor: pointer; position: relative;
  text-decoration: underline dotted rgba(140,160,190,0.6);
  text-underline-offset: 3px;
}
.term::after { content: ''; position: absolute; inset: -13px -6px; } /* 19px of text → a 45px thumb target */

/* sheets */
dialog {
  border: 1px solid rgba(98,214,164,0.28); border-radius: 16px;
  background: #0b0e15; color: #eef2f7;
  padding: 22px 20px 18px;
  width: min(460px, calc(100vw - 32px));
  font-family: 'Jost', system-ui, sans-serif;
}
dialog::backdrop { background: rgba(4,5,8,0.74); backdrop-filter: blur(3px); }
dialog h3 {
  margin: 0 0 14px;
  font-family: 'Spline Sans Mono', ui-monospace, monospace;
  font-size: 11px; letter-spacing: 0.24em; color: #62d6a4;
}
dialog p { font-size: 14px; line-height: 1.55; color: #ccd5e0; margin: 0 0 14px; }
dialog label {
  display: block; margin: 12px 0 5px;
  font-size: 12.5px; color: #8b96a6;
}
dialog input, dialog select {
  width: 100%; height: 46px; padding: 0 12px;
  background: rgba(8,12,20,0.85); color: #eef2f7;
  border: 1px solid rgba(140,160,190,0.26); border-radius: 11px;
  font-family: 'Spline Sans Mono', ui-monospace, monospace; font-size: 15px;
}
#sheetTabs { display: flex; gap: 6px; }
.tab {
  flex: 1; appearance: none; cursor: pointer; padding: 10px 8px; border-radius: 10px;
  background: rgba(13,20,32,0.6); color: #8b96a6; border: 1px solid rgba(140,160,190,0.22);
  font-family: 'Spline Sans Mono', ui-monospace, monospace; font-size: 10.5px; letter-spacing: 0.1em;
}
.tab.on { color: #62d6a4; background: rgba(98,214,164,0.12); border-color: rgba(98,214,164,0.45); }
.est {
  margin: 12px 0 0 !important;
  font-family: 'Spline Sans Mono', ui-monospace, monospace;
  font-size: 12px; color: #e6bd5c; min-height: 17px;
}
.err { margin: 10px 0 0 !important; font-size: 12.5px; color: #e0716d; min-height: 16px; }

@media (max-width: 400px) {
  #privChip { font-size: 9px; letter-spacing: 0.06em; padding: 4px 8px; }
  .bar-title { font-size: 9.5px; letter-spacing: 0.16em; }
}
