/* Goldmine base styles: tokens, reset, scrollbars, typography, header/brand,
   sign-out, and the global .hidden carried in the auth file. Extracted from
   index.html during the pre-draft refactor (step 1). Linked before auth.css
   and brainstorm.css; load order preserves the original cascade. */
  /* Fonts pulled from collegebound-md.com: Ovo (display serif), Lora (book serif + italics), Almarai (sans body) */
  @import url('https://fonts.googleapis.com/css2?family=Ovo&family=Fraunces:opsz,wght@9..144,500;9..144,600;9..144,700&family=Lora:ital,wght@0,400..600;1,400..500&family=Almarai:wght@400;700&family=JetBrains+Mono:wght@400&display=swap');

  :root {
    /* White editorial foundation — matches CollegeBound-md.com */
    --ink: #022559;          /* navy: headings, brand */
    --body: #2a3142;         /* dark charcoal-navy: body text, reads "dark" not "blue" */
    --muted: #8a90a0;        /* cool gray: hints, secondary copy */
    --line: #e6e8ee;         /* light cool gray: borders, dividers */
    --line-2: #f1f2f6;       /* lighter cool gray: subtle surface tints */
    --bg: #ffffff;           /* white paper */
    --bg-soft: #f6f7fa;      /* very light cool gray: user msg bubble */

    /* College Bound brand */
    --brand: #022559;        /* navy: primary button, brand mark, strong cards */
    --brand-soft: #6e8cb9;   /* light blue: reserved for secondary states */
    --accent: #caa74f;       /* warm gold: eyebrows, bullets, progress, focus, hover */
    --accent-soft: rgba(202, 167, 79, 0.20);

    --display: 'Ovo', 'Iowan Old Style', Georgia, serif;
    --serif: 'Lora', 'Iowan Old Style', Georgia, serif;
    --sans: 'Almarai', system-ui, -apple-system, sans-serif;
  }
  * { box-sizing: border-box; }
  html, body { margin: 0; padding: 0; }

  textarea, input { caret-color: var(--accent); }
  ::selection { background: var(--accent-soft); color: var(--ink); }

  /* Cool-gray scrollbars matching the editorial palette */
  * { scrollbar-width: thin; scrollbar-color: #c8ccd6 transparent; }
  *::-webkit-scrollbar { width: 10px; height: 10px; }
  *::-webkit-scrollbar-track { background: transparent; }
  *::-webkit-scrollbar-thumb {
    background: #d4d7e0;
    border-radius: 10px;
    border: 2px solid var(--bg);
  }
  *::-webkit-scrollbar-thumb:hover { background: #b6bbc8; }

  /* Chat transcript: scrollbar hidden until actively scrolling or hovered */
  #chat { scrollbar-color: transparent transparent; }
  #chat::-webkit-scrollbar-thumb { background: transparent; transition: background 0.4s; }
  #chat:hover { scrollbar-color: #d4d7e0 transparent; }
  #chat:hover::-webkit-scrollbar-thumb { background: #d4d7e0; }
  #chat.scrolling { scrollbar-color: #d4d7e0 transparent; }
  #chat.scrolling::-webkit-scrollbar-thumb { background: #d4d7e0; }
  body {
    font-family: var(--sans);
    background: var(--bg);
    color: var(--body);
    line-height: 1.6;
    font-size: 15px;
    min-height: 100vh;
    -webkit-font-smoothing: antialiased;
  }
  h1, h2, h3 {
    color: var(--ink);
    font-weight: 600;
    letter-spacing: -0.015em;
    line-height: 1.25;
    margin: 0;
  }

  header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 1.5rem 2.5rem;
    border-bottom: 1px solid var(--line);
  }
  .brand {
    display: flex;
    align-items: center;
    gap: 0.9rem;
  }
  .brand .mark {
    height: 46px;
    width: auto;
    display: block;
  }
  .brand .divider {
    width: 1px;
    height: 26px;
    background: var(--line);
  }
  .brand h1 {
    font-family: var(--serif);
    font-size: 1.5rem;
    font-weight: 600;
    letter-spacing: -0.01em;
    color: #a8821e; /* fallback */
    background: linear-gradient(
      100deg,
      #6e5410 0%,
      #8a6914 35%,
      #c39a2e 50%,
      #8a6914 65%,
      #6e5410 100%
    );
    background-size: 260% 100%;
    background-position: 0% 50%;
    -webkit-background-clip: text;
    background-clip: text;
    -webkit-text-fill-color: transparent;
    animation: goldShimmer 10s ease-in-out infinite;
  }
  @keyframes goldShimmer {
    0%   { background-position: 0% 50%; }
    50%  { background-position: 100% 50%; }
    100% { background-position: 0% 50%; }
  }
  @media (prefers-reduced-motion: reduce) {
    .brand h1 { animation: none; background-position: 30% 50%; }
  }

  /* The phase switcher (Brainstorm → Drafting → Editing pipeline) lives in
     styles/pipeline.css; this mount only needs to be hideable (global .hidden). */

  /* Coach comment highlight (COACH_GATE_PLAN.md Phase 3). Shared by the coach
     dashboard and the student view, so it lives in base.css (always loaded). */
  .cmt-mark {
    background: var(--accent-soft);
    border-bottom: 2px solid var(--accent);
    border-radius: 2px;
    padding: 0 1px;
    color: inherit;
    cursor: pointer;
  }
  .cmt-mark.resolved {
    background: transparent;
    border-bottom-color: var(--line);
    opacity: 0.7;
  }

  .header-actions button {
    font-family: inherit;
    background: transparent;
    color: var(--muted);
    border: none;
    padding: 0.3rem 0.5rem;
    font-size: 1.5rem;
    line-height: 1;
    cursor: pointer;
    border-radius: 4px;
  }
  .header-actions button:hover { color: var(--ink); background: var(--bg-soft); }
  /* Sign-out reads as text, not a glyph — pill matching the .chat-tools aesthetic. */
  #signOutBtn, #homeBtn {
    font-size: 0.82rem;
    font-weight: 500;
    color: var(--muted);
    padding: 0.4rem 0.9rem;
    border: 1px solid var(--line);
    border-radius: 999px;
    display: inline-flex;
    align-items: center;
    gap: 0.35rem;
  }
  #signOutBtn:hover, #homeBtn:hover { color: var(--ink); background: var(--bg-soft); }

