/* PocketPitch — warm editorial theme. Fraunces (display) + Inter (UI). */

:root {
  --paper: #FBF6EE;     /* warm off-white page */
  --surf:  #F4EDE1;
  --card:  #FFFDF9;
  --raised:#FFFFFF;
  --ink:   #2A211B;     /* warm near-black text */
  --muted: #857A6C;
  --faint: #A89E90;
  --line:  #ECE2D4;
  --line2: #DDD0BD;
  --accent:#E0613C;     /* persimmon */
  --accent-deep:#C24A2A;
  --accent-soft:#FBE3CF;
  --gold:  #E39A2A;
  --gold-soft:#FBEFD3;
  --sage:  #4F7A66;     /* positive / won */
  --sage-soft:#E2EFE7;
  --rose:  #C0524C;     /* danger / lost */
  --rose-soft:#F7E2DF;
  --shadow: 0 4px 18px rgba(42, 33, 27, .07);
  --shadow-lift: 0 10px 30px rgba(42, 33, 27, .14);
  --radius: 14px;
  --serif: "Fraunces", Georgia, "Times New Roman", serif;
  --sans: "Inter", -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, sans-serif;
}

* { box-sizing: border-box; }

body {
  margin: 0;
  background: var(--paper);
  color: var(--ink);
  font-family: var(--sans);
  font-size: 15px;
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
}

/* Display & comfort prefs (ND accessibility) — toggled on <html> */
html.text-lg body { font-size: 17px; }
html.font-readable { --sans: "Atkinson Hyperlegible", "Inter", -apple-system, sans-serif; }
html.reduce-motion * , html.reduce-motion *::before, html.reduce-motion *::after { animation: none !important; transition: none !important; scroll-behavior: auto !important; }

.comfort-opts { display: flex; flex-direction: column; gap: 10px; margin: 12px 0 4px; }
.comfort-opt { display: flex; align-items: flex-start; gap: 11px; cursor: pointer; }
.comfort-opt input { margin-top: 3px; flex: none; width: 18px; height: 18px; accent-color: var(--accent); }
.settings-sep { border: none; border-top: 1px solid var(--line2); margin: 26px 0; }

/* Settings sub-tabs — break the long scroll into sections */
.settings-tabs { display: flex; flex-wrap: wrap; gap: 4px; border-bottom: 1px solid var(--line2); margin: 0 0 24px; }
.settings-tab { background: none; border: none; border-bottom: 2px solid transparent; padding: 9px 13px; font-size: 14px; font-weight: 600; color: var(--muted); cursor: pointer; margin-bottom: -1px; white-space: nowrap; }
.settings-tab:hover { color: var(--ink); }
.settings-tab.active { color: var(--accent-deep); border-bottom-color: var(--accent); }
.settings-section > h2:first-child { margin-top: 0; }

/* Read-aloud 🔊 button — hidden until the comfort toggle turns it on */
.speak-btn { display: none; background: var(--card); border: 1px solid var(--line2); border-radius: 8px; padding: 4px 9px; font-size: 14px; line-height: 1; cursor: pointer; }
html.read-aloud-on .speak-btn { display: inline-flex; align-items: center; }
.speak-btn:hover { border-color: var(--accent); }
.speak-btn.speaking { border-color: var(--accent); background: var(--accent-soft); }

.hidden { display: none !important; }
.muted { color: var(--muted); }
.small { font-size: 13px; }
.sub { color: var(--muted); margin: 2px 0 0; font-size: 13px; }
a { color: var(--accent-deep); }

h1, h2, h3 { font-family: var(--serif); font-weight: 600; letter-spacing: -.01em; }
h2 { margin: 0 0 6px; font-size: 24px; }
h3 { font-size: 18px; }

/* ---- buttons ---- */
.btn {
  font: inherit; font-weight: 600;
  border: 1px solid var(--line2);
  background: var(--raised);
  color: var(--ink);
  padding: 9px 16px;
  border-radius: 10px;
  cursor: pointer;
  text-decoration: none;
  display: inline-flex; align-items: center; gap: 6px;
  transition: transform .12s, box-shadow .12s, background .12s, border-color .12s;
}
.btn:hover { transform: translateY(-1px); box-shadow: var(--shadow); }
.btn.primary { background: var(--accent); border-color: var(--accent); color: #fff; box-shadow: 0 2px 0 var(--accent-deep); }
.btn.primary:hover { background: var(--accent-deep); }
.btn.ghost { background: transparent; border-color: var(--line2); color: var(--ink); }
.btn.tiny { padding: 6px 11px; font-size: 13px; border-radius: 8px; }
.btn.danger { border-color: var(--rose); color: var(--rose); background: transparent; }

input, textarea, select {
  font: inherit; width: 100%;
  background: var(--card);
  color: var(--ink);
  border: 1px solid var(--line2);
  border-radius: 10px;
  padding: 10px 12px;
  margin-top: 5px;
}
input::placeholder, textarea::placeholder { color: var(--faint); }
input:focus, textarea:focus, select:focus {
  outline: none; border-color: var(--accent);
  box-shadow: 0 0 0 3px rgba(224, 97, 60, .16);
}
label { display: block; margin: 13px 0; color: var(--muted); font-size: 13px; font-weight: 600; }

.error { background: var(--rose-soft); border: 1px solid var(--rose); color: #8a322d; padding: 10px 13px; border-radius: 10px; margin: 10px 0; font-weight: 500; }
.banner { background: var(--card); border: 1px solid var(--line); padding: 10px 14px; border-radius: 10px; margin: 0 0 14px; }
.banner.ok { border-color: var(--sage); background: var(--sage-soft); color: #2f5a47; }

/* ---- auth ---- */
.auth-wrap { min-height: 100vh; display: grid; place-items: center; padding: 20px; }
.auth-card { width: 100%; max-width: 392px; background: var(--card); border: 1px solid var(--line); border-radius: 22px; padding: 32px 30px; box-shadow: var(--shadow); text-align: left; }
.auth-mascot { width: 76px; display: block; margin: 0 auto 6px; }
.logo { font-family: var(--serif); font-weight: 700; margin: 0; text-align: center; font-size: 30px; color: var(--ink); }
.logo .accent { color: var(--accent); }
.tagline { color: var(--muted); margin: 4px 0 20px; text-align: center; }
.switch { text-align: center; margin-top: 16px; color: var(--muted); font-size: 14px; }
.auth-card .btn.primary { width: 100%; margin-top: 10px; justify-content: center; }

/* ---- app shell ---- */
.topbar { display: flex; align-items: center; gap: 18px; padding: 12px 22px; border-bottom: 1px solid var(--line); background: rgba(251,246,238,.9); backdrop-filter: blur(6px); position: sticky; top: 0; z-index: 10; }
.brand { display: flex; align-items: center; gap: 9px; }
.brand-mark { width: 30px; height: 30px; object-fit: contain; }
.brand-name { font-family: var(--serif); font-weight: 700; font-size: 19px; }
.tabs { display: flex; gap: 3px; flex: 1; }
.tab { background: none; border: none; color: var(--muted); font: inherit; font-weight: 600; padding: 8px 14px; border-radius: 9px; cursor: pointer; }
.tab:hover { color: var(--ink); background: var(--surf); }
.tab.active { color: var(--accent-deep); background: var(--accent-soft); }

.tab-panel { max-width: 820px; margin: 0 auto; padding: 26px 22px 70px; }
.panel-head { display: flex; align-items: flex-end; justify-content: space-between; gap: 12px; }

/* ---- Today / stats ---- */
.stats-row { display: flex; gap: 12px; margin: 18px 0 24px; }
.stat { flex: 1; background: var(--card); border: 1px solid var(--line); border-radius: var(--radius); padding: 15px 17px; box-shadow: var(--shadow); }
.stat-val { font-family: var(--serif); font-size: 26px; font-weight: 600; }
.stat-label { color: var(--muted); font-size: 13px; }
.stat-won .stat-val { color: var(--sage); }
/* "Closed" deals are not failures — keep the count, drop the alarm colour. */
.stat-closed .stat-val { color: var(--muted); }

.today-group { margin-bottom: 24px; }
.today-group h3 { font-size: 15px; margin: 0 0 11px; display: flex; align-items: center; gap: 9px; font-family: var(--sans); font-weight: 700; text-transform: uppercase; letter-spacing: .04em; color: var(--muted); }
.today-group .gi { width: 16px; height: 16px; flex: none; }
.today-group .count { background: var(--surf); border: 1px solid var(--line2); border-radius: 999px; padding: 1px 9px; font-size: 12px; color: var(--muted); }
.today-card {
  background: var(--card); border: 1px solid var(--line); border-radius: var(--radius);
  padding: 14px 17px; display: flex; align-items: center; gap: 14px; cursor: pointer;
  margin-bottom: 9px; box-shadow: var(--shadow); border-left-width: 4px;
  transition: transform .12s, box-shadow .12s;
}
.today-card:hover { transform: translateY(-1px); box-shadow: var(--shadow-lift); }
.today-card .pname { font-weight: 600; }
.today-card .pmeta { color: var(--muted); font-size: 13px; }
.today-card .grow { flex: 1; min-width: 0; }
.cta-hint { color: var(--accent-deep); font-size: 13px; font-weight: 600; white-space: nowrap; }
.g-now .today-card { border-left-color: var(--gold); }
.g-renew .today-card { border-left-color: var(--accent); }
.g-ready .today-card { border-left-color: var(--sage); }
.g-quiet .today-card { border-left-color: var(--line2); }
.inflight-note { margin-top: 4px; }

.empty { text-align: center; color: var(--muted); padding: 30px 20px; }
.empty .empty-mascot { width: 92px; opacity: .92; margin-bottom: 8px; }
.empty h3 { color: var(--ink); margin: 4px 0 6px; }
.empty .btn { margin-top: 14px; }

/* ---- pipeline ---- */
.prospect-list { display: flex; flex-direction: column; gap: 10px; margin-top: 18px; }
.prospect { background: var(--card); border: 1px solid var(--line); border-radius: var(--radius); padding: 14px 16px; display: flex; align-items: center; gap: 14px; cursor: pointer; box-shadow: var(--shadow); transition: transform .12s, box-shadow .12s; }
.prospect:hover { transform: translateY(-1px); box-shadow: var(--shadow-lift); }
.prospect .pname { font-weight: 600; }
.prospect .pmeta { color: var(--muted); font-size: 13px; }
.prospect .grow { flex: 1; min-width: 0; }
.prospect .pmeta a { color: var(--muted); }

.status-pill { font-size: 12px; font-weight: 700; padding: 3px 10px; border-radius: 20px; white-space: nowrap; }
.s-new { background: var(--surf); color: var(--muted); }
.s-researched { background: var(--accent-soft); color: var(--accent-deep); }
.s-emailed, .s-followed_up { background: #FBEFD3; color: #8a6320; }
.s-replied { background: var(--sage-soft); color: #2f5a47; }
.s-won { background: var(--sage); color: #fff; }
.s-dead { background: #ECE6DB; color: #7a7065; }
.due-flag { color: var(--gold); font-size: 12px; font-weight: 700; }
.row-remove { border: 1px solid transparent; background: transparent; color: var(--faint); border-radius: 8px; width: 28px; height: 28px; flex: none; cursor: pointer; font-size: 13px; line-height: 1; }
.row-remove:hover { border-color: var(--rose); color: var(--rose); }

/* ---- confirm contact / brand book ---- */
.contact-confirm { display: flex; align-items: center; gap: 10px; margin: 4px 0 2px; }
.btn.verified { border-color: var(--sage); color: var(--sage); background: var(--sage-soft); }
.known-contact { background: var(--sage-soft); border: 1px solid var(--sage); color: #2f5a47; border-radius: 8px; padding: 7px 10px; margin-bottom: 8px; font-size: 13px; }

/* ---- discover ---- */
.discover-search { margin: 16px 0 8px; display: flex; gap: 10px; }
.discover-search input { margin-top: 0; }
.discover-search .btn { flex: none; }
#discoverNotes { margin-bottom: 14px; }
.cand-head { color: var(--muted); font-size: 13px; margin: 10px 0; }
.cand { display: flex; align-items: center; gap: 14px; background: var(--card); border: 1px solid var(--line); border-radius: var(--radius); padding: 13px 16px; margin-bottom: 9px; box-shadow: var(--shadow); }
.cand .grow { flex: 1; min-width: 0; }
.cand-name { font-weight: 600; }
.cand-why { color: var(--muted); font-size: 13px; margin: 1px 0 3px; }
.cand-links { font-size: 13px; }
.cand-links a { color: var(--accent-deep); text-decoration: none; }
.cand-actions { display: flex; align-items: center; gap: 6px; flex: none; }
.cand-hide { border: 1px solid var(--line2); background: var(--card); color: var(--faint); border-radius: 8px; width: 30px; height: 30px; cursor: pointer; font-size: 14px; line-height: 1; }
.cand-hide:hover { border-color: var(--rose); color: var(--rose); }
#candMore { margin-top: 6px; }
.discover-manual { margin: 22px 0; }
.discover-manual summary { cursor: pointer; color: var(--accent-deep); font-weight: 600; }
.discover-manual[open] summary { margin-bottom: 10px; }

.discover-links { display: flex; flex-wrap: wrap; gap: 10px; margin-bottom: 26px; }
.discover-links a { display: inline-flex; align-items: center; gap: 8px; background: var(--card); border: 1px solid var(--line); padding: 11px 15px; border-radius: 11px; text-decoration: none; color: var(--ink); box-shadow: var(--shadow); }
.discover-links a:hover { border-color: var(--accent); }
.discover-links a span { color: var(--muted); font-size: 13px; }
.discover-tip { background: var(--surf); border: 1px solid var(--line); border-radius: var(--radius); padding: 6px 22px 18px; }
.discover-tip ol { padding-left: 18px; }

/* ---- forms ---- */
.form-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 0 18px; margin: 14px 0; }
.form-grid .wide { grid-column: 1 / -1; }

/* ---- media kit editor ---- */
.mk-editor { display: flex; gap: 18px; align-items: flex-start; margin: 14px 0 4px; }
.mk-avatar-col { display: flex; flex-direction: column; align-items: center; gap: 8px; }
.mk-avatar { width: 92px; height: 92px; border-radius: 50%; background: var(--surf) center/cover no-repeat; border: 2px solid var(--line2); display: flex; align-items: center; justify-content: center; font-family: var(--serif); font-size: 34px; color: var(--accent); }
.upload-btn { cursor: pointer; }
.mk-fields { flex: 1; }
.handle-row { display: flex; align-items: center; background: var(--card); border: 1px solid var(--line2); border-radius: 10px; margin-top: 5px; overflow: hidden; }
.handle-row:focus-within { border-color: var(--accent); box-shadow: 0 0 0 3px rgba(224,97,60,.16); }
.handle-prefix { color: var(--muted); padding: 0 2px 0 12px; font-size: 14px; }
.handle-row input { border: none; box-shadow: none !important; margin: 0; padding-left: 4px; }
.mk-sub { margin: 26px 0 4px; }
#mk-links { display: flex; flex-direction: column; gap: 8px; margin: 8px 0; }
.link-row { display: flex; gap: 8px; align-items: center; }
.link-row input { margin: 0; }
.link-row .lr-label { flex: 1; }
.link-row .lr-url { flex: 2; }
.link-row .lr-del { border: 1px solid var(--line2); background: var(--card); color: var(--muted); border-radius: 8px; width: 34px; height: 38px; flex: none; cursor: pointer; font-size: 16px; }
.link-row .lr-del:hover { border-color: var(--rose); color: var(--rose); }
.mk-actions { display: flex; align-items: center; gap: 10px; flex-wrap: wrap; margin-top: 18px; }

/* ---- modals ---- */
.modal-wrap { position: fixed; inset: 0; background: rgba(42,33,27,.42); display: grid; place-items: center; padding: 20px; z-index: 50; backdrop-filter: blur(2px); }
.modal { background: var(--paper); border: 1px solid var(--line2); border-radius: 18px; padding: 24px; width: 100%; max-width: 448px; max-height: 90vh; overflow-y: auto; box-shadow: var(--shadow-lift); }
.modal.wide { max-width: 660px; }
.modal h3 { margin-top: 0; }
.modal-actions { display: flex; justify-content: flex-end; gap: 10px; margin-top: 18px; }

.detail-section { margin: 16px 0; padding-top: 16px; border-top: 1px solid var(--line); }
.detail-section h4 { margin: 0 0 8px; color: var(--muted); font-size: 12px; text-transform: uppercase; letter-spacing: .05em; font-weight: 700; }
.research-box { background: var(--card); border: 1px solid var(--line); border-radius: 10px; padding: 12px; font-size: 14px; }
.email-chip { display: inline-block; background: var(--surf); border: 1px solid var(--line2); padding: 3px 10px; border-radius: 20px; margin: 3px 4px 3px 0; font-size: 13px; cursor: pointer; }
.email-chip:hover { border-color: var(--accent); }
.pitch-output { white-space: pre-wrap; background: var(--card); border: 1px solid var(--line); border-radius: 10px; padding: 14px; font-size: 14px; margin-top: 10px; }
.pitch-subject { font-weight: 700; margin-bottom: 8px; }
.row { display: flex; gap: 10px; align-items: center; flex-wrap: wrap; }
.spinner { color: var(--muted); font-style: italic; }

/* Pip working-loader + celebration toast */
.mascot-load { display: flex; align-items: center; gap: 12px; color: var(--muted); padding: 6px 0; }
.mascot-load img { width: 46px; animation: pip-bob 1.7s ease-in-out infinite; }
@keyframes pip-bob { 0%, 100% { transform: translateY(0) rotate(0); } 50% { transform: translateY(-5px) rotate(-3deg); } }
.mascot-load .dots i { animation: pip-blink 1.4s infinite; opacity: .2; font-weight: 700; }
.mascot-load .dots i:nth-child(2) { animation-delay: .2s; }
.mascot-load .dots i:nth-child(3) { animation-delay: .4s; }
@keyframes pip-blink { 0%, 100% { opacity: .2; } 50% { opacity: 1; } }
.celebrate { position: fixed; left: 50%; top: 28%; transform: translate(-50%, -12px); background: var(--card); border: 1px solid var(--line2); border-radius: 18px; box-shadow: var(--shadow-lift); padding: 20px 28px; display: flex; flex-direction: column; align-items: center; gap: 8px; z-index: 100; opacity: 0; transition: opacity .35s, transform .35s; text-align: center; font-family: var(--serif); font-size: 18px; font-weight: 600; pointer-events: none; }
.celebrate img { width: 88px; }
.celebrate.show { opacity: 1; transform: translate(-50%, 0); }
/* Calm post-send affirmation — gentler than .celebrate, longer dwell, readable. */
.reassure { position: fixed; left: 50%; bottom: 26px; transform: translate(-50%, 12px); z-index: 100; display: flex; align-items: center; gap: 13px; width: min(440px, calc(100vw - 28px)); box-sizing: border-box; background: var(--card); border: 1px solid var(--line2); border-radius: 16px; box-shadow: var(--shadow-lift); padding: 14px 16px; opacity: 0; transition: opacity .35s, transform .35s; }
.reassure.show { opacity: 1; transform: translate(-50%, 0); }
.reassure img { width: 44px; flex: none; }
.reassure-body { flex: 1; }
.reassure-title { font-family: var(--serif); font-weight: 600; font-size: 16px; color: var(--ink); }
.reassure-sub { color: var(--muted); font-size: 13px; line-height: 1.5; margin-top: 2px; }
.reassure-x { flex: none; align-self: flex-start; background: none; border: none; color: var(--muted); font-size: 18px; line-height: 1; cursor: pointer; padding: 0 2px; }

@media (prefers-reduced-motion: reduce) { .mascot-load img, .celebrate, .reassure { animation: none; transition: opacity .2s; } }

/* ---- timeline ---- */
.log-row { gap: 8px; margin-bottom: 10px; }
.log-row input { margin-top: 0; }
.timeline { display: flex; flex-direction: column; }
.tl-item { display: flex; align-items: baseline; gap: 10px; padding: 7px 0; border-bottom: 1px solid var(--line); font-size: 14px; }
.tl-item:last-child { border-bottom: none; }
.tl-icon { width: 18px; text-align: center; flex-shrink: 0; }
.tl-body { flex: 1; }
.tl-note .tl-body { color: var(--ink); font-weight: 500; }
.tl-auto .tl-body { color: var(--muted); }
.tl-time { color: var(--faint); font-size: 12px; white-space: nowrap; }

/* ---- quick actions + outcome ---- */
.quick-actions { display: flex; flex-wrap: wrap; gap: 8px; margin: 14px 0 6px; }
.qa-won { border-color: var(--sage); color: var(--sage); }
.qa-lost { border-color: var(--rose); color: var(--rose); }
.outcome-form { background: var(--card); border: 1px solid var(--line2); border-radius: 12px; padding: 12px 14px; margin: 8px 0; }
.outcome-title { font-weight: 700; margin-bottom: 4px; }
.closed-note { border-radius: 10px; padding: 9px 13px; margin: 10px 0 0; font-weight: 600; }
.closed-note.won { background: var(--sage-soft); color: #2f5a47; }
.closed-note.lost { background: #EFEAE1; color: #6a6155; }

/* ---- quote builder ---- */
.quote-addons { display: flex; flex-direction: column; gap: 2px; margin: 8px 0; }
.q-row { display: flex; align-items: center; justify-content: space-between; gap: 12px; margin: 0; padding: 6px 0; font-weight: 500; color: var(--ink); }
.q-row span { flex: 1; }
.q-row em { color: var(--faint); font-style: normal; font-size: 12px; margin-left: 6px; }
.q-row input[type="number"] { width: 92px; margin: 0; }
.q-row.q-chk { justify-content: flex-start; }
.q-row.q-chk input { width: auto; margin: 0 8px 0 0; }
.quote-breakdown { background: var(--card); border: 1px solid var(--line); border-radius: 10px; padding: 11px 13px; margin-top: 10px; }
.q-line { display: flex; justify-content: space-between; font-size: 14px; padding: 2px 0; color: var(--muted); }
.q-line:first-child { color: var(--ink); }
.quote-total { font-family: var(--serif); font-size: 20px; font-weight: 600; margin-top: 8px; text-align: right; color: var(--accent-deep); }

/* ---- right-contact helper ---- */
.contact-helper { margin-top: 12px; padding-top: 12px; border-top: 1px dashed var(--line2); }
.role-links { font-size: 13px; color: var(--muted); margin-top: 8px; }
.role-links a { display: inline-block; background: var(--card); border: 1px solid var(--line2); border-radius: 999px; padding: 3px 11px; margin: 4px 6px 0 0; text-decoration: none; font-size: 12px; font-weight: 500; color: var(--ink); }
.role-links a:hover { border-color: var(--accent); }

/* ---- send + fair pay ---- */
.send-note { margin-top: 8px; font-size: 13px; color: var(--sage); font-weight: 600; }
.warn-inline { color: var(--accent-deep); font-weight: 600; }

/* "Just start" — break a task into tiny steps (task-initiation aid) */
.breakdown-box { margin: 8px 0 0; }
.breakdown-result { background: var(--accent-soft); border-radius: 10px; padding: 11px 13px; margin-top: 8px; }
.bd-task { font-weight: 600; font-size: 13px; margin-bottom: 6px; color: var(--ink); }
.bd-step { display: flex; gap: 9px; align-items: flex-start; padding: 5px 0; font-size: 14px; line-height: 1.4; cursor: pointer; }
.bd-step input { margin-top: 3px; flex: none; width: 16px; height: 16px; accent-color: var(--accent); }
.bd-step.done span { text-decoration: line-through; color: var(--muted); }

/* One-tap invoice at the win moment (admin-avoidance aid) */
.won-invoice-cta { background: var(--sage-soft); border-radius: 10px; padding: 11px 13px; margin-top: 8px; display: flex; flex-direction: column; gap: 8px; }
.won-invoice-cta > span { font-weight: 600; color: #2f5a47; }

/* Focus mode — one thing, everything else hidden */
.focus-on #statsRow, .focus-on #todayProduction, .focus-on #todayMoney { display: none; }
#focusToggle.on { background: var(--accent); border-color: var(--accent); color: #fff; }
.focus-card { background: var(--card); border: 1px solid var(--line2); border-radius: 16px; box-shadow: var(--shadow-lift); padding: 28px 24px; text-align: center; max-width: 460px; margin: 24px auto; }
.focus-card.calm { padding-top: 20px; }
.focus-card .empty-mascot { width: 64px; margin-bottom: 4px; }
.focus-eyebrow { text-transform: uppercase; letter-spacing: .08em; font-size: 12px; font-weight: 700; color: var(--muted); }
.focus-name { font-family: var(--serif); font-size: 26px; font-weight: 600; color: var(--ink); margin: 6px 0 2px; }
.focus-reason { color: var(--muted); margin-bottom: 18px; }
.focus-card .btn.primary { font-size: 16px; padding: 11px 22px; }
.focus-foot { margin-top: 14px; }

/* Scam gut-check */
#scam-text { width: 100%; resize: vertical; }
.scam-result { border-radius: 10px; padding: 12px 14px; margin-top: 12px; border: 1px solid var(--line2); }
.scam-result.risk-low { background: var(--sage-soft); border-color: #bfd8c8; }
.scam-result.risk-medium { background: var(--gold-soft); border-color: #E9C77A; }
.scam-result.risk-high { background: var(--rose-soft); border-color: var(--rose); }
.scam-verdict { font-family: var(--serif); font-weight: 600; font-size: 18px; margin-bottom: 6px; }
.risk-low .scam-verdict { color: #2f5a47; }
.risk-medium .scam-verdict { color: #8a6320; }
.risk-high .scam-verdict { color: #8a322d; }
.scam-bb { background: var(--sage-soft); border-radius: 8px; padding: 6px 10px; font-size: 13px; margin-bottom: 8px; color: #2f5a47; }
.scam-flags { margin-top: 4px; }
.scam-flags ul { margin: 4px 0 0; padding-left: 18px; }
.scam-flags li { margin: 2px 0; }
.scam-advice { margin-top: 8px; font-weight: 600; }

/* Usage-rights educational header in the quote builder */
.usage-rights-head { margin: 14px 0 4px; padding: 9px 11px; background: var(--gold-soft); border-radius: 9px; }
.usage-rights-head strong { display: block; color: #8a6320; font-size: 14px; }
.usage-rights-head span { display: block; margin-top: 2px; }

/* Long-overdue invoice escalation (the shame is on the brand, not the creator) */
.due-flag.bad { background: var(--rose-soft); color: #8a322d; }
.money-note { margin: 8px 4px 2px; }
.fairpay { background: var(--surf); border: 1px solid var(--line); border-radius: 10px; padding: 10px 13px; margin-bottom: 12px; font-size: 13px; }
.fairpay-mine { font-weight: 600; color: var(--ink); }
.fairpay-bench { color: var(--muted); margin-top: 3px; }

/* ---- contract scanner ---- */
.scan-ok { background: var(--sage-soft); border: 1px solid var(--sage); color: #2f5a47; padding: 10px 13px; border-radius: 10px; margin-top: 10px; }
.flag { border: 1px solid var(--line); border-left-width: 4px; border-radius: 10px; padding: 10px 13px; margin-top: 8px; background: var(--card); }
.flag-high { border-left-color: var(--rose); }
.flag-medium { border-left-color: var(--gold); }
.flag-low { border-left-color: var(--line2); }
.flag-head { font-weight: 600; }
.sev-badge { font-size: 11px; font-weight: 700; text-transform: uppercase; padding: 2px 7px; border-radius: 5px; margin-right: 6px; }
.sev-high { background: var(--rose-soft); color: #8a322d; }
.sev-medium { background: #FBEFD3; color: #8a6320; }
.sev-low { background: var(--surf); color: var(--muted); }
.flag-why { color: var(--muted); font-size: 14px; margin-top: 4px; }
.flag-ask { color: var(--accent-deep); font-size: 14px; margin-top: 6px; }
.scan-note { margin-top: 10px; }

/* ---- day picker + overrides ---- */
.day-picker { display: flex; gap: 8px; margin-top: 6px; }
.day-btn { width: 40px; height: 40px; border-radius: 50%; border: 1px solid var(--line2); background: var(--card); color: var(--muted); font-weight: 700; cursor: pointer; }
.day-btn.on { background: var(--accent); border-color: var(--accent); color: #fff; }
.ov-item { display: flex; justify-content: space-between; align-items: center; background: var(--card); border: 1px solid var(--line); border-radius: 9px; padding: 7px 12px; margin: 6px 0; font-size: 14px; }
.ov-del { border: none; background: none; color: var(--faint); cursor: pointer; font-size: 14px; }
.ov-del:hover { color: var(--rose); }
#calFeedUrl { font-size: 13px; color: var(--muted); }

/* ---- deliverables ---- */
.deliv { border: 1px solid var(--line); border-radius: 10px; padding: 10px 12px; margin-bottom: 8px; background: var(--card); }
.deliv-row { display: flex; gap: 8px; align-items: center; }
.deliv-row input, .deliv-row select { margin: 0; }
.dv-title { flex: 2; }
.dv-due { flex: 1; min-width: 130px; }
.dv-status { flex: 1; min-width: 110px; }
.dv-del { border: none; background: none; color: var(--faint); cursor: pointer; font-size: 14px; flex: none; }
.dv-del:hover { color: var(--rose); }
.deliv-plan { font-size: 13px; color: var(--muted); margin-top: 6px; }
.deliv-plan .tight { color: var(--accent-deep); font-weight: 600; }
.deliv-add { margin-top: 8px; }

/* ---- calendar ---- */
.cal-nav { display: flex; align-items: center; gap: 10px; }
.cal-nav h2 { margin: 0; min-width: 180px; }
.cal-legend { display: flex; gap: 18px; flex-wrap: wrap; color: var(--muted); font-size: 13px; margin: 14px 0; align-items: center; }
.cal-legend .dot { display: inline-block; width: 10px; height: 10px; border-radius: 50%; margin-right: 5px; vertical-align: middle; }
.cal-legend .dot.film { background: #C98A2E; }
.cal-legend .dot.edit { background: var(--sage); }
.cal-legend .chip-eg { font-style: normal; font-size: 11px; padding: 1px 6px; border-radius: 5px; margin-right: 4px; }
.chip-eg.film { background: #FBEFD3; color: #8a6320; }
.chip-eg.edit { background: var(--sage-soft); color: #2f5a47; }
.chip-eg.due { background: var(--accent-soft); color: var(--accent-deep); }
.chip-eg.ev { background: #ECEAF6; color: #4a4170; }
.cal-grid { display: grid; grid-template-columns: repeat(7, 1fr); gap: 4px; }
.cal-head { text-align: center; font-size: 12px; font-weight: 700; color: var(--muted); padding: 4px 0; }
.cal-cell { background: var(--card); border: 1px solid var(--line); border-radius: 8px; min-height: 78px; padding: 4px; overflow: hidden; cursor: pointer; transition: border-color .12s, box-shadow .12s; }
.cal-cell:not(.empty):hover { border-color: var(--accent); box-shadow: 0 0 0 1px var(--accent-soft) inset; }
.cal-cell.empty { background: transparent; border: none; cursor: default; }
.cal-cell.is-film { background: #FCF4E2; }
.cal-cell.is-edit { background: #EAF2EC; }
.cal-cell.is-today { outline: 2px solid var(--accent); }
.cal-date { font-size: 12px; font-weight: 600; color: var(--muted); }
.cal-item { font-size: 11px; padding: 1px 4px; border-radius: 4px; margin-top: 2px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; cursor: pointer; }
.cal-item.film { background: #FBEFD3; color: #8a6320; }
.cal-item.edit { background: var(--sage-soft); color: #2f5a47; }
.cal-item.due { background: var(--accent-soft); color: var(--accent-deep); cursor: grab; }
.cal-item.ev { background: #ECEAF6; color: #4a4170; cursor: grab; }
.cal-item.due:active, .cal-item.ev:active { cursor: grabbing; }
.cal-item.dragging { opacity: .4; }
.cal-cell.drop-target { border-color: var(--accent); box-shadow: 0 0 0 2px var(--accent) inset; background: var(--accent-soft); }

/* drop-to-delete zone (appears while dragging an event) */
.cal-trash { border: 2px dashed var(--line); border-radius: 8px; padding: 10px; text-align: center; color: var(--muted); font-size: 13px; margin: 8px 0; background: var(--card); transition: border-color .12s, background .12s, color .12s; }
.cal-trash.over { border-color: #c0392b; color: #c0392b; background: #fbeae8; }

/* day popover: set film/edit/off + pin events */
.day-set-row { display: flex; flex-wrap: wrap; gap: 6px; margin: 10px 0 4px; }
.day-set-row .day-set { margin: 0; }
.day-events { display: flex; flex-direction: column; gap: 6px; }
.day-ev { display: flex; align-items: center; gap: 8px; background: #ECEAF6; color: #4a4170; border-radius: 6px; padding: 5px 8px; font-size: 13px; }
.day-ev-t { flex: 1; min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.day-ev-date { width: 132px; margin: 0; font-size: 12px; padding: 3px 6px; border: 1px solid var(--line); border-radius: 5px; background: var(--paper); color: var(--ink); }
.day-ev-del { border: none; background: none; color: #4a4170; font-size: 18px; line-height: 1; cursor: pointer; padding: 0 2px; opacity: .65; }
.day-ev-del:hover { opacity: 1; }

/* due-date move confirmation toast (with Undo) */
.cal-toast { position: fixed; left: 50%; bottom: 24px; transform: translateX(-50%); z-index: 60; display: flex; align-items: center; gap: 12px; max-width: min(560px, calc(100vw - 32px)); background: var(--ink); color: #fff; border-radius: 10px; padding: 11px 12px 11px 16px; box-shadow: 0 8px 28px rgba(0,0,0,.28); font-size: 13.5px; line-height: 1.4; }
.cal-toast.warn { background: #8a2f23; }
.cal-toast-msg { flex: 1; }
.cal-toast-msg strong { font-weight: 600; }
.cal-toast-undo { flex: none; background: rgba(255,255,255,.16); color: #fff; border: none; border-radius: 6px; padding: 5px 12px; font-size: 13px; font-weight: 600; cursor: pointer; }
.cal-toast-undo:hover { background: rgba(255,255,255,.28); }
.cal-toast-x { flex: none; background: none; border: none; color: rgba(255,255,255,.7); font-size: 18px; line-height: 1; cursor: pointer; padding: 0 2px; }
.cal-toast-x:hover { color: #fff; }

/* invoices + earnings */
.earnings { display: flex; gap: 22px; margin: 10px 0 4px; font-size: 14px; color: var(--muted); }
.earnings strong { color: var(--ink); font-family: var(--serif); font-size: 17px; }
.inv { border: 1px solid var(--line); border-radius: 10px; padding: 12px 14px; margin-bottom: 10px; background: var(--card); }
.inv-head { display: flex; justify-content: space-between; align-items: center; }
.inv-del { border: none; background: none; color: var(--faint); cursor: pointer; font-size: 14px; }
.inv-del:hover { color: var(--rose); }
.iv-nudge-out { margin-top: 8px; }

/* reputation */
.rep-circle { border-radius: 9px; padding: 10px 12px; font-size: 14px; margin-bottom: 8px; }
.rep-circle.caution { background: var(--rose-soft); border: 1px solid var(--rose); color: #8a322d; }
.rep-circle.good { background: var(--sage-soft); border: 1px solid var(--sage); color: #2f5a47; }
.rep-circle ul { margin: 6px 0 0; padding-left: 18px; }
.rep-pay { font-size: 13px; color: var(--muted); margin-bottom: 8px; }
.rep-form { background: var(--card); border: 1px solid var(--line); border-radius: 9px; padding: 10px 12px; }
.rep-form-title { font-weight: 600; font-size: 13px; margin-bottom: 4px; }
.rep-badge { font-size: 11px; font-weight: 700; padding: 1px 7px; border-radius: 6px; }
.rep-badge.caution { background: var(--rose-soft); color: #8a322d; }
.rep-badge.good { background: var(--sage-soft); color: #2f5a47; }

/* negotiation + assessment */
.assessment { background: var(--accent-soft); border: 1px solid var(--bh, var(--accent)); border-radius: 9px; padding: 10px 12px; font-size: 14px; margin-bottom: 8px; }

/* testimonials */
.tmon { border: 1px solid var(--line); border-radius: 9px; padding: 10px 12px; margin-bottom: 8px; background: var(--card); }
.tmon-q { font-size: 14px; margin-bottom: 6px; }
.tm-show { display: flex; align-items: center; gap: 4px; font-size: 12px; color: var(--muted); margin: 0; white-space: nowrap; }
.tm-show input { width: auto; margin: 0; }
.tm-del { border: none; background: none; color: var(--faint); cursor: pointer; font-size: 14px; }
.tm-del:hover { color: var(--rose); }

/* deliverable handoff + insights */
.deliv-deliver { margin-top: 6px; }
.insight-tips { margin-top: 16px; }
.insight-tips p { margin: 6px 0; }

/* overdue batch banner + Today quick-advance */
/* Reschedule prompt — warm/calm, NOT an alarm. Slipping a date is normal;
   the banner invites a fix rather than shaming the miss. */
.reschedule-banner { background: var(--gold-soft); border: 1px solid #E9C77A; border-radius: 10px; padding: 10px 13px; margin-bottom: 14px; display: flex; flex-wrap: wrap; gap: 8px; align-items: center; }
.reschedule-banner strong { color: #8a6320; margin-right: 2px; }
.resched-hint { color: #9a7b3c; font-size: 12px; flex-basis: 100%; margin: -2px 0 2px; }
.od-item { background: var(--card); border: 1px solid var(--line2); border-radius: 999px; padding: 4px 11px; font-size: 13px; cursor: pointer; }
.od-item:hover { border-color: var(--gold); }
.prod-act { flex: none; }

@media (max-width: 600px) {
  .form-grid { grid-template-columns: 1fr; }
  .tabs { overflow-x: auto; }
  .cal-cell { min-height: 56px; }
  .cal-item { font-size: 9px; }
  .cal-nav h2 { min-width: 120px; font-size: 18px; }
  .deliv-row { flex-wrap: wrap; }
  .day-btn { width: 36px; height: 36px; }
  .topbar { gap: 10px; padding: 10px 14px; }
  .brand-name { display: none; }
  .tab-panel { padding: 20px 14px 70px; }
  .stats-row { gap: 8px; }
  .stat { padding: 11px 12px; }
  .mk-editor { flex-direction: column; align-items: center; text-align: center; }
  .mk-fields { width: 100%; text-align: left; }
}
