:root {
  --bg: #080a0d;
  --bg-2: #111417;
  --surface: rgba(255,255,255,.045);
  --surface-hi: rgba(255,255,255,.09);
  --line: rgba(255,255,255,.16);
  --line-hi: rgba(255,255,255,.4);
  --text: #f4f3ef;
  --muted: #b8b9bc;
  --dim: #999da3;
  --cyan: #e5e6e8;
  --violet: #b9c5d9;
  --mint: #ddd9cc;
  --magenta: #e3a7af;
  --amber: #d8c8ab;
  --radius: 22px;
  --mono: 'TildaSans', system-ui, sans-serif;
}
body {
  font-family: 'TildaSans', system-ui, -apple-system, sans-serif;
  background: radial-gradient(ellipse at 85% 0%, #292a2b 0, transparent 48%), linear-gradient(160deg,#141514,#080a0d 60%);
  background-attachment: fixed;
}
#net, .scanlines, .vignette, .corner { display: none; }
.hero { padding: 26px 0 30px; }
.home-link {
  display: inline-flex; align-items: center; gap: 9px;
  min-height: 44px; padding: 9px 17px; margin-bottom: 28px;
  border: 1px solid var(--line); border-radius: 999px;
  background: var(--surface); color: var(--text); text-decoration: none;
}
.cashflow-title { font-size: clamp(38px,6vw,70px); line-height: 1.05; letter-spacing: -.04em; margin: 0 0 16px; }
.cashflow-subtitle { max-width: 760px; font-size: clamp(19px,2.4vw,26px); line-height: 1.3; margin: 0 0 16px; }
.lead { color: var(--muted); max-width: 780px; }
.cashflow-shortcuts { display: flex; flex-wrap: wrap; gap: 10px; margin-top: 22px; }
.cashflow-shortcuts a { display: inline-flex; align-items: center; min-height: 44px; padding: 10px 18px; border: 1px solid var(--line); border-radius: 999px; background: var(--surface); color: var(--text); text-decoration: none; }
#catalog, #summary { scroll-margin-top: 20px; }
.mono { letter-spacing: normal; }
.hero-metrics { gap: 18px; }
.hero-metrics .sep { display: none; }
.card, .card.on, .panel, .tool, .tool.on, .stack, .modal-box {
  clip-path: none; border-radius: var(--radius);
  border: 1px solid var(--line);
  background: linear-gradient(145deg,rgba(255,255,255,.075),rgba(255,255,255,.025));
  box-shadow: inset 0 1px 0 rgba(255,255,255,.07), 0 14px 38px rgba(0,0,0,.14);
}
.panel, .modal-box { background: rgba(28,30,32,.94); backdrop-filter: blur(16px); -webkit-backdrop-filter: blur(16px); }
.card.on, .tool.on { background: rgba(255,255,255,.12); border-color: rgba(255,255,255,.6); }
.card::before, .card.on::after, .panel::before, .cta::before, .prompt-btn::before { display: none; }
.card:hover { border-color: var(--line-hi); box-shadow: 0 12px 28px rgba(0,0,0,.18); transform: translateY(-2px); }
.search, .tier-btns, .cats button, .ghost, .prompt-btn, .cta, .m-copy, .modal-x, .qty button, .assume input, .m-fields input, .m-fields textarea {
  clip-path: none; border-radius: 14px; border: 1px solid var(--line);
  background: rgba(255,255,255,.055); color: var(--text); text-shadow: none;
}
button, a, input, label { touch-action: manipulation; }
button, .cats button, .prompt-btn, .m-copy, .modal-x { min-height: 44px; }
.tier-btns button { min-height: 42px; }
.cats button { border-radius: 999px; }
.cats button.on, .tier-btns button.on { background: rgba(255,255,255,.16); border-color: var(--line-hi); color: var(--text); }
.cats button::after, .tier-btns button::before { display: none; }
.search input, .assume input, .m-fields input, .m-fields textarea { font-size: 16px; }
.cta { background: rgba(255,255,255,.14); box-shadow: inset 0 1px 0 rgba(255,255,255,.15); }
.saved { color: var(--text); text-shadow: none; }
.fill-market { background: #8c939f; box-shadow: none; }
.fill-ai { background: #d9d5c9; box-shadow: none; }
.fill-time { background: #a5b5cb; box-shadow: none; }
.stack { padding: 24px; }
.foot { line-height: 1.6; }
.foot a { display: block; color: var(--muted); margin-top: 12px; }
:focus-visible { outline: 2px solid #e4dfd2; outline-offset: 4px; }
.catalog, .panel-holder, .grid, .controls { min-width: 0; }
@media (max-width: 1100px) {
  .panel-holder { order: 0; }
}
@media (max-width: 700px) {
  .wrap { width: calc(100% - 28px); }
  .layout { display: flex; flex-direction: column; gap: 24px; }
  .catalog, .panel-holder { width: 100%; }
  .panel-holder { position: static; }
  .grid { grid-template-columns: 1fr; }
  .controls, .stack-head { flex-direction: column; align-items: stretch; }
  .search { flex: 0 0 50px; width: 100%; }
  .tier { flex-wrap: wrap; }
  .hero-metrics { font-size: 12px; gap: 8px 16px; }
  .stack { padding: 16px; }
  .stack-actions { flex-wrap: wrap; }
  .prices { flex-wrap: wrap; }
  .qty .row-saved { min-width: 0; font-size: 12px; }
  .modal-box { max-width: calc(100vw - 24px); }
  .foot { padding-bottom: max(28px,env(safe-area-inset-bottom)); }
}
@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { animation: none !important; transition: none !important; scroll-behavior: auto !important; }
}

/* Task-first workspace: six results per page and immediate access to totals. */
.cashflow-compact .hero { padding: 20px 0 16px; }
.cashflow-compact .home-link { margin-bottom: 16px; }
.cashflow-compact .cashflow-title { font-size: clamp(32px,4vw,48px); margin-bottom: 8px; }
.cashflow-compact .cashflow-subtitle { font-size: 22px; margin-bottom: 6px; }
.cashflow-compact .lead { font-size: 16px; margin: 0; }
.cashflow-compact .hero-metrics { display: none; }
.cashflow-worknav {
  position: sticky; top: 8px; z-index: 8; display: grid;
  grid-template-columns: repeat(3,minmax(0,1fr)); gap: 5px;
  padding: 6px; margin-bottom: 20px; border-radius: 20px;
  border: 1px solid var(--line); background: rgba(28,30,32,.94);
  backdrop-filter: blur(16px); -webkit-backdrop-filter: blur(16px);
}
.cashflow-worknav button, .catalog-filters button, .catalog-pagination button {
  font: 600 16px 'TildaSans',sans-serif; color: var(--text); min-height: 44px;
  border: 1px solid transparent; border-radius: 14px; background: transparent; cursor: pointer;
}
.cashflow-worknav button[aria-pressed="true"], #selected-only[aria-pressed="true"] {
  border-color: var(--line-hi); background: rgba(255,255,255,.14);
}
.cashflow-worknav span { font-size: 12px; padding: 2px 7px; border-radius: 99px; background: rgba(255,255,255,.1); }
.cashflow-compact .layout { display: block; padding-bottom: 24px; }
.cashflow-compact .catalog { width: 100%; }
.cashflow-compact .grid { grid-template-columns: repeat(3,minmax(0,1fr)); gap: 14px; }
.cashflow-compact .card { animation: none; padding: 16px; }
.cashflow-compact .card p { margin-bottom: 12px; }
.cashflow-compact .card h3 { font-size: 19px; }
.cashflow-compact .panel-holder { position: static; max-width: 740px; margin-inline: auto; }
.cashflow-compact .stack { margin-top: 0; }
.cashflow-compact .stack-grid { grid-template-columns: repeat(3,minmax(0,1fr)); }
.catalog-filters { display: flex; align-items: end; gap: 12px; margin-bottom: 12px; }
.catalog-filters label { display: grid; gap: 4px; font-size: 13px; color: var(--muted); flex: 1; }
.catalog-filters select { width: 100%; min-height: 46px; padding: 9px 12px; font: 16px 'TildaSans',sans-serif; color: var(--text); background: #242629; border: 1px solid var(--line); border-radius: 14px; color-scheme: dark; }
.catalog-filters button { border-color: var(--line); padding-inline: 16px; min-height: 46px; }
.cashflow-compact .quick-actions { margin-bottom: 12px; padding-top: 0; }
.catalog-pagination { display: flex; align-items: center; justify-content: space-between; gap: 8px; padding-top: 18px; }
.catalog-pagination button { border-color: var(--line); padding: 8px 16px; }
.catalog-pagination button:disabled { opacity: .35; cursor: default; }
#page-status { color: var(--muted); font-size: 14px; text-align: center; }
.cashflow-mini-result {
  position: fixed; bottom: max(12px,env(safe-area-inset-bottom)); left: 50%; transform: translateX(-50%);
  z-index: 9; width: min(540px,calc(100% - 28px)); display: flex;
  align-items: center; justify-content: space-between; gap: 14px;
  padding: 12px 18px; border-radius: 20px; border: 1px solid var(--line-hi);
  color: var(--text); background: rgba(38,40,43,.96); box-shadow: 0 8px 30px #0006;
  backdrop-filter: blur(16px); -webkit-backdrop-filter: blur(16px); font: 16px 'TildaSans',sans-serif; cursor: pointer;
}
.cashflow-mini-result strong { font-size: 22px; margin-left: 8px; }
.cashflow-compact .foot { padding-bottom: 100px; }
.cashflow-compact #grid, .cashflow-compact #catalog, .cashflow-compact #stack, .cashflow-compact #summary { scroll-margin-top: 80px; }
.cashflow-compact .cta:hover { color: var(--text); box-shadow: none; }
@media (max-width: 1000px) {
  .cashflow-compact .grid, .cashflow-compact .stack-grid { grid-template-columns: repeat(2,minmax(0,1fr)); }
}
@media (max-width: 600px) {
  .cashflow-compact .grid, .cashflow-compact .stack-grid { grid-template-columns: 1fr; }
  .catalog-filters { gap: 8px; }
  .catalog-filters label { min-width: 0; }
  .catalog-filters button { padding-inline: 10px; font-size: 14px; }
  .cashflow-compact .controls { gap: 10px; margin-bottom: 12px; }
  .cashflow-compact .cashflow-subtitle { font-size: 20px; }
  .cashflow-worknav { top: 4px; }
  .cashflow-worknav button { font-size: 15px; }
  .catalog-pagination button { padding-inline: 12px; font-size: 14px; }
  #page-status { font-size: 12px; }
}
