/* REVENUE READY30. Flat design: thin borders, tints, and whitespace. No drop shadows. */
:root {
  --ink: #14161B;
  --ink-2: #2B2E36;
  --paper: #FAF7F1;
  --surface: #FFFFFF;
  --line: #E4DDD0;
  --line-2: #D3CABA;
  --muted: #6E6A62;
  --green: #0E5E46;
  --green-2: #0A4A37;
  --green-tint: #E5F0EA;
  --gold: #D4A22E;
  --gold-tint: #FBF3DD;
  --red: #B3261E;
  --red-tint: #FBE9E7;
  --sans: 'Montserrat', 'Helvetica Neue', Arial, sans-serif;
  --serif: 'Playfair Display', Georgia, 'Times New Roman', serif;
  --radius: 10px;
}
* { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; }
body { margin: 0; background: var(--paper); color: var(--ink); font-family: var(--sans); font-size: 16px; line-height: 1.6; }
a { color: var(--green); }
img { max-width: 100%; }
h1, h2, h3 { line-height: 1.2; margin: 0 0 .5em; }
p { margin: 0 0 1em; }
.visually-hidden { position: absolute !important; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); }

/* Brand. */
.brandmark { display: inline-flex; flex-direction: column; line-height: 1.05; text-decoration: none; }
.bm-word { font-weight: 900; font-size: 20px; letter-spacing: -.01em; color: var(--ink); }
.bm-num { color: var(--gold); margin-left: 1px; }
.bm-tag { font-family: var(--serif); font-style: italic; font-size: 12px; color: var(--muted); margin-top: 3px; }
.topbar-agency .bm-word, .topbar-agency .bm-tag { color: #fff; }
.topbar-agency .bm-tag { color: #C9C3B6; }

/* Shell. */
.topbar { display: flex; align-items: center; justify-content: space-between; gap: 16px; padding: 14px 24px; background: var(--surface); border-bottom: 1px solid var(--line); position: sticky; top: 0; z-index: 10; flex-wrap: wrap; }
.topbar-agency { background: var(--ink); border-bottom-color: var(--ink); }
.topbar-brand { text-decoration: none; }
.topnav { display: flex; gap: 4px; align-items: center; flex-wrap: wrap; }
.topnav a, .linkish { font-family: var(--sans); font-size: 14px; font-weight: 600; color: var(--ink-2); text-decoration: none; padding: 8px 12px; border-radius: 8px; background: none; border: 0; cursor: pointer; }
.topnav a.on { background: var(--green-tint); color: var(--green-2); }
.topbar-agency .topnav a, .topbar-agency .linkish { color: #E9E4DA; }
.topbar-agency .topnav a.on { background: #2B2E36; color: #fff; }
.main { min-height: calc(100vh - 140px); }
.footer { padding: 28px 24px; font-family: var(--serif); font-style: italic; font-size: 13px; color: var(--muted); text-align: center; }

.page { max-width: 980px; margin: 0 auto; padding: 40px 24px 64px; }
.page.narrow { max-width: 760px; }
.page.wide { max-width: 1200px; }
.page-head { display: flex; justify-content: space-between; align-items: flex-end; gap: 16px; flex-wrap: wrap; margin-bottom: 20px; }
.eyebrow { font-size: 12px; font-weight: 700; letter-spacing: .12em; text-transform: uppercase; color: var(--green); margin-bottom: 8px; }
.display { font-size: clamp(28px, 4.4vw, 42px); font-weight: 900; letter-spacing: -.02em; }
.lede { font-size: 18px; color: var(--ink-2); max-width: 62ch; }
.meta { color: var(--muted); font-size: 14px; }
.sub { color: var(--muted); font-size: 13px; }
.fine { color: var(--muted); font-size: 13px; margin: 16px 0 0; }
.serif-note { font-family: var(--serif); font-style: italic; font-size: 18px; color: var(--ink-2); border-left: 3px solid var(--gold); padding-left: 14px; }
.section-title { font-family: var(--serif); font-weight: 700; font-size: 22px; margin: 28px 0 14px; color: var(--ink); }
.back { display: inline-block; font-size: 14px; font-weight: 600; margin-bottom: 16px; text-decoration: none; }

/* Buttons and forms. */
.btn { display: inline-flex; align-items: center; justify-content: center; gap: 8px; font-family: var(--sans); font-weight: 700; font-size: 15px; padding: 12px 20px; border-radius: 999px; border: 1px solid transparent; cursor: pointer; text-decoration: none; line-height: 1.2; }
.btn:disabled { opacity: .55; cursor: wait; }
.btn-primary { background: var(--green); color: #fff; }
.btn-primary:hover { background: var(--green-2); }
.btn-ghost { background: var(--surface); color: var(--ink); border-color: var(--line-2); }
.btn-ghost:hover { border-color: var(--ink); }
.btn-sm { font-size: 13px; padding: 8px 14px; }
.btn-block { width: 100%; }
.btn-row { display: flex; gap: 8px; flex-wrap: wrap; align-items: center; margin: 10px 0; }
label { display: block; font-size: 14px; font-weight: 600; margin: 14px 0 6px; }
input[type=text], input[type=email], input[type=password], input[type=date], select, textarea {
  width: 100%; font-family: var(--sans); font-size: 16px; color: var(--ink); background: var(--surface);
  border: 1px solid var(--line-2); border-radius: 8px; padding: 11px 12px; }
textarea { resize: vertical; line-height: 1.5; }
input:focus, select:focus, textarea:focus, .btn:focus-visible, .chip:focus-visible { outline: 2px solid var(--gold); outline-offset: 1px; }
.form-error { color: var(--red); font-size: 14px; font-weight: 600; min-height: 1em; margin: 10px 0; }
.card { background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius); padding: 22px; margin: 16px 0; }
.notice { background: var(--gold-tint); border: 1px solid #EBD9A6; border-radius: var(--radius); padding: 12px 16px; margin: 16px 0; font-weight: 600; font-size: 15px; }
.notice-ok { background: var(--green-tint); border-color: #B9D8C7; font-weight: 600; }
.linkish-inline { padding: 0; font-size: 13px; color: var(--green); text-decoration: underline; }
.notice-alert { background: var(--red-tint); border-color: #F1C7C2; }
.empty { border: 1px dashed var(--line-2); border-radius: var(--radius); padding: 40px; text-align: center; }

/* Sign in. */
.signin-wrap { min-height: 100vh; display: flex; flex-direction: column; align-items: center; justify-content: center; padding: 32px 18px; gap: 24px; }
.signin-mark .bm-word { font-size: 30px; }
.signin-mark .bm-tag { font-size: 15px; text-align: center; }
.signin-mark .brandmark { align-items: center; }
.signin-card { width: 100%; max-width: 440px; padding: 32px; }
.signin-card .display { font-size: 28px; }
.signin-card .lede { font-size: 16px; }
.signin-card .btn-block { margin-top: 10px; }

/* Dashboard stages. */
.stages { list-style: none; padding: 0; margin: 28px 0 0; display: grid; gap: 12px; }
.stage { display: grid; grid-template-columns: 44px 1fr; gap: 16px; background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius); padding: 20px; }
.stage-num { width: 44px; height: 44px; border-radius: 50%; display: grid; place-items: center; font-weight: 800; border: 1px solid var(--line-2); color: var(--muted); }
.stage h3 { font-size: 18px; margin-bottom: 4px; }
.stage p { margin-bottom: 8px; color: var(--ink-2); }
.stage-state { font-size: 13px; font-weight: 700; text-transform: uppercase; letter-spacing: .08em; color: var(--muted) !important; }
.stage-done .stage-num { background: var(--green); border-color: var(--green); color: #fff; }
.stage-ready, .stage-todo { border-color: var(--green); }
.stage-ready .stage-num, .stage-todo .stage-num { background: var(--green-tint); border-color: var(--green); color: var(--green-2); }
.stage-ready .stage-state, .stage-todo .stage-state { color: var(--green) !important; }
.stage-working .stage-num { background: var(--gold-tint); border-color: var(--gold); color: #8A6512; }
.stage-later { opacity: .7; }

/* Onboarding wizard. */
.progress { height: 6px; background: var(--line); border-radius: 99px; overflow: hidden; margin: 6px 0 8px; }
.progress-bar { height: 100%; background: var(--gold); transition: width .3s; }
.intro p { font-size: 18px; color: var(--ink-2); }
.q { background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius); padding: 20px; margin: 14px 0; }
.q-label { font-weight: 700; font-size: 17px; margin-bottom: 6px; }
.q-num { color: var(--green); font-weight: 800; }
.req { display: inline-block; margin-left: 8px; font-size: 11px; font-weight: 700; letter-spacing: .06em; text-transform: uppercase; color: var(--red); vertical-align: middle; }
.q-help { color: var(--muted); font-size: 14px; font-weight: 500; margin: 0 0 10px; }
.q-note { font-family: var(--serif); font-style: italic; margin: 12px 0 0; }
.q-examples { font-size: 14px; color: var(--ink-2); margin-top: 10px; }
.q-examples p { margin: 0 0 4px; font-weight: 600; }
.q-examples ul { margin: 0; padding-left: 20px; }
.q-sub { margin-top: 12px; }
.choices { display: grid; grid-template-columns: repeat(auto-fill, minmax(230px, 1fr)); gap: 6px; }
.choice { display: flex; align-items: flex-start; gap: 10px; font-weight: 500; font-size: 15px; margin: 0; padding: 9px 12px; border: 1px solid var(--line); border-radius: 8px; cursor: pointer; background: var(--paper); }
.choice:has(input:checked) { border-color: var(--green); background: var(--green-tint); }
.choice input { margin-top: 4px; accent-color: var(--green); flex: none; }
.inline-field { display: grid; grid-template-columns: 110px 1fr; gap: 10px; align-items: center; margin: 6px 0; }
.inline-field label { margin: 0; }
.list-fields { display: grid; gap: 6px; }
.upload .btn { margin-bottom: 8px; }
.file-list { margin: 6px 0 10px; padding-left: 20px; font-size: 14px; }
.statement { font-family: var(--serif); font-style: italic; font-size: 18px; margin: 8px 0 14px; padding: 14px 18px; background: var(--paper); border-left: 3px solid var(--gold); }
.wizard-nav { display: flex; justify-content: space-between; align-items: center; gap: 12px; margin-top: 24px; position: sticky; bottom: 0; background: var(--paper); padding: 14px 0; border-top: 1px solid var(--line); }
.save-status { font-size: 13px; color: var(--muted); }
.missing a { font-weight: 600; }
.readonly .ro { border-bottom: 1px solid var(--line); padding: 12px 0; }
.ro-answer { white-space: pre-wrap; color: var(--ink-2); margin: 0; }

/* Profile. */
.profile-section { background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius); padding: 22px 24px; margin: 14px 0; break-inside: avoid; }
.profile-section h2 { font-family: var(--serif); font-size: 22px; display: flex; align-items: baseline; gap: 12px; }
.ps-num { font-family: var(--sans); font-weight: 900; font-size: 14px; color: var(--gold); }
.rich ul { padding-left: 20px; margin: 0 0 1em; }
.rich li { margin-bottom: 4px; }

/* Content review. */
.chips { display: flex; gap: 6px; flex-wrap: wrap; margin: 20px 0; }
.chip { font-family: var(--sans); font-weight: 600; font-size: 13px; padding: 7px 14px; border-radius: 99px; border: 1px solid var(--line-2); background: var(--surface); cursor: pointer; }
.chip-on { background: var(--ink); border-color: var(--ink); color: #fff; }
.post-list { display: grid; gap: 14px; }
.post-card { background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius); padding: 20px 22px; }
.post-head { display: flex; justify-content: space-between; align-items: center; gap: 10px; flex-wrap: wrap; }
.day { font-weight: 900; font-size: 18px; margin-right: 10px; }
.day-date { color: var(--muted); font-size: 14px; }
.fn-job { font-family: var(--serif); font-style: italic; color: var(--muted); margin: 4px 0 12px; }
.field { margin: 10px 0; }
.field-label { font-size: 11px; font-weight: 800; letter-spacing: .1em; text-transform: uppercase; color: var(--muted); margin: 0 0 3px; }
.field p:last-child { margin-bottom: 0; }
.hook { font-weight: 700; font-size: 18px; }
.caption { white-space: pre-wrap; }
.brief summary { cursor: pointer; font-weight: 700; font-size: 14px; color: var(--green); margin: 8px 0; }
.post-foot { border-top: 1px solid var(--line); margin-top: 14px; padding-top: 14px; }
.post-actions { display: flex; gap: 8px; flex-wrap: wrap; margin-top: 10px; }
.decision { font-size: 13px; font-weight: 700; }
.decision-approved { color: var(--green); }
.decision-revise { color: var(--red); }
.decision-awaiting { color: #8A6512; }
.your-note { font-size: 14px; color: var(--ink-2); margin: 6px 0 0; }
.revise-box { margin-top: 12px; }
.tag { display: inline-block; font-size: 11px; font-weight: 800; letter-spacing: .08em; padding: 4px 10px; border-radius: 99px; border: 1px solid transparent; }
.fn-attract { background: #FCE7D6; color: #8A3D0F; }
.fn-desire { background: #F8DDE4; color: #8A1F3C; }
.fn-prove { background: #E2EBF8; color: #1E4A85; }
.fn-teach { background: #ECE5F7; color: #4C2E86; }
.fn-engage { background: #FFF1C9; color: #7A5A00; }
.fn-act { background: #DDEFE4; color: #0A4A37; }

/* Console. */
.table { width: 100%; border-collapse: collapse; background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius); overflow: hidden; font-size: 14px; }
.table th { text-align: left; font-size: 11px; letter-spacing: .1em; text-transform: uppercase; color: var(--muted); padding: 12px 14px; border-bottom: 1px solid var(--line); background: var(--paper); }
.table td { padding: 12px 14px; border-bottom: 1px solid var(--line); vertical-align: top; }
.row-link { cursor: pointer; }
.row-link:hover td { background: #FCFAF6; }
.hook-cell { max-width: 420px; }
.status { display: inline-block; font-size: 12px; font-weight: 700; padding: 3px 10px; border-radius: 99px; background: var(--paper); border: 1px solid var(--line-2); white-space: nowrap; }
.s-onboarding { background: var(--gold-tint); border-color: #EBD9A6; }
.s-intake-submitted, .s-profile-draft, .s-content-draft, .s-draft { background: #EEF2F8; border-color: #CCD8EA; }
.s-profile-published, .s-content-released, .s-approved, .s-published, .s-client-approved { background: var(--green-tint); border-color: #B9D8C7; color: var(--green-2); }
.s-revise, .s-client-revise { background: var(--red-tint); border-color: #F1C7C2; color: var(--red); }
.badge-alert { background: var(--red); color: #fff; font-size: 12px; font-weight: 700; padding: 3px 10px; border-radius: 99px; white-space: nowrap; }
.mini { display: inline-block; font-size: 10px; font-weight: 700; letter-spacing: .06em; text-transform: uppercase; color: var(--muted); border: 1px solid var(--line-2); border-radius: 4px; padding: 1px 5px; margin: 4px 4px 0 0; }
.tabs { display: flex; gap: 4px; border-bottom: 1px solid var(--line); margin: 8px 0 18px; }
.tab { font-family: var(--sans); font-size: 15px; font-weight: 700; padding: 10px 16px; background: none; border: 0; border-bottom: 3px solid transparent; cursor: pointer; color: var(--muted); }
.tab-on { color: var(--ink); border-bottom-color: var(--gold); }
.toolbar { display: flex; align-items: center; gap: 10px; flex-wrap: wrap; margin: 6px 0 16px; }
.split { display: grid; grid-template-columns: minmax(0, 1fr) 340px; gap: 24px; align-items: start; }
.internal { background: #F3F1EC; border: 1px dashed var(--line-2); border-radius: var(--radius); padding: 16px; position: sticky; top: 90px; }
.internal-flag { font-size: 11px; font-weight: 800; letter-spacing: .1em; text-transform: uppercase; color: var(--red); margin: 14px 0 4px; }
.edit-block label { margin-top: 12px; }
.regen summary { cursor: pointer; font-size: 13px; font-weight: 700; color: var(--green); }
.regen { margin-left: auto; }
.internal .regen { margin: 14px 0 0; }
.fn-grid { display: grid; grid-template-columns: repeat(6, 1fr); gap: 8px; margin: 12px 0; }
.fn-cell { border-radius: 8px; padding: 10px; display: flex; flex-direction: column; gap: 2px; font-size: 13px; }
.fn-cell summary { cursor: pointer; font-weight: 700; margin-top: 4px; }
.fn-cell .btn-row { flex-direction: column; align-items: stretch; }
.gen-progress { display: inline-flex; align-items: center; gap: 8px; font-weight: 600; font-size: 14px; }
.form-grid label:first-child { margin-top: 0; }
.inline-form { display: flex; gap: 12px; align-items: flex-end; flex-wrap: wrap; }
.inline-form label { margin: 0 0 6px; width: 100%; }
.inline-form input { max-width: 220px; }
.code-display { font-weight: 900; font-size: 34px; letter-spacing: .08em; text-align: center; background: var(--gold-tint); border-radius: var(--radius); padding: 14px; }

/* Build 2. */
.stat-row { display: grid; grid-template-columns: minmax(200px, 280px) 1fr; gap: 24px; align-items: start; }
.stat { font-weight: 900; font-size: 40px; line-height: 1; margin: 6px 0 8px; letter-spacing: -.02em; }
.stat-of { font-size: 16px; font-weight: 600; color: var(--muted); }
.grid3 { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 0 14px; }
.factor-table select { padding: 6px 8px; width: auto; }
.result-card { position: sticky; top: 90px; }
.result-card .table { font-size: 12.5px; }
.result-card .table th, .result-card .table td { padding: 8px 8px; }
.result-yes { border-color: var(--green); }
.result-no { border-color: #E3B5B0; }
.gates { list-style: none; padding: 0; margin: 12px 0; font-size: 14px; }
.gates li { padding: 8px 10px; border-radius: 8px; margin-bottom: 6px; }
.gate-pass { background: var(--green-tint); }
.gate-fail { background: var(--red-tint); }
.offer-text { font-family: var(--serif); font-style: italic; font-size: 17px; border-left: 3px solid var(--gold); padding-left: 12px; }
.extracted { white-space: pre-wrap; }
.statement .table { margin-top: 10px; }
.stat-row .table { font-size: 14px; }
#print-root { display: none; }
.print-title { font-weight: 800; font-size: 14px; }

/* Modal and toasts. */
.overlay { position: fixed; inset: 0; background: rgba(20, 22, 27, .55); display: flex; align-items: flex-start; justify-content: center; padding: 5vh 16px; z-index: 50; overflow-y: auto; }
.modal { background: var(--surface); border-radius: 14px; width: 100%; max-width: 560px; padding: 26px; border: 1px solid var(--line); }
.modal-wide { max-width: 1080px; }
.modal-title { font-family: var(--serif); font-size: 24px; }
.modal-actions { display: flex; justify-content: flex-end; gap: 8px; margin-top: 20px; flex-wrap: wrap; }
.modal .internal { position: static; }
#toasts { position: fixed; bottom: 20px; left: 50%; transform: translateX(-50%); display: grid; gap: 8px; z-index: 60; width: min(92vw, 440px); }
.toast { background: var(--ink); color: #fff; padding: 12px 16px; border-radius: 10px; font-size: 14px; font-weight: 600; transition: opacity .4s; }
.toast-err { background: var(--red); }
.toast.out { opacity: 0; }
.loading { display: flex; align-items: center; justify-content: center; gap: 10px; padding: 80px 20px; color: var(--muted); font-weight: 600; }
.spinner { width: 16px; height: 16px; border: 2px solid var(--line-2); border-top-color: var(--green); border-radius: 50%; animation: spin .8s linear infinite; display: inline-block; }
@keyframes spin { to { transform: rotate(360deg); } }

@media (max-width: 860px) {
  .stat-row, .grid3 { grid-template-columns: 1fr; }
  .result-card { position: static; }
  .split { grid-template-columns: 1fr; }
  .internal { position: static; }
  .fn-grid { grid-template-columns: repeat(3, 1fr); }
  .posts-table th:nth-child(6), .posts-table td:nth-child(6) { display: none; }
}
@media (max-width: 560px) {
  .page { padding: 28px 16px 48px; }
  .topbar { padding: 12px 16px; }
  .topnav { width: 100%; flex-wrap: nowrap; overflow-x: auto; }
  .topnav a, .linkish { padding: 6px 8px; font-size: 13px; white-space: nowrap; }
  .stage { grid-template-columns: 1fr; }
  .choices { grid-template-columns: 1fr; }
  .inline-field { grid-template-columns: 1fr; }
  .fn-grid { grid-template-columns: repeat(2, 1fr); }
  .table { font-size: 13px; }
}
@media print {
  body.print-section > *:not(#print-root) { display: none !important; }
  body.print-section #print-root { display: block !important; }
  .topbar, .footer, .no-print, .btn { display: none !important; }
  body { background: #fff; }
  .page { padding: 0; }
  .profile-section { border-color: #ccc; }
}
