:root {
  --ink: #172743;
  --muted: #70819d;
  --soft: #9aaac1;
  --line: rgba(112, 129, 157, 0.18);
  --panel: rgba(255, 255, 255, 0.74);
  --panel-strong: rgba(255, 255, 255, 0.9);
  --blue: #5aa9f4;
  --blue-deep: #3e7ee8;
  --mint: #63d7bf;
  --green: #8de0c6;
  --yellow: #ffd98f;
  --purple: #a99af6;
  --pink: #ff91af;
  --shadow: 0 24px 70px rgba(57, 97, 137, 0.16);
  --shadow-soft: 0 16px 42px rgba(57, 97, 137, 0.1);
  font-family:
    Inter, ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI",
    "Microsoft YaHei", sans-serif;
}

* {
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
}

body {
  margin: 0;
  color: var(--ink);
  min-width: 320px;
  background:
    radial-gradient(circle at 8% 8%, rgba(118, 220, 226, 0.54), transparent 32rem),
    radial-gradient(circle at 94% 4%, rgba(171, 226, 169, 0.54), transparent 34rem),
    radial-gradient(circle at 52% 92%, rgba(143, 193, 241, 0.3), transparent 35rem),
    #f4fafb;
}

button,
input,
select {
  font: inherit;
}

button {
  cursor: pointer;
}

a {
  color: inherit;
  text-decoration: none;
}

.ambient-bg {
  position: fixed;
  inset: 0;
  pointer-events: none;
  background:
    linear-gradient(115deg, rgba(255, 255, 255, 0.52), transparent 46%),
    radial-gradient(circle at 76% 45%, rgba(255, 218, 143, 0.18), transparent 14rem);
  z-index: -1;
}

.app-shell {
  width: min(1760px, calc(100% - 48px));
  margin: 28px auto;
  display: grid;
  grid-template-columns: 176px minmax(0, 1fr) 440px;
  gap: 22px;
  align-items: start;
}

.glass-panel,
.side-rail {
  background: var(--panel);
  border: 1px solid rgba(255, 255, 255, 0.76);
  box-shadow: var(--shadow);
  backdrop-filter: blur(24px);
}

.side-rail {
  position: sticky;
  top: 28px;
  min-height: calc(100vh - 56px);
  border-radius: 28px;
  padding: 28px 20px;
  display: flex;
  flex-direction: column;
  gap: 28px;
}

.brand-mark {
  display: flex;
  gap: 12px;
  align-items: center;
}

.brand-icon {
  width: 38px;
  height: 38px;
  display: grid;
  place-items: center;
  color: white;
  font-weight: 900;
  border-radius: 12px;
  background: linear-gradient(140deg, var(--blue), var(--mint));
  box-shadow: 0 14px 30px rgba(90, 169, 244, 0.28);
}

.brand-mark p,
.brand-mark small {
  margin: 0;
}

.brand-mark p {
  font-weight: 900;
  letter-spacing: 0;
}

.brand-mark small {
  color: var(--muted);
}

.rail-nav {
  display: grid;
  gap: 12px;
}

.rail-link {
  border: 0;
  display: flex;
  align-items: center;
  gap: 12px;
  height: 48px;
  padding: 0 14px;
  color: #36506f;
  font-weight: 800;
  border-radius: 18px;
  background: transparent;
  width: 100%;
  text-align: left;
}

.rail-link.active,
.rail-link:hover {
  background: rgba(255, 255, 255, 0.8);
  color: var(--ink);
  box-shadow: var(--shadow-soft);
}

.rail-note {
  margin-top: auto;
  padding: 20px 16px;
  border-radius: 24px;
  background:
    linear-gradient(155deg, rgba(255, 255, 255, 0.9), rgba(255, 255, 255, 0.46)),
    radial-gradient(circle at 95% 100%, rgba(255, 145, 175, 0.26), transparent 5rem),
    radial-gradient(circle at 20% 100%, rgba(90, 169, 244, 0.24), transparent 6rem);
}

.rail-note span {
  display: block;
  width: 7px;
  height: 7px;
  border-radius: 99px;
  background: var(--blue);
  margin-bottom: 12px;
}

.rail-note p {
  margin: 0;
  color: #51637d;
  font-weight: 700;
  line-height: 1.65;
  font-size: 13px;
}

.icon {
  width: 18px;
  height: 18px;
  position: relative;
  flex: 0 0 auto;
  display: inline-block;
}

.icon::before,
.icon::after {
  content: "";
  position: absolute;
  inset: 2px;
  border: 2px solid currentColor;
  border-radius: 5px;
}

.icon.home::after {
  inset: auto 4px 2px;
  height: 7px;
  border-top: 0;
}

.icon.home::before {
  transform: rotate(45deg);
  inset: 4px;
  border-radius: 3px;
}

.icon.rank::before {
  inset: 3px 11px 3px 2px;
}

.icon.rank::after {
  inset: 7px 3px 3px 10px;
}

.icon.grid::before {
  inset: 2px;
}

.icon.grid::after {
  inset: 2px 8px;
  border-top: 0;
  border-bottom: 0;
  border-radius: 0;
}

.icon.radar::before {
  border-radius: 50%;
}

.icon.radar::after {
  inset: 7px;
  background: currentColor;
  border: 0;
  border-radius: 50%;
}

.icon.search::before {
  border-radius: 50%;
  inset: 1px 5px 5px 1px;
}

.icon.search::after {
  inset: auto 1px 1px auto;
  width: 7px;
  height: 2px;
  border: 0;
  border-radius: 0;
  background: currentColor;
  transform: rotate(45deg);
  transform-origin: center;
}

.icon.refresh::before {
  border-radius: 50%;
  border-right-color: transparent;
}

.icon.refresh::after {
  inset: 2px 1px auto auto;
  width: 0;
  height: 0;
  border-style: solid;
  border-width: 4px 0 4px 6px;
  border-color: transparent transparent transparent currentColor;
  border-radius: 0;
}

.icon.close::before,
.icon.close::after {
  inset: 8px 2px auto 2px;
  height: 2px;
  border: 0;
  border-radius: 0;
  background: currentColor;
}

.icon.close::before {
  transform: rotate(45deg);
}

.icon.close::after {
  transform: rotate(-45deg);
}

.workspace {
  display: grid;
  gap: 24px;
  min-width: 0;
}

.tool-workspace {
  grid-template-columns: 1fr;
  align-items: start;
}

.view-panel {
  display: none;
}

.view-panel.active {
  display: grid;
  gap: 22px;
}

.hero-panel {
  min-height: 330px;
  border-radius: 30px;
  padding: clamp(28px, 3.2vw, 42px);
  position: relative;
  overflow: hidden;
  display: grid;
  grid-template-columns: minmax(0, 1fr) 360px;
  gap: 28px;
}

.hero-panel::before,
.hero-panel::after {
  content: "";
  position: absolute;
  border-radius: 50%;
  pointer-events: none;
}

.hero-panel::before {
  width: 76px;
  height: 76px;
  right: 82px;
  top: 48px;
  background: rgba(255, 217, 143, 0.78);
}

.hero-panel::after {
  width: 460px;
  height: 210px;
  right: -80px;
  bottom: -60px;
  background: linear-gradient(155deg, rgba(80, 166, 232, 0.18), rgba(89, 203, 228, 0.38));
  border-radius: 100% 0 0 0;
  transform: rotate(-12deg);
}

.hero-copy {
  position: relative;
  z-index: 1;
  align-self: center;
  max-width: 720px;
}

.eyebrow {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  min-height: 44px;
  padding: 0 22px;
  border-radius: 22px;
  background: rgba(255, 255, 255, 0.7);
  color: #405775;
  font-weight: 900;
  box-shadow: 0 18px 46px rgba(88, 147, 194, 0.12);
}

.eyebrow span {
  width: 15px;
  height: 15px;
  border: 3px solid var(--mint);
  border-top-color: transparent;
  border-right-color: transparent;
  border-radius: 50%;
  transform: rotate(-35deg);
}

.hero-copy h1 {
  margin: 26px 0 16px;
  max-width: 760px;
  font-size: clamp(34px, 3.2vw, 52px);
  line-height: 1.08;
  letter-spacing: 0;
  color: #112342;
}

.hero-copy p {
  margin: 0;
  max-width: 620px;
  color: #516780;
  font-size: 18px;
  line-height: 1.65;
  font-weight: 800;
}

.quick-actions {
  margin-top: 28px;
  display: flex;
  gap: 14px;
  flex-wrap: wrap;
}

.primary-action,
.ghost-action {
  min-height: 52px;
  border: 0;
  border-radius: 26px;
  padding: 0 24px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  color: #20344f;
  font-weight: 900;
  background: rgba(255, 255, 255, 0.82);
  box-shadow: var(--shadow-soft);
}

.primary-action {
  color: white;
  background: linear-gradient(135deg, var(--blue-deep), var(--mint));
}

.hero-visual {
  z-index: 1;
  align-self: stretch;
  display: grid;
  align-content: end;
  gap: 18px;
}

.signal-card {
  margin-left: auto;
  width: min(320px, 100%);
  border-radius: 24px;
  padding: 18px;
  background: rgba(255, 255, 255, 0.72);
  box-shadow: var(--shadow-soft);
}

.signal-card span,
.signal-card small {
  color: var(--muted);
  font-weight: 800;
}

.signal-card strong {
  display: block;
  margin: 10px 0 6px;
  font-size: 24px;
  line-height: 1.2;
}

.wave-chart {
  min-height: 150px;
  border-radius: 24px;
  background: rgba(255, 255, 255, 0.52);
  overflow: hidden;
}

.wave-chart svg {
  width: 100%;
  height: 100%;
  display: block;
}

.wave {
  opacity: 0.82;
}

.wave-a {
  fill: #94e3d8;
}

.wave-b {
  fill: #8fcaf2;
}

.wave-c {
  fill: #71b3eb;
}

.spark-row {
  display: flex;
  gap: 10px;
  justify-content: flex-end;
}

.spark-row span {
  width: 10px;
  height: 10px;
  border-radius: 99px;
  background: var(--blue);
}

.spark-row span:nth-child(1) {
  background: var(--mint);
}

.spark-row span:nth-child(3) {
  background: var(--yellow);
}

.spark-row span:nth-child(4) {
  background: var(--purple);
}

.stats-strip {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 18px;
}

.stats-strip article {
  border-radius: 20px;
  padding: 18px 22px;
}

.stats-strip span,
.stats-strip small,
.section-head span,
.panel-title span {
  color: var(--muted);
  font-weight: 800;
}

.stats-strip strong {
  display: block;
  margin: 6px 0;
  font-size: 30px;
}

.glass-panel {
  border-radius: 26px;
  padding: 24px;
}

.panel-title,
.section-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 18px;
}

.panel-title h2,
.section-head h2 {
  margin: 4px 0 0;
  font-size: 28px;
  line-height: 1.15;
}

.panel-title h1 {
  margin: 4px 0 0;
  font-size: 30px;
  line-height: 1.12;
}

.section-head.compact {
  margin-bottom: 18px;
}

.icon-button {
  width: 42px;
  height: 42px;
  border: 0;
  border-radius: 50%;
  color: #49637e;
  background: rgba(255, 255, 255, 0.74);
  box-shadow: var(--shadow-soft);
  display: grid;
  place-items: center;
}

.search-box {
  margin: 18px 0 14px;
  height: 58px;
  display: flex;
  align-items: center;
  gap: 12px;
  border-radius: 22px;
  background: rgba(255, 255, 255, 0.72);
  padding: 0 18px;
  color: #6c7d94;
  border: 1px solid rgba(255, 255, 255, 0.72);
}

.search-box input {
  width: 100%;
  border: 0;
  outline: 0;
  background: transparent;
  color: var(--ink);
  font-weight: 800;
}

.filter-groups {
  display: grid;
  gap: 12px;
  max-height: none;
  overflow: visible;
  padding-right: 4px;
}

.filter-summary {
  margin-top: 18px;
  min-height: 54px;
  border-radius: 20px;
  padding: 0 16px;
  display: flex;
  align-items: center;
  gap: 10px;
  background: rgba(255, 255, 255, 0.62);
}

.filter-summary strong {
  font-size: 30px;
}

.filter-summary span {
  color: var(--muted);
  font-weight: 850;
}

.decision-strip {
  display: grid;
  grid-template-columns: 130px 130px minmax(0, 1fr);
  gap: 14px;
  align-items: center;
  padding: 18px 22px;
}

.decision-strip div:not(.decision-hint) {
  min-height: 62px;
  border-radius: 18px;
  padding: 10px 14px;
  background: rgba(255, 255, 255, 0.58);
}

.decision-strip span,
.decision-strip small {
  color: var(--muted);
  font-weight: 850;
}

.decision-strip strong {
  display: block;
  margin-top: 4px;
  font-size: 28px;
}

.decision-hint {
  color: #526981;
  font-weight: 850;
  line-height: 1.5;
}

.filter-group {
  border-radius: 18px;
  background: rgba(255, 255, 255, 0.42);
  border: 1px solid rgba(255, 255, 255, 0.56);
  padding: 10px;
}

.filter-group summary {
  list-style: none;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  color: #4d6480;
  font-weight: 900;
  font-size: 15px;
}

.filter-group summary::-webkit-details-marker {
  display: none;
}

.filter-group summary strong {
  min-width: 28px;
  height: 24px;
  border-radius: 12px;
  display: inline-grid;
  place-items: center;
  color: #416179;
  background: rgba(255, 255, 255, 0.72);
  font-size: 12px;
}

.filter-group .chip-row {
  margin-top: 10px;
}

.chip-row,
.active-tags,
.detail-tags {
  display: flex;
  flex-wrap: wrap;
  gap: 9px;
}

.chip {
  border: 1px solid rgba(92, 124, 154, 0.14);
  background: rgba(255, 255, 255, 0.62);
  color: #405774;
  min-height: 34px;
  padding: 0 12px;
  border-radius: 17px;
  font-size: 13px;
  font-weight: 850;
  display: inline-flex;
  align-items: center;
  gap: 7px;
}

.chip:hover,
.chip.active {
  color: white;
  border-color: transparent;
  background: linear-gradient(135deg, var(--blue-deep), var(--mint));
  box-shadow: 0 14px 26px rgba(72, 144, 226, 0.18);
}

.chip small {
  min-width: 22px;
  height: 20px;
  padding: 0 6px;
  border-radius: 10px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  color: #5a6f88;
  background: rgba(255, 255, 255, 0.66);
  font-size: 11px;
}

.chip.active small,
.chip:hover small {
  color: #22506a;
}

.recommend-panel {
  display: flex;
  flex-direction: column;
  min-height: 100%;
}

#matchCount {
  width: 54px;
  height: 54px;
  border-radius: 50%;
  display: grid;
  place-items: center;
  color: white;
  background: linear-gradient(135deg, var(--blue-deep), var(--mint));
  box-shadow: 0 16px 34px rgba(90, 169, 244, 0.25);
}

.active-tags {
  min-height: 34px;
  margin: 18px 0;
}

.active-tags .empty {
  color: var(--muted);
  font-weight: 750;
  font-size: 14px;
}

.recommend-list,
.ranking-list {
  display: grid;
  gap: 12px;
}

.mini-card,
.rank-row,
.product-card {
  background: rgba(255, 255, 255, 0.68);
  border: 1px solid rgba(255, 255, 255, 0.72);
  box-shadow: var(--shadow-soft);
}

.mini-card {
  border-radius: 20px;
  padding: 16px;
}

.mini-card button,
.rank-row button,
.product-card {
  text-align: left;
}

.mini-card button {
  width: 100%;
  border: 0;
  background: transparent;
  color: inherit;
  padding: 0;
}

.mini-card strong,
.rank-row strong,
.product-card h3 {
  display: block;
  font-size: 17px;
  line-height: 1.25;
}

.mini-card p,
.rank-row p,
.product-card p {
  margin: 8px 0 0;
  color: var(--muted);
  line-height: 1.5;
  font-size: 13px;
  font-weight: 750;
}

.score-line {
  margin-top: 14px;
  height: 8px;
  overflow: hidden;
  border-radius: 99px;
  background: rgba(124, 151, 178, 0.16);
}

.score-line span {
  display: block;
  height: 100%;
  border-radius: inherit;
  background: linear-gradient(90deg, var(--mint), var(--blue), var(--purple));
}

.ranking-panel {
  scroll-margin-top: 28px;
}

.segmented {
  display: flex;
  gap: 6px;
  padding: 6px;
  border-radius: 22px;
  background: rgba(255, 255, 255, 0.64);
  flex-wrap: wrap;
  justify-content: flex-end;
}

.rank-tab {
  border: 0;
  min-height: 36px;
  border-radius: 18px;
  padding: 0 14px;
  color: #516780;
  background: transparent;
  font-weight: 900;
}

.rank-tab.active {
  color: white;
  background: linear-gradient(135deg, var(--blue-deep), var(--mint));
}

.ranking-list {
  margin-top: 22px;
  grid-template-columns: repeat(2, minmax(0, 1fr));
}

.rank-row {
  border-radius: 20px;
  padding: 16px;
  display: grid;
  grid-template-columns: 44px minmax(0, 1fr) 68px;
  gap: 14px;
  align-items: center;
}

.rank-row button {
  border: 0;
  background: transparent;
  padding: 0;
  color: inherit;
}

.rank-no {
  width: 42px;
  height: 42px;
  border-radius: 15px;
  display: grid;
  place-items: center;
  color: white;
  background: linear-gradient(135deg, var(--blue-deep), var(--mint));
  font-weight: 950;
}

.rank-score {
  text-align: right;
}

.rank-score strong {
  font-size: 24px;
}

.rank-score small {
  color: var(--muted);
  font-weight: 800;
}

.products-panel {
  scroll-margin-top: 28px;
}

.radar-view {
  scroll-margin-top: 28px;
}

.radar-toolbar {
  padding: 22px;
}

.radar-controls {
  gap: 10px;
  flex-wrap: wrap;
}

.radar-controls .select-label {
  align-items: flex-start;
  flex-direction: column;
  gap: 6px;
}

.radar-controls .select-label select {
  min-width: 132px;
}

.radar-summary {
  margin-top: 16px;
  min-height: 48px;
  display: flex;
  align-items: center;
  gap: 10px;
  flex-wrap: wrap;
}

.radar-summary strong {
  font-size: 30px;
}

.radar-summary span {
  color: var(--muted);
  font-weight: 850;
}

.compact-action {
  min-height: 40px;
  padding: 0 16px;
  margin-left: auto;
}

.radar-filter-bar {
  margin-top: 14px;
  display: grid;
  grid-template-columns: repeat(5, minmax(0, 1fr));
  gap: 10px;
}

.radar-filter-bar .select-label {
  align-items: flex-start;
  flex-direction: column;
  gap: 6px;
}

.radar-filter-bar .select-label select,
.radar-filter-bar .select-label input {
  width: 100%;
  min-width: 0;
}

.radar-filter-bar .select-label input {
  border: 0;
  outline: 0;
  min-height: 42px;
  border-radius: 20px;
  background: rgba(255, 255, 255, 0.78);
  color: #3c5572;
  font-weight: 900;
  padding: 0 14px;
  box-shadow: var(--shadow-soft);
}

.radar-filter-bar .radar-keyword {
  grid-column: span 2;
}

.brand-picker {
  margin-top: 14px;
  border-radius: 18px;
  border: 1px solid rgba(255, 255, 255, 0.56);
  background: rgba(255, 255, 255, 0.42);
  padding: 12px;
}

.brand-picker summary {
  list-style: none;
  cursor: pointer;
  display: flex;
  align-items: center;
  gap: 10px;
  color: #4d6480;
  font-weight: 900;
}

.brand-picker summary::-webkit-details-marker {
  display: none;
}

.brand-picker summary strong {
  margin-left: auto;
  min-width: 54px;
  height: 26px;
  border-radius: 13px;
  display: inline-grid;
  place-items: center;
  background: rgba(255, 255, 255, 0.74);
  color: #416179;
  font-size: 12px;
}

.brand-actions {
  margin-top: 12px;
  display: flex;
  gap: 8px;
}

.brand-actions button {
  border: 0;
  min-height: 34px;
  border-radius: 17px;
  padding: 0 13px;
  background: rgba(255, 255, 255, 0.72);
  color: #405774;
  font-weight: 900;
}

.brand-checks {
  margin-top: 12px;
  display: grid;
  grid-template-columns: repeat(5, minmax(0, 1fr));
  gap: 8px;
  max-height: 220px;
  overflow: auto;
  padding-right: 4px;
}

.brand-check {
  min-width: 0;
  min-height: 34px;
  border-radius: 17px;
  padding: 0 9px;
  display: flex;
  align-items: center;
  gap: 7px;
  color: #405774;
  background: rgba(255, 255, 255, 0.62);
  border: 1px solid rgba(92, 124, 154, 0.12);
  font-size: 12px;
  font-weight: 850;
}

.brand-check input {
  width: 14px;
  height: 14px;
  accent-color: var(--blue-deep);
  flex: 0 0 auto;
}

.brand-check span {
  min-width: 0;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.brand-check small {
  margin-left: auto;
  color: var(--muted);
  font-weight: 900;
}

.radar-grid {
  display: grid;
  grid-template-columns: repeat(5, minmax(0, 1fr));
  gap: 14px;
}

.radar-card {
  min-width: 0;
  border: 1px solid rgba(255, 255, 255, 0.72);
  background: rgba(255, 255, 255, 0.68);
  box-shadow: var(--shadow-soft);
  border-radius: 20px;
  padding: 12px;
  cursor: pointer;
  transition: transform 0.18s ease, box-shadow 0.18s ease;
}

.radar-card:hover {
  transform: translateY(-2px);
  box-shadow: 0 24px 54px rgba(57, 97, 137, 0.16);
}

.radar-card.selected {
  border-color: rgba(90, 169, 244, 0.56);
  box-shadow: 0 22px 56px rgba(90, 169, 244, 0.22);
}

.radar-card-head {
  min-height: 30px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
}

.radar-card-head strong {
  color: #172743;
  font-size: 18px;
}

.mini-radar {
  width: 100%;
  aspect-ratio: 1 / 1;
  display: grid;
  place-items: center;
}

.mini-radar svg {
  width: 100%;
  max-width: 220px;
  height: auto;
  display: block;
}

.radar-card h3,
.radar-card p,
.radar-card small {
  display: block;
  margin: 0;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.radar-card h3 {
  margin-top: 6px;
  color: #172743;
  font-size: 14px;
  font-weight: 950;
}

.radar-card p {
  margin-top: 4px;
  color: #526981;
  font-size: 12px;
  font-weight: 850;
}

.radar-card small {
  margin-top: 4px;
  color: var(--muted);
  font-weight: 800;
}

.toolbar {
  display: flex;
  justify-content: flex-end;
}

.select-label {
  display: flex;
  align-items: center;
  gap: 10px;
  color: var(--muted);
  font-weight: 850;
}

.select-label select {
  border: 0;
  outline: 0;
  min-height: 42px;
  border-radius: 20px;
  background: rgba(255, 255, 255, 0.78);
  color: #3c5572;
  font-weight: 900;
  padding: 0 34px 0 14px;
  box-shadow: var(--shadow-soft);
}

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

.product-card {
  border-radius: 22px;
  padding: 18px;
  cursor: pointer;
  transition: transform 0.18s ease, box-shadow 0.18s ease;
}

.product-card:hover {
  transform: translateY(-2px);
  box-shadow: 0 26px 60px rgba(57, 97, 137, 0.16);
}

.product-card.selected {
  border-color: rgba(90, 169, 244, 0.56);
  box-shadow: 0 22px 56px rgba(90, 169, 244, 0.22);
}

.product-card.is-candidate,
.radar-card.is-candidate {
  border-color: rgba(99, 215, 191, 0.72);
}

.product-card.is-excluded,
.radar-card.is-excluded {
  opacity: 0.58;
  filter: saturate(0.7);
}

.card-top {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 12px;
}

.tier-pill,
.tag-pill {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 28px;
  padding: 0 10px;
  border-radius: 14px;
  font-size: 12px;
  font-weight: 950;
  color: #27506b;
  background: rgba(141, 224, 198, 0.34);
}

.tier-pill.hot {
  color: #5e4410;
  background: rgba(255, 217, 143, 0.6);
}

.verdict-pill {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 28px;
  padding: 0 10px;
  border-radius: 14px;
  font-size: 12px;
  font-weight: 950;
  color: #38516d;
  background: rgba(255, 255, 255, 0.68);
}

.verdict-pill.primary,
.detail-verdict.primary {
  color: #27506b;
  background: rgba(99, 215, 191, 0.26);
}

.verdict-pill.steady,
.detail-verdict.steady {
  color: #315c8b;
  background: rgba(90, 169, 244, 0.22);
}

.verdict-pill.test,
.detail-verdict.test {
  color: #6d5517;
  background: rgba(255, 217, 143, 0.36);
}

.verdict-pill.candidate,
.detail-verdict.candidate {
  color: #1f685c;
  background: rgba(99, 215, 191, 0.32);
}

.verdict-pill.excluded,
.detail-verdict.excluded {
  color: #7a4252;
  background: rgba(255, 145, 175, 0.24);
}

.product-card h3 {
  margin: 12px 0 0;
  font-size: 20px;
}

.card-decision {
  display: flex;
  gap: 8px;
  margin-top: 12px;
}

.card-decision button,
.detail-actions button {
  border: 0;
  min-height: 34px;
  border-radius: 17px;
  padding: 0 13px;
  color: #405774;
  background: rgba(255, 255, 255, 0.72);
  font-weight: 900;
}

.card-decision button:hover,
.detail-actions button:hover {
  color: white;
  background: linear-gradient(135deg, var(--blue-deep), var(--mint));
}

.meta-line {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin-top: 14px;
}

.tag-pill {
  color: #526781;
  background: rgba(255, 255, 255, 0.68);
}

.spec-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 8px;
  margin-top: 16px;
}

.spec-grid span {
  display: block;
  padding: 10px 8px;
  border-radius: 14px;
  background: rgba(255, 255, 255, 0.58);
  color: #536a83;
  font-weight: 800;
  font-size: 12px;
  line-height: 1.35;
  min-width: 0;
  overflow-wrap: anywhere;
}

.detail-drawer {
  position: sticky;
  top: 28px;
  max-height: calc(100vh - 56px);
  overflow: auto;
  scroll-margin-top: 28px;
}

.detail-inner {
  padding: 24px;
}

.detail-top {
  display: flex;
  justify-content: space-between;
  gap: 12px;
  align-items: flex-start;
}

.detail-top h2 {
  margin: 12px 0 6px;
  line-height: 1.15;
  font-size: 26px;
}

.detail-top p {
  margin: 0;
  color: var(--muted);
  font-weight: 800;
  line-height: 1.5;
}

.detail-verdict {
  margin-top: 16px;
  border-radius: 18px;
  padding: 14px;
  display: grid;
  gap: 4px;
}

.detail-verdict strong {
  font-size: 17px;
}

.detail-verdict span {
  color: #526981;
  font-weight: 800;
  line-height: 1.45;
}

.detail-actions {
  margin-top: 12px;
  display: flex;
  gap: 10px;
}

.radar-chart {
  margin: 20px 0;
  border-radius: 24px;
  min-height: 300px;
  background:
    radial-gradient(circle at center, rgba(255, 255, 255, 0.75), rgba(255, 255, 255, 0.38)),
    linear-gradient(150deg, rgba(141, 224, 198, 0.16), rgba(90, 169, 244, 0.12));
  display: grid;
  place-items: center;
  overflow: hidden;
}

.radar-chart svg {
  width: 100%;
  max-width: 330px;
  height: auto;
  display: block;
}

.score-bars {
  display: grid;
  gap: 11px;
}

.bar-row {
  display: grid;
  grid-template-columns: 76px minmax(0, 1fr) 26px;
  align-items: center;
  gap: 10px;
  color: #526981;
  font-weight: 850;
  font-size: 13px;
}

.bar-track {
  height: 8px;
  border-radius: 99px;
  background: rgba(124, 151, 178, 0.16);
  overflow: hidden;
}

.bar-track span {
  display: block;
  height: 100%;
  border-radius: inherit;
  background: linear-gradient(90deg, var(--mint), var(--blue));
}

.detail-specs {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 10px;
  margin: 20px 0;
}

.detail-specs article {
  min-height: 68px;
  border-radius: 18px;
  background: rgba(255, 255, 255, 0.58);
  padding: 12px;
}

.detail-specs span,
.detail-notes span {
  color: var(--muted);
  display: block;
  font-size: 12px;
  font-weight: 900;
  margin-bottom: 5px;
}

.detail-specs strong {
  display: block;
  line-height: 1.35;
  overflow-wrap: anywhere;
}

.detail-notes {
  display: grid;
  gap: 10px;
}

.detail-notes article {
  padding: 14px;
  border-radius: 18px;
  background: rgba(255, 255, 255, 0.58);
}

.detail-notes p {
  margin: 0;
  color: #415872;
  line-height: 1.6;
  font-weight: 760;
}

.detail-tags {
  margin-top: 16px;
}

.detail-sources {
  margin-top: 16px;
  display: grid;
  gap: 8px;
}

.detail-sources span {
  color: var(--muted);
  font-size: 12px;
  font-weight: 900;
}

.detail-sources a {
  display: block;
  padding: 10px 12px;
  border-radius: 14px;
  color: #365f8d;
  background: rgba(255, 255, 255, 0.58);
  font-size: 12px;
  font-weight: 800;
  line-height: 1.35;
  overflow-wrap: anywhere;
}

.empty-state {
  border-radius: 24px;
  padding: 34px;
  background: rgba(255, 255, 255, 0.62);
  color: var(--muted);
  font-weight: 850;
  text-align: center;
}

@media (max-width: 1380px) {
  .app-shell {
    grid-template-columns: 160px minmax(0, 1fr);
  }

  .detail-drawer {
    position: static;
    grid-column: 2;
    max-height: none;
  }

  .tool-workspace {
    grid-template-columns: 1fr;
  }

  .radar-grid {
    grid-template-columns: repeat(4, minmax(0, 1fr));
  }

  .brand-checks {
    grid-template-columns: repeat(4, minmax(0, 1fr));
  }

  .radar-filter-bar {
    grid-template-columns: repeat(3, minmax(0, 1fr));
  }
}

@media (max-width: 1040px) {
  .app-shell {
    width: min(100% - 28px, 900px);
    margin: 24px auto;
    grid-template-columns: 1fr;
  }

  .side-rail {
    position: static;
    min-height: 0;
    flex-direction: row;
    align-items: center;
    overflow: auto;
    border-radius: 24px;
  }

  .rail-nav {
    display: flex;
    min-width: max-content;
  }

  .rail-note {
    display: none;
  }

  .tool-workspace {
    grid-template-columns: 1fr;
  }

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

  .radar-grid {
    grid-template-columns: repeat(3, minmax(0, 1fr));
  }

  .brand-checks {
    grid-template-columns: repeat(3, minmax(0, 1fr));
  }

  .decision-strip {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .decision-hint {
    grid-column: 1 / -1;
  }

  .detail-drawer {
    grid-column: auto;
  }
}

@media (max-width: 720px) {
  .app-shell {
    width: min(100% - 20px, 640px);
  }

  .side-rail {
    padding: 14px;
    gap: 12px;
  }

  .brand-mark div {
    display: none;
  }

  .rail-link {
    width: 44px;
    height: 44px;
    justify-content: center;
    padding: 0;
  }

  .rail-link span:last-child {
    display: none;
  }

  .filter-groups {
    max-height: none;
    overflow: visible;
  }

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

  .brand-checks {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .radar-filter-bar {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .panel-title,
  .section-head,
  .card-top {
    align-items: flex-start;
    flex-direction: column;
  }

  .segmented,
  .toolbar {
    justify-content: flex-start;
  }

  .detail-specs,
  .spec-grid {
    grid-template-columns: 1fr;
  }

  .decision-strip {
    grid-template-columns: 1fr;
  }
}

@media (max-width: 460px) {
  .radar-grid {
    grid-template-columns: 1fr;
  }

  .brand-checks {
    grid-template-columns: 1fr;
  }

  .radar-filter-bar {
    grid-template-columns: 1fr;
  }

  .radar-filter-bar .radar-keyword {
    grid-column: auto;
  }
}
