:root {
  --ink: #102033;
  --muted: #5b6778;
  --line: #dbe3ee;
  --panel: rgba(255, 255, 255, 0.9);
  --white: #ffffff;
  --soft: #f4f7fb;
  --brand: #0e73b7;
  --brand-dark: #084c7d;
  --accent: #00a8d6;
  --good: #0f8a5f;
  --warn: #c77700;
  --danger: #b42318;
  --shadow: 0 22px 60px rgba(20, 40, 70, 0.16);
  --radius-lg: 28px;
  --radius-md: 18px;
  --radius-sm: 12px;
  --max: 1220px;
}

* { box-sizing: border-box; }

html { scroll-behavior: smooth; }

body {
  margin: 0;
  font-family: Inter, ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
  color: var(--ink);
  background: linear-gradient(180deg, #eef6fc 0%, #f7f9fc 44%, #ffffff 100%);
  line-height: 1.5;
}

img { max-width: 100%; display: block; }
button, input, select { font: inherit; }
button { cursor: pointer; }

a { color: inherit; }

.skip-link {
  position: absolute;
  top: -100px;
  left: 1rem;
  z-index: 20;
  padding: 0.75rem 1rem;
  background: var(--ink);
  color: var(--white);
  border-radius: var(--radius-sm);
}
.skip-link:focus { top: 1rem; }

.site-hero {
  position: relative;
  overflow: hidden;
  padding: 1.1rem clamp(1rem, 3vw, 2rem) 4rem;
  color: var(--white);
  background:
    radial-gradient(circle at 10% 20%, rgba(0, 168, 214, 0.44), transparent 30%),
    radial-gradient(circle at 78% 24%, rgba(255, 255, 255, 0.22), transparent 26%),
    linear-gradient(135deg, #08243d 0%, #0d5e94 54%, #0e86bd 100%);
}

.site-hero::after {
  content: "";
  position: absolute;
  inset: auto -8rem -12rem auto;
  width: 34rem;
  height: 34rem;
  border-radius: 50%;
  background: rgba(255, 255, 255, 0.08);
}

.topbar, .hero-grid, main, .site-footer {
  width: min(100%, var(--max));
  margin: 0 auto;
}

.topbar {
  position: relative;
  z-index: 2;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
  padding: 0.5rem 0 2.5rem;
}

.brand {
  display: flex;
  align-items: center;
  gap: 0.9rem;
  text-decoration: none;
  font-weight: 800;
  letter-spacing: -0.02em;
}

.brand img {
  width: 170px;
  height: 44px;
  object-fit: contain;
  background: rgba(255,255,255,0.94);
  border-radius: 12px;
  padding: 0.35rem 0.65rem;
}

.top-actions {
  display: flex;
  align-items: center;
  justify-content: flex-end;
  gap: 0.75rem;
  flex-wrap: wrap;
}

.made-india {
  display: inline-flex;
  max-width: 420px;
  padding: 0.55rem 0.85rem;
  border: 1px solid rgba(255,255,255,0.22);
  border-radius: 999px;
  background: rgba(255,255,255,0.12);
  font-size: 0.86rem;
}

.hero-grid {
  position: relative;
  z-index: 2;
  display: grid;
  grid-template-columns: minmax(0, 1.25fr) minmax(320px, 0.75fr);
  gap: clamp(1.25rem, 4vw, 3rem);
  align-items: stretch;
}

.eyebrow {
  margin: 0 0 0.55rem;
  color: var(--brand);
  font-size: 0.76rem;
  font-weight: 800;
  letter-spacing: 0.12em;
  text-transform: uppercase;
}

.site-hero .eyebrow { color: #bdeeff; }

h1, h2, h3, p { margin-top: 0; }

h1 {
  max-width: 780px;
  margin-bottom: 1rem;
  font-size: clamp(2.4rem, 6vw, 5.6rem);
  line-height: 0.95;
  letter-spacing: -0.075em;
}

h2 {
  margin-bottom: 0.5rem;
  font-size: clamp(1.45rem, 2.4vw, 2.25rem);
  line-height: 1.05;
  letter-spacing: -0.04em;
}

h3 {
  margin-bottom: 0.55rem;
  font-size: 1.05rem;
  letter-spacing: -0.02em;
}

.hero-lede {
  max-width: 770px;
  color: rgba(255,255,255,0.84);
  font-size: clamp(1rem, 1.7vw, 1.22rem);
}

.hero-stats {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 0.75rem;
  margin-top: 2rem;
}

.hero-stats span, .preset-card, .filter-panel, .recommendation-card, .product-card, .insight-card, .custom-card, .compare-panel {
  border: 1px solid rgba(255,255,255,0.2);
  box-shadow: var(--shadow);
}

.hero-stats span {
  padding: 1rem;
  border-radius: 18px;
  background: rgba(255,255,255,0.12);
  backdrop-filter: blur(10px);
}

.hero-stats strong {
  display: block;
  font-size: 1.45rem;
  letter-spacing: -0.04em;
}

.hero-stats small { color: rgba(255,255,255,0.76); }

.preset-card {
  padding: clamp(1.2rem, 3vw, 2rem);
  border-radius: var(--radius-lg);
  background: rgba(255,255,255,0.92);
  color: var(--ink);
  backdrop-filter: blur(16px);
}

.preset-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 0.7rem;
  margin: 1.2rem 0;
}

.preset-grid button {
  min-height: 58px;
  padding: 0.75rem;
  border: 1px solid var(--line);
  border-radius: 15px;
  background: linear-gradient(180deg, #ffffff, #eef6fb);
  color: var(--ink);
  font-weight: 750;
  text-align: left;
  transition: transform 0.18s ease, box-shadow 0.18s ease, border-color 0.18s ease;
}

.preset-grid button:hover, .preset-grid button:focus-visible {
  transform: translateY(-2px);
  border-color: var(--accent);
  box-shadow: 0 12px 30px rgba(8, 76, 125, 0.18);
}

.note { color: var(--muted); font-size: 0.9rem; }

main {
  padding: clamp(1rem, 3vw, 2rem);
}

.advisor-section {
  display: grid;
  grid-template-columns: minmax(320px, 0.9fr) minmax(0, 1.1fr);
  gap: 1.25rem;
  margin-top: -3rem;
  align-items: start;
}

.filter-panel, .recommendation-panel, .catalog-section, .insights-section {
  position: relative;
  z-index: 3;
}

.filter-panel, .recommendation-card, .product-card, .insight-card, .custom-card, .compare-panel {
  border-color: rgba(16, 32, 51, 0.08);
  background: var(--panel);
  backdrop-filter: blur(18px);
}

.filter-panel {
  position: sticky;
  top: 1rem;
  padding: clamp(1rem, 2vw, 1.4rem);
  border-radius: var(--radius-lg);
}

.section-heading {
  display: flex;
  align-items: flex-end;
  justify-content: space-between;
  gap: 1rem;
  margin: 4rem 0 1.25rem;
}

.section-heading.compact {
  align-items: flex-start;
  margin: 0 0 1.25rem;
}

.section-heading p { margin-bottom: 0; color: var(--muted); }

.mission-pill, .result-count, .match-pill, .score-ring, .price-line span, .detail-badges span, .tag-cloud span, .budget-status {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  border-radius: 999px;
  font-weight: 800;
  font-size: 0.78rem;
}

.mission-pill {
  padding: 0.55rem 0.75rem;
  color: var(--brand-dark);
  background: #e8f7ff;
}

.control-block {
  padding-top: 1rem;
  border-top: 1px solid var(--line);
  margin-top: 1rem;
}

.control-block label, .catalog-tools label span {
  display: block;
  margin-bottom: 0.45rem;
  color: var(--muted);
  font-weight: 800;
  font-size: 0.83rem;
}

.use-case-list {
  display: grid;
  grid-template-columns: 1fr;
  gap: 0.55rem;
  max-height: 390px;
  overflow: auto;
  padding-right: 0.15rem;
}

.use-case-chip {
  display: flex;
  align-items: flex-start;
  gap: 0.75rem;
  width: 100%;
  padding: 0.75rem;
  border: 1px solid var(--line);
  border-radius: 16px;
  background: #fff;
  text-align: left;
  transition: border-color 0.18s ease, transform 0.18s ease, background 0.18s ease;
}

.use-case-chip:hover, .use-case-chip:focus-visible { transform: translateY(-1px); border-color: var(--accent); }
.use-case-chip[aria-pressed="true"] { border-color: rgba(14,115,183,0.55); background: linear-gradient(180deg, #e9f7ff, #ffffff); box-shadow: inset 4px 0 0 var(--brand); }
.use-case-chip strong { display: block; line-height: 1.2; }
.use-case-chip small { display: block; color: var(--muted); margin-top: 0.2rem; line-height: 1.25; }
.chip-icon { font-size: 1.2rem; line-height: 1; }

.two-col, .slider-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 1rem;
}

.slider-grid { grid-template-columns: 1fr; }

output {
  display: block;
  margin-bottom: 0.5rem;
  font-weight: 900;
  color: var(--brand-dark);
}

input[type="range"] {
  width: 100%;
  accent-color: var(--brand);
}

input[type="number"], input[type="search"], select {
  width: 100%;
  min-height: 46px;
  border: 1px solid var(--line);
  border-radius: 14px;
  background: #fff;
  color: var(--ink);
  padding: 0.7rem 0.85rem;
  outline: none;
}

input:focus, select:focus, button:focus-visible { outline: 3px solid rgba(0,168,214,0.25); outline-offset: 2px; }

.checkbox-line {
  display: flex;
  align-items: center;
  gap: 0.55rem;
  margin-top: 1rem;
  font-weight: 700;
  color: var(--muted);
}

.filter-actions, .card-actions, .recommendation-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 0.65rem;
  margin-top: 1.2rem;
}

.primary, .secondary, .icon-button {
  border: 0;
  border-radius: 999px;
  font-weight: 900;
  transition: transform 0.18s ease, box-shadow 0.18s ease, background 0.18s ease;
}

.primary {
  padding: 0.85rem 1.1rem;
  color: #fff;
  background: linear-gradient(135deg, var(--brand), var(--accent));
  box-shadow: 0 12px 26px rgba(14,115,183,0.26);
}

.secondary {
  padding: 0.85rem 1.1rem;
  color: var(--brand-dark);
  background: #e9f7ff;
  border: 1px solid rgba(14,115,183,0.16);
}

.primary.small, .secondary.small {
  padding: 0.62rem 0.86rem;
  font-size: 0.86rem;
}

.primary:hover, .secondary:hover, .icon-button:hover { transform: translateY(-2px); }

.recommendation-card {
  display: grid;
  grid-template-columns: minmax(260px, 0.82fr) minmax(0, 1.18fr);
  gap: clamp(1rem, 3vw, 1.5rem);
  min-height: 100%;
  padding: clamp(1rem, 2vw, 1.4rem);
  border-radius: var(--radius-lg);
}

.recommendation-media {
  position: relative;
  min-height: 390px;
  overflow: hidden;
  border-radius: 22px;
  background: #dceaf3;
}

.recommendation-media img, .card-media img, .detail-hero img, .payload-card img, .controller-card img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.score-ring {
  position: absolute;
  right: 1rem;
  bottom: 1rem;
  flex-direction: column;
  width: 96px;
  height: 96px;
  color: var(--white);
  background: rgba(8,36,61,0.86);
  border: 3px solid rgba(255,255,255,0.36);
}

.score-ring strong { font-size: 1.75rem; line-height: 1; }
.score-ring small { color: rgba(255,255,255,0.78); }

.recommendation-copy { padding: 0.35rem 0.15rem; }
.recommendation-copy h2 { font-size: clamp(1.8rem, 3vw, 3rem); }
.recommendation-copy p:not(.eyebrow) { color: var(--muted); }

.selected-package {
  padding: 1rem;
  margin: 1rem 0;
  border: 1px solid rgba(14,115,183,0.18);
  border-radius: 18px;
  background: linear-gradient(180deg, #f3fbff, #fff);
}

.selected-package span, .recommended-variant span {
  display: block;
  color: var(--muted);
  font-size: 0.78rem;
  font-weight: 900;
  text-transform: uppercase;
  letter-spacing: 0.08em;
}
.selected-package strong, .recommended-variant strong { display: block; margin-top: 0.25rem; }
.selected-package em { display: block; margin-top: 0.2rem; color: var(--brand-dark); font-style: normal; font-weight: 850; }

.reason-grid {
  display: flex;
  flex-wrap: wrap;
  gap: 0.5rem;
}

.reason {
  display: inline-flex;
  padding: 0.48rem 0.65rem;
  border-radius: 999px;
  font-size: 0.82rem;
  font-weight: 800;
}
.reason.good { color: var(--good); background: #e8f8f0; }
.reason.caution { color: var(--warn); background: #fff5df; }

.catalog-tools {
  display: grid;
  grid-template-columns: minmax(220px, 1fr) minmax(180px, 0.5fr) auto;
  gap: 0.75rem;
  align-items: end;
  min-width: min(100%, 620px);
}

.result-count {
  min-height: 46px;
  padding: 0 0.85rem;
  color: var(--brand-dark);
  background: #e9f7ff;
  white-space: nowrap;
}

.product-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 1rem;
}

.product-card {
  overflow: hidden;
  border-radius: var(--radius-lg);
  transition: transform 0.18s ease, box-shadow 0.18s ease;
}
.product-card:hover { transform: translateY(-4px); box-shadow: 0 26px 70px rgba(20,40,70,0.18); }

.card-media {
  position: relative;
  height: 250px;
  overflow: hidden;
  background: #dfeef8;
}
.match-pill {
  position: absolute;
  left: 1rem;
  top: 1rem;
  padding: 0.45rem 0.7rem;
  color: #fff;
  background: rgba(8,36,61,0.82);
}

.card-body { padding: 1rem; }
.card-title-row { display: flex; justify-content: space-between; gap: 0.75rem; }
.card-title-row h3 { margin-bottom: 0; font-size: 1.22rem; }
.card-description { color: var(--muted); font-size: 0.94rem; min-height: 4.2rem; }

.icon-button {
  flex: 0 0 auto;
  width: 42px;
  height: 42px;
  color: #fff;
  background: var(--brand);
  font-size: 1.25rem;
}

.price-line {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 0.8rem;
  padding: 0.8rem 0;
  border-top: 1px solid var(--line);
  border-bottom: 1px solid var(--line);
}
.price-line strong { font-size: 1.05rem; color: var(--brand-dark); }
.price-line span { padding: 0.35rem 0.55rem; }
.price-line.budget-ok span { color: var(--good); background: #e8f8f0; }
.price-line.budget-gap span { color: var(--warn); background: #fff5df; }

.recommended-variant {
  padding: 0.85rem 0;
}

.mini-specs {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 0.55rem;
}
.mini-specs span {
  min-height: 76px;
  padding: 0.7rem;
  border-radius: 14px;
  background: var(--soft);
}
.mini-specs b { display: block; font-size: 0.9rem; }
.mini-specs small { display: block; margin-top: 0.25rem; color: var(--muted); }

.caution-list {
  display: flex;
  flex-wrap: wrap;
  gap: 0.4rem;
  margin-top: 0.8rem;
}
.caution-list span {
  padding: 0.35rem 0.5rem;
  color: var(--warn);
  background: #fff5df;
  border-radius: 999px;
  font-size: 0.78rem;
  font-weight: 800;
}

.score-bar {
  height: 8px;
  margin: 1rem 0 0;
  overflow: hidden;
  border-radius: 999px;
  background: #e2e8f0;
}
.score-bar span { display: block; height: 100%; background: linear-gradient(90deg, var(--brand), var(--accent)); }

.compare-panel {
  margin-top: 2rem;
  padding: 1.2rem;
  border-radius: var(--radius-lg);
}
.compare-panel.is-hidden { display: none; }

.insight-grid {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(240px, 0.7fr) minmax(240px, 0.7fr);
  gap: 1rem;
}
.insight-card {
  overflow: hidden;
  padding: 1rem;
  border-radius: var(--radius-lg);
}
.insight-card p { color: var(--muted); }
.payload-card img, .controller-card img {
  height: 210px;
  margin: 0.75rem 0;
  border-radius: 18px;
  background: #e9f2f8;
}

.budget-ladder {
  display: grid;
  gap: 0.55rem;
  margin-top: 1rem;
}
.budget-row {
  display: grid;
  grid-template-columns: 92px minmax(80px, 1fr) 130px 72px;
  align-items: center;
  gap: 0.7rem;
  width: 100%;
  padding: 0.62rem;
  border: 1px solid var(--line);
  border-radius: 14px;
  background: #fff;
  text-align: left;
}
.budget-name { font-weight: 900; }
.budget-track {
  height: 10px;
  overflow: hidden;
  border-radius: 999px;
  background: #e2e8f0;
}
.budget-track i { display: block; height: 100%; border-radius: 999px; background: linear-gradient(90deg, var(--brand), var(--accent)); }
.budget-price { font-weight: 850; color: var(--brand-dark); }
.budget-status { padding: 0.3rem 0.45rem; }
.budget-row.unlocked .budget-status { color: var(--good); background: #e8f8f0; }
.budget-row.locked .budget-status { color: var(--warn); background: #fff5df; }

.customization-section { margin-top: 1.2rem; }
.customization-grid {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 1rem;
}
.custom-card {
  padding: 1rem;
  border-radius: var(--radius-md);
}
.custom-card.highlight { border-color: rgba(14,115,183,0.32); background: linear-gradient(180deg, #eaf8ff, #fff); }
.custom-card p { color: var(--muted); }

.tag-cloud {
  display: flex;
  flex-wrap: wrap;
  gap: 0.45rem;
}
.tag-cloud span {
  padding: 0.38rem 0.55rem;
  color: var(--brand-dark);
  background: #e9f7ff;
}
.small-tags span { font-size: 0.72rem; }

.table-wrap { width: 100%; overflow-x: auto; }
table { width: 100%; border-collapse: collapse; min-width: 620px; }
th, td { padding: 0.75rem; border-bottom: 1px solid var(--line); text-align: left; vertical-align: top; }
th { color: var(--muted); font-size: 0.82rem; text-transform: uppercase; letter-spacing: 0.06em; }
tr.selected-row { background: #eef9ff; }
.compare-table td:first-child { font-weight: 900; color: var(--brand-dark); }

.details-dialog {
  width: min(1060px, calc(100% - 2rem));
  max-height: 90vh;
  padding: 0;
  border: 0;
  border-radius: 28px;
  box-shadow: 0 30px 90px rgba(2, 6, 23, 0.32);
}
.details-dialog::backdrop { background: rgba(2, 6, 23, 0.62); backdrop-filter: blur(6px); }
.dialog-close {
  position: sticky;
  top: 0.8rem;
  float: right;
  z-index: 5;
  width: 42px;
  height: 42px;
  margin: 0.8rem 0.8rem 0 0;
  border: 0;
  border-radius: 999px;
  color: var(--ink);
  background: #fff;
  box-shadow: 0 10px 28px rgba(15,23,42,0.16);
  font-size: 1.6rem;
  line-height: 1;
}
#detailsBody { padding: 1.1rem; }
.detail-hero {
  display: grid;
  grid-template-columns: minmax(260px, 0.8fr) minmax(0, 1.2fr);
  gap: 1.2rem;
  align-items: stretch;
}
.detail-hero img {
  min-height: 340px;
  border-radius: 22px;
  background: #e9f2f8;
}
.detail-hero p:not(.eyebrow), .detail-grid p { color: var(--muted); }
.detail-badges { display: flex; flex-wrap: wrap; gap: 0.5rem; margin: 1rem 0; }
.detail-badges span { padding: 0.44rem 0.65rem; background: #e9f7ff; color: var(--brand-dark); }
.detail-grid {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(0, 1fr);
  gap: 1rem;
  margin-top: 1rem;
}
.spec-list {
  display: grid;
  gap: 0.55rem;
}
.spec-list div {
  display: grid;
  grid-template-columns: 150px minmax(0, 1fr);
  gap: 0.7rem;
  padding: 0.7rem;
  border: 1px solid var(--line);
  border-radius: 14px;
  background: var(--soft);
}
.spec-list dt { color: var(--muted); font-weight: 800; }
.spec-list dd { margin: 0; font-weight: 750; }
.capability-list {
  display: grid;
  gap: 0.5rem;
  padding: 0;
  list-style: none;
}
.capability-list li {
  padding: 0.65rem 0.75rem;
  border-radius: 14px;
  background: #eff8ff;
  color: var(--brand-dark);
  font-weight: 760;
}
.variants-section { margin-top: 1.2rem; }
.in-dialog { margin-bottom: 0; }

.empty-state {
  display: grid;
  place-items: center;
  min-height: 260px;
  padding: 2rem;
  border: 1px dashed var(--line);
  border-radius: var(--radius-lg);
  background: #fff;
  text-align: center;
}
.empty-state.wide { grid-column: 1 / -1; }
.empty-state p { color: var(--muted); }

.site-footer {
  display: grid;
  grid-template-columns: minmax(260px, 1fr) minmax(240px, 0.8fr) minmax(220px, 0.6fr);
  gap: 1.5rem;
  padding: 3rem clamp(1rem, 3vw, 2rem);
  color: #dceaf3;
  background: #071d32;
  max-width: none;
  width: 100%;
}
.site-footer > * { width: min(100%, 390px); }
.site-footer img { width: 180px; padding: 0.4rem 0.6rem; border-radius: 12px; background: #fff; margin-bottom: 1rem; }
.site-footer p, .site-footer address { color: #bfd1de; font-style: normal; }
.site-footer code { color: #fff; background: rgba(255,255,255,0.12); padding: 0.1rem 0.25rem; border-radius: 6px; }

@media (max-width: 1100px) {
  .hero-grid, .advisor-section, .recommendation-card, .insight-grid { grid-template-columns: 1fr; }
  .filter-panel { position: static; }
  .product-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .customization-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .recommendation-media { min-height: 310px; }
}

@media (max-width: 760px) {
  .site-hero { padding-bottom: 2rem; }
  .topbar, .top-actions, .section-heading, .catalog-tools, .site-footer { align-items: stretch; grid-template-columns: 1fr; flex-direction: column; }
  .brand { align-items: flex-start; flex-direction: column; }
  .hero-stats, .preset-grid, .product-grid, .customization-grid, .detail-hero, .detail-grid, .two-col { grid-template-columns: 1fr; }
  .advisor-section { margin-top: 0; }
  .catalog-tools { display: grid; }
  .budget-row { grid-template-columns: 82px 1fr; }
  .budget-price, .budget-status { justify-self: start; }
  .spec-list div { grid-template-columns: 1fr; }
  h1 { letter-spacing: -0.055em; }
}

@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { scroll-behavior: auto !important; transition: none !important; }
}

/* AI Drone Advisor chatbot */
.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;
}

.ai-advisor {
  position: fixed;
  right: clamp(0.75rem, 2vw, 1.4rem);
  bottom: clamp(0.75rem, 2vw, 1.4rem);
  z-index: 90;
  color: var(--ink);
}

.ai-launcher {
  display: flex;
  align-items: center;
  gap: 0.72rem;
  min-width: 245px;
  padding: 0.74rem 0.92rem;
  border: 1px solid rgba(255,255,255,0.35);
  border-radius: 999px;
  color: #fff;
  background: linear-gradient(135deg, #07345c, var(--brand), var(--accent));
  box-shadow: 0 22px 55px rgba(8, 76, 125, 0.35);
}

.ai-orb, .ai-avatar {
  display: grid;
  place-items: center;
  flex: 0 0 auto;
  border-radius: 999px;
  font-weight: 950;
  letter-spacing: -0.04em;
}

.ai-orb {
  width: 44px;
  height: 44px;
  color: var(--brand-dark);
  background: #fff;
  box-shadow: inset 0 0 0 5px rgba(0,168,214,0.13);
}

.ai-launcher-text {
  display: grid;
  text-align: left;
  line-height: 1.15;
}
.ai-launcher-text small { color: rgba(255,255,255,0.78); }

.ai-panel {
  position: absolute;
  right: 0;
  bottom: calc(100% + 0.85rem);
  display: grid;
  grid-template-rows: auto auto minmax(260px, 1fr) auto auto;
  width: min(430px, calc(100vw - 2rem));
  max-height: min(760px, calc(100vh - 7rem));
  overflow: hidden;
  border: 1px solid rgba(16,32,51,0.12);
  border-radius: 28px;
  background: rgba(255,255,255,0.96);
  box-shadow: 0 30px 90px rgba(2, 6, 23, 0.28);
  backdrop-filter: blur(20px);
}
.ai-panel[hidden] { display: none; }

.ai-panel-header {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 1rem;
  padding: 1rem;
  color: #fff;
  background: linear-gradient(135deg, #071d32, #0d5e94 58%, #0e86bd);
}

.ai-panel-header h2 {
  margin: 0 0 0.22rem;
  font-size: 1.15rem;
  letter-spacing: -0.03em;
}
.ai-panel-header span { display: block; color: rgba(255,255,255,0.78); font-size: 0.82rem; }
.ai-kicker {
  margin: 0 0 0.2rem;
  color: #bdeeff;
  font-size: 0.68rem;
  font-weight: 900;
  letter-spacing: 0.13em;
  text-transform: uppercase;
}

.ai-close {
  width: 38px;
  height: 38px;
  border: 0;
  border-radius: 999px;
  color: var(--ink);
  background: #fff;
  font-size: 1.35rem;
  line-height: 1;
}

.ai-quick-prompts {
  display: flex;
  gap: 0.5rem;
  overflow-x: auto;
  padding: 0.75rem 0.85rem;
  border-bottom: 1px solid var(--line);
}
.ai-quick-prompts button,
.ai-inline-actions button {
  flex: 0 0 auto;
  padding: 0.52rem 0.68rem;
  border: 1px solid rgba(14,115,183,0.16);
  border-radius: 999px;
  color: var(--brand-dark);
  background: #e9f7ff;
  font-size: 0.78rem;
  font-weight: 850;
}

.ai-messages {
  display: flex;
  flex-direction: column;
  gap: 0.78rem;
  overflow-y: auto;
  padding: 0.9rem;
  background: linear-gradient(180deg, #f6faff, #fff);
}

.ai-message {
  display: flex;
  gap: 0.55rem;
  align-items: flex-start;
}
.ai-message.user { justify-content: flex-end; }
.ai-avatar {
  width: 32px;
  height: 32px;
  color: #fff;
  background: linear-gradient(135deg, var(--brand), var(--accent));
  font-size: 0.78rem;
}
.ai-bubble {
  max-width: 88%;
  padding: 0.78rem;
  border: 1px solid rgba(16,32,51,0.08);
  border-radius: 18px;
  background: #fff;
  box-shadow: 0 10px 26px rgba(15,23,42,0.07);
  font-size: 0.9rem;
}
.ai-message.user .ai-bubble {
  color: #fff;
  background: linear-gradient(135deg, var(--brand-dark), var(--brand));
  border-color: transparent;
  border-bottom-right-radius: 6px;
}
.ai-message.bot .ai-bubble { border-bottom-left-radius: 6px; }
.ai-bubble p { margin: 0 0 0.62rem; }
.ai-bubble p:last-child { margin-bottom: 0; }

.ai-form {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  gap: 0.55rem;
  padding: 0.8rem;
  border-top: 1px solid var(--line);
  background: #fff;
}
.ai-form input {
  min-height: 44px;
  border: 1px solid var(--line);
  border-radius: 999px;
  padding: 0.72rem 0.9rem;
}
.ai-form button {
  border: 0;
  border-radius: 999px;
  padding: 0.72rem 0.95rem;
  color: #fff;
  background: linear-gradient(135deg, var(--brand), var(--accent));
  font-weight: 900;
}

.ai-disclaimer {
  margin: 0;
  padding: 0 0.9rem 0.8rem;
  color: var(--muted);
  background: #fff;
  font-size: 0.72rem;
}

.ai-inline-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 0.45rem;
  margin-top: 0.72rem;
}
.ai-list {
  margin: 0.25rem 0 0.7rem;
  padding-left: 1.1rem;
  color: var(--muted);
}
.ai-list li + li { margin-top: 0.25rem; }

.ai-top-card {
  display: grid;
  grid-template-columns: 112px minmax(0, 1fr);
  gap: 0.72rem;
  padding: 0.72rem;
  border: 1px solid var(--line);
  border-radius: 18px;
  background: #f8fbff;
}
.ai-top-card img {
  width: 112px;
  height: 132px;
  object-fit: cover;
  border-radius: 14px;
  background: #e9f2f8;
}
.ai-top-card h3 { margin: 0.2rem 0 0.25rem; }
.ai-top-card dl {
  display: grid;
  gap: 0.3rem;
  margin: 0.55rem 0 0;
}
.ai-top-card dl div {
  display: grid;
  grid-template-columns: 66px minmax(0, 1fr);
  gap: 0.4rem;
}
.ai-top-card dt {
  color: var(--muted);
  font-size: 0.72rem;
  font-weight: 800;
}
.ai-top-card dd {
  margin: 0;
  font-size: 0.78rem;
  font-weight: 800;
}
.ai-score {
  display: inline-flex;
  padding: 0.24rem 0.46rem;
  border-radius: 999px;
  color: var(--good);
  background: #e8f8f0;
  font-size: 0.72rem;
  font-weight: 900;
}
.ai-small-title {
  margin-top: 0.8rem !important;
  color: var(--brand-dark);
  font-weight: 900;
}
.ai-option-list {
  display: grid;
  gap: 0.5rem;
}
.ai-option-list article,
.ai-contact-card,
.ai-custom-grid article {
  display: grid;
  gap: 0.22rem;
  padding: 0.68rem;
  border: 1px solid var(--line);
  border-radius: 14px;
  background: #fff;
}
.ai-option-list strong {
  display: flex;
  justify-content: space-between;
  gap: 0.6rem;
}
.ai-option-list small,
.ai-option-list em,
.ai-custom-grid span,
.ai-contact-card span,
.ai-human-note,
.ai-caution {
  color: var(--muted);
  font-size: 0.8rem;
}
.ai-option-list em { font-style: normal; }
.ai-caution {
  padding: 0.55rem;
  border-radius: 12px;
  color: var(--warn);
  background: #fff7e6;
}

.ai-table-wrap {
  width: 100%;
  overflow-x: auto;
  margin: 0.4rem 0 0.7rem;
}
.ai-table {
  width: 100%;
  min-width: 520px;
  border-collapse: collapse;
  font-size: 0.78rem;
}
.ai-table th,
.ai-table td {
  padding: 0.52rem;
  border-bottom: 1px solid var(--line);
  text-align: left;
  vertical-align: top;
}
.ai-table th {
  color: var(--muted);
  text-transform: uppercase;
  letter-spacing: 0.05em;
}
.ai-table td:first-child { font-weight: 900; color: var(--brand-dark); }

.ai-spec-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 0.48rem;
  margin: 0.6rem 0;
}
.ai-spec-grid span {
  display: grid;
  gap: 0.18rem;
  padding: 0.62rem;
  border-radius: 13px;
  background: #eef9ff;
}
.ai-spec-grid small { color: var(--muted); }
.ai-custom-grid {
  display: grid;
  gap: 0.5rem;
  margin: 0.45rem 0 0.7rem;
}
.ai-brief {
  max-height: 210px;
  overflow: auto;
  padding: 0.7rem;
  border-radius: 12px;
  background: #f1f5f9;
  white-space: pre-wrap;
  font: 0.78rem/1.4 ui-monospace, SFMono-Regular, Menlo, Consolas, monospace;
}

.ai-typing {
  display: flex;
  gap: 0.3rem;
  align-items: center;
  min-width: 70px;
}
.ai-typing span {
  width: 7px;
  height: 7px;
  border-radius: 999px;
  background: var(--brand);
  animation: aiTyping 1s infinite ease-in-out;
}
.ai-typing span:nth-child(2) { animation-delay: 0.15s; }
.ai-typing span:nth-child(3) { animation-delay: 0.3s; }
@keyframes aiTyping {
  0%, 80%, 100% { transform: translateY(0); opacity: 0.42; }
  40% { transform: translateY(-4px); opacity: 1; }
}

@media (max-width: 760px) {
  .ai-advisor {
    left: 0.55rem;
    right: 0.55rem;
    bottom: 0.55rem;
  }
  .ai-launcher {
    width: 100%;
    justify-content: center;
  }
  .ai-panel {
    position: fixed;
    left: 0.55rem;
    right: 0.55rem;
    bottom: 5.25rem;
    width: auto;
    max-height: calc(100vh - 6rem);
    border-radius: 22px;
  }
  .ai-top-card,
  .ai-spec-grid {
    grid-template-columns: 1fr;
  }
  .ai-top-card img {
    width: 100%;
    height: 170px;
  }
  .ai-bubble { max-width: 92%; }
}

@media (prefers-reduced-motion: reduce) {
  .ai-typing span { animation: none; }
}
