/* Queenie — midnight navy + neon pink + electric cyan. Futuristic "AI co-pilot"
   vibe. Legacy var names from the AI Skool Team app are kept as semantic aliases
   so every existing rule recolors at once:
     --butter / --gold / --coral  → NEON PINK (primary CTA)
     --orange / --*-line          → ELECTRIC CYAN (trim / borders / accent)
     --forest / --text            → light (on the dark background)
     --forest-deep                → dark navy (text ON a bright button) */
:root {
  --bg: #0a0e28;             /* midnight navy */
  --bg-deep: #070a1c;        /* deeper */
  --surface: #141a3d;        /* card surface on navy */
  --surface-2: #1d2760;      /* hover */
  --text: #eaf0ff;           /* near-white */
  --text-muted: #9fb0d8;     /* muted blue-grey */
  --forest: #eaf0ff;         /* was dark text → now light */
  --forest-deep: #0a0e28;    /* dark navy — for text on bright buttons */

  /* Neon pink = primary CTA */
  --butter: #ff5cc4;
  --butter-bright: #ff7ad6;
  --butter-deep: #e23fa8;
  --butter-soft: rgba(255, 92, 196, 0.18);
  --gold: #ff5cc4;
  --gold-bright: #ff7ad6;
  --gold-soft: rgba(255, 92, 196, 0.16);
  --coral: #ff5cc4;
  --coral-hover: #ff7ad6;

  /* Electric cyan = trim / borders / secondary accent */
  --orange: #45c8ff;
  --orange-bright: #6ad6ff;
  --butter-line: rgba(90, 150, 255, 0.32);
  --gold-line: rgba(90, 150, 255, 0.28);
  --orange-soft: rgba(69, 200, 255, 0.12);

  --green-soft: rgba(120, 150, 255, 0.10);
  --danger: #ff6b8a;
  --shadow: 0 14px 44px rgba(0, 0, 0, 0.55);
  --radius: 14px;
  --maxw: 980px;
  --font: 'Sora', 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, system-ui, sans-serif;
}

/* Bright buttons get dark navy text so the neon pops. */
.btn-primary { color: var(--forest-deep) !important; }

* { box-sizing: border-box; }

html, body {
  margin: 0;
  padding: 0;
  background: var(--bg);
  color: var(--text);
  font-family: var(--font);
  font-size: 16px;
  line-height: 1.55;
  min-height: 100vh;
}

body {
  background:
    radial-gradient(ellipse at 15% 0%, rgba(218, 165, 32, 0.10), transparent 55%),
    radial-gradient(ellipse at 85% 95%, rgba(194, 90, 28, 0.06), transparent 60%),
    linear-gradient(180deg, var(--bg) 0%, var(--bg-deep) 100%);
  background-attachment: fixed;
  color: var(--text);
}

a { color: var(--gold-bright); text-decoration: none; }
a:hover { color: var(--coral); }

h1, h2, h3 { font-weight: 700; letter-spacing: -0.01em; }
h1 { font-size: 2rem; margin: 0 0 0.5rem; }
h2 { font-size: 1.25rem; margin: 0 0 0.35rem; }
h3 { font-size: 1rem; margin: 0 0 0.5rem; }

.muted { color: var(--text-muted); }
.small { font-size: 0.875rem; }
.visually-hidden {
  position: absolute; width: 1px; height: 1px; padding: 0; margin: -1px;
  overflow: hidden; clip: rect(0,0,0,0); white-space: nowrap; border: 0;
}

/* ======================== Buttons ======================== */

.btn-primary {
  background: var(--gold);
  color: var(--forest);
  border: 1px solid var(--orange);
  padding: 0.85rem 1.4rem;
  border-radius: 999px;
  font-weight: 700;
  font-size: 1rem;
  letter-spacing: 0.02em;
  cursor: pointer;
  transition: background 0.15s, transform 0.05s, box-shadow 0.15s;
  box-shadow: 0 4px 14px rgba(194, 90, 28, 0.25), inset 0 -2px 0 rgba(168, 128, 10, 0.30);
}
.btn-primary:hover:not(:disabled) {
  background: var(--gold-bright);
  box-shadow: 0 6px 18px rgba(194, 90, 28, 0.35), inset 0 -2px 0 rgba(168, 128, 10, 0.30);
}
.btn-primary:active:not(:disabled) { transform: translateY(1px); }
.btn-primary:disabled { opacity: 0.55; cursor: progress; }

.btn-ghost {
  background: transparent;
  color: var(--text);
  border: 1px solid var(--gold-line);
  padding: 0.6rem 1.1rem;
  border-radius: 999px;
  font-weight: 500;
  cursor: pointer;
  transition: border-color 0.15s, background 0.15s;
}
.btn-ghost:hover { border-color: var(--gold-bright); background: var(--gold-soft); }

.link-button {
  background: none;
  border: none;
  color: var(--gold-bright);
  font: inherit;
  cursor: pointer;
  padding: 0.25rem 0.5rem;
}
.link-button:hover { color: var(--coral); }

.pill-btn {
  background: var(--surface);
  border: 1px solid var(--orange);
  color: var(--orange);
  padding: 0.4rem 0.85rem;
  border-radius: 999px;
  cursor: pointer;
  font-size: 0.85rem;
  font-weight: 600;
  transition: background 0.15s, color 0.15s;
}
.pill-btn:hover { background: var(--gold); color: var(--forest); }
.pill-btn--gold {
  background: var(--gold);
  border-color: var(--orange);
  color: var(--forest);
}
.pill-btn--gold:hover { background: var(--gold-bright); }
.pill-btn:disabled { opacity: 0.6; cursor: default; }

/* ======================== Password gate ======================== */

.gate-page {
  display: flex;
  align-items: center;
  justify-content: center;
  min-height: 100vh;
  padding: 1rem;
  position: relative;
  isolation: isolate;
}
.gate-page::before {
  content: '';
  position: fixed;
  inset: 0;
  z-index: -1;
  background:
    linear-gradient(180deg, rgba(245, 236, 200, 0.85) 0%, rgba(236, 223, 181, 0.92) 100%),
    url('/assets/scene-lantern.png') center/cover no-repeat;
  filter: saturate(0.7) brightness(1.05);
}
.gate {
  width: 100%;
  max-width: 480px;
}
.gate-card {
  background: rgba(251, 243, 214, 0.92);
  backdrop-filter: blur(8px);
  border: 1px solid var(--orange);
  border-radius: var(--radius);
  padding: 2.75rem 2rem;
  box-shadow: 0 16px 50px rgba(26, 58, 40, 0.18);
  text-align: center;
}
.gate-title {
  font-size: 2rem;
  margin: 0 0 0.5rem;
  color: var(--forest);
}
.gate-subtitle {
  color: var(--text-muted);
  font-style: italic;
  margin: 0 0 2rem;
}
.gate-form {
  display: flex;
  flex-direction: column;
  gap: 0.85rem;
}
.gate-form input[type="password"] {
  background: #ffffff;
  border: 1px solid var(--orange);
  color: var(--forest);
  padding: 0.95rem 1rem;
  border-radius: 10px;
  font-size: 1rem;
  font-family: inherit;
  transition: border-color 0.15s, box-shadow 0.15s;
  text-align: center;
  letter-spacing: 0.02em;
}
.gate-form input[type="password"]:focus {
  outline: none;
  border-color: var(--gold);
  box-shadow: 0 0 0 3px var(--butter-soft);
}
.gate-error {
  color: var(--danger);
  font-size: 0.9rem;
  margin: 0;
}
.gate-note {
  margin: 1.75rem 0 0;
  font-size: 0.8rem;
  color: var(--text-muted);
}

/* ======================== Page header ======================== */

.page-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 1.2rem 1.5rem;
  border-bottom: 1px solid var(--gold-line);
  background: rgba(10, 14, 40, 0.92);
  backdrop-filter: blur(10px);
  position: sticky;
  top: 0;
  z-index: 10;
}
.brand {
  display: flex;
  align-items: center;
  gap: 0.6rem;
  font-weight: 700;
  letter-spacing: 0.02em;
  color: var(--forest);
}
.brand-mark { color: var(--orange); font-size: 1.1rem; }
.brand-name { color: var(--forest); }
.link-button { color: var(--orange); }
.link-button:hover { color: var(--gold-bright); }

/* ======================== Team page ======================== */

.team {
  max-width: var(--maxw);
  margin: 0 auto;
  padding: 2.5rem 1.5rem 4rem;
}

.section-eyebrow {
  font-size: 0.78rem;
  letter-spacing: 0.16em;
  text-transform: uppercase;
  color: var(--orange);
  margin: 0 0 0.5rem;
  font-weight: 700;
}
.section-title {
  font-size: clamp(1.45rem, 2.6vw, 1.95rem);
  line-height: 1.15;
  margin: 0 0 0.9rem;
  color: var(--forest);
}

/* --- Hero --- */
.team-hero {
  position: relative;
  padding: 4rem 2rem 4.5rem;
  margin: -1rem -1.5rem 2rem;
  border-radius: var(--radius);
  overflow: hidden;
  isolation: isolate;
}
.team-hero::before {
  content: '';
  position: absolute;
  inset: 0;
  z-index: -1;
  /* Cream gradient fades from solid (left, where text sits) to
     transparent (right, where the cedars show through) */
  background:
    linear-gradient(90deg, var(--bg) 0%, var(--bg) 32%, rgba(245, 236, 200, 0.55) 60%, rgba(245, 236, 200, 0.20) 100%),
    url('/assets/cedar-grove.webp') right center / contain no-repeat;
  background-color: var(--bg);
  filter: saturate(0.75) brightness(1.05);
}
.team-hero {
  border: 1px solid var(--orange);
  box-shadow: 0 8px 24px rgba(26, 58, 40, 0.10);
}
/* Cap text width so nothing reaches into the cedar tree area on the right.
   On narrow screens the trees fade out, so we relax the constraint. */
.team-hero > * { max-width: min(64ch, 58%); }
@media (max-width: 700px) {
  .team-hero > * { max-width: 64ch; }
}
.hero-eyebrow {
  font-size: 0.9rem;
  color: var(--orange);
  margin: 0 0 0.5rem;
  letter-spacing: 0.02em;
  font-style: italic;
}
.hero-title {
  /* Sized to sit comfortably in the cream column without crashing into the cedars */
  font-size: clamp(1.9rem, 4vw, 2.9rem);
  line-height: 1.08;
  letter-spacing: -0.01em;
  margin: 0 0 1rem;
  color: var(--forest);
}
.hero-lead {
  font-size: 1.02rem;
  color: var(--text);
  margin: 0 0 0.85rem;
  line-height: 1.6;
}
.hero-lead:last-of-type {
  margin-bottom: 0;
}
.hero-cta {
  display: inline-block;
  margin-top: 1.4rem;
  color: var(--forest);
  background: var(--gold);
  font-weight: 700;
  letter-spacing: 0.04em;
  text-decoration: none;
  padding: 0.7rem 1.3rem;
  border-radius: 999px;
  border: 1px solid var(--orange);
  box-shadow: 0 4px 14px rgba(194, 90, 28, 0.22);
  transition: background 0.15s, transform 0.05s;
}
.hero-cta:hover { background: var(--gold-bright); transform: translateY(-1px); }

/* --- How it works --- */
.how {
  position: relative;
  padding: 3rem 1.5rem;
  margin: 1.5rem -1.5rem;
  border-top: 1px solid var(--gold-line);
  border-bottom: 1px solid var(--gold-line);
  isolation: isolate;
}
/* Trees sit on the left half of .how — push the eyebrow fully into the
   cream area on the right so it isn't crowded by the foliage. */
.how > .section-eyebrow {
  padding-left: 55%;
  padding-right: 2rem;
  text-align: left;
  margin-bottom: 1.5rem;
}
@media (max-width: 700px) {
  .how > .section-eyebrow {
    padding-left: 0;
    padding-right: 0;
    text-align: center;
  }
}
.how::before {
  content: '';
  position: absolute;
  inset: 0;
  z-index: -1;
  /* Mirror of the hero: cedars on the LEFT, cream fade on the right */
  background:
    linear-gradient(90deg, rgba(245, 236, 200, 0.20) 0%, rgba(245, 236, 200, 0.55) 40%, var(--bg) 68%, var(--bg) 100%),
    url('/assets/cedar-grove.webp') left center / contain no-repeat;
  background-color: var(--bg);
  filter: saturate(0.75) brightness(1.05);
}
.how-steps {
  list-style: none;
  padding: 0;
  margin: 1.25rem 0 0;
  display: grid;
  gap: 1rem;
}
.how-steps li {
  display: flex;
  gap: 1.1rem;
  background: var(--surface);
  border: 1px solid var(--orange);
  border-radius: var(--radius);
  padding: 1.15rem 1.35rem;
  align-items: flex-start;
  box-shadow: 0 3px 12px rgba(26, 58, 40, 0.08);
}
.how-num {
  flex-shrink: 0;
  width: 34px;
  height: 34px;
  border-radius: 50%;
  background: var(--gold);
  border: 1px solid var(--orange);
  color: var(--forest);
  display: flex;
  align-items: center;
  justify-content: center;
  font-weight: 700;
  font-size: 0.95rem;
  margin-top: 0.1rem;
}
.how-steps h3 {
  font-size: 1.02rem;
  margin: 0 0 0.25rem;
  color: var(--forest);
  line-height: 1.3;
}
.how-steps p {
  margin: 0;
  color: var(--text-muted);
  line-height: 1.55;
  font-size: 0.95rem;
}
.how-steps strong { color: var(--orange); }

/* --- Specialists --- */
.specialists {
  padding: 2.5rem 0 3rem;
  border-top: 1px solid var(--gold-line);
}
.specialists > .section-title { margin-bottom: 1.5rem; }

.specialists-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 1.2rem;
}

/* 2 per row on tablet */
@media (max-width: 960px) {
  .specialists-grid { grid-template-columns: repeat(2, 1fr); }
}
/* 1 per row on phone */
@media (max-width: 620px) {
  .specialists-grid { grid-template-columns: 1fr; }
}

.specialists .specialist-card { display: flex; }

.specialist-card {
  background: var(--surface);
  border: 1px solid var(--orange);
  border-radius: var(--radius);
  padding: 1.5rem;
  display: flex;
  gap: 1rem;
  cursor: pointer;
  transition: border-color 0.18s, transform 0.18s, box-shadow 0.18s;
  outline: none;
  box-shadow: 0 4px 14px rgba(26, 58, 40, 0.10);
}
.specialist-card--active:hover,
.specialist-card--active:focus {
  transform: translateY(-3px);
  box-shadow: 0 12px 28px rgba(194, 90, 28, 0.20), 0 4px 14px rgba(26, 58, 40, 0.10);
}
.specialist-card--coming {
  opacity: 0.65;
  cursor: default;
  border-style: dashed;
}

.card-avatar {
  width: 84px;
  height: 84px;
  border-radius: 50%;
  background: var(--bg);
  border: 2px solid var(--orange);
  flex-shrink: 0;
  display: flex;
  align-items: center;
  justify-content: center;
  overflow: hidden;
  position: relative;
  font-size: 1.5rem;
  font-weight: 700;
  color: var(--orange);
}
.card-avatar img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}
.card-avatar-fallback {
  position: absolute;
  inset: 0;
  display: flex;
  align-items: center;
  justify-content: center;
  z-index: -1;
}
.card-avatar--placeholder {
  background: var(--surface-2);
  color: var(--text-muted);
  border: 1px solid var(--orange);
}

.card-body { flex: 1; min-width: 0; display: flex; flex-direction: column; }
.card-name {
  font-size: 1.15rem;
  margin: 0 0 0.2rem;
  color: var(--forest);
  line-height: 1.25;
}
.card-role {
  display: block;
  font-weight: 400;
  color: var(--text-muted);
  font-size: 0.88rem;
  margin-top: 0.1rem;
  font-style: italic;
}
.card-blurb {
  color: var(--text-muted);
  font-size: 0.92rem;
  line-height: 1.5;
  margin: 0.5rem 0 0.85rem;
  flex: 1;
}
.card-cta {
  display: inline-block;
  color: var(--forest);
  background: var(--gold);
  border: 1px solid var(--orange);
  font-weight: 700;
  font-size: 0.85rem;
  letter-spacing: 0.04em;
  padding: 0.4rem 0.95rem;
  border-radius: 999px;
  margin-top: 0.25rem;
  white-space: nowrap;
}
.card-cta--muted {
  color: var(--text-muted);
}

/* --- FAQ --- */
.faq {
  position: relative;
  padding: 3rem 1.5rem;
  margin: 1.5rem -1.5rem;
  border-top: 1px solid var(--gold-line);
  isolation: isolate;
}
.faq::before {
  content: '';
  position: absolute;
  inset: 0;
  background:
    linear-gradient(180deg, rgba(245, 236, 200, 0.96) 0%, rgba(236, 223, 181, 0.97) 100%),
    url('/assets/scene-lantern.png') right bottom/40% no-repeat;
  filter: saturate(0.7);
  z-index: -1;
}
.faq details {
  background: var(--surface);
  border: 1px solid var(--orange);
  border-radius: var(--radius);
  margin: 0.75rem 0;
  overflow: hidden;
  transition: border-color 0.15s, box-shadow 0.15s;
  box-shadow: 0 2px 8px rgba(26, 58, 40, 0.06);
}
.faq details[open] { box-shadow: 0 4px 14px rgba(194, 90, 28, 0.18); }
.faq summary {
  cursor: pointer;
  padding: 1.1rem 1.4rem;
  font-weight: 600;
  color: var(--forest);
  list-style: none;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
  transition: color 0.15s;
}
.faq summary::-webkit-details-marker { display: none; }
.faq summary::after {
  content: '+';
  color: var(--orange);
  font-size: 1.4rem;
  font-weight: 700;
  line-height: 1;
  flex-shrink: 0;
  transition: transform 0.18s;
}
.faq details[open] summary::after { content: '−'; transform: rotate(0); }
.faq summary:hover { color: var(--orange); }
.faq .faq-body {
  padding: 0 1.4rem 1.2rem;
  color: var(--text-muted);
  line-height: 1.65;
}
.faq .faq-body p { margin: 0 0 0.7rem; }
.faq .faq-body p:last-child { margin-bottom: 0; }
.faq .faq-body strong { color: var(--orange); }
.faq .faq-body em { color: var(--forest); font-style: italic; }
.faq .faq-body ul { margin: 0.6rem 0; padding-left: 1.2rem; }
.faq .faq-body li { margin: 0.3rem 0; }

/* --- Signature closer --- */
.signature {
  text-align: center;
  margin: 3rem auto 0;
  padding: 2.5rem 1rem 1rem;
  font-family: 'Inter', sans-serif;
  font-style: italic;
  color: var(--forest);
  font-size: 1.25rem;
  letter-spacing: 0.01em;
  border-top: 2px solid var(--orange);
}
.signature::before {
  content: '— ';
  color: var(--orange);
}

/* --- Workspace preview --- */
.workspace-preview {
  margin-top: 1.5rem;
  padding-top: 2.5rem;
  border-top: 1px solid var(--gold-line);
}
.ws-preview-item {
  background: var(--surface);
  border: 1px solid var(--orange);
  border-radius: 10px;
  padding: 0.85rem 1rem;
  margin-top: 0.75rem;
}
.ws-preview-item strong { color: var(--orange); }
.ws-preview-item p { margin: 0.35rem 0 0; color: var(--text-muted); font-size: 0.9rem; }

/* ======================== Chat page ======================== */

.chat-page {
  display: flex;
  flex-direction: column;
  min-height: 100vh;
  background:
    radial-gradient(ellipse 80% 30% at 50% 0%, rgba(218, 165, 32, 0.08), transparent 70%),
    linear-gradient(180deg, var(--bg) 0%, var(--bg-deep) 100%);
}
.chat-header { gap: 1rem; }
.chat-header-tool {
  display: flex;
  align-items: center;
  gap: 0.75rem;
  flex: 1;
  min-width: 0;
}
.chat-avatar {
  width: 44px;
  height: 44px;
  border-radius: 50%;
  background: var(--surface);
  border: 2px solid var(--orange);
  overflow: hidden;
  position: relative;
  display: flex;
  align-items: center;
  justify-content: center;
  color: var(--orange);
  font-weight: 700;
}
.chat-avatar img { width: 100%; height: 100%; object-fit: cover; }
.chat-tool-name { font-size: 1.05rem; margin: 0; color: var(--forest); }
.chat-tool-role { font-size: 0.85rem; color: var(--text-muted); margin: 0; }

.back-link {
  color: var(--orange);
  font-size: 0.9rem;
  font-weight: 600;
}
.back-link:hover { color: var(--gold-bright); }

.chat-main {
  display: flex;
  flex: 1;
  max-width: var(--maxw);
  width: 100%;
  margin: 0 auto;
  padding: 1.5rem 1.5rem 11rem;
  gap: 1.5rem;
  position: relative;
}
.chat-thread {
  flex: 1;
  display: flex;
  flex-direction: column;
  gap: 1rem;
  min-width: 0;
}

.bubble {
  display: flex;
  gap: 0.85rem;
  width: 100%;
  max-width: 100%;
  align-items: flex-start;
}
.bubble--user .bubble-body {
  background: var(--butter-soft);
  border-color: var(--orange);
  color: var(--forest);
}
.bubble-avatar {
  width: 40px;
  height: 40px;
  border-radius: 50%;
  background: var(--surface);
  border: 2px solid var(--orange);
  box-shadow: 0 2px 8px rgba(26, 58, 40, 0.10);
  overflow: hidden;
  flex-shrink: 0;
  display: flex;
  align-items: center;
  justify-content: center;
  color: var(--orange);
  font-size: 0.85rem;
  font-weight: 700;
}
.bubble-avatar img { width: 100%; height: 100%; object-fit: cover; }

.bubble-content {
  flex: 1;
  min-width: 0;
  display: flex;
  flex-direction: column;
  gap: 0.55rem;
}

.bubble-body {
  background: var(--surface);
  border: 1px solid var(--orange);
  border-radius: 14px;
  padding: 0.95rem 1.15rem;
  white-space: pre-wrap;
  word-wrap: break-word;
  overflow-wrap: anywhere;
  line-height: 1.6;
  color: var(--forest);
  box-shadow: 0 2px 8px rgba(26, 58, 40, 0.06);
}
.bubble--streaming .bubble-body::after {
  content: '▍';
  color: var(--orange);
  margin-left: 0.15rem;
  animation: blink 1s infinite;
}
@keyframes blink { 0%, 50% { opacity: 1; } 50.01%, 100% { opacity: 0; } }
.bubble--greeting .bubble-body {
  background: linear-gradient(180deg, var(--surface) 0%, var(--surface-2) 100%);
}

.bubble-actions {
  display: flex;
  gap: 0.5rem;
  flex-wrap: wrap;
  align-items: center;
}
.bubble--user .bubble-actions { display: none; }

.saved-indicator {
  display: inline-flex;
  align-items: center;
  gap: 0.4rem;
  background: var(--gold);
  border: 1px solid var(--orange);
  color: var(--forest);
  padding: 0.35rem 0.85rem;
  border-radius: 999px;
  font-size: 0.82rem;
  font-weight: 700;
}
.saved-indicator strong { color: var(--orange); font-weight: 700; }

.thread-resume-note {
  text-align: center;
  color: var(--text-muted);
  font-size: 0.82rem;
  font-style: italic;
  padding: 0.6rem 1rem 1rem;
  border-bottom: 1px dashed var(--orange);
  margin-bottom: 0.5rem;
}

/* Conversation starters — clickable prompts shown when chat is empty */
.chat-starters {
  margin-top: 1.5rem;
  padding-top: 1rem;
  border-top: 1px dashed var(--orange);
}
.chat-starters-label {
  margin: 0 0 0.7rem;
  font-size: 0.75rem;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  font-weight: 700;
  color: var(--orange);
}
.chat-starters-list {
  display: flex;
  flex-direction: column;
  gap: 0.5rem;
}
.starter-btn {
  text-align: left;
  background: var(--surface);
  border: 1px solid var(--orange);
  color: var(--forest);
  padding: 0.85rem 1.1rem;
  border-radius: 12px;
  font: inherit;
  font-size: 0.95rem;
  cursor: pointer;
  transition: background 0.15s, transform 0.05s, box-shadow 0.15s;
  box-shadow: 0 2px 8px rgba(26, 58, 40, 0.06);
}
.starter-btn:hover {
  background: var(--gold);
  transform: translateY(-1px);
  box-shadow: 0 4px 14px rgba(194, 90, 28, 0.18);
}
.starter-btn:active { transform: translateY(0); }

.chat-input-bar {
  position: fixed;
  bottom: 0;
  left: 0;
  right: 0;
  background: rgba(10, 14, 40, 0.95);
  backdrop-filter: blur(10px);
  border-top: 1px solid var(--gold-line);
  padding: 1rem 1.5rem 1.25rem;
}
.chat-input-form {
  max-width: var(--maxw);
  margin: 0 auto;
  display: flex;
  gap: 0.75rem;
  align-items: flex-end;
}
.chat-input-form textarea {
  flex: 1;
  background: #0c1230;
  border: 1px solid var(--gold-line);
  border-radius: 14px;
  color: var(--text);
  padding: 0.85rem 1rem;
  font: inherit;
  resize: none;
  min-height: 48px;
  max-height: 240px;
  transition: border-color 0.15s, box-shadow 0.15s;
}
.chat-input-form textarea:focus {
  outline: none;
  border-color: var(--gold);
  box-shadow: 0 0 0 3px var(--butter-soft);
}

.mic-btn {
  width: 48px;
  height: 48px;
  border-radius: 50%;
  background: var(--surface);
  border: 1px solid var(--orange);
  color: var(--orange);
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: background 0.18s, border-color 0.18s, color 0.18s, transform 0.06s;
  flex-shrink: 0;
}
.mic-btn:hover {
  background: var(--butter-soft);
  border-color: var(--orange-bright);
}
.mic-btn:active { transform: scale(0.96); }
.mic-btn--listening {
  background: var(--orange);
  border-color: var(--orange);
  color: white;
  animation: mic-pulse 1.2s ease-in-out infinite;
}
@keyframes mic-pulse {
  0%, 100% { box-shadow: 0 0 0 0 rgba(194, 90, 28, 0.55); }
  50% { box-shadow: 0 0 0 10px rgba(194, 90, 28, 0); }
}

/* ---- Upload / attachments ---- */
.attach-btn {
  width: 48px;
  height: 48px;
  border-radius: 50%;
  background: var(--surface);
  border: 1px solid var(--orange);
  color: var(--orange);
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: background 0.18s, border-color 0.18s, color 0.18s, transform 0.06s;
  flex-shrink: 0;
}
.attach-btn:hover { background: var(--butter-soft); border-color: var(--orange-bright); }
.attach-btn:active { transform: scale(0.96); }

.chat-attachments {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  padding: 0 4px 10px;
  max-width: var(--maxw);
  margin: 0 auto;
  width: 100%;
}
.attach-chip {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  max-width: 240px;
  padding: 6px 8px 6px 6px;
  background: var(--surface);
  border: 1px solid var(--gold-line);
  border-radius: 10px;
  font-size: 0.85rem;
  color: var(--text);
}
.attach-chip--loading { opacity: 0.7; }
.attach-chip--error { border-color: var(--danger); background: var(--orange-soft); color: var(--danger); }
.attach-chip img {
  width: 34px; height: 34px;
  object-fit: cover;
  border-radius: 6px;
  flex-shrink: 0;
}
.attach-ic { font-size: 1.1rem; line-height: 1; }
.attach-name {
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}
.attach-remove {
  border: 0;
  background: transparent;
  color: inherit;
  cursor: pointer;
  font-size: 1.2rem;
  line-height: 1;
  padding: 0 2px;
  opacity: 0.6;
  flex-shrink: 0;
}
.attach-remove:hover { opacity: 1; }

/* Attachments shown inside a sent user bubble */
.bubble-attachments {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin-top: 8px;
}
.bubble-thumb {
  max-width: 160px;
  max-height: 160px;
  border-radius: 8px;
  border: 1px solid var(--gold-line);
}
.bubble-doc {
  display: inline-flex;
  align-items: center;
  padding: 4px 10px;
  background: var(--surface);
  border: 1px solid var(--gold-line);
  border-radius: 8px;
  font-size: 0.82rem;
}

.chat-hint {
  max-width: var(--maxw);
  margin: 0.4rem auto 0;
  color: var(--text-muted);
  font-size: 0.78rem;
  text-align: center;
}
.btn-ghost {
  background: transparent;
  color: var(--orange);
  border: 1px solid var(--orange);
  padding: 0.6rem 1.1rem;
  border-radius: 999px;
  font-weight: 600;
  cursor: pointer;
  transition: background 0.15s, color 0.15s;
}
.btn-ghost:hover { background: var(--gold); color: var(--forest); }

/* ======================== Workspace panel ======================== */

.workspace-panel {
  width: 320px;
  flex-shrink: 0;
  background: var(--surface);
  border: 1px solid var(--orange);
  border-radius: var(--radius);
  padding: 1.2rem;
  height: fit-content;
  position: sticky;
  top: 88px;
  max-height: calc(100vh - 200px);
  overflow: auto;
  box-shadow: 0 4px 14px rgba(26, 58, 40, 0.08);
}
.workspace-panel-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 0.5rem;
}
.workspace-body { margin: 1rem 0; display: flex; flex-direction: column; gap: 0.75rem; }
.ws-item {
  background: var(--bg);
  border: 1px solid var(--orange);
  border-radius: 10px;
  padding: 0.75rem 0.85rem;
}
.ws-item-head { display: flex; justify-content: space-between; align-items: baseline; gap: 0.5rem; }
.ws-item-head strong { color: var(--orange); }
.ws-item-meta { color: var(--text-muted); font-size: 0.75rem; }
.ws-item-body {
  margin: 0.4rem 0 0;
  font-size: 0.82rem;
  color: var(--text-muted);
  white-space: pre-wrap;
  word-wrap: break-word;
  max-height: 8em;
  overflow: hidden;
  font-family: inherit;
}

@media (max-width: 820px) {
  .workspace-panel {
    position: fixed;
    top: 80px;
    right: 1rem;
    left: 1rem;
    width: auto;
    z-index: 20;
    max-height: calc(100vh - 160px);
  }
}

/* ======================== Modal ======================== */

.modal {
  background: var(--surface);
  color: var(--forest);
  border: 1px solid var(--orange);
  border-radius: var(--radius);
  padding: 1.75rem;
  max-width: 460px;
  width: calc(100% - 2rem);
  box-shadow: 0 18px 50px rgba(26, 58, 40, 0.30);
}
.modal--wide { max-width: 560px; }
.modal::backdrop { background: rgba(26, 58, 40, 0.45); backdrop-filter: blur(4px); }
.modal h3 { margin-top: 0; color: var(--orange); font-size: 1.25rem; }
.modal p { line-height: 1.6; margin: 0.6rem 0; }
.modal ol, .modal ul {
  padding-left: 1.2rem;
  margin: 0.75rem 0;
  line-height: 1.65;
}
.modal li { margin: 0.4rem 0; }
.modal ol li::marker { color: var(--orange); font-weight: 700; }
.modal ul li::marker { color: var(--orange); }
.modal strong { color: var(--orange); font-weight: 700; }
.modal em { color: var(--forest); font-style: italic; }
.modal code {
  background: var(--bg);
  border: 1px solid var(--orange);
  border-radius: 6px;
  padding: 0.1rem 0.4rem;
  font-size: 0.85em;
  color: var(--orange);
}
.modal label {
  display: block;
  font-size: 0.85rem;
  color: var(--text-muted);
  margin: 1rem 0 0.4rem;
}
.modal input[type="email"] {
  width: 100%;
  background: var(--bg);
  border: 1px solid var(--gold-line);
  color: var(--text);
  padding: 0.7rem 0.9rem;
  border-radius: 10px;
  font: inherit;
}
.modal input[type="email"]:focus {
  outline: none;
  border-color: var(--gold-bright);
  box-shadow: 0 0 0 3px var(--gold-soft);
}
.modal-actions {
  display: flex;
  justify-content: flex-end;
  gap: 0.6rem;
  margin-top: 1.25rem;
}
