/* Cashpumpkin app. Colors and corners follow the brand guide
   (brand/cashpumpkin-brand-kit): near-black surfaces, cream text, mint
   reserved for money you'd make, coral for losses, amber for "check", the
   price-tag shape, and pumpkin orange only for the free-trial button. The app
   uses the device's own font so it loads instantly. Logo colors live in the
   logo files, never in UI. */
:root {
  --mint: #18EDA4;
  --mint-hover: #3FF3B6;
  --mint-deep: #02A573;
  --mint-wash: rgba(24, 237, 164, .08);
  --mint-line: rgba(24, 237, 164, .35);
  --on-mint: #050605;
  --ink: #050605;
  --bg: #0A0C0B;
  --panel: #111413;
  --raise: #171B19;
  --line: #232826;
  --line-hi: #2F3633;
  --cream: #FEFAF3;
  --muted: #97A19C;
  --loss: #FF8A7A;
  --caution: #F6C35B;
  --caution-wash: rgba(246, 195, 91, .08);
  --focus: #18EDA4;
  --field-line: #646D68; /* form field edges: 3.4:1 on panels, so fields are easy to find */
  --placeholder: #808A85; /* 5.2:1 on fields */
  --orange: #FF8A2B; /* pumpkin orange: the free-trial call to action only */
  --on-orange: #1A0A00;
  color-scheme: dark;
}

* { box-sizing: border-box; }
body {
  margin: 0; background: var(--bg); color: var(--cream);
  font: 14px/1.45 system-ui, -apple-system, "Segoe UI", Roboto, sans-serif;
  font-variant-numeric: tabular-nums; -webkit-font-smoothing: antialiased;
}
a { color: var(--mint); }
::selection { background: rgba(24, 237, 164, .3); }

/* ---- header ---- */
.top {
  position: sticky; top: 0; z-index: 3; display: flex; flex-wrap: wrap; align-items: center; gap: 10px 16px;
  padding: 12px 20px; background: linear-gradient(var(--bg) 85%, rgba(10, 12, 11, .92)); border-bottom: 1px solid var(--line);
}
.brand { display: flex; align-items: center; gap: 10px; }
/* the logo is the supplied lockup image: never retype or recolor it */
.logo { display: inline-flex; flex: none; border-radius: 6px; }
.logo img { display: block; height: 28px; width: auto; }
.brand .tagline { font-size: 12.5px; font-weight: 600; color: var(--muted); letter-spacing: 0; }
#search { flex: 1; max-width: 460px; min-width: 160px; margin-left: auto; }
#newTop { order: 0; }
nav { display: flex; gap: 3px; padding: 3px; background: var(--panel); border: 1px solid var(--line); border-radius: 10px; }
nav button { border: 0; background: none; padding: 6px 12px; border-radius: 7px; font-weight: 650; font-size: 13px; color: var(--muted); }
nav button:hover { color: var(--cream); background: none; }
nav button.on { background: var(--raise); color: var(--cream); box-shadow: inset 0 0 0 1px var(--line); }

/* ---- controls ---- */
label { display: flex; flex-direction: column; gap: 4px; font-weight: 600; font-size: 13.5px; color: var(--cream); }
label.wide { margin-bottom: 8px; }
.grid { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; margin-bottom: 8px; }
.in { display: inline-flex; align-items: center; gap: 4px; color: var(--muted); font-weight: 500; white-space: nowrap; }
.in input { flex: 1; min-width: 0; }
input, select, textarea {
  font: inherit; font-size: 14px; color: var(--cream); width: 100%;
  padding: 7px 9px; background: var(--panel); border: 1px solid var(--field-line); border-radius: 8px;
}
input::placeholder, textarea::placeholder { color: var(--placeholder); }
textarea { resize: vertical; min-height: 44px; }
input:focus-visible, select:focus-visible, textarea:focus-visible { outline: 2px solid var(--mint); outline-offset: 0; border-color: transparent; }
input[type=checkbox] { accent-color: var(--mint); width: auto; }
button {
  font: inherit; font-weight: 700; font-size: 13px; cursor: pointer; padding: 7px 14px; border-radius: 8px;
  background: var(--raise); color: var(--cream); border: 1px solid var(--line);
}
button:hover { border-color: var(--muted); }
button:focus-visible { outline: 2px solid var(--mint); outline-offset: 2px; }
button.primary, .cta { background: var(--mint); color: var(--ink); border-color: var(--mint); }
button.primary:hover, .cta:hover { background: var(--mint-hover); border-color: var(--mint-hover); }
.cta { font-size: 15px; font-weight: 850; letter-spacing: -0.01em; padding: 0 22px; min-height: 48px; border-radius: 12px;
  box-shadow: 0 0 0 1px rgba(24, 237, 164, .25), 0 6px 24px rgba(24, 237, 164, .22); white-space: nowrap; }
.cta.small { font-size: 13px; min-height: 34px; padding: 0 14px; border-radius: 9px; box-shadow: 0 0 0 1px rgba(24, 237, 164, .2), 0 4px 14px rgba(24, 237, 164, .16); }
.cta:focus-visible { outline: 2px solid var(--cream); outline-offset: 2px; }
.newcard { padding: 16px; border-radius: 16px; background: linear-gradient(120deg, rgba(24, 237, 164, .07), var(--panel) 55%);
  border: 1px solid rgba(24, 237, 164, .28); }
.newcard h2 { margin: 0; font-size: 18px; font-weight: 850; letter-spacing: -0.02em; }
.newcard-text { margin-bottom: 10px; }
.newcard-text .hint { margin-top: 2px; }
button.link { all: unset; cursor: pointer; color: var(--cream); text-decoration: underline; text-decoration-color: var(--line-hi); text-underline-offset: 3px; }
button.link:hover { text-decoration-color: var(--mint); }
button.link:focus-visible { outline: 2px solid var(--mint); }
.hint { margin: 4px 0 10px; color: var(--muted); font-size: 13px; font-weight: 400; line-height: 1.45; }
.muted { color: var(--muted); font-weight: 400; }
.good { color: var(--mint); } .ok { color: var(--caution); } .bad { color: var(--loss); }
[hidden] { display: none !important; }

/* ---- cards, analysis ---- */
.cols { display: grid; grid-template-columns: minmax(280px, 360px) 1fr; gap: 16px; align-items: start; }
@media (max-width: 820px) { .cols { grid-template-columns: minmax(0, 1fr); } .cols > * { min-width: 0; } }
.card { background: var(--panel); border: 1px solid var(--line); border-radius: 14px; padding: 16px; margin-bottom: 14px; }
.card.narrow { max-width: 560px; }
h2 { margin: 0 0 10px; font-size: 15px; font-weight: 750; letter-spacing: -0.01em; } h2:not(:first-child) { margin-top: 18px; }
h3 { margin: 0 0 8px; font-size: 11.5px; font-weight: 750; text-transform: uppercase; letter-spacing: .06em; color: var(--muted); }
.xl { font-size: 30px; font-weight: 850; letter-spacing: -0.03em; }
.head .addr { font-weight: 800; font-size: 19px; letter-spacing: -0.015em; }
.big { display: grid; grid-template-columns: repeat(3, 1fr); gap: 8px; margin-top: 12px; }
.big div { padding: 10px 12px; border-radius: 12px; background: var(--raise); border: 1px solid var(--line); }
.big b { display: block; font-size: 24px; font-weight: 850; letter-spacing: -0.03em; line-height: 1.1; color: var(--cream); }
.big span { color: var(--muted); font-size: 11.5px; font-weight: 600; }
.big .good { background: var(--mint); border-color: var(--mint); }
.big .good b, .big .good span { color: var(--ink); }
.big .ok b { color: var(--caution); }
.big .bad { background: rgba(255, 138, 122, .07); border-color: rgba(255, 138, 122, .35); }
.big .bad b { color: var(--loss); }
.verdict { margin: 10px 0 0; font-weight: 650; }
.empty p { color: var(--muted); max-width: 520px; }
table { width: 100%; border-collapse: collapse; }
td, th { padding: 4px 6px; text-align: right; }
td:first-child, th:first-child { text-align: left; padding-left: 0; }
th { color: var(--muted); font-weight: 650; font-size: 11.5px; border-bottom: 1px solid var(--line); }
.costs tr.rentrow td { font-weight: 700; }
.costs tr.total td { border-top: 1px solid var(--line); font-weight: 800; padding-top: 6px; }
.cmp tr.cur td { font-weight: 750; background: var(--raise); }
.note { background: var(--caution-wash); color: var(--caution); border: 1px solid rgba(246, 195, 91, .3); border-radius: 10px; padding: 8px 10px; font-size: 12.5px; margin: 10px 0 0; }
.compform { display: grid; grid-template-columns: 2fr 1.3fr 1fr auto; gap: 8px; margin-top: 10px; }
@media (max-width: 560px) { .compform { grid-template-columns: 1fr 1fr; } .big { grid-template-columns: 1fr; } }
.comps { margin-bottom: 6px; }
.hint.tax { margin-top: 10px; padding-top: 8px; border-top: 1px solid var(--line); }
.sub { margin: 4px 0 6px; font-weight: 650; font-size: 12.5px; }
.units { display: grid; grid-template-columns: repeat(4, 1fr); gap: 8px; }
.units label { font-weight: 500; color: var(--muted); }
label.check { flex-direction: row; align-items: center; gap: 8px; margin-top: 10px; }

/* ---- your numbers ---- */
#view-numbers, #view-buybox { padding: 20px; }
#view-numbers fieldset, #view-buybox fieldset { border: 0; border-top: 1px solid var(--line); margin: 0; padding: 12px 0 10px; }
#view-numbers legend, #view-buybox legend { font-size: 11.5px; font-weight: 750; color: var(--muted); text-transform: uppercase; letter-spacing: .06em; padding: 0 8px 0 0; }
#view-numbers label, #view-buybox label { flex-direction: row; align-items: center; justify-content: space-between; margin: 6px 0; font-weight: 500; }
#view-numbers input[type=number], #view-buybox input[type=number] { width: 90px; text-align: right; }
#view-numbers select { width: auto; max-width: 220px; }
#view-numbers .hint.warn { color: var(--caution); }

/* ---- workspace ---- */
.ws { display: grid; grid-template-columns: 236px 1fr; min-height: calc(100vh - 110px); }
.side { border-right: 1px solid var(--line); padding: 14px 10px; overflow: auto; }
.side h4 { margin: 16px 8px 4px; font-size: 10.5px; font-weight: 800; text-transform: uppercase; letter-spacing: .08em; color: var(--muted); }
.side button { all: unset; box-sizing: border-box; display: flex; justify-content: space-between; align-items: center; gap: 8px; width: 100%;
  padding: 6px 9px; border-radius: 8px; cursor: pointer; font-size: 13px; font-weight: 550; color: var(--cream); }
.side button:hover { background: var(--panel); }
.side button.on { background: var(--raise); box-shadow: inset 0 0 0 1px var(--line); font-weight: 750; }
.side button:focus-visible { outline: 2px solid var(--mint); }
.side button .n { background: var(--raise); border-radius: 999px; padding: 1px 7px; font-size: 11px; font-weight: 650; color: var(--muted); }
.side button.on .n { background: var(--panel); }
.side .city { padding-left: 22px; color: var(--muted); }
.side .city.on, .side .city:hover { color: var(--cream); }
.side .dot { display: inline-block; width: 7px; height: 7px; border-radius: 50%; margin-right: 7px; vertical-align: 1px; }

.list { padding: 16px 20px; min-width: 0; }
.capture { display: flex; gap: 10px; align-items: stretch; }
.capture textarea { flex: 1; min-height: 56px; padding: 13px 14px; border: 1.5px dashed var(--field-line); border-radius: 12px; background: var(--panel); }
.capture textarea:focus-visible { outline: none; border-style: solid; border-color: var(--mint); background: var(--mint-wash); }

.stats { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 8px; margin: 14px 0 0; }
.tile { all: unset; box-sizing: border-box; display: flex; flex-direction: column; gap: 3px; min-width: 0; cursor: pointer;
  padding: 11px 13px; border-radius: 12px; background: var(--panel); border: 1px solid var(--line); }
.tile:hover:not(:disabled) { border-color: var(--line-hi); background: var(--raise); }
.tile:focus-visible { outline: 2px solid var(--mint); outline-offset: 2px; }
.tile:disabled { cursor: default; }
.tile.on { border-color: var(--mint); box-shadow: inset 0 0 0 1px var(--mint); }
.tile .k { font-size: 10.5px; font-weight: 800; letter-spacing: .07em; text-transform: uppercase; color: var(--muted); }
.tile strong { font-size: 21px; font-weight: 850; letter-spacing: -0.03em; line-height: 1.1; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; color: var(--cream); }
.tile strong small { font-size: 13px; font-weight: 650; letter-spacing: 0; color: var(--muted); }
.tile .v { font-size: 12px; color: var(--muted); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.tile.best.has { background: linear-gradient(120deg, rgba(24, 237, 164, .14), var(--panel) 65%); border-color: rgba(24, 237, 164, .45); }
.tile.best.has strong { color: var(--mint); }
.tile.best.has .v { color: var(--cream); font-weight: 650; }
.tile.hit.has strong { color: var(--mint); }
.tile .bar { display: block; height: 4px; margin-top: 5px; border-radius: 999px; background: var(--line); overflow: hidden; }
.tile .bar i { display: block; height: 100%; background: var(--mint); border-radius: inherit; }
.tile.warn strong { color: var(--caution); }
@media (max-width: 700px) { .stats { grid-template-columns: repeat(2, minmax(0, 1fr)); } .stats > :last-child:nth-child(odd) { grid-column: 1 / -1; } }

.toolbar { display: flex; flex-wrap: wrap; justify-content: space-between; align-items: center; gap: 8px; margin: 16px 0 8px; }
.toolbar b { font-size: 15px; font-weight: 800; letter-spacing: -0.01em; }
.tools { display: flex; flex-wrap: wrap; gap: 8px; align-items: center; }
.tools select { width: auto; }
#bulkCount { color: var(--muted); font-size: 12.5px; margin-right: 2px; }

.tablewrap { overflow-x: auto; background: var(--panel); border: 1px solid var(--line); border-radius: 12px; }
table.deals { min-width: 920px; }
table.deals th { position: sticky; top: 0; background: var(--panel); padding: 10px 8px; white-space: nowrap; }
table.deals th:nth-child(2) { text-align: left; }
table.deals th button { all: unset; cursor: pointer; }
table.deals th button:hover { color: var(--cream); }
table.deals th button:focus-visible { outline: 2px solid var(--mint); }
table.deals td { padding: 9px 8px; border-bottom: 1px solid var(--line); white-space: nowrap; }
table.deals tr:last-child td { border-bottom: 0; }
table.deals td:first-child, table.deals th:first-child { width: 30px; padding-left: 14px; }
table.deals tr.row { cursor: pointer; }
table.deals tr.row:hover td { background: var(--raise); }
table.deals tr.sel td { background: rgba(24, 237, 164, .05); }
table.deals tr.fresh td { animation: flash 1.8s ease-out; }
@keyframes flash { from { background: rgba(24, 237, 164, .16); } }
table.deals .addr { font-weight: 700; max-width: 300px; overflow: hidden; text-overflow: ellipsis; text-align: left; }
table.deals select { width: auto; padding: 3px 6px; font-size: 12px; background: var(--raise); }
table.deals tr.best td { background: rgba(24, 237, 164, .045); }
table.deals tr.best td:first-child { box-shadow: inset 3px 0 var(--mint); }

/* the price-tag shape from Underbid, for each deal's return */
.tag {
  display: inline-flex; align-items: center; height: 24px; padding: 0 10px 0 16px; position: relative;
  font-weight: 800; font-size: 12.5px; letter-spacing: -0.01em; color: var(--muted); background: var(--raise); white-space: nowrap;
  clip-path: polygon(8px 0, 100% 0, 100% 100%, 8px 100%, 0 50%);
}
.tag::before { content: ""; position: absolute; left: 6px; top: 50%; width: 4px; height: 4px; margin-top: -2px; border-radius: 50%; background: rgba(255, 255, 255, .35); }
.tag.win { background: var(--mint); color: var(--ink); }
.tag.ok { background: var(--raise); color: var(--caution); }
.tag.down { background: var(--loss); color: var(--ink); }
.tag.win::before, .tag.down::before { background: rgba(5, 6, 5, .45); }
.tag.shine { background-image: linear-gradient(100deg, var(--mint) 0%, var(--mint) 38%, #D8FFF0 46%, #FFFFFF 50%, #D8FFF0 54%, var(--mint) 62%, var(--mint) 100%);
  background-size: 260% 100%; background-position: 100% 0; filter: drop-shadow(0 0 8px rgba(24, 237, 164, .5)); }
.best-label { display: inline-block; margin-left: 6px; font-size: 10px; font-weight: 800; letter-spacing: .08em; text-transform: uppercase; color: var(--mint); }

.more { display: block; margin: 12px auto; }
.empty-list { padding: 36px 20px; text-align: center; color: var(--muted); font-size: 13px; }
.empty-list::before { content: ""; display: block; width: 40px; height: 40px; margin: 0 auto 12px;
  background: url(/img/mark.svg) center / contain no-repeat; }
.empty-list b { color: var(--cream); }

.drawer { position: fixed; top: 0; right: 0; bottom: 0; width: min(1060px, 94vw); background: var(--bg); z-index: 5;
  border-left: 1px solid var(--line); box-shadow: -24px 0 64px rgba(0, 0, 0, .55); overflow: auto; padding: 0 16px 16px; }
.drawer-head { position: sticky; top: 0; z-index: 2; display: flex; align-items: center; gap: 8px; padding: 10px 0; background: var(--bg); border-bottom: 1px solid var(--line); margin-bottom: 14px; }
.drawer-head select { width: auto; font-weight: 700; }
.drawer-head .grow { flex: 1; }
#savedNote { font-size: 12.5px; color: var(--mint); }
#deleteDeal:hover { border-color: var(--loss); color: var(--loss); }
.x { font-size: 20px; line-height: 1; padding: 3px 10px; }

footer { padding: 10px 20px 20px; color: var(--muted); font-size: 11.5px; border-top: 1px solid var(--line); }

@media (max-width: 900px) {
  .ws { grid-template-columns: 1fr; }
  /* filters become one swipeable row of chips instead of a tall list */
  .side { display: flex; gap: 6px; overflow-x: auto; padding: 10px 12px; border-right: 0; border-bottom: 1px solid var(--line);
    scrollbar-width: none; -webkit-overflow-scrolling: touch; }
  .side::-webkit-scrollbar { display: none; }
  .side h4, .side .hint { display: none; }
  .side button { flex: none; width: auto; min-height: 36px; padding: 6px 8px 6px 12px; border-radius: 999px; border: 1px solid var(--line); background: var(--panel); }
  .side .city { padding-left: 12px; }
  .list { padding: 12px; }
  .capture { flex-direction: column; }
  .drawer { width: 100vw; padding: 0 12px 16px; }
  .drawer-head { flex-wrap: wrap; }
  .drawer-head .grow { display: none; }
  #closeDrawer { margin-left: auto; }
  #memo, #deleteDeal { order: 2; }
  #search { order: 3; max-width: none; flex-basis: 100%; }
}
@media (max-width: 600px) {
  .top { padding: 10px 12px; gap: 10px; }
  .brand .tagline { display: none; }
  .logo img { height: 24px; }
  .top nav { flex: 1 1 100%; order: 2; }
  .top nav button { flex: 1; min-height: 36px; }
  #newTop { margin-left: auto; }
  /* 16px text stops phones from zooming in when a field is tapped */
  input, select, textarea { font-size: 16px; }
  button { min-height: 40px; }
  .x { min-height: 40px; min-width: 44px; }
  .drawer-head { gap: 6px; }
  #memo, #deleteDeal { flex: 1; }
  #view-numbers, #view-buybox { padding: 12px; }
  #view-numbers label, #view-buybox label { flex-wrap: wrap; gap: 6px; }
  .compform, .taskadd { grid-template-columns: 1fr 1fr; }
  .previewbar { bottom: 8px; font-size: 11.5px; }

  /* on a phone each deal is a card: return and cash flow on the right,
     price, rent and max offer underneath, status to change in place */
  .tablewrap { overflow: visible; }
  table.deals { min-width: 0; }
  table.deals thead { display: none; }
  table.deals tbody { display: block; }
  table.deals tr.row { display: grid; grid-template-columns: 1fr 1fr auto; gap: 4px 12px; padding: 12px 14px; border-bottom: 1px solid var(--line); }
  table.deals tr.row:last-child { border-bottom: 0; }
  table.deals tr.row td { padding: 0; border: 0; background: none; white-space: normal; text-align: left; width: auto; }
  table.deals tr.row:hover td { background: none; }
  table.deals tr.row:active { background: var(--raise); }
  table.deals tr.best { background: rgba(24, 237, 164, .045); box-shadow: inset 3px 0 var(--mint); }
  table.deals tr.sel { background: rgba(24, 237, 164, .05); }
  table.deals td:nth-child(1), table.deals td:nth-child(10), table.deals td:nth-child(11) { display: none; }
  table.deals td:nth-child(2) { grid-area: 1 / 1 / 2 / 3; max-width: none; font-size: 15px; }
  table.deals td:nth-child(7) { grid-area: 1 / 3; text-align: right; }
  table.deals td:nth-child(3) { grid-area: 2 / 1 / 3 / 3; color: var(--muted); }
  table.deals td:nth-child(8) { grid-area: 2 / 3; text-align: right; font-weight: 750; }
  table.deals td:nth-child(5) { grid-area: 3 / 1; }
  table.deals td:nth-child(6) { grid-area: 3 / 2; }
  table.deals td:nth-child(9) { grid-area: 3 / 3; text-align: right; }
  table.deals td:nth-child(4) { grid-area: 4 / 1 / 5 / -1; margin-top: 4px; }
  table.deals td:nth-child(4) select { min-height: 36px; }
  table.deals td:nth-child(5)::before, table.deals td:nth-child(6)::before, table.deals td:nth-child(9)::before {
    display: block; font-size: 10.5px; font-weight: 750; letter-spacing: .06em; text-transform: uppercase; color: var(--muted); }
  table.deals td:nth-child(5)::before { content: "Price"; }
  table.deals td:nth-child(6)::before { content: "Rent"; }
  table.deals td:nth-child(9)::before { content: "Max offer"; }
}

@media (prefers-reduced-motion: no-preference) {
  .tag.shine { animation: sheen 3.6s cubic-bezier(.45, 0, .2, 1) infinite; }
  @keyframes sheen { 0% { background-position: 100% 0; } 55%, 100% { background-position: 0% 0; } }
  table.deals tr.row td { transition: background-color .12s; }
  .stats div { transition: background-color .25s, border-color .25s; }
}

@media print {
  :root { --bg: #fff; --panel: #fff; --raise: #f3f3f3; --line: #ccc; --cream: #000; --muted: #444; --mint: #02A573; --loss: #C2410C; --caution: #92400E; }
  .top nav, .top input, .acct, .helpfab, .helppanel, .helpscrim, .termpop, .tour, .toast, .side, .list, .drawer-head, #deal, .compform, [data-del-comp], #view-numbers, footer { display: none !important; }
  .top { position: static; } .ws { display: block; } .drawer { position: static; width: auto; box-shadow: none; border: 0; overflow: visible; }
  .cols { grid-template-columns: 1fr; }
  .card { break-inside: avoid; }
  .big .good { background: #e8fff6; } .big .good b, .big .good span { color: #000; }
  button.link { text-decoration: none; }
}

/* ---- trial and subscription ---- */
.planchip {
  position: relative; display: inline-flex; align-items: center; gap: 8px; min-height: 36px; padding: 0 6px 0 14px; border-radius: 10px;
  color: #1A0A00; font-size: 12.5px; font-weight: 700; border: 0; overflow: hidden; isolation: isolate;
  background: linear-gradient(100deg, var(--orange) 0%, var(--orange) 38%, #FFD9B0 46%, #FFFFFF 50%, #FFD9B0 54%, var(--orange) 62%, var(--orange) 100%);
  background-size: 260% 100%; background-position: 100% 0;
  box-shadow: 0 0 0 1px rgba(255, 138, 43, .55), 0 0 22px rgba(255, 138, 43, .45);
}
.planchip::before { content: "\2726"; font-size: 13px; margin-right: -2px; }
.planchip b { color: #1A0A00; font-weight: 850; }
.planchip .go { background: #1A0A00; color: var(--orange); font-weight: 850; padding: 4px 10px; border-radius: 7px; }
.planchip:hover { filter: brightness(1.06); box-shadow: 0 0 0 1px var(--orange), 0 0 30px rgba(255, 138, 43, .6); }
.planchip:focus-visible { outline: 2px solid var(--cream); outline-offset: 2px; }
@media (prefers-reduced-motion: no-preference) {
  .planchip { animation: sheen 3.6s cubic-bezier(.45, 0, .2, 1) infinite, chipGlow 3.6s ease-in-out infinite; }
  @keyframes chipGlow { 0%, 100% { box-shadow: 0 0 0 1px rgba(255, 138, 43, .45), 0 0 16px rgba(255, 138, 43, .35); }
    50% { box-shadow: 0 0 0 1px rgba(255, 138, 43, .75), 0 0 30px rgba(255, 138, 43, .6); } }
}
.planbtns { display: flex; flex-wrap: wrap; gap: 10px; align-items: center; }
body.locked { overflow: hidden; }
.paywall {
  position: fixed; inset: 0; z-index: 20; display: grid; place-items: center; padding: 16px;
  background: rgba(5, 6, 5, .86); backdrop-filter: blur(6px);
}
.paywall[hidden] { display: none; }
.paycard {
  width: 100%; max-width: 420px; display: flex; flex-direction: column; gap: 12px; text-align: center;
  background: var(--panel); border: 1px solid var(--line-hi); border-radius: 16px; padding: 28px 24px;
}
.paycard h2 { margin: 0; font-size: 24px; letter-spacing: -0.03em; }
.paycard p { margin: 0; }
.paymark { width: 56px; height: auto; margin: 0 auto; }
.paycard .cta { margin-top: 6px; }
.linkish { background: none; border: 0; color: var(--muted); text-decoration: underline; font-size: 12.5px; }
.linkish:hover { background: none; color: var(--cream); }
@media print { .planchip, .paywall { display: none !important; } }

/* ---- buy box ---- */
#view-buybox label input:not([type=number]):not([type=checkbox]) { max-width: 260px; }
.chips { display: flex; flex-wrap: wrap; gap: 6px; margin: 4px 0 2px; }
#view-buybox label.chip { position: relative; margin: 0; display: inline-block; }
.chip input { position: absolute; opacity: 0; inset: 0; cursor: pointer; }
.chip span { display: inline-block; padding: 5px 11px; border-radius: 999px; font-size: 12px; font-weight: 650;
  color: var(--muted); background: var(--panel); border: 1px solid var(--line); }
.chip input:checked + span { color: var(--cream); background: var(--raise); border-color: rgba(24, 237, 164, .45); }
.chip input:checked + span::before { content: "\2713  "; color: var(--mint); }
.chip input:focus-visible + span { outline: 2px solid var(--mint); outline-offset: 1px; }
.fit { color: var(--mint); font-weight: 750; }
.miss { color: var(--muted); font-weight: 600; }
.boxcard.fits { border-color: rgba(24, 237, 164, .45); background: linear-gradient(120deg, rgba(24, 237, 164, .08), var(--panel) 60%); }
.boxcard h3 { display: flex; gap: 10px; align-items: center; }
.boxcard h3 span { text-transform: none; letter-spacing: 0; font-size: 12.5px; }
.checks { list-style: none; margin: 0; padding: 0; display: grid; gap: 4px; }
.checks li { display: flex; justify-content: space-between; gap: 10px; font-size: 13px; }
.checks li.ok > span:first-child { color: var(--mint); }
.checks li.no > span:first-child { color: var(--loss); }
.checks small { color: var(--muted); }

/* ---- tags, checklist, 5-year ---- */
.tags { display: flex; flex-wrap: wrap; gap: 6px; margin-bottom: 6px; }
.tags:empty { display: none; }
.tagchip { display: inline-flex; align-items: center; gap: 4px; padding: 3px 4px 3px 9px; border-radius: 999px; font-size: 12px; font-weight: 650;
  background: var(--raise); border: 1px solid var(--line-hi); color: var(--cream); }
.tagchip button { all: unset; cursor: pointer; color: var(--muted); padding: 0 4px; font-size: 11px; }
.tagchip button:hover { color: var(--loss); }
.tasks { list-style: none; margin: 0 0 8px; padding: 0; display: grid; gap: 4px; }
.tasks li { display: grid; grid-template-columns: 1fr auto auto; gap: 6px; align-items: center; padding: 5px 8px; border-radius: 8px; background: var(--raise); }
.tasks li.empty { display: block; background: none; padding: 2px 0; }
.tasks li label { flex-direction: row; align-items: center; gap: 8px; font-weight: 550; }
.tasks li.done label span { color: var(--muted); text-decoration: line-through; }
.tasks li input[type=date] { width: 118px; padding: 3px 4px; font-size: 11.5px; color: var(--muted); }
.tasks .due { display: none; }
.tasks li.late .due { display: block; grid-column: 1 / -1; margin: -2px 0 0 24px; }
.tasks li.late .due { color: var(--caution); font-weight: 700; }
.taskadd { display: grid; grid-template-columns: 1fr auto auto; gap: 6px; }
.taskadd input[type=date] { width: auto; }
.mini-tag { display: inline-block; margin-left: 6px; font-size: 10.5px; font-weight: 650; color: var(--muted); }
.mini-due { display: inline-block; margin-left: 6px; font-size: 11px; font-weight: 750; color: var(--caution); }
.proj { margin-top: 12px; }
.proj td, .proj th { padding: 4px 6px; }


/* ---- upgrade screen ---- */
.upcard { position: relative; text-align: left; max-width: 440px; }
.upcard .paymark, .upcard h2 { align-self: center; text-align: center; }
.upcard > div { display: flex; flex-direction: column; gap: 12px; }
.upclose { position: absolute; top: 10px; right: 10px; }
.upcard .price { display: flex; align-items: baseline; justify-content: center; gap: 4px; }
.upcard .price b { font-size: 40px; font-weight: 900; letter-spacing: -0.04em; color: var(--cream); }
.upcard .price span { color: var(--muted); font-weight: 650; }
.perks { list-style: none; margin: 0; padding: 0; display: grid; gap: 7px; }
.perks li { position: relative; padding-left: 24px; font-size: 13.5px; }
.perks li::before { content: "\2713"; position: absolute; left: 0; color: var(--mint); font-weight: 900; }
.cta.orange { background: var(--orange); border-color: var(--orange); color: var(--on-orange);
  box-shadow: 0 0 0 1px rgba(255, 138, 43, .35), 0 6px 26px rgba(255, 138, 43, .35); }
.cta.orange:hover { background: #FF9D4D; border-color: #FF9D4D; }
.upcard #upThanks p { text-align: center; margin: 0; }

/* ---- rehab switch ---- */
label.switch { flex-direction: row; align-items: center; gap: 10px; margin: 14px 0 8px; font-size: 14px; font-weight: 750; cursor: pointer; }
.switch input { position: absolute; opacity: 0; width: 1px; height: 1px; }
.switch .track { position: relative; width: 38px; height: 22px; border-radius: 999px; background: var(--raise); border: 1px solid var(--line-hi); transition: background .15s; }
.switch .track i { position: absolute; top: 2px; left: 2px; width: 16px; height: 16px; border-radius: 50%; background: var(--muted); transition: transform .15s, background .15s; }
.switch input:checked + .track { background: var(--mint); border-color: var(--mint); }
.switch input:checked + .track i { transform: translateX(16px); background: var(--ink); }
.switch input:focus-visible + .track { outline: 2px solid var(--mint); outline-offset: 2px; }
#rehabBox { padding: 10px 12px 2px; margin-bottom: 10px; border-radius: 10px; background: var(--raise); border: 1px solid var(--line); }

/* ---- sign-in and trial start (account.js) ---- */
.gate { z-index: 30; }
.gate .paycard > div { display: flex; flex-direction: column; gap: 12px; }
.gate h2 { text-align: center; }
.gbtn { display: flex; align-items: center; justify-content: center; gap: 10px; min-height: 46px; border-radius: 12px;
  background: #fff; color: #1f1f1f; border: 1px solid #dadce0; font-size: 15px; font-weight: 700; }
.gbtn:hover { background: #f4f4f4; color: #1f1f1f; }
.or { display: flex; align-items: center; gap: 10px; color: var(--muted); font-size: 12px; }
.or::before, .or::after { content: ""; flex: 1; height: 1px; background: var(--line); }
.emailform { display: grid; gap: 8px; }
.emailform input { min-height: 44px; }
.previewbar { position: fixed; left: 50%; bottom: 12px; transform: translateX(-50%); z-index: 15; max-width: calc(100% - 32px);
  padding: 7px 14px; border-radius: 999px; font-size: 12px; font-weight: 650; color: var(--caution); background: var(--raise);
  border: 1px solid rgba(246, 195, 91, .3); box-shadow: 0 8px 24px rgba(0, 0, 0, .5); text-align: center; }
.previewbar[hidden] { display: none; }
@media print { .previewbar { display: none !important; } }

/* ---- accessibility helpers ---- */
.sr { position: absolute !important; width: 1px; height: 1px; padding: 0; margin: -1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; border: 0; }
#drawerTitle:focus { outline: none; }

/* The deal's name in the list is a real button, so keyboards can open it. */
table.deals .rowopen { all: unset; cursor: pointer; font-weight: 700; color: var(--cream); }
table.deals .rowopen:hover { text-decoration: underline; text-underline-offset: 3px; }
table.deals .rowopen:focus-visible { outline: 2px solid var(--mint); outline-offset: 2px; border-radius: 4px; }
.exbadge { display: inline-block; margin-left: 4px; padding: 1px 7px; border-radius: 6px; background: var(--line-hi); color: var(--cream);
  font-size: 11px; font-weight: 700; letter-spacing: 0; vertical-align: 2px; }

/* "Start from scratch": the quiet second way to begin (the paste box is the first). */
.capture .scratch { min-height: 56px; padding: 0 18px; border-radius: 12px; font-size: 14px; white-space: nowrap; border-color: var(--field-line); }
.empty-list button { margin-top: 14px; }

/* Listing fields on a saved deal fold away. */
.refill { margin: 0 0 12px; border: 1px solid var(--line-hi); border-radius: 10px; padding: 0 12px; }
.refill > summary { cursor: pointer; padding: 10px 0; font-weight: 700; font-size: 13.5px; }
.refill[open] { padding-bottom: 4px; }
.refill > summary:focus-visible { outline: 2px solid var(--mint); outline-offset: 2px; border-radius: 6px; }
table.costs.facts { margin-top: 10px; }

/* ---- account menu ---- */
.acct { position: relative; }
.acctbtn { display: inline-flex; align-items: center; gap: 8px; padding: 4px 12px 4px 4px; border-radius: 999px; }
.acctbtn .av { display: grid; place-items: center; width: 26px; height: 26px; border-radius: 50%; background: var(--cream); color: var(--ink); font-weight: 850; font-size: 13px; }
.acctbtn .av:empty::before { content: ""; width: 10px; height: 10px; border-radius: 50%; border: 2px solid var(--ink); }
.acctmenu { position: absolute; right: 0; top: calc(100% + 8px); z-index: 20; width: 300px; padding: 14px; border-radius: 14px;
  background: var(--raise); border: 1px solid var(--line-hi); box-shadow: 0 18px 44px rgba(0, 0, 0, .55); display: flex; flex-direction: column; gap: 8px; }
.acctmenu .who { margin: 0; font-weight: 700; overflow-wrap: anywhere; }
.acctmenu .hint { margin: 0 0 4px; }
.acctmenu #planBox { display: flex; flex-direction: column; gap: 8px; padding-bottom: 10px; border-bottom: 1px solid var(--line); margin-bottom: 2px; }
.acctmenu button { width: 100%; text-align: left; }
.acctmenu .cta { text-align: center; }

/* ---- toast (undo) ---- */
.toast { position: fixed; left: 50%; bottom: 20px; transform: translateX(-50%); z-index: 60; display: flex; align-items: center; gap: 14px;
  padding: 10px 10px 10px 16px; border-radius: 12px; background: var(--cream); color: var(--ink); font-weight: 650; box-shadow: 0 12px 30px rgba(0, 0, 0, .5); }
.toast button { background: var(--ink); color: var(--cream); border-color: var(--ink); }

/* ---- help guide (help.js). Cream, not mint (money) or orange (the trial). ---- */
button.term { all: unset; cursor: help; border-bottom: 1.5px dotted currentColor; text-underline-offset: 2px; }
button.term::after { content: "?"; display: inline-grid; place-items: center; width: 14px; height: 14px; margin-left: 4px; border-radius: 50%;
  border: 1px solid currentColor; font-size: 9.5px; font-weight: 800; line-height: 1; vertical-align: 1px; opacity: .75; }
button.term:hover { border-bottom-style: solid; }
button.term:focus-visible { outline: 2px solid var(--mint); outline-offset: 2px; border-radius: 3px; }
.big .good button.term { color: var(--ink); }

.helpfab { position: fixed; right: 20px; bottom: 20px; z-index: 30; display: flex; align-items: center; gap: 8px; height: 44px; padding: 0 16px 0 6px;
  border-radius: 22px; background: var(--raise); border: 1px solid var(--line-hi); color: var(--cream); font-size: 14px; box-shadow: 0 8px 24px rgba(0, 0, 0, .5); }
.helpfab i { display: grid; place-items: center; width: 32px; height: 32px; border-radius: 50%; background: var(--cream); color: var(--ink); font-style: normal; font-weight: 850; font-size: 16px; }
.helpfab:hover { border-color: var(--cream); }
.helpfab:focus-visible { outline: 2px solid var(--cream); outline-offset: 2px; }
body.locked .helpfab { display: none; }

.helpscrim { position: fixed; inset: 0; z-index: 39; background: rgba(5, 6, 5, .45); }
.helppanel { position: fixed; top: 0; right: 0; bottom: 0; z-index: 40; width: min(400px, 100vw); display: flex; flex-direction: column;
  background: var(--panel); border-left: 1px solid var(--line-hi); box-shadow: -20px 0 50px rgba(0, 0, 0, .5); font-size: 14px; }
.hp-head { display: flex; align-items: center; gap: 10px; padding: 14px 18px; border-bottom: 1px solid var(--line); }
.hp-head h2 { margin: 0; flex: 1; font-size: 18px; font-weight: 850; letter-spacing: -0.02em; }
.hp-head h2:focus { outline: none; }
.hp-body { flex: 1; overflow: auto; padding: 16px 18px; display: flex; flex-direction: column; gap: 18px; }
.hp-body section + section { margin-top: 18px; }
.hp-h { margin: 0 0 8px; font-size: 12px; font-weight: 750; color: var(--muted); text-transform: uppercase; letter-spacing: .05em; }
.prog { display: block; height: 6px; border-radius: 3px; background: var(--line); overflow: hidden; margin: 2px 0 10px; }
.prog i { display: block; height: 100%; background: var(--cream); }
.hp-check { list-style: none; margin: 0; padding: 0; display: flex; flex-direction: column; gap: 4px; }
.hp-check button { all: unset; box-sizing: border-box; display: flex; gap: 10px; align-items: flex-start; width: 100%; padding: 9px 10px; cursor: pointer;
  border-radius: 10px; background: var(--raise); border: 1px solid var(--line); }
.hp-check button:hover { border-color: var(--line-hi); }
.hp-check button:focus-visible { outline: 2px solid var(--mint); outline-offset: 1px; }
.hp-check small { display: block; color: var(--muted); font-size: 13px; }
.hp-check .tick { flex: none; display: grid; place-items: center; width: 20px; height: 20px; margin-top: 1px; border-radius: 50%; border: 1.5px solid var(--field-line); font-size: 12px; }
.hp-check .done .tick { background: var(--cream); border-color: var(--cream); color: var(--ink); font-weight: 900; }
.hp-check .done .t { color: var(--muted); text-decoration: line-through; }
.hp-tips { display: flex; flex-direction: column; gap: 8px; }
.hp-tip { padding: 11px 12px; border-radius: 12px; background: var(--raise); border: 1px solid var(--line); }
.hp-tip b { display: block; margin-bottom: 2px; }
.hp-tip span { color: #C9D0CB; }
.hp-terms { display: flex; flex-wrap: wrap; gap: 6px; }
.hp-terms button { padding: 5px 11px; border-radius: 999px; font-weight: 600; font-size: 13px; }
.hp-terms button[aria-pressed="true"] { background: var(--cream); color: var(--ink); border-color: var(--cream); }
.hp-termbox, .termpop { color: var(--cream); }
.hp-termbox { margin-top: 10px; padding: 12px; border-radius: 12px; background: var(--raise); border: 1px solid var(--line-hi); }
.hp-termbox h4, .termpop h4 { margin: 0 0 4px; font-size: 15px; }
.hp-termbox p, .termpop p { margin: 0 0 8px; color: #D9DED9; }
.math { padding: 8px 10px; border-radius: 8px; background: var(--bg); border: 1px solid var(--line); font-size: 13px; line-height: 1.6; }
.math b { color: var(--cream); }
.hp-art { border-bottom: 1px solid var(--line); padding: 10px 0; }
.hp-art summary { cursor: pointer; font-weight: 700; }
.hp-art p { margin: 6px 0 0; color: #D9DED9; }
.hp-foot { display: flex; gap: 8px; padding: 14px 18px; border-top: 1px solid var(--line); }
.hp-foot > * { flex: 1; }
.btnlike { display: inline-flex; align-items: center; justify-content: center; padding: 7px 14px; border-radius: 8px; background: var(--raise);
  color: var(--cream); border: 1px solid var(--line); font-weight: 700; font-size: 13px; text-decoration: none; }
.btnlike:hover { border-color: var(--muted); }
.btnlike:focus-visible { outline: 2px solid var(--mint); outline-offset: 2px; }

.termpop { position: fixed; z-index: 45; width: 330px; max-width: calc(100vw - 24px); padding: 14px 40px 14px 16px; border-radius: 14px;
  background: var(--raise); border: 1px solid var(--line-hi); box-shadow: 0 16px 40px rgba(0, 0, 0, .6); font-size: 14px; }
.termpop:focus { outline: none; }
.termpop .x { position: absolute; top: 8px; right: 8px; font-size: 16px; padding: 2px 8px; }

.starter { margin: 0 0 12px; }
.starter-open { all: unset; box-sizing: border-box; display: grid; grid-template-columns: auto 1fr auto; align-items: center; gap: 4px 14px; width: 100%;
  cursor: pointer; padding: 10px 14px; border-radius: 12px; background: var(--raise); border: 1px solid var(--line-hi); font-size: 13.5px; }
.starter-open:hover { border-color: var(--cream); }
.starter-open:focus-visible { outline: 2px solid var(--mint); outline-offset: 2px; }
.starter-open .prog { grid-column: 1 / -1; grid-row: 2; margin: 4px 0 0; }
.starter-open .next { color: #D9DED9; }
.starter-open .go { font-weight: 700; text-decoration: underline; text-underline-offset: 3px; }
@media (max-width: 640px) { .starter-open { grid-template-columns: 1fr auto; } .starter-open .next { grid-column: 1 / -1; grid-row: 3; } }
.tour { position: fixed; inset: 0; z-index: 70; }
.tour-block { position: absolute; inset: 0; }
.tour-block.dim { background: rgba(5, 6, 5, .72); }
.tour-spot { position: fixed; border-radius: 14px; box-shadow: 0 0 0 9999px rgba(5, 6, 5, .72), 0 0 0 2px var(--cream); pointer-events: none; }
.tour-card { position: fixed; width: 350px; max-width: calc(100vw - 24px); padding: 18px 18px 14px; border-radius: 16px; background: var(--raise);
  border: 1px solid var(--line-hi); box-shadow: 0 20px 50px rgba(0, 0, 0, .6); font-size: 14px; line-height: 1.5; }
.tour-card h2 { margin: 0 0 6px; font-size: 18px; font-weight: 850; letter-spacing: -0.02em; }
.tour-card p { margin: 0 0 12px; color: #D9DED9; }
.tour-card .step { margin: 0 0 6px; font-size: 12px; font-weight: 750; color: var(--muted); text-transform: uppercase; letter-spacing: .05em; }
.tour-card .row { display: flex; align-items: center; gap: 8px; flex-wrap: wrap; }
.tour-card .grow { flex: 1; }
.tour-card .main { background: var(--cream); color: var(--ink); border-color: var(--cream); }
.tour-card .main:focus-visible { outline: 2px solid var(--cream); outline-offset: 2px; }
.tour-card .dots { display: flex; gap: 5px; } .tour-card .dots b { width: 7px; height: 7px; border-radius: 50%; background: var(--line-hi); } .tour-card .dots b.on { background: var(--cream); }
.tour-card.welcome { left: 50%; top: 50%; transform: translate(-50%, -50%); width: 420px; padding: 24px; }
.tour-card.welcome img { display: block; margin-bottom: 10px; }
.tour-card.welcome h2 { font-size: 21px; }
.tour-card .fine { margin: 14px 0 0; font-size: 13px; color: var(--muted); }
.tour-card .fine b { color: var(--cream); }

@media (max-width: 640px) {
  .helpfab { right: 12px; bottom: 12px; padding: 0 6px; }
  .helpfab span { display: none; }
  .helppanel { top: auto; left: 0; width: 100vw; max-height: 82vh; border-left: 0; border-top: 1px solid var(--line-hi); border-radius: 18px 18px 0 0; }
  .acctbtn .lbl { display: none; }
  .acctbtn { padding: 4px; }
  .capture .scratch { min-height: 48px; }
}
@media (prefers-reduced-motion: no-preference) {
  .helppanel:not([hidden]) { animation: hp-in .18s ease-out; }
  @keyframes hp-in { from { transform: translateX(16px); opacity: 0; } }
}
