:root {
  --bg: #02050b;
  --panel: #07101f;
  --panel-strong: #0b1628;
  --line: rgba(126, 181, 255, 0.2);
  --line-strong: rgba(126, 181, 255, 0.34);
  --text: #f2f7ff;
  --muted: #aebbd0;
  --faint: #74829a;
  --blue: #1688ff;
  --cyan: #2ee7ff;
  --danger: #ff6f8f;
  --success: #75f0bd;
  --shadow: rgba(0, 0, 0, 0.38);
}

* {
  box-sizing: border-box;
}

html,
body {
  min-height: 100%;
  margin: 0;
  background: var(--bg);
  color: var(--text);
  font-family: Inter, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
  -webkit-font-smoothing: antialiased;
}

body {
  background:
    radial-gradient(circle at 12% 0%, rgba(22, 136, 255, 0.2), transparent 30%),
    radial-gradient(circle at 86% 8%, rgba(46, 231, 255, 0.1), transparent 28%),
    linear-gradient(180deg, #02050b 0%, #07101f 48%, #02050b 100%);
  overscroll-behavior-y: none;
}

body.nova-app-active .site-footer {
  display: none;
}

body.nova-auth-active .site-footer {
  display: none;
}

button,
input,
textarea {
  font: inherit;
}

button {
  cursor: pointer;
}

a {
  color: inherit;
}

.boot-screen {
  min-height: 100vh;
  display: grid;
  place-items: center;
  align-content: center;
  gap: 14px;
  color: var(--muted);
}

.boot-logo {
  width: 76px;
  height: 76px;
  border-radius: 22px;
  box-shadow: 0 24px 72px rgba(22, 136, 255, 0.24);
}

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

.auth-shell,
.gate-shell {
  min-height: 100vh;
  display: grid;
  grid-template-rows: auto auto;
  place-items: center;
  align-content: center;
  padding: 32px 18px;
}

.auth-back-link {
  margin-bottom: 14px;
  color: #aebbd0;
  font-size: 0.9rem;
  font-weight: 850;
  text-decoration: none;
}

.auth-back-link:hover,
.auth-back-link:focus-visible {
  color: #f2f7ff;
}

.auth-card,
.gate-card {
  width: min(460px, 100%);
  max-width: calc(100vw - 36px);
  min-width: 0;
  border: 1px solid var(--line-strong);
  border-radius: 28px;
  padding: 28px;
  background: linear-gradient(180deg, rgba(10, 21, 40, 0.9), rgba(4, 8, 18, 0.94));
  box-shadow: 0 28px 80px var(--shadow);
}

.brand-lockup {
  display: flex;
  align-items: center;
  gap: 12px;
  margin-bottom: 22px;
  font-weight: 900;
  letter-spacing: 0;
}

.brand-lockup img {
  width: 44px;
  height: 44px;
  border-radius: 14px;
}

.auth-card h1,
.gate-card h1 {
  margin: 0 0 10px;
  font-size: clamp(2.1rem, 8vw, 3.5rem);
  line-height: 0.98;
  letter-spacing: 0;
}

.auth-card p,
.gate-card p {
  margin: 0 0 18px;
  color: var(--muted);
  line-height: 1.55;
}

.field {
  display: grid;
  gap: 8px;
  margin: 14px 0;
}

.field label {
  color: #d8e7ff;
  font-weight: 800;
  font-size: 0.92rem;
}

.field input,
.field textarea {
  width: 100%;
  border: 1px solid rgba(126, 181, 255, 0.28);
  border-radius: 16px;
  background: rgba(2, 5, 11, 0.58);
  color: var(--text);
  outline: none;
}

.field input {
  height: 52px;
  padding: 0 15px;
}

.password-field {
  position: relative;
}

.password-field .password-input {
  padding-right: 82px;
}

.password-toggle {
  position: absolute;
  top: 8px;
  right: 8px;
  bottom: 8px;
  min-width: 62px;
  border: 1px solid rgba(126, 181, 255, 0.24);
  border-radius: 999px;
  background: rgba(126, 181, 255, 0.08);
  color: #b8dfff;
  font-size: 0.78rem;
  font-weight: 900;
}

.password-toggle:hover,
.password-toggle:focus-visible {
  color: var(--text);
  border-color: rgba(46, 231, 255, 0.46);
}

.captcha-box {
  width: 100%;
  min-height: 74px;
  margin: 14px 0 6px;
  display: flex;
  align-items: center;
  justify-content: center;
  position: relative;
  overflow: hidden;
  padding: 10px;
  border: 1px solid rgba(126, 181, 255, 0.22);
  border-radius: 18px;
  background: rgba(2, 5, 11, 0.36);
}

#auth-turnstile {
  width: 100%;
  min-height: 60px;
  display: flex;
  align-items: center;
  justify-content: center;
}

.captcha-message {
  min-height: 0;
  margin: 0 0 8px;
  color: #9eabc2;
  font-size: 0.85rem;
  line-height: 1.35;
}

.captcha-message.error {
  color: #ffb4b4;
}

.captcha-message.loading {
  color: #b8dfff;
}

.captcha-placeholder {
  border: 1px solid rgba(126, 181, 255, 0.18);
  border-radius: 14px;
  color: #9eabc2;
  display: none;
  font-size: 0.82rem;
  padding: 10px 13px;
}

.captcha-box.loading .captcha-placeholder {
  display: inline-flex;
}

.captcha-box.ready .captcha-placeholder {
  display: none;
}

.captcha-retry {
  min-height: 34px;
  margin: 0 0 8px;
  padding: 0 14px;
  width: fit-content;
}

.field textarea {
  min-height: 104px;
  resize: vertical;
  padding: 13px 15px;
  line-height: 1.45;
}

.field input:focus,
.field textarea:focus,
.chat-input textarea:focus {
  border-color: rgba(46, 231, 255, 0.72);
  box-shadow: 0 0 0 4px rgba(46, 231, 255, 0.08);
}

.primary-btn,
.secondary-btn,
.icon-btn,
.link-btn,
.danger-btn {
  border: 0;
  border-radius: 999px;
  min-height: 44px;
  padding: 0 18px;
  color: var(--text);
  font-weight: 900;
}

.primary-btn {
  width: 100%;
  margin-top: 6px;
  background: linear-gradient(135deg, var(--blue), var(--cyan));
  box-shadow: 0 20px 52px rgba(22, 136, 255, 0.24);
}

.secondary-btn,
.link-btn,
.danger-btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  background: rgba(7, 16, 31, 0.78);
  border: 1px solid rgba(126, 181, 255, 0.25);
  text-decoration: none;
}

.danger-btn {
  color: #ffd8e1;
  border-color: rgba(255, 111, 143, 0.35);
}

.button-row {
  display: flex;
  gap: 10px;
  flex-wrap: wrap;
}

.button-row .secondary-btn,
.button-row .link-btn,
.button-row .danger-btn {
  flex: 1;
}

.auth-legal-links {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 10px;
  margin-top: 18px;
  color: var(--faint);
  font-size: 0.82rem;
  line-height: 1.45;
  text-align: center;
}

.auth-legal-links a {
  min-height: 36px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 0 13px;
  border: 1px solid rgba(126, 181, 255, 0.18);
  border-radius: 999px;
  background: rgba(126, 181, 255, 0.055);
  color: #b8dfff;
  font-weight: 800;
  text-decoration: none;
}

.auth-legal-links a:hover,
.auth-legal-links a:focus-visible {
  color: var(--text);
}

.notice {
  margin-top: 14px;
  color: var(--muted);
  font-size: 0.92rem;
  line-height: 1.45;
}

.notice.error {
  color: #ffd8e1;
}

.notice.success {
  color: #d6ffed;
}

.nova-layout {
  min-height: 100vh;
  display: flex;
  justify-content: center;
  padding: 16px;
}

.main-panel {
  width: min(100%, 460px);
  min-width: 0;
}

.content {
  min-width: 0;
  min-height: 0;
}

.app-stack {
  display: grid;
  gap: 12px;
  width: 100%;
}

.app-header {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 12px;
  width: 100%;
}

.app-header-text {
  flex: 1;
  min-width: 0;
  padding-right: 8px;
}

.eyebrow {
  color: #8fb4ff;
  font-size: 0.82rem;
  font-weight: 700;
  letter-spacing: 0;
  text-transform: uppercase;
}

.app-header h1 {
  margin: 0;
  color: #ffffff;
  font-size: 1.82rem;
  font-weight: 900;
  line-height: 2.12rem;
  letter-spacing: 0;
}

.app-header p {
  margin: 3px 0 0;
  color: #a8b4cb;
  font-size: 0.88rem;
  line-height: 1.36rem;
}

.header-action-button {
  min-width: 62px;
  min-height: 44px;
  margin-top: 3px;
  border: 1px solid rgba(255, 255, 255, 0.55);
  border-radius: 999px;
  background: #e2edff;
  color: #0b1020;
  box-shadow: 0 12px 28px rgba(125, 231, 255, 0.18);
  font-size: 0.88rem;
  font-weight: 900;
}

.home-view {
  display: grid;
  gap: 12px;
}

.launcher-shell {
  overflow: hidden;
  padding: 14px;
  border: 1px solid rgba(139, 172, 255, 0.18);
  border-radius: 26px;
  background: rgba(8, 13, 28, 0.84);
}

.home-intro {
  display: grid;
  justify-items: center;
  gap: 6px;
  padding: 0 12px;
  text-align: center;
}

.home-intro h2 {
  margin: 0;
  color: #ffffff;
  font-size: 1.75rem;
  font-weight: 900;
  line-height: 2.12rem;
  letter-spacing: 0;
}

.home-intro p {
  margin: 0;
  color: #aeb8ce;
  font-size: 0.94rem;
  line-height: 1.32rem;
}

.orbit-launcher {
  position: relative;
  width: 360px;
  height: 310px;
  max-width: 100%;
  margin: 0 auto;
}

.orbit-glow {
  position: absolute;
  left: 48px;
  top: 48px;
  width: 264px;
  height: 264px;
  border-radius: 132px;
  background: rgba(111, 151, 255, 0.16);
  pointer-events: none;
}

.launcher-bubble {
  position: absolute;
  display: grid;
  place-items: center;
  align-content: center;
  gap: 3px;
  border: 1px solid rgba(170, 206, 255, 0.32);
  border-radius: 999px;
  background: rgba(44, 58, 111, 0.92);
  color: #ffffff;
  box-shadow: 0 12px 28px rgba(90, 156, 255, 0.18);
  text-align: center;
}

.launcher-bubble:hover,
.launcher-bubble:focus-visible,
.launcher-bubble.active {
  border-color: #ffffff;
}

.launcher-bubble span {
  display: block;
  max-width: 82%;
  font-size: 0.75rem;
  font-weight: 900;
  line-height: 0.94rem;
}

.launcher-bubble small {
  color: rgba(255, 255, 255, 0.72);
  font-size: 0.62rem;
  font-weight: 700;
}

.launcher-bubble-medium {
  width: 86px;
  height: 86px;
}

.launcher-bubble-core {
  width: 100px;
  height: 100px;
  border-color: rgba(125, 231, 255, 0.72);
  background: #edf4ff;
  color: #071122;
  box-shadow: 0 14px 34px rgba(125, 231, 255, 0.26);
}

.launcher-bubble-core small {
  color: #43506a;
}

.home-brief-card {
  display: grid;
  align-items: flex-start;
  gap: 14px;
  overflow: hidden;
  padding: 17px;
  border: 1px solid rgba(125, 231, 255, 0.16);
  border-radius: 26px;
  background: rgba(7, 12, 27, 0.9);
  box-shadow: 0 14px 40px rgba(125, 231, 255, 0.08);
}

.home-brief-header-row {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 12px;
  width: 100%;
}

.home-brief-text {
  flex: 1;
}

.home-brief-card h3 {
  margin: 0;
  color: #ffffff;
  font-size: 1.06rem;
  font-weight: 900;
}

.home-brief-reflection {
  width: 100%;
  padding: 15px;
  border: 1px solid rgba(125, 231, 255, 0.1);
  border-radius: 22px;
  background: rgba(125, 231, 255, 0.045);
}

.home-brief-card p {
  margin: 0;
  color: #e4edff;
  font-size: 0.88rem;
  line-height: 1.38rem;
}

.chat-view {
  display: grid;
  grid-template-rows: auto minmax(0, 1fr) auto auto auto;
  gap: 7px;
  min-height: min(70vh, 620px);
}

.chat-top-actions {
  display: flex;
  justify-content: flex-end;
}

.compact-btn {
  width: auto;
  min-height: 38px;
  padding: 0 13px;
  border-radius: 999px;
  font-size: 0.78rem;
}

.messages {
  min-height: min(52vh, 460px);
  max-height: min(62vh, 560px);
  overflow-y: auto;
  display: flex;
  flex-direction: column;
  justify-content: flex-start;
  gap: 11px;
  padding: 7px;
  border: 1px solid rgba(139, 172, 255, 0.045);
  border-radius: 18px;
  background: rgba(4, 8, 20, 0.08);
  overscroll-behavior: contain;
  scroll-behavior: smooth;
}

.message {
  max-width: 92%;
  border: 1px solid rgba(126, 181, 255, 0.16);
  border-radius: 20px;
  padding: 12px;
  line-height: 1.47;
  white-space: pre-wrap;
  overflow-wrap: anywhere;
}

.message.user {
  align-self: flex-end;
  background: rgba(219, 231, 255, 0.16);
  border-color: rgba(219, 231, 255, 0.22);
}

.message.assistant {
  align-self: flex-start;
  background: rgba(12, 23, 48, 0.86);
}

.message.meta {
  max-width: 560px;
  color: var(--muted);
}

.typing {
  align-self: flex-start;
  display: inline-flex;
  align-items: center;
  gap: 4px;
  height: 34px;
  min-width: 58px;
  border-radius: 999px;
  border: 1px solid rgba(125, 231, 255, 0.14);
  background: rgba(12, 23, 48, 0.86);
  padding: 0 14px;
}

.typing span {
  width: 6px;
  height: 6px;
  border-radius: 999px;
  background: #c9eaff;
  opacity: 0.45;
  animation: pulse 1s infinite ease-in-out;
}

.typing span:nth-child(2) {
  animation-delay: 0.15s;
}

.typing span:nth-child(3) {
  animation-delay: 0.3s;
}

@keyframes pulse {
  0%, 80%, 100% { transform: translateY(0); opacity: 0.4; }
  40% { transform: translateY(-3px); opacity: 1; }
}

.chat-top-actions {
  display: flex;
  justify-content: flex-end;
  gap: 8px;
}

.draft-recovery-card {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 14px;
  border: 1px solid rgba(125, 231, 255, 0.2);
  border-radius: 18px;
  background: rgba(125, 231, 255, 0.08);
  padding: 12px;
}

.draft-recovery-card strong {
  display: block;
  color: #ffffff;
  font-size: 0.92rem;
}

.draft-recovery-card p {
  margin: 3px 0 0;
  color: #aeb8ce;
  font-size: 0.88rem;
  line-height: 1.32rem;
  max-height: 2.7rem;
  overflow: hidden;
}

.draft-recovery-actions {
  display: flex;
  gap: 8px;
  flex-shrink: 0;
}

.chat-suggestion-panel {
  display: grid;
  gap: 2px;
  max-height: 188px;
  overflow-y: auto;
  border: 1px solid rgba(139, 172, 255, 0.16);
  border-radius: 18px;
  background: rgba(5, 9, 22, 0.78);
  padding: 5px;
}

.chat-suggestion-row {
  display: grid;
  grid-template-columns: 18px minmax(0, 1fr) 14px;
  align-items: center;
  gap: 10px;
  min-height: 38px;
  width: 100%;
  border: 0;
  border-radius: 14px;
  background: transparent;
  color: #d8e2f6;
  cursor: pointer;
  padding: 8px 10px;
  text-align: left;
}

.chat-suggestion-row:hover,
.chat-suggestion-row:focus-visible {
  background: rgba(125, 231, 255, 0.08);
  outline: none;
}

.chat-suggestion-icon {
  position: relative;
  width: 17px;
  height: 17px;
}

.chat-suggestion-icon::before {
  content: "";
  position: absolute;
  top: 1px;
  left: 1px;
  width: 10px;
  height: 10px;
  border: 1.6px solid #8fb4ff;
  border-radius: 999px;
}

.chat-suggestion-icon::after {
  content: "";
  position: absolute;
  top: 11px;
  right: 2px;
  width: 2px;
  height: 7px;
  border-radius: 999px;
  background: #8fb4ff;
  transform: rotate(-45deg);
  transform-origin: top center;
}

.chat-suggestion-text {
  overflow: hidden;
  color: #d8e2f6;
  font-size: 0.86rem;
  font-weight: 800;
  line-height: 1.2rem;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.chat-suggestion-arrow {
  color: #7de7ff;
  font-size: 0.9rem;
  font-weight: 900;
  text-align: right;
}

.chat-input {
  border: 1px solid rgba(139, 172, 255, 0.16);
  border-radius: 22px;
  background: rgba(5, 9, 22, 0.82);
  padding: 5px;
  box-shadow: none;
}

.chat-input textarea {
  width: 100%;
  min-height: 40px;
  max-height: 96px;
  resize: vertical;
  border: 1px solid transparent;
  border-radius: 16px;
  background: rgba(2, 5, 11, 0.26);
  color: var(--text);
  outline: none;
  padding: 13px 14px;
  line-height: 1.45;
}

.composer-actions {
  display: flex;
  align-items: flex-end;
  justify-content: space-between;
  gap: 10px;
  flex-wrap: wrap;
  padding: 5px 1px 1px;
}

.left-actions,
.right-actions {
  display: flex;
  align-items: center;
  gap: 8px;
  flex-wrap: wrap;
}

.icon-btn {
  min-width: 44px;
  background: rgba(7, 16, 31, 0.78);
  border: 1px solid rgba(126, 181, 255, 0.22);
}

.icon-btn.active {
  color: #dff9ff;
  border-color: rgba(46, 231, 255, 0.48);
  background: rgba(46, 231, 255, 0.12);
}

.voice-btn {
  display: inline-grid;
  place-items: center;
}

.voice-btn.recording {
  border-color: rgba(255, 157, 177, 0.42);
  background: rgba(255, 157, 177, 0.14);
}

.web-mic-icon {
  position: relative;
  display: inline-block;
  width: 16px;
  height: 20px;
}

.web-mic-icon::before {
  content: "";
  position: absolute;
  left: 4px;
  top: 0;
  width: 8px;
  height: 12px;
  border: 2px solid #e2edff;
  border-radius: 999px;
}

.web-mic-icon::after {
  content: "";
  position: absolute;
  left: 7px;
  top: 13px;
  width: 2px;
  height: 5px;
  border-radius: 999px;
  background: #e2edff;
}

.web-mic-icon span {
  position: absolute;
  left: 3px;
  bottom: 0;
  width: 10px;
  height: 2px;
  border-radius: 999px;
  background: #e2edff;
}

.voice-stop-icon {
  width: 12px;
  height: 12px;
  border-radius: 3px;
  background: #ffd7df;
}

.voice-loading-dot {
  color: #e2edff;
  font-weight: 900;
}

.voice-listening-card {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 14px;
  border: 1px solid rgba(126, 181, 255, 0.24);
  border-radius: 20px;
  background: rgba(126, 181, 255, 0.08);
  padding: 11px 14px;
}

.voice-listening-card strong,
.voice-listening-card span {
  display: block;
}

.voice-listening-card strong {
  color: #e9fbff;
  font-size: 0.88rem;
}

.voice-listening-card span {
  color: var(--muted);
  font-size: 0.78rem;
  margin-top: 2px;
}

.voice-meter-bars {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 4px;
  height: 36px;
  min-width: 62px;
}

.voice-meter-bars span {
  width: 5px;
  min-height: 8px;
  border-radius: 999px;
  background: #7de7ff;
  transition: height 90ms ease;
}

.attachment-pill {
  max-width: 280px;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
  color: var(--muted);
  font-size: 0.88rem;
}

.panel-grid {
  display: grid;
  gap: 14px;
  max-width: 100%;
}

.panel-card {
  border: 1px solid var(--line);
  border-radius: 22px;
  background: rgba(13, 20, 39, 0.9);
  padding: 15px;
}

.panel-card h2,
.panel-card h3 {
  margin: 0 0 8px;
  letter-spacing: 0;
}

.panel-card p,
.panel-card li {
  color: var(--muted);
  line-height: 1.55;
}

.memory-hero,
.settings-hero {
  padding: 16px;
  border: 1px solid rgba(125, 231, 255, 0.16);
  border-radius: 20px;
  background: rgba(28, 42, 76, 0.42);
}

.memory-hero p,
.settings-hero p {
  margin: 0;
  color: #b9c4d8;
  font-size: 0.88rem;
  line-height: 1.32rem;
}

.segment {
  display: flex;
  gap: 4px;
  padding: 4px;
  border-radius: 8px;
  background: #0b1020;
}

.segment-button {
  flex: 1;
  min-height: 40px;
  border: 0;
  border-radius: 6px;
  background: transparent;
  color: #b8c2d8;
  font-weight: 700;
}

.segment-button.active {
  background: #ffffff;
  color: #0b1020;
}

.vault-list-panel,
.vault-form-panel {
  display: grid;
  gap: 12px;
  padding: 14px;
}

.section-header {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 10px;
}

.section-header h2 {
  margin: 0;
  color: #ffffff;
  font-size: 1.31rem;
  font-weight: 800;
}

.section-header p {
  margin: 4px 0 0;
  color: #9eabc2;
  font-size: 0.88rem;
  line-height: 1.31rem;
}

.search-input {
  width: 100%;
  min-height: 44px;
  border: 1px solid rgba(139, 172, 255, 0.22);
  border-radius: 16px;
  background: rgba(5, 9, 22, 0.86);
  color: #ffffff;
  outline: none;
  padding: 0 14px;
}

.empty-vault {
  display: grid;
  gap: 8px;
  padding: 14px;
  border: 1px solid rgba(139, 172, 255, 0.14);
  border-radius: 18px;
  background: rgba(255, 255, 255, 0.045);
}

.empty-vault h3 {
  margin: 0;
  color: #ffffff;
  font-size: 1.06rem;
  font-weight: 900;
}

.empty-vault p {
  margin: 0;
  color: #aeb8ce;
  font-size: 0.94rem;
  line-height: 1.38rem;
}

.brief-section {
  display: grid;
  gap: 12px;
}

.brief-section ul {
  margin: 0;
  padding-left: 20px;
}

.memory-list {
  display: grid;
  gap: 10px;
}

.memory-item {
  display: grid;
  gap: 7px;
  min-height: 96px;
  border: 1px solid rgba(112, 145, 210, 0.24);
  border-radius: 16px;
  padding: 12px;
  background: rgba(7, 13, 29, 0.94);
}

.memory-item h3 {
  margin: 0;
  color: #ffffff;
  font-size: 1.12rem;
  font-weight: 800;
}

.memory-item p {
  margin: 0;
  color: #c4cde0;
  font-size: 0.94rem;
  line-height: 1.38rem;
}

.card-header,
.card-actions {
  display: flex;
  align-items: center;
  gap: 8px;
}

.card-header {
  justify-content: space-between;
}

.card-actions {
  flex-wrap: wrap;
  justify-content: flex-end;
  margin-top: 2px;
}

.danger-action {
  border-color: rgba(255, 111, 143, 0.36);
  color: #ffb4c5;
}

.card-type {
  color: #8fb4ff;
  font-size: 0.75rem;
  font-weight: 800;
  text-transform: uppercase;
}

.card-date {
  color: #7a8599;
  font-size: 0.75rem;
}

.memory-footnote {
  margin: 0;
  color: #8e9ab1;
  font-size: 0.82rem;
  line-height: 1.2rem;
  padding: 0 4px;
}

.settings-stack {
  display: grid;
  gap: 12px;
}

.settings-section {
  display: grid;
  gap: 10px;
  padding: 14px;
  border: 1px solid rgba(143, 180, 255, 0.14);
  border-radius: 18px;
  background: rgba(8, 13, 28, 0.72);
}

.settings-section h2 {
  margin: 4px 0 0;
  color: #8fb4ff;
  font-size: 0.75rem;
  font-weight: 900;
  text-transform: uppercase;
}

.settings-row {
  display: grid;
  gap: 6px;
  padding: 12px;
  border: 1px solid rgba(255, 255, 255, 0.08);
  border-radius: 14px;
  background: rgba(255, 255, 255, 0.05);
}

.settings-row-header {
  display: grid;
  gap: 5px;
}

.settings-label {
  color: #8e9ab1;
  font-size: 0.75rem;
  font-weight: 800;
  text-transform: uppercase;
}

.settings-value {
  color: #ffffff;
  font-size: 0.94rem;
  font-weight: 800;
}

.settings-hint {
  margin: 0;
  color: #8e9ab1;
  font-size: 0.82rem;
  line-height: 1.12rem;
}

.settings-inline-button {
  align-self: flex-start;
  min-width: 118px;
  min-height: 40px;
  margin-top: 8px;
}

.settings-legal-grid {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}

.small-label {
  color: var(--faint);
  font-size: 0.82rem;
  font-weight: 900;
  text-transform: uppercase;
  letter-spacing: 0.12em;
}

.external-links {
  display: flex;
  gap: 8px;
  flex-wrap: wrap;
  margin-top: 14px;
}

.usage-meter {
  display: grid;
  gap: 7px;
  margin-top: 14px;
}

.usage-meter-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  color: var(--text);
  font-size: 0.88rem;
  font-weight: 850;
}

.usage-progress {
  width: 100%;
  height: 8px;
  border-radius: 999px;
  overflow: hidden;
  background: rgba(255, 255, 255, 0.08);
}

.usage-progress-fill {
  height: 100%;
  border-radius: inherit;
  background: linear-gradient(90deg, rgba(143, 180, 255, 0.94), rgba(110, 231, 183, 0.88));
}

.usage-progress-meta {
  margin: 0;
  color: var(--faint);
  font-size: 0.88rem;
  font-weight: 800;
}

.hidden {
  display: none !important;
}

@media (min-width: 900px) {
  .boot-logo {
    width: 96px;
    height: 96px;
    border-radius: 26px;
  }

  .auth-shell,
  .gate-shell {
    padding: 44px 24px;
  }

  .auth-card,
  .gate-card {
    width: min(520px, 100%);
    padding: 32px;
  }

  .brand-lockup {
    gap: 14px;
  }

  .brand-lockup img {
    width: 54px;
    height: 54px;
    border-radius: 16px;
  }

  .nova-layout {
    padding: 24px 18px 34px;
  }

  .main-panel {
    width: min(100%, 540px);
  }

  .app-stack {
    gap: 14px;
  }

  .app-header h1 {
    font-size: 2.05rem;
    line-height: 2.35rem;
  }

  .app-header p {
    font-size: 0.96rem;
    line-height: 1.46rem;
  }

  .header-action-button {
    min-width: 72px;
    min-height: 46px;
  }

  .launcher-shell {
    padding: 18px;
  }

  .home-intro h2 {
    font-size: 2rem;
    line-height: 2.34rem;
  }

  .home-intro p {
    font-size: 1rem;
    line-height: 1.45rem;
  }

  .orbit-launcher {
    transform: scale(1.08);
    transform-origin: top center;
    margin: 6px auto 26px;
  }

  .home-brief-card,
  .panel-card,
  .settings-section {
    padding: 18px;
  }

  .chat-view {
    min-height: 560px;
  }

  .messages {
    min-height: min(58vh, 560px);
    max-height: min(64vh, 640px);
    padding: 9px;
  }
}

@media (min-width: 1100px) {
  .nova-layout {
    justify-content: center;
    padding: 26px 20px 40px;
  }

  .main-panel {
    width: min(100%, 680px);
    min-height: auto;
    padding: 0;
    overflow: visible;
  }

  .content {
    height: auto;
    max-width: 680px;
    margin: 0 auto;
  }

  .app-stack {
    width: 100%;
    height: auto;
    min-height: auto;
    max-width: 680px;
    margin: 0 auto;
    overflow: visible;
  }

  .app-stack-chat {
    max-width: 760px;
    min-height: calc(100vh - 56px);
  }

  .app-stack-home {
    max-width: 680px;
  }

  .app-header {
    align-items: flex-start;
  }

  .app-header h1 {
    font-size: 2.08rem;
    line-height: 2.38rem;
  }

  .header-action-button {
    display: inline-flex;
  }

  .launcher-shell,
  .home-brief-card,
  .panel-card,
  .settings-section {
    border-radius: 28px;
  }

  .chat-view {
    min-height: min(72vh, 700px);
    gap: 10px;
  }

  .messages {
    min-height: min(58vh, 560px);
    max-height: min(66vh, 680px);
    padding: 12px;
    border-radius: 24px;
    background: rgba(4, 8, 20, 0.28);
  }

  .message {
    max-width: 92%;
    padding: 13px 14px;
  }

  .message.meta {
    max-width: 620px;
  }

  .chat-input {
    border-radius: 24px;
    padding: 7px;
  }

  .chat-input textarea {
    min-height: 48px;
    max-height: 140px;
    resize: none;
  }
}

@media (max-width: 880px) {
  .nova-layout {
    padding: 14px;
  }

  .content {
    padding: 0;
  }

  .chat-view {
    min-height: 430px;
  }

  .message {
    max-width: 94%;
  }

  .home-view {
    padding-top: 0;
  }

  .home-brief-card {
    align-items: stretch;
    flex-direction: column;
  }

  .draft-recovery-card {
    align-items: stretch;
    flex-direction: column;
  }

  .draft-recovery-actions {
    justify-content: flex-end;
  }
}

@media (max-width: 520px) {
  .auth-card,
  .gate-card {
    width: min(100%, calc(100vw - 28px));
    max-width: calc(100vw - 28px);
    padding: 22px;
    border-radius: 24px;
  }

  .orbit-launcher {
    width: 360px;
    height: 310px;
    transform: scale(0.86);
    transform-origin: top center;
    margin: 0 auto -42px;
  }

  .button-row .secondary-btn,
  .button-row .link-btn,
  .button-row .danger-btn {
    flex-basis: 100%;
  }
}

@media (max-width: 370px) {
  .nova-layout {
    padding: 12px;
  }

  .launcher-shell {
    padding: 12px;
  }

  .orbit-launcher {
    transform: scale(0.78);
    margin-bottom: -68px;
  }
}
