/* CoGrow Core app: the same clean light look as the website mock. */
:root {
  --page: #ffffff;
  --soft: #f4f6f5;
  --ink: #14201b;
  --muted: #5d6a64;
  --line: #e2e7e4;
  --green: #0d4a34;
  --green-soft: #e7f0eb;
  --lime: #c8f169;
  --line-strong: #d5ddd9;
  --on-green: #ffffff;
  --on-green-dim: #cfe3d8;
  --error: #9b2c2c;
  --error-soft: #fbeaea;
  --font: "Manrope", -apple-system, "Segoe UI", Helvetica, Arial, sans-serif;
  color-scheme: light;
}
* { box-sizing: border-box; }
body { margin: 0; background: var(--page); color: var(--ink); font-family: var(--font); font-size: 1rem; line-height: 1.55; }
h1, h2 { margin: 0; font-weight: 600; letter-spacing: -0.015em; }
p { margin: 0; }
button, input { font: inherit; }
:focus-visible { outline: 2px solid var(--green); outline-offset: 2px; }
.muted { color: var(--muted); }
.num { font-variant-numeric: tabular-nums; text-align: right; white-space: nowrap; }

.logo { display: flex; align-items: center; gap: 9px; font-weight: 700; font-size: 1.125rem; letter-spacing: -0.01em; }
.logo .dots { display: inline-flex; gap: 3px; }
.logo .dots i { width: 6px; height: 6px; border-radius: 50%; background: var(--green); }
.logo .dots i:nth-child(1) { opacity: 0.35; } .logo .dots i:nth-child(2) { opacity: 0.65; }
.logo .core { color: var(--muted); font-weight: 500; }

/* login */
.login-page { background: var(--soft); min-height: 100vh; display: grid; place-items: center; }
.login { width: 100%; max-width: 420px; padding: 40px 20px; display: grid; gap: 24px; justify-items: center; }
.login .logo { font-size: 1.375rem; }
.login .logo .dots i { width: 8px; height: 8px; }
.tagline { font-size: 1.25rem; color: var(--muted); text-align: center; }
.login .card { width: 100%; padding: 32px; }
.login .card h1 { font-size: 1.5rem; }
.login .button-secondary { margin-top: 8px; padding: 11px; border: 1px solid var(--green); border-radius: 12px; color: var(--green); font-weight: 600; text-align: center; text-decoration: none; }
.login .button-secondary:hover { background: var(--green-soft); }
.login .card textarea { font: inherit; padding: 11px 12px; border: 1px solid var(--line); border-radius: 12px; color: var(--ink); resize: vertical; }
.login .card textarea:focus { border-color: var(--green); outline: none; box-shadow: 0 0 0 3px var(--green-soft); }
.login .logo.plain { color: var(--ink); text-decoration: none; }
.hp { position: absolute; left: -10000px; width: 1px; height: 1px; overflow: hidden; }
.card { background: var(--page); border: 1px solid var(--line); border-radius: 16px; padding: 28px; display: grid; gap: 8px; }
.card h1 { font-size: 1.375rem; margin-bottom: 8px; }
.card label { font-size: 0.875rem; font-weight: 600; margin-top: 8px; }
.card input { padding: 11px 12px; border: 1px solid var(--line); border-radius: 12px; background: var(--page); color: var(--ink); }
.card input:focus { border-color: var(--green); outline: none; box-shadow: 0 0 0 3px var(--green-soft); }
.card button { margin-top: 16px; padding: 12px; border: 0; border-radius: 12px; background: var(--green); color: var(--on-green); font-weight: 600; cursor: pointer; }
.card button:hover { filter: brightness(1.12); }
.error { background: var(--error-soft); color: var(--error); border-radius: 12px; padding: 10px 12px; font-size: 0.9375rem; }
.fine { font-size: 0.8125rem; color: var(--muted); text-align: center; }
.small-link { justify-self: center; margin-top: 8px; font-size: 0.875rem; color: var(--green); font-weight: 600; text-decoration: none; }
.small-link:hover { text-decoration: underline; }
.card .muted { font-size: 0.9375rem; }

/* signed-in */
.bar { display: flex; justify-content: space-between; align-items: center; gap: 16px; padding: 16px 24px; border-bottom: 1px solid var(--line); flex-wrap: wrap; }
.who { display: flex; align-items: center; gap: 14px; font-size: 0.9375rem; color: var(--muted); }
.link { background: none; border: 0; padding: 0; color: var(--green); font-weight: 600; cursor: pointer; }
.home { max-width: 880px; margin: 0 auto; padding: 32px 24px 64px; display: grid; gap: 24px; }
.intro h1 { font-size: 1.75rem; display: flex; align-items: center; gap: 12px; flex-wrap: wrap; }
.tag { font-size: 0.75rem; font-weight: 600; background: var(--soft); color: var(--muted); border-radius: 999px; padding: 3px 10px; letter-spacing: 0; }
.totals { display: grid; grid-template-columns: 1fr 1fr; gap: 12px; }
.total { background: var(--soft); border-radius: 16px; padding: 16px 18px; display: grid; }
.total b { font-size: 1.75rem; font-weight: 700; letter-spacing: -0.01em; }
.total span { color: var(--muted); font-size: 0.9375rem; }
.total.year { background: var(--green); color: var(--on-green); }
.total.year span { color: var(--on-green-dim); }
.report-link { display: flex; justify-content: space-between; align-items: center; gap: 16px; padding: 16px 20px; border: 1px solid var(--line); border-radius: 16px; color: var(--ink); text-decoration: none; }
.report-link:hover { border-color: var(--green); background: var(--green-soft); }
.report-link > span:last-child { color: var(--green); font-size: 1.25rem; font-weight: 600; }
.panel { border: 1px solid var(--line); border-radius: 16px; padding: 20px; display: grid; gap: 12px; overflow-x: auto; }
.panel h2 { font-size: 1.0625rem; }
table { width: 100%; border-collapse: collapse; }
td { padding: 10px 0; border-top: 1px solid var(--line); }
td + td { padding-left: 16px; }
.tools { list-style: none; margin: 0; padding: 0; display: grid; }
.tools li { display: flex; justify-content: space-between; gap: 12px; padding: 10px 0; border-top: 1px solid var(--line); flex-wrap: wrap; }
.state { color: var(--muted); font-size: 0.9375rem; }

@media (max-width: 560px) {
  .totals { grid-template-columns: 1fr; }
  .bar, .home { padding-left: 16px; padding-right: 16px; }
}

.sample { font-size: 0.8125rem; color: var(--muted); background: var(--page); border: 1px dashed var(--line); border-radius: 8px; padding: 6px 12px; margin: 0 auto 20px; display: block; max-width: 1080px; }
.page { max-width: 1080px; margin: 0 auto; display: grid; gap: 20px; }
.page-head { display: grid; gap: 4px; }
.page-head h1 { font-size: 2rem; letter-spacing: -0.015em; line-height: 1.15; display: flex; gap: 10px; align-items: center; flex-wrap: wrap; }
.page .panel { background: var(--page); }
.panel h2 { font-size: 1.0625rem; }
.left { text-align: left; }
.back { justify-self: start; margin: 0; }
.notice-ok { background: var(--green-soft); color: var(--green); border-radius: 12px; padding: 10px 12px; }
.outbox-head { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 8px; }
.outbox-head h3 { margin: 0; }
.send-who .paid { color: var(--green); font-weight: 700; }
.send-actions form { display: inline; }
.notice-warn { background: #fdf3d8; color: #6b4e00; border-radius: 12px; padding: 10px 14px; margin-bottom: 14px; }
.notice-warn p { margin: 0; }
.notice-warn ul { margin: 6px 0 0; padding-left: 18px; }
/* customers */
.chips { display: flex; flex-wrap: wrap; gap: 8px; }
.chips a { border: 1px solid var(--line); background: var(--page); border-radius: 999px; padding: 6px 12px; color: var(--ink); text-decoration: none; font-size: 0.9375rem; }
.chips a span { color: var(--muted); margin-left: 4px; }
.chips a[aria-current="true"] { border-color: var(--green); background: var(--green-soft); color: var(--green); font-weight: 600; }
.filters { display: flex; flex-wrap: wrap; gap: 8px; }
.filters input, .filters select { font: inherit; padding: 9px 10px; border: 1px solid var(--line); border-radius: 12px; background: var(--page); color: var(--ink); }
.filters input { flex: 1 1 220px; }
.table-wrap { overflow-x: auto; }
.table-wrap td a { color: var(--ink); font-weight: 600; text-decoration: none; }
.table-wrap td a:hover { color: var(--green); text-decoration: underline; }
.flag { display: inline-block; font-size: 0.75rem; font-weight: 600; border-radius: 999px; padding: 2px 8px; margin: 2px 4px 2px 0; white-space: nowrap; }
.flag-overdue { background: #fbeaea; color: #9b2c2c; }
.flag-underpriced { background: #fdf3e1; color: #8a5a00; }
.flag-losing { background: #f1ebfb; color: #5b3a96; }
.flag-upsell { background: var(--green-soft); color: var(--green); }
.flags-row { display: flex; flex-wrap: wrap; gap: 4px; }
.facts { display: grid; grid-template-columns: repeat(auto-fit, minmax(180px, 1fr)); gap: 12px; }
.fact { background: var(--page); border: 1px solid var(--line); border-radius: 16px; padding: 14px 16px; display: grid; gap: 2px; }
.fact b { font-size: 1.5rem; letter-spacing: -0.01em; }
.fact span { font-size: 0.875rem; }
.two-col { display: grid; grid-template-columns: repeat(auto-fit, minmax(300px, 1fr)); gap: 12px; align-items: start; }
.button-link { justify-self: start; display: inline-flex; align-items: center; justify-content: center; min-height: 44px; background: var(--green); color: var(--on-green); border-radius: 12px; padding: 0 20px; font-weight: 600; text-decoration: none; }

/* approvals */
.draft-head { display: flex; justify-content: space-between; gap: 12px; align-items: baseline; flex-wrap: wrap; }
.status { font-size: 0.75rem; font-weight: 600; border-radius: 999px; padding: 3px 10px; background: #fdf3d8; color: #6b4e00; white-space: nowrap; }
.status-reviewed { background: #e8f0fb; color: #23508f; }
.status-approved { background: var(--green-soft); color: var(--green); }
.status-rejected { background: var(--soft); color: var(--muted); }
.draft details summary { cursor: pointer; color: var(--green); font-weight: 600; font-size: 0.9375rem; }
.draft blockquote { margin: 8px 0 0; padding: 10px 14px; background: var(--soft); border-radius: 12px; font-size: 0.9375rem; }
.decide { display: flex; gap: 8px; flex-wrap: wrap; align-items: center; }
.decide .secondary { background: var(--page); color: var(--green); border: 1px solid var(--green); }

/* settings */
.kv { display: grid; grid-template-columns: max-content minmax(0, 1fr); gap: 8px 20px; margin: 0; }
.kv dt { color: var(--muted); }
.kv dd { margin: 0; overflow-wrap: anywhere; }
.signout-row { display: flex; justify-content: flex-end; }
.signout-row button { padding: 10px 18px; border-radius: 12px; border: 1px solid var(--green); background: var(--page); color: var(--green); font-weight: 600; cursor: pointer; }

/* report shown inside the app */
.report-in-app .home { padding: 0; margin: 0 auto; max-width: 1080px; }
/* help */
.help .panel ul { margin: 0; padding-left: 20px; display: grid; gap: 6px; }
.help .panel p + ul, .help .panel ul + p { margin-top: 2px; }

/* Spreadsheet uploads */
.upload-card, .columns-form { grid-template-columns: minmax(0, 1fr); }
.upload-form, .inline-form { display: flex; flex-wrap: wrap; gap: 10px; align-items: center; }
.upload-form input[type="file"] { flex: 1 1 200px; min-width: 0; max-width: 100%; }
.upload-form button, .stack-form button, .columns-form > button, .inline-form button:not(.link) { justify-self: start; padding: 10px 18px; border: 0; border-radius: 12px; background: var(--green); color: var(--on-green); font-weight: 600; cursor: pointer; }
.upload-form button.secondary, .inline-form button.secondary { background: var(--page); color: var(--green); border: 1px solid var(--green); }
.stack-form { display: grid; gap: 8px; max-width: 420px; }
.stack-form input:not([type="radio"]), .stack-form select, .column-row select { font: inherit; padding: 9px 10px; border: 1px solid var(--line); border-radius: 12px; background: var(--page); color: var(--ink); min-width: 0; }
.stack-form .check { display: flex; gap: 8px; align-items: center; }
.columns-form { gap: 4px; }
.column-row { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); gap: 12px; align-items: center; padding: 10px 0; border-bottom: 1px solid var(--line); }
.column-row label { display: grid; gap: 2px; }
.column-row label .muted { font-size: 0.8125rem; }
.column-row label .tag { justify-self: start; }
td code { white-space: nowrap; overflow-wrap: normal; }
.columns-form > button { margin-top: 12px; }
.error p { margin: 0 0 4px; }
.problems { margin: 8px 0; padding-left: 20px; font-size: 0.9375rem; }
.danger { border-color: var(--error-soft); }
.stack-form .danger-button { background: var(--error); color: #fff; }
code { font-size: 0.875em; background: var(--soft); border-radius: 4px; padding: 1px 5px; overflow-wrap: anywhere; }
@media (max-width: 640px) { .column-row { grid-template-columns: 1fr; gap: 6px; } }

/* To approve: the example and the send list */
.example { display: grid; gap: 4px; }
.example-label { font-size: 0.8125rem; font-weight: 600; color: var(--muted); }
.draft .example blockquote { margin: 4px 0 0; }
.outbox summary { cursor: pointer; color: var(--green); font-weight: 600; }
.send-list { list-style: none; margin: 10px 0; padding: 0; display: grid; }
.send-list li { display: flex; justify-content: space-between; align-items: center; gap: 8px 16px; flex-wrap: wrap; padding: 10px 0; border-top: 1px solid var(--line); }
.send-who { display: grid; min-width: 0; }
.send-who .muted { font-size: 0.875rem; overflow-wrap: anywhere; }
.send-actions { display: flex; gap: 8px; flex-wrap: wrap; }
.small { padding: 7px 14px; font-size: 0.875rem; }
button.small { border-radius: 12px; font-weight: 600; cursor: pointer; }
button.secondary.small { background: var(--page); color: var(--green); border: 1px solid var(--green); }
.empty { gap: 6px; }
.empty a { color: var(--green); font-weight: 600; }
.button-row { display: flex; flex-wrap: wrap; gap: 10px; }
.button-row button, .panel > form > button { padding: 10px 18px; border: 0; border-radius: 12px; background: var(--green); color: var(--on-green); font-weight: 600; cursor: pointer; justify-self: start; }
.button-row button.secondary { background: var(--page); color: var(--green); border: 1px solid var(--green); }
.report-in-app .total:not(.year) { background: var(--page); border: 1px solid var(--line); }

/* ---------- signed-in layout (Option C): icon rail | the page | Core beside you ---------- */
body.app { background: var(--soft); }
.visually-hidden { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }
.icon { flex: none; }
.shell { display: grid; grid-template-columns: 76px minmax(0, 1fr) 360px; min-height: 100vh; }

.rail { position: sticky; top: 0; height: 100vh; display: flex; flex-direction: column; align-items: center; gap: 6px; padding: 20px 0; background: var(--page); border-right: 1px solid var(--line); }
.rail-logo { display: flex; padding: 6px 10px 18px; }
.rail .dots, .logo .dots { display: inline-flex; gap: 3px; }
.rail .dots i { width: 6px; height: 6px; border-radius: 50%; background: var(--green); }
.rail .dots i:nth-child(1) { opacity: 0.35; } .rail .dots i:nth-child(2) { opacity: 0.65; }
.rail > a:not(.rail-logo) { position: relative; width: 62px; padding: 8px 0; border-radius: 12px; display: flex; flex-direction: column; align-items: center; gap: 3px; color: var(--muted); font-size: 0.6875rem; font-weight: 600; text-decoration: none; }
.rail > a .icon { width: 20px; height: 20px; }
.rail > a:hover { background: var(--soft); color: var(--ink); }
.rail > a[aria-current="page"] { background: var(--green-soft); color: var(--green); font-weight: 800; }
.rail .count { position: absolute; top: 2px; right: 10px; background: var(--green); color: var(--on-green); border-radius: 999px; font-size: 0.625rem; font-weight: 700; padding: 0 5px; line-height: 1.6; }
.rail > a.rail-ask { display: none; }
.account { margin-top: auto; position: relative; }
.account summary { list-style: none; cursor: pointer; display: grid; place-items: center; width: 44px; height: 44px; }
.account summary::-webkit-details-marker { display: none; }
.avatar { width: 34px; height: 34px; border-radius: 50%; background: var(--green-soft); color: var(--green); display: grid; place-items: center; font-size: 0.8125rem; font-weight: 800; }
.account-menu { position: absolute; left: calc(100% + 12px); bottom: 0; z-index: 20; width: 260px; background: var(--page); border: 1px solid var(--line); border-radius: 16px; padding: 8px; display: grid; gap: 2px; box-shadow: 0 12px 32px rgba(20, 32, 27, 0.12); }
.account-menu a { display: flex; align-items: center; gap: 10px; padding: 9px 10px; border-radius: 10px; color: var(--ink); text-decoration: none; }
.account-menu a:hover, .account-menu a[aria-current="page"] { background: var(--soft); }
.account-menu .me { display: grid; padding: 8px 10px 10px; margin-bottom: 4px; border-bottom: 1px solid var(--line); font-size: 0.875rem; overflow-wrap: anywhere; }
.me-name { font-weight: 700; }
.account-menu form { padding: 6px 10px; border-top: 1px solid var(--line); margin-top: 4px; }
.version { padding: 0 10px 6px; font-size: 0.75rem; color: var(--muted); }

.main { min-width: 0; padding: 40px clamp(16px, 3.5vw, 52px) 72px; }
.phone-bar { display: none; }
.page { max-width: 1040px; margin: 0 auto; display: grid; gap: 24px; }
.page-head { display: grid; gap: 6px; }
.page-head h1 { font-size: 2.25rem; font-weight: 800; letter-spacing: -0.025em; line-height: 1.1; display: flex; gap: 10px; align-items: center; flex-wrap: wrap; }
.eyebrow { color: var(--muted); font-weight: 600; }
.page .panel { background: var(--page); border-radius: 20px; }

/* Core's panel */
.core-panel { position: sticky; top: 0; height: 100vh; display: flex; flex-direction: column; background: var(--page); border-left: 1px solid var(--line); }
.core-head { display: flex; align-items: center; gap: 10px; padding: 20px 22px; border-bottom: 1px solid var(--line); }
.core-head b { font-size: 1rem; font-weight: 800; }
.core-mark { width: 32px; height: 32px; border-radius: 10px; background: var(--green); display: grid; place-items: center; flex: none; }
.core-mark i { width: 10px; height: 10px; border-radius: 50%; background: var(--lime); }
.core-who { margin-left: auto; font-size: 0.8125rem; color: var(--muted); text-align: right; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.core-body { flex: 1; overflow-y: auto; padding: 22px; display: flex; flex-direction: column; gap: 14px; }
.bubble-core { padding: 14px 16px; background: var(--soft); border-radius: 16px 16px 16px 4px; line-height: 1.6; }
.core-chips { display: grid; gap: 8px; margin-top: 4px; }
.core-chips button { text-align: left; min-height: 44px; padding: 0 14px; border-radius: 12px; border: 1px solid var(--line); background: var(--page); color: var(--ink); font-weight: 600; cursor: pointer; }
.core-chips button:hover { border-color: var(--green); background: var(--green-soft); }
.core-panel .error { margin: 0 16px; }
.ask { margin: 12px 16px 6px; display: flex; gap: 8px; align-items: flex-end; border: 1px solid var(--line-strong); border-radius: 16px; padding: 6px 6px 6px 14px; background: var(--page); }
.ask:focus-within { border-color: var(--green); box-shadow: 0 0 0 3px var(--green-soft); }
.ask textarea { flex: 1; min-width: 0; border: 0; outline: none; resize: none; padding: 10px 0; min-height: 44px; max-height: 160px; font: inherit; background: transparent; color: var(--ink); }
.ask button { flex: none; width: 44px; height: 44px; border: 0; border-radius: 12px; background: var(--lime); color: var(--green); display: grid; place-items: center; cursor: pointer; }
.ask button.busy { width: auto; padding: 0 14px; font-weight: 700; }
.ask button:disabled { opacity: 0.6; cursor: progress; }
.core-fine { font-size: 0.75rem; color: var(--muted); padding: 0 18px 14px; }
.core-body .core-fine { padding: 0; }
.thread-head { display: flex; justify-content: space-between; align-items: baseline; gap: 12px; }
.messages { list-style: none; margin: 0; padding: 0; display: grid; gap: 12px; }
.msg { display: grid; gap: 6px; }
.msg.user { justify-items: end; }
.bubble { padding: 12px 14px; border-radius: 16px; max-width: 94%; overflow-wrap: anywhere; line-height: 1.55; }
.msg.user .bubble { background: var(--green); color: var(--on-green); white-space: pre-wrap; border-radius: 16px 16px 4px 16px; }
.msg.assistant .bubble { background: var(--soft); border-radius: 16px 16px 16px 4px; }
.bubble p + p, .bubble p + ul, .bubble ul + p { margin-top: 8px; }
.bubble ul, .bubble ol { margin: 6px 0 0; padding-left: 20px; }
.bubble blockquote { margin: 8px 0; padding: 10px 14px; background: var(--page); border-left: 3px solid var(--green); border-radius: 6px; }
.draft-chip { justify-self: start; font-size: 0.875rem; color: var(--green); font-weight: 700; background: var(--green-soft); border-radius: 999px; padding: 4px 12px; text-decoration: none; }
.recent { display: grid; gap: 6px; margin-top: 6px; }
.recent-label { font-size: 0.8125rem; font-weight: 700; color: var(--muted); }
.recent ul { list-style: none; margin: 0; padding: 0; display: grid; gap: 4px; }
.recent a { color: var(--ink); text-decoration: none; font-size: 0.9375rem; }
.recent a:hover { color: var(--green); text-decoration: underline; }
.text-link { color: var(--green); font-weight: 700; text-decoration: none; font-size: 0.9375rem; }
.text-link:hover { text-decoration: underline; }

/* buttons */
.btn, .button-link { display: inline-flex; align-items: center; justify-content: center; min-height: 44px; padding: 0 20px; border: 0; border-radius: 12px; background: var(--green); color: var(--on-green); font-weight: 700; text-decoration: none; white-space: nowrap; cursor: pointer; }
.btn:hover, .button-link:hover { filter: brightness(1.12); }
.button-link { justify-self: start; }

/* Home */
.totals-strip { display: flex; flex-wrap: wrap; background: var(--page); border: 1px solid var(--line); border-radius: 20px; overflow: hidden; }
.totals-strip > div { flex: 1 1 200px; padding: 22px 24px; display: flex; flex-direction: column; gap: 2px; }
.totals-strip > div + div { border-left: 1px solid var(--line); }
.totals-strip span { font-size: 0.8125rem; font-weight: 700; color: var(--muted); }
.totals-strip b { font-size: 2.125rem; font-weight: 800; letter-spacing: -0.02em; line-height: 1.2; font-variant-numeric: tabular-nums; }
.totals-strip b.green { color: var(--green); }
.totals-strip small { color: var(--muted); font-size: 0.875rem; }
.moves { display: grid; gap: 12px; }
.moves h2 { font-size: 1.0625rem; font-weight: 800; }
.moves ol { list-style: none; margin: 0; padding: 0; display: grid; gap: 12px; }
.move { display: flex; flex-wrap: wrap; align-items: center; gap: 14px 20px; background: var(--page); border: 1px solid var(--line); border-radius: 20px; padding: 20px 22px; }
.move-n { width: 28px; height: 28px; border-radius: 8px; background: var(--green-soft); color: var(--green); font-weight: 800; font-size: 0.875rem; display: grid; place-items: center; flex: none; }
.move-body { flex: 999 1 260px; display: grid; gap: 0; }
.move-body h3 { margin: 0; font-size: 1.125rem; font-weight: 700; }
.move-amount { color: var(--muted); font-size: 0.8125rem; font-weight: 600; white-space: nowrap; }
.move-amount b { color: var(--ink); font-size: 1.25rem; font-weight: 800; font-variant-numeric: tabular-nums; }

/* To approve */
.approve-split { display: grid; grid-template-columns: minmax(220px, 280px) minmax(0, 1fr); gap: 20px; align-items: start; }
.draft-list { display: grid; gap: 10px; }
.draft-list a { display: grid; gap: 2px; background: var(--page); border: 1px solid var(--line); border-radius: 16px; padding: 16px 18px; color: var(--ink); text-decoration: none; }
.draft-list a:hover { border-color: var(--line-strong); }
.draft-list a[aria-current="true"] { border: 2px solid var(--green); padding: 15px 17px; }
.draft-list .muted { font-size: 0.875rem; }
.draft-list .status { justify-self: start; margin-top: 6px; }
.status { font-size: 0.75rem; font-weight: 700; border-radius: 999px; padding: 2px 10px; white-space: nowrap; background: var(--green-soft); color: var(--green); }
.status-reviewed { background: #e8f0fb; color: #23508f; }
.status-approved { background: var(--green); color: var(--on-green); }
.status-rejected { background: var(--soft); color: var(--muted); }
.draft { padding: 26px 28px; gap: 18px; }
.draft-head { display: flex; justify-content: space-between; gap: 12px; align-items: flex-start; flex-wrap: wrap; }
.draft-head > div { display: grid; gap: 4px; max-width: 560px; }
.draft-head h2 { font-size: 1.5rem; font-weight: 800; letter-spacing: -0.015em; }
.draft-amount { font-size: 1.875rem; font-weight: 800; letter-spacing: -0.02em; color: var(--green); font-variant-numeric: tabular-nums; }
.draft-by { font-size: 0.8125rem; margin-top: -10px; }
.example { display: grid; gap: 8px; }
.example-label { font-size: 0.8125rem; font-weight: 700; color: var(--muted); }
.draft blockquote { margin: 0; padding: 18px 20px; background: var(--soft); border-radius: 14px; line-height: 1.65; color: #24352d; }
.who-list { list-style: none; margin: 0; padding: 0; border: 1px solid var(--line); border-radius: 14px; overflow: hidden; }
.who-list li { display: flex; justify-content: space-between; gap: 12px; padding: 10px 16px; }
.who-list li + li { border-top: 1px solid #eef2f0; }
.who-list b { font-variant-numeric: tabular-nums; }
.who-more summary { cursor: pointer; color: var(--green); font-weight: 700; padding: 4px 0; }
.who-more .who-list { margin-top: 8px; }
.decide { display: flex; gap: 10px; flex-wrap: wrap; align-items: center; padding-top: 16px; border-top: 1px solid #eef2f0; }
.decide button, .panel > form.decide > button, .filters button { min-height: 48px; padding: 0 22px; border: 0; border-radius: 12px; background: var(--green); color: var(--on-green); font-weight: 700; cursor: pointer; }
.decide .secondary, .panel > form.decide > button.secondary { background: var(--page); color: var(--ink); border: 1px solid var(--line-strong); }
.decide .quiet, .panel > form.decide > button.quiet { background: transparent; color: var(--muted); font-weight: 600; padding: 0 12px; }
.core-says { padding: 12px 14px; border-radius: 12px; background: var(--green-soft); color: var(--green); font-size: 0.9375rem; }
.outbox h3 { margin: 0; font-size: 1rem; }

/* Money found inside the app */
.report-in-app { --font: "Manrope", -apple-system, "Segoe UI", Helvetica, Arial, sans-serif; font-family: var(--font); }
.report-in-app .home { padding: 0; margin: 0 auto; max-width: 1040px; }

/* Narrower screens: Core moves under the page instead of beside it */
@media (max-width: 1180px) {
  .shell { grid-template-columns: 76px minmax(0, 1fr); }
  .core-panel { grid-column: 2; position: static; height: auto; border-left: 0; border-top: 1px solid var(--line); }
  .core-body { overflow: visible; }
}

/* Phones: the rail becomes tabs along the bottom, and Core shows on Home only */
@media (max-width: 760px) {
  .shell { display: block; }
  .rail { position: fixed; top: auto; bottom: 0; left: 0; right: 0; z-index: 10; height: auto; flex-direction: row; justify-content: space-around; gap: 0; padding: 6px 4px calc(10px + env(safe-area-inset-bottom)); border-right: 0; border-top: 1px solid var(--line); }
  .rail > a.rail-logo, .rail > a.rail-invoices, .account { display: none; }
  .rail > a.rail-ask { display: flex; color: var(--green); font-weight: 800; }
  .rail > a:not(.rail-logo) { width: auto; min-width: 60px; }
  .rail > a[aria-current="page"] { background: none; }
  .rail .count { top: 0; right: 12px; }
  .phone-bar { display: flex; align-items: center; justify-content: space-between; margin: -24px -16px 20px; padding: 14px 16px; background: var(--page); border-bottom: 1px solid var(--line); }
  .phone-bar .logo { color: var(--ink); text-decoration: none; font-weight: 800; }
  .phone-bar .dots i { width: 6px; height: 6px; border-radius: 50%; background: var(--green); }
  .main { padding: 24px 16px 110px; }
  .page-head h1 { font-size: 1.75rem; }
  .core-panel { display: none; }
  .on-home .core-panel { display: flex; margin-bottom: 90px; }
  .totals-strip > div { flex: 1 1 140px; padding: 16px; }
  .totals-strip > div.tile-approve { display: none; }
  .totals-strip b { font-size: 1.625rem; }
  .move { padding: 16px; gap: 10px 14px; }
  .move-n { display: none; }
  .move form, .move .btn { width: 100%; }
  .move form .btn { width: 100%; }
  .approve-split { grid-template-columns: minmax(0, 1fr); }
  .draft { padding: 20px 18px; }
  .decide button { flex: 1 1 auto; }
}

/* Settings: the business's own numbers */
.business-settings { gap: 14px; }
.readiness { list-style: none; margin: 0; padding: 0; display: grid; gap: 6px; }
.readiness li { padding: 10px 14px; border-radius: 12px; font-size: 0.9375rem; }
.readiness li.ok { background: var(--green-soft); color: var(--green); }
.readiness li.todo { background: #fdf3d8; color: #6b4e00; }
.settings-form { display: grid; gap: 6px; max-width: 620px; }
.settings-form label, .settings-form legend { font-weight: 700; margin-top: 12px; }
.settings-form fieldset { border: 0; padding: 0; margin: 0; display: grid; gap: 6px; }
.settings-form .hint { color: var(--muted); font-size: 0.875rem; }
.settings-form input { font: inherit; padding: 11px 12px; border: 1px solid var(--line-strong); border-radius: 12px; background: var(--page); color: var(--ink); min-width: 0; width: 100%; }
.settings-form input:focus { outline: none; border-color: var(--green); box-shadow: 0 0 0 3px var(--green-soft); }
.two-inputs { display: grid; grid-template-columns: 1fr 1fr; gap: 12px; }
.two-inputs > div { display: grid; gap: 6px; }
.two-inputs label { margin-top: 0; font-weight: 600; font-size: 0.875rem; }
.settings-form .decide { margin-top: 12px; }
@media (max-width: 560px) { .two-inputs { grid-template-columns: 1fr; } }
.btn-quiet { background: var(--page); color: var(--green); border: 1px solid var(--line-strong); }
.core-says.needs { background: #fdf3d8; color: #6b4e00; }
.core-says.needs a { color: inherit; font-weight: 700; }

/* Where a finding's numbers come from, and the owner's verdict on it */
.move-meta { display: flex; flex-wrap: wrap; align-items: center; gap: 8px 14px; margin-top: 8px; }
.draft-meta { margin: 4px 0 14px; }
.basis summary { display: inline-flex; align-items: center; gap: 6px; cursor: pointer; list-style: none; font-size: 0.75rem; font-weight: 700; padding: 3px 10px; border-radius: 999px; }
.basis summary::-webkit-details-marker { display: none; }
.basis summary::after { content: "?"; display: inline-grid; place-items: center; width: 14px; height: 14px; border-radius: 50%; border: 1px solid currentColor; font-size: 0.625rem; }
.basis[open] summary::after { content: "×"; }
.basis p { margin: 8px 0 0; font-size: 0.8125rem; color: var(--muted); max-width: 560px; }
.basis-observed summary { background: var(--green-soft); color: var(--green); }
.basis-estimate summary { background: #fff4dc; color: #8a5a00; }
.basis-guess summary { background: #f1eef9; color: #5b4a8b; }
.rate { display: inline-flex; flex-wrap: wrap; align-items: center; gap: 6px; margin: 0; }
.rate-q { font-size: 0.75rem; color: var(--muted); font-weight: 600; }
.rate .rate-btn { font: inherit; font-size: 0.75rem; font-weight: 600; padding: 3px 10px; border-radius: 999px; border: 1px solid var(--line); background: var(--page); color: var(--ink); cursor: pointer; min-height: 0; }
.rate .rate-btn:hover { border-color: var(--green); }
.rate .rate-btn.on { background: var(--green); border-color: var(--green); color: #fff; }
.totals-strip small.compare { margin-top: 6px; font-size: 0.75rem; line-height: 1.35; }

/* Getting started (app/onboarding.py) */
.start-banner { display: flex; justify-content: space-between; align-items: center; gap: 12px; padding: 12px 18px; border: 1px solid var(--line); border-radius: 14px; background: var(--green-soft); color: var(--ink); text-decoration: none; }
.start-banner:hover { border-color: var(--green); }
.start-banner > span:last-child { color: var(--green); font-weight: 700; }
.start-summary { display: flex; flex-wrap: wrap; border: 1px solid var(--line); border-radius: 20px; overflow: hidden; }
.start-summary > div { flex: 1 1 180px; padding: 18px 22px; display: flex; flex-direction: column; gap: 2px; }
.start-summary > div + div { border-left: 1px solid var(--line); }
.start-summary span, .start-summary small { color: var(--muted); font-size: 0.8125rem; }
.start-summary b { font-size: 1.125rem; }
.start-steps { list-style: none; padding: 0; margin: 0; display: grid; gap: 12px; }
.start-step { display: grid; grid-template-columns: 32px 1fr; gap: 14px; padding: 18px 20px; border: 1px solid var(--line); border-radius: 16px; }
.start-step.is-next { border-color: var(--green); box-shadow: 0 0 0 3px var(--green-soft); }
.start-step.is-done, .start-step.is-skip { background: var(--soft); }
.start-n { width: 32px; height: 32px; border-radius: 50%; display: grid; place-items: center; font-weight: 700; background: var(--soft); color: var(--muted); }
.is-next .start-n { background: var(--green); color: var(--on-green); }
.is-done .start-n { background: var(--green-soft); color: var(--green); }
.start-body { display: grid; gap: 8px; min-width: 0; }
.start-body h2 { font-size: 1.0625rem; display: flex; flex-wrap: wrap; align-items: center; gap: 8px; }
.start-body p { margin: 0; }
.start-who { display: grid; grid-template-columns: 90px 1fr; gap: 4px 12px; margin: 0; font-size: 0.9375rem; }
.start-who dt { color: var(--muted); font-weight: 600; }
.start-who dd { margin: 0; }
.start-stuck { padding: 8px 12px; border-radius: 10px; background: #fdf3e1; color: #7a4b00; }
.start-seen { font-size: 0.875rem; color: var(--green); }
.status-todo { background: var(--soft); color: var(--muted); }
.status-done { background: var(--green-soft); color: var(--green); }
.status-stuck { background: #fdf3e1; color: #7a4b00; }
.status-skip { background: var(--soft); color: var(--muted); }
.start-staff { border-top: 1px dashed var(--line-strong); padding-top: 8px; }
.start-staff summary { cursor: pointer; font-size: 0.875rem; font-weight: 600; color: var(--green); }
.start-form { display: grid; grid-template-columns: repeat(auto-fit, minmax(180px, 1fr)); gap: 10px 14px; margin-top: 10px; align-items: end; }
.start-form label { display: grid; gap: 4px; font-size: 0.8125rem; color: var(--muted); font-weight: 600; }
.start-form .wide { grid-column: 1 / -1; }
.start-form input, .start-form select, .start-form textarea { font: inherit; color: var(--ink); padding: 8px 10px; border: 1px solid var(--line); border-radius: 10px; background: var(--page); }
.start-form button { justify-self: start; }
@media (max-width: 600px) {
  .start-summary > div + div { border-left: 0; border-top: 1px solid var(--line); }
  .start-who { grid-template-columns: 1fr; }
  .start-who dd { margin-bottom: 6px; }
}
.start-body a { color: var(--green); font-weight: 600; }
