/* ============================================================
   site.css — PsiGuard public site
   ------------------------------------------------------------
   External stylesheet for the marketing / public-facing
   surface (currently: index.html). Designed to coexist with
   chat.css and dashboard.css without collisions — class names
   are prefixed (site-*, hero-*, section-*, etc.) and CSS
   variables are scoped at :root with PsiGuard tokens that
   match the existing visual language.

   Design intent: ClearScope-style editorial layout — full
   width, generous whitespace, big type, alternating text /
   screenshot sections — but in PsiGuard's existing brand
   palette (purple/pink gradient, slate, DM Sans). Light-mode
   only for now; the app surfaces handle their own themes.
   ============================================================ */


/* ============================================================
   1 · DESIGN TOKENS
   ============================================================ */
:root {
  /* Brand */
  --purple:        #7c3aed;
  --purple-soft:   rgba(124, 58, 237, 0.10);
  --pink:          #ec4899;
  --gradient:      linear-gradient(135deg, #7c3aed 0%, #ec4899 100%);
  --gradient-soft: linear-gradient(135deg, rgba(124,58,237,0.06) 0%, rgba(236,72,153,0.04) 100%);

  /* Surface */
  --bg:            #ffffff;
  --bg-soft:       #fafbfc;
  --bg-tint:       #faf7ff;       /* very faint lilac wash for hero */
  --bg-band:       #0f172a;        /* dark band, for the CTA strip */

  /* Text */
  --text:          #0f172a;
  --text-soft:     #475569;
  --text-muted:    #94a3b8;
  --text-on-dark:  #f8fafc;
  --text-on-dark-soft: rgba(248, 250, 252, 0.78);

  /* Borders & shadows */
  --border:          #e6e8ee;
  --border-soft:     rgba(15, 23, 42, 0.06);
  --shadow-xs:       0 1px 2px rgba(15, 23, 42, 0.04);
  --shadow-sm:       0 2px 8px rgba(15, 23, 42, 0.05);
  --shadow-md:       0 12px 40px -8px rgba(15, 23, 42, 0.10);
  --shadow-lg:       0 32px 90px -24px rgba(30, 20, 60, 0.20);

  /* Geometry */
  --radius-sm:       10px;
  --radius:          16px;
  --radius-lg:       24px;
  --radius-pill:     999px;

  /* Layout */
  --content-max:     1200px;
  --content-narrow:  920px;
  --gutter:          clamp(20px, 5vw, 56px);
  --section-y:       clamp(80px, 12vw, 160px);
  --nav-h:           64px;

  /* Type scale */
  --display:         clamp(2.4rem, 5.8vw, 4.75rem);
  --h2:              clamp(1.875rem, 3.8vw, 2.75rem);
  --h3:              1.375rem;
  --eyebrow:         0.8125rem;
  --body-lg:         clamp(1.0625rem, 1.6vw, 1.25rem);
  --body:            1.0625rem;
  --small:           0.875rem;

  /* Motion */
  --ease:            cubic-bezier(.2, .8, .2, 1);
  --t-fast:          120ms;
  --t-base:          200ms;
}

/* ============================================================
   2 · RESET & BASE
   ============================================================ */
*, *::before, *::after {
  box-sizing: border-box;
}
html, body {
  margin: 0;
  padding: 0;
}
html {
  /* The 2px brand bar sits at the very top of the document.
     Padding here keeps anchor jumps from hiding under the
     sticky nav. */
  scroll-padding-top: calc(var(--nav-h) + 24px);
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
}
body {
  font-family: "DM Sans", -apple-system, BlinkMacSystemFont, "Segoe UI",
               system-ui, sans-serif;
  font-size:   var(--body);
  line-height: 1.6;
  color:       var(--text);
  background:  var(--bg);
  /* The faint top brand bar */
  border-top:  2px solid transparent;
  background-image:
    linear-gradient(var(--bg), var(--bg)),
    var(--gradient);
  background-origin: border-box;
  background-clip:   padding-box, border-box;
}
img, svg, video {
  display: block;
  max-width: 100%;
}
a {
  color: inherit;
  text-decoration: none;
}
a:focus-visible,
button:focus-visible {
  outline: 2px solid var(--purple);
  outline-offset: 3px;
  border-radius: 4px;
}


/* ============================================================
   3 · LAYOUT CONTAINERS
   ============================================================ */
.site-container {
  width: 100%;
  max-width: var(--content-max);
  margin: 0 auto;
  padding-left:  var(--gutter);
  padding-right: var(--gutter);
}
.site-container--narrow {
  max-width: var(--content-narrow);
}


/* ============================================================
   4 · NAVBAR (matches partials/_nav.html)
   ============================================================ */
.site-nav {
  position: sticky;
  top: 0;
  z-index: 50;
  height: var(--nav-h);
  background: rgba(255, 255, 255, 0.78);
  -webkit-backdrop-filter: saturate(180%) blur(14px);
          backdrop-filter: saturate(180%) blur(14px);
  border-bottom: 1px solid var(--border-soft);
}

.site-nav__logo {
  width: 24px;
  height: 24px;
  object-fit: contain;
  flex-shrink: 0;
}

.site-nav__inner {
  height: 100%;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 24px;
}
.site-nav__brand {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  font-weight: 700;
  letter-spacing: -0.01em;
  font-size: 1.0625rem;
  color: var(--text);
}
.site-nav__mark {
  display: inline-grid;
  place-items: center;
  width: 28px;
  height: 28px;
  border-radius: 8px;
  background: var(--gradient);
  color: white;
  font-size: 0.95rem;
  line-height: 1;
}
.site-nav__beta {
  display: inline-block;
  margin-left: 4px;
  padding: 2px 8px;
  font-size: 0.6875rem;
  font-weight: 600;
  letter-spacing: 0.06em;
  color: var(--purple);
  background: var(--purple-soft);
  border-radius: var(--radius-pill);
  text-transform: uppercase;
}
.site-nav__links {
  display: flex;
  align-items: center;
  gap: 8px;
}
.site-nav__link {
  display: inline-flex;
  align-items: center;
  padding: 8px 14px;
  font-size: 0.9375rem;
  font-weight: 500;
  color: var(--text-soft);
  border-radius: var(--radius-sm);
  transition: color var(--t-fast) var(--ease),
              background var(--t-fast) var(--ease);
}
.site-nav__link:hover {
  color: var(--text);
  background: rgba(15, 23, 42, 0.04);
}
.site-nav__link.is-current {
  color: var(--text);
}
.site-nav__link--cta {
  margin-left: 4px;
  padding: 9px 18px;
  color: white;
  background: var(--gradient);
  font-weight: 600;
  box-shadow: 0 2px 12px rgba(124, 58, 237, 0.20);
}
.site-nav__link--cta:hover {
  color: white;
  background: var(--gradient);
  transform: translateY(-1px);
  box-shadow: 0 6px 18px rgba(124, 58, 237, 0.28);
}
/* The default rules above only paint :link and :hover. Some browsers
   apply a :visited / :active color of their own that bleeds through
   on the gradient background. Force white in every interactive state. */
.site-nav__link--cta,
.site-nav__link--cta:link,
.site-nav__link--cta:visited,
.site-nav__link--cta:hover,
.site-nav__link--cta:active,
.site-nav__link--cta:focus,
.site-nav__link--cta:focus-visible,
.site-nav__link--cta.is-current {
  color: #ffffff;
}

/* Mobile: hide the muted text link on very small screens — keep the CTA */
@media (max-width: 480px) {
  .site-nav__link:not(.site-nav__link--cta):not(:hover):not(.is-current) {
    display: none;
  }
}


/* ============================================================
   5 · HERO
   ============================================================ */
.hero {
  position: relative;
  padding-top:    clamp(64px, 10vw, 120px);
  padding-bottom: clamp(64px, 10vw, 120px);
  background:
    radial-gradient(900px 420px at 88% -10%, rgba(236, 72, 153, 0.10), transparent 60%),
    radial-gradient(900px 480px at 10% 0%, rgba(124, 58, 237, 0.10), transparent 60%),
    var(--bg-tint);
  overflow: hidden;
}
.hero__grid {
  display: grid;
  grid-template-columns: minmax(0, 1.05fr) minmax(0, 1fr);
  gap: clamp(40px, 6vw, 80px);
  align-items: center;
}
@media (max-width: 900px) {
  .hero__grid { grid-template-columns: 1fr; }
}

.hero__eyebrow {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 6px 14px;
  font-size: var(--eyebrow);
  font-weight: 600;
  letter-spacing: 0.04em;
  color: var(--purple);
  background: white;
  border: 1px solid var(--border);
  border-radius: var(--radius-pill);
  margin-bottom: 22px;
  box-shadow: var(--shadow-xs);
}
.hero__eyebrow::before {
  content: "";
  width: 6px; height: 6px;
  border-radius: 50%;
  background: var(--purple);
  box-shadow: 0 0 0 4px rgba(124, 58, 237, 0.15);
}
.hero__title {
  font-size: var(--display);
  line-height: 1.02;
  letter-spacing: -0.035em;
  font-weight: 800;
  margin: 0 0 22px;
  color: var(--text);
}
.hero__title em {
  font-style: normal;
  background: var(--gradient);
  -webkit-background-clip: text;
          background-clip: text;
  -webkit-text-fill-color: transparent;
}
.hero__sub {
  font-size: var(--body-lg);
  line-height: 1.55;
  color: var(--text-soft);
  max-width: 38ch;
  margin: 0 0 32px;
}
.hero__cta {
  display: flex;
  flex-wrap: wrap;
  gap: 12px;
}

/* Buttons */
.btn {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 14px 22px;
  border: 1px solid transparent;
  border-radius: var(--radius-sm);
  font-family: inherit;
  font-size: 1rem;
  font-weight: 600;
  cursor: pointer;
  text-decoration: none;
  transition: transform var(--t-fast) var(--ease),
              box-shadow var(--t-fast) var(--ease),
              background var(--t-fast) var(--ease),
              border-color var(--t-fast) var(--ease);
}
.btn--primary {
  color: white;
  background: var(--gradient);
  box-shadow: 0 8px 24px -8px rgba(124, 58, 237, 0.5);
}
.btn--primary:hover {
  transform: translateY(-1px);
  box-shadow: 0 12px 28px -8px rgba(124, 58, 237, 0.6);
}
.btn--secondary {
  color: var(--text);
  background: white;
  border-color: var(--border);
  box-shadow: var(--shadow-xs);
}
.btn--secondary:hover {
  border-color: #cbd5e1;
  transform: translateY(-1px);
}
.btn__arrow {
  transition: transform var(--t-fast) var(--ease);
}
.btn:hover .btn__arrow { transform: translateX(2px); }


/* ============================================================
   6 · SCREENSHOT FRAME
   ------------------------------------------------------------
   Reusable browser-window-style frame for demo screenshots
   and videos. Replace the inner .screenshot__body content
   with <img>, <video>, or a real component when you have
   real assets.
   ============================================================ */
.screenshot {
  position: relative;
  background: white;
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  overflow: hidden;
  box-shadow: var(--shadow-lg);
  isolation: isolate;
}
.screenshot__chrome {
  display: flex;
  align-items: center;
  gap: 8px;
  height: 38px;
  padding: 0 16px;
  background: #f7f7fb;
  border-bottom: 1px solid var(--border);
}
.screenshot__dots {
  display: inline-flex;
  gap: 6px;
}
.screenshot__dots span {
  width: 11px; height: 11px;
  border-radius: 50%;
  background: #e2e2ea;
}
.screenshot__dots span:nth-child(1) { background: #ff6058; }
.screenshot__dots span:nth-child(2) { background: #ffbd2e; }
.screenshot__dots span:nth-child(3) { background: #28c942; }
.screenshot__url {
  flex: 1;
  text-align: center;
  font-size: 0.8125rem;
  color: var(--text-muted);
  font-family: "IBM Plex Mono", ui-monospace, SFMono-Regular, Menlo, monospace;
  letter-spacing: 0.01em;
}
.screenshot__body {
  position: relative;
  aspect-ratio: 16 / 10;
  background: var(--bg-soft);
  display: grid;
  place-items: center;
}
.screenshot__body--media {
  /* For when you swap in a real <img> or <video> — the
     aspect-ratio still holds the frame shape. */
  padding: 0;
}
.screenshot__body--media > img,
.screenshot__body--media > video {
  width: 100%;
  height: 100%;
  object-fit: cover;
}
.screenshot__placeholder {
  text-align: center;
  padding: 24px;
  color: var(--text-muted);
}
.screenshot__placeholder-icon {
  width: 56px;
  height: 56px;
  margin: 0 auto 14px;
  border-radius: 14px;
  background: var(--gradient-soft);
  border: 1px solid var(--border);
  display: grid;
  place-items: center;
  color: var(--purple);
}
.screenshot__placeholder-title {
  font-size: 0.9375rem;
  font-weight: 600;
  color: var(--text-soft);
  margin-bottom: 4px;
}
.screenshot__placeholder-note {
  font-size: 0.8125rem;
  color: var(--text-muted);
}

/* Subtle floating decoration behind the hero screenshot */
.hero__screenshot {
  position: relative;
}
.hero__screenshot::before {
  content: "";
  position: absolute;
  inset: -20px -16px -16px -20px;
  background: var(--gradient);
  filter: blur(60px);
  opacity: 0.12;
  z-index: -1;
  border-radius: 32px;
}


/* ============================================================
   7 · PROOF STRIP (under the hero)
   ------------------------------------------------------------
   Three outcome words. No symbols, no signal names — describes
   what PsiGuard catches, not how. The visual rhythm (thin
   bordered band under the hero) is what matters here.
   ============================================================ */
.proof-strip {
  border-top: 1px solid var(--border-soft);
  border-bottom: 1px solid var(--border-soft);
  padding: 26px 0;
  background: white;
}
.proof-strip__inner {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: center;
  gap: clamp(20px, 4vw, 56px);
}
.proof-strip__label {
  color: var(--text-muted);
  font-weight: 500;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  font-size: 0.75rem;
}
.proof-strip__items {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: clamp(16px, 3vw, 40px);
}
.proof-strip__item {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  font-size: 1.0625rem;
  font-weight: 600;
  letter-spacing: -0.005em;
  color: var(--text);
}
.proof-strip__item svg {
  color: var(--purple);
  flex-shrink: 0;
}


/* ============================================================
   8 · SECTIONS (alternating text / screenshot)
   ============================================================ */
.section {
  padding: var(--section-y) 0;
}
.section--soft {
  background: var(--bg-soft);
}
.section__grid {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(0, 1.1fr);
  gap: clamp(40px, 6vw, 96px);
  align-items: center;
}
.section__grid--reverse .section__copy { order: 2; }
.section__grid--reverse .section__media { order: 1; }
@media (max-width: 900px) {
  .section__grid { grid-template-columns: 1fr; gap: 48px; }
  .section__grid--reverse .section__copy,
  .section__grid--reverse .section__media { order: 0; }
}

.section__eyebrow {
  display: inline-block;
  font-size: var(--eyebrow);
  font-weight: 600;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--purple);
  margin-bottom: 18px;
}
.section__title {
  font-size: var(--h2);
  line-height: 1.1;
  letter-spacing: -0.025em;
  font-weight: 700;
  margin: 0 0 20px;
  color: var(--text);
}
.section__lede {
  font-size: var(--body-lg);
  line-height: 1.6;
  color: var(--text-soft);
  margin: 0 0 24px;
  max-width: 52ch;
}
.section__points {
  list-style: none;
  margin: 0;
  padding: 0;
}
.section__points li {
  position: relative;
  padding-left: 28px;
  margin-bottom: 12px;
  color: var(--text-soft);
  line-height: 1.5;
}
.section__points li::before {
  content: "";
  position: absolute;
  left: 0; top: 0.55em;
  width: 16px; height: 16px;
  border-radius: 50%;
  background: var(--gradient-soft);
  border: 1.5px solid var(--purple);
}


/* ============================================================
   9 · FEATURE TRIPTYCH (three feature blocks)
   ============================================================ */
.triptych {
  padding: var(--section-y) 0;
  background: white;
}
.triptych__head {
  text-align: center;
  max-width: 720px;
  margin: 0 auto clamp(48px, 8vw, 80px);
}
.triptych__head .section__title { margin-bottom: 14px; }
.triptych__head .section__lede {
  margin-left: auto;
  margin-right: auto;
  max-width: 60ch;
}
.triptych__grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: clamp(20px, 3vw, 32px);
}
@media (max-width: 900px) {
  .triptych__grid { grid-template-columns: 1fr; }
}

.feature {
  padding: 36px 28px;
  background: var(--bg-soft);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  transition: transform var(--t-base) var(--ease),
              box-shadow var(--t-base) var(--ease),
              border-color var(--t-base) var(--ease);
}
.feature:hover {
  transform: translateY(-3px);
  border-color: #d8dce6;
  box-shadow: var(--shadow-md);
}
.feature__icon {
  width: 44px;
  height: 44px;
  display: grid;
  place-items: center;
  border-radius: 12px;
  background: white;
  border: 1px solid var(--border);
  color: var(--purple);
  margin-bottom: 20px;
}
.feature__title {
  font-size: 1.1875rem;
  font-weight: 700;
  letter-spacing: -0.01em;
  margin: 0 0 8px;
  color: var(--text);
}
.feature__body {
  font-size: 0.9375rem;
  color: var(--text-soft);
  line-height: 1.55;
  margin: 0;
}


/* ============================================================
   10 · BETA / HONESTY CARD
   ============================================================ */
.beta-note {
  padding: var(--section-y) 0;
}
.beta-note__card {
  position: relative;
  padding: clamp(32px, 5vw, 56px);
  border-radius: var(--radius-lg);
  background:
    linear-gradient(135deg, rgba(124, 58, 237, 0.04), rgba(236, 72, 153, 0.03));
  border: 1px solid var(--border);
  display: grid;
  grid-template-columns: minmax(0, auto) minmax(0, 1fr);
  gap: clamp(24px, 4vw, 48px);
  align-items: center;
}
@media (max-width: 720px) {
  .beta-note__card { grid-template-columns: 1fr; }
}
.beta-note__pill {
  display: inline-block;
  padding: 6px 14px;
  font-size: 0.75rem;
  font-weight: 700;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--purple);
  background: var(--purple-soft);
  border-radius: var(--radius-pill);
  margin-bottom: 14px;
}
.beta-note__title {
  font-size: clamp(1.5rem, 2.6vw, 2rem);
  letter-spacing: -0.02em;
  line-height: 1.2;
  font-weight: 700;
  margin: 0 0 14px;
}
.beta-note__body {
  font-size: var(--body-lg);
  color: var(--text-soft);
  margin: 0;
  line-height: 1.55;
  max-width: 60ch;
}
.beta-note__body strong { color: var(--text); font-weight: 600; }


/* ============================================================
   11 · CTA STRIP
   ============================================================ */
.cta-strip {
  position: relative;
  padding: clamp(80px, 12vw, 140px) 0;
  background:
    radial-gradient(800px 360px at 20% 30%, rgba(236, 72, 153, 0.30), transparent 60%),
    radial-gradient(800px 360px at 80% 70%, rgba(124, 58, 237, 0.35), transparent 60%),
    var(--bg-band);
  color: var(--text-on-dark);
  overflow: hidden;
  text-align: center;
}
.cta-strip__title {
  font-size: clamp(1.875rem, 4.5vw, 3.25rem);
  letter-spacing: -0.03em;
  line-height: 1.08;
  font-weight: 700;
  margin: 0 0 18px;
  color: white;
}
.cta-strip__sub {
  font-size: var(--body-lg);
  color: var(--text-on-dark-soft);
  margin: 0 auto 36px;
  max-width: 52ch;
}
.cta-strip .btn--primary {
  /* On the dark band, a white button reads cleaner than the gradient. */
  background: white;
  color: var(--text);
  box-shadow: 0 16px 40px -12px rgba(0, 0, 0, 0.4);
}
.cta-strip .btn--primary:hover {
  background: white;
  color: var(--text);
  transform: translateY(-1px);
  box-shadow: 0 20px 48px -12px rgba(0, 0, 0, 0.5);
}
.cta-strip .btn--secondary {
  background: transparent;
  color: white;
  border-color: rgba(255, 255, 255, 0.30);
}
.cta-strip .btn--secondary:hover {
  background: rgba(255, 255, 255, 0.08);
  border-color: rgba(255, 255, 255, 0.5);
}


/* ============================================================
   12 · FOOTER
   ============================================================ */
.site-footer {
  padding: 36px 0 48px;
  border-top: 1px solid var(--border-soft);
  color: var(--text-muted);
  font-size: 0.875rem;
}
.site-footer__inner {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
}
.site-footer__brand {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  color: var(--text-soft);
  font-weight: 600;
}
.site-footer__brand-mark {
  display: inline-grid;
  place-items: center;
  width: 22px; height: 22px;
  border-radius: 6px;
  background: var(--gradient);
  color: white;
  font-size: 0.75rem;
}
.site-footer__links {
  display: flex;
  gap: 20px;
}
.site-footer__links a {
  color: var(--text-muted);
  transition: color var(--t-fast) var(--ease);
}
.site-footer__links a:hover { color: var(--text); }


/* ============================================================
   13 · ENTRANCE ANIMATIONS
   ------------------------------------------------------------
   Quiet, single-shot reveal on the hero — no scroll-trigger
   loops or distracting micro-interactions. Respects users
   who've asked the OS for reduced motion.
   ============================================================ */
@keyframes rise {
  from { opacity: 0; transform: translateY(14px); }
  to   { opacity: 1; transform: translateY(0); }
}
.reveal {
  animation: rise 600ms var(--ease) both;
}
.reveal-1 { animation-delay: 60ms; }
.reveal-2 { animation-delay: 160ms; }
.reveal-3 { animation-delay: 260ms; }
.reveal-4 { animation-delay: 360ms; }
.reveal-5 { animation-delay: 460ms; }

@media (prefers-reduced-motion: reduce) {
  .reveal,
  .reveal-1, .reveal-2, .reveal-3, .reveal-4, .reveal-5 {
    animation: none;
  }
  .btn,
  .feature,
  .btn__arrow { transition: none; }
}


/* ============================================================
   14 · APP NAVBAR (authenticated surfaces)
   ------------------------------------------------------------
   Used by /home, /chat, /dashboard. Lives in partials/_app_nav.html.
   Builds on .site-nav (the public-nav shell — sticky, blurred,
   brand-mark) and adds primary product links + usage chip +
   account menu. Public marketing pages keep using .site-nav
   alone via partials/_nav.html.
   ============================================================ */

.app-nav__links {
  display: flex;
  align-items: center;
  gap: 2px;
  margin-left: 28px;
}
.app-nav__links .site-nav__link {
  font-size: 0.9375rem;
}
.app-nav__links .site-nav__link.is-current {
  color: var(--text);
  background: rgba(15, 23, 42, 0.04);
}
@media (max-width: 720px) {
  /* On narrow screens the primary links collapse into the account menu;
     keeping them inline would crowd the brand + usage chip. */
  .app-nav__links { display: none; }
}

.app-nav__right {
  display: flex;
  align-items: center;
  gap: 10px;
  margin-left: auto;
}

/* ---------- Usage chip ---------- */
.app-nav__usage {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 6px 12px 6px 10px;
  font-size: 0.8125rem;
  font-weight: 500;
  color: var(--text-soft);
  background: white;
  border: 1px solid var(--border);
  border-radius: var(--radius-pill);
  box-shadow: var(--shadow-xs);
  transition: border-color var(--t-fast) var(--ease),
              color var(--t-fast) var(--ease);
}
.app-nav__usage:hover {
  border-color: #cbd5e1;
  color: var(--text);
}
.app-nav__usage-dot {
  width: 8px; height: 8px;
  border-radius: 50%;
  background: var(--gradient);
  box-shadow: 0 0 0 3px rgba(124, 58, 237, 0.12);
  flex-shrink: 0;
}
.app-nav__usage.is-warn .app-nav__usage-dot {
  background: #f59e0b;
  box-shadow: 0 0 0 3px rgba(245, 158, 11, 0.15);
}
.app-nav__usage.is-danger .app-nav__usage-dot {
  background: #ef4444;
  box-shadow: 0 0 0 3px rgba(239, 68, 68, 0.15);
}
@media (max-width: 520px) {
  .app-nav__usage { display: none; }
}

/* ---------- Account menu (native <details>/<summary>) ---------- */
.app-nav__account {
  position: relative;
}
.app-nav__account-trigger {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 4px 10px 4px 4px;
  font-family: inherit;
  font-size: 0.875rem;
  color: var(--text-soft);
  background: white;
  border: 1px solid var(--border);
  border-radius: var(--radius-pill);
  cursor: pointer;
  list-style: none;
  user-select: none;
  transition: border-color var(--t-fast) var(--ease),
              box-shadow var(--t-fast) var(--ease);
}
.app-nav__account-trigger::-webkit-details-marker,
.app-nav__account-trigger::marker { display: none; content: ""; }
.app-nav__account-trigger:hover {
  border-color: #cbd5e1;
  box-shadow: var(--shadow-xs);
}
.app-nav__account[open] .app-nav__account-trigger {
  border-color: var(--purple);
  box-shadow: 0 0 0 3px rgba(124, 58, 237, 0.10);
}
.app-nav__account-trigger svg {
  transition: transform var(--t-fast) var(--ease);
}
.app-nav__account[open] .app-nav__account-trigger svg {
  transform: rotate(180deg);
}
.app-nav__avatar {
  width: 28px; height: 28px;
  display: grid; place-items: center;
  border-radius: 50%;
  background: var(--gradient);
  color: white;
  font-size: 0.75rem;
  font-weight: 700;
  line-height: 1;
}

.app-nav__menu {
  position: absolute;
  top: calc(100% + 8px);
  right: 0;
  min-width: 240px;
  padding: 6px;
  background: white;
  border: 1px solid var(--border);
  border-radius: var(--radius);
  box-shadow: var(--shadow-md);
  z-index: 60;
  animation: appNavMenuIn 180ms var(--ease);
}
@keyframes appNavMenuIn {
  from { opacity: 0; transform: translateY(-4px); }
  to   { opacity: 1; transform: translateY(0); }
}
.app-nav__menu-head {
  padding: 10px 12px 12px;
  border-bottom: 1px solid var(--border-soft);
  margin-bottom: 4px;
}
.app-nav__menu-name {
  font-size: 0.875rem;
  font-weight: 600;
  color: var(--text);
}
.app-nav__menu-email {
  font-size: 0.8125rem;
  color: var(--text-muted);
  margin-top: 2px;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}
.app-nav__menu-item {
  display: block;
  width: 100%;
  padding: 9px 12px;
  font-family: inherit;
  font-size: 0.875rem;
  color: var(--text-soft);
  background: transparent;
  border: none;
  border-radius: var(--radius-sm);
  cursor: pointer;
  text-align: left;
  transition: background var(--t-fast) var(--ease),
              color var(--t-fast) var(--ease);
}
.app-nav__menu-item:hover,
.app-nav__menu-item:focus-visible {
  color: var(--text);
  background: var(--bg-soft);
  outline: none;
}
.app-nav__menu-item--danger { color: #b91c1c; }
.app-nav__menu-item--danger:hover {
  color: #b91c1c;
  background: rgba(239, 68, 68, 0.06);
}

@media (prefers-reduced-motion: reduce) {
  .app-nav__menu,
  .app-nav__account-trigger svg { animation: none; transition: none; }
}
