/* Landing only (/ and /try). Tokens + components come from /shared/base.css. */

/* ---------- header CA (desktop) ---------- */
.ca-mini { display: none; align-items: center; gap: 8px; margin-left: 18px; padding: 0 6px 0 12px; height: 34px; border-radius: 999px; background: var(--card); border: 1px solid var(--line); }
.ca-mini-label { font-size: 11px; font-weight: 750; letter-spacing: .08em; color: var(--ink-3); }
.ca-mini .addr { font-size: 12.5px; }
.ca-mini .copy { margin: 0; padding: 6px; }
@media (min-width: 1080px) { .ca-mini { display: inline-flex; } }

/* ---------- bento ---------- */
.bento {
  display: grid; gap: 16px; padding: 18px 0 8px;
  grid-template-columns: repeat(12, minmax(0, 1fr));
  grid-template-areas:
    "dead dead dead dead dead dead dead dead dead dead dead dead"
    "hero hero hero hero hero hero hero try try try try try"
    "bal bal bal rent rent rent rent try try try try try"
    "port port port port port port port try try try try try";
  grid-template-rows: auto auto auto 1fr;
}
.tile { background: var(--card); border: 1px solid var(--line); border-radius: var(--r-lg); box-shadow: var(--shadow); padding: clamp(18px, 2vw, 26px); min-width: 0; position: relative; }
.t-dead { grid-area: dead; }
.t-hero { grid-area: hero; }
.t-try { grid-area: try; }
.t-bal { grid-area: bal; }
.t-rent { grid-area: rent; }
.t-port { grid-area: port; }

@media (max-width: 1079px) {
  .bento {
    grid-template-areas:
      "dead dead dead dead dead dead dead dead dead dead dead dead"
      "hero hero hero hero hero hero hero hero hero hero hero hero"
      "bal bal bal bal bal rent rent rent rent rent rent rent"
      "port port port port port port port port port port port port"
      "try try try try try try try try try try try try";
    grid-template-rows: none;
  }
}
@media (max-width: 719px) {
  .bento { gap: 12px; padding-top: 10px;
    grid-template-columns: minmax(0, 1fr);
    grid-template-areas: "dead" "hero" "bal" "rent" "port" "try"; }
}

/* entrance: quiet, once */
@media (prefers-reduced-motion: no-preference) {
  .bento > .tile { animation: rise .55s cubic-bezier(.2, .7, .2, 1) both; }
  .bento > .t-hero { animation-delay: .02s; }
  .bento > .t-bal { animation-delay: .08s; }
  .bento > .t-rent { animation-delay: .13s; }
  .bento > .t-port { animation-delay: .18s; }
  .bento > .t-try { animation-delay: .1s; }
}
@keyframes rise { from { opacity: 0; transform: translateY(10px); } to { opacity: 1; transform: none; } }

/* ---------- hero ---------- */
.t-hero { background: transparent; border-color: transparent; box-shadow: none; padding: clamp(6px, 1vw, 14px) clamp(4px, 1vw, 12px) 12px 0; display: flex; flex-direction: column; }
.status-pill { align-self: flex-start; background: var(--card); border: 1px solid var(--line); }
.tagline { margin: 18px 0 14px; font-size: clamp(36px, 3.45vw, 52px); line-height: 1.02; font-weight: 540; letter-spacing: -.022em; font-variation-settings: 'SOFT' 100, 'WONK' 1; }
.tagline .ln { display: block; position: relative; padding-left: .82em; }
.sg { font-family: var(--f-mono); font-weight: 500; }
.tagline .sg { position: absolute; left: 0; top: .2em; font-size: .46em; line-height: 1; width: 1.36em; height: 1.36em; border-radius: 50%; display: inline-grid; place-items: center; letter-spacing: 0; }
.sg-in { color: var(--income-ink); background: var(--income-tint); }
.sg-rent { color: var(--rent-ink); background: var(--rent-tint); }
.sg-buy { color: var(--ink); background: var(--paper-2); }
.tagline .ln:nth-child(2) { color: var(--ink); }
.t-hero .lede { margin-bottom: 18px; }
@media (min-width: 1080px) and (max-width: 1279px) { .tagline { font-size: 3.7vw; } }

.ca-strip { display: flex; flex-wrap: wrap; align-items: center; gap: 8px 14px; margin-bottom: 14px; }
.ca-box { display: inline-flex; align-items: center; gap: 10px; min-height: 46px; padding: 0 10px 0 14px; border-radius: var(--r-md); background: var(--card); border: 1px solid var(--line-2); max-width: 100%; box-shadow: var(--shadow-sm); }
.ca-label { font-size: 11px; font-weight: 750; letter-spacing: .1em; color: var(--paper); background: var(--ink); border-radius: 5px; padding: 3px 6px; }
.ca-full { font-size: 13.5px; color: var(--ink); min-width: 0; overflow-wrap: anywhere; }
html[data-launched="no"] .ca-full { color: var(--ink-3); }
.ca-box .copy { margin: 0; }
.ca-note { font-size: 14px; font-weight: 600; color: var(--rent-ink); }

.hero-actions { display: flex; flex-wrap: wrap; gap: 8px; }
.hero-fine { margin: 2px 0 0; color: var(--ink-3); max-width: 62ch; }
@media (min-width: 1080px) {
  .hero-actions { display: none; }   /* Ledger/Docs live in the top bar; Buy sits next to the CA */
  .t-hero .lede { font-size: 17px; max-width: 58ch; }
}
@media (max-width: 1079px) { .hero-fine { margin-top: 14px; } }

/* ---------- stat tiles ---------- */
.live-tile { display: flex; flex-direction: column; }
.live-tile .card-head { margin-bottom: 6px; }
.tiny-link { font-size: 12.5px; font-weight: 600; color: var(--ink-3); text-decoration: none; }
.tiny-link:hover { color: var(--ink); text-decoration: underline; }
.big { margin: 0; font-family: var(--f-display); font-weight: 520; font-size: clamp(44px, 4.4vw, 60px); line-height: 1; letter-spacing: -.03em; font-variant-numeric: lining-nums tabular-nums; font-variation-settings: 'SOFT' 50, 'WONK' 0; display: flex; align-items: baseline; gap: 8px; white-space: nowrap; }
.big .unit { font-family: var(--f-ui); font-size: 15px; font-weight: 650; letter-spacing: .02em; color: var(--ink-3); }
.big .cur { font-size: .6em; color: var(--ink-3); margin-right: -4px; align-self: flex-start; margin-top: .14em; }
.sub { margin: 10px 0 0; font-size: 14.5px; font-weight: 550; }
.foot { margin: auto 0 0; padding-top: 12px; }
.split-bar { display: flex; height: 10px; border-radius: 999px; overflow: hidden; background: var(--paper-2); margin: 18px 0 8px; gap: 2px; }
.split-bar span { display: block; height: 100%; width: 0; transition: width .6s cubic-bezier(.2, .7, .2, 1); }
.split-bar .sb-res { background: repeating-linear-gradient(135deg, #E9A994 0 4px, var(--rent-tint) 4px 8px); }
.split-bar .sb-sur { background: var(--income); }
.split-bar.is-short .sb-res { background: var(--rent); }
.split-txt { margin: 0; color: var(--ink-2); }
.split-txt b { font-weight: 650; color: var(--ink); }
.live-val { transition: opacity .3s; }
.is-stale .live-val, .is-stale .week, .is-stale .shelf, .is-stale .sub, .is-stale .split-bar, .is-stale .split-txt { opacity: .45; }

/* rent week: 7 boxes */
.week { list-style: none; margin: 16px 0 0; padding: 0; display: grid; grid-template-columns: repeat(7, minmax(0, 1fr)); gap: 6px; }
.week li { display: flex; flex-direction: column; align-items: center; gap: 5px; min-width: 0; }
.week .d { font-size: 11px; font-weight: 700; letter-spacing: .05em; text-transform: uppercase; color: var(--ink-3); }
.week .d b { display: block; font-family: var(--f-display); font-size: 15px; font-weight: 560; letter-spacing: 0; color: var(--ink); text-transform: none; text-align: center; }
.week .box { width: 100%; aspect-ratio: 1 / 1.08; max-height: 44px; border-radius: 9px; border: 1.5px solid var(--line-2); display: grid; place-items: center; color: var(--card); position: relative; }
.week .box svg { width: 56%; height: 56%; }
.week a.box { text-decoration: none; }
.week .paid { background: var(--income); border-color: var(--income); }
.week .paid:hover { background: var(--income-ink); }
.week .covered { background: repeating-linear-gradient(135deg, var(--income-tint) 0 5px, #F1F5EB 5px 10px); border-color: #B9CDAF; }
.week .short { border: 1.5px dashed var(--rent); background: var(--rent-tint); color: var(--rent-ink); }
.week .owed { background: var(--rent); border-color: var(--rent); }
.week .none { border-style: dotted; background: transparent; }
.week .today .d { color: var(--ink); }
.week .today .box { box-shadow: 0 0 0 2px var(--card), 0 0 0 3.5px var(--ink); }
.week-legend { display: flex; flex-wrap: wrap; gap: 4px 12px; margin: 10px 0 0; padding: 0; list-style: none; font-size: 12px; color: var(--ink-3); }
.week-legend i { display: inline-block; width: 10px; height: 10px; border-radius: 3px; margin-right: 5px; vertical-align: -1px; border: 1.5px solid var(--line-2); }
.week-legend .paid { background: var(--income); border-color: var(--income); }
.week-legend .covered { background: var(--income-tint); border-color: #B9CDAF; }
.week-legend .short { background: var(--rent-tint); border: 1.5px dashed var(--rent); }
@media (prefers-reduced-motion: no-preference) {
  .week.is-in .box { animation: pop .38s cubic-bezier(.3, 1.4, .5, 1) both; animation-delay: calc(var(--i) * 45ms + .2s); }
}
@keyframes pop { from { transform: scale(.6); } to { transform: none; } }

/* portfolio shelf */
.port-grid { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1.25fr); gap: 18px; align-items: end; }
.shelf { display: flex; align-items: flex-end; gap: 10px; padding: 0 6px; height: 112px; position: relative; }
.shelf::after { content: ''; position: absolute; left: 0; right: 0; bottom: -7px; height: 7px; border-radius: 3px; background: linear-gradient(#C9B999, #B5A27E); box-shadow: 0 6px 10px -6px rgba(60, 44, 20, .5); }
.chip { flex: 1 1 0; min-width: 0; border-radius: 12px 12px 6px 6px; padding: 8px 9px; display: flex; flex-direction: column; justify-content: flex-end; gap: 2px; text-decoration: none; position: relative; transition: transform .2s; }
.chip:hover { transform: translateY(-2px); text-decoration: none; }
.chip .s { font-family: var(--f-mono); font-weight: 500; font-size: 12.5px; }
.chip .v { font-size: 12px; font-weight: 650; }
.chip.own { background: var(--ink); color: var(--paper); }
.chip.own .v { color: #CFC6B4; }
.chip.own.c1 { background: #2E3A2C; }
.chip.own.c2 { background: #5A3A2E; }
.chip.none { border: 1.5px dashed var(--line-2); color: var(--ink-3); height: 46px; background: transparent; }
.chip.none .v { font-weight: 550; font-size: 11px; }
.port-empty { font-size: 13.5px; color: var(--ink-2); margin: 10px 0 0; }

@media (max-width: 719px) {
  .tile { padding: 18px 16px; }
  .t-hero { padding: 4px 0 6px; }
  .hero-actions .btn-ghost { display: none; }
  .ca-full { font-size: 12.5px; }
  .big { font-size: 46px; }
  .port-grid { grid-template-columns: 1fr; gap: 14px; }
  .shelf { height: 92px; }
}

/* ---------- try card ---------- */
.t-try { display: flex; flex-direction: column; background: var(--card); }
.pill-sm { min-height: 26px; font-size: 12px; padding: 0 10px; }
.try-title { font-size: clamp(24px, 2.2vw, 30px); margin: 2px 0 6px; font-weight: 560; }
.try-sub { margin: 0 0 16px; font-size: 14px; color: var(--ink-2); }
.seg { display: grid; grid-template-columns: repeat(3, 1fr); gap: 4px; padding: 4px; border-radius: 14px; background: var(--paper-2); margin-bottom: 12px; }
.seg label { position: relative; cursor: pointer; }
.seg input { position: absolute; opacity: 0; inset: 0; cursor: pointer; }
.seg span { display: grid; place-items: center; height: 40px; border-radius: 10px; font-family: var(--f-mono); font-weight: 500; font-size: 14px; color: var(--ink-2); transition: background .15s, color .15s; }
.seg input:checked + span { background: var(--card); color: var(--ink); box-shadow: var(--shadow-sm); }
.seg input:focus-visible + span { outline: 2px solid var(--ink); outline-offset: 1px; }
.try-actions { display: grid; grid-template-columns: 1fr; gap: 8px; margin-bottom: 14px; }
.try-actions .btn { width: 100%; }
@media (min-width: 720px) and (max-width: 1079px) { .try-actions { grid-template-columns: 1fr 1fr; } }
.try-msg { margin-bottom: 12px; display: block; }

.answer { margin: 0; padding: 4px 0; border-top: 1.5px solid var(--ink); }
.answer .row { display: flex; align-items: baseline; gap: 8px; padding: 9px 0; border-bottom: 1px dotted var(--line-2); font-size: 14.5px; }
.answer dt { color: var(--ink-2); flex: none; max-width: 58%; }
.answer dt small { display: block; font-size: 11.5px; color: var(--ink-3); }
.answer dd { margin: 0 0 0 auto; text-align: right; font-variant-numeric: tabular-nums; min-width: 0; overflow-wrap: anywhere; }
.answer dd strong { font-family: var(--f-display); font-size: 22px; font-weight: 580; }
.is-loading .answer dd { color: transparent; background: linear-gradient(90deg, var(--paper-2), #F5EFE3, var(--paper-2)); background-size: 200% 100%; border-radius: 6px; animation: skel 1.2s linear infinite; min-width: 5ch; }
.is-loading .answer dd * { visibility: hidden; }

.note { margin: 16px 0 14px; padding: 2px 0 2px 16px; border-left: 3px solid var(--income); }
.note blockquote { margin: 0; font-family: var(--f-display); font-style: italic; font-size: 17.5px; line-height: 1.45; font-weight: 420; color: var(--ink); font-variation-settings: 'SOFT' 100; }
.t-try:not(.has-answer) .note blockquote { color: var(--ink-3); font-size: 16px; }
.note figcaption { margin-top: 6px; font-size: 12px; color: var(--ink-3); }
.note figcaption:empty { display: none; }

.raw { margin-bottom: 12px; border-radius: var(--r-md); background: var(--paper-2); }
.raw summary { list-style: none; cursor: pointer; display: flex; align-items: center; justify-content: space-between; padding: 10px 14px; font-size: 13.5px; font-weight: 650; }
.raw summary::-webkit-details-marker { display: none; }
.raw summary > span:first-child::before { content: '+'; display: inline-block; width: 1.1em; font-family: var(--f-mono); color: var(--ink-3); }
.raw[open] summary > span:first-child::before { content: '−'; }
.raw pre { padding-top: 0; max-height: 300px; font-size: 12.5px; background: transparent; }
.curl { margin-top: auto; display: flex; align-items: center; gap: 10px; padding: 11px 12px 11px 14px; border-radius: var(--r-md); background: var(--ink); color: var(--paper); }
.curl code { background: none; padding: 0; color: inherit; font-size: 12.5px; overflow-x: auto; white-space: nowrap; flex: 1; scrollbar-width: none; }
.curl code::before { content: '$ '; color: #9C927F; }
.curl .copy { color: #D8CFBD; margin: -4px; }
.curl .copy:hover { background: #3A352D; color: #fff; }

.hist { margin-top: 18px; }
.hist-list { list-style: none; margin: 8px 0 0; padding: 0; font-size: 14px; }
.hist-list li { display: grid; grid-template-columns: 4.2em 4.5em 1fr auto; gap: 8px; padding: 7px 0; border-bottom: 1px dotted var(--line-2); align-items: baseline; }
.hist-list .sym { font-family: var(--f-mono); font-size: 13px; }

/* ---------- dead tile ---------- */
.t-dead { display: flex; gap: 20px; align-items: flex-start; background: var(--rent-tint); border-color: #EBC2B4; }
.dead-mark { flex: none; width: 56px; height: 56px; border-radius: 16px; background: var(--rent); color: #fff; display: grid; place-items: center; }
.dead-mark svg { width: 34px; height: 34px; }
.t-dead h2 { font-size: clamp(28px, 3vw, 40px); color: #5E2416; }
.t-dead p { margin: 8px 0 0; color: #5E2416; max-width: 70ch; }
.refill { display: inline-flex; flex-wrap: wrap; align-items: center; gap: 8px 10px; margin-top: 14px; padding: 10px 12px 10px 14px; border-radius: var(--r-md); background: var(--card); border: 1px solid #EBC2B4; max-width: 100%; }
.refill-label { font-size: 11.5px; font-weight: 750; letter-spacing: .08em; text-transform: uppercase; color: var(--rent-ink); }
.refill .addr { font-size: 13.5px; color: var(--ink); }
.refill .copy { margin: 0; }
.dead-fine { opacity: .85; }
html.is-dead .week .box.covered { background: transparent; }
@media (max-width: 719px) { .t-dead { flex-direction: column; gap: 12px; } .refill { display: grid; grid-template-columns: minmax(0, 1fr) auto; } .refill-label { grid-column: 1 / -1; } .refill .addr { font-size: 11.5px; } .dead-mark { width: 44px; height: 44px; border-radius: 12px; } .dead-mark svg { width: 26px; height: 26px; } }

/* ---------- sections below the fold ---------- */
.sect { margin-top: clamp(56px, 7vw, 96px); }
.sect-head { margin-bottom: 22px; }
.sect-head h2 { margin-top: 6px; }
.rules { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 16px; }
.rule { padding-top: 22px; }
.rule h3 { margin: 6px 0 10px; font-size: 22px; }
.rule p { margin: 0 0 10px; color: var(--ink-2); font-size: 15px; }
.rule p:last-child { margin-bottom: 0; }
.rule-sign { position: absolute; top: 18px; right: 18px; width: 34px; height: 34px; border-radius: 50%; display: grid; place-items: center; font-size: 17px; }
@media (max-width: 899px) { .rules { grid-template-columns: 1fr; } }

.split { display: grid; grid-template-columns: minmax(0, 1.15fr) minmax(0, 1fr); gap: 16px; align-items: start; }
@media (max-width: 899px) { .split { grid-template-columns: 1fr; } }
.h-card { font-size: 22px; margin-top: 4px; }
.card-head > div { min-width: 0; }

/* household account book */
.book { list-style: none; margin: 6px 0 0; padding: 0; border-top: 1.5px solid var(--ink); }
.book li { display: grid; grid-template-columns: 4.6em minmax(0, 1fr) auto; gap: 4px 14px; align-items: center; padding: 11px 0; border-bottom: 1px solid var(--line); }
.book li:last-child { border-bottom: 0; }
.book .when { font-size: 12.5px; color: var(--ink-3); line-height: 1.25; font-variant-numeric: tabular-nums; }
.book .when b { display: block; color: var(--ink-2); font-weight: 650; }
.book .what { min-width: 0; font-size: 14.5px; }
.book .what .tag { margin-right: 8px; }
.book .what .n { color: var(--ink-2); }
.book .what a { font-family: var(--f-mono); font-size: 12.5px; color: var(--ink-3); text-decoration: none; white-space: nowrap; }
.book .what a:hover { color: var(--ink); text-decoration: underline; }
.book .amt { font-family: var(--f-mono); font-size: 14px; text-align: right; white-space: nowrap; }
.book-empty { display: block !important; padding: 14px 0; }
@media (max-width: 480px) { .book li { grid-template-columns: 3.6em minmax(0, 1fr) auto; gap: 4px 10px; } .book .what .n { display: block; font-size: 13px; } }

.holdings table { margin-top: 6px; }
.holdings-fine { margin: 14px 0 0; }
.hold-empty { padding: 16px; border-radius: var(--r-md); border: 1.5px dashed var(--line-2); color: var(--ink-2); font-size: 14.5px; }
.hold-empty strong { font-family: var(--f-display); font-size: 22px; font-weight: 560; display: block; color: var(--ink); margin-bottom: 4px; }

/* agents */
.agents { display: grid; grid-template-columns: minmax(0, .9fr) minmax(0, 1.1fr); gap: clamp(24px, 4vw, 56px); align-items: start; }
.agents h2 { margin: 6px 0 14px; }
.agents-actions { display: flex; flex-wrap: wrap; gap: 8px; margin-top: 20px; }
.steps { list-style: none; margin: 0; padding: 0; display: grid; gap: 12px; }
.steps li { display: grid; grid-template-columns: 36px minmax(0, 1fr); gap: 14px; align-items: start; background: var(--card); border: 1px solid var(--line); border-radius: var(--r-lg); padding: 16px 18px; box-shadow: var(--shadow); }
.step-n { width: 32px; height: 32px; border-radius: 50%; background: var(--ink); color: var(--paper); display: grid; place-items: center; font-family: var(--f-display); font-weight: 600; font-size: 16px; }
.step-t { margin: 3px 0 8px; font-weight: 700; }
.steps pre { font-size: 12.5px; padding: 10px 12px; white-space: pre; }
.steps .small { margin: 6px 0 0; }
@media (max-width: 899px) { .agents { grid-template-columns: 1fr; } }

/* ---------- /try page ---------- */
.try-page { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1.1fr); gap: clamp(20px, 3vw, 40px); padding-top: 26px; align-items: start; }
.try-page .t-try { min-height: 0; grid-area: auto; }
.try-explain h1 { font-size: clamp(36px, 4.4vw, 56px); margin: 10px 0 16px; }
.try-explain .compare { margin-top: 26px; display: grid; grid-template-columns: 1fr 1fr; gap: 12px; }
.try-explain .compare .card { padding: 18px; }
.try-explain .compare h3 { font-size: 19px; margin: 4px 0 8px; }
.try-explain .compare ul { margin: 0; padding-left: 18px; color: var(--ink-2); font-size: 14.5px; }
.try-explain .compare li + li { margin-top: 4px; }
@media (max-width: 899px) { .try-page { grid-template-columns: 1fr; } }
@media (max-width: 480px) { .try-explain .compare { grid-template-columns: 1fr; } }
