/* ============================================================================
   MSP Sales Process CRM — "Own the Climb" documentation
   brand.css — shared design system (screen + print)
   Mirrors the MSP Sales Process guide template (Playbook Manual / Intensive).
   ========================================================================== */

/* ---- Design tokens ------------------------------------------------------- */
:root {
  --ink:      #24262D;   /* near-black charcoal — text, dark panels, covers   */
  --ink-2:    #2E313A;   /* raised dark panel                                 */
  --orange:   #DF7A31;   /* primary accent                                    */
  --orange-d: #C0651F;   /* orange, darkened for text on light                */
  --olive:    #889B46;   /* secondary accent                                  */
  --olive-d:  #6E7F36;   /* olive, darkened for text on light                 */
  --peach:    #EFC7A9;   /* warm tint (warning panels)                        */
  --peach-bg: #FBEEE2;   /* very light peach panel fill                       */
  --gray:     #4F4F4F;   /* secondary text                                    */
  --neutral:  #F5F5F5;   /* off-white page / panel fill                       */
  --panel:    #F2F1EC;   /* callout panel fill (warm gray)                    */
  --line:     #E1E0DA;   /* hairline rules on light                           */
  --moon:     #D9C39A;   /* cream / tan moon                                  */
  --white:    #FFFFFF;

  --font-serif: "Literata", Georgia, "Times New Roman", serif;
  --font-sub:   "Fira Sans", -apple-system, "Segoe UI", sans-serif;
  --font-body:  "Catamaran", -apple-system, "Segoe UI", sans-serif;

  --measure: 34em;       /* comfortable reading width */
}

/* ---- Reset-ish ----------------------------------------------------------- */
* { box-sizing: border-box; }
body { margin: 0; }
img { max-width: 100%; height: auto; }

/* ---- Base typography ----------------------------------------------------- */
.doc {
  font-family: var(--font-body);
  font-weight: 400;
  font-size: 10.75pt;
  line-height: 1.6;
  color: var(--ink);
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
}
.doc p { margin: 0 0 0.85em; max-width: var(--measure); }
.doc a { color: var(--orange-d); text-decoration: none; }
.doc strong { font-weight: 600; }
.doc em { font-style: italic; }

/* ---- Section opener (body page head) ------------------------------------- */
.kicker {
  font-family: var(--font-sub);
  font-weight: 600;
  font-size: 8.5pt;
  letter-spacing: 0.16em;
  text-transform: uppercase;
  color: var(--orange-d);
  margin: 0 0 0.6em;
}
.h1 {
  font-family: var(--font-serif);
  font-weight: 700;
  font-size: 27pt;
  line-height: 1.08;
  color: var(--ink);
  margin: 0 0 0.35em;
  display: flex;
  align-items: baseline;
  gap: 0.4em;
}
.h1 .num {
  color: var(--orange);
  font-size: 0.82em;
  font-weight: 700;
}
.h1-rule {
  width: 3.2em;
  height: 4px;
  background: var(--olive);
  border: 0;
  margin: 0 0 1.3em;
}
.lead {
  font-family: var(--font-sub);
  font-weight: 400;
  font-size: 12.5pt;
  line-height: 1.5;
  color: var(--gray);
  max-width: var(--measure);
  margin: 0 0 1.5em;
}

/* ---- Headings within a section ------------------------------------------- */
.doc h2 {
  font-family: var(--font-sub);
  font-weight: 700;
  font-size: 15pt;
  color: var(--ink);
  margin: 1.9em 0 0.5em;
  line-height: 1.2;
}
.doc h3 {
  font-family: var(--font-sub);
  font-weight: 600;
  font-size: 11.5pt;
  color: var(--olive-d);
  margin: 1.4em 0 0.35em;
  letter-spacing: 0.01em;
}

/* ---- Lists --------------------------------------------------------------- */
.doc ul, .doc ol { max-width: var(--measure); padding-left: 1.25em; margin: 0 0 0.9em; }
.doc li { margin: 0.28em 0; }
.doc ul { list-style: none; padding-left: 1.25em; }
.doc ul > li { position: relative; }
.doc ul > li::before {
  content: "";
  position: absolute;
  left: -1.05em; top: 0.62em;
  width: 5px; height: 5px;
  background: var(--olive);
  border-radius: 50%;
}

/* ---- Inline UI references (button / field labels, nav paths, keys) ------- */
.ui {
  font-family: var(--font-sub);
  font-weight: 600;
  font-size: 0.88em;
  color: var(--ink);
  background: var(--neutral);
  border: 1px solid var(--line);
  border-radius: 5px;
  padding: 0.05em 0.45em;
  white-space: nowrap;
}
.path {
  font-family: var(--font-sub);
  font-weight: 600;
  font-size: 0.9em;
  color: var(--olive-d);
  white-space: nowrap;
}
.field { font-family: var(--font-sub); font-weight: 600; color: var(--ink); }
kbd {
  font-family: var(--font-sub);
  font-size: 0.82em;
  background: var(--ink);
  color: var(--white);
  border-radius: 4px;
  padding: 0.08em 0.4em;
}

/* ---- Callouts ------------------------------------------------------------ */
.callout {
  max-width: var(--measure);
  background: var(--panel);
  border-left: 5px solid var(--olive);
  border-radius: 0 8px 8px 0;
  padding: 0.9em 1.1em 0.95em;
  margin: 1.25em 0;
  break-inside: avoid;
}
.callout__label {
  font-family: var(--font-sub);
  font-weight: 700;
  font-size: 8pt;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--olive-d);
  margin: 0 0 0.35em;
}
.callout > :last-child { margin-bottom: 0; }
.callout p { max-width: none; }

.callout--tip { border-left-color: var(--orange); }
.callout--tip .callout__label { color: var(--orange-d); }

.callout--warn {
  background: var(--peach-bg);
  border-left-color: var(--orange);
}
.callout--warn .callout__label { color: var(--orange-d); }

/* "Fox & Crow sets this up" service callout — olive, distinct label */
.callout--service { border-left-color: var(--olive); background: #F0F2E8; }
.callout--service .callout__label { color: var(--olive-d); }

/* Methodology tie-back — orange */
.callout--method { border-left-color: var(--orange); background: #FBF1E8; }
.callout--method .callout__label { color: var(--orange-d); }

/* ---- Twin boxes (USE IT WHEN / DON'T USE IT WHEN) ------------------------ */
.twins {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 0.9em;
  margin: 1.3em 0;
  max-width: var(--measure);
  break-inside: avoid;
}
.twin {
  background: var(--panel);
  border-radius: 8px;
  padding: 0.85em 1em 0.9em;
  border-top: 3px solid var(--olive);
}
.twin--use { border-top-color: var(--orange); }
.twin__label {
  font-family: var(--font-sub);
  font-weight: 700;
  font-size: 8pt;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  margin: 0 0 0.4em;
  color: var(--olive-d);
}
.twin--use .twin__label { color: var(--orange-d); }
.twin ul { margin: 0; }
.twin p:last-child, .twin ul:last-child { margin-bottom: 0; }

/* ---- Numbered step list -------------------------------------------------- */
.steps { counter-reset: step; list-style: none; padding: 0; margin: 1.3em 0; max-width: var(--measure); }
.steps > li {
  position: relative;
  padding-left: 2.6em;
  margin: 0 0 1em;
  min-height: 1.8em;
  break-inside: avoid;
}
.steps > li::before {
  counter-increment: step;
  content: counter(step);
  position: absolute;
  left: 0; top: 0;
  width: 1.85em; height: 1.85em;
  background: var(--orange);
  color: var(--white);
  font-family: var(--font-sub);
  font-weight: 700;
  font-size: 0.95em;
  border-radius: 50%;
  display: flex; align-items: center; justify-content: center;
}
.steps > li::marker { content: none; }
.steps .step__title {
  font-family: var(--font-sub);
  font-weight: 700;
  color: var(--ink);
  display: block;
  margin-bottom: 0.1em;
}

/* ---- Script / say-this blocks -------------------------------------------- */
.script {
  background: var(--ink);
  color: var(--white);
  border-radius: 10px;
  padding: 1em 1.15em;
  margin: 1.3em 0;
  max-width: var(--measure);
  break-inside: avoid;
}
.script__speaker {
  font-family: var(--font-sub);
  font-weight: 700;
  font-size: 8pt;
  letter-spacing: 0.16em;
  text-transform: uppercase;
  color: var(--orange);
  margin: 0 0 0.4em;
}
.script p { color: var(--white); max-width: none; margin: 0 0 0.5em; }
.script p:last-child { margin-bottom: 0; }
.script .say { font-family: var(--font-serif); font-size: 1.05em; line-height: 1.45; }

/* ---- Data tables --------------------------------------------------------- */
table.data {
  width: 100%;
  max-width: var(--measure);
  border-collapse: collapse;
  margin: 1.3em 0;
  font-size: 9.75pt;
  break-inside: avoid;
}
table.data caption {
  caption-side: top;
  text-align: left;
  font-family: var(--font-sub);
  font-weight: 700;
  font-size: 8pt;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--olive-d);
  padding-bottom: 0.5em;
}
table.data th {
  background: var(--ink);
  color: var(--white);
  font-family: var(--font-sub);
  font-weight: 600;
  text-align: left;
  padding: 0.5em 0.7em;
  font-size: 9pt;
}
table.data td {
  padding: 0.45em 0.7em;
  border-bottom: 1px solid var(--line);
  vertical-align: top;
}
table.data tbody tr:nth-child(even) { background: var(--neutral); }
table.data td code, .doc code {
  font-family: "SFMono-Regular", Consolas, monospace;
  font-size: 0.86em;
  background: var(--neutral);
  padding: 0.05em 0.35em;
  border-radius: 4px;
}

/* ---- Figures (screenshots) ----------------------------------------------- */
.figure {
  margin: 1.5em 0;
  max-width: var(--measure);
  break-inside: avoid;
}
.figure img {
  width: 100%;
  border: 1px solid var(--line);
  border-radius: 8px;
  box-shadow: 0 1px 4px rgba(36,38,45,0.08);
  display: block;
}
.figure__cap {
  font-family: var(--font-sub);
  font-size: 8.75pt;
  color: var(--gray);
  margin-top: 0.5em;
  line-height: 1.4;
}
.figure__cap .fig-n {
  font-weight: 700;
  color: var(--orange-d);
  text-transform: uppercase;
  letter-spacing: 0.06em;
  margin-right: 0.4em;
}
/* placeholder frame (used until real screenshots land) */
.figure--placeholder .ph {
  border: 1.5px dashed #C7C6BE;
  border-radius: 8px;
  background: repeating-linear-gradient(135deg,#FAFAF8,#FAFAF8 12px,#F2F1EC 12px,#F2F1EC 24px);
  aspect-ratio: 16 / 9;
  display: flex; align-items: center; justify-content: center;
  text-align: center;
}
.figure--placeholder .ph span {
  font-family: var(--font-sub);
  font-weight: 600;
  font-size: 9pt;
  color: var(--gray);
  max-width: 26em;
  padding: 1em;
}

/* ---- Quick-reference cards ----------------------------------------------- */
.qref {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 0.9em;
  margin: 1.4em 0;
  max-width: var(--measure);
}
.qref__card {
  border: 1px solid var(--line);
  border-radius: 8px;
  overflow: hidden;
  background: var(--white);
  break-inside: avoid;
}
.qref__bar {
  height: 5px;
  background: var(--orange);
}
.qref__card:nth-child(even) .qref__bar { background: var(--olive); }
.qref__body { padding: 0.75em 0.9em 0.85em; }
.qref__title {
  font-family: var(--font-sub);
  font-weight: 700;
  font-size: 10pt;
  color: var(--ink);
  margin: 0 0 0.3em;
}
.qref__body p, .qref__body ul { font-size: 9.25pt; margin: 0; }

/* ---- Pull quote ---------------------------------------------------------- */
.pullquote {
  border-top: 1px solid var(--line);
  border-bottom: 1px solid var(--line);
  padding: 1em 0;
  margin: 1.6em 0;
  max-width: var(--measure);
  break-inside: avoid;
}
.pullquote p {
  font-family: var(--font-serif);
  font-style: italic;
  font-size: 14pt;
  line-height: 1.4;
  color: var(--ink);
  margin: 0 0 0.4em;
}
.pullquote__by {
  font-family: var(--font-sub);
  font-weight: 700;
  font-size: 8pt;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--orange-d);
}

/* ---- Checklist ----------------------------------------------------------- */
.checklist { list-style: none; padding: 0; margin: 1.2em 0; max-width: var(--measure); }
.checklist li {
  position: relative;
  padding-left: 1.9em;
  margin: 0.4em 0;
}
/* high specificity so the generic .doc ul>li bullet doesn't win */
.doc ul.checklist > li::before {
  content: "";
  position: absolute;
  left: 0; top: 0.2em;
  width: 1.05em; height: 1.05em;
  background: none;
  border: 2px solid var(--olive);
  border-radius: 4px;
}

/* ---- "The bottom line" back-matter card ---------------------------------- */
.bottomline {
  background: var(--ink);
  color: var(--white);
  border-radius: 12px;
  padding: 1.5em 1.6em;
  margin: 2em 0 0;
  break-inside: avoid;
}
.bottomline__label {
  font-family: var(--font-sub);
  font-weight: 700;
  font-size: 8pt;
  letter-spacing: 0.16em;
  text-transform: uppercase;
  color: var(--orange);
  margin: 0 0 0.5em;
}
.bottomline h2, .bottomline p { color: var(--white); }
.bottomline h2 {
  font-family: var(--font-serif);
  font-weight: 700;
  font-size: 17pt;
  margin: 0 0 0.4em;
}
.bottomline p { max-width: none; margin: 0; }

/* ---- Utility ------------------------------------------------------------- */
.tm { font-size: 0.7em; vertical-align: 0.35em; }
.nowrap { white-space: nowrap; }
