/* ================================================
   DESIGN TOKENS
================================================ */
:root {
  --navy:        #0B2D4E;
  --navy-deep:   #071E35;
  --navy-mid:    #1A4A6E;
  --ocean:       #1E7DB3;
  --ocean-dark:  #155F8A;
  --teal:        #0E9AA7;
  --teal-dark:   #0A7A85;
  --sky:         #4BB8D0;
  --gold:        #F0A500;
  --gold-dark:   #C98C00;
  --white:       #FFFFFF;
  --off-white:   #F7FAFD;
  --light-bg:    #EEF4FA;
  --light-bg2:   #E4EFF8;
  --stroke:      #C4D9EC;
  --stroke-2:    #D8E8F4;
  --text-dark:   #0D2237;
  --text-mid:    #2A4F72;
  --text-light:  #5B7A95;
  --shadow-sm:   0 2px 8px rgba(11,45,78,.10);
  --shadow-md:   0 6px 24px rgba(11,45,78,.13);
  --shadow-lg:   0 16px 48px rgba(11,45,78,.18);
  --shadow-xl:   0 24px 72px rgba(11,45,78,.22);
  --r-xs:   6px;
  --r-sm:   8px;
  --r-md:   12px;
  --r-lg:   18px;
  --r-xl:   24px;
  --r-2xl:  32px;
  --r-full: 999px;
  --t:      160ms cubic-bezier(.4,0,.2,1);
  --t-slow: 280ms cubic-bezier(.4,0,.2,1);
}

/* ================================================
   RESET
================================================ */
*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }
html { scroll-behavior: smooth; }
body {
  font-family: 'Inter', 'Segoe UI', system-ui, sans-serif;
  color: var(--text-dark);
  background: var(--off-white);
  line-height: 1.6;
  overflow-x: hidden;
  min-height: 100vh;
}
img { max-width: 100%; display: block; }
a { color: inherit; text-decoration: none; }
ul { list-style: none; }
button { font-family: inherit; }

/* ================================================
   SKIP LINK
================================================ */
.skip-link {
  position: absolute; left: -9999px; top: 0; z-index: 9999;
  background: #fff; padding: .5rem 1rem;
  border: 2px solid var(--ocean); border-radius: var(--r-sm);
  color: var(--navy); font-weight: 700;
}
.skip-link:focus-visible { left: 1rem; top: 1rem; }

/* ================================================
   FOCUS VISIBLE — accessibility
================================================ */
:focus-visible {
  outline: 3px solid var(--teal);
  outline-offset: 2px;
}
.btn:focus-visible,
.nav-btn:focus-visible {
  outline: 3px solid var(--gold);
  outline-offset: 3px;
}
.nav-link:focus-visible,
a:focus-visible {
  outline: 2px solid var(--teal);
  outline-offset: 2px;
  border-radius: var(--r-xs);
}

/* ================================================
   NAVIGATION
================================================ */
.site-nav {
  position: fixed;
  top: 0; left: 0; right: 0;
  z-index: 200;
  height: 68px;
  padding: 0 clamp(1rem, 4vw, 3rem);
  display: flex;
  align-items: center;
  justify-content: flex-start;
  gap: 1rem;
  background: rgba(11,45,78, 0);
  border-bottom: 1px solid transparent;
  transition: background var(--t-slow), border-color var(--t), backdrop-filter var(--t-slow);
}
.nav-left {
  display: flex;
  align-items: center;
  gap: .6rem;
  min-width: 0;
  margin-right: auto;
}
.site-nav.nav--solid,
.site-nav.scrolled {
  background: rgba(7,30,53, 0.96);
  backdrop-filter: blur(20px) saturate(200%);
  -webkit-backdrop-filter: blur(20px) saturate(200%);
  border-bottom-color: rgba(255,255,255,0.06);
}
.nav-brand {
  font-family: 'Plus Jakarta Sans', sans-serif;
  font-size: 1.45rem;
  font-weight: 800;
  color: #fff;
  letter-spacing: -0.03em;
  flex-shrink: 0;
  display: flex;
  align-items: center;
  gap: 0.45rem;
}
.nav-brand .accent { color: var(--teal); }
.nav-logo {
  width: 30px;
  height: 30px;
  border-radius: var(--r-xs);
  flex-shrink: 0;
}
.nav-user-avatar-link {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  border-radius: 999px;
}
.nav-feedback-icon {
  width: 36px;
  height: 36px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  border-radius: 999px;
  border: 1.5px solid rgba(255,255,255,.42);
  background: rgba(255,255,255,.12);
  color: rgba(255,255,255,.95);
  cursor: pointer;
  box-shadow: 0 2px 10px rgba(0,0,0,.22);
  transition: background var(--t), border-color var(--t), transform var(--t);
}
.nav-feedback-icon:hover {
  background: rgba(255,255,255,.2);
  border-color: rgba(255,255,255,.72);
  transform: translateY(-1px);
}
.nav-user-avatar {
  width: 36px;
  height: 36px;
  border-radius: 999px;
  object-fit: cover;
  border: 1.5px solid rgba(255,255,255,.42);
  background: rgba(255,255,255,.12);
  box-shadow: 0 2px 10px rgba(0,0,0,.22);
}
.profile-context-menu {
  position: absolute;
  top: 60px;
  right: 8px;
  min-width: 210px;
  background: #fff;
  border: 1px solid var(--stroke-2);
  border-radius: var(--r-md);
  box-shadow: var(--shadow-md);
  display: none;
  z-index: 260;
  padding: .35rem;
}
.profile-context-menu.open {
  display: grid;
}
.profile-context-item {
  display: inline-flex;
  align-items: center;
  gap: .45rem;
  width: 100%;
  text-align: left;
  border: none;
  background: transparent;
  color: var(--text-dark);
  padding: .5rem .55rem;
  font-size: .86rem;
  border-radius: var(--r-sm);
  cursor: pointer;
}
.profile-context-item:hover {
  background: var(--light-bg);
}
.profile-context-item--danger {
  color: #b91c1c;
}
.profile-context-item--danger:hover {
  background: #fee2e2;
}
#profile-context-signout-form {
  margin: 0;
}
.nav-center {
  display: flex;
  align-items: center;
  gap: 0.15rem;
  margin-left: auto;
}
.session-warning-banner {
  margin-left: .5rem;
  background: rgba(250, 204, 21, 0.16);
  color: #fde047;
  border: 1px solid rgba(250, 204, 21, 0.65);
  border-radius: var(--r-sm);
  padding: .26rem .58rem;
  font-size: .78rem;
  font-weight: 700;
  text-align: left;
  min-width: 320px;
}
.nav-link {
  color: rgba(255,255,255,.75);
  font-size: 0.875rem;
  font-weight: 500;
  padding: 0.4rem 0.8rem;
  border-radius: var(--r-sm);
  transition: color var(--t), background var(--t);
  white-space: nowrap;
}
.nav-link:hover { color: #fff; background: rgba(255,255,255,.1); }
.nav-right {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  flex-shrink: 0;
}
.nav-btn {
  display: inline-flex;
  align-items: center;
  padding: 0.44rem 1.1rem;
  border-radius: var(--r-full);
  font-size: 0.875rem;
  font-weight: 700;
  cursor: pointer;
  border: none;
  transition: all var(--t);
  white-space: nowrap;
}
.nav-btn--ghost {
  background: transparent;
  color: rgba(255,255,255,.85);
  border: 1.5px solid rgba(255,255,255,.35);
}
.nav-btn--ghost:hover { border-color: #fff; color: #fff; background: rgba(255,255,255,.1); }
.nav-btn--cta {
  background: var(--gold);
  color: var(--navy-deep);
}
.nav-btn--cta:hover { background: var(--gold-dark); color: #fff; }

/* Hamburger */
.nav-hamburger {
  display: none;
  flex-direction: column;
  gap: 5px;
  cursor: pointer;
  background: transparent;
  border: none;
  padding: 0.4rem;
}
.nav-hamburger span {
  display: block; width: 22px; height: 2px;
  background: rgba(255,255,255,.85);
  border-radius: 2px;
  transition: transform var(--t), opacity var(--t);
}

.nav-mobile-menu {
  display: none;
  position: fixed;
  top: 68px;
  left: 0;
  right: 0;
  z-index: 190;
  background: rgba(7,30,53,.98);
  border-bottom: 1px solid rgba(255,255,255,.08);
  transform: translateY(-8px);
  opacity: 0;
  pointer-events: none;
  transition: opacity var(--t), transform var(--t);
  max-height: calc(100dvh - 68px);
  overflow-y: auto;
}
.nav-mobile-menu.open {
  opacity: 1;
  transform: translateY(0);
  pointer-events: auto;
}
.nav-mobile-backdrop {
  position: fixed;
  inset: 68px 0 0;
  background: rgba(4, 14, 28, .5);
  z-index: 185;
  opacity: 0;
  pointer-events: none;
  transition: opacity var(--t);
}
.nav-mobile-backdrop.open {
  opacity: 1;
  pointer-events: auto;
}
.nav-mobile-menu-inner {
  max-width: 1160px;
  margin: 0 auto;
  padding: .8rem 1rem calc(1rem + env(safe-area-inset-bottom));
  display: flex;
  flex-direction: column;
  gap: .2rem;
}
.nav-mobile-link {
  color: rgba(255,255,255,.88);
  border-radius: var(--r-sm);
  padding: .6rem .72rem;
  font-size: .93rem;
  font-weight: 600;
}
.nav-mobile-link:hover { background: rgba(255,255,255,.1); }

/* ================================================
   FOOTER
================================================ */
.site-footer {
  background: #060E1C;
  color: rgba(255,255,255,.55);
  padding: 4rem clamp(1rem,4vw,3rem) 2rem;
  content-visibility: auto;
  contain-intrinsic-size: 0 360px;
}
.footer-inner {
  max-width: 1160px;
  margin: 0 auto;
}
.footer-grid {
  display: grid;
  grid-template-columns: 2fr 1fr 1fr 1fr;
  gap: 2.5rem;
  padding-bottom: 2.5rem;
  border-bottom: 1px solid rgba(255,255,255,.07);
  margin-bottom: 1.5rem;
}
.footer-brand-name {
  font-family: 'Plus Jakarta Sans', sans-serif;
  font-size: 1.35rem;
  font-weight: 800;
  color: #fff;
  letter-spacing: -0.02em;
  margin-bottom: 0.65rem;
}
.footer-brand-name .accent { color: var(--teal); }
.footer-tagline { font-size: 0.875rem; line-height: 1.7; max-width: 240px; }
.footer-col-title {
  font-family: 'Plus Jakarta Sans', sans-serif;
  font-size: 0.75rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.09em;
  color: rgba(255,255,255,.9);
  margin-bottom: 1rem;
}
.footer-links { display: flex; flex-direction: column; gap: 0.55rem; }
.footer-links a { color: rgba(255,255,255,.5); font-size: 0.875rem; transition: color var(--t); }
.footer-links a:hover { color: #fff; }
.footer-bottom {
  display: flex;
  justify-content: space-between;
  align-items: center;
  flex-wrap: wrap;
  gap: 0.5rem;
  font-size: 0.8rem;
}
.footer-legal { display: flex; gap: 1.25rem; }
.footer-legal a { color: rgba(255,255,255,.35); transition: color var(--t); }
.footer-legal a:hover { color: rgba(255,255,255,.7); }

.ava-fab-group {
  position: fixed;
  right: 12px;
  bottom: 44px;
  display: inline-flex;
  align-items: center;
  gap: 10px;
  z-index: 360;
}

.ava-launcher {
  z-index: 360;
  border: none;
  border-radius: 999px;
  background: linear-gradient(135deg, #0E9AA7, #1E7DB3);
  color: #fff;
  font-weight: 800;
  letter-spacing: .02em;
  padding: .48rem .9rem;
  cursor: pointer;
  box-shadow: 0 10px 24px rgba(8, 29, 52, 0.28);
}

.ava-avatar-launcher {
  width: 76px;
  height: 76px;
  border: none;
  border-radius: 999px;
  padding: 0;
  background: transparent;
  cursor: pointer;
  box-shadow: 0 12px 30px rgba(8, 29, 52, 0.3);
}
.ava-avatar-launcher img {
  width: 76px;
  height: 76px;
  border-radius: 999px;
  object-fit: cover;
  border: 2px solid rgba(255,255,255,.75);
}

.feedback-overlay {
  position: fixed;
  inset: 0;
  display: none;
  align-items: center;
  justify-content: center;
  background: rgba(7, 17, 30, 0.48);
  z-index: 350;
}
.feedback-overlay.open {
  display: flex;
}

.feedback-modal {
  width: min(460px, calc(100vw - 24px));
  max-height: calc(100vh - 36px);
  background: #fff;
  border: 1px solid var(--stroke-2);
  border-radius: 12px;
  box-shadow: var(--shadow-lg);
  display: none;
  overflow: auto;
}
.feedback-modal.open { display: block; }
.ava-response-modal {
  width: min(760px, calc(100vw - 24px));
}
.ava-response-modal-body {
  display: grid;
  gap: .55rem;
  padding: .85rem;
}
.ava-response-query {
  font-size: .77rem;
  color: var(--text-light);
  margin: 0;
}
.ava-response-text {
  border: 1px solid var(--stroke);
  border-radius: 10px;
  background: #fbfeff;
  color: var(--text-mid);
  padding: .7rem .75rem;
  font-size: .89rem;
  line-height: 1.58;
  white-space: pre-wrap;
  max-height: min(62vh, 560px);
  overflow-y: auto;
}
.feedback-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: .5rem;
  padding: .58rem .68rem;
  border-bottom: 1px solid var(--stroke);
  background: #f5faff;
}
.feedback-head-sub {
  font-size: .72rem;
  color: var(--text-light);
}
.feedback-close {
  border: none;
  background: transparent;
  color: var(--text-mid);
  font-size: 1.15rem;
  cursor: pointer;
}
.feedback-form {
  display: grid;
  gap: .52rem;
  padding: .8rem;
}
.feedback-form label {
  display: grid;
  gap: .22rem;
  font-size: .75rem;
  color: var(--text-mid);
}
.feedback-form input,
.feedback-form select,
.feedback-form textarea {
  border: 1px solid var(--stroke);
  border-radius: 8px;
  padding: .4rem .5rem;
  font-size: .82rem;
}
.feedback-actions {
  display: flex;
  align-items: center;
  gap: .5rem;
  justify-content: space-between;
}
.feedback-actions button {
  border: none;
  border-radius: 8px;
  background: #1E7DB3;
  color: #fff;
  font-weight: 700;
  font-size: .78rem;
  padding: .4rem .55rem;
  cursor: pointer;
}
#feedback-status {
  font-size: .74rem;
  color: var(--text-light);
}

body.modal-open {
  overflow: hidden;
}

.ava-panel {
  position: fixed;
  right: 12px;
  bottom: 82px;
  width: min(390px, calc(100vw - 24px));
  height: min(560px, calc(100vh - 120px));
  background: #ffffff;
  border: 1px solid var(--stroke-2);
  border-radius: 14px;
  box-shadow: var(--shadow-lg);
  z-index: 360;
  display: none;
  overflow: hidden;
}
.ava-panel.open {
  display: grid;
  grid-template-rows: auto auto auto auto 1fr auto;
}
.ava-head {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: .5rem;
  padding: .6rem .7rem;
  border-bottom: 1px solid var(--stroke);
  background: #f4f9fd;
}
.ava-head-left {
  display: inline-flex;
  align-items: center;
  gap: .5rem;
}
.ava-head-left img {
  border-radius: 999px;
  border: 1px solid var(--stroke-2);
}
.ava-head-sub {
  font-size: .74rem;
  color: var(--text-light);
}
.ava-head-link {
  margin-left: auto;
  font-size: .72rem;
  font-weight: 700;
  color: var(--ocean-dark);
  border: 1px solid var(--stroke);
  border-radius: 999px;
  padding: .18rem .5rem;
  background: #fff;
}
.ava-head-link:hover {
  background: #f2f8fd;
}
.ava-close {
  border: none;
  background: transparent;
  color: #dc3545;
  font-size: 1.2rem;
  cursor: pointer;
  padding: 0;
  margin-left: auto;
  transition: color 0.2s ease;
}
.ava-close:hover {
  color: #c82333;
}
.ava-controls {
  display: flex;
  align-items: center;
  gap: .45rem;
  flex-wrap: wrap;
  padding: .45rem .65rem;
  border-bottom: 1px solid var(--stroke);
}
.ava-controls label,
.ava-controls button {
  font-size: .75rem;
  color: var(--text-mid);
}
.ava-controls select {
  border: 1px solid var(--stroke);
  border-radius: 8px;
  padding: .22rem .35rem;
  min-width: 108px;
}
.ava-controls button {
  border: 1px solid var(--stroke);
  border-radius: 8px;
  background: #fff;
  padding: .22rem .45rem;
  cursor: pointer;
}
.ava-session-row {
  display: flex;
  align-items: center;
  gap: .45rem;
  flex-wrap: wrap;
  padding: .45rem .65rem;
  border-bottom: 1px solid var(--stroke);
  background: #f9fcff;
}
.ava-session-row label,
.ava-session-row button {
  font-size: .75rem;
  color: var(--text-mid);
}
.ava-session-row select {
  border: 1px solid var(--stroke);
  border-radius: 8px;
  padding: .22rem .35rem;
  min-width: 170px;
}
.ava-session-row button {
  border: 1px solid var(--stroke);
  border-radius: 8px;
  background: #fff;
  padding: .22rem .45rem;
  cursor: pointer;
}
.ava-cards {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: .45rem;
  padding: .55rem .65rem;
  border-bottom: 1px solid var(--stroke);
  background: linear-gradient(180deg, #ffffff 0%, #f7fbff 100%);
}
.ava-card {
  border: 1px solid var(--stroke-2);
  border-radius: 10px;
  background: #fff;
  padding: .42rem .52rem;
}
.ava-card-title {
  font-size: .66rem;
  font-weight: 700;
  letter-spacing: .05em;
  text-transform: uppercase;
  color: var(--text-light);
}
.ava-card-value {
  font-size: .9rem;
  font-weight: 800;
  color: #0f3b58;
  line-height: 1.25;
}
.ava-card-sub {
  margin-top: .14rem;
  font-size: .7rem;
  color: var(--text-light);
}
.ava-card--signal {
  background: #f3fbff;
  border-color: #bfe2f5;
}
.ava-suggestions {
  display: flex;
  flex-wrap: wrap;
  gap: .35rem;
  padding: .45rem .65rem;
  border-bottom: 1px solid var(--stroke);
  background: #fbfeff;
}
.ava-suggestion-btn {
  border: 1px solid #c8e0f0;
  border-radius: 999px;
  background: #eef8ff;
  color: #0f3b58;
  font-size: .73rem;
  font-weight: 700;
  line-height: 1.25;
  padding: .28rem .55rem;
  cursor: pointer;
}
.ava-suggestion-btn:hover {
  background: #dff1fd;
}
.ava-messages {
  padding: .65rem;
  overflow-y: auto;
  background: #fcfeff;
}
.ava-msg {
  max-width: 90%;
  margin-bottom: .5rem;
  padding: .5rem .62rem;
  border-radius: 10px;
  font-size: .84rem;
  line-height: 1.45;
  white-space: pre-wrap;
  word-wrap: break-word;
  overflow-wrap: break-word;
  word-break: break-word;
}
.ava-msg--assistant {
  background: linear-gradient(180deg, #eef8ff 0%, #e9f5fd 100%);
  border: 1px solid #c4e2f4;
  color: #0b3c57;
}
.ava-msg--user {
  margin-left: auto;
  background: #0E9AA7;
  color: #fff;
}
.ava-input-row {
  display: grid;
  grid-template-columns: 1fr auto;
  gap: .45rem;
  padding: .6rem;
  border-top: 1px solid var(--stroke);
}
.ava-input-row input {
  border: 1px solid var(--stroke);
  border-radius: 8px;
  padding: .45rem .55rem;
  font-size: .84rem;
}
.ava-input-row button {
  border: none;
  border-radius: 8px;
  background: #1E7DB3;
  color: #fff;
  font-weight: 700;
  padding: .45rem .7rem;
  cursor: pointer;
}

.ava-main-insight {
  max-width: 1160px;
  margin: 88px auto 0;
  padding: .95rem 1rem;
  border: 1px solid var(--stroke-2);
  border-radius: 14px;
  background: linear-gradient(180deg, #f9fdff 0%, #eef8ff 100%);
  box-shadow: var(--shadow-sm);
}
.ava-main-insight[hidden] {
  display: none;
}
.ava-main-insight-head {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: .8rem;
}
.ava-main-insight-head h2 {
  font-family: 'Plus Jakarta Sans', sans-serif;
  font-size: 1.05rem;
  color: var(--navy);
}
.ava-main-insight-head p {
  margin-top: .12rem;
  font-size: .82rem;
  color: var(--text-light);
}
#ava-main-insight-close {
  border: none;
  background: transparent;
  color: var(--text-mid);
  font-size: 1.2rem;
  cursor: pointer;
}
.ava-main-insight-grid {
  margin-top: .7rem;
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: .55rem;
}
.ava-main-metric {
  border: 1px solid var(--stroke);
  border-radius: 10px;
  background: #fff;
  padding: .5rem .55rem;
}
.ava-main-metric-label {
  font-size: .7rem;
  color: var(--text-light);
  text-transform: uppercase;
  letter-spacing: .06em;
  font-weight: 700;
}
.ava-main-metric-value {
  font-size: .95rem;
  color: #0f3b58;
  font-weight: 800;
}
.ava-main-insight-summary {
  margin-top: .72rem;
  font-size: .88rem;
  color: var(--text-mid);
  line-height: 1.55;
  white-space: pre-wrap;
}
.ava-main-insight-highlights {
  margin-top: .55rem;
  padding-left: 1rem;
  display: grid;
  gap: .28rem;
  color: var(--text-mid);
  font-size: .85rem;
}

/* ================================================
   SHARED UTILITIES
================================================ */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 0.4rem;
  border-radius: var(--r-full);
  font-family: 'Plus Jakarta Sans', sans-serif;
  font-weight: 700;
  cursor: pointer;
  border: none;
  transition: all var(--t);
  text-decoration: none;
  padding: 0.75rem 1.8rem;
  font-size: 0.95rem;
}
.btn--primary { background: var(--gold); color: var(--navy-deep); box-shadow: 0 4px 16px rgba(240,165,0,.3); }
.btn--primary:hover { background: var(--gold-dark); color: #fff; transform: translateY(-2px); box-shadow: 0 8px 24px rgba(240,165,0,.4); }
.btn--ocean { background: var(--navy); color: #fff; }
.btn--ocean:hover { background: var(--ocean); transform: translateY(-2px); box-shadow: var(--shadow-md); }
.btn--teal { background: var(--teal); color: #fff; }
.btn--teal:hover { background: var(--teal-dark); transform: translateY(-2px); }
.btn--outline { background: transparent; color: var(--navy); border: 2px solid var(--stroke); }
.btn--outline:hover { border-color: var(--ocean); color: var(--ocean); background: rgba(30,125,179,.05); }
.btn--lg { padding: 0.9rem 2.4rem; font-size: 1.05rem; }
.btn--sm { padding: 0.45rem 1.1rem; font-size: 0.82rem; }

/* Status badges */
.badge {
  display: inline-flex;
  align-items: center;
  gap: 0.3rem;
  padding: 0.28rem 0.72rem;
  border-radius: var(--r-full);
  font-size: 0.78rem;
  font-weight: 700;
}
.badge--success { background: #D1FAE5; color: #065F46; border: 1px solid #A7F3D0; }
.badge--danger  { background: #FEE2E2; color: #991B1B; border: 1px solid #FCA5A5; }
.badge--info    { background: #E0F2FE; color: #075985; border: 1px solid #BAE6FD; }
.badge--muted   { background: var(--light-bg); color: var(--text-light); border: 1px solid var(--stroke); }

/* Form shared */
.form-label {
  display: block;
  font-size: 0.76rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.06em;
  color: var(--text-mid);
  margin-bottom: 0.3rem;
}
.form-input,
.form-select {
  width: 100%;
  border: 1.5px solid var(--stroke);
  border-radius: var(--r-sm);
  padding: 0.65rem 0.85rem;
  font-size: 0.93rem;
  font-family: 'Inter', sans-serif;
  color: var(--text-dark);
  background: #fff;
  transition: border-color var(--t), box-shadow var(--t);
}
.form-input:focus,
.form-select:focus { outline: none; border-color: var(--ocean); box-shadow: 0 0 0 3px rgba(30,125,179,.16); }
.form-input::placeholder { color: var(--text-light); }
.form-error { color: #C0152C; font-size: 0.82rem; margin-top: 0.2rem; font-weight: 600; }
.errorlist { list-style: none; padding: 0; }
.errorlist li { color: #C0152C; font-size: 0.82rem; font-weight: 600; margin-top: 0.2rem; }

/* Section layout */
.section { padding: 5.5rem clamp(1rem,4vw,3rem); }
.section-inner { max-width: 1160px; margin: 0 auto; }
.section-label {
  font-size: 0.75rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.1em;
  color: var(--teal);
  margin-bottom: 0.5rem;
}
.section-title {
  font-family: 'Plus Jakarta Sans', sans-serif;
  font-size: clamp(1.75rem, 3vw, 2.6rem);
  font-weight: 800;
  color: var(--navy);
  line-height: 1.18;
  letter-spacing: -0.025em;
  margin-bottom: 0.85rem;
}
.section-sub {
  font-size: 1.05rem;
  color: var(--text-mid);
  max-width: 520px;
  line-height: 1.7;
}
.section-header { margin-bottom: 3rem; }

/* ================================================
   DARK MODE
================================================ */
html[data-theme='dark'],
body[data-theme='dark'] {
  --off-white: #0d1623;
  --light-bg: #152236;
  --light-bg2: #1c2f49;
  --stroke: #2a3b52;
  --stroke-2: #30465f;
  --text-dark: #e6eef7;
  --text-mid: #c2d2e4;
  --text-light: #95a8bf;
}

body[data-theme='dark'] {
  background: #0d1623;
  color: var(--text-dark);
}

body[data-theme='dark'] .site-nav.nav--solid,
body[data-theme='dark'] .site-nav.scrolled {
  background: rgba(5, 13, 25, 0.95);
  border-bottom-color: rgba(255, 255, 255, 0.08);
}

body[data-theme='dark'] .site-footer {
  background: #040b14;
}

body[data-theme='dark'] .panel,
body[data-theme='dark'] .dialog,
body[data-theme='dark'] .listing,
body[data-theme='dark'] .row-card,
body[data-theme='dark'] .map-item,
body[data-theme='dark'] .profile-context-menu,
body[data-theme='dark'] .form-input,
body[data-theme='dark'] .form-select,
body[data-theme='dark'] .btn-lite,
body[data-theme='dark'] .chip {
  background: #122033;
  border-color: #2a3b52;
  color: #e6eef7;
}

body[data-theme='dark'] .l-sub,
body[data-theme='dark'] .results-sub,
body[data-theme='dark'] .form-note,
body[data-theme='dark'] .footer-links a,
body[data-theme='dark'] .footer-tagline,
body[data-theme='dark'] .timeline-item,
body[data-theme='dark'] .chip {
  color: #aabed5;
}

body[data-theme='dark'] .btn--outline {
  border-color: #2a3b52;
  color: #d6e4f3;
}

body[data-theme='dark'] .btn--outline:hover,
body[data-theme='dark'] .btn-lite:hover,
body[data-theme='dark'] .profile-context-item:hover {
  background: #1a3047;
}

body[data-theme='dark'] .session-warning-banner {
  background: rgba(250, 204, 21, 0.12);
  color: #fde68a;
  border-color: rgba(250, 204, 21, 0.56);
}

body[data-theme='dark'] .ava-panel {
  background: #122033;
  border-color: #2a3b52;
}
body[data-theme='dark'] .nav-feedback-icon {
  background: rgba(35, 55, 80, 0.8);
  border-color: #3d5572;
  color: #d6e4f3;
}
body[data-theme='dark'] .feedback-overlay {
  background: rgba(2, 8, 17, 0.68);
}
body[data-theme='dark'] .ava-avatar-launcher img {
  border-color: rgba(90, 120, 150, 0.8);
}
body[data-theme='dark'] .feedback-modal {
  background: #1a3047;
  border-color: #2a3b52;
}
body[data-theme='dark'] .ava-response-text {
  background: #122033;
  border-color: #2a3b52;
  color: #d6e4f3;
}
body[data-theme='dark'] .feedback-head {
  background: #13253a;
  border-color: #2a3b52;
}
body[data-theme='dark'] .feedback-form input,
body[data-theme='dark'] .feedback-form select,
body[data-theme='dark'] .feedback-form textarea {
  background: #122033;
  border-color: #2a3b52;
  color: #e6eef7;
}
body[data-theme='dark'] .ava-head,
body[data-theme='dark'] .ava-messages {
  background: #13253a;
}
body[data-theme='dark'] .ava-session-row,
body[data-theme='dark'] .ava-cards {
  background: #102132;
  border-color: #2a3b52;
}
body[data-theme='dark'] .ava-card {
  background: #182b42;
  border-color: #2d4766;
}
body[data-theme='dark'] .ava-card-value {
  color: #e6eef7;
}
body[data-theme='dark'] .ava-msg--assistant {
  background: #1a3047;
  border-color: #2c4763;
  color: #d6e4f3;
}
body[data-theme='dark'] .ava-main-insight {
  background: linear-gradient(180deg, #13253a 0%, #102132 100%);
  border-color: #2a3b52;
}
body[data-theme='dark'] .ava-main-metric {
  background: #182b42;
  border-color: #2d4766;
}
body[data-theme='dark'] .ava-main-metric-value {
  color: #e6eef7;
}
body[data-theme='dark'] .ava-main-insight-summary,
body[data-theme='dark'] .ava-main-insight-highlights {
  color: #d6e4f3;
}
body[data-theme='dark'] .ava-head-link {
  background: #1a3047;
  color: #d6e4f3;
  border-color: #2a3b52;
}
body[data-theme='dark'] .ava-suggestions {
  background: #102132;
  border-color: #2a3b52;
}
body[data-theme='dark'] .ava-suggestion-btn {
  background: #1a3047;
  border-color: #2c4763;
  color: #d6e4f3;
}
body[data-theme='dark'] .ava-input-row input {
  background: #122033;
  border-color: #2a3b52;
  color: #e6eef7;
}

/* ================================================
   RESPONSIVE
================================================ */
@media (max-width: 1000px) {
  .site-nav { padding: 0 1rem; }
  .nav-btn { padding: 0.4rem .8rem; }
  .footer-grid { grid-template-columns: 1fr 1fr; }
}
@media (max-width: 860px) {
  .nav-center { display: none; }
  .nav-right .nav-btn,
  .nav-right form { display: none; }
  .nav-feedback-icon,
  .nav-user-avatar-link,
  .profile-context-menu { display: none; }
  .nav-hamburger { display: flex; }
  .nav-mobile-menu { display: block; }
  .site-nav.menu-open { background: rgba(7,30,53, 0.98); border-bottom-color: rgba(255,255,255,0.08); }
}
@media (max-width: 640px) {
  .site-nav { height: 64px; }
  .nav-left { gap: .45rem; }
  .nav-brand { font-size: 1.25rem; }
  .nav-logo { width: 26px; height: 26px; }
  .nav-feedback-icon { width: 30px; height: 30px; }
  .nav-user-avatar { width: 30px; height: 30px; }
  .nav-mobile-menu { top: 64px; }
  .nav-mobile-menu { max-height: calc(100dvh - 64px); }
  .nav-mobile-backdrop { inset: 64px 0 0; }
  .site-footer { padding: 3rem 1rem 1.5rem; }
  .footer-bottom { flex-direction: column; align-items: flex-start; }
  .footer-grid { grid-template-columns: 1fr; gap: 1.75rem; }
  .ava-fab-group { right: 8px; bottom: 38px; gap: 8px; }
  .ava-launcher { padding: .42rem .78rem; }
  .ava-avatar-launcher,
  .ava-avatar-launcher img { width: 66px; height: 66px; }
  .ava-panel { left: 8px; right: 8px; bottom: 74px; width: auto; height: min(68dvh, 560px); }
  .feedback-modal { width: calc(100vw - 16px); }
  .ava-cards { grid-template-columns: 1fr; }
  .ava-main-insight { margin-top: 82px; margin-left: .5rem; margin-right: .5rem; }
  .ava-main-insight-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
}
@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { animation-duration:1ms!important; transition-duration:1ms!important; scroll-behavior:auto!important; }
}
