@import url('https://fonts.googleapis.com/css2?family=DM+Sans:wght@400;500;600;700&family=Playfair+Display:ital,wght@0,500;0,600;0,700;1,500;1,600&display=swap');
:root{--paper:#eee9dc;--paper2:#e7e0d1;--ink:#282c24;--muted:#77796d;--olive:#46533e;--olive2:#657257;--saffron:#b78343;--line:rgba(73,74,58,.14);--shadow:12px 12px 28px rgba(120,108,84,.14),-10px -10px 26px rgba(255,255,248,.72)}
*{box-sizing:border-box}html{scroll-behavior:smooth}body{margin:0;background:var(--paper);color:var(--ink);font-family:'DM Sans',sans-serif;overflow-x:hidden}a{color:inherit;text-decoration:none}.ambient{position:absolute;pointer-events:none;border-radius:50%;filter:blur(2px);opacity:.42}.ambient-one{width:380px;height:380px;right:-170px;top:120px;background:radial-gradient(circle,#d6c7a9 0,transparent 70%)}.ambient-two{width:300px;height:300px;left:-180px;top:700px;background:radial-gradient(circle,#d4cbb6 0,transparent 70%)}.topbar{height:82px;max-width:1240px;margin:auto;padding:0 42px;display:flex;align-items:center;justify-content:space-between;border-bottom:1px solid var(--line);position:relative;z-index:2}.brand{display:flex;align-items:center;gap:11px;font-weight:700;letter-spacing:-.7px;font-size:20px}.brand-light{font-weight:400;color:var(--olive2)}.brand-mark{width:27px;height:27px;border:1.5px solid var(--olive);border-radius:50%;display:flex;align-items:center;justify-content:center;gap:2px;transform:rotate(-25deg)}.brand-mark span{height:11px;width:2px;background:var(--saffron);border-radius:3px}.brand-mark span:nth-child(2){height:16px}.top-nav{display:flex;gap:34px;color:#66695e;font-size:12px}.top-nav a:hover,.text-link:hover{color:var(--saffron)}.top-cta{font-size:11px;font-weight:700;letter-spacing:.3px;padding:12px 17px;border-radius:30px;background:var(--paper);box-shadow:5px 5px 12px #d0c9ba,-5px -5px 12px #fffdf2}.top-cta span{color:var(--saffron);margin-left:7px}.hero{max-width:1240px;margin:auto;padding:88px 42px 105px;display:grid;grid-template-columns:1fr 1fr;align-items:center;gap:48px;position:relative}.eyebrow{font-size:9px;letter-spacing:2px;font-weight:700;color:var(--olive2);display:flex;align-items:center;gap:9px}.eyebrow-dot,.status-dot{width:7px;height:7px;border-radius:50%;background:var(--saffron);box-shadow:0 0 0 4px rgba(183,131,67,.12)}h1,h2{font-family:'Playfair Display',serif;font-weight:500;letter-spacing:-1.8px}h1{font-size:clamp(52px,6vw,78px);line-height:1.05;margin:25px 0 22px}h1 em,h2 em{color:var(--olive2);font-weight:500}.hero-description{font-size:14px;line-height:1.9;color:#717267;max-width:490px}.hero-actions{display:flex;align-items:center;gap:27px;margin-top:31px}.button{display:inline-flex;align-items:center;gap:23px;padding:16px 21px;border-radius:30px;font-size:11px;font-weight:700;letter-spacing:.3px;transition:.25s}.button-primary{background:var(--olive);color:#f7f2e7;box-shadow:7px 7px 16px rgba(63,76,54,.22),-5px -5px 14px rgba(255,255,248,.8)}.button-primary:hover{transform:translateY(-3px);box-shadow:9px 12px 20px rgba(63,76,54,.2)}.button-primary span{font-size:17px;color:#e5c18b}.text-link{font-size:11px;font-weight:700;color:var(--olive);transition:.2s}.hero-note{display:flex;align-items:center;gap:11px;margin-top:54px;color:#929083;font-size:9px;line-height:1.5}.note-line{width:27px;height:1px;background:var(--saffron)}.hero-art{position:relative;max-width:520px;width:100%;justify-self:end;perspective:1000px}.art-halo{position:absolute;inset:8% 8%;border-radius:50%;background:radial-gradient(circle,rgba(194,174,139,.33),transparent 68%);filter:blur(14px)}.art-card{position:relative;padding:22px 25px 19px;border-radius:22px;background:linear-gradient(145deg,#f3efe4,#e8e1d2);box-shadow:18px 20px 42px rgba(113,98,71,.18),-14px -14px 35px rgba(255,255,249,.8);transform:rotateY(-5deg) rotateX(2deg);border:1px solid rgba(255,255,255,.5)}.art-topline{display:flex;justify-content:space-between;color:#9a917f;font-size:8px;letter-spacing:1.5px;font-weight:700}.charkha-scene{height:315px;display:flex;align-items:center;justify-content:center;position:relative}.charkha{width:100%;height:100%;filter:drop-shadow(7px 12px 9px rgba(76,54,31,.16))}.thread{position:absolute;border:1px solid rgba(174,133,78,.35);border-radius:50%;transform:rotate(-25deg)}.thread-a{width:280px;height:80px;top:115px}.thread-b{width:320px;height:110px;top:105px;transform:rotate(28deg)}.art-caption{border-top:1px solid var(--line);padding-top:15px;display:flex;gap:11px;align-items:center;font-family:'Playfair Display',serif;font-size:13px;color:#6e695d}.caption-symbol{color:var(--saffron);font-size:17px}.workspace-section{background:#e8e2d5;padding:76px max(42px,calc((100% - 1156px)/2)) 90px;position:relative}.section-heading{display:flex;justify-content:space-between;align-items:end;margin-bottom:28px}.section-heading h2,.about-section h2{font-size:43px;line-height:1.15;margin:12px 0 0}.model-status{font-size:9px;letter-spacing:1px;color:#858575;display:flex;align-items:center;gap:9px;padding-bottom:7px}.status-dot{width:6px;height:6px;background:#9b9b78;box-shadow:0 0 0 4px rgba(155,155,120,.12)}.workspace{display:grid;grid-template-columns:260px 1fr;border-radius:20px;overflow:hidden;background:#eee9dd;box-shadow:14px 17px 38px rgba(107,96,74,.13),-10px -10px 28px rgba(255,255,248,.75);border:1px solid rgba(255,255,255,.65);min-height:490px}.workspace-aside{background:linear-gradient(155deg,#4d5a43,#35412f);color:#f2eddf;padding:31px 27px;display:flex;flex-direction:column}.aside-icon{width:39px;height:39px;border-radius:13px;background:rgba(255,255,255,.1);display:grid;place-items:center;color:#e2c18c;font-size:22px;box-shadow:inset 2px 2px 5px rgba(0,0,0,.12),2px 2px 5px rgba(255,255,255,.08)}.workspace-aside h3{font-family:'Playfair Display',serif;font-size:22px;font-weight:500;line-height:1.2;margin:22px 0 10px}.workspace-aside p{font-size:11px;line-height:1.8;color:#d0d3c6;margin:0}.aside-divider{height:1px;background:rgba(255,255,255,.16);margin:27px 0 20px}.aside-meta{display:flex;flex-direction:column;gap:5px;margin-bottom:16px}.aside-meta span{font-size:7px;letter-spacing:1.4px;color:#b8bea9}.aside-meta b{font-size:10px;font-weight:500;color:#f0eadc}.aside-foot{margin-top:auto;padding-top:20px;color:#c2c8b8;font-size:9px;line-height:1.7}.chat-panel{padding:0 25px 17px;display:flex;flex-direction:column;min-width:0}.chat-header{height:75px;border-bottom:1px solid var(--line);display:flex;align-items:center;gap:11px}.chat-avatar,.assistant-mark{width:34px;height:34px;border-radius:50%;background:linear-gradient(145deg,#f4eee0,#ded4c0);box-shadow:4px 4px 9px rgba(120,108,84,.16),-3px -3px 8px #fffdf5;display:grid;place-items:center;font-family:'Playfair Display',serif;color:var(--olive);font-size:16px}.chat-header>div:nth-child(2){display:flex;flex-direction:column;gap:3px}.chat-header b{font-size:11px}.chat-header span{font-size:9px;color:#939184}.icon-button{margin-left:auto;width:32px;height:32px;border:0;border-radius:50%;background:#eee9dd;box-shadow:4px 4px 8px #d4cebf,-4px -4px 8px #fffdf3;color:var(--olive);font-size:17px;cursor:pointer}.chat-body{flex:1;min-height:275px;padding:27px 3px 20px;overflow:auto}.welcome-message,.generated-message{display:flex;gap:13px;max-width:650px}.assistant-mark{flex:0 0 34px;background:var(--olive);color:#f4eddd;box-shadow:4px 4px 8px rgba(58,72,49,.2)}.message-content{padding:15px 17px;border-radius:4px 14px 14px 14px;background:#eee9dd;box-shadow:inset 3px 3px 8px rgba(135,122,97,.12),inset -3px -3px 8px rgba(255,255,250,.8);max-width:100%}.message-label{font-size:8px;letter-spacing:1.3px;font-weight:700;color:var(--olive2);margin-bottom:8px}.message-content p{font-size:11px;line-height:1.8;color:#66675c;margin:0;white-space:pre-wrap;overflow-wrap:anywhere}.suggestion-row{display:flex;gap:8px;flex-wrap:wrap;margin-top:15px}.suggestion{border:1px solid rgba(87,98,73,.2);background:rgba(255,255,255,.28);border-radius:20px;padding:8px 11px;color:var(--olive);font:500 9px 'DM Sans',sans-serif;cursor:pointer}.suggestion:hover{background:#e2dccd}.composer{display:flex;align-items:center;gap:12px;background:#eee9dd;border-radius:15px;padding:10px 11px 10px 17px;box-shadow:inset 5px 5px 11px rgba(132,119,95,.15),inset -5px -5px 11px rgba(255,255,250,.8)}.composer textarea{resize:none;outline:none;border:0;background:transparent;flex:1;min-width:0;color:var(--ink);font:11px/1.6 'DM Sans',sans-serif;max-height:100px}.composer textarea::placeholder{color:#a09c8e}.send-button{border:0;border-radius:11px;background:var(--olive);color:#f4eddf;padding:11px 13px;display:flex;gap:12px;align-items:center;font:600 9px 'DM Sans',sans-serif;cursor:pointer;box-shadow:4px 5px 9px rgba(53,66,46,.2),inset 1px 1px 2px rgba(255,255,255,.18)}.send-button {display: block;  margin-left: 0; margin-right: auto;}.send-button b {  font-size: 14px;  color: #e2bd83;}.send-button:hover {  background: #59694e;}.composer-foot{display:flex;justify-content:space-between;padding:9px 4px 12px;color:#a09c8e;font-size:8px}.backend-notice{border-top:1px solid var(--line);padding-top:12px;color:#898575;font-size:9px;line-height:1.6}.backend-notice span{color:var(--saffron);margin-right:5px}.user-message{display:flex;justify-content:flex-end;margin:15px 0}.user-message p{max-width:78%;background:#dfe3d5;padding:12px 15px;border-radius:14px 4px 14px 14px;font-size:11px;line-height:1.7;color:#4b5544;overflow-wrap:anywhere}.about-section{max-width:1156px;margin:auto;padding:95px 0;display:grid;grid-template-columns:1fr 1fr;gap:70px}.about-copy>p{font-size:13px;line-height:1.9;color:#737367;margin:0 0 30px}.stat-grid{display:grid;grid-template-columns:repeat(3,1fr);gap:12px;margin-bottom:30px}.stat{padding:16px 13px;border-radius:13px;background:var(--paper);box-shadow:6px 6px 13px rgba(120,108,84,.13),-5px -5px 12px #fffdf4;display:flex;flex-direction:column;gap:6px}.stat b{font-family:'Playfair Display',serif;font-size:22px;color:var(--olive)}.stat span{font-size:8px;color:#898778}.footer{border-top:1px solid var(--line);max-width:1240px;margin:auto;padding:25px 42px;display:flex;align-items:center;justify-content:space-between;color:#918d80;font-size:9px}.footer-brand{font-size:16px;color:var(--ink)}.footer-brand .brand-mark{width:22px;height:22px}.footer>a:last-child{color:var(--olive);font-weight:700}.sr-only{position:absolute;width:1px;height:1px;padding:0;margin:-1px;overflow:hidden;clip:rect(0,0,0,0);white-space:nowrap;border:0}
@media(max-width:850px){.hero{gap:20px;padding-top:65px}.hero-art{max-width:420px}.charkha-scene{height:270px}.workspace{grid-template-columns:220px 1fr}.workspace-aside{padding:25px 20px}.about-section{padding:75px 42px;gap:35px}}@media(max-width:650px){.topbar{height:68px;padding:0 20px}.top-nav{display:none}.top-cta{font-size:9px;padding:10px 12px}.hero{grid-template-columns:1fr;padding:58px 23px 70px;gap:43px}.hero-art{justify-self:center;max-width:470px}.hero-note{margin-top:34px}.charkha-scene{height:260px}.workspace-section{padding:58px 17px 65px}.section-heading{align-items:start;gap:15px;flex-direction:column}.section-heading h2,.about-section h2{font-size:36px}.workspace{grid-template-columns:1fr}.workspace-aside{padding:20px 22px}.workspace-aside h3{margin-top:14px}.workspace-aside p{max-width:450px}.aside-divider,.aside-meta,.aside-foot{display:none}.chat-panel{padding:0 14px 14px}.chat-body{min-height:250px}.about-section{grid-template-columns:1fr;padding:65px 24px;gap:22px}.footer{padding:22px 20px;gap:15px;flex-wrap:wrap}.footer>span{order:3;width:100%}.floating-seal{right:-5px;bottom:40px;width:75px;height:75px}.art-card{padding:18px}.stat-grid{gap:8px}.stat{padding:13px 9px}.stat b{font-size:19px}}@media(prefers-reduced-motion:reduce){html{scroll-behavior:auto}*,*::before,*::after{transition:none!important;animation:none!important}}



/* ========================================
   GANDHIGPT - THEME TOGGLE
========================================= */

.theme-toggle {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  padding: 10px 14px;
  border: 1px solid var(--line);
  border-radius: 25px;
  background: var(--paper);
  color: var(--ink);
  box-shadow: 4px 4px 10px rgba(120,108,84,.12),
              -4px -4px 10px rgba(255,255,248,.7);
  font: 600 10px 'DM Sans', sans-serif;
  cursor: pointer;
  transition: .25s;
}

.theme-toggle:hover {
  transform: translateY(-2px);
}

#themeIcon {
  font-size: 16px;
  color: var(--saffron);
}


/* =========================================
   ABOUT SECTION
========================================= */

.about-description {
  font-size: 13px;
  line-height: 1.9;
  color: var(--muted);
  margin-top: 24px;
  max-width: 480px;
}

.training-results {
  padding: 20px;
  margin: 0 0 25px;
  border-radius: 15px;
  background: var(--paper);
  box-shadow: var(--shadow);
}

.loss-row,
.training-fact {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 13px 0;
  border-bottom: 1px solid var(--line);
  color: var(--muted);
  font-size: 11px;
}

.loss-row strong,
.training-fact strong {
  color: var(--olive2);
  font-size: 14px;
}

.small-note {
  font-size: 10px;
  line-height: 1.7;
  color: var(--muted);
  margin: 12px 0 0;
}


/* =========================================
   ARCHITECTURE AND TRAINING SECTIONS
========================================= */

.details-section {
  max-width: 1156px;
  margin: auto;
  padding: 65px 0;
}

.details-section h2,
.limitations-section h2 {
  font-family: 'Playfair Display', serif;
  font-size: 43px;
  font-weight: 500;
  letter-spacing: -1.5px;
  margin: 14px 0;
}

.details-section h2 em,
.limitations-section h2 em {
  color: var(--olive2);
}

.details-intro {
  color: var(--muted);
  font-size: 13px;
  line-height: 1.8;
  max-width: 570px;
  margin-bottom: 30px;
}

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

.detail-card,
.training-card {
  padding: 25px 21px;
  border-radius: 17px;
  background: var(--paper);
  border: 1px solid var(--line);
  box-shadow: var(--shadow);
}

.detail-number {
  color: var(--saffron);
  font-family: 'Playfair Display', serif;
  font-size: 26px;
  margin-bottom: 25px;
}

.detail-card h3,
.training-card h3 {
  font-family: 'Playfair Display', serif;
  font-size: 19px;
  font-weight: 500;
  color: var(--ink);
  margin: 0 0 12px;
}

.detail-card p,
.training-card p {
  color: var(--muted);
  font-size: 11px;
  line-height: 1.9;
}

.training-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 20px;
  margin-top: 30px;
}

.training-card {
  padding: 30px;
}

.training-card .text-link {
  display: inline-block;
  margin-top: 15px;
}

.training-fact {
  margin-top: 8px;
}


/* =========================================
   LIMITATIONS
========================================= */

.limitations-section {
  max-width: 1156px;
  margin: 40px auto 90px;
  padding: 40px;
  border-radius: 20px;
  background: var(--paper);
  box-shadow: var(--shadow);
  border: 1px solid var(--line);
}

.limitations-section p {
  color: var(--muted);
  font-size: 12px;
  line-height: 1.9;
  max-width: 850px;
}


/* =========================================
   DARK MODE
========================================= */

body[data-theme="dark"] {
  --paper: #20251f;
  --paper2: #292e26;
  --ink: #eee9dc;
  --muted: #b0b2a4;
  --olive: #a4b092;
  --olive2: #c0c9a9;
  --saffron: #d4a765;
  --line: rgba(230,230,210,.13);
  --shadow: 8px 8px 20px rgba(0,0,0,.3),
            -6px -6px 18px rgba(255,255,255,.025);

  background: var(--paper);
  color: var(--ink);
}

body[data-theme="dark"] .topbar,
body[data-theme="dark"] .footer {
  border-color: var(--line);
}

body[data-theme="dark"] .top-nav {
  color: var(--muted);
}

body[data-theme="dark"] .top-cta,
body[data-theme="dark"] .theme-toggle {
  background: var(--paper);
  color: var(--ink);
  box-shadow: var(--shadow);
}

body[data-theme="dark"] .workspace-section {
  background: #191e19;
}

body[data-theme="dark"] .workspace {
  background: #252b24;
  border-color: var(--line);
  box-shadow: var(--shadow);
}

body[data-theme="dark"] .chat-panel,
body[data-theme="dark"] .message-content,
body[data-theme="dark"] .composer,
body[data-theme="dark"] .icon-button,
body[data-theme="dark"] .stat,
body[data-theme="dark"] .training-results,
body[data-theme="dark"] .detail-card,
body[data-theme="dark"] .training-card,
body[data-theme="dark"] .limitations-section {
  background: #252b24;
  color: var(--ink);
  border-color: var(--line);
  box-shadow: var(--shadow);
}

body[data-theme="dark"] .hero-description,
body[data-theme="dark"] .about-copy > p,
body[data-theme="dark"] .about-description,
body[data-theme="dark"] .message-content p,
body[data-theme="dark"] .detail-card p,
body[data-theme="dark"] .training-card p,
body[data-theme="dark"] .limitations-section p {
  color: var(--muted);
}

body[data-theme="dark"] .composer textarea {
  color: var(--ink);
}

body[data-theme="dark"] .composer textarea::placeholder {
  color: #858b7d;
}

body[data-theme="dark"] .user-message p {
  background: #394434;
  color: #f0eddf;
}

body[data-theme="dark"] .suggestion {
  background: #30372e;
  color: var(--ink);
  border-color: var(--line);
}

body[data-theme="dark"] .suggestion:hover {
  background: #3a4435;
}

body[data-theme="dark"] .art-card {
  background: linear-gradient(145deg, #30372e, #252b24);
  border-color: var(--line);
  box-shadow: var(--shadow);
}

body[data-theme="dark"] .art-caption {
  color: var(--muted);
}

body[data-theme="dark"] .stat b,
body[data-theme="dark"] .loss-row strong,
body[data-theme="dark"] .training-fact strong {
  color: var(--olive2);
}

body[data-theme="dark"] .stat span,
body[data-theme="dark"] .small-note,
body[data-theme="dark"] .loss-row,
body[data-theme="dark"] .training-fact {
  color: var(--muted);
}

body[data-theme="dark"] .ambient {
  opacity: .12;
}


/* =========================================
   RESPONSIVE DESIGN
========================================= */

@media (max-width: 850px) {
  .details-section {
    padding: 55px 42px;
  }

  .limitations-section {
    margin: 30px 42px 70px;
  }

  .architecture-grid {
    grid-template-columns: repeat(2, 1fr);
  }

  .topbar {
    gap: 12px;
  }
}

@media (max-width: 650px) {
  .theme-toggle {
    padding: 9px 11px;
    font-size: 9px;
  }

  .theme-toggle #themeText {
    display: none;
  }

  .details-section {
    padding: 50px 23px;
  }

  .details-section h2,
  .limitations-section h2 {
    font-size: 36px;
  }

  .architecture-grid,
  .training-grid {
    grid-template-columns: 1fr;
  }

  .limitations-section {
    margin: 20px 17px 60px;
    padding: 25px;
  }
}

body,
.workspace-section,
.workspace,
.detail-card,
.training-card,
.limitations-section {
  transition: background .3s ease, color .3s ease,
              border-color .3s ease, box-shadow .3s ease;
}



/* =========================================
   GANDHIGPT — SMOOTH SCROLLING
========================================= */

/* Smooth scrolling between sections */
html {
  scroll-behavior: smooth;
  scroll-padding-top: 90px;
}

/* Prevent horizontal overflow during animations */
body {
  overflow-x: hidden;
}

/* Elements that animate into view */
.reveal {
  opacity: 0;
  transform: translateY(35px);
  transition:
    opacity 0.9s cubic-bezier(0.22, 1, 0.36, 1),
    transform 0.9s cubic-bezier(0.22, 1, 0.36, 1);
  will-change: opacity, transform;
}

/* Visible state */
.reveal.visible {
  opacity: 1;
  transform: translateY(0);
}

/* Slightly staggered animation delays */
.reveal-delay-1 {
  transition-delay: 0.12s;
}

.reveal-delay-2 {
  transition-delay: 0.24s;
}

.reveal-delay-3 {
  transition-delay: 0.36s;
}

/* Respect accessibility preferences */
@media (prefers-reduced-motion: reduce) {
  html {
    scroll-behavior: auto;
  }

  .reveal,
  .reveal.visible {
    opacity: 1;
    transform: none;
    transition: none;
  }
}


/* =========================================
   GANDHIGPT — SUBTLE 3D PARALLAX
========================================= */


/* GANDHIGPT — 3D PARALLAX FIX */

.hero-art {
  transform: translate3d(
    var(--parallax-x, 0px),
    var(--parallax-y, 0px),
    0
  );
  will-change: transform;
}

.art-card {
  transform:
    translate3d(
      var(--card-x, 0px),
      var(--card-y, 0px),
      0
    )
    rotateY(calc(-5deg + var(--rotate-y, 0deg)))
    rotateX(calc(2deg + var(--rotate-x, 0deg)));

  transform-style: preserve-3d;
  will-change: transform;
}

.floating-seal {
  transform:
    translate3d(
      var(--seal-x, 0px),
      var(--seal-y, 0px),
      0
    )
    rotate(9deg);
  will-change: transform;
}

.ambient-one,
.ambient-two {
  will-change: transform;
}

.ambient-one {
  transform: translate3d(
    var(--ambient-x, 0px),
    var(--ambient-y, 0px),
    0
  );
}

.ambient-two {
  transform: translate3d(
    var(--ambient-two-x, 0px),
    var(--ambient-two-y, 0px),
    0
  );
}

@media (max-width: 650px) {
  .hero-art {
    transform: translate3d(0, var(--parallax-y, 0px), 0);
  }

  .art-card {
    transform: rotateY(-2deg) rotateX(1deg);
  }
}

@media (prefers-reduced-motion: reduce) {
  .hero-art,
  .art-card,
  .floating-seal,
  .ambient-one,
  .ambient-two {
    transform: none !important;
    will-change: auto;
  }
}

/* ========================================
   GANDHIGPT — MOBILE NAVIGATION
======================================== */

/* Hidden on desktop */
.mobile-menu-toggle {
  display: none;
  width: 40px;
  height: 40px;
  padding: 9px;
  border: 1px solid var(--line);
  border-radius: 10px;
  background: var(--paper);
  box-shadow: var(--shadow);
  cursor: pointer;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 5px;
  flex-shrink: 0;
}

.mobile-menu-toggle span {
  display: block;
  width: 19px;
  height: 2px;
  border-radius: 3px;
  background: var(--olive);
  transition: transform .25s ease, opacity .2s ease;
}

/* Hamburger transforms into a cross */
.mobile-menu-toggle.active span:nth-child(1) {
  transform: translateY(7px) rotate(45deg);
}

.mobile-menu-toggle.active span:nth-child(2) {
  opacity: 0;
}

.mobile-menu-toggle.active span:nth-child(3) {
  transform: translateY(-7px) rotate(-45deg);
}

/* Mobile layout */
@media (max-width: 650px) {
  .topbar {
    position: relative;
    z-index: 20;
    gap: 10px;
  }

  .mobile-menu-toggle {
    display: flex;
    margin-left: auto;
  }

  /* Closed menu */
  .top-nav {
    display: none;
  }

  /* Open dropdown menu */
  .top-nav.mobile-menu-open {
    display: flex;
    position: absolute;
    top: 100%;
    left: 0;
    right: 0;
    z-index: 30;

    flex-direction: column;
    align-items: stretch;
    gap: 0;

    padding: 10px 22px 15px;
    background: var(--paper);
    border-bottom: 1px solid var(--line);
    box-shadow: 0 12px 20px rgba(0, 0, 0, .12);
  }

  .top-nav.mobile-menu-open a {
    display: block;
    padding: 14px 4px;
    border-bottom: 1px solid var(--line);
    color: var(--ink);
    font-size: 13px;
  }

  .top-nav.mobile-menu-open a:last-child {
    border-bottom: none;
  }

  .top-nav.mobile-menu-open a:hover {
    color: var(--saffron);
  }

  .top-cta {
    white-space: nowrap;
  }
}

/* Accessibility: reduced motion */
@media (prefers-reduced-motion: reduce) {
  .mobile-menu-toggle span {
    transition: none;
  }
}

/* Prompt character counter */
.prompt-input-wrapper {
    position: relative;
}

.character-counter {
    display: flex;
    justify-content: flex-end;
    padding: 4px 8px 0;
    font-size: 11px;
    color: var(--text-muted, #888);
    opacity: 0.75;
    pointer-events: none;
    transition: color 0.2s ease;
}

#charCount {
    font-variant-numeric: tabular-nums;
}
