/* ============================================================
   KYZEL CLARITY AI™ — Styles v3 (Polish pass)
   Powered by 4P3X Intelligent AI™ — Created by Kyzel Kreates™
   ============================================================ */

:root {
  --bg: #070707;
  --panel: #111214;
  --panel2: #17181c;
  --gold: #d7b35a;
  --gold-light: #f5d98a;
  --silver: #cfd3d7;
  --green: #47d18c;
  --purple: #9b5cff;
  --text: #f4f4f0;
  --muted: #b7bac1;
  --line: rgba(255,255,255,.12);
  --line-gold: rgba(215,179,90,.3);
  --danger: #ff6b6b;
  --info: #5cb8ff;
  --shadow: 0 20px 80px rgba(0,0,0,.28);
  --radius-lg: 24px;
  --radius-md: 18px;
  --radius-sm: 14px;
  --radius-pill: 999px;
  --trans: .2s cubic-bezier(.4,0,.2,1);
}

/* ---- RESET ---- */
*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }
html { scroll-behavior: smooth; -webkit-text-size-adjust: 100%; }

body {
  font-family: Inter, system-ui, -apple-system, Segoe UI, Arial, sans-serif;
  background:
    radial-gradient(circle at 8% 0%, rgba(155,92,255,.22), transparent 30%),
    radial-gradient(circle at 88% 8%, rgba(71,209,140,.16), transparent 28%),
    radial-gradient(circle at 50% 100%, rgba(215,179,90,.07), transparent 40%),
    #070707;
  color: var(--text);
  line-height: 1.65;
  min-height: 100vh;
  overflow-x: hidden;
}

h1, h2, h3, h4 { line-height: 1.1; }
p { margin: 0; }
a { color: inherit; text-decoration: none; }

/* ---- SCROLLBAR ---- */
::-webkit-scrollbar { width: 5px; }
::-webkit-scrollbar-track { background: transparent; }
::-webkit-scrollbar-thumb { background: rgba(215,179,90,.28); border-radius: 3px; }

/* ---- LAYOUT ---- */
.app-shell { min-height: 100vh; }

/* ====================================================
   STICKY NAV
   ==================================================== */
.site-nav-wrap {
  position: sticky;
  top: 0;
  z-index: 100;
  background: rgba(7,7,7,.92);
  backdrop-filter: blur(16px);
  -webkit-backdrop-filter: blur(16px);
  border-bottom: 1px solid var(--line);
}
.nav {
  display: flex;
  justify-content: space-between;
  gap: 14px;
  align-items: center;
  padding: 12px clamp(16px, 4vw, 56px);
}
.brand-block { display: flex; gap: 12px; align-items: center; flex-shrink: 0; }
.brand-mark {
  width: 46px;
  height: 46px;
  border: 1px solid rgba(215,179,90,.5);
  border-radius: 14px;
  display: grid;
  place-items: center;
  font-weight: 900;
  font-size: .82rem;
  color: var(--gold);
  background: linear-gradient(145deg, #1b1b1f, #090909);
  box-shadow: 0 0 22px rgba(215,179,90,.16);
  flex-shrink: 0;
}
.brand-block h1 { margin: 2px 0 0; font-size: 1.05rem; }
.nav-links {
  display: flex;
  align-items: center;
  gap: 2px;
  flex-wrap: wrap;
}
.nav-links a {
  color: var(--muted);
  font-size: .84rem;
  font-weight: 600;
  padding: 6px 12px;
  border-radius: var(--radius-pill);
  transition: color var(--trans), background var(--trans);
}
.nav-links a:hover { color: var(--text); background: rgba(255,255,255,.07); }
.nav-actions { display: flex; gap: 8px; align-items: center; }
.nav-toggle {
  display: none;
  background: rgba(255,255,255,.05);
  border: 1px solid var(--line);
  border-radius: 10px;
  color: var(--text);
  padding: 7px 10px;
  font-size: 1rem;
  cursor: pointer;
  line-height: 1;
}

/* ====================================================
   BUTTONS
   ==================================================== */
.btn, button.q-btn {
  border: none;
  border-radius: var(--radius-pill);
  padding: 10px 18px;
  font-weight: 800;
  font-size: .88rem;
  text-decoration: none;
  cursor: pointer;
  transition: transform var(--trans), box-shadow var(--trans), background var(--trans);
  display: inline-flex;
  align-items: center;
  gap: 6px;
  white-space: nowrap;
}
.btn:hover { transform: translateY(-1px); box-shadow: 0 6px 20px rgba(0,0,0,.35); }
.btn:active { transform: translateY(0); }
.btn-gold { background: linear-gradient(135deg, var(--gold), #8b6b24); color: #080808; }
.btn-gold:hover { box-shadow: 0 0 20px rgba(215,179,90,.4); }
.btn-silver { background: linear-gradient(135deg, #f2f4f6, #8c929b); color: #090909; }
.btn-ghost { border: 1px solid var(--line); background: rgba(255,255,255,.04); color: var(--text); }
.btn-ghost:hover { background: rgba(255,255,255,.09); border-color: rgba(255,255,255,.2); }
.btn-sm { padding: 7px 14px; font-size: .8rem; }

/* ====================================================
   EYEBROW / PILL / STATUS
   ==================================================== */
.eyebrow, .pill, .type {
  margin: 0;
  color: var(--green);
  text-transform: uppercase;
  letter-spacing: .13em;
  font-size: .72rem;
  font-weight: 800;
}
.pill {
  display: inline-flex;
  padding: 6px 14px;
  border: 1px solid rgba(71,209,140,.35);
  border-radius: var(--radius-pill);
  background: rgba(71,209,140,.08);
}
.status-strip {
  margin-top: 18px;
  padding: 11px 16px;
  border: 1px solid rgba(71,209,140,.28);
  background: rgba(71,209,140,.07);
  border-radius: var(--radius-sm);
  color: #d8ffe9;
  font-size: .86rem;
}

/* ====================================================
   HERO
   ==================================================== */
.hero {
  padding: 18px clamp(16px, 4vw, 56px) 48px;
}
.hero-grid {
  display: grid;
  grid-template-columns: 1.15fr .85fr;
  gap: 28px;
  align-items: start;
  padding-top: 36px;
}
.hero-copy h2 {
  font-size: clamp(2.1rem, 5vw, 5rem);
  line-height: .96;
  margin: 18px 0 20px;
  background: linear-gradient(135deg, #fff, var(--silver), var(--gold));
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
}
.lead {
  font-size: 1.05rem;
  line-height: 1.75;
  color: var(--muted);
  max-width: 680px;
  margin-bottom: 28px;
}
.hero-buttons { display: flex; gap: 10px; flex-wrap: wrap; }

/* ---- System card ---- */
.system-card, .card, .project-card, .agent-shell, .accordion-item, .mini-card {
  border: 1px solid var(--line);
  background: linear-gradient(180deg, rgba(255,255,255,.06), rgba(255,255,255,.025));
  border-radius: var(--radius-lg);
  padding: 22px;
  box-shadow: var(--shadow);
}
.glow {
  box-shadow: 0 0 80px rgba(155,92,255,.16), 0 20px 80px rgba(0,0,0,.35);
}
.system-card h3, .card h3, .project-card h3 { color: var(--gold); margin-bottom: 10px; }
.system-card li, .card p, .project-card p, .split p, .accordion-body p, .mini-card p {
  color: var(--muted);
  line-height: 1.65;
  font-size: .93rem;
}
.system-card ul { padding-left: 18px; margin-top: 10px; }
.system-card li { margin-bottom: 6px; font-size: .9rem; }
.mode-indicator {
  display: flex;
  align-items: center;
  gap: 8px;
  margin-top: 16px;
  padding: 9px 14px;
  border: 1px solid rgba(71,209,140,.25);
  border-radius: var(--radius-sm);
  background: rgba(71,209,140,.05);
  font-size: .82rem;
  color: var(--green);
  font-weight: 700;
}
.mode-dot {
  width: 8px;
  height: 8px;
  border-radius: 50%;
  flex-shrink: 0;
}
.mode-dot--local { background: var(--green); box-shadow: 0 0 8px var(--green); animation: pulse 2s infinite; }
.mode-dot--live { background: #5cb8ff; box-shadow: 0 0 8px #5cb8ff; animation: pulse 2s infinite; }
.mode-dot--error { background: var(--danger); }
@keyframes pulse { 0%, 100% { opacity: 1; } 50% { opacity: .45; } }

/* ====================================================
   SECTIONS
   ==================================================== */
.section {
  padding: 56px clamp(16px, 4vw, 56px);
  border-top: 1px solid rgba(255,255,255,.06);
}
.section-heading { max-width: 1000px; margin-bottom: 28px; }
.section-heading h2 {
  font-size: clamp(1.8rem, 3.8vw, 3.5rem);
  line-height: 1.05;
  letter-spacing: -.03em;
  margin: 8px 0 12px;
  background: linear-gradient(135deg, #fff, var(--silver), var(--gold));
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
}
.section-heading p { color: var(--muted); font-size: .95rem; margin-top: 6px; }

/* ---- Cards 3-up ---- */
.cards.three { display: grid; grid-template-columns: repeat(3, 1fr); gap: 18px; }

/* ---- Split ---- */
.split { display: grid; grid-template-columns: 1fr 1fr; gap: 28px; align-items: start; }
.split h2 {
  font-size: clamp(1.8rem, 3.8vw, 3.5rem);
  line-height: 1.05;
  letter-spacing: -.03em;
  margin: 8px 0 16px;
  background: linear-gradient(135deg, #fff, var(--silver), var(--gold));
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
}

/* ---- Thinking quote ---- */
.thinking-quote {
  border-left: 3px solid var(--gold);
  padding: 12px 16px;
  margin: 18px 0;
  background: rgba(215,179,90,.06);
  border-radius: 0 var(--radius-sm) var(--radius-sm) 0;
  color: var(--muted);
  font-style: italic;
  font-size: .93rem;
  line-height: 1.7;
}
.thinking-btns { display: flex; gap: 10px; flex-wrap: wrap; margin-top: 6px; }

/* ---- Process list ---- */
.process-list { display: grid; gap: 12px; }
.process-list div {
  padding: 16px 18px;
  border-left: 3px solid var(--gold);
  background: rgba(255,255,255,.04);
  border-radius: 0 var(--radius-md) var(--radius-md) 0;
}
.process-list span { color: var(--purple); font-weight: 900; margin-right: 10px; font-size: 1.05rem; }
.process-list strong { color: var(--text); }
.process-list p { margin: 4px 0 0; color: var(--muted); font-size: .88rem; }

/* ---- Architecture stack ---- */
.alt { background: rgba(255,255,255,.02); }
.architecture-stack { display: grid; gap: 10px; }
.architecture-stack div {
  padding: 14px 18px;
  border-radius: var(--radius-sm);
  border: 1px solid rgba(215,179,90,.22);
  background: linear-gradient(90deg, rgba(215,179,90,.1), rgba(155,92,255,.08));
  font-weight: 700;
  font-size: .9rem;
  color: var(--text);
  transition: border-color var(--trans);
}
.architecture-stack div:hover { border-color: rgba(215,179,90,.5); }

/* ====================================================
   AGENT SECTION
   ==================================================== */
.agent-shell {
  display: grid;
  grid-template-columns: 300px 1fr;
  gap: 0;
  padding: 0;
  overflow: hidden;
  min-height: 580px;
  border-radius: var(--radius-lg);
  border: 1px solid var(--line);
  background: linear-gradient(180deg, rgba(255,255,255,.05), rgba(255,255,255,.02));
}
.quick-questions {
  display: flex;
  flex-direction: column;
  gap: 8px;
  padding: 20px;
  border-right: 1px solid var(--line);
  background: rgba(0,0,0,.22);
  overflow-y: auto;
}
.quick-questions h3 {
  color: var(--gold);
  font-size: .82rem;
  text-transform: uppercase;
  letter-spacing: .1em;
  margin-bottom: 2px;
}
.select-label {
  display: grid;
  gap: 5px;
  color: var(--muted);
  font-size: .78rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: .08em;
}
select, .chat-input {
  width: 100%;
  border: 1px solid var(--line);
  background: rgba(255,255,255,.04);
  color: var(--text);
  padding: 10px 13px;
  border-radius: var(--radius-sm);
  font-size: .86rem;
  transition: border-color var(--trans);
}
select:focus, .chat-input:focus {
  outline: none;
  border-color: var(--gold);
  box-shadow: 0 0 0 3px rgba(215,179,90,.15);
}
select option { background: #1a1a1a; }
button.q-btn {
  display: block;
  width: 100%;
  text-align: left;
  background: rgba(255,255,255,.05);
  color: var(--text);
  border: 1px solid rgba(215,179,90,.2);
  border-radius: var(--radius-sm);
  padding: 9px 13px;
  font-size: .83rem;
  font-weight: 600;
  cursor: pointer;
  transition: background var(--trans), border-color var(--trans);
}
button.q-btn:hover { background: rgba(215,179,90,.1); border-color: rgba(215,179,90,.4); transform: none; box-shadow: none; }

/* ---- Chat panel ---- */
.chat-panel {
  min-height: 580px;
  display: flex;
  flex-direction: column;
  background: #0b0c0e;
  border-radius: 0;
}
.chat-output {
  flex: 1;
  padding: 18px;
  overflow-y: auto;
  display: flex;
  flex-direction: column;
  gap: 14px;
}
.message {
  max-width: 92%;
  padding: 14px 16px;
  border-radius: 18px;
  line-height: 1.65;
  font-size: .92rem;
}
.message.user {
  align-self: flex-end;
  background: linear-gradient(135deg, rgba(215,179,90,.28), rgba(215,179,90,.12));
  border: 1px solid rgba(215,179,90,.25);
}
.message.agent {
  align-self: flex-start;
  background: rgba(255,255,255,.05);
  border: 1px solid var(--line);
}
.message.agent h4 { margin: 0 0 8px; color: var(--gold); font-size: .95rem; }
.message.agent ul { padding-left: 18px; margin: 8px 0; }
.message.agent li { color: var(--muted); margin-bottom: 5px; font-size: .9rem; }
.message.agent blockquote {
  border-left: 3px solid var(--gold);
  padding: 8px 14px;
  margin: 10px 0;
  color: var(--muted);
  font-style: italic;
  background: rgba(215,179,90,.05);
  border-radius: 0 10px 10px 0;
  font-size: .9rem;
}
.message.agent hr { border: none; border-top: 1px solid var(--line); margin: 12px 0; }
.message.agent p { margin-bottom: 8px; font-size: .9rem; }
.message.agent strong { color: var(--silver); }

/* ---- Answer meta + follow-ups ---- */
.answer-meta {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
  margin-top: 12px;
  padding-top: 10px;
  border-top: 1px solid var(--line);
}
.answer-meta span {
  font-size: .72rem;
  color: #030a06;
  background: var(--green);
  border-radius: var(--radius-pill);
  padding: 4px 9px;
  font-weight: 900;
}
.followups {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin-top: 10px;
}
.followups strong { width: 100%; font-size: .82rem; color: var(--muted); }
.followups button {
  border: 1px solid rgba(215,179,90,.25);
  background: rgba(215,179,90,.07);
  color: var(--text);
  padding: 7px 12px;
  border-radius: var(--radius-sm);
  font-size: .8rem;
  cursor: pointer;
  transition: background var(--trans);
  font-weight: 600;
}
.followups button:hover { background: rgba(215,179,90,.16); transform: none; box-shadow: none; }

/* ---- Mini cards (project matches in chat) ---- */
.mini-card {
  margin: 10px 0;
  padding: 14px;
  border-radius: var(--radius-md);
}
.mini-card a { color: var(--green); font-weight: 800; font-size: .88rem; }

/* ---- Chat form ---- */
.chat-form {
  display: flex;
  gap: 10px;
  padding: 14px;
  border-top: 1px solid var(--line);
}
.chat-form input { flex: 1; }
.chat-input::placeholder { color: var(--muted); }

/* ---- Live AI panel ---- */
.live-ai-panel {
  margin-top: 20px;
  padding: 20px;
  border: 1px solid var(--line);
  border-radius: var(--radius-lg);
  background: rgba(0,0,0,.2);
}
.live-ai-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 12px;
}
.live-ai-header h3 { color: var(--gold); font-size: .95rem; }
.live-ai-form { margin-top: 16px; }
.live-ai-note {
  font-size: .83rem;
  color: var(--muted);
  margin-bottom: 14px;
  padding: 10px 14px;
  border: 1px solid rgba(255,107,107,.25);
  border-radius: var(--radius-sm);
  background: rgba(255,107,107,.05);
}
.live-ai-row { display: flex; gap: 12px; flex-wrap: wrap; margin-bottom: 12px; }
.live-ai-field { flex: 1; min-width: 200px; display: grid; gap: 6px; }
.live-ai-field label { font-size: .78rem; font-weight: 700; color: var(--muted); text-transform: uppercase; letter-spacing: .08em; }
.live-ai-actions { display: flex; gap: 10px; }
.live-ai-result {
  margin-top: 10px;
  font-size: .85rem;
  padding: 8px 14px;
  border-radius: var(--radius-sm);
  display: none;
}
.live-ai-result:not(:empty) { display: block; }
.live-ai-result.ok { background: rgba(71,209,140,.1); border: 1px solid rgba(71,209,140,.3); color: var(--green); }
.live-ai-result.err { background: rgba(255,107,107,.1); border: 1px solid rgba(255,107,107,.3); color: var(--danger); }
.live-ai-result.info { background: rgba(92,184,255,.1); border: 1px solid rgba(92,184,255,.3); color: var(--info); }

/* ====================================================
   PROJECTS
   ==================================================== */
.project-search-row {
  margin-bottom: 20px;
}
.project-search-row input {
  width: 100%;
  max-width: 400px;
  background: rgba(255,255,255,.05);
  border: 1px solid var(--line);
  border-radius: var(--radius-pill);
  color: var(--text);
  padding: 11px 18px;
  font-size: .92rem;
}
.project-search-row input:focus { outline: none; border-color: var(--gold); box-shadow: 0 0 0 3px rgba(215,179,90,.15); }
.project-search-row input::placeholder { color: var(--muted); }
.project-grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 18px; }
.project-card {
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  gap: 16px;
  transition: border-color var(--trans), box-shadow var(--trans);
}
.project-card:hover { border-color: var(--line-gold); box-shadow: 0 0 28px rgba(215,179,90,.12); }
.project-card .type { margin-bottom: 6px; }
.project-card h3 { font-size: 1rem; margin-bottom: 6px; color: var(--text); }
.project-card p { color: var(--muted); font-size: .88rem; line-height: 1.6; }
.project-card strong { color: var(--silver); }
.project-actions {
  display: flex;
  gap: 8px;
  flex-wrap: wrap;
}
.project-actions button, .project-actions a {
  border: 1px solid rgba(215,179,90,.25);
  background: rgba(215,179,90,.07);
  color: var(--text);
  padding: 8px 13px;
  border-radius: var(--radius-sm);
  font-size: .8rem;
  font-weight: 700;
  text-decoration: none;
  cursor: pointer;
  transition: background var(--trans);
}
.project-actions button:hover, .project-actions a:hover { background: rgba(215,179,90,.16); transform: none; box-shadow: none; }
.project-actions a { color: var(--green); }
.no-results { color: var(--muted); text-align: center; padding: 40px; grid-column: 1/-1; }

/* ====================================================
   ACCORDION
   ==================================================== */
.accordion { display: grid; gap: 12px; }
.accordion-item { border-radius: var(--radius-lg); overflow: hidden; }
.accordion-title {
  width: 100%;
  display: flex;
  justify-content: space-between;
  align-items: center;
  text-align: left;
  border: none;
  background: rgba(255,255,255,.04);
  color: var(--gold);
  font-size: .97rem;
  font-weight: 800;
  padding: 16px 20px;
  cursor: pointer;
  transition: background var(--trans);
}
.accordion-title:hover { background: rgba(215,179,90,.07); transform: none; box-shadow: none; }
.accordion-chevron { color: var(--gold); font-size: 1.1rem; flex-shrink: 0; transition: transform var(--trans); }
.accordion-item.open .accordion-chevron { transform: rotate(180deg); }
.accordion-body { display: none; padding: 0 20px 18px; }
.accordion-item.open .accordion-body { display: block; }
.accordion-body p { color: var(--muted); font-size: .92rem; line-height: 1.75; margin-bottom: 12px; }
.accordion-copy-btn {
  background: rgba(215,179,90,.1);
  border: 1px solid var(--line-gold);
  color: var(--gold);
  border-radius: var(--radius-pill);
  padding: 6px 16px;
  font-size: .78rem;
  font-weight: 800;
  cursor: pointer;
  transition: background var(--trans);
}
.accordion-copy-btn:hover { background: rgba(215,179,90,.2); transform: none; box-shadow: none; }

/* ====================================================
   FOOTER
   ==================================================== */
.footer {
  display: flex;
  justify-content: space-between;
  gap: 14px;
  flex-wrap: wrap;
  padding: 28px clamp(16px, 4vw, 56px);
  border-top: 1px solid var(--line);
  color: var(--muted);
  font-size: .86rem;
}
.footer a { color: var(--gold); font-weight: 700; }
.footer a:hover { text-decoration: underline; }

/* ====================================================
   RESPONSIVE — 900px (tablet/small desktop)
   ==================================================== */
@media (max-width: 900px) {
  .nav-links { display: none; flex-direction: column; position: absolute; top: 100%; left: 0; right: 0; background: rgba(7,7,7,.98); padding: 14px 20px; gap: 4px; z-index: 200; border-bottom: 1px solid var(--line); }
  .nav-links.open { display: flex; }
  .nav-toggle { display: block; }
  .site-nav-wrap { position: relative; }
  .hero-grid, .split { grid-template-columns: 1fr; }
  .hero-copy h2 { font-size: clamp(2rem, 7vw, 3.8rem); }
  .cards.three, .project-grid { grid-template-columns: 1fr; }
  .agent-shell { grid-template-columns: 1fr; display: flex; flex-direction: column; }
  .quick-questions { border-right: none; border-bottom: 1px solid var(--line); max-height: 260px; overflow-y: auto; }
  .chat-panel { min-height: 440px; }
  .message { max-width: 100%; }
  .chat-form { flex-wrap: wrap; }
}

/* ====================================================
   RESPONSIVE — 640px (mobile)
   ==================================================== */
@media (max-width: 640px) {
  .hero { padding-top: 12px; }
  .nav { padding: 10px 16px; }
  .section { padding: 40px 16px; }
  .hero-buttons, .nav-actions { flex-direction: column; width: 100%; }
  .btn { justify-content: center; width: 100%; }
  .chat-form { flex-direction: column; }
  .live-ai-row { flex-direction: column; }
  .footer { flex-direction: column; text-align: center; }
  .accordion-title { font-size: .9rem; }
  .project-grid { grid-template-columns: 1fr; }
  .thinking-btns { flex-direction: column; }
}

/* ====================================================
   RESPONSIVE — 380px (very small mobile)
   ==================================================== */
@media (max-width: 380px) {
  .hero-copy h2 { font-size: 1.9rem; }
  .brand-mark { width: 40px; height: 40px; }
  .brand-block h1 { font-size: .9rem; }
}

/* ====================================================
   app SAFE AREA
   ==================================================== */
@supports (padding: max(0px)) {
  .site-nav-wrap { padding-top: env(safe-area-inset-top); }
  .footer { padding-bottom: max(28px, env(safe-area-inset-bottom)); }
}

/* ── app Hero Install CTA ─────────────────────────────────── */
.hero-install-wrap {
  display: flex;
  flex-direction: column;
  gap: 6px;
  margin: 14px 0 4px;
  animation: fadeInUp .4s ease both;
}

.btn-install-hero {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  padding: 14px 22px;
  border-radius: 999px;
  font-size: clamp(.9rem, 2vw, 1.05rem);
  font-weight: 800;
  cursor: pointer;
  border: 2px solid rgba(212,175,55,.8);
  background: linear-gradient(135deg, #d4af37 0%, #f6df92 50%, #d4af37 100%);
  color: #080808;
  box-shadow: 0 12px 36px rgba(212,175,55,.28), 0 2px 8px rgba(0,0,0,.4);
  transition: transform .18s ease, box-shadow .18s ease, opacity .18s ease;
  white-space: normal;
  text-align: left;
  max-width: 480px;
  width: 100%;
}
.btn-install-hero:hover:not(:disabled) {
  transform: translateY(-2px);
  box-shadow: 0 18px 48px rgba(212,175,55,.38);
}
.btn-install-hero:active:not(:disabled) {
  transform: translateY(0);
}
.btn-install-hero:disabled {
  opacity: .6;
  cursor: default;
  background: rgba(255,255,255,.1);
  color: #9cffc7;
  border-color: rgba(156,255,199,.5);
}

.hero-install-note {
  font-size: .78rem;
  color: rgba(255,255,255,.55);
  margin: 0;
  padding-left: 4px;
}

/* Pulse on the install button to draw attention */
@keyframes installPulse {
  0%, 100% { box-shadow: 0 12px 36px rgba(212,175,55,.28); }
  50%       { box-shadow: 0 12px 48px rgba(212,175,55,.55); }
}
.btn-install-hero:not(:disabled) {
  animation: installPulse 2.4s ease infinite;
}


/* ====================================================
   KYZELCLARITY™ OFFLINE-FIRST PUBLIC BENEFIT PATCH
   ==================================================== */
.clarity-public-benefit .section-heading p,
.clarity-origin p,
.safety-disclaimer p {
  color: var(--muted);
}

.clarity-feature-grid {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 16px;
}

.clarity-feature-card {
  position: relative;
  overflow: hidden;
  min-height: 260px;
  border-color: rgba(215,179,90,.2);
}

.clarity-feature-card::before {
  content: "";
  position: absolute;
  inset: 0;
  background: radial-gradient(circle at 20% 0%, rgba(215,179,90,.12), transparent 35%),
              radial-gradient(circle at 90% 100%, rgba(155,92,255,.11), transparent 40%);
  pointer-events: none;
}

.clarity-feature-card > * {
  position: relative;
  z-index: 1;
}

.clarity-icon {
  width: 42px;
  height: 42px;
  border: 1px solid rgba(71,209,140,.35);
  border-radius: 16px;
  display: grid;
  place-items: center;
  color: var(--green);
  background: rgba(71,209,140,.08);
  font-weight: 900;
  margin-bottom: 16px;
}

.public-benefit-panel,
.disclaimer-card {
  border: 1px solid rgba(215,179,90,.24);
  background: linear-gradient(180deg, rgba(215,179,90,.08), rgba(255,255,255,.03));
  border-radius: var(--radius-lg);
  padding: 24px;
  box-shadow: var(--shadow);
}

.public-benefit-panel h3,
.disclaimer-card h2 {
  color: var(--gold);
  margin-bottom: 14px;
}

.public-benefit-panel ul {
  display: grid;
  gap: 10px;
  list-style: none;
}

.public-benefit-panel li {
  color: var(--muted);
  padding-left: 24px;
  position: relative;
}

.public-benefit-panel li::before {
  content: "✓";
  position: absolute;
  left: 0;
  top: 0;
  color: var(--green);
  font-weight: 900;
}

.safety-disclaimer {
  padding-top: 18px;
}

.disclaimer-card {
  border-color: rgba(207,211,215,.18);
  background: rgba(255,255,255,.045);
}

@media (max-width: 1100px) {
  .clarity-feature-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
}

@media (max-width: 640px) {
  .clarity-feature-grid { grid-template-columns: 1fr; }
  .clarity-feature-card { min-height: auto; }
  .public-benefit-panel, .disclaimer-card { padding: 18px; }
}


/* ====================================================
   KYZELCLARITY™ FUTURE HIGH-VALUE UPGRADES PATCH
   ==================================================== */
.future-upgrades .section-heading p,
.future-upgrade-note,
.future-status-card p {
  color: var(--muted);
}

.future-status-card {
  display: grid;
  grid-template-columns: minmax(0, 1.1fr) minmax(0, .9fr);
  gap: 20px;
  align-items: start;
  border: 1px solid rgba(71,209,140,.28);
  background:
    radial-gradient(circle at 10% 0%, rgba(71,209,140,.13), transparent 35%),
    radial-gradient(circle at 90% 100%, rgba(155,92,255,.12), transparent 40%),
    rgba(255,255,255,.045);
  border-radius: var(--radius-lg);
  padding: 24px;
  margin-bottom: 18px;
  box-shadow: var(--shadow);
}

.future-status-card h3 {
  color: var(--gold);
  margin-top: 6px;
}

.future-upgrade-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 16px;
}

.future-upgrade-card {
  min-height: 250px;
  border-color: rgba(155,92,255,.24);
  background:
    linear-gradient(180deg, rgba(155,92,255,.08), rgba(255,255,255,.035)),
    var(--panel);
}

.future-upgrade-note {
  margin-top: 18px;
  border-left: 3px solid var(--gold);
  padding: 14px 16px;
  background: rgba(215,179,90,.06);
  border-radius: 0 var(--radius-md) var(--radius-md) 0;
}

@media (max-width: 1100px) {
  .future-upgrade-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .future-status-card { grid-template-columns: 1fr; }
}

@media (max-width: 640px) {
  .future-upgrade-grid { grid-template-columns: 1fr; }
  .future-status-card { padding: 18px; }
  .future-upgrade-card { min-height: auto; }
}

/* ====================================================
   4P3X KYZELCLARITY™ BRAND LOGO PATCH v3.31
   Platform logo placement + install app icons
   ==================================================== */
.brand-mark--image {
  padding: 0;
  overflow: hidden;
  background: #050505;
}
.brand-mark--image img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
}

.platform-logo-panel {
  width: min(100%, 760px);
  margin: 0 0 18px;
  padding: clamp(8px, 1.8vw, 14px);
  border: 1px solid rgba(215,179,90,.22);
  border-radius: var(--radius-lg);
  background:
    radial-gradient(circle at 20% 20%, rgba(155,92,255,.18), transparent 38%),
    radial-gradient(circle at 78% 35%, rgba(71,209,140,.13), transparent 34%),
    linear-gradient(180deg, rgba(255,255,255,.055), rgba(255,255,255,.018));
  box-shadow: 0 0 42px rgba(215,179,90,.12), 0 18px 60px rgba(0,0,0,.36);
}
.platform-logo-panel img {
  display: block;
  width: 100%;
  height: auto;
  border-radius: calc(var(--radius-lg) - 8px);
}
.install-cta-icon {
  width: 30px;
  height: 30px;
  border-radius: 9px;
  object-fit: cover;
  box-shadow: 0 0 12px rgba(0,0,0,.35);
  flex: 0 0 auto;
}
.btn-install-hero span { line-height: 1.2; }
.footer--branded {
  align-items: center;
}
.footer-brand-logo {
  width: min(360px, 100%);
  height: auto;
  border: 1px solid rgba(255,255,255,.1);
  border-radius: 16px;
  background: rgba(0,0,0,.35);
  box-shadow: 0 0 28px rgba(155,92,255,.10);
}

@media (max-width: 900px) {
  .platform-logo-panel { margin-bottom: 16px; }
}

@media (max-width: 640px) {
  .platform-logo-panel {
    padding: 7px;
    border-radius: 18px;
  }
  .footer-brand-logo { width: 100%; max-width: 330px; }
  .btn-install-hero { align-items: center; text-align: center; }
}


/* ============================================================
   v3.32 — 4P3X Verse™ ecosystem knowledge + private admin route
   ============================================================ */

.ecosystem-overview {
  border: 1px solid rgba(215,179,90,.22);
  background:
    radial-gradient(circle at 18% 0%, rgba(155,92,255,.16), transparent 34%),
    radial-gradient(circle at 82% 12%, rgba(71,209,140,.14), transparent 34%),
    linear-gradient(145deg, rgba(17,18,20,.92), rgba(7,7,7,.98));
  border-radius: 28px;
  padding: clamp(22px, 4vw, 42px);
  box-shadow: 0 0 44px rgba(0,0,0,.32), inset 0 0 0 1px rgba(255,255,255,.03);
}

.ecosystem-hero-card {
  display: grid;
  grid-template-columns: minmax(0, 1.4fr) minmax(220px, .6fr);
  gap: 22px;
  align-items: stretch;
  margin: 26px 0;
  padding: clamp(18px, 3vw, 28px);
  border: 1px solid rgba(245,217,138,.2);
  border-radius: 24px;
  background: linear-gradient(135deg, rgba(215,179,90,.08), rgba(155,92,255,.08), rgba(71,209,140,.06));
}

.ecosystem-hero-card h3 {
  margin: 0 0 12px;
  font-size: clamp(1.2rem, 2vw, 1.75rem);
  color: var(--gold-light);
  line-height: 1.25;
}

.ecosystem-proof-stack {
  display: grid;
  gap: 10px;
}

.ecosystem-proof-stack span {
  display: flex;
  align-items: center;
  min-height: 44px;
  padding: 10px 12px;
  border: 1px solid rgba(255,255,255,.12);
  border-radius: 14px;
  color: var(--silver);
  background: rgba(0,0,0,.25);
}

.ecosystem-stat-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 16px;
  margin: 20px 0;
}

.ecosystem-stat-number {
  display: block;
  font-size: clamp(2rem, 5vw, 3.6rem);
  line-height: 1;
  font-weight: 900;
  letter-spacing: -0.06em;
  color: var(--gold-light);
  text-shadow: 0 0 22px rgba(215,179,90,.3);
}

.ecosystem-stat-card h3 {
  margin-top: 10px;
}

.ecosystem-card-row {
  margin-top: 18px;
}

.ecosystem-pipeline {
  margin-top: 22px;
  padding: 18px;
  border: 1px solid rgba(71,209,140,.18);
  border-radius: 20px;
  background: rgba(71,209,140,.055);
}

.admin-route-only {
  display: none;
}

body.admin-route-active .admin-route-only {
  display: block;
}

body.admin-route-active .admin-control-section {
  display: none;
}

body.admin-route-active.admin-unlocked .admin-control-section {
  display: block;
}

.admin-home-section {
  border: 1px solid rgba(215,179,90,.2);
  background:
    radial-gradient(circle at top left, rgba(215,179,90,.12), transparent 32%),
    linear-gradient(145deg, rgba(17,18,20,.96), rgba(7,7,7,.98));
  border-radius: 28px;
  padding: clamp(22px, 4vw, 38px);
}

.admin-gate {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(240px, .7fr);
  gap: 18px;
  align-items: center;
  padding: 18px;
  border: 1px solid rgba(155,92,255,.22);
  border-radius: 20px;
  background: rgba(0,0,0,.24);
  margin-bottom: 16px;
}

.admin-gate-controls {
  display: grid;
  gap: 10px;
}

.admin-gate-controls input {
  width: 100%;
  border: 1px solid rgba(255,255,255,.18);
  border-radius: 14px;
  padding: 12px 14px;
  background: rgba(0,0,0,.42);
  color: var(--text);
}

.admin-gate-status {
  grid-column: 1 / -1;
  margin: 0;
  color: var(--muted);
}

.admin-settings-map {
  display: none;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 10px;
  margin: 16px 0 20px;
}

body.admin-unlocked .admin-settings-map {
  display: grid;
}

.admin-settings-map a {
  text-align: center;
  border: 1px solid rgba(215,179,90,.22);
  border-radius: 14px;
  color: var(--gold-light);
  background: rgba(215,179,90,.07);
  padding: 11px 10px;
  text-decoration: none;
}

body:not(.admin-route-active) .admin-route-only {
  display: none !important;
}

@media (max-width: 860px) {
  .ecosystem-hero-card,
  .ecosystem-stat-grid,
  .admin-gate,
  .admin-settings-map {
    grid-template-columns: 1fr;
  }

  .ecosystem-overview,
  .admin-home-section {
    padding: 18px;
    border-radius: 22px;
  }
}

/* ============================================================
   v3.33 — voice answer fix + squared mobile alignment patch
   FIX-ONLY: no feature drift, no backend changes.
   ============================================================ */
:root {
  --radius-lg: 10px;
  --radius-md: 8px;
  --radius-sm: 6px;
  --radius-pill: 8px;
}

body {
  width: 100%;
  max-width: 100vw;
  overflow-x: hidden;
}

img, video, canvas, svg {
  max-width: 100%;
}

.site-nav-wrap,
.system-card,
.card,
.project-card,
.agent-shell,
.accordion-item,
.mini-card,
.platform-logo-panel,
.public-benefit-panel,
.disclaimer-card,
.future-status-card,
.ecosystem-overview,
.ecosystem-hero-card,
.ecosystem-pipeline,
.admin-home-section,
.admin-gate,
.voice-panel-card,
.kyzel-voice-panel,
.kc-voice-card,
.kc-voice-top-panel,
.kc-provider-panel,
.kx-panel,
.kx-card,
.kc-federation-card,
button,
.btn,
input,
select,
textarea {
  border-radius: 8px !important;
}

.brand-mark,
.brand-mark img,
.install-cta-icon,
.footer-brand-logo,
.platform-logo-panel img,
.clarity-icon {
  border-radius: 6px !important;
}

.site-nav-wrap {
  width: 100%;
  max-width: 100vw;
}

.nav {
  width: 100%;
  max-width: 100vw;
}

.platform-logo-panel {
  max-width: 100%;
  overflow: hidden;
}

.platform-logo-panel img {
  width: 100%;
  height: auto;
  object-fit: contain;
}

.hero,
.section,
.footer {
  width: 100%;
  max-width: 100vw;
}

@media (max-width: 760px) {
  .site-nav-wrap {
    position: sticky;
    top: 0;
  }

  .nav {
    display: grid;
    grid-template-columns: minmax(0, 1fr) auto;
    gap: 8px;
    align-items: center;
    padding: 10px 12px;
  }

  .brand-block {
    min-width: 0;
    gap: 9px;
  }

  .brand-block .eyebrow {
    font-size: .62rem;
    letter-spacing: .11em;
    white-space: normal;
    overflow-wrap: anywhere;
  }

  .brand-block h1 {
    font-size: .94rem;
    line-height: 1.05;
  }

  .brand-mark {
    width: 42px;
    height: 42px;
  }

  .nav-actions {
    width: auto !important;
    flex-direction: row !important;
    flex-wrap: nowrap;
    justify-content: flex-end;
    align-items: center;
    gap: 6px;
  }

  .nav-actions .btn,
  .nav-actions button {
    width: auto !important;
    min-width: 0;
    padding: 8px 9px;
    font-size: .72rem;
    line-height: 1;
  }

  .nav-actions a[href="#voice-mode"],
  .nav-actions a[href="#pdf-reports"] {
    display: none !important;
  }

  #installBtn[hidden] {
    display: none !important;
  }

  #installBtn:not([hidden]) {
    max-width: 96px;
    white-space: normal;
    text-align: center;
  }

  .nav-toggle {
    display: inline-flex;
    width: 42px !important;
    height: 38px;
    align-items: center;
    justify-content: center;
    padding: 0 !important;
    font-size: 1.1rem;
  }

  .nav-links {
    left: 0;
    right: 0;
    width: 100%;
    max-width: 100vw;
    border-radius: 0 !important;
  }

  .nav-links a {
    border-radius: 6px !important;
  }

  .hero {
    padding: 22px 14px 38px;
  }

  .hero-grid {
    padding-top: 18px;
    gap: 20px;
  }

  .platform-logo-panel {
    margin-inline: auto;
    padding: 6px;
  }

  .hero-copy h2 {
    font-size: clamp(2rem, 10vw, 3rem);
    line-height: 1.02;
    margin-top: 14px;
  }

  .lead {
    font-size: 1rem;
    line-height: 1.65;
  }

  .hero-buttons {
    display: grid;
    grid-template-columns: 1fr;
  }

  .hero-buttons .btn,
  .hero-buttons button {
    width: 100%;
  }

  .section {
    padding-left: 14px;
    padding-right: 14px;
  }
}

@media (max-width: 420px) {
  .nav {
    padding: 8px 10px;
  }

  .brand-mark {
    width: 38px;
    height: 38px;
  }

  .brand-block .eyebrow {
    font-size: .56rem;
    letter-spacing: .09em;
  }

  .brand-block h1 {
    font-size: .84rem;
  }

  #installBtn:not([hidden]) {
    max-width: 86px;
    font-size: .66rem;
  }

  .nav-toggle {
    width: 38px !important;
    height: 36px;
  }
}


/* ============================================================
   v3.34 FINAL PRODUCTION POLISH — alignment, responsiveness,
   square UI consistency, safe mobile overflow control
   ============================================================ */

:root {
  --radius-lg: 12px;
  --radius-md: 10px;
  --radius-sm: 8px;
  --radius-pill: 8px;
}

html {
  max-width: 100%;
  overflow-x: hidden;
  scroll-behavior: smooth;
}

body {
  max-width: 100%;
  overflow-x: hidden;
}

img, svg, video, canvas {
  max-width: 100%;
  height: auto;
}

.app-shell,
main,
.section,
.hero,
.site-nav-wrap,
.nav,
.footer,
.agent-shell,
.project-grid,
.cards,
.clarity-feature-grid,
.future-upgrade-grid,
.ecosystem-stat-grid {
  max-width: 100%;
}

.site-nav-wrap {
  overflow-x: clip;
}

.nav {
  width: min(1180px, calc(100vw - 24px));
  margin-inline: auto;
  display: flex;
  align-items: center;
  gap: 12px;
}

.brand-block {
  min-width: 0;
  max-width: 100%;
}

.brand-block h1,
.brand-block .eyebrow,
.hero h1,
.section-heading h2,
.card h3,
.project-card h3 {
  overflow-wrap: anywhere;
  word-break: normal;
}

.nav-links {
  max-width: 100%;
}

.nav-actions {
  flex-shrink: 0;
}

.btn,
button,
input,
select,
textarea,
.card,
.project-card,
.mini-card,
.logo-frame,
.hero-logo-card,
.disclaimer-card,
.public-benefit-panel,
.ecosystem-overview,
.ecosystem-hero-card,
.ecosystem-stat-card,
.admin-home-section,
.admin-gate,
.agent-shell,
.chat-output,
.quick-questions,
.answer-card,
.kc-provider-settings,
.kc-voice-layer,
.kx-panel,
.kx-card,
.pdf-agent-card,
.future-status-card,
.future-upgrade-card,
.clarity-feature-card {
  border-radius: 10px !important;
}

.btn-sm,
.q-btn,
.project-actions button,
.project-actions a,
.followups button,
.accordion-copy-btn,
.admin-settings-map a {
  border-radius: 8px !important;
}

.hero,
.section {
  width: min(1180px, calc(100vw - 24px));
  margin-inline: auto;
}

.hero {
  display: grid;
  grid-template-columns: minmax(0, 1.15fr) minmax(300px, .85fr);
  align-items: center;
  gap: clamp(18px, 3vw, 42px);
}

.hero > *,
.section > * {
  min-width: 0;
}

.hero-logo,
.hero-brand-logo,
.platform-logo,
.footer-brand-logo {
  display: block;
  object-fit: contain;
}

.hero-logo-card,
.logo-frame {
  overflow: hidden;
}

.chat-output,
.answer-card,
.mini-card,
.accordion-body,
.project-card p,
.card p,
.section-heading p {
  overflow-wrap: anywhere;
}

.project-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(min(100%, 285px), 1fr));
  gap: 16px;
}

.cards.three,
.clarity-feature-grid,
.future-upgrade-grid,
.ecosystem-stat-grid {
  grid-template-columns: repeat(auto-fit, minmax(min(100%, 240px), 1fr));
}

.admin-route-only {
  max-width: 100%;
}

.admin-settings-map {
  grid-template-columns: repeat(auto-fit, minmax(min(100%, 170px), 1fr));
}

@media (max-width: 1024px) {
  .nav {
    width: min(100%, calc(100vw - 18px));
  }

  .hero,
  .section {
    width: min(100%, calc(100vw - 18px));
  }

  .hero {
    grid-template-columns: 1fr;
    align-items: start;
  }

  .hero-visual,
  .hero-copy {
    width: 100%;
  }

  .nav-links {
    position: fixed;
    top: 74px;
    right: 10px;
    left: 10px;
    width: auto;
    max-height: min(76vh, 620px);
    overflow-y: auto;
    overflow-x: hidden;
    z-index: 1000;
    padding: 12px;
    background: rgba(7,7,7,.96);
    border: 1px solid rgba(215,179,90,.22);
    box-shadow: 0 18px 60px rgba(0,0,0,.45);
  }

  .nav-links a {
    width: 100%;
    justify-content: flex-start;
    padding: 13px 14px;
  }
}

@media (max-width: 760px) {
  body {
    font-size: 16px;
  }

  .site-nav-wrap {
    padding: 8px 0;
  }

  .nav {
    display: grid;
    grid-template-columns: minmax(0, 1fr) auto;
    gap: 8px;
    align-items: center;
  }

  .brand-block {
    display: grid;
    grid-template-columns: 44px minmax(0, 1fr);
    gap: 10px;
    align-items: center;
  }

  .brand-block h1 {
    font-size: 1rem;
    line-height: 1.05;
  }

  .brand-block .eyebrow {
    font-size: .72rem;
    letter-spacing: .12em;
  }

  .brand-mark,
  .brand-mark--image img {
    width: 44px !important;
    height: 44px !important;
  }

  .nav-actions {
    display: flex;
    gap: 6px;
    justify-content: flex-end;
    align-items: center;
  }

  .nav-actions .btn:not(#installBtn),
  .nav-actions a.btn {
    display: none !important;
  }

  #installBtn {
    max-width: 112px;
    min-height: 40px;
    padding: 8px 10px;
    font-size: .78rem;
    white-space: normal;
    line-height: 1.05;
  }

  .nav-toggle {
    width: 44px;
    height: 44px;
    display: inline-grid;
    place-items: center;
    flex: 0 0 auto;
  }

  .hero,
  .section {
    width: min(100%, calc(100vw - 20px));
    padding-left: 0;
    padding-right: 0;
  }

  .hero {
    padding-top: 26px;
    gap: 18px;
  }

  .hero h1 {
    font-size: clamp(2rem, 11vw, 3.35rem);
    line-height: .98;
    letter-spacing: -0.045em;
  }

  .hero p,
  .section-heading p,
  .card p,
  .project-card p {
    font-size: 1rem;
    line-height: 1.65;
  }

  .hero-logo-card,
  .logo-frame {
    padding: 8px;
  }

  .hero-logo-card img,
  .logo-frame img {
    width: 100%;
  }

  .hero-actions,
  .thinking-btns,
  .project-actions,
  .quick-actions,
  .admin-gate-controls {
    display: grid !important;
    grid-template-columns: 1fr;
    width: 100%;
  }

  .hero-actions .btn,
  .thinking-btns .btn,
  .project-actions button,
  .project-actions a,
  .quick-actions .btn,
  .admin-gate-controls button,
  .admin-gate-controls input {
    width: 100%;
  }

  .agent-shell {
    grid-template-columns: 1fr !important;
  }

  .quick-questions {
    order: 2;
  }

  .chat-panel {
    order: 1;
    min-width: 0;
  }

  .chat-output {
    max-height: 58vh;
    overflow-y: auto;
  }

  .chat-form {
    display: grid !important;
    grid-template-columns: 1fr;
    gap: 10px;
  }

  .chat-form button,
  .chat-form textarea,
  .chat-form input {
    width: 100%;
  }

  .project-search-row input {
    width: 100%;
    min-height: 46px;
  }

  .footer--branded {
    text-align: center;
  }

  .footer-brand-logo {
    margin-inline: auto;
  }
}

@media (max-width: 420px) {
  .nav {
    width: calc(100vw - 12px);
  }

  .brand-block {
    grid-template-columns: 38px minmax(0, 1fr);
    gap: 8px;
  }

  .brand-block h1 {
    font-size: .92rem;
  }

  .brand-block .eyebrow {
    font-size: .62rem;
    letter-spacing: .1em;
  }

  .brand-mark,
  .brand-mark--image img {
    width: 38px !important;
    height: 38px !important;
  }

  #installBtn {
    display: none !important;
  }

  .hero,
  .section {
    width: calc(100vw - 14px);
  }

  .hero h1 {
    font-size: clamp(1.78rem, 10.5vw, 2.7rem);
  }

  .section-heading h2 {
    font-size: clamp(1.45rem, 8vw, 2.2rem);
  }

  .card,
  .project-card,
  .mini-card,
  .ecosystem-hero-card,
  .admin-gate,
  .disclaimer-card {
    padding: 14px !important;
  }
}

@media (min-width: 1280px) {
  .hero,
  .section,
  .nav {
    max-width: 1200px;
  }
}

@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after {
    scroll-behavior: auto !important;
    animation-duration: .001ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: .001ms !important;
  }
}


/* ============================================================
   v3.35 VOICE CAPABILITY WORDING + MOBILE OVERFLOW FIX
   Fixes future-upgrade cards and split sections on narrow phones.
   ============================================================ */

.future-upgrades,
.future-upgrades *,
.section,
.section *,
.split,
.split *,
.process-list,
.process-list *,
.future-upgrade-grid,
.future-upgrade-grid *,
.clarity-feature-grid,
.clarity-feature-grid *,
.ecosystem-stat-grid,
.ecosystem-stat-grid * {
  min-width: 0;
}

.future-upgrades {
  overflow: hidden;
}

.future-upgrade-grid {
  width: 100%;
  max-width: 100%;
  overflow: visible;
}

.future-upgrade-card {
  width: 100%;
  max-width: 100%;
}

.future-upgrade-card h3,
.future-upgrade-card p,
.future-status-card h3,
.future-status-card p,
.future-upgrade-note,
.process-list div,
.process-list p,
.process-list strong {
  overflow-wrap: anywhere;
}

.split {
  grid-template-columns: minmax(0, 1fr) minmax(0, 1fr);
}

.process-list {
  width: 100%;
  max-width: 100%;
}

@media (max-width: 900px) {
  .split,
  .section.split,
  .section.split.alt {
    display: grid !important;
    grid-template-columns: 1fr !important;
    gap: 18px !important;
  }

  .process-list {
    display: grid !important;
    grid-template-columns: 1fr !important;
    gap: 10px !important;
  }
}

@media (max-width: 760px) {
  .future-upgrade-grid,
  .clarity-feature-grid,
  .ecosystem-stat-grid,
  .cards.three {
    display: grid !important;
    grid-template-columns: 1fr !important;
    gap: 14px !important;
    overflow: visible !important;
  }

  .future-upgrade-card,
  .clarity-feature-card,
  .ecosystem-stat-card,
  .card {
    width: 100% !important;
    max-width: 100% !important;
  }

  .future-status-card {
    display: grid !important;
    grid-template-columns: 1fr !important;
    width: 100% !important;
    max-width: 100% !important;
    overflow: hidden !important;
  }

  .future-upgrade-note {
    width: 100% !important;
    max-width: 100% !important;
  }

  .section-heading h2,
  .future-status-card h3,
  .future-upgrade-card h3 {
    max-width: 100%;
    overflow-wrap: anywhere;
  }
}

@media (max-width: 420px) {
  .future-upgrades,
  .section {
    padding-left: 0 !important;
    padding-right: 0 !important;
  }

  .future-status-card,
  .future-upgrade-card,
  .future-upgrade-note,
  .process-list div {
    padding: 14px !important;
  }
}


/* ============================================================
   v3.36 MULTI-PAGE WEBSITE + ANSWER-APP INSTALL MODE
   ============================================================ */

.homepage-summary,
.homepage-quick-app,
.app-answer-hero {
  border: 1px solid rgba(215,179,90,.18);
  background:
    radial-gradient(circle at 18% 0%, rgba(155,92,255,.12), transparent 34%),
    radial-gradient(circle at 82% 10%, rgba(71,209,140,.1), transparent 34%),
    linear-gradient(145deg, rgba(17,18,20,.94), rgba(7,7,7,.98));
  padding: clamp(18px, 4vw, 36px);
}

.homepage-shortcut-grid .card,
.app-only-capability-row .card {
  display: grid;
  align-content: start;
  gap: 10px;
}

.homepage-shortcut-grid .btn {
  align-self: end;
  justify-self: start;
  margin-top: auto;
}

.answer-app-mode .app-only-shell {
  min-height: 100vh;
}

.answer-app-mode main {
  padding-bottom: 32px;
}

.answer-app-mode .site-nav-wrap {
  border-bottom: 1px solid rgba(215,179,90,.18);
}

.answer-app-mode .app-answer-hero {
  margin-top: 18px;
}

.answer-app-mode #agent,
.answer-app-mode #voice-mode,
.answer-app-mode #voice-conv {
  display: block;
}

.answer-app-mode #human-mode,
.answer-app-mode #ecosystem,
.answer-app-mode #projects,
.answer-app-mode #architecture,
.answer-app-mode #explainers,
.answer-app-mode #pdf-reports,
.answer-app-mode #expansion,
.answer-app-mode #ai-settings,
.answer-app-mode #power-tools,
.answer-app-mode #federation,
.answer-app-mode #admin {
  display: none !important;
}

.answer-app-mode .agent-shell {
  grid-template-columns: minmax(220px, .72fr) minmax(0, 1.28fr);
}

.answer-app-mode .quick-questions h3:first-child::after {
  content: " — app mode";
  color: var(--green);
  font-weight: 700;
}

.app-only-nav .nav {
  grid-template-columns: minmax(0, 1fr) auto;
}

.app-only-nav .nav-links,
.answer-app-mode .nav-toggle {
  display: none !important;
}

@media (max-width: 760px) {
  .homepage-shortcut-grid,
  .app-only-capability-row {
    grid-template-columns: 1fr !important;
  }

  .homepage-shortcut-grid .btn {
    width: 100%;
    justify-self: stretch;
  }

  .answer-app-mode .agent-shell {
    grid-template-columns: 1fr !important;
  }

  .answer-app-mode .quick-questions {
    order: 2;
  }

  .answer-app-mode .chat-panel {
    order: 1;
  }

  .app-only-nav .nav-actions .btn:not(#installBtn) {
    display: inline-flex !important;
  }
}


/* ============================================================
   v3.37 FUND / EMPLOY CASE SECTION
   ============================================================ */

.fund-employ-section {
  border: 1px solid rgba(215,179,90,.22);
  background:
    radial-gradient(circle at 12% 0%, rgba(215,179,90,.13), transparent 34%),
    radial-gradient(circle at 90% 10%, rgba(71,209,140,.11), transparent 34%),
    linear-gradient(145deg, rgba(17,18,20,.95), rgba(7,7,7,.98));
  padding: clamp(18px, 4vw, 36px);
}

.fund-employ-hero {
  display: grid;
  grid-template-columns: minmax(0, 1.35fr) minmax(220px, .65fr);
  gap: 18px;
  align-items: stretch;
  margin: 22px 0;
}

.fund-employ-hero > div,
.fund-employ-badge,
.fund-employ-callout {
  border: 1px solid rgba(255,255,255,.12);
  background: rgba(0,0,0,.24);
  padding: clamp(16px, 3vw, 24px);
  border-radius: 10px;
}

.fund-employ-hero h3 {
  color: var(--gold-light);
  margin-top: 0;
  font-size: clamp(1.2rem, 2vw, 1.8rem);
}

.fund-employ-badge {
  display: grid;
  align-content: center;
  gap: 8px;
  text-align: center;
  border-color: rgba(71,209,140,.24);
}

.fund-employ-badge span {
  color: var(--green);
  text-transform: uppercase;
  letter-spacing: .18em;
  font-weight: 900;
  font-size: .78rem;
}

.fund-employ-badge strong {
  color: var(--gold-light);
  font-size: clamp(1.25rem, 2.4vw, 2rem);
  line-height: 1.05;
}

.fund-employ-badge em {
  color: var(--muted);
  font-style: normal;
}

.fund-employ-grid {
  margin-top: 18px;
}

.fund-employ-callout {
  margin-top: 20px;
  display: grid;
  gap: 12px;
}

.fund-employ-callout p {
  margin: 0;
}

@media (max-width: 820px) {
  .fund-employ-hero {
    grid-template-columns: 1fr;
  }
}


/* ============================================================
   v3.39 TODAY'S 4P3X VERSE™ MILESTONE
   ============================================================ */

.milestone-announcement,
.milestone-page-section {
  border: 1px solid rgba(215,179,90,.24);
  background:
    radial-gradient(circle at 10% 0%, rgba(215,179,90,.14), transparent 34%),
    radial-gradient(circle at 90% 0%, rgba(71,209,140,.12), transparent 34%),
    linear-gradient(145deg, rgba(17,18,20,.96), rgba(7,7,7,.98));
  padding: clamp(18px, 4vw, 36px);
}

.milestone-announcement {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  gap: 18px;
  align-items: center;
  margin-top: 18px;
}

.milestone-announcement h2,
.milestone-page-section h2 {
  color: var(--gold-light);
}

.milestone-actions {
  display: flex;
  gap: 10px;
  flex-wrap: wrap;
}

.milestone-hero-card,
.milestone-detail-block,
.milestone-callout {
  margin-top: 18px;
  border: 1px solid rgba(255,255,255,.12);
  border-radius: 10px;
  background: rgba(0,0,0,.24);
  padding: clamp(16px, 3vw, 24px);
}

.milestone-hero-card h3 {
  margin-top: 0;
  color: var(--gold-light);
  font-size: clamp(1.2rem, 2vw, 1.75rem);
  line-height: 1.25;
}

.milestone-subtitle {
  color: var(--green);
  font-weight: 800;
}

.milestone-proof-grid {
  margin-top: 18px;
}

.milestone-detail-block ul {
  columns: 2;
  column-gap: 28px;
}

.milestone-detail-block li {
  break-inside: avoid;
  margin-bottom: 8px;
}

@media (max-width: 820px) {
  .milestone-announcement {
    grid-template-columns: 1fr;
  }

  .milestone-actions {
    display: grid;
    grid-template-columns: 1fr;
  }

  .milestone-actions .btn {
    width: 100%;
  }

  .milestone-detail-block ul {
    columns: 1;
  }
}


/* v3.43 landing speech fallback */
.landing-speech-replay {
  width: 100%;
}
