/* ============================================================
   CommonHelpSource — Design System
   Shared tokens, header, footer, and global overrides.
   Load AFTER Tailwind/DaisyUI so these take precedence.
   ============================================================ */

/* ── DESIGN TOKENS ───────────────────────────────────────── */
:root {
  --ink:      #1a1a18;
  --paper:    #f5f0e8;
  --cream:    #ede8d8;
  --white:    #faf8f4;
  --red:      #c0392b;
  --teal:     #2a6b6b;
  --teal-dk:  #1f5252;
  --gold:     #b8860b;
  --sage:     #3d6b4f;
  --navy:     #2c4a6e;
  --muted:    #6b6560;
  --rule:     #d4cdc0;
  --font-display: 'Playfair Display', Georgia, serif;
  --font-body:    'Inter', system-ui, -apple-system, sans-serif;
  --font-mono:    'DM Mono', 'Courier New', monospace;
}

/* ── GLOBAL BASE ─────────────────────────────────────────── */
body {
  font-family: var(--font-body) !important;
  -webkit-font-smoothing: antialiased;
}

/* ── TOP STRIPE ──────────────────────────────────────────── */
.chs-top-stripe {
  height: 4px;
  background: var(--red);
  width: 100%;
}

/* ── SITE HEADER ─────────────────────────────────────────── */
.chs-header {
  background: var(--ink);
  border-bottom: 1px solid rgba(255,255,255,0.08);
  position: sticky;
  top: 0;
  z-index: 9999;
}
.chs-header-inner {
  max-width: 1200px;
  margin: 0 auto;
  padding: 0 24px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  height: 60px;
}
.chs-brand {
  display: flex;
  align-items: center;
  gap: 10px;
  text-decoration: none;
}
.chs-brand img { height: 28px; width: auto; }
.chs-brand-name {
  font-family: var(--font-display);
  font-size: 18px;
  font-weight: 700;
  color: var(--paper);
  letter-spacing: -0.3px;
}
.chs-brand-name span { color: var(--red); }

.chs-nav {
  display: flex;
  align-items: center;
  gap: 4px;
}
.chs-nav a {
  font-family: var(--font-mono);
  font-size: 10px;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: rgba(245,240,232,0.6);
  text-decoration: none;
  padding: 6px 12px;
  transition: color 0.15s;
}
.chs-nav a:hover { color: var(--paper); }
.chs-nav a.chs-nav-cta {
  background: var(--red);
  color: var(--paper) !important;
  margin-left: 8px;
  padding: 6px 14px;
}
.chs-nav a.chs-nav-cta:hover { background: #a93225; }

.chs-menu-btn {
  display: none;
  background: none;
  border: none;
  cursor: pointer;
  padding: 4px;
}

@media (max-width: 768px) {
  .chs-nav { display: none; }
  .chs-menu-btn { display: block; }
  .chs-nav.chs-open {
    display: flex;
    flex-direction: column;
    align-items: flex-start;
    position: fixed;
    top: 64px;
    left: 0; right: 0;
    background: var(--ink);
    padding: 16px 24px 20px;
    border-bottom: 1px solid rgba(255,255,255,0.1);
    z-index: 9998;
  }
  .chs-nav.chs-open a { padding: 9px 0; }
}

/* ── PAGE TITLE BAR ──────────────────────────────────────── */
.chs-page-title {
  background: var(--ink);
  padding: 40px 24px 44px;
  text-align: left;
}
.chs-page-title-inner {
  max-width: 1200px;
  margin: 0 auto;
}
.chs-page-eyebrow {
  font-family: var(--font-mono);
  font-size: 10px;
  letter-spacing: 0.22em;
  text-transform: uppercase;
  color: var(--red);
  margin-bottom: 12px;
  display: block;
}
.chs-page-title h1 {
  font-family: var(--font-display) !important;
  font-size: clamp(28px, 5vw, 52px) !important;
  font-weight: 900 !important;
  letter-spacing: -1px !important;
  color: var(--paper) !important;
  line-height: 1.1 !important;
  margin: 0 0 12px !important;
}
.chs-page-title p {
  font-size: 16px;
  color: rgba(245,240,232,0.55);
  max-width: 560px;
  line-height: 1.65;
  margin: 0;
}

/* ── SITE FOOTER ─────────────────────────────────────────── */
.chs-footer {
  background: #111110;
  padding: 56px 24px 32px;
  margin-top: auto;
}
.chs-footer-grid {
  max-width: 1200px;
  margin: 0 auto;
  display: grid;
  grid-template-columns: 2fr 1fr 1fr 1fr;
  gap: 40px;
  margin-bottom: 40px;
}
@media (max-width: 768px) {
  .chs-footer-grid { grid-template-columns: 1fr 1fr; }
}
@media (max-width: 480px) {
  .chs-footer-grid { grid-template-columns: 1fr; }
}
.chs-footer-brand {
  font-family: var(--font-display);
  font-size: 22px;
  font-weight: 900;
  color: var(--paper);
  letter-spacing: -0.5px;
  margin-bottom: 12px;
}
.chs-footer-brand span { color: var(--red); }
.chs-footer-desc {
  font-size: 13px;
  line-height: 1.7;
  color: rgba(245,240,232,0.35);
  max-width: 260px;
}
.chs-footer-col h4 {
  font-family: var(--font-mono);
  font-size: 9px;
  letter-spacing: 0.2em;
  text-transform: uppercase;
  color: rgba(245,240,232,0.35);
  margin-bottom: 16px;
}
.chs-footer-col ul { list-style: none; padding: 0; margin: 0; }
.chs-footer-col ul li { margin-bottom: 10px; }
.chs-footer-col ul a {
  font-size: 13px;
  color: rgba(245,240,232,0.5);
  text-decoration: none;
  transition: color 0.15s;
}
.chs-footer-col ul a:hover { color: var(--paper); }
.chs-footer-bottom {
  max-width: 1200px;
  margin: 0 auto;
  padding-top: 24px;
  border-top: 1px solid rgba(255,255,255,0.07);
  display: flex;
  justify-content: space-between;
  align-items: center;
  flex-wrap: wrap;
  gap: 12px;
}
.chs-footer-bottom p {
  font-family: var(--font-mono);
  font-size: 10px;
  letter-spacing: 0.1em;
  color: rgba(245,240,232,0.25);
}
.chs-footer-support {
  font-family: var(--font-mono);
  font-size: 10px;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--red);
  text-decoration: none;
  opacity: 0.7;
  transition: opacity 0.15s;
}
.chs-footer-support:hover { opacity: 1; }

/* ── CONTENT WRAPPER ──────────────────────────────────────── */
.chs-content {
  max-width: 1200px;
  margin: 0 auto;
  padding: 48px 24px 64px;
}

/* ── SHARED BUTTON OVERRIDES ──────────────────────────────── */
/* Kills the AI blue gradient on any leftover Tailwind buttons */
.bg-blue-600,
.bg-blue-700,
.hover\:bg-blue-700:hover {
  background-color: var(--teal) !important;
}
a.bg-blue-600,
button.bg-blue-600 {
  background-color: var(--teal) !important;
}

/* ── ASSESSMENT CARD OVERRIDES ────────────────────────────── */
/* Replace blue top-border cards with ink */
.border-blue-600 { border-color: var(--teal) !important; }
.text-blue-600   { color: var(--teal) !important; }
.bg-blue-100     { background-color: #e0f0f0 !important; }

/* Soften over-rounded cards */
.rounded-xl { border-radius: 4px !important; }
.rounded-lg { border-radius: 3px !important; }
.rounded-full { border-radius: 50% !important; } /* keep circles circular */

/* Tone down heavy shadows */
.shadow-lg  { box-shadow: 0 2px 12px rgba(0,0,0,0.08) !important; }
.shadow-xl  { box-shadow: 0 4px 16px rgba(0,0,0,0.10) !important; }

/* ── FORM ELEMENT OVERRIDES ───────────────────────────────── */
input[type="text"], input[type="number"], input[type="email"],
select, textarea {
  border-radius: 2px !important;
  border-color: var(--rule) !important;
  font-family: var(--font-body) !important;
}
input:focus, select:focus, textarea:focus {
  outline: none !important;
  border-color: var(--teal) !important;
  box-shadow: 0 0 0 2px rgba(42,107,107,0.15) !important;
}

/* ── PROGRESS / STEP INDICATORS ───────────────────────────── */
.steps .step:before,
.steps .step:after {
  background-color: var(--teal) !important;
}
.step-primary + .step:before,
.steps .step-primary:after {
  background-color: var(--teal) !important;
}

/* ── RADIO / CHECKBOX ANSWERS ─────────────────────────────── */
.answer-btn, .answer-option {
  border-radius: 2px !important;
}

/* ── TAILWIND GRADIENT / BLUE KILLSWITCH ──────────────────── */
/* Any element using Tailwind's blue/purple gradient classes   */
[class*="from-blue"],
[class*="from-purple"],
[class*="from-indigo"] {
  --tw-gradient-from: #2a6b6b !important;
}
[class*="to-purple"],
[class*="to-blue"],
[class*="to-indigo"] {
  --tw-gradient-to: #1f5252 !important;
}
/* Hero sections that still use Tailwind gradient pattern */
section[class*="bg-gradient"],
div[class*="bg-gradient"] {
  background: var(--ink) !important;
  background-image: none !important;
}
/* White card overrides — tone to warm white */
.bg-white { background-color: var(--white) !important; }
/* Gray bg overrides */
.bg-gray-50, .bg-gray-100 { background-color: var(--paper) !important; }
/* Blue text overrides */
.text-blue-600, .text-blue-700, .text-blue-800 { color: var(--teal) !important; }
.text-purple-600, .text-purple-700 { color: var(--navy) !important; }
/* Blue bg overrides */
.bg-blue-50, .bg-blue-100 { background-color: #e0f0f0 !important; }
.bg-blue-600, .bg-blue-700 { background-color: var(--teal) !important; }
.bg-purple-600, .bg-purple-700 { background-color: var(--navy) !important; }
/* Border overrides */
.border-blue-500, .border-blue-600 { border-color: var(--teal) !important; }
/* Focus ring */
.focus\:ring-blue-500:focus,
.focus\:border-blue-500:focus {
  --tw-ring-color: rgba(42,107,107,0.35) !important;
  border-color: var(--teal) !important;
}
/* hover:bg overrides */
.hover\:bg-blue-700:hover { background-color: var(--teal-dk) !important; }

/* ── NOTE TYPE SELECTOR ────────────────────────────────────── */
.note-type-option {
  border: 1px solid var(--rule) !important;
  border-radius: 2px !important;
  background: var(--white) !important;
  transition: border-color 0.12s !important;
  box-shadow: none !important;
}
.note-type-option:hover {
  border-color: var(--teal) !important;
  background: var(--paper) !important;
}

/* ── LARGE TAILWIND CARDS ─────────────────────────────────── */
.rounded-xl { border-radius: 2px !important; }
.rounded-lg { border-radius: 2px !important; }
.shadow-lg, .shadow-xl, .shadow-md {
  box-shadow: none !important;
  border: 1px solid var(--rule);
}
