/* ==========================================================================
   Promptly Team Hub — shared styles for every tool.
   Brand: Stringer Light (display) + ABC Repro (body)
   Primary #2069F7 · Light Grey #F6F6F2 · Ink #1a1a19
   ========================================================================== */

@font-face { font-family: 'Stringer'; src: local('Stringer Light'), local('Stringer'); font-weight: 300; }
@font-face { font-family: 'ABC Repro'; src: local('ABC Repro Regular'), local('ABC Repro'); font-weight: 400; }
@font-face { font-family: 'ABC Repro'; src: local('ABC Repro Medium'), local('ABC Repro-Medium'); font-weight: 500; }

:root {
  --promptly-blue: #2069F7;
  --promptly-blue-dark: #1a5bd9;
  --promptly-grey: #F6F6F2;
  --ink: #1a1a19;
  --muted: #6a6a68;
  --hairline: #e0e0d8;
  --soft: #fafaf7;

  --calc-1: #2069F7;
  --calc-2: #EE94F4;
  --calc-3: #34C759;
  --calc-4: #F9D94C;
  --calc-5: #29B6F6;

  --radius-sm: 6px;
  --radius-md: 10px;
  --radius-lg: 12px;
}

* { box-sizing: border-box; }

/* A class that sets `display` will otherwise beat the browser's built-in
   [hidden] rule, silently showing elements we've hidden in markup. */
[hidden] { display: none !important; }

body {
  margin: 0;
  background: #f0f0eb;
  font-family: 'ABC Repro', -apple-system, BlinkMacSystemFont, 'Helvetica Neue', sans-serif;
  color: var(--ink);
  -webkit-font-smoothing: antialiased;
  font-size: 14px;
  line-height: 1.5;
}

a { color: var(--promptly-blue); }
.display { font-family: 'Stringer', Georgia, serif; font-weight: 400; }

/* ---------- Layout ---------- */
.app { max-width: 980px; margin: 0 auto; padding: 28px 24px 120px; }

.app-header {
  display: flex; align-items: center; justify-content: space-between; gap: 16px;
  padding-bottom: 20px; border-bottom: 0.5px solid var(--hairline);
  margin-bottom: 26px; flex-wrap: wrap;
}
.brand-lockup { display: flex; align-items: center; gap: 14px; }
.brand-lockup img { height: 30px; width: auto; display: block; }
.brand-lockup a { display: block; line-height: 0; }
.brand-divider { width: 1px; height: 22px; background: var(--hairline); }
.brand-tag {
  font-size: 11px; color: var(--muted); letter-spacing: 2px;
  text-transform: uppercase; font-weight: 500;
}

.header-right { display: flex; align-items: center; gap: 14px; }
.user-chip { display: flex; align-items: center; gap: 9px; }
.user-chip img { width: 30px; height: 30px; border-radius: 50%; display: block; }
.user-chip .avatar-fallback {
  width: 30px; height: 30px; border-radius: 50%; background: var(--promptly-blue);
  color: #fff; display: flex; align-items: center; justify-content: center;
  font-size: 11px; font-weight: 500;
}
.user-chip .user-meta { line-height: 1.25; }
.user-chip .user-name { font-size: 13px; font-weight: 500; }
.user-chip .user-email { font-size: 11px; color: var(--muted); }

.nav-links { display: flex; gap: 6px; }
.nav-links a {
  font-size: 12.5px; padding: 7px 13px; border-radius: 20px;
  background: #fff; border: 0.5px solid var(--hairline);
  color: var(--ink); text-decoration: none; transition: all .15s; white-space: nowrap;
}
.nav-links a:hover { border-color: var(--promptly-blue); color: var(--promptly-blue); }
.nav-links a.active { background: var(--promptly-blue); border-color: var(--promptly-blue); color: #fff; }

h1.app-title {
  font-family: 'Stringer', Georgia, serif; font-weight: 400;
  font-size: 32px; line-height: 1.1; margin: 0 0 8px; letter-spacing: -0.5px;
}
.app-lead { font-size: 14px; color: var(--muted); margin: 0 0 26px; max-width: 660px; }

/* ---------- Hub: tool directory ---------- */
.tool-grid {
  display: grid; grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
  gap: 16px; margin-top: 8px;
}
.tool-card {
  background: #fff; border: 0.5px solid var(--hairline);
  border-left: 5px solid var(--accent, var(--promptly-blue));
  border-radius: var(--radius-lg); padding: 20px 22px;
  text-decoration: none; color: var(--ink); display: block;
  transition: transform .15s, box-shadow .15s, border-color .15s;
}
a.tool-card:hover {
  transform: translateY(-2px);
  box-shadow: 0 8px 24px rgba(0,0,0,.08);
}
.tool-card.is-soon { opacity: .6; }
.tool-head { display: flex; align-items: center; gap: 9px; margin-bottom: 8px; flex-wrap: wrap; }
.tool-dot { width: 9px; height: 9px; border-radius: 50%; display: inline-block; flex: none; }
.tool-icon {
  width: 34px; height: 34px; border-radius: 9px; flex: none;
  display: flex; align-items: center; justify-content: center;
  background: color-mix(in srgb, currentColor 12%, transparent);
}
.tool-icon svg { width: 19px; height: 19px; display: block; }
.tool-card, .tool-card * { text-decoration: none; }
.tool-name { font-family: 'Stringer', Georgia, serif; font-size: 21px; margin: 0; font-weight: 400; }
.tool-badge {
  font-size: 9.5px; letter-spacing: 1px; text-transform: uppercase; font-weight: 500;
  background: var(--promptly-grey); color: var(--muted); padding: 3px 9px; border-radius: 12px;
}
.tool-tagline { font-size: 12.5px; color: var(--muted); margin: 0 0 12px; line-height: 1.5; }
.tool-bullets { margin: 0 0 14px; padding: 0; list-style: none; }
.tool-bullets li {
  font-size: 12px; line-height: 1.5; padding-left: 14px; position: relative; color: var(--ink);
}
.tool-bullets li::before { content: '—'; color: var(--muted); position: absolute; left: 0; }
.tool-cta { font-size: 12.5px; font-weight: 500; color: var(--promptly-blue); }

/* ---------- Docs library ---------- */
.doc-list { display: flex; flex-direction: column; gap: 12px; }
.doc-card {
  display: block; background: #fff; border: 0.5px solid var(--hairline);
  border-left: 5px solid var(--promptly-blue); border-radius: var(--radius-lg);
  padding: 18px 22px; text-decoration: none; color: var(--ink);
  transition: transform .15s, box-shadow .15s;
}
/* The whole card is one link, so every child would otherwise inherit link
   colour and underline — which is what it looks like if the stylesheet is
   ever stale or slow. Pinning these makes the failure mode far less ugly. */
.doc-card, .doc-card * { text-decoration: none; }
.doc-card .doc-title, .doc-card .doc-summary, .doc-card .doc-meta { color: inherit; }
.doc-card .doc-summary, .doc-card .doc-meta { color: var(--muted); }
a.doc-card:hover { transform: translateY(-2px); box-shadow: 0 8px 24px rgba(0,0,0,.08); }
.doc-card.is-draft { opacity: .55; border-left-color: var(--muted); }
.doc-head { display: flex; align-items: center; gap: 10px; margin-bottom: 6px; flex-wrap: wrap; }
.doc-title { font-family: 'Stringer', Georgia, serif; font-size: 20px; margin: 0; font-weight: 400; }
.doc-audience {
  font-size: 9.5px; letter-spacing: 1px; text-transform: uppercase; font-weight: 500;
  padding: 3px 9px; border-radius: 12px; background: var(--promptly-grey); color: var(--muted);
}
.doc-audience.aud-rep { background: #e6f1fb; color: #14417f; }
.doc-audience.aud-leadership { background: #f3eafd; color: #55308b; }
.doc-audience.aud-prospect { background: #eaf7ee; color: #1d6b39; }
.doc-draft {
  font-size: 9.5px; letter-spacing: 1px; text-transform: uppercase;
  font-weight: 500; color: var(--muted);
}
.doc-summary { font-size: 12.5px; color: var(--muted); line-height: 1.5; margin: 0 0 10px; }
.doc-meta { font-size: 11px; color: var(--muted); }
.doc-cta { font-size: 12.5px; font-weight: 500; color: var(--promptly-blue); display: inline-block; margin-top: 8px; }

/* ---------- A document page ---------- */
.doc-bar {
  display: flex; align-items: center; justify-content: space-between; gap: 14px;
  background: var(--promptly-grey); border-radius: var(--radius-md);
  padding: 11px 16px; margin-bottom: 22px; flex-wrap: wrap;
}
.doc-bar .doc-version { font-size: 11.5px; color: var(--muted); }
.doc-bar .doc-version strong { color: var(--ink); font-weight: 500; }

/* Reads as a sheet of paper rather than a web page — it's a document, and
   the visual cue helps people treat it like one. */
.doc-body {
  max-width: 46rem; background: #fff; border: 0.5px solid var(--hairline);
  border-radius: var(--radius-lg); padding: 34px 40px 30px;
}
.doc-body > :first-child { margin-top: 0; }
.doc-body h2 {
  font-family: 'Stringer', Georgia, serif; font-weight: 400; font-size: 22px;
  margin: 30px 0 10px; line-height: 1.15;
}
.doc-body h3 {
  font-family: 'Stringer', Georgia, serif; font-weight: 400; font-size: 16px;
  margin: 18px 0 6px;
}
.doc-body p { font-size: 14px; line-height: 1.65; margin: 0 0 12px; }
.doc-body strong { font-weight: 500; }
.doc-body ul, .doc-body ol { margin: 0 0 14px; padding-left: 20px; }
.doc-body li { font-size: 14px; line-height: 1.6; margin-bottom: 7px; }

.doc-steps { counter-reset: step; list-style: none; padding: 0; margin: 0 0 16px; }
.doc-steps li {
  counter-increment: step; position: relative; padding-left: 34px; margin-bottom: 12px;
}
.doc-steps li::before {
  content: counter(step); position: absolute; left: 0; top: 1px;
  width: 22px; height: 22px; border-radius: 50%;
  background: var(--promptly-blue); color: #fff; font-size: 11.5px; font-weight: 500;
  display: flex; align-items: center; justify-content: center;
}

.doc-callout {
  background: var(--soft); border: 0.5px solid var(--hairline);
  border-left: 4px solid var(--accent, var(--promptly-blue));
  border-radius: 0 var(--radius-md) var(--radius-md) 0;
  padding: 14px 18px; margin: 0 0 16px;
}
.doc-callout h3 { margin-top: 0; }
.doc-callout p:last-child { margin-bottom: 0; }

.doc-quote {
  border-left: 3px solid var(--promptly-blue); background: var(--promptly-grey);
  padding: 12px 16px; border-radius: 0 6px 6px 0; margin: 0 0 16px;
  font-size: 13.5px; line-height: 1.55;
}

.when-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 9px; margin-bottom: 16px; }
.when-row {
  background: var(--promptly-grey); border-radius: 6px; padding: 11px 14px;
  border-left: 3px solid var(--accent); font-size: 12.5px; line-height: 1.45;
}
.when-row .n { font-weight: 500; display: block; }
.when-row .w { color: var(--muted); }

.doc-changes {
  margin-top: 34px; padding-top: 16px; border-top: 0.5px solid var(--hairline);
  font-size: 11.5px; color: var(--muted);
}
.doc-changes ul { margin: 6px 0 0; padding-left: 18px; }
.doc-changes li { font-size: 11.5px; margin-bottom: 3px; }

@media print {
  .app-header, .doc-bar, .nav-links, .btn { display: none !important; }
  body { background: #fff; }
  .app { padding: 0; max-width: 100%; }
  .doc-body { max-width: 100%; border: none; padding: 0; }
  .doc-callout, .doc-quote, .when-row { break-inside: avoid; }
  @page { size: letter; margin: 0.6in; }
}

@media (max-width: 720px) {
  .when-grid { grid-template-columns: 1fr; }
}

/* ---------- Cards & fields ---------- */
.card {
  background: #fff; border: 0.5px solid var(--hairline);
  border-radius: var(--radius-lg); padding: 20px 24px; margin-bottom: 20px;
}
.card-title {
  font-size: 11px; color: var(--promptly-blue); font-weight: 500;
  letter-spacing: 2px; text-transform: uppercase; margin-bottom: 14px;
}

.grid-2 { display: grid; grid-template-columns: repeat(2, minmax(0,1fr)); gap: 14px; }
.grid-3 { display: grid; grid-template-columns: repeat(3, minmax(0,1fr)); gap: 14px; }

.field { display: flex; flex-direction: column; }
.field label { font-size: 11px; color: var(--muted); margin-bottom: 5px; letter-spacing: .3px; }
.field input, .field select, .field textarea {
  padding: 10px 12px; border: 0.5px solid var(--hairline); border-radius: var(--radius-sm);
  font-family: inherit; font-size: 13px; color: var(--ink); background: var(--soft);
  outline: none; transition: border-color .15s, background .15s; width: 100%;
}
.field input:focus, .field select:focus, .field textarea:focus {
  border-color: var(--promptly-blue); background: #fff;
}
.field .hint { font-size: 10.5px; color: var(--muted); margin-top: 4px; }

/* ---------- HubSpot company picker ---------- */
.hs-results {
  position: absolute; top: calc(100% + 4px); left: 0; right: 0; z-index: 30;
  background: #fff; border: 0.5px solid var(--hairline); border-radius: var(--radius-md);
  box-shadow: 0 8px 24px rgba(0,0,0,.10); max-height: 320px; overflow-y: auto;
}
.hs-result {
  display: block; width: 100%; text-align: left; background: transparent;
  border: none; border-bottom: 0.5px solid var(--hairline); padding: 11px 14px;
  cursor: pointer; font-family: inherit; transition: background .12s;
}
.hs-result:last-child { border-bottom: none; }
.hs-result:hover { background: var(--soft); }
.hs-result-name { display: block; font-size: 13.5px; font-weight: 500; }
.hs-result-meta { display: block; font-size: 11.5px; color: var(--muted); margin-top: 2px; }
.hs-result-vendors { display: block; font-size: 11px; color: var(--muted); margin-top: 3px; font-style: italic; }
.hs-hint { padding: 12px 14px; font-size: 12.5px; color: var(--muted); }
.hs-hint.error { color: #8b2c22; }

.hs-selected {
  display: flex; align-items: center; justify-content: space-between; gap: 12px;
  background: var(--promptly-grey); border-left: 4px solid var(--promptly-blue);
  border-radius: 0 var(--radius-sm) var(--radius-sm) 0; padding: 11px 14px;
}
.hs-selected-name { font-size: 13.5px; font-weight: 500; }
.hs-selected-meta { font-size: 11.5px; color: var(--muted); margin-top: 2px; }

/* ---------- Calculator cards ---------- */
.calc {
  background: #fff; border: 0.5px solid var(--hairline);
  border-radius: var(--radius-lg); margin-bottom: 18px; overflow: hidden;
}
.calc-header { padding: 18px 24px 14px; border-left: 6px solid var(--accent, var(--promptly-blue)); }
.calc-num {
  font-size: 10px; color: var(--muted); letter-spacing: 1.5px;
  text-transform: uppercase; font-weight: 500; margin-bottom: 4px;
}
.calc-name { font-family: 'Stringer', Georgia, serif; font-size: 22px; line-height: 1.15; margin: 0 0 4px; font-weight: 400; }
.calc-pitch { font-size: 12.5px; color: var(--muted); margin: 0; line-height: 1.5; }

.calc-body {
  display: grid; grid-template-columns: 1fr 1.2fr; gap: 24px;
  padding: 20px 24px 22px; border-bottom: 0.5px solid var(--hairline);
}
.calc-body .inputs, .calc-body .outputs { display: flex; flex-direction: column; gap: 12px; }
.col-label {
  font-size: 10px; color: var(--muted); letter-spacing: 1.5px;
  text-transform: uppercase; font-weight: 500; margin-bottom: 2px;
}

.output-row {
  display: flex; align-items: baseline; justify-content: space-between; gap: 12px;
  padding: 8px 0; border-bottom: 0.5px solid var(--hairline);
}
.output-row:last-child { border-bottom: none; }
.output-row .label { font-size: 12.5px; }
.output-row .value { font-family: 'Stringer', Georgia, serif; font-size: 22px; white-space: nowrap; }
.output-row.zero .value { color: #c8c8c0; }

/* ---------- Collapsible detail sections ---------- */
.calc-extras { padding: 4px 24px 18px; }
details { border-top: 0.5px solid var(--hairline); padding: 12px 0 8px; }
details:first-of-type { border-top: none; }
details summary {
  cursor: pointer; list-style: none; display: flex; align-items: center;
  justify-content: space-between; font-size: 12px; font-weight: 500;
  letter-spacing: .3px; padding: 4px 0;
}
details summary::-webkit-details-marker { display: none; }
details summary::after { content: '+'; font-size: 18px; color: var(--muted); font-weight: 400; }
details[open] summary::after { content: '\2212'; }
details .body { padding: 10px 0 6px; font-size: 12.5px; line-height: 1.55; }
details .body p { margin: 0 0 8px; }
details .body p:last-child { margin-bottom: 0; }
.quote {
  background: var(--soft); border-left: 3px solid var(--accent, var(--promptly-blue));
  padding: 10px 12px; border-radius: 4px; margin: 6px 0; font-size: 12.5px;
}
.formula {
  font-family: 'SF Mono', Menlo, Consolas, monospace; background: var(--soft);
  padding: 8px 10px; border-radius: 4px; display: block; font-size: 11px;
  line-height: 1.55; white-space: pre-wrap;
}
.objection { margin-bottom: 10px; }
.objection .q { color: var(--muted); font-style: italic; font-size: 12px; margin-bottom: 2px; }
.objection .a { font-size: 12.5px; }

/* ---------- Buttons ---------- */
.btn {
  background: #fff; border: 0.5px solid var(--hairline); color: var(--ink);
  padding: 9px 16px; font-size: 12.5px; border-radius: var(--radius-sm);
  cursor: pointer; font-family: inherit; font-weight: 500; transition: all .15s;
  text-decoration: none; display: inline-flex; align-items: center; gap: 7px;
}
.btn:hover:not(:disabled) { border-color: var(--promptly-blue); color: var(--promptly-blue); }
.btn:disabled { opacity: .45; cursor: not-allowed; }
.btn.primary { background: var(--promptly-blue); color: #fff; border-color: var(--promptly-blue); }
.btn.primary:hover:not(:disabled) { background: var(--promptly-blue-dark); color: #fff; border-color: var(--promptly-blue-dark); }
.btn.success { background: var(--calc-3); color: #fff; border-color: var(--calc-3); }
.btn.small { padding: 6px 11px; font-size: 11.5px; }
.btn.ghost { background: transparent; border-color: transparent; color: var(--muted); }
.btn.ghost:hover { color: var(--promptly-blue); }
.copy-btn {
  background: transparent; border: 0.5px solid var(--hairline); color: var(--muted);
  padding: 4px 10px; font-size: 11px; border-radius: 4px; cursor: pointer;
  font-family: inherit; transition: all .15s; margin-top: 4px;
}
.copy-btn:hover { border-color: var(--promptly-blue); color: var(--promptly-blue); }
.copy-btn.copied { border-color: var(--calc-3); color: var(--calc-3); }

/* ---------- Sticky action bar ---------- */
.action-bar {
  position: sticky; bottom: 16px; background: #fff;
  border: 0.5px solid var(--hairline); border-radius: var(--radius-lg);
  padding: 14px 18px; margin-top: 30px; display: flex; align-items: center;
  justify-content: space-between; gap: 12px; flex-wrap: wrap;
  box-shadow: 0 6px 20px rgba(0,0,0,.07); z-index: 20;
}
.action-bar .status { font-size: 12px; color: var(--muted); }
.action-bar .actions { display: flex; gap: 8px; flex-wrap: wrap; }

/* ---------- Sign-in page ---------- */
.signin-wrap { min-height: 100vh; display: flex; align-items: center; justify-content: center; padding: 24px; }
.signin-card {
  background: #fff; border-radius: 16px; max-width: 440px; width: 100%;
  padding: 44px 40px; box-shadow: 0 10px 40px rgba(0,0,0,.08);
  position: relative; overflow: hidden; text-align: center;
}
.signin-card::before {
  content: ''; position: absolute; top: 0; left: 0; right: 0;
  height: 6px; background: var(--promptly-blue);
}
.signin-card img.logo { height: 34px; width: auto; margin: 8px auto 26px; display: block; }
.signin-card h1 {
  font-family: 'Stringer', Georgia, serif; font-weight: 400; font-size: 30px;
  line-height: 1.12; margin: 0 0 10px; letter-spacing: -.5px;
}
.signin-card p.sub { font-size: 13.5px; color: var(--muted); margin: 0 0 28px; line-height: 1.55; }
.btn-google {
  display: flex; align-items: center; justify-content: center; gap: 10px;
  width: 100%; padding: 13px; border-radius: var(--radius-sm);
  border: 0.5px solid var(--hairline); background: #fff; cursor: pointer;
  font-family: inherit; font-size: 14px; font-weight: 500; color: var(--ink); transition: all .15s;
}
.btn-google:hover { border-color: var(--promptly-blue); box-shadow: 0 2px 10px rgba(32,105,247,.12); }
.btn-google svg { width: 18px; height: 18px; }
.signin-note { font-size: 11.5px; color: var(--muted); margin-top: 20px; line-height: 1.5; }

/* ---------- Alerts ---------- */
.alert { padding: 11px 14px; border-radius: var(--radius-sm); font-size: 12.5px; margin-bottom: 16px; line-height: 1.5; text-align: left; }
.alert.error { background: #fdecea; color: #8b2c22; border: 0.5px solid #f3c0ba; }
.alert.info { background: #eaf1fe; color: #14417f; border: 0.5px solid #c2d7fb; }
.alert.warn { background: #fdf6e3; color: #7a5b12; border: 0.5px solid #f0dfae; }
.alert.hidden { display: none; }

/* ---------- Admin: people ---------- */
.people-table { width: 100%; border-collapse: collapse; }
.people-table th {
  text-align: left; font-size: 10px; letter-spacing: 1.2px; text-transform: uppercase;
  color: var(--muted); font-weight: 500; padding: 0 10px 8px; border-bottom: 0.5px solid var(--hairline);
}
.people-table td { padding: 11px 10px; border-bottom: 0.5px solid var(--hairline); vertical-align: middle; }
.people-table tr:last-child td { border-bottom: none; }
.people-table tr.is-off { opacity: .5; }
.people-table .col-tool { text-align: center; width: 88px; }
.person-name { font-size: 13px; font-weight: 500; }
.person-email { font-size: 11px; color: var(--muted); }
.person-seen { font-size: 12px; white-space: nowrap; }
.person-visits { font-size: 10.5px; color: var(--muted); }
.person-tag {
  font-size: 9px; letter-spacing: .8px; text-transform: uppercase; font-weight: 500;
  background: var(--promptly-blue); color: #fff; padding: 2px 6px; border-radius: 9px; margin-left: 6px;
}
.ext-mark { color: var(--muted); margin-left: 3px; cursor: help; }
.people-note { font-size: 11.5px; color: var(--muted); line-height: 1.55; margin: 14px 0 0; }

.switch {
  width: 38px; height: 21px; border-radius: 11px; border: none; cursor: pointer;
  background: #d3d1c7; position: relative; padding: 0; transition: background .15s;
  display: inline-block; vertical-align: middle;
}
.switch.on { background: var(--calc-3); }
.switch:disabled { cursor: not-allowed; opacity: .4; }
.switch-knob {
  position: absolute; top: 2.5px; left: 2.5px; width: 16px; height: 16px;
  border-radius: 50%; background: #fff; transition: transform .15s;
  box-shadow: 0 1px 3px rgba(0,0,0,.2);
}
.switch.on .switch-knob { transform: translateX(17px); }

/* ---------- Admin: property inventory ---------- */
.prop-group { margin-bottom: 18px; }
.prop-group-head {
  display: flex; align-items: baseline; justify-content: space-between;
  gap: 12px; margin-bottom: 6px;
}
.prop-group-name { font-family: 'Stringer', Georgia, serif; font-size: 16px; }
.prop-group-count { font-size: 11.5px; color: var(--muted); }
.prop-table { width: 100%; border-collapse: collapse; }
.prop-table td {
  padding: 8px 10px; border-bottom: 0.5px solid var(--hairline);
  vertical-align: top; font-size: 12.5px;
}
.prop-table tr:last-child td { border-bottom: none; }
.prop-table tr.is-missing { background: #fdf6e3; }
.prop-state { width: 26px; text-align: center; color: var(--calc-3); font-weight: 500; }
.prop-table tr.is-missing .prop-state { color: #b8860b; }
.prop-label { font-weight: 500; }
.prop-name {
  font-family: 'SF Mono', Menlo, Consolas, monospace;
  font-size: 11px; color: var(--muted);
}
.prop-type {
  font-family: 'SF Mono', Menlo, Consolas, monospace;
  font-size: 11px; color: var(--muted); text-align: right; white-space: nowrap;
}
.prop-warn { color: #8b6d1f; font-family: inherit; font-size: 11px; margin-top: 3px; }

/* ---------- Admin: data health ---------- */
.health-item {
  background: #fff; border: 0.5px solid var(--hairline);
  border-left: 4px solid #b8860b; border-radius: var(--radius-md);
  padding: 14px 18px; margin-bottom: 10px;
  display: flex; align-items: flex-start; justify-content: space-between;
  gap: 16px; flex-wrap: wrap;
}
.health-main { flex: 1; min-width: 260px; }
.health-practice { font-family: 'Stringer', Georgia, serif; font-size: 17px; margin: 0 0 2px; }
.health-meta { font-size: 11.5px; color: var(--muted); margin: 0 0 9px; }
.health-flow { display: flex; align-items: center; gap: 10px; flex-wrap: wrap; font-size: 12.5px; }
.health-arrow { color: var(--muted); }
.health-stale a, .health-current a { font-weight: 500; }
.health-tag {
  font-size: 9.5px; letter-spacing: .8px; text-transform: uppercase; font-weight: 500;
  padding: 2px 7px; border-radius: 10px; margin-left: 5px;
  background: #fdf6e3; color: #8b6d1f;
}
.health-tag.ok { background: #eaf7ee; color: #1d6b39; }

/* ---------- Admin controls (saved estimates) ---------- */
#admin-controls {
  display: flex; align-items: center; gap: 12px;
  margin-bottom: 18px; flex-wrap: wrap;
}
.view-toggle {
  display: inline-flex; background: #fff; border: 0.5px solid var(--hairline);
  border-radius: 20px; padding: 3px; gap: 3px;
}
.view-toggle button {
  border: none; background: transparent; font-family: inherit; font-size: 12.5px;
  padding: 7px 15px; border-radius: 16px; cursor: pointer; color: var(--muted);
  transition: all .15s; font-weight: 500;
}
.view-toggle button:hover { color: var(--promptly-blue); }
.view-toggle button.active { background: var(--promptly-blue); color: #fff; }

#rep-filter {
  padding: 8px 12px; border: 0.5px solid var(--hairline); border-radius: 20px;
  font-family: inherit; font-size: 12.5px; background: #fff; color: var(--ink);
  outline: none; cursor: pointer; max-width: 240px;
}
#rep-filter:focus { border-color: var(--promptly-blue); }

.summary-bar {
  display: flex; gap: 28px; flex-wrap: wrap;
  background: var(--promptly-grey); border-radius: var(--radius-md);
  padding: 14px 20px; margin-bottom: 18px;
}
.summary-bar .stat { display: flex; flex-direction: column; gap: 2px; }
.summary-bar .stat-label {
  font-size: 10px; color: var(--muted); letter-spacing: 1.2px;
  text-transform: uppercase; font-weight: 500;
}
.summary-bar .stat-value { font-family: 'Stringer', Georgia, serif; font-size: 22px; line-height: 1.1; }

/* ---------- History ---------- */
.history-item .h-rep { color: var(--ink); font-weight: 500; }
.history-item {
  background: #fff; border: 0.5px solid var(--hairline); border-radius: var(--radius-md);
  padding: 16px 20px; margin-bottom: 12px; display: flex; justify-content: space-between;
  align-items: flex-start; gap: 20px; flex-wrap: wrap;
}
.history-item .h-main { flex: 1; min-width: 240px; }
.history-item .h-practice { font-family: 'Stringer', Georgia, serif; font-size: 19px; margin: 0 0 3px; }
.history-item .h-meta { font-size: 11.5px; color: var(--muted); margin: 0 0 9px; }
.history-item .h-tags { display: flex; flex-wrap: wrap; gap: 5px; }
.h-tag {
  font-size: 10.5px; padding: 3px 9px; border-radius: 12px;
  background: var(--promptly-grey); border-left: 3px solid var(--accent, var(--promptly-blue));
}
.history-item .h-actions { display: flex; gap: 7px; align-items: center; flex-wrap: wrap; }
.empty-state { text-align: center; padding: 60px 20px; color: var(--muted); }
.empty-state .display { font-size: 22px; color: var(--ink); margin-bottom: 8px; }

.spinner {
  width: 16px; height: 16px; border: 2px solid rgba(255,255,255,.35);
  border-top-color: #fff; border-radius: 50%; display: inline-block; animation: spin .7s linear infinite;
}
.spinner.dark { border-color: rgba(0,0,0,.15); border-top-color: var(--promptly-blue); }
@keyframes spin { to { transform: rotate(360deg); } }
.loading-wrap { text-align: center; padding: 60px 20px; color: var(--muted); font-size: 13px; }

/* ---------- One-pager (offscreen, rendered to PDF) ----------
   The stage is parked off-screen so the rep never sees it. It is moved into
   normal flow for the instant of PDF capture (see withRenderableOnePager in
   roi/js/app.js) because html2canvas returns a blank canvas for content this
   far outside the viewport. The overlay below hides that moment. */
#onepager-stage { position: absolute; left: -10000px; top: 0; width: 8.5in; }

.pdf-overlay {
  position: fixed; inset: 0; background: rgba(240, 240, 235, .97);
  display: none; align-items: center; justify-content: center;
  flex-direction: column; gap: 14px; z-index: 9998;
  font-size: 13px; color: var(--muted);
}
.pdf-overlay.visible { display: flex; }
.onepager {
  width: 8.5in; min-height: 11in; background: #fff; padding: 0.55in 0.6in;
  font-family: 'ABC Repro', -apple-system, sans-serif; color: var(--ink);
  position: relative; box-sizing: border-box;
}
.onepager .op-stripe { position: absolute; top: 0; left: 0; right: 0; height: 6px; background: var(--promptly-blue); }
.onepager .op-header {
  display: flex; justify-content: space-between; align-items: flex-end;
  padding-bottom: 16px; border-bottom: 2px solid var(--promptly-blue); margin-bottom: 26px; margin-top: 10px;
}
.onepager .op-header img { height: 30px; width: auto; }
.onepager .op-meta { text-align: right; font-size: 10px; color: var(--muted); letter-spacing: 1px; text-transform: uppercase; }
.onepager h1 {
  font-family: 'Stringer', Georgia, serif; font-weight: 400; font-size: 32px;
  line-height: 1.1; margin: 0 0 10px; letter-spacing: -.5px;
}
.onepager .op-practice { font-size: 13px; margin: 0 0 16px; }
.onepager .op-practice strong { font-weight: 500; }
.onepager .op-intro { font-size: 12.5px; color: var(--muted); margin: 0 0 20px; line-height: 1.5; }
.onepager .op-result {
  border-left: 4px solid var(--accent, var(--promptly-blue)); padding: 10px 14px;
  margin-bottom: 12px; background: var(--promptly-grey); border-radius: 0 6px 6px 0;
}
.onepager .op-result .name { font-family: 'Stringer', Georgia, serif; font-size: 15px; margin: 0 0 4px; }
.onepager .op-result .summary { font-size: 10.5px; color: var(--muted); margin: 0 0 8px; }
.onepager .op-result .outputs { display: flex; gap: 26px; flex-wrap: wrap; }
.onepager .op-result .out { font-size: 10.5px; color: var(--muted); }
.onepager .op-result .out .out-val {
  font-family: 'Stringer', Georgia, serif; font-size: 17px; color: var(--ink); display: block; margin-top: 2px;
}
.onepager .op-assumptions { margin-top: 16px; font-size: 10px; color: var(--muted); line-height: 1.5; }
.onepager .op-assumptions strong { color: var(--ink); font-weight: 500; }
.onepager .op-footer {
  position: absolute; bottom: 0.5in; left: 0.6in; right: 0.6in;
  border-top: 0.5px solid var(--hairline); padding-top: 10px;
  display: flex; justify-content: space-between; font-size: 10px; color: var(--muted);
}

/* ---------- Responsive ---------- */
@media (max-width: 720px) {
  .app { padding: 18px 14px 120px; }
  .calc-body { grid-template-columns: 1fr; }
  .grid-2, .grid-3 { grid-template-columns: 1fr; }
  .app-header { flex-direction: column; align-items: flex-start; gap: 14px; }
  .header-right { width: 100%; justify-content: space-between; }
  h1.app-title { font-size: 26px; }
  .action-bar { flex-direction: column; align-items: stretch; }
  .action-bar .actions .btn { flex: 1; justify-content: center; }
  .tool-grid { grid-template-columns: 1fr; }
}
