/* High Desert Realty — portal theme layer.
 *
 * One place for every colour and typeface the portal uses. Derived from
 * Haley's one-page brand sheet (Brand Guidelines.pdf, updated 10.06.2026):
 *   charcoal #3d4643 · taupe #aa9a84 · off-white #efe6df
 *   accents: sage #8f9d87 · terracotta #c07a57
 *   type: Montserrat 400/700 (the script face is reserved for flourishes and
 *   never used in UI).
 * Light surfaces throughout (Andrew + Haley asked for white, not the earlier
 * dark portal). Templates reference these variables only; if a colour needs
 * to change, change it here.
 *
 * Fonts come from hdr-fonts.css (self-hosted). Spacing and touch sizes are
 * tokens too; the shell's phone layout switches at 900px.
 *
 * Legacy aliases (--gold, --blue, --blue-h, --blue-dim, --gold-h) are kept so
 * every child template written against the old dark theme keeps working.
 */
:root {
  /* ── Brand, as given ── */
  --hdr-charcoal:   #3D4643;
  --hdr-taupe:      #AA9A84;
  --hdr-sand:       #EFE6DF;
  --hdr-sage:       #8F9D87;
  --hdr-terracotta: #C07A57;

  /* ── Derived inks: the brand mid-tones darkened enough to read on white ── */
  --taupe-ink:      #7A6A50;   /* 5.2:1 on white */
  --sage-ink:       #5C6D55;   /* 5.6:1 on white */
  --terracotta-ink: #A3593A;   /* 5.0:1 on white */

  /* ── Surfaces ── */
  --bg:        #F8F5F1;        /* page ground: a lighter tint of the brand off-white */
  --sidebar:   #FFFFFF;
  --card:      #FFFFFF;
  --card-2:    #F3EEE8;        /* inset panels, table heads, output headers */
  --border:    rgba(61, 70, 67, 0.12);
  --border-hi: rgba(61, 70, 67, 0.26);
  --backdrop:  rgba(46, 54, 52, 0.45);

  /* ── Text ── */
  --text:      #2E3634;        /* body: charcoal, a step darker for long reads */
  --text-2:    var(--hdr-charcoal);
  --muted2:    #6F675D;        /* secondary labels, 5.3:1 */
  --muted:     #9A9186;        /* tertiary, placeholders, section labels */

  /* ── Accent (replaces the old gold) ── */
  --accent:      var(--taupe-ink);          /* accent as TEXT */
  --accent-fill: var(--hdr-taupe);          /* accent as a FILL (bars, dots) */
  --accent-dim:  rgba(170, 154, 132, 0.16); /* accent as a tint */
  --accent-soft: rgba(170, 154, 132, 0.34); /* accent as a border */

  /* ── Primary action: charcoal with white text ── */
  --btn-bg:    var(--hdr-charcoal);
  --btn-bg-h:  #2A3230;
  --btn-fg:    #FFFFFF;

  /* ── Semantic ── */
  --green:      #4E8A62;  --green-dim: rgba(78, 138, 98, 0.13);
  --red:        #BF5A3E;  --red-dim:   rgba(191, 90, 62, 0.11);
  --amber:      #B07A1E;  --amber-dim: rgba(176, 122, 30, 0.13);
  --sage:       var(--hdr-sage);  --sage-dim: rgba(143, 157, 135, 0.18);
  --terracotta: var(--hdr-terracotta);

  /* ── Categorical set for the six agent tools (admin + manager) ── */
  --cat-1: #3D4643;   /* listing    */
  --cat-2: #C07A57;   /* objection  */
  --cat-3: #8F9D87;   /* cma        */
  --cat-4: #AA9A84;   /* assistant  */
  --cat-5: #5C7A8A;   /* script     */
  --cat-6: #B07A1E;   /* follow-up  */

  /* ── Pipeline bars ── */
  --pipe-queued:  var(--hdr-taupe);
  --pipe-nurture: var(--hdr-sage);
  --pipe-out:     var(--hdr-charcoal);

  /* ── Legacy aliases ── */
  --gold:     var(--accent);
  --gold-h:   #5E5040;
  --blue:     var(--accent);
  --blue-h:   var(--gold-h);
  --blue-dim: var(--accent-dim);
  --edge:     var(--border);

  /* ── Type and shape ── */
  --font:      'Montserrat', -apple-system, BlinkMacSystemFont, 'Segoe UI', Helvetica, Arial, sans-serif;
  --font-data: 'IBM Plex Sans', 'Montserrat', Arial, sans-serif;   /* tables, numbers, notes */
  --radius:    10px;
  --sidebar-w: 240px;

  /* ── Space: one 4px scale, so pages stop inventing their own gaps ── */
  --space-1: 4px;  --space-2: 8px;  --space-3: 12px;
  --space-4: 16px; --space-5: 24px; --space-6: 32px;
  --gutter:  28px;                 /* page padding; 16px on a phone */
  --tap:     44px;                 /* smallest touch target */
  --nav-z:   200;
}
@media (max-width: 900px) { :root { --gutter: 16px; } }
