:root {
  --bg: #070b14;
  --bg-2: #0a101c;
  --panel: #0c1422;
  --panel-2: #101a2b;
  --panel-3: #0a111d;
  --line: rgba(255, 255, 255, 0.075);
  --line-strong: rgba(201, 162, 39, 0.26);
  --text: #e9eef7;
  --text-2: #c3ccda;
  --muted: #8b98ac;
  --muted-2: #5f6c80;
  --gold: #c9a227;
  --gold-2: #e3c25a;
  --gold-soft: rgba(201, 162, 39, 0.12);
  --red: #e05b4b;
  --teal: #3fb6a8;
  --ink: #10141c;
  --radius: 18px;
  --font: "MiSans", "HarmonyOS Sans SC", "PingFang SC", "Microsoft YaHei", system-ui, sans-serif;
  --mono: "Bahnschrift", "DIN Alternate", "SFMono-Regular", Consolas, monospace;
}

* {
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
}

body {
  margin: 0;
  min-height: 100vh;
  background: var(--bg);
  color: var(--text);
  font-family: var(--font);
  font-size: 14px;
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
}

button,
input,
textarea,
select {
  font: inherit;
  color: inherit;
}

button {
  cursor: pointer;
  border: 0;
  background: none;
}

button:focus-visible,
input:focus-visible,
textarea:focus-visible,
select:focus-visible {
  outline: 2px solid var(--gold);
  outline-offset: 2px;
}

::selection {
  background: rgba(201, 162, 39, 0.28);
  color: #fff;
}

::-webkit-scrollbar {
  width: 10px;
  height: 10px;
}

::-webkit-scrollbar-track {
  background: transparent;
}

::-webkit-scrollbar-thumb {
  background: #1b2638;
  border: 3px solid var(--bg);
  border-radius: 99px;
}

.ambient {
  position: fixed;
  inset: 0;
  z-index: -2;
  background:
    radial-gradient(760px 520px at 78% 8%, rgba(201, 162, 39, 0.09), transparent 62%),
    radial-gradient(680px 480px at 16% 48%, rgba(63, 182, 168, 0.05), transparent 64%),
    linear-gradient(180deg, #070b14 0%, #080d17 48%, #060a12 100%);
}

.grid-bg {
  position: fixed;
  inset: 0;
  z-index: -1;
  pointer-events: none;
  background-image:
    linear-gradient(rgba(255, 255, 255, 0.025) 1px, transparent 1px),
    linear-gradient(90deg, rgba(255, 255, 255, 0.025) 1px, transparent 1px);
  background-size: 72px 72px;
  mask-image: radial-gradient(ellipse 80% 60% at 50% 0%, #000 20%, transparent 78%);
  opacity: 0.55;
}

.shell {
  display: grid;
  grid-template-columns: 248px minmax(0, 1fr);
  min-height: 100vh;
}

.rail {
  position: sticky;
  top: 0;
  height: 100vh;
  padding: 26px 20px 22px;
  border-right: 1px solid var(--line);
  background: rgba(7, 11, 20, 0.74);
  backdrop-filter: blur(18px);
  display: flex;
  flex-direction: column;
  gap: 30px;
}

.brand {
  display: flex;
  align-items: center;
  gap: 12px;
  text-decoration: none;
  color: var(--text);
  padding: 2px 4px;
}

.brand-mark {
  width: 42px;
  height: 42px;
  color: var(--gold);
  flex: none;
}

.brand-mark svg {
  width: 100%;
  height: 100%;
  display: block;
}

.brand-copy {
  display: flex;
  flex-direction: column;
  gap: 1px;
}

.brand-copy strong {
  font-size: 16px;
  letter-spacing: 0.08em;
  font-weight: 600;
}

.brand-copy em {
  font-style: normal;
  font-size: 8px;
  letter-spacing: 0.26em;
  color: var(--muted-2);
}

.rail-nav {
  display: flex;
  flex-direction: column;
  gap: 4px;
}

.nav-item {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 10px 12px;
  border-radius: 9px;
  color: var(--muted);
  font-size: 12.5px;
  text-align: left;
  transition: background 0.2s, color 0.2s;
}

.nav-item:hover {
  background: rgba(255, 255, 255, 0.035);
  color: var(--text-2);
}

.nav-item.on {
  background: linear-gradient(90deg, rgba(201, 162, 39, 0.12), rgba(201, 162, 39, 0.02));
  color: var(--gold-2);
}

.nav-dot {
  width: 5px;
  height: 5px;
  border-radius: 50%;
  background: currentColor;
  opacity: 0.45;
}

.nav-item.on .nav-dot {
  opacity: 1;
  box-shadow: 0 0 8px rgba(201, 162, 39, 0.8);
}

.nav-count {
  margin-left: auto;
  min-width: 20px;
  height: 18px;
  padding: 0 6px;
  border-radius: 99px;
  border: 1px solid var(--line);
  font-family: var(--mono);
  font-size: 10px;
  display: grid;
  place-items: center;
  color: var(--muted);
}

.rail-block {
  padding-top: 20px;
  border-top: 1px solid var(--line);
}

.rail-label {
  font-size: 8.5px;
  letter-spacing: 0.22em;
  color: var(--muted-2);
  margin-bottom: 12px;
}

.source-row {
  display: grid;
  grid-template-columns: 8px 1fr auto;
  align-items: center;
  gap: 8px;
  padding: 5px 0;
  font-size: 11.5px;
  color: var(--muted);
}

.source-row i {
  width: 5px;
  height: 5px;
  border-radius: 50%;
  background: #46536a;
  transition: background 0.25s, box-shadow 0.25s;
}

.source-row em {
  font-style: normal;
  font-family: var(--mono);
  font-size: 9.5px;
  color: var(--muted-2);
}

.source-row[data-state="ok"] i {
  background: var(--teal);
  box-shadow: 0 0 7px rgba(63, 182, 168, 0.7);
}

.source-row[data-state="ok"] em {
  color: var(--teal);
}

.source-row[data-state="fail"] i {
  background: var(--red);
  box-shadow: 0 0 7px rgba(224, 91, 75, 0.6);
}

.source-row[data-state="fail"] em {
  color: var(--red);
}

.rail-note {
  margin-top: auto;
  padding: 14px;
  border: 1px solid var(--line);
  border-radius: 12px;
  background: rgba(255, 255, 255, 0.018);
}

.rail-note p {
  margin: 0;
  font-size: 11px;
  line-height: 1.75;
  color: var(--muted);
}

.rail-foot {
  display: flex;
  justify-content: space-between;
  gap: 8px;
  padding-top: 16px;
  border-top: 1px solid var(--line);
  font-size: 9.5px;
  color: var(--muted-2);
  font-family: var(--mono);
}

main {
  min-width: 0;
  padding-bottom: 40px;
}

.topbar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 18px 56px;
  border-bottom: 1px solid var(--line);
}

.topbar-brand {
  display: flex;
  align-items: center;
  gap: 8px;
  font-size: 10.5px;
  color: var(--muted);
  letter-spacing: 0.06em;
}

.live-dot {
  width: 6px;
  height: 6px;
  border-radius: 50%;
  background: var(--teal);
  box-shadow: 0 0 0 4px rgba(63, 182, 168, 0.09);
  animation: breathe 3s ease-in-out infinite;
}

.topbar-right {
  display: flex;
  align-items: center;
  gap: 14px;
}

.topbar-clock {
  font-family: var(--mono);
  font-size: 11px;
  color: var(--muted-2);
  letter-spacing: 0.08em;
}

.hero {
  display: grid;
  grid-template-columns: minmax(0, 1.2fr) minmax(320px, 0.8fr);
  gap: 30px;
  align-items: center;
  padding: 66px 56px 44px;
  position: relative;
}

.eyebrow {
  display: flex;
  align-items: center;
  gap: 10px;
  font-size: 8.5px;
  letter-spacing: 0.26em;
  color: var(--gold);
  margin-bottom: 20px;
}

.eyebrow span {
  width: 26px;
  height: 1px;
  background: var(--gold);
  opacity: 0.65;
}

.hero h1 {
  margin: 0;
  font-size: clamp(46px, 5.2vw, 72px);
  line-height: 1.02;
  letter-spacing: -0.045em;
  font-weight: 600;
}

.hero h1 span {
  color: var(--gold-2);
  background: linear-gradient(100deg, #f0d98a, #c9a227 52%, #9f7b1a);
  -webkit-background-clip: text;
  background-clip: text;
  -webkit-text-fill-color: transparent;
}

.hero-copy > p {
  max-width: 560px;
  margin: 22px 0 0;
  font-size: 14.5px;
  line-height: 1.95;
  color: var(--muted);
}

.hero-points {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin-top: 26px;
}

.hero-points span {
  padding: 6px 10px;
  border: 1px solid var(--line);
  border-radius: 99px;
  font-size: 10px;
  color: var(--muted);
  letter-spacing: 0.04em;
}

.hero-visual {
  position: relative;
  display: flex;
  justify-content: center;
  align-items: center;
  min-height: 360px;
}

.radar {
  position: relative;
  width: 340px;
  height: 340px;
  border-radius: 50%;
  border: 1px solid rgba(201, 162, 39, 0.16);
  background: radial-gradient(circle, rgba(201, 162, 39, 0.05), transparent 68%);
}

.radar-ring {
  position: absolute;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%);
  border-radius: 50%;
  border: 1px solid rgba(201, 162, 39, 0.15);
}

.radar-ring.r1 {
  width: 76%;
  height: 76%;
}

.radar-ring.r2 {
  width: 50%;
  height: 50%;
}

.radar-ring.r3 {
  width: 25%;
  height: 25%;
}

.radar-axis {
  position: absolute;
  background: rgba(201, 162, 39, 0.12);
}

.radar-axis.ax {
  left: 6%;
  right: 6%;
  top: 50%;
  height: 1px;
}

.radar-axis.ay {
  top: 6%;
  bottom: 6%;
  left: 50%;
  width: 1px;
}

.radar-sweep {
  position: absolute;
  inset: 0;
  border-radius: 50%;
  background: conic-gradient(from 0deg, rgba(201, 162, 39, 0.26), transparent 25%, transparent);
  mask-image: radial-gradient(circle, transparent 18%, #000 19%);
  animation: sweep 9s linear infinite;
}

.radar-center {
  position: absolute;
  top: 50%;
  left: 50%;
  width: 8px;
  height: 8px;
  transform: translate(-50%, -50%);
  border-radius: 50%;
  background: var(--gold);
  box-shadow: 0 0 18px rgba(201, 162, 39, 0.8);
}

.blip {
  position: absolute;
  width: 5px;
  height: 5px;
  border-radius: 50%;
  background: var(--gold-2);
  box-shadow: 0 0 10px 2px rgba(201, 162, 39, 0.5);
}

.blip::after {
  content: "";
  position: absolute;
  inset: -5px;
  border-radius: 50%;
  border: 1px solid rgba(201, 162, 39, 0.4);
  animation: ping 3.4s ease-out infinite;
}

.blip.b1 {
  top: 27%;
  left: 63%;
}

.blip.b2 {
  top: 62%;
  left: 28%;
  animation-delay: 0.8s;
}

.blip.b3 {
  top: 70%;
  left: 68%;
  animation-delay: 1.6s;
}

.blip.b4 {
  top: 38%;
  left: 20%;
  animation-delay: 2.2s;
}

.radar-tag {
  position: absolute;
  font-size: 9.5px;
  color: rgba(201, 162, 39, 0.72);
  letter-spacing: 0.12em;
}

.radar-tag.t1 {
  top: 9%;
  left: 68%;
}

.radar-tag.t2 {
  top: 64%;
  left: 4%;
}

.radar-tag.t3 {
  top: 83%;
  left: 70%;
}

.radar-tag.t4 {
  top: 30%;
  left: 2%;
}

.radar-caption {
  position: absolute;
  right: 4px;
  bottom: 14px;
  display: flex;
  gap: 10px;
  align-items: flex-start;
  max-width: 150px;
}

.radar-caption span {
  font-family: var(--mono);
  font-size: 9px;
  color: var(--gold);
  border-top: 1px solid var(--gold);
  padding-top: 4px;
}

.radar-caption p {
  margin: 0;
  font-size: 10.5px;
  line-height: 1.7;
  color: var(--muted-2);
}

.console,
.progress-card,
.panel,
.kpis > div,
.cluster-card,
.basket-head,
.steps article,
.sample-strip {
  border: 1px solid var(--line);
  background: linear-gradient(180deg, rgba(255, 255, 255, 0.022), rgba(255, 255, 255, 0.006));
}

.console {
  margin: 0 56px;
  border-radius: 20px;
  box-shadow: 0 30px 80px rgba(0, 0, 0, 0.28);
  overflow: hidden;
}

.console-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 20px;
  padding: 20px 26px 18px;
  border-bottom: 1px solid var(--line);
}

.console-title {
  display: flex;
  gap: 16px;
  align-items: flex-start;
}

.step-no {
  font-family: var(--mono);
  font-size: 11px;
  color: var(--gold);
  border: 1px solid var(--line-strong);
  border-radius: 6px;
  padding: 2px 6px;
  margin-top: 2px;
}

.console-title h2 {
  margin: 0;
  font-size: 17px;
  font-weight: 600;
  letter-spacing: 0.01em;
}

.console-title p {
  margin: 4px 0 0;
  font-size: 11.5px;
  color: var(--muted);
}

.console-badge {
  font-size: 9.5px;
  letter-spacing: 0.08em;
  color: var(--muted-2);
  border: 1px solid var(--line);
  border-radius: 99px;
  padding: 5px 10px;
  white-space: nowrap;
}

.industry-block {
  padding: 18px 26px 0;
}

.industry-head {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  gap: 16px;
}

.field-label {
  font-size: 9px;
  letter-spacing: 0.18em;
  color: var(--muted-2);
}

.industry-hint {
  font-size: 9.5px;
  color: var(--muted-2);
}

.industry-chips {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
  margin-top: 10px;
}

.industry-chip {
  padding: 7px 12px;
  border: 1px solid var(--line);
  border-radius: 8px;
  font-size: 10.5px;
  color: var(--muted);
  transition: color 0.2s, border-color 0.2s, background 0.2s;
}

.industry-chip:hover {
  color: var(--text-2);
  border-color: rgba(255, 255, 255, 0.16);
}

.industry-chip.on {
  color: var(--gold-2);
  border-color: var(--line-strong);
  background: var(--gold-soft);
}

.segment-panel {
  margin: 14px 26px 0;
  padding: 14px 16px;
  border: 1px solid var(--line);
  border-radius: 12px;
  background: rgba(201, 162, 39, 0.025);
}

.segment-head {
  display: flex;
  justify-content: space-between;
  gap: 18px;
  align-items: flex-start;
}

.segment-title strong {
  display: block;
  font-size: 12.5px;
  font-weight: 500;
  color: var(--text-2);
}

.segment-title span {
  display: block;
  margin-top: 2px;
  font-size: 9.5px;
  color: var(--muted-2);
}

.segment-summary {
  font-family: var(--mono);
  font-size: 9px;
  color: var(--gold);
  white-space: nowrap;
}

.segment-grid {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 8px;
  margin-top: 12px;
}

.segment-card {
  position: relative;
  width: 100%;
  padding: 10px 11px;
  border: 1px solid var(--line);
  border-radius: 9px;
  background: rgba(255, 255, 255, 0.012);
  cursor: pointer;
  text-align: left;
  font: inherit;
  transition: border-color 0.2s, background 0.2s, transform 0.2s;
}

.segment-card:hover {
  border-color: rgba(255, 255, 255, 0.16);
}

.segment-card.on {
  border-color: rgba(201, 162, 39, 0.38);
  background: rgba(201, 162, 39, 0.055);
}

.segment-card h4 {
  margin: 0 22px 3px 0;
  font-size: 10.5px;
  font-weight: 500;
  line-height: 1.45;
  color: var(--text-2);
}

.segment-card p {
  margin: 0;
  font-size: 9px;
  line-height: 1.55;
  color: var(--muted-2);
  min-height: 28px;
}

.segment-pains {
  display: flex;
  flex-wrap: wrap;
  gap: 3px;
  margin-top: 7px;
}

.segment-pains span {
  font-size: 8.5px;
  color: var(--muted);
  padding: 2px 5px;
  border-radius: 4px;
  background: rgba(255, 255, 255, 0.04);
}

.segment-check {
  position: absolute;
  top: 9px;
  right: 9px;
  width: 13px;
  height: 13px;
  border-radius: 50%;
  border: 1px solid #3a4658;
  display: grid;
  place-items: center;
  font-size: 8px;
  color: transparent;
}

.segment-card.on .segment-check {
  background: var(--gold);
  border-color: var(--gold);
  color: var(--ink);
}

.chip-accent {
  color: var(--gold-2);
  border-color: var(--line-strong);
}

.console-grid {
  display: grid;
  grid-template-columns: minmax(0, 1.65fr) minmax(260px, 0.75fr);
  gap: 34px;
  padding: 24px 26px 26px;
}

.field {
  min-width: 0;
}

.field > label,
.side-field > label {
  display: block;
  font-size: 9px;
  letter-spacing: 0.18em;
  color: var(--muted-2);
  margin-bottom: 9px;
}

.main-field textarea {
  width: 100%;
  min-height: 146px;
  resize: vertical;
  padding: 15px 16px;
  border-radius: 12px;
  border: 1px solid var(--line);
  background: #070d17;
  color: var(--text);
  font-size: 13.5px;
  line-height: 1.85;
  transition: border-color 0.2s, box-shadow 0.2s;
}

.main-field textarea::placeholder {
  color: #46536a;
}

.main-field textarea:focus {
  outline: none;
  border-color: rgba(201, 162, 39, 0.55);
  box-shadow: 0 0 0 3px rgba(201, 162, 39, 0.08);
}

.preset-row {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 7px;
  margin-top: 12px;
}

.preset-label {
  font-size: 9.5px;
  color: var(--muted-2);
  margin-right: 3px;
}

.chip {
  padding: 5px 10px;
  border-radius: 99px;
  border: 1px solid var(--line);
  color: var(--muted);
  font-size: 10.5px;
  transition: color 0.2s, border-color 0.2s, background 0.2s;
}

.chip:hover {
  color: var(--gold-2);
  border-color: var(--line-strong);
  background: var(--gold-soft);
}

.side-field {
  display: flex;
  flex-direction: column;
}

.side-field > label:not(:first-child) {
  margin-top: 18px;
}

.seg {
  display: flex;
  gap: 3px;
  padding: 3px;
  border: 1px solid var(--line);
  border-radius: 10px;
  background: #070d17;
}

.seg button {
  flex: 1;
  padding: 8px 10px;
  border-radius: 7px;
  font-size: 11px;
  color: var(--muted);
  transition: background 0.2s, color 0.2s;
  white-space: nowrap;
}

.seg button:hover {
  color: var(--text-2);
}

.seg button.on {
  background: var(--gold);
  color: var(--ink);
  font-weight: 600;
}

.seg-small button {
  padding: 7px 6px;
  font-size: 10.5px;
}

.side-field > label.switch {
  display: flex;
  align-items: center;
  gap: 10px;
  margin-top: 18px;
  margin-bottom: 0;
  padding: 10px 0 0;
  border-top: 1px solid var(--line);
  cursor: pointer;
  font-size: inherit;
  letter-spacing: 0;
  color: inherit;
}

.switch input {
  position: absolute;
  opacity: 0;
  pointer-events: none;
}

.switch-track {
  position: relative;
  display: block;
  width: 34px;
  height: 19px;
  border-radius: 99px;
  background: #1a2434;
  border: 1px solid var(--line);
  transition: background 0.2s;
  flex: none;
}

.switch-track span {
  position: absolute;
  top: 2px;
  left: 2px;
  width: 13px;
  height: 13px;
  border-radius: 50%;
  background: #7c8aa0;
  transition: transform 0.2s, background 0.2s;
}

.switch input:checked + .switch-track {
  background: rgba(201, 162, 39, 0.22);
  border-color: var(--line-strong);
}

.switch input:checked + .switch-track span {
  transform: translateX(15px);
  background: var(--gold-2);
}

.switch-copy {
  display: flex;
  flex-direction: column;
  gap: 1px;
}

.switch-copy strong {
  font-size: 11px;
  font-weight: 500;
  color: var(--text-2);
}

.switch-copy em {
  font-style: normal;
  font-size: 9.5px;
  color: var(--muted-2);
}

.console-foot {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 20px;
  padding: 16px 26px;
  border-top: 1px solid var(--line);
  background: rgba(255, 255, 255, 0.012);
}

.engine-line {
  display: flex;
  align-items: center;
  gap: 10px;
  font-size: 10.5px;
  color: var(--muted-2);
}

.engine-pill {
  padding: 4px 9px;
  border-radius: 99px;
  border: 1px solid var(--line-strong);
  color: var(--gold-2);
  font-size: 9.5px;
  letter-spacing: 0.06em;
}

.primary {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  padding: 12px 22px;
  border-radius: 10px;
  background: linear-gradient(180deg, var(--gold-2), var(--gold));
  color: #14100a;
  font-size: 12.5px;
  font-weight: 700;
  letter-spacing: 0.04em;
  box-shadow: 0 8px 24px rgba(201, 162, 39, 0.18);
  transition: transform 0.2s, box-shadow 0.2s, filter 0.2s;
}

.primary svg {
  width: 17px;
  height: 17px;
}

.primary:hover {
  transform: translateY(-1px);
  box-shadow: 0 12px 30px rgba(201, 162, 39, 0.26);
  filter: brightness(1.03);
}

.primary:active {
  transform: translateY(0);
}

.primary:disabled {
  opacity: 0.55;
  cursor: wait;
  transform: none;
}

.ghost {
  display: inline-flex;
  align-items: center;
  gap: 7px;
  padding: 9px 14px;
  border: 1px solid var(--line);
  border-radius: 9px;
  color: var(--muted);
  font-size: 11.5px;
  transition: color 0.2s, border-color 0.2s, background 0.2s;
}

.ghost svg {
  width: 14px;
  height: 14px;
}

.ghost:hover {
  color: var(--text);
  border-color: rgba(255, 255, 255, 0.16);
  background: rgba(255, 255, 255, 0.03);
}

.ghost.small {
  padding: 7px 11px;
  font-size: 10.5px;
  border-radius: 8px;
}

.ghost.danger:hover {
  color: var(--red);
  border-color: rgba(224, 91, 75, 0.35);
  background: rgba(224, 91, 75, 0.06);
}

.ghost-primary {
  background: transparent;
  color: var(--gold-2);
  border-color: var(--line-strong);
}

.progress {
  margin: 24px 56px 0;
}

.progress-card {
  border-radius: var(--radius);
  padding: 22px 24px;
}

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

.progress-title {
  display: flex;
  gap: 13px;
  align-items: flex-start;
}

.scan-pulse {
  width: 10px;
  height: 10px;
  border-radius: 50%;
  background: var(--gold);
  margin-top: 6px;
  box-shadow: 0 0 0 0 rgba(201, 162, 39, 0.45);
  animation: scanPulse 1.8s ease-out infinite;
}

.progress-title h3 {
  margin: 0;
  font-size: 15px;
  font-weight: 600;
}

.progress-title p {
  margin: 3px 0 0;
  font-size: 11.5px;
  color: var(--muted);
}

.progress-top > strong {
  font-family: var(--mono);
  font-size: 28px;
  font-weight: 500;
  color: var(--gold-2);
  line-height: 1;
}

.bar {
  height: 4px;
  margin: 18px 0 16px;
  border-radius: 99px;
  background: #121c2b;
  overflow: hidden;
}

.bar i {
  display: block;
  width: 0;
  height: 100%;
  border-radius: 99px;
  background: linear-gradient(90deg, #8f6c15, var(--gold-2));
  transition: width 0.4s ease;
  box-shadow: 0 0 14px rgba(201, 162, 39, 0.5);
}

.progress-stats {
  display: grid;
  grid-template-columns: repeat(5, 1fr);
  gap: 10px;
}

.progress-stats > div {
  padding: 10px 12px;
  border-left: 1px solid var(--line);
}

.progress-stats > div:first-child {
  border-left: 0;
  padding-left: 0;
}

.progress-stats b {
  display: block;
  font-family: var(--mono);
  font-size: 18px;
  font-weight: 500;
  color: var(--text);
}

.progress-stats span {
  font-size: 9.5px;
  color: var(--muted-2);
}

.log {
  margin-top: 14px;
  padding: 10px 12px;
  border-radius: 8px;
  background: #070d17;
  border: 1px solid var(--line);
  font-family: var(--mono);
  font-size: 10px;
  line-height: 1.8;
  color: var(--muted-2);
  min-height: 52px;
}

.log div {
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.log div::before {
  content: "›";
  color: var(--gold);
  margin-right: 7px;
}

.cancel {
  margin-top: 12px;
}

.results {
  margin: 40px 56px 0;
}

.results-head {
  display: flex;
  align-items: flex-end;
  justify-content: space-between;
  gap: 24px;
  margin-bottom: 22px;
}

.results-head .eyebrow {
  margin-bottom: 8px;
}

.results-head h2 {
  margin: 0;
  font-size: 28px;
  letter-spacing: -0.02em;
  font-weight: 600;
}

.results-head p {
  margin: 7px 0 0;
  font-size: 11.5px;
  color: var(--muted);
}

.results-actions {
  display: flex;
  gap: 8px;
}

.kpis {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 12px;
  margin-bottom: 12px;
}

.kpis > div {
  position: relative;
  padding: 16px 18px;
  border-radius: 12px;
  overflow: hidden;
}

.kpis > div::after {
  content: "";
  position: absolute;
  left: 18px;
  right: 18px;
  bottom: 0;
  height: 1px;
  background: linear-gradient(90deg, var(--gold), transparent);
  opacity: 0.3;
}

.kpis b {
  display: block;
  font-family: var(--mono);
  font-size: 30px;
  font-weight: 500;
  line-height: 1.15;
  letter-spacing: -0.02em;
}

.kpis span {
  display: block;
  margin-top: 3px;
  font-size: 10px;
  color: var(--muted-2);
  letter-spacing: 0.08em;
}

.kpis em {
  position: absolute;
  top: 16px;
  right: 16px;
  font-style: normal;
  font-family: var(--mono);
  font-size: 9px;
  color: var(--gold);
}

.charts {
  display: grid;
  grid-template-columns: minmax(0, 1.25fr) minmax(0, 0.75fr);
  gap: 12px;
  margin-bottom: 12px;
}

.panel {
  border-radius: 14px;
  padding: 18px 20px;
  min-width: 0;
}

.panel-head {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  gap: 12px;
  margin-bottom: 14px;
}

.panel-head h3 {
  margin: 0;
  font-size: 12.5px;
  font-weight: 500;
  color: var(--text-2);
}

.panel-head span,
.panel-hint {
  font-family: var(--mono);
  font-size: 9px;
  color: var(--muted-2);
}

.radar-panel {
  display: grid;
  grid-template-columns: 240px minmax(0, 1fr);
  gap: 20px;
  align-items: center;
}

.radar-panel .panel-head {
  grid-column: 1 / -1;
  margin-bottom: 0;
}

.radar-chart {
  width: 240px;
  height: 220px;
  position: relative;
}

.radar-chart svg {
  width: 100%;
  height: 100%;
  overflow: visible;
}

.intent-bars {
  display: flex;
  flex-direction: column;
  gap: 9px;
}

.intent-bar {
  display: grid;
  grid-template-columns: 62px minmax(0, 1fr) 32px;
  gap: 10px;
  align-items: center;
  font-size: 10px;
  color: var(--muted);
}

.intent-bar .track {
  height: 4px;
  border-radius: 99px;
  background: #131d2c;
  overflow: hidden;
}

.intent-bar .track i {
  display: block;
  height: 100%;
  border-radius: 99px;
  width: 0;
  transition: width 0.7s cubic-bezier(0.2, 0.8, 0.2, 1);
}

.intent-bar b {
  font-family: var(--mono);
  font-size: 10px;
  font-weight: 400;
  color: var(--text-2);
  text-align: right;
}

.insight-list {
  display: flex;
  flex-direction: column;
  gap: 7px;
}

.insight-item {
  display: grid;
  grid-template-columns: 5px minmax(0, 1fr) auto;
  gap: 10px;
  align-items: start;
  padding: 8px 0;
  border-bottom: 1px solid rgba(255, 255, 255, 0.04);
}

.insight-item:last-child {
  border-bottom: 0;
}

.insight-item i {
  width: 5px;
  height: 5px;
  border-radius: 50%;
  margin-top: 6px;
}

.insight-item strong {
  display: block;
  font-size: 11.5px;
  font-weight: 500;
  color: var(--text-2);
}

.insight-item p {
  margin: 2px 0 0;
  font-size: 10px;
  line-height: 1.55;
  color: var(--muted-2);
}

.insight-item em {
  font-style: normal;
  font-family: var(--mono);
  font-size: 11px;
  color: var(--muted);
}

.modifier-block {
  margin-top: 14px;
  padding-top: 13px;
  border-top: 1px solid var(--line);
}

.mini-label {
  font-size: 8.5px;
  letter-spacing: 0.2em;
  color: var(--muted-2);
}

.modifiers {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
  margin-top: 9px;
}

.modifiers span {
  padding: 3px 8px;
  border-radius: 99px;
  border: 1px solid var(--line);
  font-size: 9.5px;
  color: var(--muted);
}

.modifiers span b {
  color: var(--gold-2);
  font-family: var(--mono);
  font-weight: 400;
  margin-left: 4px;
}

.tabs {
  display: flex;
  gap: 4px;
  border-bottom: 1px solid var(--line);
  margin-bottom: 0;
}

.tabs button {
  position: relative;
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 12px 16px 13px;
  font-size: 11.5px;
  color: var(--muted);
  border-bottom: 2px solid transparent;
  margin-bottom: -1px;
}

.tabs button span {
  font-family: var(--mono);
  font-size: 9px;
  color: var(--muted-2);
}

.tabs button.on {
  color: var(--gold-2);
  border-bottom-color: var(--gold);
}

.tabs button.on span {
  color: var(--gold);
}

.tab-panel {
  padding-top: 14px;
}

.toolbar {
  display: flex;
  gap: 8px;
  margin-bottom: 12px;
  flex-wrap: wrap;
}

.audience-panel {
  margin-bottom: 12px;
}

.audience-list {
  display: flex;
  flex-direction: column;
}

.audience-row {
  display: grid;
  grid-template-columns: 178px minmax(0, 1fr) 170px;
  gap: 16px;
  align-items: center;
  padding: 9px 0;
  border-bottom: 1px solid rgba(255, 255, 255, 0.045);
}

.audience-row:last-child {
  border-bottom: 0;
}

.audience-name strong {
  display: block;
  font-size: 10.5px;
  font-weight: 500;
  color: var(--text-2);
}

.audience-name span {
  font-family: var(--mono);
  font-size: 8.5px;
  color: var(--muted-2);
}

.audience-bar {
  height: 4px;
  border-radius: 99px;
  background: #131d2c;
  overflow: hidden;
}

.audience-bar i {
  display: block;
  height: 100%;
  border-radius: 99px;
  background: linear-gradient(90deg, #8f6c15, var(--gold-2));
}

.audience-meta {
  font-size: 9px;
  color: var(--muted-2);
  text-align: right;
}

.audience-meta b {
  color: var(--gold-2);
  font-weight: 400;
}

.empty-pains {
  display: flex;
  align-items: center;
  gap: 14px;
  margin-top: 12px;
  padding-top: 11px;
  border-top: 1px solid var(--line);
}

.empty-pains .mini-label {
  flex: none;
}

.empty-pains .modifiers {
  margin-top: 0;
}

.empty-pains .modifiers span {
  color: #b58f80;
  border-color: rgba(224, 91, 75, 0.18);
  background: rgba(224, 91, 75, 0.04);
}

.pain-line {
  display: block;
  margin-top: 2px;
  font-size: 8.5px;
  color: var(--muted-2);
}

.search-box {
  position: relative;
  flex: 1;
  min-width: 180px;
}

.search-box svg {
  position: absolute;
  left: 11px;
  top: 50%;
  width: 14px;
  height: 14px;
  transform: translateY(-50%);
  color: var(--muted-2);
}

.search-box input {
  width: 100%;
  height: 34px;
  padding: 0 12px 0 32px;
  border-radius: 8px;
  border: 1px solid var(--line);
  background: #080e18;
  color: var(--text);
  font-size: 11.5px;
}

.search-box input:focus {
  outline: none;
  border-color: var(--line-strong);
}

.toolbar select {
  height: 34px;
  padding: 0 26px 0 10px;
  border-radius: 8px;
  border: 1px solid var(--line);
  background: #080e18;
  color: var(--muted);
  font-size: 10.5px;
  appearance: none;
  background-image: linear-gradient(45deg, transparent 50%, #657287 50%),
    linear-gradient(135deg, #657287 50%, transparent 50%);
  background-position: calc(100% - 13px) 15px, calc(100% - 9px) 15px;
  background-size: 4px 4px, 4px 4px;
  background-repeat: no-repeat;
}

.table-wrap {
  border: 1px solid var(--line);
  border-radius: 12px;
  overflow: auto;
  max-height: 560px;
}

table {
  width: 100%;
  border-collapse: collapse;
  min-width: 760px;
}

th {
  position: sticky;
  top: 0;
  z-index: 2;
  padding: 10px 12px;
  background: #0b1320;
  border-bottom: 1px solid var(--line);
  font-size: 9px;
  letter-spacing: 0.14em;
  font-weight: 400;
  color: var(--muted-2);
  text-align: left;
  white-space: nowrap;
}

td {
  padding: 10px 12px;
  border-bottom: 1px solid rgba(255, 255, 255, 0.045);
  font-size: 11.5px;
  color: var(--muted);
  vertical-align: middle;
}

tbody tr {
  cursor: pointer;
  transition: background 0.15s;
}

tbody tr:hover {
  background: rgba(201, 162, 39, 0.045);
}

tbody tr:last-child td {
  border-bottom: 0;
}

.col-keyword {
  width: 42%;
}

.col-score {
  width: 90px;
}

.col-action {
  width: 62px;
  text-align: center;
}

.keyword-cell {
  display: flex;
  align-items: center;
  gap: 9px;
  color: var(--text-2);
  font-size: 12px;
  line-height: 1.45;
}

.keyword-cell .rank {
  font-family: var(--mono);
  font-size: 8.5px;
  color: var(--muted-2);
  min-width: 18px;
}

.keyword-stack {
  min-width: 0;
  display: flex;
  flex-direction: column;
  gap: 1px;
}

.keyword-stack > span:first-child {
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.intent-pill {
  display: inline-flex;
  align-items: center;
  gap: 5px;
  padding: 3px 8px;
  border-radius: 99px;
  font-size: 9.5px;
  color: var(--intent-color, var(--muted));
  background: color-mix(in srgb, var(--intent-color, #8b98ac) 12%, transparent);
  border: 1px solid color-mix(in srgb, var(--intent-color, #8b98ac) 26%, transparent);
  white-space: nowrap;
}

.intent-pill::before {
  content: "";
  width: 4px;
  height: 4px;
  border-radius: 50%;
  background: var(--intent-color, var(--muted));
}

.persona-tag {
  font-size: 9.5px;
  color: var(--muted);
  border: 1px solid var(--line);
  padding: 2px 7px;
  border-radius: 5px;
  white-space: nowrap;
}

.src-tags {
  display: flex;
  gap: 4px;
  flex-wrap: wrap;
}

.src-tag {
  font-family: var(--mono);
  font-size: 8.5px;
  letter-spacing: 0.06em;
  padding: 2px 5px;
  border-radius: 4px;
  background: rgba(255, 255, 255, 0.04);
  color: var(--muted-2);
  text-transform: uppercase;
}

.score-cell {
  display: flex;
  align-items: center;
  gap: 8px;
}

.score-cell b {
  font-family: var(--mono);
  font-size: 11px;
  font-weight: 400;
  color: var(--text-2);
  width: 19px;
}

.score-track {
  flex: 1;
  height: 3px;
  border-radius: 99px;
  background: #172132;
  overflow: hidden;
  min-width: 26px;
}

.score-track i {
  display: block;
  height: 100%;
  border-radius: 99px;
  background: linear-gradient(90deg, #8f6c15, var(--gold-2));
}

.add-btn {
  width: 24px;
  height: 24px;
  border-radius: 6px;
  border: 1px solid var(--line);
  color: var(--muted);
  font-size: 14px;
  line-height: 1;
  display: inline-grid;
  place-items: center;
  transition: all 0.18s;
}

.add-btn:hover {
  color: var(--gold-2);
  border-color: var(--line-strong);
  background: var(--gold-soft);
}

.add-btn.on {
  color: var(--ink);
  background: var(--gold);
  border-color: var(--gold);
}

.table-empty {
  padding: 28px;
  text-align: center;
  font-size: 11.5px;
  color: var(--muted-2);
}

.pager {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  padding-top: 12px;
  font-family: var(--mono);
  font-size: 9.5px;
  color: var(--muted-2);
}

.pager-btns {
  display: flex;
  gap: 6px;
}

.pager button:disabled {
  opacity: 0.3;
  cursor: not-allowed;
}

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

.cluster-card {
  position: relative;
  border-radius: 13px;
  padding: 16px 16px 14px;
  overflow: hidden;
  cursor: pointer;
  transition: border-color 0.2s, transform 0.2s;
}

.cluster-card:hover {
  border-color: rgba(255, 255, 255, 0.16);
  transform: translateY(-2px);
}

.cluster-card::before {
  content: "";
  position: absolute;
  top: 0;
  left: 16px;
  right: 16px;
  height: 1px;
  background: linear-gradient(90deg, var(--cluster-color), transparent);
  opacity: 0.7;
}

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

.cluster-top h3 {
  margin: 0;
  font-size: 12.5px;
  font-weight: 500;
  color: var(--text-2);
  line-height: 1.4;
}

.cluster-top h3 em {
  font-style: normal;
  font-size: 8.5px;
  color: var(--muted-2);
  margin-left: 6px;
  white-space: nowrap;
}

.cluster-count {
  font-family: var(--mono);
  font-size: 22px;
  line-height: 1;
  color: var(--cluster-color);
  flex: none;
}

.cluster-meta {
  display: flex;
  gap: 8px;
  margin-top: 5px;
  font-size: 9px;
  color: var(--muted-2);
}

.cluster-keywords {
  display: flex;
  flex-wrap: wrap;
  gap: 5px;
  margin-top: 12px;
}

.cluster-keywords span {
  font-size: 9.5px;
  color: var(--muted);
  padding: 3px 7px;
  border-radius: 5px;
  background: rgba(255, 255, 255, 0.035);
  max-width: 100%;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.cluster-angle {
  margin: 12px 0 0;
  padding-top: 10px;
  border-top: 1px solid var(--line);
  font-size: 10px;
  line-height: 1.6;
  color: var(--muted-2);
}

.basket-head {
  display: flex;
  justify-content: space-between;
  gap: 20px;
  align-items: flex-end;
  border-radius: 13px;
  padding: 16px 18px;
}

.basket-head h3 {
  margin: 0;
  font-size: 13px;
  font-weight: 500;
  color: var(--text-2);
}

.basket-head p {
  margin: 4px 0 0;
  font-size: 10.5px;
  color: var(--muted-2);
}

.basket-actions {
  display: flex;
  gap: 7px;
  flex-wrap: wrap;
}

.basket-list {
  display: flex;
  flex-direction: column;
  gap: 8px;
  margin-top: 12px;
}

.basket-item {
  display: grid;
  grid-template-columns: 30px minmax(0, 1fr) 28px;
  gap: 12px;
  align-items: center;
  padding: 12px 14px;
  border: 1px solid var(--line);
  border-radius: 10px;
  background: rgba(255, 255, 255, 0.012);
}

.basket-item .no {
  font-family: var(--mono);
  font-size: 9px;
  color: var(--gold);
}

.basket-item strong {
  display: block;
  font-size: 11.5px;
  font-weight: 500;
  color: var(--text-2);
  line-height: 1.5;
}

.basket-item p {
  margin: 3px 0 0;
  font-size: 9.5px;
  color: var(--muted-2);
}

.basket-empty {
  padding: 46px 20px;
  text-align: center;
  border: 1px dashed var(--line);
  border-radius: 12px;
  margin-top: 12px;
}

.basket-empty span {
  font-size: 13px;
  color: var(--muted);
}

.basket-empty p {
  margin: 5px 0 0;
  font-size: 10.5px;
  color: var(--muted-2);
}

.empty {
  margin: 54px 56px 0;
}

.empty-head h2 {
  margin: 0 0 22px;
  font-size: 24px;
  letter-spacing: -0.02em;
  font-weight: 500;
}

.steps {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 12px;
}

.steps article {
  border-radius: 13px;
  padding: 18px;
}

.step-index {
  font-family: var(--mono);
  font-size: 10px;
  color: var(--gold);
}

.steps h3 {
  margin: 12px 0 6px;
  font-size: 13px;
  font-weight: 500;
  color: var(--text-2);
}

.steps p {
  margin: 0;
  font-size: 11px;
  line-height: 1.75;
  color: var(--muted-2);
}

.sample-strip {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 20px;
  margin-top: 12px;
  padding: 16px 18px;
  border-radius: 13px;
}

.sample-strip p {
  margin: 4px 0 0;
  font-size: 10.5px;
  color: var(--muted-2);
}

.page-foot {
  display: flex;
  justify-content: space-between;
  gap: 20px;
  margin: 54px 56px 0;
  padding-top: 16px;
  border-top: 1px solid var(--line);
  font-size: 9.5px;
  color: var(--muted-2);
  letter-spacing: 0.04em;
}

.overlay {
  position: fixed;
  inset: 0;
  z-index: 40;
  background: rgba(3, 6, 11, 0.62);
  backdrop-filter: blur(3px);
}

.drawer {
  position: fixed;
  z-index: 50;
  top: 0;
  right: 0;
  width: min(440px, 100vw);
  height: 100vh;
  overflow-y: auto;
  padding: 22px 24px 30px;
  background: #0a111d;
  border-left: 1px solid var(--line);
  box-shadow: -30px 0 80px rgba(0, 0, 0, 0.4);
  animation: slideIn 0.24s ease;
}

.drawer-head,
.modal-head {
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
  gap: 20px;
}

.icon-btn {
  width: 30px;
  height: 30px;
  border-radius: 7px;
  border: 1px solid var(--line);
  color: var(--muted);
  display: grid;
  place-items: center;
}

.icon-btn svg {
  width: 15px;
  height: 15px;
}

.icon-btn:hover {
  color: var(--text);
  border-color: rgba(255, 255, 255, 0.18);
}

.drawer-keyword {
  margin: 20px 0 0;
  font-size: 22px;
  line-height: 1.35;
  letter-spacing: -0.01em;
  font-weight: 500;
}

.drawer-tags {
  display: flex;
  flex-wrap: wrap;
  gap: 7px;
  margin-top: 12px;
}

.drawer-score {
  display: grid;
  grid-template-columns: 1fr 1fr 1fr;
  gap: 1px;
  margin-top: 20px;
  border: 1px solid var(--line);
  border-radius: 10px;
  overflow: hidden;
  background: var(--line);
}

.drawer-score div {
  background: #0b1320;
  padding: 11px 12px;
}

.drawer-score b {
  display: block;
  font-family: var(--mono);
  font-size: 17px;
  font-weight: 400;
  color: var(--gold-2);
}

.drawer-score span {
  font-size: 8.5px;
  color: var(--muted-2);
  letter-spacing: 0.1em;
}

.drawer-section {
  margin-top: 20px;
  padding-top: 16px;
  border-top: 1px solid var(--line);
}

.drawer-section h4 {
  margin: 0 0 8px;
  font-size: 9px;
  letter-spacing: 0.16em;
  font-weight: 400;
  color: var(--muted-2);
}

.drawer-section p {
  margin: 0;
  font-size: 12px;
  line-height: 1.75;
  color: var(--text-2);
}

.drawer-title {
  padding: 12px 14px;
  border-radius: 9px;
  background: #080e18;
  border: 1px solid var(--line);
  font-size: 12.5px;
  line-height: 1.6;
  color: var(--gold-2);
}

.drawer-actions {
  display: flex;
  gap: 8px;
  margin-top: 18px;
  flex-wrap: wrap;
}

.drawer-links {
  display: flex;
  gap: 8px;
  margin-top: 10px;
  flex-wrap: wrap;
}

.drawer-links a {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 8px 11px;
  border: 1px solid var(--line);
  border-radius: 8px;
  color: var(--muted);
  font-size: 10.5px;
  text-decoration: none;
}

.drawer-links a:hover {
  color: var(--gold-2);
  border-color: var(--line-strong);
}

.modal {
  position: fixed;
  z-index: 60;
  top: 50%;
  left: 50%;
  width: min(760px, calc(100vw - 32px));
  max-height: calc(100vh - 48px);
  overflow-y: auto;
  transform: translate(-50%, -50%);
  border: 1px solid var(--line);
  border-radius: 18px;
  background: #0a111d;
  padding: 24px 26px 26px;
  box-shadow: 0 40px 120px rgba(0, 0, 0, 0.5);
  animation: modalIn 0.22s ease;
}

.modal-head h2 {
  margin: 6px 0 0;
  font-size: 24px;
  font-weight: 500;
  letter-spacing: -0.02em;
}

.method-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 18px 24px;
  margin-top: 24px;
}

.method-grid h3 {
  margin: 0 0 5px;
  font-size: 12px;
  font-weight: 500;
  color: var(--gold-2);
}

.method-grid p,
.method-note p {
  margin: 0;
  font-size: 11.5px;
  line-height: 1.8;
  color: var(--muted);
}

.method-note {
  margin-top: 22px;
  padding: 14px 16px;
  border-left: 2px solid var(--gold);
  background: rgba(201, 162, 39, 0.045);
  border-radius: 0 8px 8px 0;
}

.method-note strong {
  display: block;
  font-size: 10px;
  letter-spacing: 0.12em;
  color: var(--gold-2);
  margin-bottom: 4px;
}

.method-formula {
  display: flex;
  align-items: center;
  gap: 10px;
  margin-top: 18px;
  padding-top: 14px;
  border-top: 1px solid var(--line);
  font-size: 10px;
  color: var(--muted-2);
}

.method-formula code {
  font-family: var(--mono);
  font-size: 10px;
  color: var(--muted);
}

.toast {
  position: fixed;
  z-index: 80;
  left: 50%;
  bottom: 28px;
  transform: translateX(-50%);
  padding: 10px 16px;
  border-radius: 9px;
  border: 1px solid var(--line-strong);
  background: #101a2b;
  color: var(--text-2);
  font-size: 11.5px;
  box-shadow: 0 16px 50px rgba(0, 0, 0, 0.4);
  animation: toastIn 0.2s ease;
}

[hidden] {
  display: none !important;
}

.is-running .console {
  opacity: 0.62;
  pointer-events: none;
}

@keyframes sweep {
  to {
    transform: rotate(360deg);
  }
}

@keyframes ping {
  0% {
    transform: scale(0.6);
    opacity: 0.9;
  }
  100% {
    transform: scale(2.4);
    opacity: 0;
  }
}

@keyframes breathe {
  0%,
  100% {
    opacity: 1;
  }
  50% {
    opacity: 0.45;
  }
}

@keyframes scanPulse {
  0% {
    box-shadow: 0 0 0 0 rgba(201, 162, 39, 0.4);
  }
  70% {
    box-shadow: 0 0 0 9px rgba(201, 162, 39, 0);
  }
  100% {
    box-shadow: 0 0 0 0 rgba(201, 162, 39, 0);
  }
}

@keyframes slideIn {
  from {
    transform: translateX(24px);
    opacity: 0;
  }
  to {
    transform: translateX(0);
    opacity: 1;
  }
}

@keyframes modalIn {
  from {
    transform: translate(-50%, -48%);
    opacity: 0;
  }
  to {
    transform: translate(-50%, -50%);
    opacity: 1;
  }
}

@keyframes toastIn {
  from {
    transform: translate(-50%, 8px);
    opacity: 0;
  }
  to {
    transform: translate(-50%, 0);
    opacity: 1;
  }
}

@media (max-width: 1180px) {
  .hero {
    grid-template-columns: 1fr;
    padding-bottom: 28px;
  }

  .hero-visual {
    display: none;
  }

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

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

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

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

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

  .rail {
    display: none;
  }

  .topbar,
  .hero,
  .empty,
  .page-foot {
    padding-left: 24px;
    padding-right: 24px;
  }

  .hero {
    padding-top: 40px;
  }

  .console,
  .progress,
  .results,
  .empty {
    margin-left: 24px;
    margin-right: 24px;
  }

  .console-grid {
    grid-template-columns: 1fr;
    gap: 22px;
  }

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

  .radar-chart {
    margin: 0 auto;
  }

  .audience-row {
    grid-template-columns: 1fr;
    gap: 6px;
  }

  .audience-meta {
    text-align: left;
  }
}

@media (max-width: 720px) {
  .topbar {
    padding: 14px 18px;
  }

  .hero {
    padding: 34px 18px 22px;
  }

  .hero h1 {
    font-size: 40px;
  }

  .hero-copy > p {
    font-size: 13px;
  }

  .console,
  .progress,
  .results,
  .empty {
    margin-left: 18px;
    margin-right: 18px;
  }

  .console-head {
    align-items: flex-start;
    padding: 16px 18px;
  }

  .console-badge {
    display: none;
  }

  .console-grid {
    padding: 18px;
  }

  .console-foot {
    flex-direction: column;
    align-items: stretch;
    padding: 16px 18px;
  }

  .primary {
    justify-content: center;
  }

  .progress-stats {
    grid-template-columns: repeat(3, 1fr);
    gap: 8px;
  }

  .progress-stats > div {
    border-left: 0;
    padding-left: 0;
  }

  .kpis {
    grid-template-columns: 1fr 1fr;
    gap: 8px;
  }

  .kpis b {
    font-size: 24px;
  }

  .results-head {
    flex-direction: column;
    align-items: flex-start;
  }

  .results-actions {
    width: 100%;
  }

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

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

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

  .segment-head {
    flex-direction: column;
    gap: 6px;
  }

  .industry-head {
    flex-direction: column;
    gap: 4px;
  }

  .basket-head {
    flex-direction: column;
    align-items: flex-start;
  }

  .page-foot {
    flex-direction: column;
    gap: 4px;
  }

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

@media (prefers-reduced-motion: reduce) {
  *,
  *::before,
  *::after {
    animation-duration: 0.001ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: 0.001ms !important;
    scroll-behavior: auto !important;
  }
}

/* v0.2: custom industry + 4-column progress */
.custom-panel {
  margin-top: 14px;
  padding: 15px 16px;
  border: 1px solid rgba(201, 162, 39, 0.28);
  border-radius: 11px;
  background: rgba(201, 162, 39, 0.045);
}

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

.custom-grid label {
  display: block;
  min-width: 0;
}

.custom-grid label span {
  display: block;
  margin-bottom: 6px;
  font-size: 9px;
  letter-spacing: 0.14em;
  color: var(--muted-2);
}

.custom-grid input {
  width: 100%;
  padding: 9px 11px;
  border-radius: 8px;
  border: 1px solid var(--line);
  background: #070d17;
  color: var(--text);
  font-size: 12.5px;
  transition: border-color 0.2s, box-shadow 0.2s;
}

.custom-grid input::placeholder {
  color: #46536a;
}

.custom-grid input:focus {
  outline: none;
  border-color: rgba(201, 162, 39, 0.55);
  box-shadow: 0 0 0 3px rgba(201, 162, 39, 0.08);
}

.custom-foot {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  margin-top: 13px;
}

.checkline {
  display: inline-flex;
  align-items: center;
  gap: 7px;
  font-size: 11px;
  color: var(--muted);
  cursor: pointer;
}

.checkline input {
  accent-color: #c9a227;
}

.primary.small {
  padding: 9px 16px;
  font-size: 11.5px;
  border-radius: 8px;
}

.progress-stats {
  grid-template-columns: repeat(4, 1fr);
}

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

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

  .progress-stats {
    grid-template-columns: 1fr 1fr;
  }
}
