/* Ported verbatim from docs/phase7-mockups/quote-v4.html.
 * Update both files together when iterating on visuals.
 * Token foundation: docs/DESIGN-SYSTEM.md.
 */

:root {
  --rf-blue: #174A91; --rf-orange: #FF6E1D; --rf-teal: #4ECDC4;
  --bg: #EFEBE3; --surface: #FFFFFF; --surface-tint: #FAF8F4;
  --sidebar-bg: #F2EEE8;
  --border: #E8E4DD; --border-strong: #D4CFC5;
  --ink: #1A1A1A; --ink-soft: #4A4A4A; --ink-quiet: #8A8580;
  --accent: var(--rf-orange); --accent-ink: #B8470F; --accent-tint: #FFF5EE;
  --link: var(--rf-blue);
  --success: #0F8678; --success-tint: #E8FBFA;
  --warn: #B8470F; --warn-tint: #FFF5EE;
  --font-sans: -apple-system, BlinkMacSystemFont, 'Inter', 'Segoe UI', Roboto, sans-serif;
  --font-mono: ui-monospace, 'SF Mono', Menlo, Consolas, monospace;
  --ease: cubic-bezier(0.2, 0.8, 0.2, 1);
  --paper-shadow: 0 1px 2px rgba(40, 30, 10, 0.04), 0 6px 20px rgba(40, 30, 10, 0.06);
  --paper-shadow-lg: 0 1px 2px rgba(40, 30, 10, 0.05), 0 12px 36px rgba(40, 30, 10, 0.08);
}
* { box-sizing: border-box; }
html, body { margin: 0; padding: 0; }
body {
  background: var(--bg); color: var(--ink);
  font-family: var(--font-sans);
  font-size: 17px; line-height: 1.55;
  -webkit-font-smoothing: antialiased;
  padding-bottom: 96px;
}

/* ─── Type scale (6 sizes) ─────────────────────────────────── */
h1, h2, h3, h4 { color: var(--ink); margin: 0; line-height: 1.2; letter-spacing: -0.02em; font-weight: 600; }
h1 { font-size: clamp(36px, 5vw, 56px); letter-spacing: -0.035em; line-height: 1.05; font-weight: 600; }
h2 { font-size: 36px; }
h3 { font-size: 22px; }
h4 { font-size: 17px; font-weight: 600; }
p { margin: 0 0 1em; }
a { color: var(--link); text-decoration: none; border-bottom: 1px solid transparent; transition: border-color 120ms var(--ease); }
a:hover { border-bottom-color: currentColor; }
.quiet { color: var(--ink-quiet); }
.subtitle { font-size: 22px; color: var(--ink-soft); font-weight: 400; line-height: 1.45; }

/* ─── Top nav ──────────────────────────────────────────────── */
.nav {
  display: flex; align-items: center; justify-content: space-between;
  padding: 18px 32px; max-width: 1200px; margin: 0 auto;
}
.nav .brand { font-weight: 600; font-size: 17px; }
.nav .brand .quiet { font-weight: 400; }
.nav .nav-links { display: flex; gap: 28px; }
.nav .nav-links a { color: var(--ink-soft); font-size: 15px; font-weight: 500; border-bottom: none; }
.nav .nav-links a:hover, .nav .nav-links a.active { color: var(--ink); }
.nav-right { display: flex; align-items: center; gap: 16px; }

.mode-toggle { display: inline-flex; gap: 2px; padding: 2px; background: var(--surface); border: 1px solid var(--border); border-radius: 8px; }
.mode-toggle button { font-family: var(--font-mono); border: none; background: transparent; padding: 6px 10px; font-size: 11px; font-weight: 500; color: var(--ink-quiet); cursor: pointer; border-radius: 6px; text-transform: uppercase; letter-spacing: 0.08em; }
.mode-toggle button.active { background: var(--surface-tint); color: var(--ink); }

/* ─── Paper sheet (the v4 signature move) ──────────────────── */
.sheet {
  max-width: 808px; margin: 24px auto 0;
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: 8px;
  box-shadow: var(--paper-shadow);
  position: relative;
}
.sheet:first-of-type { margin-top: 32px; }
.sheet-inner { padding: 56px 64px 0; }
.sheet-inner.compact { padding: 32px 64px 0; }
.sheet-foot {
  margin-top: 56px;
  padding: 14px 32px;
  border-top: 1px solid var(--border);
  display: flex; justify-content: space-between; align-items: center;
  font-family: var(--font-mono); font-size: 11px; color: var(--ink-quiet);
  text-transform: uppercase; letter-spacing: 0.08em;
}
.sheet-foot .ref { display: flex; gap: 8px; align-items: center; }
.sheet-foot .ref::before { content: ''; width: 4px; height: 4px; background: var(--accent); border-radius: 50%; }
.sheet-foot.no-bord { border-top: 0; padding-top: 0; }
@media (max-width: 720px) { .sheet-inner { padding: 36px 28px 0; } .sheet-foot { padding: 12px 28px; } }

/* hero gets a slightly heavier shadow to feel like the cover sheet */
.sheet-hero { box-shadow: var(--paper-shadow-lg); }

/* ─── Hero ─────────────────────────────────────────────────── */
.category-tag {
  display: inline-block;
  font-family: var(--font-mono);
  font-size: 13px; font-weight: 500;
  text-transform: uppercase; letter-spacing: 0.08em;
  color: var(--accent);
  margin-bottom: 28px;
}
.hero-meta {
  display: flex; flex-wrap: wrap; align-items: center; gap: 8px;
  margin-bottom: 24px;
}
.hero h1 { margin-bottom: 18px; max-width: 640px; }
.hero .subtitle { max-width: 600px; margin-bottom: 8px; }

/* ─── Pills ────────────────────────────────────────────────── */
.pill {
  display: inline-flex; align-items: center; gap: 6px;
  font-family: var(--font-mono);
  font-size: 11px; font-weight: 500;
  text-transform: uppercase; letter-spacing: 0.08em;
  padding: 4px 10px; border-radius: 999px;
  border: 1px solid var(--border-strong);
  color: var(--ink-quiet); background: var(--surface);
}
.pill-accent { border-color: var(--accent); color: var(--accent); background: var(--accent-tint); }
.pill-success { border-color: var(--rf-teal); color: var(--success); background: var(--success-tint); }
.pill-warn { border-color: var(--accent); color: var(--warn); background: var(--warn-tint); }
.pill .dot { width: 6px; height: 6px; border-radius: 50%; background: currentColor; }
.pill-counter { font-family: inherit; text-transform: none; letter-spacing: 0; font-weight: 600; font-size: 12px; min-width: 22px; height: 20px; padding: 0 7px; background: var(--ink); color: white; border-color: var(--ink); justify-content: center; }

/* ─── Stepper (in its own thin sheet) ──────────────────────── */
.sheet-strip { padding: 24px 64px; }
.stepper { display: flex; align-items: flex-start; gap: 0; }
.stepper .step { flex: 1; display: flex; flex-direction: column; align-items: center; gap: 8px; position: relative; }
.stepper .step:not(:last-child)::after {
  content: ''; position: absolute; top: 13px; left: calc(50% + 18px);
  right: calc(-50% + 18px); height: 2px; background: var(--border);
}
.stepper .step.done::after { background: var(--rf-teal); }
.stepper .step .dot {
  width: 28px; height: 28px; border-radius: 50%; display: grid; place-items: center;
  background: var(--surface); border: 1.5px solid var(--border-strong);
  font-family: var(--font-mono); font-size: 12px; font-weight: 600;
  color: var(--ink-quiet); position: relative; z-index: 1;
}
.stepper .step.done .dot { background: var(--rf-teal); border-color: var(--rf-teal); color: white; }
.stepper .step.current .dot { background: var(--accent); border-color: var(--accent); color: white; }
.stepper .step .step-label { font-size: 13px; color: var(--ink-quiet); text-align: center; max-width: 120px; }
.stepper .step.current .step-label, .stepper .step.done .step-label { color: var(--ink); }

/* ─── TOC ──────────────────────────────────────────────────── */
.doc-toc {
  display: grid; grid-template-columns: repeat(5, 1fr); gap: 12px 24px;
  padding: 24px 64px;
}
@media (max-width: 720px) { .doc-toc { grid-template-columns: repeat(2, 1fr); padding: 24px 28px; } }
.doc-toc a {
  font-family: var(--font-mono); font-size: 12px; color: var(--ink-quiet);
  text-transform: uppercase; letter-spacing: 0.08em; border: 0;
}
.doc-toc a:hover { color: var(--ink); }
.doc-toc .num { color: var(--accent); margin-right: 6px; }

/* ─── Section heading inside a sheet ──────────────────────── */
.section-title {
  font-family: var(--font-mono);
  font-size: 13px; font-weight: 500;
  text-transform: uppercase; letter-spacing: 0.1em;
  color: var(--ink-quiet); margin-bottom: 20px;
}
.sheet-inner h2 { margin-bottom: 24px; }
.sheet-inner .lede { font-size: 19px; color: var(--ink-soft); line-height: 1.5; font-weight: 400; max-width: 640px; margin-bottom: 1em; }
.sheet-inner p { color: var(--ink); }

/* ─── Document rows ────────────────────────────────────────── */
.row {
  display: grid; grid-template-columns: 100px 1fr auto; gap: 24px;
  padding: 18px 0; border-top: 1px solid var(--border); align-items: start;
}
.row:last-of-type { border-bottom: 1px solid var(--border); }
.row .area {
  font-family: var(--font-mono);
  font-size: 13px; font-weight: 500; color: var(--ink-quiet);
  text-transform: uppercase; letter-spacing: 0.08em; padding-top: 2px;
}
.row .body { font-size: 17px; line-height: 1.5; color: var(--ink); }
.row .body .quiet { font-size: 14px; color: var(--ink-quiet); display: block; margin-top: 4px; }

/* ─── Citation chip ────────────────────────────────────────── */
.citation {
  display: inline-flex; align-items: center; gap: 6px;
  font-family: var(--font-mono);
  font-size: 13px; color: var(--link);
  border: 1px solid var(--border); border-radius: 6px;
  padding: 4px 10px; background: var(--surface-tint);
  text-decoration: none; margin-top: 8px; margin-right: 6px;
}
.citation .mark { color: var(--accent); }
.citation:hover { border-color: var(--border-strong); }

/* ─── Letter ───────────────────────────────────────────────── */
.letter p { font-size: 17px; line-height: 1.7; color: var(--ink); }
.signature { display: flex; align-items: center; gap: 16px; margin-top: 32px; padding-top: 24px; border-top: 1px solid var(--border); }
.avatar-lg {
  width: 56px; height: 56px; border-radius: 50%;
  background: var(--rf-blue); color: white;
  display: grid; place-items: center;
  font-weight: 600; font-size: 19px;
}
.signature .who { font-size: 17px; font-weight: 600; }
.signature .role { font-family: var(--font-mono); font-size: 13px; color: var(--ink-quiet); margin-top: 2px; }

/* ─── Background ───────────────────────────────────────────── */
.bg-callout {
  margin-top: 24px; padding: 16px 20px;
  border-left: 3px solid var(--accent); background: var(--accent-tint);
  border-radius: 4px; color: var(--ink);
}

/* ─── Quote table ──────────────────────────────────────────── */
.qt-wrap {
  margin-top: 12px;
  border: 1px solid var(--border); border-radius: 10px;
  background: var(--surface-tint); overflow: hidden;
}
.qt-head {
  display: grid; grid-template-columns: 1fr 80px 80px 100px; gap: 16px;
  padding: 14px 24px; border-bottom: 1px solid var(--border);
  background: var(--surface);
  font-family: var(--font-mono); font-size: 11px; font-weight: 500;
  color: var(--ink-quiet); text-transform: uppercase; letter-spacing: 0.08em;
}
.qt-head .num { text-align: right; }
.qt-section { border-bottom: 1px solid var(--border); background: var(--surface); }
.qt-section:last-child { border-bottom: 0; }
.qt-section-head {
  display: grid; grid-template-columns: 1fr auto; gap: 16px;
  padding: 14px 24px;
  font-size: 14px; color: var(--ink); font-weight: 600;
  background: var(--surface-tint);
  border-top: 1px solid var(--border);
  border-bottom: 1px solid var(--border);
  letter-spacing: 0.005em;
}
.qt-section:first-of-type .qt-section-head { border-top: 0; }
.qt-section-head .subtotal { font-family: var(--font-mono); font-weight: 600; color: var(--ink); font-size: 13px; }
.qt-row {
  display: grid; grid-template-columns: 1fr 80px 80px 100px; gap: 16px;
  padding: 12px 24px; align-items: start; transition: background 120ms var(--ease);
}
.qt-row:hover { background: var(--surface-tint); }
.qt-row .desc { display: flex; align-items: start; gap: 12px; }
.qt-row .desc .info-btn {
  flex-shrink: 0; width: 28px; height: 28px; border-radius: 999px;
  border: 1px solid var(--border-strong); background: var(--surface);
  color: var(--ink-quiet); cursor: pointer; display: grid; place-items: center;
  transition: all 120ms var(--ease); margin-top: -2px;
}
.qt-row .desc .info-btn:hover { border-color: var(--ink); color: var(--ink); }
.qt-row.has-thread .info-btn { border-color: var(--accent); background: var(--accent-tint); color: var(--accent-ink); }
.qt-row .desc .title { font-size: 15px; font-weight: 500; color: var(--ink); }
.qt-row .desc .sub { font-size: 14px; color: var(--ink-quiet); margin-top: 2px; }
.qt-row .qty, .qt-row .rate, .qt-row .amount {
  font-family: var(--font-mono); font-size: 13px; font-variant-numeric: tabular-nums; padding-top: 4px;
}
.qt-row .qty { color: var(--ink-soft); text-align: right; }
.qt-row .rate { color: var(--ink-quiet); text-align: right; }
.qt-row .amount { color: var(--ink); font-weight: 600; text-align: right; }
.qt-detail-wrapper { display: none; padding: 4px 24px 16px 64px; font-size: 15px; color: var(--ink-soft); line-height: 1.55; }
.qt-row.open + .qt-detail-wrapper { display: block; }

body.sales-mode .qt-row::before {
  content: ''; display: inline-block; width: 12px; height: 12px;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 12 12'%3E%3Ccircle cx='4' cy='3' r='1' fill='%238A8580'/%3E%3Ccircle cx='4' cy='6' r='1' fill='%238A8580'/%3E%3Ccircle cx='4' cy='9' r='1' fill='%238A8580'/%3E%3Ccircle cx='8' cy='3' r='1' fill='%238A8580'/%3E%3Ccircle cx='8' cy='6' r='1' fill='%238A8580'/%3E%3Ccircle cx='8' cy='9' r='1' fill='%238A8580'/%3E%3C/svg%3E");
  background-size: contain; background-repeat: no-repeat;
  position: absolute; left: 6px; top: 18px; cursor: grab; opacity: 0.6;
}
body.sales-mode .qt-row { position: relative; padding-left: 26px; }
.add-row {
  display: none; padding: 10px 24px; font-size: 12px; color: var(--rf-blue);
  background: var(--surface-tint); border-top: 1px dashed var(--border-strong);
  cursor: pointer; font-family: var(--font-mono); text-transform: uppercase; letter-spacing: 0.06em;
}
.add-row:hover { background: var(--accent-tint); color: var(--accent-ink); }
body.sales-mode .add-row { display: block; }

.qt-totals { padding: 16px 24px; background: var(--surface); border-top: 1px solid var(--border); }
.qt-totals .row-line {
  display: grid; grid-template-columns: 1fr auto; padding: 6px 0;
  font-size: 14px; font-variant-numeric: tabular-nums;
}
.qt-totals .row-line.discount { color: var(--success); }
.qt-totals .row-line.subtle { color: var(--ink-quiet); font-size: 13px; }
.qt-totals .row-line.total { font-size: 22px; font-weight: 600; padding-top: 12px; border-top: 1px solid var(--border-strong); margin-top: 8px; }

/* basis disclosure */
details.basis { margin-top: 16px; }
details.basis summary {
  cursor: pointer; font-size: 13px; color: var(--ink-quiet);
  font-family: var(--font-mono); text-transform: uppercase; letter-spacing: 0.08em;
  user-select: none; padding: 8px 0; display: flex; align-items: center; gap: 6px;
}
details.basis summary:hover { color: var(--ink); }
details.basis summary::-webkit-details-marker { display: none; }
details.basis summary::before { content: '+'; font-size: 14px; }
details.basis[open] summary::before { content: '−'; }
.basis-grid {
  display: grid; grid-template-columns: repeat(auto-fit, minmax(140px, 1fr)); gap: 16px;
  margin-top: 12px; padding: 20px; background: var(--surface-tint);
  border: 1px solid var(--border); border-radius: 8px;
}
.basis-grid .label { font-family: var(--font-mono); font-size: 11px; color: var(--ink-quiet); text-transform: uppercase; letter-spacing: 0.08em; margin-bottom: 4px; }
.basis-grid .value { font-family: var(--font-mono); font-weight: 600; color: var(--ink); font-size: 17px; }

/* ─── Decision (radio cards) ───────────────────────────────── */
.decision { margin-top: 24px; display: flex; flex-direction: column; gap: 12px; }
.opt {
  display: grid; grid-template-columns: 24px 1fr auto; gap: 20px; align-items: start;
  padding: 24px; background: var(--surface-tint);
  border: 1px solid var(--border); border-radius: 12px;
  cursor: pointer; transition: all 120ms var(--ease);
}
.opt:hover { border-color: var(--border-strong); background: var(--surface); }
.opt.selected { border-color: var(--accent); border-left: 3px solid var(--accent); padding-left: 22px; background: var(--surface); }
.opt .radio {
  width: 18px; height: 18px; border-radius: 50%;
  border: 1.5px solid var(--border-strong); flex-shrink: 0; margin-top: 4px; position: relative;
}
.opt.selected .radio { border-color: var(--accent); }
.opt.selected .radio::after { content: ''; position: absolute; inset: 3px; border-radius: 50%; background: var(--accent); border: 2px solid white; }
.opt .title { font-size: 17px; font-weight: 600; margin-bottom: 6px; }
.opt .blurb { font-size: 15px; color: var(--ink-soft); line-height: 1.5; }
.opt .pill { margin-bottom: 8px; }
.opt .price-block { text-align: right; white-space: nowrap; }
.opt .price { font-family: var(--font-mono); font-size: 22px; font-weight: 600; color: var(--ink); font-variant-numeric: tabular-nums; }
.opt .price-sub { font-family: var(--font-mono); font-size: 11px; color: var(--ink-quiet); text-transform: uppercase; letter-spacing: 0.08em; margin-top: 4px; }

/* ─── TARGET method letter rows ────────────────────────────── */
.target-row { display: grid; grid-template-columns: 80px 1fr; gap: 24px; padding: 20px 0; border-top: 1px solid var(--border); align-items: start; }
.target-row:last-child { border-bottom: 1px solid var(--border); }
.target-row .letter {
  font-size: 36px; font-weight: 600; color: var(--accent);
  letter-spacing: -0.02em; line-height: 1; padding-top: 4px;
}
.target-row .name { font-size: 17px; font-weight: 600; margin-bottom: 4px; }
.target-row .desc { font-size: 15px; color: var(--ink-soft); line-height: 1.55; }

/* ─── Included / excluded ──────────────────────────────────── */
.inout { display: grid; grid-template-columns: 1fr 1fr; gap: 32px; margin-top: 16px; }
@media (max-width: 600px) { .inout { grid-template-columns: 1fr; } }
.inout .col h3 {
  font-family: var(--font-mono); font-size: 13px; font-weight: 500;
  text-transform: uppercase; letter-spacing: 0.08em;
  color: var(--ink-quiet); margin-bottom: 12px;
  padding-bottom: 8px; border-bottom: 2px solid var(--ink);
}
.inout ul { list-style: none; padding: 0; margin: 0; }
.inout li {
  font-size: 15px; color: var(--ink); padding: 10px 0 10px 28px;
  position: relative; line-height: 1.45; border-bottom: 1px solid var(--border);
}
.inout li:last-child { border-bottom: 0; }
.inout li svg { position: absolute; left: 0; top: 12px; }
.inout .col.included li svg { color: var(--rf-teal); }
.inout .col.excluded li svg { color: var(--ink-quiet); }

/* ─── Support cards ────────────────────────────────────────── */
.support-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 12px; margin-top: 24px; }
@media (max-width: 700px) { .support-grid { grid-template-columns: 1fr; } }
.support-card {
  padding: 20px; border: 1px solid var(--border); border-radius: 12px;
  background: var(--surface-tint);
}
.support-card.recommended { border-left: 3px solid var(--accent); padding-left: 18px; background: var(--surface); }
.support-card h4 { margin-bottom: 8px; }
.support-card p { font-size: 14px; color: var(--ink-soft); margin-bottom: 12px; }
.support-card .price { font-family: var(--font-mono); font-size: 13px; color: var(--ink); font-weight: 600; }

.sla-table { width: 100%; border-collapse: collapse; margin-top: 16px; font-size: 14px; }
.sla-table th {
  text-align: left; padding: 10px 12px; border-bottom: 2px solid var(--ink);
  font-family: var(--font-mono); text-transform: uppercase; font-size: 11px;
  letter-spacing: 0.08em; color: var(--ink-quiet); font-weight: 500;
}
.sla-table td { padding: 14px 12px; border-bottom: 1px solid var(--border); vertical-align: top; }
.sla-table .response { font-family: var(--font-mono); color: var(--ink); }

/* ─── Stats row ────────────────────────────────────────────── */
.stat-row { display: grid; grid-template-columns: repeat(3, 1fr); gap: 24px; padding: 32px; background: var(--surface-tint); border: 1px solid var(--border); border-radius: 12px; margin-top: 24px; }
@media (max-width: 700px) { .stat-row { grid-template-columns: 1fr; } }
.stat { display: flex; flex-direction: column; gap: 8px; }
.stat-label { font-family: var(--font-mono); font-size: 11px; color: var(--ink-quiet); text-transform: uppercase; letter-spacing: 0.08em; }
.stat-value { font-size: 32px; font-weight: 600; letter-spacing: -0.02em; color: var(--ink); font-variant-numeric: tabular-nums; }
.stat-suffix { color: var(--ink-quiet); font-size: 14px; margin-left: 6px; font-weight: 400; }

/* ─── Gantt ────────────────────────────────────────────────── */
.gantt { margin-top: 20px; padding: 24px; background: var(--surface-tint); border: 1px solid var(--border); border-radius: 12px; }
.gantt .months {
  display: grid; grid-template-columns: 140px repeat(9, 1fr); gap: 4px;
  font-family: var(--font-mono); font-size: 11px; color: var(--ink-quiet);
  text-transform: uppercase; letter-spacing: 0.08em;
  padding-bottom: 12px; border-bottom: 1px solid var(--border);
}
.gantt .months span { text-align: center; }
.gantt .row-g { display: grid; grid-template-columns: 140px 1fr; gap: 4px; padding: 10px 0; align-items: center; border-bottom: 1px solid var(--border); }
.gantt .row-g:last-child { border-bottom: 0; }
.gantt .row-g .label { font-size: 14px; color: var(--ink); font-weight: 500; }
.gantt .bar-track { display: grid; grid-template-columns: repeat(9, 1fr); gap: 4px; }
.gantt .bar { height: 12px; border-radius: 4px; }
.gantt .bar.fitgap { background: var(--accent); }
.gantt .bar.proj { background: var(--rf-blue); }
.gantt .bar.train { background: var(--rf-teal); }
.gantt .bar.support { background: linear-gradient(90deg, var(--rf-teal), color-mix(in srgb, var(--rf-teal), transparent 60%)); }

/* ─── Buttons ──────────────────────────────────────────────── */
.btn {
  display: inline-flex; align-items: center; gap: 8px;
  font: inherit; font-weight: 500;
  padding: 12px 20px; border-radius: 10px; border: 1px solid transparent;
  cursor: pointer; text-decoration: none;
  transition: all 150ms var(--ease); white-space: nowrap;
}
.btn-primary { background: var(--accent); color: white; }
.btn-primary:hover { background: var(--accent-ink); }
.btn-ghost { background: transparent; border-color: var(--border-strong); color: var(--ink); }
.btn-ghost:hover { border-color: var(--ink); }

/* ─── Sticky sign bar ──────────────────────────────────────── */
.signbar {
  position: fixed; bottom: 0; left: 0; right: 0; z-index: 50;
  background: var(--surface); border-top: 1px solid var(--border);
  padding: 16px 32px;
  display: flex; align-items: center; justify-content: center; gap: 24px;
  box-shadow: 0 -4px 20px rgba(40, 30, 10, 0.06);
}
.signbar-inner { display: flex; align-items: center; gap: 24px; max-width: 1200px; width: 100%; }
.signbar .recap-name { font-size: 15px; font-weight: 600; color: var(--ink); }
.signbar .recap-meta { font-size: 13px; color: var(--ink-quiet); margin-top: 2px; }
.signbar .total-block { margin-left: auto; text-align: right; }
.signbar .total { font-family: var(--font-mono); font-size: 22px; font-weight: 600; color: var(--ink); font-variant-numeric: tabular-nums; }
.signbar .total-sub { font-size: 11px; color: var(--ink-quiet); font-family: var(--font-mono); text-transform: uppercase; letter-spacing: 0.08em; margin-top: 2px; }
.signbar .actions { display: flex; gap: 10px; }
@media (max-width: 720px) { .signbar { padding: 12px 16px; } .signbar-inner { flex-wrap: wrap; gap: 12px; } .signbar .recap { width: 100%; } }

/* ─── Floating help ────────────────────────────────────────── */
.help-fab {
  position: fixed; bottom: 96px; right: 24px; z-index: 55;
  width: 48px; height: 48px; border-radius: 50%;
  background: var(--ink); color: white; border: none; cursor: pointer;
  display: grid; place-items: center;
  box-shadow: 0 4px 16px rgba(0,0,0,0.16);
}
.help-fab:hover { background: var(--accent-ink); }
.help-fab .pill-counter {
  position: absolute; top: -4px; right: -4px;
  border-color: var(--surface); background: var(--accent);
}

.help-panel {
  position: fixed; bottom: 156px; right: 24px; z-index: 55;
  width: 380px; max-height: 520px; background: var(--surface);
  border: 1px solid var(--border); border-radius: 14px;
  box-shadow: 0 24px 60px rgba(0, 0, 0, 0.16);
  display: none; flex-direction: column; overflow: hidden;
}
.help-panel.open { display: flex; }
.help-head { padding: 16px 20px; border-bottom: 1px solid var(--border); display: flex; justify-content: space-between; align-items: flex-start; }
.help-head h4 { font-size: 17px; }
.help-head .sub { font-size: 13px; color: var(--ink-quiet); margin-top: 2px; }
.help-head button { background: transparent; border: 0; cursor: pointer; color: var(--ink-quiet); padding: 4px; }
.help-head button:hover { color: var(--ink); }
.help-stream { flex: 1; overflow-y: auto; padding: 20px; display: flex; flex-direction: column; gap: 12px; }
.msg { font-size: 15px; line-height: 1.55; }
.msg.user { background: var(--surface-tint); border: 1px solid var(--border); padding: 12px 14px; border-radius: 10px; align-self: flex-end; max-width: 85%; }
.msg.ai { color: var(--ink); }
.msg.ai .who { font-family: var(--font-mono); font-size: 11px; color: var(--ink-quiet); text-transform: uppercase; letter-spacing: 0.08em; margin-bottom: 6px; }
.help-input { padding: 14px 20px; border-top: 1px solid var(--border); display: flex; gap: 8px; }
.help-input input { flex: 1; padding: 10px 14px; border: 1px solid var(--border); border-radius: 8px; font-size: 14px; background: var(--surface-tint); }
.help-input input:focus { outline: none; border-color: var(--accent); background: var(--surface); box-shadow: 0 0 0 3px var(--accent-tint); }
.help-input button { background: var(--ink); color: white; border: 0; padding: 10px 14px; border-radius: 8px; cursor: pointer; }

/* ─── Footer signature (separate from sheet feet) ─────────── */
.footer-sig {
  max-width: 808px; margin: 32px auto 8px;
  padding: 0 32px;
  font-family: var(--font-mono); font-size: 13px;
  color: var(--ink-quiet); text-align: center; letter-spacing: 0.04em;
}
.footer-sig strong { color: var(--accent); font-weight: 500; }
