/* ============================================================================
   DropCal — shared site chrome (single source of truth)
   Tokens, base, nav/header, footer, account control, copied-toast.
   Consumed by index.html, privacy.html, terms.html via <site-header>/<site-footer>.
   Edit chrome STYLES here; edit chrome MARKUP/behavior in site-chrome.js.
   ============================================================================ */

site-header, site-footer { display: block; }

/* ---- tokens + base + layout + nav ---- */
    :root {
      --color-bg: #FFFFFF;
      --color-bg-tinted: #FAFBFC;
      --color-bg-soft: #F4F6FA;
      --color-surface: #FFFFFF;
      --color-surface-tinted: #F4F6FA;
      --color-fg: #1B2942;
      --color-fg-muted: #4A556B;
      --color-fg-faint: #8A93A8;
      --color-accent: #5570C9;
      --color-accent-soft: #E0E8F5;
      --color-border: rgba(27, 41, 66, 0.08);
      --color-border-strong: rgba(27, 41, 66, 0.12);
      --color-mark: #1F2941;
      --color-mark-header: #15203A;
      --color-mark-cell: #6B7693;
      --color-icon-bg: #0F1B2D;
      --color-window-red: #FF5F57;
      --color-window-yellow: #FEBC2E;
      --color-window-green: #28C840;

      --font-heading: 'Geist', system-ui, -apple-system, sans-serif;
      --font-body: 'Inter', system-ui, -apple-system, sans-serif;
      --font-mono: 'Geist Mono', ui-monospace, SFMono-Regular, monospace;

      --radius-sm: 6px;
      --radius-md: 8px;
      --radius-lg: 12px;
      --radius-pill: 999px;

      --shadow-card: 0 2px 4px rgba(0,0,0,0.04), 0 12px 32px rgba(0,0,0,0.06);
      --shadow-mock: 0 24px 40px rgba(15,27,45,0.08);
      --shadow-pill: 0 2px 4px rgba(0,0,0,0.04), 0 8px 24px rgba(0,0,0,0.06);
      --shadow-icon: 0 8px 24px rgba(0,0,0,0.10);
    }

    /* Dark mode intentionally disabled — the page renders the light :root tokens
       for everyone. To re-enable, restore an @media (prefers-color-scheme: dark)
       block overriding the :root custom properties (see git history / TOKENS.md). */

    /* ─────────────────────────────────────────────────────────────
       BASE
       ───────────────────────────────────────────────────────────── */
    *,*::before,*::after { box-sizing: border-box; }
    html { scroll-behavior: smooth; }
    @media (prefers-reduced-motion: reduce) {
      html { scroll-behavior: auto; }
    }
    body {
      margin: 0;
      font-family: var(--font-body);
      color: var(--color-fg);
      background: var(--color-bg);
      line-height: 1.5;
      -webkit-font-smoothing: antialiased;
      -moz-osx-font-smoothing: grayscale;
    }
    a { color: inherit; text-decoration: none; }
    button { font: inherit; cursor: pointer; }
    img, svg { display: block; max-width: 100%; }
    [hidden] { display: none !important; }

    /* ─────────────────────────────────────────────────────────────
       LAYOUT PRIMITIVES
       ───────────────────────────────────────────────────────────── */
    .container { width: 100%; max-width: 1200px; margin: 0 auto; padding: 0 20px; }
    @media (min-width: 768px) { .container { padding: 0 40px; } }

    section { padding: 60px 0; }
    @media (min-width: 768px) { section { padding: 100px 0; } }
    @media (min-width: 1024px) { section { padding: 140px 0; } }

    /* ─────────────────────────────────────────────────────────────
       NAV
       ───────────────────────────────────────────────────────────── */
    .nav { padding: 18px 0; }
    @media (min-width: 768px) { .nav { padding: 24px 0; } }
    .nav-inner { display: flex; align-items: center; justify-content: space-between; gap: 16px; }
    .nav-brand { display: flex; flex-direction: column; align-items: flex-start; gap: 2px; }
    .nav-brand-mark { width: 28px; height: 28px; flex: none; }
    @media (min-width: 768px) { .nav-brand-mark { width: 30px; height: 30px; } }
    .nav-brand-name {
      font-family: var(--font-heading);
      font-weight: 600;
      font-size: 16px;
      letter-spacing: -0.2px;
      color: var(--color-accent);
    }
    @media (min-width: 768px) { .nav-brand-name { font-size: 17px; } }
    .nav-brand-tagline {
      font-family: var(--font-body);
      font-weight: 500;
      font-size: 10px;
      letter-spacing: 0.3px;
      line-height: 1.1;
      color: var(--color-fg-faint);
      white-space: nowrap;
    }

    /* Brand-word accent: the DropCal wordmark and inline mentions take the accent color. */
    .brand-word { color: var(--color-accent); font-weight: 600; }

    .nav-links { display: none; gap: 32px; }
    @media (min-width: 768px) { .nav-links { display: flex; } }
    .nav-link { color: var(--color-fg-muted); font-size: 14px; }
    .nav-link:hover { color: var(--color-fg); }

    .nav-trail { display: flex; align-items: center; gap: 10px; }

    .menu-btn {
      width: 32px; height: 32px;
      display: grid; place-items: center;
      background: var(--color-surface);
      border: 1px solid var(--color-border-strong);
      border-radius: var(--radius-sm);
      color: var(--color-fg-muted);
    }
    @media (min-width: 768px) { .menu-btn { display: none; } }

    /* Email pill — used in nav, footer, hero, invite-others, get-started */
    .email-pill {
      display: inline-flex; align-items: center; gap: 8px;
      padding: 6px 12px;
      background: var(--color-surface);
      border: 1px solid var(--color-border-strong);
      border-radius: var(--radius-pill);
      font-family: var(--font-mono);
      color: var(--color-fg);
      transition: background 120ms, border-color 120ms;
    }
    .email-pill:hover { background: var(--color-bg-soft); border-color: var(--color-accent); }
    .email-pill__label {
      font-size: 10.5px;
      letter-spacing: 1.2px;
      color: var(--color-fg-faint);
    }
    .email-pill__address { font-size: 13px; font-weight: 500; }
    .email-pill__copy-icon { width: 14px; height: 14px; color: var(--color-fg-faint); flex: none; }

    .nav-email-pill { display: none; }
    @media (min-width: 768px) { .nav-email-pill { display: inline-flex; } }

    /* Mobile nav drawer — opened by .menu-btn below 768px (see script) */
    .nav { position: relative; }
    @media (max-width: 767px) {
      .nav.is-menu-open .nav-links {
        display: flex;
        flex-direction: column;
        gap: 4px;
        position: absolute;
        top: 100%; left: 20px; right: 20px;
        z-index: 50;
        margin-top: 8px;
        padding: 8px;
        background: var(--color-surface);
        border: 1px solid var(--color-border-strong);
        border-radius: var(--radius-md);
        box-shadow: var(--shadow-card);
      }
      .nav.is-menu-open .nav-link {
        padding: 10px 12px;
        border-radius: var(--radius-sm);
        font-size: 15px;
      }
      .nav.is-menu-open .nav-link:hover { background: var(--color-bg-soft); }
    }

/* ---- footer + copied-toast ---- */
    .footer { background: var(--color-bg); }
    .footer__inner {
      max-width: 1200px; margin: 0 auto;
      padding: 40px 20px;
      border-top: 1px solid var(--color-border-strong);
      display: flex; flex-direction: column; gap: 24px;
    }
    @media (min-width: 768px) {
      .footer__inner { padding: 100px 40px 40px; flex-direction: row; justify-content: space-between; gap: 64px; }
    }

    .footer-left { display: flex; flex-direction: column; gap: 18px; }
    @media (min-width: 768px) { .footer-left { max-width: 480px; } }
    .footer-brand { display: flex; flex-direction: column; align-items: flex-start; gap: 2px; }
    .footer-brand-mark { width: 28px; height: 28px; flex: none; }
    @media (min-width: 768px) { .footer-brand-mark { width: 32px; height: 32px; } }
    .footer-brand-name { font-family: var(--font-heading); font-weight: 600; font-size: 16px; color: var(--color-accent); }
    @media (min-width: 768px) { .footer-brand-name { font-size: 18px; } }
    .footer-brand-tagline {
      font-family: var(--font-body);
      font-weight: 500;
      font-size: 11px;
      letter-spacing: 0.3px;
      line-height: 1.1;
      color: var(--color-fg-faint);
    }
    .footer-tagline { font-size: 13px; color: var(--color-fg-muted); line-height: 1.5; margin: 0; }
    @media (min-width: 768px) { .footer-tagline { font-size: 14px; line-height: 1.6; } }

    .footer-right { display: flex; flex-direction: column; gap: 18px; }
    @media (min-width: 768px) { .footer-right { flex-direction: row; gap: 56px; } }
    .footer-col { display: flex; flex-direction: column; gap: 8px; }
    @media (min-width: 768px) { .footer-col { gap: 14px; min-width: 152px; } }
    .footer-col__label {
      font-family: var(--font-mono);
      font-size: 10.5px;
      letter-spacing: 1.4px;
      color: var(--color-fg-faint);
    }
    @media (min-width: 768px) { .footer-col__label { font-size: 11px; letter-spacing: 1.5px; } }
    .footer-col__link {
      font-size: 13px;
      color: var(--color-fg);
    }
    .footer-col__link:hover { color: var(--color-accent); }
    .footer-col__link--mono { font-family: var(--font-mono); font-size: 12px; }

    .footer-bottom {
      max-width: 1200px; margin: 0 auto;
      padding: 16px 20px 32px;
      display: flex; justify-content: flex-end;
    }
    @media (min-width: 768px) { .footer-bottom { padding: 16px 40px 40px; } }
    .footer-copy {
      font-family: var(--font-mono);
      font-size: 10.5px;
      letter-spacing: 1.2px;
      color: var(--color-fg-faint);
    }

    /* ─────────────────────────────────────────────────────────────
       COPIED TOAST — placeholder structure; behavior wired in JS
       ───────────────────────────────────────────────────────────── */
    .copied-toast {
      position: fixed;
      bottom: 24px; left: 50%;
      transform: translateX(-50%) translateY(20px);
      background: var(--color-fg);
      color: var(--color-bg);
      padding: 10px 18px;
      border-radius: var(--radius-pill);
      font-family: var(--font-body);
      font-size: 14px;
      font-weight: 500;
      opacity: 0;
      pointer-events: none;
      transition: opacity 200ms, transform 200ms;
      z-index: 50;
    }
    .copied-toast.is-visible {
      opacity: 1;
      transform: translateX(-50%) translateY(0);
    }
    @media (prefers-reduced-motion: reduce) {
      .copied-toast { transition: none; }
    }

/* ---- account control + primary button ---- */
       .account { position: relative; }

.account-btn {
  display: inline-flex; align-items: center; gap: 8px;
  padding: 6px 14px;
  background: var(--color-surface);
  border: 1px solid var(--color-border-strong);
  border-radius: var(--radius-pill);
  font-family: var(--font-body);
  font-size: 13px; font-weight: 500;
  color: var(--color-fg);
  transition: background 120ms, border-color 120ms;
}
.account-btn:hover { background: var(--color-bg-soft); border-color: var(--color-accent); }
.account-btn__dot { width: 7px; height: 7px; border-radius: 50%; background: var(--color-fg-faint); flex: none; }
.account-btn__dot--connected { background: var(--color-window-green); }
.account-btn__caret { width: 12px; height: 12px; color: var(--color-fg-faint); flex: none; }

.account-panel {
  position: absolute;
  top: calc(100% + 8px); right: 0;
  z-index: 60;
  width: 300px; max-width: calc(100vw - 40px);
  background: var(--color-surface);
  border: 1px solid var(--color-border-strong);
  border-radius: var(--radius-lg);
  box-shadow: var(--shadow-card);
  padding: 20px;
  display: flex; flex-direction: column; gap: 14px;
}
.account-panel[hidden] { display: none; }

.account-panel__title {
  font-family: var(--font-heading);
  font-weight: 600; font-size: 16px; letter-spacing: -0.2px;
  color: var(--color-fg); margin: 0;
}
.account-panel__text { font-size: 13px; color: var(--color-fg-muted); line-height: 1.5; margin: 0; }
.account-panel__text strong { color: var(--color-fg); font-weight: 600; }
.account-panel__email { font-family: var(--font-mono); font-size: 12.5px; color: var(--color-fg); word-break: break-all; }

.account-form { display: flex; flex-direction: column; gap: 10px; }
.account-input {
  width: 100%; padding: 10px 12px;
  background: var(--color-bg-tinted);
  border: 1px solid var(--color-border-strong);
  border-radius: var(--radius-md);
  font-family: var(--font-body); font-size: 14px; color: var(--color-fg);
  transition: border-color 120ms;
}
.account-input:focus { outline: none; border-color: var(--color-accent); }
.account-input::placeholder { color: var(--color-fg-faint); }

.btn-primary {
  display: inline-flex; align-items: center; justify-content: center; gap: 8px;
  width: 100%; padding: 10px 14px;
  background: var(--color-accent);
  border: 1px solid var(--color-accent);
  border-radius: var(--radius-md);
  font-family: var(--font-body); font-size: 14px; font-weight: 600;
  color: #FFFFFF; transition: filter 120ms;
}
.btn-primary:hover { filter: brightness(1.05); }

.account-status {
  display: flex; align-items: center; gap: 10px;
  padding: 10px 12px;
  background: var(--color-bg-soft);
  border: 1px solid var(--color-border);
  border-radius: var(--radius-md);
  font-size: 13px; color: var(--color-fg);
}
.account-status__dot { width: 8px; height: 8px; border-radius: 50%; flex: none; background: var(--color-fg-faint); }
.account-status__dot--connected { background: var(--color-window-green); }
.account-status__text { display: flex; flex-direction: column; gap: 1px; }
.account-status__label { font-weight: 600; }
.account-status__sub { font-size: 11.5px; color: var(--color-fg-faint); }

.account-divider { height: 1px; background: var(--color-border); margin: 2px 0; }
.account-signout {
  background: none; border: none; padding: 0; align-self: flex-start;
  font-family: var(--font-body); font-size: 13px; color: var(--color-fg-muted);
}
.account-signout:hover { color: var(--color-fg); }
