:root {
  color-scheme: dark;
  --bg: #07090d;
  --surface: rgba(17, 20, 27, 0.86);
  --surface-2: #121720;
  --surface-3: #171d27;
  --border: rgba(255,255,255,.09);
  --border-strong: rgba(255,255,255,.16);
  --text: #f4f6fb;
  --muted: #9ca6b7;
  --muted-2: #6f7888;
  --accent: #b8ff54;
  --accent-2: #7cffbf;
  --danger: #ff6b7a;
  --warning: #ffd866;
  --shadow: 0 24px 80px rgba(0,0,0,.38);
  --radius: 20px;
  --radius-sm: 13px;
}

* { box-sizing: border-box; }
html { min-height: 100%; background: var(--bg); }
body {
  margin: 0;
  min-height: 100vh;
  background:
    radial-gradient(circle at 50% -20%, rgba(184,255,84,.08), transparent 34%),
    var(--bg);
  color: var(--text);
  font-family: Inter, ui-sans-serif, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
  line-height: 1.5;
}
a { color: inherit; text-decoration: none; }
button, input, textarea, select { font: inherit; }
button { color: inherit; }
.ambient { position: fixed; pointer-events: none; border-radius: 999px; filter: blur(100px); opacity: .16; z-index: -1; }
.ambient-one { width: 360px; height: 360px; background: #9eff54; top: -150px; right: 8%; }
.ambient-two { width: 280px; height: 280px; background: #4ad9ff; bottom: 5%; left: -140px; opacity: .07; }

.brand { display: inline-flex; align-items: center; gap: 11px; }
.brand-mark {
  width: 38px; height: 38px; border-radius: 12px;
  display: grid; place-items: center;
  color: #081006; background: linear-gradient(145deg, var(--accent), var(--accent-2));
  font-weight: 900; box-shadow: 0 8px 28px rgba(184,255,84,.16);
}
.brand strong { display: block; font-size: 16px; letter-spacing: -.02em; }
.brand small { display: block; color: var(--muted-2); font-size: 11px; margin-top: -2px; }

.button {
  border: 1px solid var(--border);
  background: transparent;
  color: var(--text);
  min-height: 40px;
  border-radius: 12px;
  padding: 9px 15px;
  display: inline-flex; align-items: center; justify-content: center; gap: 8px;
  cursor: pointer;
  transition: .18s ease;
  font-weight: 650;
}
.button:hover { transform: translateY(-1px); border-color: var(--border-strong); }
.button.primary { color: #071006; border-color: transparent; background: linear-gradient(145deg, var(--accent), #95f542); }
.button.subtle { background: var(--surface-3); }
.button.ghost { background: rgba(255,255,255,.025); }
.button.glass { background: rgba(255,255,255,.055); backdrop-filter: blur(16px); }
.button.danger { color: #ff9ca6; border-color: rgba(255,107,122,.22); background: rgba(255,107,122,.06); }
.button.large { min-height: 50px; padding: 13px 20px; border-radius: 14px; }
.button.full { width: 100%; }

.app-shell { min-height: 100vh; display: grid; grid-template-columns: 250px minmax(0,1fr); }
.sidebar {
  height: 100vh; position: sticky; top: 0;
  padding: 24px 18px;
  border-right: 1px solid var(--border);
  background: rgba(9,11,16,.76); backdrop-filter: blur(24px);
  display: flex; flex-direction: column; z-index: 20;
}
.sidebar .brand { padding: 0 9px 24px; }
.nav { display: grid; gap: 5px; }
.nav-item {
  min-height: 43px; padding: 9px 11px; border-radius: 11px;
  color: var(--muted); display: flex; align-items: center; gap: 11px;
  font-weight: 600; font-size: 14px; transition: .16s ease;
}
.nav-item:hover { color: var(--text); background: rgba(255,255,255,.045); }
.nav-item.active { color: var(--text); background: rgba(184,255,84,.08); border: 1px solid rgba(184,255,84,.10); }
.nav-item.active span:first-child { color: var(--accent); }
.sidebar-bottom { margin-top: auto; display: grid; gap: 10px; }
.account-chip { display: flex; align-items: center; gap: 10px; padding: 11px; border: 1px solid var(--border); border-radius: 14px; background: rgba(255,255,255,.025); }
.avatar { width: 34px; height: 34px; flex: 0 0 auto; border-radius: 50%; background: #232a36; display: grid; place-items: center; font-weight: 800; }
.account-copy { min-width: 0; }
.account-copy strong, .account-copy small { display: block; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.account-copy strong { font-size: 13px; }
.account-copy small { font-size: 11px; color: var(--muted-2); }

.main-shell { min-width: 0; }
.topbar {
  height: 66px; position: sticky; top: 0; z-index: 12;
  display: flex; align-items: center; justify-content: space-between; gap: 16px;
  padding: 0 30px;
  border-bottom: 1px solid var(--border);
  background: rgba(7,9,13,.74); backdrop-filter: blur(20px);
}
.topbar-title { display: flex; align-items: center; gap: 8px; color: var(--muted); font-size: 13px; }
.status-dot, .online-dot { width: 8px; height: 8px; border-radius: 50%; background: var(--accent); box-shadow: 0 0 14px rgba(184,255,84,.65); }
.topbar-actions { display: flex; gap: 8px; }
.mobile-menu { display: none; }

.page { width: min(1260px, calc(100% - 54px)); margin: 0 auto; padding: 38px 0 70px; }
.page-heading { display: flex; align-items: flex-end; justify-content: space-between; gap: 24px; margin-bottom: 28px; }
.page-heading h1, .chat-header h1 { font-size: clamp(28px, 4vw, 44px); line-height: 1.04; letter-spacing: -.045em; margin: 6px 0 8px; }
.page-heading p, .chat-header p { color: var(--muted); margin: 0; max-width: 720px; }
.eyebrow { color: var(--accent); letter-spacing: .16em; font-size: 10px; font-weight: 800; }

.panel {
  background: linear-gradient(180deg, rgba(20,24,32,.90), rgba(14,17,23,.88));
  border: 1px solid var(--border);
  border-radius: var(--radius);
  box-shadow: 0 14px 48px rgba(0,0,0,.14);
  padding: 22px;
}
.panel-header { display: flex; align-items: flex-start; justify-content: space-between; gap: 18px; margin-bottom: 18px; }
.panel-header h2 { margin: 2px 0 2px; font-size: 18px; letter-spacing: -.02em; }
.panel-header p { margin: 0; color: var(--muted); font-size: 13px; }
.panel-header > a { color: var(--accent); font-size: 13px; }

.stats-grid { display: grid; grid-template-columns: repeat(4,1fr); gap: 14px; margin-bottom: 14px; }
.stat-card { min-height: 132px; padding: 18px; border: 1px solid var(--border); border-radius: 17px; background: rgba(255,255,255,.028); }
.stat-card small, .stat-card span { color: var(--muted); display: block; }
.stat-card strong { display: block; margin: 8px 0 3px; font-size: 34px; letter-spacing: -.04em; }
.stat-card span { font-size: 12px; }

.dashboard-grid { display: grid; grid-template-columns: repeat(2,minmax(0,1fr)); gap: 14px; }
.span-two { grid-column: span 2; }
.quick-grid { display: grid; grid-template-columns: repeat(4,minmax(0,1fr)); gap: 10px; }
.quick-action { display: flex; align-items: flex-start; gap: 12px; min-height: 102px; padding: 16px; border: 1px solid var(--border); border-radius: 15px; background: rgba(255,255,255,.025); }
.quick-action:hover { border-color: rgba(184,255,84,.26); background: rgba(184,255,84,.04); }
.quick-action > span { color: var(--accent); font-size: 20px; }
.quick-action strong, .quick-action small { display: block; }
.quick-action small { color: var(--muted); margin-top: 4px; line-height: 1.4; }
.mini-list { display: grid; gap: 11px; }
.mini-item-top { display: flex; justify-content: space-between; gap: 12px; font-size: 13px; }
.progress { height: 5px; border-radius: 999px; background: #262c35; overflow: hidden; margin-top: 7px; }
.progress.large { height: 7px; margin: 18px 0; }
.progress span { display: block; height: 100%; border-radius: inherit; background: linear-gradient(90deg, var(--accent), var(--accent-2)); }
.memory-row { padding: 10px 0; border-bottom: 1px solid var(--border); }
.memory-row:last-child { border: 0; }
.memory-row span { color: var(--accent); font-size: 10px; text-transform: uppercase; letter-spacing: .08em; }
.memory-row p { margin: 3px 0 0; font-size: 13px; color: #d6dbe5; }
.reminder-row { display: flex; gap: 11px; align-items: center; }
.reminder-row > span { color: var(--accent); }
.reminder-row strong, .reminder-row small { display: block; }
.reminder-row strong { font-size: 13px; }
.reminder-row small { color: var(--muted); }

input, textarea, select {
  width: 100%;
  color: var(--text);
  background: #0d1118;
  border: 1px solid var(--border);
  border-radius: 12px;
  padding: 11px 12px;
  outline: none;
  transition: .16s ease;
}
input:focus, textarea:focus, select:focus { border-color: rgba(184,255,84,.48); box-shadow: 0 0 0 3px rgba(184,255,84,.07); }
textarea { resize: vertical; }
label { display: grid; gap: 7px; color: #c9d0db; font-size: 12px; font-weight: 650; }
.form-stack { display: grid; gap: 14px; }
.form-grid { display: grid; gap: 14px; }
.form-grid.two { grid-template-columns: repeat(2,minmax(0,1fr)); }
.inline-form { display: flex; align-items: flex-end; gap: 12px; }
.grow { flex: 1; min-width: 0; }
.check-row { display: flex; align-items: flex-start; gap: 10px; color: var(--muted); font-weight: 450; line-height: 1.45; }
.check-row input { width: auto; margin-top: 3px; }
.muted-text { color: var(--muted-2); font-weight: 400; }

.chat-page { width: min(1040px, 100%); margin: 0 auto; }
.chat-header { display: flex; align-items: flex-end; justify-content: space-between; gap: 18px; margin-bottom: 20px; }
.chat-card { border: 1px solid var(--border); border-radius: 24px; background: rgba(12,15,21,.90); box-shadow: var(--shadow); overflow: hidden; }
.chat-thread { height: min(65vh, 690px); min-height: 440px; overflow-y: auto; padding: 28px 26px; scroll-behavior: smooth; }
.chat-empty { height: 100%; min-height: 390px; display: flex; flex-direction: column; justify-content: center; align-items: center; text-align: center; }
.chat-empty .orb { width: 64px; height: 64px; border-radius: 21px; display: grid; place-items: center; background: radial-gradient(circle at 30% 20%, #dcff9c, var(--accent)); color: #071006; font-size: 26px; font-weight: 900; box-shadow: 0 20px 50px rgba(184,255,84,.15); }
.chat-empty h2 { margin: 16px 0 3px; font-size: 24px; letter-spacing: -.03em; }
.chat-empty p { color: var(--muted); }
.suggestion-grid { display: grid; grid-template-columns: repeat(2,minmax(0,1fr)); gap: 8px; width: min(560px,100%); }
.suggestion-grid button { border: 1px solid var(--border); border-radius: 13px; background: rgba(255,255,255,.025); color: #cfd5df; padding: 12px; cursor: pointer; }
.suggestion-grid button:hover { border-color: rgba(184,255,84,.25); }
.message-row { display: flex; gap: 11px; margin: 18px 0; max-width: 86%; }
.message-row.user { margin-left: auto; flex-direction: row-reverse; }
.message-avatar { width: 32px; height: 32px; flex: 0 0 auto; border-radius: 10px; display: grid; place-items: center; background: #232a35; font-size: 12px; font-weight: 800; }
.message-row.assistant .message-avatar { color: #071006; background: var(--accent); }
.message-bubble { border: 1px solid var(--border); border-radius: 15px; background: #131821; padding: 11px 14px; min-width: 0; }
.message-row.user .message-bubble { background: #202630; }
.message-content { white-space: pre-wrap; overflow-wrap: anywhere; }
.message-kind { display: block; color: var(--accent); text-transform: uppercase; letter-spacing: .08em; font-size: 9px; margin-bottom: 4px; }
.typing-indicator { display: flex; align-items: center; gap: 5px; padding: 0 26px 10px; color: var(--muted); }
.typing-indicator span { width: 6px; height: 6px; border-radius: 50%; background: var(--muted); animation: bounce 1s infinite alternate; }
.typing-indicator span:nth-child(2){animation-delay:.15s}.typing-indicator span:nth-child(3){animation-delay:.3s}
.typing-indicator small { margin-left: 6px; }
@keyframes bounce { to { transform: translateY(-4px); opacity: .45; } }
.composer { margin: 0 18px 12px; border: 1px solid var(--border-strong); border-radius: 18px; background: #11161e; display: flex; align-items: flex-end; gap: 8px; padding: 9px; }
.composer textarea { min-height: 42px; max-height: 170px; resize: none; border: 0; background: transparent; padding: 10px 6px; box-shadow: none; }
.composer-icon, .send-button, .icon-button { border: 0; cursor: pointer; }
.composer-icon { width: 40px; height: 40px; border-radius: 12px; background: transparent; color: var(--muted); }
.composer-icon:hover { background: rgba(255,255,255,.05); color: var(--text); }
.send-button { width: 40px; height: 40px; border-radius: 12px; background: var(--accent); color: #071006; font-size: 20px; font-weight: 900; }
.composer-meta { min-height: 30px; padding: 0 22px 12px; display: flex; justify-content: space-between; gap: 12px; color: var(--muted-2); font-size: 10px; }

.device-grid { display: grid; grid-template-columns: repeat(3,minmax(0,1fr)); gap: 14px; margin-top: 14px; }
.device-card { padding: 20px; border-radius: var(--radius); border: 1px solid var(--border); background: rgba(255,255,255,.026); }
.device-card-top { display: flex; justify-content: space-between; align-items: center; }
.device-icon { width: 43px; height: 43px; border-radius: 14px; background: #181e27; display: grid; place-items: center; color: var(--accent); }
.device-status { display: flex; align-items: center; gap: 6px; color: var(--muted); text-transform: capitalize; font-size: 11px; }
.device-status i { width: 7px; height: 7px; border-radius: 50%; background: #6e7683; }
.device-status.online i { background: var(--accent); box-shadow: 0 0 10px rgba(184,255,84,.5); }
.device-card h2 { margin: 19px 0 2px; font-size: 18px; }
.device-card p, .device-card small { color: var(--muted); margin: 0; }
.device-card small { display: block; margin-top: 6px; font-size: 11px; }
.device-actions { display: grid; gap: 8px; margin-top: 20px; }
.rename-form { display: flex; gap: 8px; }
.rename-form input { min-width: 0; }

.pair-shell { display: grid; place-items: center; min-height: calc(100vh - 170px); }
.pair-card { width: min(560px,100%); text-align: center; padding: 32px; border: 1px solid var(--border); border-radius: 26px; background: var(--surface); box-shadow: var(--shadow); }
.pair-card h1 { margin: 8px 0 5px; }
.pair-card > p { color: var(--muted); }
.pair-code { display: flex; justify-content: center; gap: 8px; margin: 28px 0; }
.pair-code span { width: 54px; height: 68px; display: grid; place-items: center; border: 1px solid rgba(184,255,84,.18); border-radius: 14px; background: rgba(184,255,84,.055); font-size: 28px; font-weight: 850; }
.security-note { padding: 15px; border-radius: 14px; background: rgba(255,255,255,.03); margin-bottom: 18px; }
.security-note p { margin: 4px 0 0; color: var(--muted); font-size: 12px; }

.cards-stack { display: grid; gap: 12px; margin-top: 14px; }
.goal-title-row { display: flex; justify-content: space-between; gap: 20px; }
.goal-title-row h2 { margin: 8px 0 3px; }
.goal-title-row p, .goal-title-row small { color: var(--muted); }
.goal-title-row p { margin: 0 0 4px; }
.goal-percent { font-size: 27px; letter-spacing: -.04em; }
.status-pill { display: inline-flex; border-radius: 999px; padding: 4px 8px; background: rgba(255,255,255,.06); color: var(--muted); font-size: 10px; text-transform: uppercase; letter-spacing: .07em; }
.status-pill.active, .status-pill.pending { color: var(--accent); background: rgba(184,255,84,.07); }
.status-pill.completed { color: var(--accent-2); }
.status-pill.paused { color: var(--warning); }
.goal-controls { display: flex; align-items: flex-end; gap: 10px; }
.goal-controls output { color: var(--accent); min-width: 44px; text-align: right; }
.goal-controls select { width: auto; }

.memory-form-grid { grid-template-columns: 190px minmax(0,1fr); }
.memory-grid { display: grid; grid-template-columns: repeat(3,minmax(0,1fr)); gap: 12px; margin-top: 14px; }
.memory-card { min-height: 165px; padding: 18px; border: 1px solid var(--border); border-radius: 17px; background: rgba(255,255,255,.024); display: flex; flex-direction: column; }
.memory-card-top { display: flex; justify-content: space-between; color: var(--accent); text-transform: uppercase; letter-spacing: .08em; font-size: 10px; }
.memory-card p { color: #d6dbe5; }
.memory-card form { margin-top: auto; }
.text-danger { border: 0; background: transparent; padding: 0; color: #ff929e; cursor: pointer; }

.reminder-card { display: flex; align-items: center; gap: 14px; border: 1px solid var(--border); border-radius: 17px; padding: 16px 18px; background: rgba(255,255,255,.024); }
.reminder-icon { width: 40px; height: 40px; flex: 0 0 auto; border-radius: 13px; display: grid; place-items: center; background: rgba(184,255,84,.07); color: var(--accent); }
.reminder-card h2 { margin: 0; font-size: 15px; }
.reminder-card p { margin: 2px 0 0; color: var(--muted); font-size: 12px; }

.settings-grid { display: grid; gap: 14px; }
.style-options { display: grid; grid-template-columns: repeat(5,minmax(0,1fr)); gap: 8px; }
.style-card { display: block; cursor: pointer; }
.style-card input { position: absolute; opacity: 0; pointer-events: none; }
.style-card span { min-height: 92px; display: flex; flex-direction: column; justify-content: center; gap: 4px; border: 1px solid var(--border); border-radius: 14px; padding: 12px; background: rgba(255,255,255,.02); }
.style-card small { color: var(--muted); }
.style-card input:checked + span { border-color: rgba(184,255,84,.38); background: rgba(184,255,84,.06); }
.settings-save { display: flex; justify-content: flex-end; }

.empty-state { text-align: center; color: var(--muted); padding: 20px; }
.empty-state.large { min-height: 210px; display: flex; flex-direction: column; align-items: center; justify-content: center; }
.empty-state > span { color: var(--accent); font-size: 24px; }
.empty-state h2 { color: var(--text); margin: 8px 0 1px; }
.empty-state p { margin: 4px 0; }
.empty-state a { color: var(--accent); }

.flash-stack { display: grid; gap: 8px; margin-bottom: 15px; }
.flash { padding: 11px 13px; border-radius: 12px; border: 1px solid var(--border); background: var(--surface-2); font-size: 13px; }
.flash.error { color: #ffabb4; border-color: rgba(255,107,122,.2); }
.flash.success { color: #cfff96; border-color: rgba(184,255,84,.2); }

.public-shell { width: min(1240px, calc(100% - 42px)); margin: 0 auto; }
.public-nav { height: 78px; display: flex; align-items: center; justify-content: space-between; gap: 20px; }
.public-links { display: flex; gap: 26px; color: var(--muted); font-size: 13px; }
.public-links a:hover { color: var(--text); }
.public-actions { display: flex; gap: 8px; }
.hero { text-align: center; padding: 100px 0 80px; }
.hero-badge { width: fit-content; margin: 0 auto 17px; padding: 6px 10px; border: 1px solid rgba(184,255,84,.18); background: rgba(184,255,84,.05); border-radius: 999px; color: #dfffad; font-size: 11px; }
.hero h1 { max-width: 950px; margin: 0 auto; font-size: clamp(46px, 8vw, 88px); line-height: .96; letter-spacing: -.065em; }
.hero h1 span { color: var(--accent); }
.hero > p { max-width: 700px; margin: 24px auto 0; color: var(--muted); font-size: 18px; }
.hero-actions { display: flex; justify-content: center; gap: 10px; margin-top: 30px; }
.command-stage { width: min(900px,100%); margin: 70px auto 0; padding: 1px; border-radius: 25px; background: linear-gradient(135deg, rgba(184,255,84,.26), rgba(255,255,255,.04), rgba(90,190,255,.14)); box-shadow: 0 45px 120px rgba(0,0,0,.42); }
.command-window { overflow: hidden; border-radius: 24px; background: #0b0e13; min-height: 410px; }
.window-bar { height: 48px; border-bottom: 1px solid var(--border); display: flex; align-items: center; gap: 6px; padding: 0 15px; }
.window-bar span { width: 8px; height: 8px; border-radius: 50%; background: #39404a; }
.window-bar small { margin-left: auto; color: var(--muted-2); }
.demo-thread { padding: 50px 9%; display: grid; gap: 15px; text-align: left; }
.demo-message { width: fit-content; max-width: 75%; border: 1px solid var(--border); border-radius: 15px; padding: 13px 15px; }
.demo-message.user { margin-left: auto; background: #1b212a; }
.demo-message.assistant { background: rgba(184,255,84,.05); border-color: rgba(184,255,84,.13); }
.spark { color: var(--accent); margin-right: 5px; }
.marketing-section { padding: 110px 0; }
.marketing-section.compact { padding: 90px 0; }
.section-heading { max-width: 760px; }
.section-heading.centered { text-align: center; margin: 0 auto 45px; }
.section-heading h2, .split-section h2 { font-size: clamp(34px,5vw,58px); line-height: 1.02; letter-spacing: -.05em; margin: 8px 0 12px; }
.section-heading p, .split-section p { color: var(--muted); font-size: 16px; }
.feature-grid { display: grid; grid-template-columns: repeat(3,minmax(0,1fr)); gap: 13px; }
.feature-card { min-height: 220px; border: 1px solid var(--border); border-radius: 20px; padding: 22px; background: rgba(255,255,255,.022); }
.feature-icon { display: grid; place-items: center; width: 42px; height: 42px; border-radius: 13px; color: var(--accent); background: rgba(184,255,84,.07); }
.feature-card h3 { margin: 30px 0 6px; }
.feature-card p { margin: 0; color: var(--muted); }
.split-section { display: grid; grid-template-columns: 1fr 1fr; gap: 70px; align-items: center; padding: 110px 6%; border: 1px solid var(--border); border-radius: 28px; background: rgba(255,255,255,.018); }
.platform-row { display: flex; flex-wrap: wrap; gap: 7px; margin-top: 24px; }
.platform-row span { padding: 6px 9px; border-radius: 999px; border: 1px solid var(--border); color: #cfd5de; font-size: 11px; }
.device-visual { display: grid; gap: 8px; }
.device-row { display: grid; grid-template-columns: auto 1fr auto; align-items: center; gap: 10px; min-height: 60px; padding: 12px 14px; border: 1px solid var(--border); border-radius: 15px; background: #11151c; }
.device-row small { color: var(--muted); }
.device-row.muted { opacity: .5; }
.public-footer { min-height: 140px; border-top: 1px solid var(--border); display: flex; align-items: center; justify-content: space-between; gap: 20px; }
.public-footer > div { display: flex; gap: 18px; color: var(--muted); font-size: 12px; }

.auth-page { min-height: 100vh; display: grid; place-items: center; padding: 100px 20px 45px; position: relative; }
.auth-brand { position: absolute; top: 24px; left: 28px; }
.auth-card { width: min(450px,100%); padding: 30px; border: 1px solid var(--border); border-radius: 24px; background: rgba(15,18,25,.9); box-shadow: var(--shadow); }
.auth-card.wide { width: min(600px,100%); }
.auth-card h1 { font-size: 30px; letter-spacing: -.04em; margin: 6px 0 4px; }
.auth-card > p { color: var(--muted); margin-top: 0; }
.auth-alt { text-align: center; font-size: 12px; color: var(--muted); margin: 18px 0 0 !important; }
.auth-alt a { color: var(--accent); }
.legal-shell { width: min(850px, calc(100% - 36px)); margin: 0 auto; padding: 28px 0 80px; }
.legal-card { margin-top: 70px; padding: 34px; border: 1px solid var(--border); border-radius: 24px; background: var(--surface); }
.legal-card h1 { font-size: 44px; letter-spacing: -.05em; }
.legal-card p { color: var(--muted); }
.legal-card > a { color: var(--accent); }

@media (max-width: 980px) {
  .app-shell { grid-template-columns: 1fr; }
  .sidebar { position: fixed; left: 0; width: 260px; transform: translateX(-105%); transition: transform .2s ease; box-shadow: var(--shadow); }
  .sidebar.open { transform: translateX(0); }
  .mobile-menu { display: grid; place-items: center; width: 38px; height: 38px; background: #151a22; border-radius: 11px; }
  .topbar { padding: 0 18px; }
  .page { width: min(100% - 30px, 1100px); padding-top: 26px; }
  .stats-grid { grid-template-columns: repeat(2,1fr); }
  .quick-grid { grid-template-columns: repeat(2,1fr); }
  .device-grid, .memory-grid { grid-template-columns: repeat(2,1fr); }
  .style-options { grid-template-columns: repeat(2,1fr); }
  .feature-grid { grid-template-columns: repeat(2,1fr); }
  .split-section { grid-template-columns: 1fr; gap: 35px; }
}

@media (max-width: 680px) {
  .topbar-actions .subtle { display: none; }
  .page-heading, .chat-header { align-items: flex-start; flex-direction: column; }
  .stats-grid, .dashboard-grid, .quick-grid, .device-grid, .memory-grid, .feature-grid { grid-template-columns: 1fr; }
  .span-two { grid-column: auto; }
  .inline-form, .goal-controls { align-items: stretch; flex-direction: column; }
  .form-grid.two, .memory-form-grid { grid-template-columns: 1fr; }
  .style-options { grid-template-columns: 1fr; }
  .chat-thread { padding: 18px 14px; min-height: 430px; }
  .message-row { max-width: 95%; }
  .suggestion-grid { grid-template-columns: 1fr; }
  .composer { margin-left: 8px; margin-right: 8px; }
  .composer-meta { padding-left: 12px; padding-right: 12px; }
  .public-nav { height: 70px; }
  .public-links { display: none; }
  .public-actions .ghost { display: none; }
  .hero { padding-top: 75px; }
  .hero > p { font-size: 16px; }
  .hero-actions { flex-direction: column; }
  .command-stage { margin-top: 44px; }
  .demo-thread { padding: 35px 5%; }
  .demo-message { max-width: 90%; }
  .marketing-section { padding: 75px 0; }
  .split-section { padding: 60px 20px; }
  .public-footer { flex-direction: column; justify-content: center; }
}
