:root {
  --bg: #0b1a14;
  --bg-elev: #0f2419;
  --surface: #ffffff;
  --surface-tint: #fafaf7;
  --ink: #0a1a13;
  --ink-soft: #46514b;
  --muted: #7b8682;
  --line: #e6e4dc;
  --line-dark: #1d3527;
  --gold: #c9a24a;
  --gold-soft: #e7c97a;
  --accent: #d97540;
  --green: #1f6b46;
  --max: 1180px;
  --radius: 14px;
  --radius-sm: 8px;
  --shadow-sm: 0 1px 2px rgba(10, 26, 19, 0.06), 0 2px 8px rgba(10, 26, 19, 0.04);
  --shadow-lg: 0 24px 60px -20px rgba(10, 26, 19, 0.35);
  --font-display: "Fraunces", "Playfair Display", Georgia, "Times New Roman", serif;
  --font-body: "Inter", -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
}

* { box-sizing: border-box; }
html { scroll-behavior: smooth; -webkit-text-size-adjust: 100%; }
body {
  margin: 0;
  font-family: var(--font-body);
  font-size: 17px;
  line-height: 1.6;
  color: var(--ink);
  background: var(--surface);
  -webkit-font-smoothing: antialiased;
}
img { max-width: 100%; display: block; }
a { color: inherit; text-decoration: none; }

h1, h2, h3, h4 {
  font-family: var(--font-display);
  font-weight: 600;
  letter-spacing: -0.02em;
  margin: 0 0 0.4em;
  color: var(--ink);
}
h1 { font-size: clamp(2.6rem, 5.2vw, 4.4rem); line-height: 1.05; }
h2 { font-size: clamp(2rem, 3.6vw, 2.85rem); line-height: 1.1; }
h3 { font-size: 1.35rem; line-height: 1.25; }
p { margin: 0 0 1em; color: var(--ink-soft); }
.lead { font-size: 1.18rem; color: var(--ink-soft); max-width: 60ch; }

.eyebrow {
  font-family: var(--font-body);
  font-size: 0.78rem;
  font-weight: 600;
  letter-spacing: 0.18em;
  text-transform: uppercase;
  color: var(--gold);
  margin-bottom: 1.1rem;
  display: inline-block;
}
.dark .eyebrow { color: var(--gold-soft); }

.container { max-width: var(--max); margin: 0 auto; padding: 0 24px; }
section { padding: 96px 0; }
section.tight { padding: 64px 0; }

/* ---------- NAV ---------- */
.nav {
  position: sticky; top: 0; z-index: 50;
  backdrop-filter: saturate(160%) blur(14px);
  -webkit-backdrop-filter: saturate(160%) blur(14px);
  background: rgba(255,255,255,0.82);
  border-bottom: 1px solid var(--line);
}
.nav-inner {
  display: flex; align-items: center; justify-content: space-between;
  height: 68px; max-width: var(--max); margin: 0 auto; padding: 0 24px;
}
/* ---------- BRAND WORDMARK (CAUFP-style: bold acronym + stacked fullname) ---------- */
.brand {
  display: inline-flex;
  align-items: center;
  gap: 12px;
  text-decoration: none;
  color: var(--ink);
  line-height: 1;
}
.brand-name {
  font-family: var(--font-body); /* Inter */
  font-size: 1.65rem;
  font-weight: 800;
  letter-spacing: -0.01em;
  color: var(--green);
  line-height: 1;
}
.brand-fullname {
  display: inline-flex;
  flex-direction: column;
  font-family: var(--font-body);
  font-size: 0.6rem;
  font-weight: 700;
  letter-spacing: 0.08em;
  line-height: 1.35;
  text-transform: uppercase;
  color: var(--muted);
  border-left: 1px solid var(--line);
  padding-left: 12px;
}
@media (max-width: 1024px) {
  .nav .brand-fullname { display: none; }
}

footer .brand { color: #fff; }
footer .brand-name {
  color: #fff;
  font-size: 2rem;
}
footer .brand-fullname {
  color: rgba(255,255,255,0.6);
  font-size: 0.66rem;
  border-left-color: rgba(255,255,255,0.18);
}
.nav-links { display: flex; align-items: center; gap: 4px; }
.nav-links a {
  padding: 8px 14px; border-radius: 999px; font-size: 0.95rem; font-weight: 500;
  color: var(--ink-soft); transition: color .2s, background .2s;
}
.nav-links a:hover { color: var(--ink); background: var(--surface-tint); }
.nav-links a.active { color: var(--ink); }
.nav-cta { margin-left: 10px; }
.nav-toggle { display: none; background: none; border: 0; padding: 6px; cursor: pointer; }
.nav-toggle span { display: block; width: 22px; height: 2px; background: var(--ink); margin: 5px 0; transition: transform .25s; }

@media (max-width: 880px) {
  .nav-toggle { display: block; }
  .nav-links {
    position: absolute; top: 68px; left: 0; right: 0;
    flex-direction: column; align-items: stretch; gap: 0;
    background: #fff; border-bottom: 1px solid var(--line);
    padding: 12px 16px 18px; transform: translateY(-110%);
    transition: transform .25s ease; box-shadow: var(--shadow-lg);
  }
  .nav-links.open { transform: translateY(0); }
  .nav-links a { padding: 12px 8px; border-radius: 6px; }
  .nav-cta { margin: 8px 0 0; }
}

/* ---------- BUTTONS ---------- */
.btn {
  display: inline-flex; align-items: center; gap: 8px;
  padding: 12px 22px; border-radius: 999px; font-weight: 600; font-size: 0.95rem;
  border: 1px solid transparent; cursor: pointer; transition: transform .15s, box-shadow .2s, background .2s, color .2s;
}
.btn-primary { background: var(--ink); color: #fff; }
.btn-primary:hover { background: #000; transform: translateY(-1px); box-shadow: var(--shadow-lg); }
.btn-gold { background: var(--gold); color: #1a1408; }
.btn-gold:hover { background: var(--gold-soft); transform: translateY(-1px); }
.btn-ghost { background: transparent; color: var(--ink); border-color: var(--line); }
.btn-ghost:hover { border-color: var(--ink); }
.btn-ghost-light { background: transparent; color: #fff; border-color: rgba(255,255,255,0.25); }
.btn-ghost-light:hover { border-color: #fff; }

/* ---------- HERO ---------- */
.hero {
  position: relative; overflow: hidden;
  background:
    radial-gradient(900px 500px at 85% -10%, rgba(201,162,74,0.18), transparent 60%),
    radial-gradient(900px 600px at 10% 110%, rgba(31,107,70,0.35), transparent 55%),
    linear-gradient(180deg, #0b1a14 0%, #0a1610 100%);
  color: #fff;
  padding: 140px 0 120px;
}
.hero h1 { color: #fff; }
.hero p { color: rgba(255,255,255,0.78); font-size: 1.2rem; max-width: 56ch; }
.hero-actions { display: flex; flex-wrap: wrap; gap: 12px; margin-top: 28px; }
.hero-meta {
  display: flex; gap: 28px; flex-wrap: wrap; margin-top: 48px;
  padding-top: 28px; border-top: 1px solid rgba(255,255,255,0.12);
}
.hero-meta div { color: rgba(255,255,255,0.7); font-size: 0.92rem; }
.hero-meta strong { display: block; color: #fff; font-size: 1.6rem; font-family: var(--font-display); font-weight: 600; margin-bottom: 2px; }

.page-hero {
  background:
    radial-gradient(800px 400px at 90% -20%, rgba(201,162,74,0.14), transparent 60%),
    linear-gradient(180deg, #0b1a14 0%, #0e2418 100%);
  color: #fff; padding: 120px 0 90px;
}
.page-hero h1 { color: #fff; font-size: clamp(2.2rem, 4vw, 3.4rem); margin-bottom: 12px; }
.page-hero p { color: rgba(255,255,255,0.75); max-width: 60ch; font-size: 1.1rem; }

/* ---------- SECTION HEADERS ---------- */
.section-head { max-width: 720px; margin: 0 0 56px; }
.section-head.center { margin-left: auto; margin-right: auto; text-align: center; }

/* ---------- GRID & CARDS ---------- */
.grid { display: grid; gap: 24px; }
.grid-2 { grid-template-columns: repeat(2, 1fr); }
.grid-3 { grid-template-columns: repeat(3, 1fr); }
.grid-4 { grid-template-columns: repeat(4, 1fr); }
@media (max-width: 880px) {
  .grid-2, .grid-3, .grid-4 { grid-template-columns: 1fr; }
}

.card {
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  padding: 32px;
  transition: transform .2s, box-shadow .2s, border-color .2s;
}
.card:hover { transform: translateY(-2px); box-shadow: var(--shadow-lg); border-color: #d8d4c5; }
.card .icon {
  width: 44px; height: 44px; border-radius: 12px;
  background: linear-gradient(135deg, var(--green), var(--gold));
  color: #fff; display: grid; place-items: center; font-size: 1.2rem;
  margin-bottom: 18px;
}
.card h3 { margin-bottom: 8px; }
.card p { margin: 0; font-size: 0.98rem; }

/* tint card variant */
.card-tint { background: var(--surface-tint); border-color: transparent; }

/* ---------- STAT BLOCKS ---------- */
.stats { display: grid; grid-template-columns: repeat(4, 1fr); gap: 24px; }
@media (max-width: 880px) { .stats { grid-template-columns: repeat(2, 1fr); } }
.stat .num {
  font-family: var(--font-display); font-weight: 600;
  font-size: clamp(2.2rem, 4vw, 3.2rem); line-height: 1; letter-spacing: -0.02em;
  color: var(--ink); display: block; margin-bottom: 6px;
}
.stat .label { font-size: 0.92rem; color: var(--muted); }
.dark .stat .num { color: #fff; }
.dark .stat .label { color: rgba(255,255,255,0.6); }

/* ---------- DARK SECTION ---------- */
.dark {
  background: var(--bg); color: rgba(255,255,255,0.85);
}
.dark h1, .dark h2, .dark h3 { color: #fff; }
.dark p { color: rgba(255,255,255,0.7); }
.dark .card {
  background: var(--bg-elev); border-color: var(--line-dark);
}
.dark .card:hover { border-color: rgba(201,162,74,0.5); }
.dark .card p { color: rgba(255,255,255,0.7); }

/* ---------- PROBLEM ROW ---------- */
.problem-card { padding: 28px; }
.problem-card .icon { background: rgba(217,117,64,0.15); color: var(--accent); }

/* ---------- TIERS ---------- */
.tier {
  border: 1px solid var(--line); border-radius: var(--radius);
  padding: 36px 28px; background: #fff; display: flex; flex-direction: column;
}
.tier.featured {
  background: linear-gradient(180deg, #0e2418, #0a1a13); color: #fff;
  border: 0; transform: translateY(-8px);
  box-shadow: var(--shadow-lg);
}
.tier.featured h3, .tier.featured .price { color: #fff; }
.tier .price { font-family: var(--font-display); font-size: 2rem; margin: 6px 0 16px; color: var(--ink); }
.tier ul { list-style: none; padding: 0; margin: 0 0 24px; }
.tier li {
  position: relative; padding: 8px 0 8px 26px; font-size: 0.95rem;
  color: var(--ink-soft); border-bottom: 1px solid var(--line);
}
.tier.featured li { color: rgba(255,255,255,0.8); border-color: rgba(255,255,255,0.1); }
.tier li:last-child { border-bottom: 0; }
.tier li::before {
  content: ""; position: absolute; left: 0; top: 14px; width: 14px; height: 8px;
  border-left: 2px solid var(--gold); border-bottom: 2px solid var(--gold);
  transform: rotate(-45deg);
}
.tier-tag {
  align-self: flex-start; font-size: 0.75rem; font-weight: 600; letter-spacing: 0.1em;
  text-transform: uppercase; padding: 4px 10px; border-radius: 999px;
  background: var(--gold); color: #1a1408; margin-bottom: 14px;
}

/* ---------- TEAM ---------- */
.team-card {
  display: grid;
  grid-template-columns: 180px 1fr;
  gap: 0; align-items: stretch;
  text-align: left;
  background: #fff;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  overflow: hidden;
  transition: transform .2s, box-shadow .2s, border-color .2s;
}
.team-card:hover { transform: translateY(-2px); box-shadow: var(--shadow-lg); border-color: #d8d4c5; }
@media (max-width: 560px) {
  .team-card { grid-template-columns: 1fr; }
  .team-photo { aspect-ratio: 16 / 10; }
}
.team-photo {
  min-height: 200px;
  background: linear-gradient(135deg, #0e2418 0%, #1f6b46 60%, #c9a24a 100%);
  display: grid; place-items: center; color: #fff;
  font-family: var(--font-display); font-size: 2.4rem; font-weight: 600;
  letter-spacing: -0.02em;
  overflow: hidden;
}
.team-photo img {
  width: 100%; height: 100%;
  object-fit: cover; object-position: center 25%;
  display: block;
}
.team-photo--placeholder {
  background: linear-gradient(135deg, #1a2d22 0%, #2c4a36 100%);
  position: relative;
}
.team-photo--placeholder span {
  font-family: var(--font-display);
  font-size: 2.4rem;
  color: rgba(255,255,255,0.4);
  font-weight: 600;
}
.team-card--placeholder { opacity: 0.85; }
.team-card--placeholder:hover { opacity: 1; }
.team-card--placeholder .team-role {
  color: var(--muted);
  font-style: italic;
}
.team-body { padding: 24px 26px; display: flex; flex-direction: column; justify-content: center; }
.team-body h3 { margin-bottom: 2px; font-size: 1.35rem; }
.team-role { color: var(--gold); font-weight: 600; font-size: 0.85rem; letter-spacing: 0.04em; margin-bottom: 12px; text-transform: uppercase; }
.team-body p { font-size: 0.93rem; margin-bottom: 8px; }
.team-body p:last-child { margin-bottom: 0; }

/* Tenure / sub-role line (e.g. "President 2022–2023") */
.team-tenure {
  font-family: var(--font-body);
  font-size: 0.75rem;
  color: var(--muted);
  font-style: italic;
  margin-top: -6px;
  margin-bottom: 4px;
  letter-spacing: 0.01em;
}

/* ---------- TIMELINE ---------- */
.timeline { display: grid; grid-template-columns: repeat(4, 1fr); gap: 20px; counter-reset: q; }
@media (max-width: 880px) { .timeline { grid-template-columns: 1fr; } }
.q-card {
  background: var(--surface-tint); border-radius: var(--radius); padding: 28px;
  border-top: 3px solid var(--gold);
}
.q-card h4 { font-family: var(--font-body); font-size: 0.82rem; letter-spacing: 0.18em; text-transform: uppercase; color: var(--green); margin-bottom: 8px; }
.q-card h3 { margin-bottom: 4px; }
.q-card .months { font-size: 0.85rem; color: var(--muted); margin-bottom: 14px; }
.q-card ul { padding-left: 18px; margin: 0; color: var(--ink-soft); font-size: 0.95rem; }
.q-card li { margin-bottom: 6px; }

/* ---------- CTA STRIP ---------- */
.cta {
  background: linear-gradient(120deg, #0e2418 0%, #1f6b46 100%);
  color: #fff; border-radius: 24px; padding: 64px 48px;
  display: flex; align-items: center; justify-content: space-between; gap: 32px; flex-wrap: wrap;
}
.cta h2 { color: #fff; margin-bottom: 8px; }
.cta p { color: rgba(255,255,255,0.8); margin: 0; max-width: 50ch; }

/* ---------- FOOTER ---------- */
footer {
  background: #07120c; color: rgba(255,255,255,0.7);
  padding: 64px 0 32px; margin-top: 80px;
}
.footer-grid {
  display: grid; grid-template-columns: 2fr 1fr 1fr 1fr; gap: 40px;
  padding-bottom: 40px; border-bottom: 1px solid rgba(255,255,255,0.08);
}
@media (max-width: 880px) { .footer-grid { grid-template-columns: 1fr 1fr; } }
footer h4 { color: #fff; font-family: var(--font-body); font-size: 0.85rem; letter-spacing: 0.12em; text-transform: uppercase; margin-bottom: 18px; }
footer a { display: block; padding: 6px 0; color: rgba(255,255,255,0.65); font-size: 0.95rem; }
footer a:hover { color: var(--gold-soft); }
.footer-bottom {
  display: flex; justify-content: space-between; flex-wrap: wrap;
  padding-top: 24px; font-size: 0.85rem; color: rgba(255,255,255,0.45);
}

/* ---------- SOCIAL ICONS ---------- */
.footer-social {
  display: flex;
  gap: 10px;
  margin-top: 20px;
}
.footer-social a {
  display: inline-flex !important;
  align-items: center;
  justify-content: center;
  width: 36px;
  height: 36px;
  padding: 0 !important;
  border-radius: 50%;
  background: rgba(255,255,255,0.06);
  color: rgba(255,255,255,0.7) !important;
  transition: background .15s, color .15s, transform .15s;
}
.footer-social a:hover {
  background: var(--gold);
  color: #1a1408 !important;
  transform: translateY(-2px);
}
.footer-social svg {
  width: 18px;
  height: 18px;
  display: block;
}

/* ---------- FORMS ---------- */
.form-row { display: grid; grid-template-columns: 1fr 1fr; gap: 18px; }
@media (max-width: 700px) { .form-row { grid-template-columns: 1fr; } }
.field { display: flex; flex-direction: column; margin-bottom: 18px; }
.field label { font-size: 0.85rem; font-weight: 600; margin-bottom: 6px; color: var(--ink); }
.field input, .field textarea, .field select {
  font: inherit; padding: 12px 14px; border: 1px solid var(--line);
  border-radius: var(--radius-sm); background: #fff; color: var(--ink);
  transition: border-color .15s, box-shadow .15s;
}
.field input:focus, .field textarea:focus, .field select:focus {
  outline: 0; border-color: var(--green); box-shadow: 0 0 0 3px rgba(31,107,70,0.15);
}

/* ---------- UTIL ---------- */
.split { display: grid; grid-template-columns: 1.1fr 0.9fr; gap: 64px; align-items: center; }
@media (max-width: 880px) { .split { grid-template-columns: 1fr; gap: 32px; } }
.kicker { color: var(--gold); font-weight: 600; }
.divider-line { height: 1px; background: var(--line); border: 0; margin: 0; }
.tag-row { display: flex; flex-wrap: wrap; gap: 8px; }
.tag {
  font-size: 0.82rem; padding: 6px 12px; border-radius: 999px;
  background: var(--surface-tint); color: var(--ink-soft); border: 1px solid var(--line);
}
.dark .tag { background: rgba(255,255,255,0.06); color: rgba(255,255,255,0.75); border-color: rgba(255,255,255,0.1); }

.value-card { padding: 32px; background: var(--surface-tint); border-radius: var(--radius); border-left: 3px solid var(--gold); }
.value-card h3 { font-family: var(--font-body); font-size: 1rem; letter-spacing: 0.1em; text-transform: uppercase; color: var(--green); margin-bottom: 10px; }
.value-card p { color: var(--ink); font-size: 1.05rem; margin: 0; }

/* ---------- FORM STATUS / SUCCESS ---------- */
.form-status {
  margin-top: 14px;
  padding: 12px 14px;
  border-radius: var(--radius-sm);
  font-size: 0.9rem;
  display: none;
}
.form-status:not(:empty) { display: block; }
.form-status--error {
  background: #fdecea;
  color: #8a1f12;
  border: 1px solid #f5c2c0;
}

.form-success {
  text-align: center;
  padding: 24px 8px 12px;
}
.form-success-mark {
  width: 64px; height: 64px;
  margin: 0 auto 14px;
  border-radius: 50%;
  display: grid; place-items: center;
  background: rgba(31,107,70,0.12);
  color: var(--green);
}
.form-success h3 {
  font-family: var(--font-display);
  font-size: 1.5rem;
  color: var(--ink);
  margin: 0 0 8px;
}
.form-success p {
  color: var(--ink-soft);
  max-width: 38ch;
  margin: 0 auto;
}

/* ---------- EVENTS ---------- */
.events-grid {
  display: grid; grid-template-columns: repeat(3, 1fr); gap: 24px;
}
@media (max-width: 980px) { .events-grid { grid-template-columns: repeat(2, 1fr); } }
@media (max-width: 640px) { .events-grid { grid-template-columns: 1fr; } }

.event-card {
  display: flex; flex-direction: column;
  background: #fff; border: 1px solid var(--line);
  border-radius: var(--radius); overflow: hidden;
  transition: transform .2s, box-shadow .2s, border-color .2s;
}
.event-card:hover { transform: translateY(-2px); box-shadow: var(--shadow-lg); border-color: #d8d4c5; }
.dark .event-card { background: var(--bg-elev); border-color: var(--line-dark); }
.dark .event-card:hover { border-color: rgba(201,162,74,0.5); }

.event-img {
  aspect-ratio: 16 / 10;
  background: var(--surface-tint) center/cover no-repeat;
  background-color: var(--surface-tint);
}
.event-img--placeholder {
  display: grid; place-items: center;
  background: linear-gradient(135deg, #0e2418 0%, #1f6b46 60%, var(--gold) 130%);
}
.event-img--placeholder span {
  font-family: var(--font-display); font-weight: 600; font-size: 3rem;
  color: rgba(255,255,255,0.85);
}

.event-body { padding: 22px 22px 24px; display: flex; flex-direction: column; gap: 8px; }
.event-body h3 { font-size: 1.25rem; margin: 2px 0; }
.event-meta { margin-bottom: 4px; }
.event-tag {
  display: inline-block; font-size: 0.72rem; font-weight: 600;
  letter-spacing: 0.12em; text-transform: uppercase;
  color: var(--green); background: rgba(31,107,70,0.1);
  padding: 4px 10px; border-radius: 999px;
}
.dark .event-tag { color: var(--gold-soft); background: rgba(201,162,74,0.12); }
.event-date {
  font-family: var(--font-body); font-size: 0.9rem;
  color: var(--ink-soft); font-weight: 600;
}
.dark .event-date { color: rgba(255,255,255,0.85); }
.event-loc { font-size: 0.88rem; color: var(--muted); }
.dark .event-loc { color: rgba(255,255,255,0.6); }
.event-body p { font-size: 0.95rem; margin: 4px 0 0; color: var(--ink-soft); }
.dark .event-body p { color: rgba(255,255,255,0.7); }
.event-cta { margin-top: 14px; align-self: flex-start; font-size: 0.88rem; padding: 8px 16px; }

.events-empty {
  grid-column: 1 / -1;
  text-align: center; padding: 56px 24px;
  background: var(--surface-tint); border-radius: var(--radius);
  border: 1px dashed var(--line);
}
.dark .events-empty { background: rgba(255,255,255,0.04); border-color: var(--line-dark); }
.events-empty p { max-width: 42ch; margin: 0 auto 18px; color: var(--ink-soft); }
.dark .events-empty p { color: rgba(255,255,255,0.7); }

/* Skeleton state */
.event-card--skeleton { pointer-events: none; }
.event-card--skeleton .event-img { background: var(--surface-tint); }
.dark .event-card--skeleton .event-img { background: rgba(255,255,255,0.06); }
.sk { background: linear-gradient(90deg, rgba(0,0,0,0.04) 0%, rgba(0,0,0,0.08) 50%, rgba(0,0,0,0.04) 100%); background-size: 200% 100%; animation: sk-shimmer 1.4s infinite; height: 12px; border-radius: 4px; margin-bottom: 10px; }
.dark .sk { background: linear-gradient(90deg, rgba(255,255,255,0.04) 0%, rgba(255,255,255,0.1) 50%, rgba(255,255,255,0.04) 100%); background-size: 200% 100%; }
.sk-line.short { width: 60%; }
@keyframes sk-shimmer { 0% { background-position: 200% 0; } 100% { background-position: -200% 0; } }

/* Calendar feature card (dark hero on events page) */
.calendar-card {
  background: linear-gradient(120deg, #0e2418 0%, #1f6b46 100%);
  color: #fff; border-radius: var(--radius);
  padding: 44px 40px;
  display: flex; align-items: center; justify-content: space-between;
  gap: 32px; flex-wrap: wrap;
}
.calendar-card h3 {
  font-family: var(--font-display); font-size: 1.8rem;
  margin: 4px 0 10px;
}
.calendar-card > div:first-child { flex: 1; min-width: 280px; }
.calendar-actions { display: flex; gap: 12px; flex-wrap: wrap; }
.calendar-updated {
  font-size: 0.82rem; color: rgba(255,255,255,0.55);
  margin: 8px 0 0;
}
.calendar-card--empty { padding: 36px 40px; }

/* =========================================================================
   AI CHAT WIDGET (bottom-right)
   ========================================================================= */
.acsn-root {
  position: fixed; right: 24px; bottom: 24px; z-index: 1000;
  font-family: var(--font-body);
}
.acsn-launcher {
  display: inline-flex; align-items: center; gap: 10px;
  padding: 14px 22px 14px 18px; border: 0; cursor: pointer;
  border-radius: 999px; font-weight: 600; font-size: 0.95rem;
  background: linear-gradient(135deg, #0e2418 0%, #1f6b46 60%, var(--gold) 130%);
  color: #fff;
  box-shadow: 0 10px 30px -8px rgba(10, 26, 19, 0.55), 0 2px 6px rgba(10, 26, 19, 0.25);
  transition: transform .15s, box-shadow .2s;
}
.acsn-launcher:hover { transform: translateY(-1px); box-shadow: 0 14px 36px -8px rgba(10, 26, 19, 0.6); }
.acsn-launcher svg { flex-shrink: 0; }
.acsn-launcher-label { white-space: nowrap; }

.acsn-panel {
  position: absolute; right: 0; bottom: 72px;
  width: min(380px, calc(100vw - 32px));
  height: min(560px, calc(100vh - 120px));
  background: #fff; border-radius: 18px;
  box-shadow: 0 30px 80px -20px rgba(10, 26, 19, 0.45), 0 4px 12px rgba(10, 26, 19, 0.15);
  border: 1px solid var(--line);
  display: flex; flex-direction: column; overflow: hidden;
  transform-origin: bottom right;
  transform: translateY(12px) scale(0.96);
  opacity: 0; pointer-events: none;
  transition: transform .22s ease, opacity .22s ease;
}
.acsn-root.acsn-open .acsn-panel {
  transform: translateY(0) scale(1); opacity: 1; pointer-events: auto;
}
.acsn-root.acsn-open .acsn-launcher-label { display: none; }
.acsn-root.acsn-open .acsn-launcher { padding: 14px; border-radius: 50%; }

.acsn-header {
  padding: 16px 18px;
  background: linear-gradient(120deg, #0e2418 0%, #1f6b46 100%);
  color: #fff;
  display: flex; align-items: center; justify-content: space-between; gap: 12px;
}
.acsn-header-text { display: flex; flex-direction: column; line-height: 1.25; }
.acsn-header-text strong {
  font-family: var(--font-display); font-weight: 600;
  font-size: 1.1rem; letter-spacing: -0.01em;
}
.acsn-header-text span { font-size: 0.78rem; color: rgba(255,255,255,0.7); margin-top: 2px; }
.acsn-close {
  background: rgba(255,255,255,0.12); border: 0; color: #fff;
  width: 28px; height: 28px; border-radius: 50%; cursor: pointer;
  font-size: 1.3rem; line-height: 1; display: grid; place-items: center;
  transition: background .15s;
}
.acsn-close:hover { background: rgba(255,255,255,0.22); }

.acsn-stream {
  flex: 1; overflow-y: auto; padding: 18px 16px;
  display: flex; flex-direction: column; gap: 10px;
  background: var(--surface-tint);
}
.acsn-msg {
  max-width: 85%; padding: 10px 14px; border-radius: 14px;
  font-size: 0.93rem; line-height: 1.45;
  word-wrap: break-word;
}
.acsn-msg--bot {
  background: #fff; color: var(--ink);
  border: 1px solid var(--line); align-self: flex-start;
  border-bottom-left-radius: 4px;
}
.acsn-msg--user {
  background: var(--ink); color: #fff;
  align-self: flex-end; border-bottom-right-radius: 4px;
}
.acsn-msg--typing { display: flex; gap: 4px; align-items: center; padding: 14px; }
.acsn-dot {
  width: 6px; height: 6px; border-radius: 50%;
  background: var(--muted); display: inline-block;
  animation: acsn-bounce 1.2s infinite;
}
.acsn-dot:nth-child(2) { animation-delay: 0.15s; }
.acsn-dot:nth-child(3) { animation-delay: 0.3s; }
@keyframes acsn-bounce {
  0%, 60%, 100% { transform: translateY(0); opacity: 0.4; }
  30% { transform: translateY(-4px); opacity: 1; }
}

.acsn-chips {
  display: flex; flex-wrap: wrap; gap: 6px;
  padding: 10px 14px 0; background: #fff;
  border-top: 1px solid var(--line);
}
.acsn-chip {
  font: inherit; font-size: 0.82rem;
  padding: 6px 12px; border-radius: 999px;
  background: var(--surface-tint); color: var(--ink-soft);
  border: 1px solid var(--line); cursor: pointer;
  transition: background .15s, color .15s, border-color .15s;
}
.acsn-chip:hover { background: var(--ink); color: #fff; border-color: var(--ink); }

.acsn-form {
  display: flex; gap: 8px; padding: 12px 14px;
  background: #fff; border-top: 1px solid var(--line);
}
.acsn-input {
  flex: 1; font: inherit; font-size: 0.93rem;
  padding: 10px 14px; border: 1px solid var(--line);
  border-radius: 999px; background: var(--surface-tint); color: var(--ink);
  transition: border-color .15s, box-shadow .15s, background .15s;
}
.acsn-input:focus {
  outline: 0; background: #fff;
  border-color: var(--green);
  box-shadow: 0 0 0 3px rgba(31,107,70,0.15);
}
.acsn-send {
  width: 40px; height: 40px; border: 0; border-radius: 50%;
  background: var(--gold); color: #1a1408; cursor: pointer;
  display: grid; place-items: center;
  transition: background .15s, transform .15s;
}
.acsn-send:hover:not(:disabled) { background: var(--gold-soft); transform: translateY(-1px); }
.acsn-send:disabled { opacity: 0.5; cursor: not-allowed; }
.acsn-send svg { transform: translateX(1px); }

.acsn-foot {
  text-align: center; font-size: 0.7rem; color: var(--muted);
  padding: 6px 14px 10px; background: #fff;
  letter-spacing: 0.02em;
}

@media (max-width: 560px) {
  .acsn-root { right: 16px; bottom: 16px; }
  .acsn-launcher-label { display: none; }
  .acsn-launcher { padding: 14px; border-radius: 50%; }
  .acsn-panel {
    width: calc(100vw - 24px); height: calc(100vh - 100px);
    right: -8px; bottom: 64px;
  }
}
