:root {
  --bg: #eef2f8;
  --surface: rgba(255, 255, 255, 0.86);
  --surface-strong: #ffffff;
  --surface-soft: #f4f5fb;
  --line: rgba(121, 130, 161, 0.15);
  --text: #232740;
  --muted: #7a819e;
  --muted-2: #959cb8;
  --purple: #6e53f6;
  --purple-strong: #593cf0;
  --purple-soft: #ede9ff;
  --orange: #c96b22;
  --green: #22a06b;
  --shadow: 0 18px 60px rgba(34, 39, 64, 0.14);
  --shadow-soft: 0 16px 40px rgba(84, 91, 133, 0.1);
}

*,
*::before,
*::after {
  box-sizing: border-box;
}

html { scroll-behavior: smooth; }

body {
  margin: 0;
  min-height: 100vh;
  font-family: "Outfit", sans-serif;
  color: var(--text);
  background:
    radial-gradient(circle at top left, rgba(110, 83, 246, 0.12), transparent 28%),
    radial-gradient(circle at right, rgba(246, 176, 110, 0.15), transparent 26%),
    linear-gradient(180deg, #f5f7fb 0%, #e9edf4 100%);
}

button,
input,
textarea { font: inherit; }

.app-shell {
  width: min(1320px, calc(100vw - 32px));
  min-height: calc(100vh - 32px);
  margin: 16px auto;
  display: grid;
  grid-template-columns: 250px minmax(0, 1fr);
  background: linear-gradient(180deg, rgba(255, 255, 255, 0.82), rgba(246, 248, 253, 0.92));
  border: 1px solid rgba(146, 155, 186, 0.28);
  border-radius: 26px;
  box-shadow: var(--shadow);
  overflow: hidden;
  backdrop-filter: blur(18px);
}

.sidebar {
  padding: 22px 20px 26px;
  border-right: 1px solid var(--line);
  background: rgba(255, 255, 255, 0.52);
  display: flex;
  flex-direction: column;
  gap: 28px;
}

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

.brand-mark {
  width: 36px;
  height: 36px;
  display: grid;
  place-items: center;
  border-radius: 12px;
  background: linear-gradient(135deg, var(--purple), #805cff);
  color: #fff;
  box-shadow: 0 10px 22px rgba(110, 83, 246, 0.28);
}

.brand-mark svg {
  width: 18px;
  height: 18px;
  fill: currentColor;
}

.brand-name {
  font-family: "Syne", sans-serif;
  font-weight: 800;
  letter-spacing: -0.04em;
}

.brand-sub {
  margin-top: 2px;
  font-size: 10px;
  letter-spacing: 0.18em;
  text-transform: uppercase;
  color: var(--muted);
}

.nav {
  display: grid;
  gap: 8px;
}

.nav-item {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 11px 12px;
  border-radius: 14px;
  color: var(--text);
  text-decoration: none;
  font-size: 14px;
  transition: background 180ms ease, color 180ms ease, transform 180ms ease;
}

.nav-item:hover,
.nav-item.active {
  background: var(--purple-soft);
  color: var(--purple-strong);
  transform: translateX(2px);
}

.nav-icon,
[data-icon] {
  width: 18px;
  height: 18px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
}

.nav-icon svg,
[data-icon] svg {
  width: 18px;
  height: 18px;
  stroke: currentColor;
  fill: none;
  stroke-width: 1.9;
  stroke-linecap: round;
  stroke-linejoin: round;
}

.primary-action {
  margin-top: auto;
  border: 0;
  border-radius: 14px;
  padding: 14px 16px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 10px;
  background: linear-gradient(135deg, var(--purple-strong), #7a5bff);
  color: #fff;
  box-shadow: 0 16px 30px rgba(110, 83, 246, 0.25);
  cursor: pointer;
}

.main { padding: 18px 20px 28px; }

.topbar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 18px;
  padding: 4px 2px 20px;
}

.topbar-title {
  font-family: "Syne", sans-serif;
  font-size: 20px;
  font-weight: 800;
  color: var(--purple);
}

.topbar-actions {
  display: flex;
  align-items: center;
  gap: 10px;
}

.search {
  height: 42px;
  min-width: min(320px, 45vw);
  padding: 0 14px;
  display: flex;
  align-items: center;
  gap: 10px;
  border: 1px solid var(--line);
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.9);
}

.search input {
  width: 100%;
  border: 0;
  outline: none;
  background: transparent;
  color: var(--text);
}

.search input::placeholder { color: #a0a8c5; }

.icon-button,
.profile-badge {
  width: 40px;
  height: 40px;
  border: 1px solid var(--line);
  border-radius: 50%;
  background: rgba(255, 255, 255, 0.88);
  display: grid;
  place-items: center;
  color: var(--muted);
  cursor: pointer;
}

.profile-badge {
  border-radius: 999px;
  background: linear-gradient(135deg, #ffb48e, #ec6f4b);
  color: white;
  font-weight: 700;
}

.hero {
  position: relative;
  display: grid;
  grid-template-columns: minmax(0, 1fr) 280px;
  gap: 24px;
  padding: 30px 28px;
  background: linear-gradient(135deg, #af5f18 0%, #d88343 42%, #f2b582 100%);
  border-radius: 22px;
  color: white;
  overflow: hidden;
  box-shadow: 0 20px 40px rgba(193, 110, 46, 0.28);
}

.hero-copy,
.hero-panel {
  position: relative;
  z-index: 1;
}

.hero-copy { max-width: 520px; }

.hero-pill {
  width: fit-content;
  padding: 6px 10px;
  margin-bottom: 16px;
  border-radius: 999px;
  background: rgba(255, 245, 238, 0.2);
  border: 1px solid rgba(255, 255, 255, 0.25);
  font-size: 11px;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  font-weight: 600;
}

.hero h1 {
  margin: 0 0 12px;
  font-family: "Syne", sans-serif;
  font-size: clamp(2rem, 5vw, 3.5rem);
  line-height: 0.95;
  letter-spacing: -0.05em;
}

.hero p {
  margin: 0;
  max-width: 420px;
  color: rgba(255, 247, 240, 0.9);
  font-size: 15px;
  line-height: 1.55;
}

.hero-panel {
  align-self: center;
  padding: 18px;
  border-radius: 18px;
  background: rgba(255, 240, 229, 0.28);
  border: 1px solid rgba(255, 247, 240, 0.24);
  backdrop-filter: blur(8px);
  box-shadow: 0 20px 40px rgba(119, 61, 23, 0.18);
}

.hero-panel-eyebrow {
  margin-bottom: 6px;
  font-size: 11px;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: rgba(255, 248, 244, 0.82);
}

.hero-panel-title {
  font-weight: 700;
  font-size: 18px;
}

.hero-panel-progress {
  margin: 14px 0 18px;
  font-size: 12px;
  color: rgba(255, 248, 244, 0.92);
}

.progress-bar {
  height: 8px;
  margin-top: 10px;
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.22);
  overflow: hidden;
}

.progress-fill {
  width: 0;
  height: 100%;
  border-radius: inherit;
  background: linear-gradient(90deg, #fff3ea, #fff);
  transition: width 900ms ease;
}

.hero-panel-button {
  width: 100%;
  border: 0;
  border-radius: 14px;
  padding: 12px 14px;
  background: rgba(255, 255, 255, 0.92);
  color: #aa601f;
  font-weight: 700;
  cursor: pointer;
}

.hero-orb {
  position: absolute;
  border-radius: 50%;
  background: rgba(255, 230, 204, 0.18);
}

.hero-orb-a {
  width: 150px;
  height: 150px;
  right: 230px;
  top: -28px;
}

.hero-orb-b {
  width: 180px;
  height: 180px;
  left: 42%;
  bottom: -88px;
}

.ask {
  padding: 42px 10px 12px;
  text-align: center;
}

.eyebrow {
  margin: 0 0 10px;
  color: var(--muted);
  text-transform: uppercase;
  letter-spacing: 0.16em;
  font-size: 11px;
  font-weight: 700;
}

.ask h2 {
  margin: 0;
  font-family: "Syne", sans-serif;
  font-size: clamp(2rem, 5vw, 3rem);
  letter-spacing: -0.05em;
}

.ask-subtitle {
  margin: 10px 0 26px;
  color: var(--muted);
}

.ask-box {
  width: min(760px, 100%);
  margin: 0 auto;
  display: flex;
  align-items: center;
  gap: 14px;
  padding: 12px 12px 12px 18px;
  background: rgba(255, 255, 255, 0.92);
  border: 1px solid rgba(154, 162, 198, 0.22);
  border-radius: 22px;
  box-shadow: var(--shadow-soft);
}

.ask-box input {
  flex: 1;
  min-width: 0;
  border: 0;
  background: transparent;
  outline: none;
  color: var(--text);
}

.ask-box input::placeholder { color: #aaafc5; }

.ask-icon { color: var(--purple); }

.send-button {
  border: 0;
  border-radius: 999px;
  padding: 12px 24px;
  background: linear-gradient(135deg, var(--purple), #876eff);
  color: white;
  font-weight: 700;
  cursor: pointer;
}

.assistant-reply {
  width: min(760px, 100%);
  margin: 18px auto 0;
  padding: 16px 18px;
  text-align: left;
  background: var(--surface-strong);
  border: 1px solid var(--line);
  border-radius: 18px;
  box-shadow: var(--shadow-soft);
}

.assistant-reply-label {
  margin-bottom: 8px;
  color: var(--purple);
  font-weight: 700;
  font-size: 13px;
}

.assistant-reply p {
  margin: 0;
  color: var(--text);
  line-height: 1.6;
}

.hidden { display: none; }

.tools-head {
  width: min(760px, 100%);
  margin: 36px auto 24px;
  display: flex;
  align-items: center;
  gap: 14px;
}

.tools-head span {
  flex: 1;
  height: 1px;
  background: var(--line);
}

.tools-head p {
  margin: 0;
  color: var(--muted);
  font-size: 11px;
  letter-spacing: 0.18em;
  text-transform: uppercase;
  font-weight: 700;
}

.tool-grid {
  display: grid;
  grid-template-columns: repeat(6, minmax(0, 1fr));
  gap: 16px;
}

.tool-card {
  border: 0;
  cursor: pointer;
  font: inherit;
  color: inherit;
  text-decoration: none;
  width: 100%;
  padding: 14px 10px;
  background: transparent;
  border-radius: 18px;
  text-align: center;
  transition: transform 180ms ease, background 180ms ease;
}

.tool-card:hover {
  transform: translateY(-4px);
  background: rgba(255, 255, 255, 0.55);
}

.tool-card.is-disabled {
  cursor: not-allowed;
  opacity: 0.68;
}

.tool-card.is-disabled:hover {
  transform: none;
  background: transparent;
}

.validator-back {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  text-decoration: none;
}

.validator-page {
  margin-top: 0;
}

.tool-badge {
  width: 52px;
  height: 52px;
  margin: 0 auto 10px;
  border-radius: 16px;
  display: grid;
  place-items: center;
}

.tool-badge svg {
  width: 20px;
  height: 20px;
  stroke-width: 2;
}

.tool-card h4 {
  margin: 0;
  font-size: 13px;
}

.validator-lab {
  margin-top: 32px;
  padding: 28px;
  border-radius: 28px;
  background:
    radial-gradient(circle at top right, rgba(110, 83, 246, 0.12), transparent 26%),
    linear-gradient(180deg, rgba(255, 255, 255, 0.92), rgba(245, 247, 252, 0.95));
  border: 1px solid var(--line);
  box-shadow: var(--shadow-soft);
}

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

.validator-intro h3 {
  margin: 0;
  font-family: "Syne", sans-serif;
  font-size: clamp(1.8rem, 4vw, 2.8rem);
  line-height: 0.98;
  letter-spacing: -0.05em;
}

.validator-copy {
  max-width: 480px;
  margin: 0;
  color: var(--muted);
  line-height: 1.6;
}

.validator-shell {
  display: grid;
  grid-template-columns: minmax(0, 1.05fr) minmax(0, 0.95fr);
  gap: 18px;
}

.validator-panel {
  padding: 22px;
  border-radius: 24px;
  background: rgba(255, 255, 255, 0.88);
  border: 1px solid rgba(143, 152, 189, 0.16);
  box-shadow: var(--shadow-soft);
}

.validator-panel-form {
  background:
    radial-gradient(circle at top left, rgba(255, 191, 130, 0.18), transparent 30%),
    rgba(255, 255, 255, 0.92);
}

.validator-panel-results {
  background:
    radial-gradient(circle at top right, rgba(110, 83, 246, 0.12), transparent 26%),
    rgba(255, 255, 255, 0.92);
}

.validator-panel-head {
  display: flex;
  align-items: flex-start;
  gap: 14px;
  margin-bottom: 20px;
}

.validator-panel-head h4,
.validator-section-head h5 {
  margin: 0 0 4px;
  font-size: 18px;
}

.validator-panel-head p,
.validator-section-head span {
  margin: 0;
  color: var(--muted);
  font-size: 13px;
}

.validator-step {
  width: 42px;
  height: 42px;
  border-radius: 14px;
  display: grid;
  place-items: center;
  background: linear-gradient(135deg, #ffc996, #f39b55);
  color: white;
  font-weight: 700;
  flex: 0 0 auto;
}

.validator-step-purple {
  background: linear-gradient(135deg, var(--purple), #8c76ff);
}

.validator-form {
  display: grid;
  gap: 16px;
}

.validator-label {
  font-size: 13px;
  font-weight: 600;
}

.validator-form textarea {
  resize: vertical;
  min-height: 178px;
  border: 1px solid rgba(143, 152, 189, 0.2);
  border-radius: 20px;
  padding: 18px;
  background: rgba(248, 249, 253, 0.9);
  color: var(--text);
  outline: none;
  line-height: 1.6;
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.6);
}

.validator-form textarea:focus {
  border-color: rgba(110, 83, 246, 0.4);
  box-shadow: 0 0 0 4px rgba(110, 83, 246, 0.08);
}

.validator-toolbar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  flex-wrap: wrap;
}

.validator-badges,
.validator-prompts {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
}

.validator-badge,
.validator-prompt {
  border-radius: 999px;
  border: 1px solid rgba(143, 152, 189, 0.18);
  background: rgba(255, 255, 255, 0.92);
  padding: 9px 14px;
  font-size: 12px;
  color: var(--muted);
}

.validator-badge.active {
  background: rgba(110, 83, 246, 0.08);
  color: var(--purple-strong);
}

.validator-prompt {
  cursor: pointer;
  transition: transform 160ms ease, border-color 160ms ease, background 160ms ease;
}

.validator-prompt:hover {
  transform: translateY(-1px);
  border-color: rgba(110, 83, 246, 0.28);
  background: rgba(110, 83, 246, 0.06);
}

.validator-mini-note {
  font-size: 12px;
  color: var(--muted-2);
}

.validator-submit {
  border: 0;
  border-radius: 18px;
  padding: 16px 18px;
  background: linear-gradient(135deg, var(--purple-strong), #8d72ff);
  color: white;
  font-weight: 700;
  font-size: 15px;
  box-shadow: 0 18px 30px rgba(110, 83, 246, 0.24);
  cursor: pointer;
}

.validator-submit:disabled {
  cursor: wait;
  opacity: 0.88;
}

.validator-error {
  margin: 0;
  color: #c0392b;
  font-size: 13px;
  font-weight: 500;
}

.validator-results {
  display: grid;
  gap: 18px;
}

.validator-score-card {
  padding: 18px;
  border-radius: 20px;
  background: linear-gradient(135deg, #222740, #353d68);
  color: white;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 20px;
}

.validator-score-label {
  color: rgba(255, 255, 255, 0.65);
  font-size: 12px;
  text-transform: uppercase;
  letter-spacing: 0.12em;
}

.validator-score-value {
  margin-top: 8px;
  font-family: "Syne", sans-serif;
  font-size: 56px;
  line-height: 1;
}

.validator-score-ring {
  width: 86px;
  height: 86px;
  border-radius: 50%;
  padding: 8px;
  background: conic-gradient(from 180deg, rgba(255,255,255,0.16), rgba(255,255,255,0.04));
}

.validator-score-ring-fill {
  width: 100%;
  height: 100%;
  border-radius: 50%;
  background:
    radial-gradient(circle at center, #222740 54%, transparent 56%),
    conic-gradient(#8e7bff var(--score-angle, 259deg), rgba(255,255,255,0.08) 0deg);
}

.validator-verdict {
  font-family: "Syne", sans-serif;
  font-size: 26px;
  line-height: 1;
  letter-spacing: -0.05em;
}

.validator-summary {
  margin: 0;
  color: var(--muted);
  line-height: 1.6;
}

.validator-section {
  padding: 16px;
  border-radius: 18px;
  background: rgba(244, 245, 251, 0.88);
}

.validator-section-head {
  display: flex;
  align-items: end;
  justify-content: space-between;
  gap: 12px;
  margin-bottom: 12px;
}

.validator-list,
.validator-sources {
  display: grid;
  gap: 10px;
}

.validator-list-item,
.validator-source {
  padding: 14px;
  border-radius: 16px;
  background: rgba(255, 255, 255, 0.92);
  border: 1px solid rgba(143, 152, 189, 0.14);
}

.validator-list-item strong,
.validator-source strong {
  display: block;
  margin-bottom: 4px;
  font-size: 14px;
}

.validator-list-item span,
.validator-source span {
  color: var(--muted);
  font-size: 13px;
  line-height: 1.5;
}

.validator-list-item.pro {
  border-color: rgba(34, 160, 107, 0.18);
  background: rgba(232, 248, 239, 0.92);
}

.validator-list-item.con {
  border-color: rgba(201, 107, 34, 0.18);
  background: rgba(255, 240, 228, 0.92);
}

.validator-final {
  padding: 18px;
  border-radius: 20px;
  border: 1px solid transparent;
}

.validator-final-label {
  margin-bottom: 8px;
  font-size: 12px;
  font-weight: 700;
  letter-spacing: 0.12em;
  text-transform: uppercase;
}

.validator-final-text {
  font-size: 16px;
  line-height: 1.6;
  font-weight: 600;
}

.verdict-good {
  background: rgba(232, 248, 239, 0.96);
  border-color: rgba(34, 160, 107, 0.22);
  color: #166544;
}

.verdict-mid {
  background: rgba(255, 248, 225, 0.96);
  border-color: rgba(245, 165, 36, 0.24);
  color: #8d6500;
}

.verdict-bad {
  background: rgba(255, 234, 234, 0.96);
  border-color: rgba(214, 76, 76, 0.22);
  color: #9f2f2f;
}

.verdict-neutral {
  background: rgba(238, 240, 255, 0.96);
  border-color: rgba(110, 83, 246, 0.18);
  color: #4f43a8;
}

.validator-source {
  display: flex;
  align-items: center;
  gap: 12px;
}

.validator-source-mark {
  width: 38px;
  height: 38px;
  border-radius: 12px;
  display: grid;
  place-items: center;
  font-size: 12px;
  font-weight: 700;
  flex: 0 0 auto;
}

.validator-loading {
  display: flex;
  align-items: center;
  gap: 16px;
  padding: 16px;
  border-radius: 18px;
  background: rgba(110, 83, 246, 0.07);
  margin-bottom: 18px;
}

.scan-beam {
  width: 54px;
  height: 54px;
  border-radius: 18px;
  background:
    linear-gradient(180deg, rgba(255,255,255,0.2), transparent),
    linear-gradient(135deg, var(--purple), #8d72ff);
  position: relative;
  overflow: hidden;
}

.scan-beam::after {
  content: "";
  position: absolute;
  inset: 0;
  background: linear-gradient(180deg, transparent, rgba(255,255,255,0.7), transparent);
  animation: scan-slide 1.4s ease-in-out infinite;
}

.scan-copy {
  display: grid;
  gap: 4px;
}

.scan-copy strong {
  font-size: 14px;
}

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

@keyframes scan-slide {
  0% { transform: translateY(-100%); }
  100% { transform: translateY(100%); }
}

.dashboard-grid {
  margin-top: 30px;
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 18px;
}

.panel {
  padding: 22px;
  background: rgba(255, 255, 255, 0.84);
  border: 1px solid var(--line);
  border-radius: 22px;
  box-shadow: var(--shadow-soft);
}

.panel-wide { grid-column: 1 / -1; }

.panel-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  margin-bottom: 18px;
}

.panel-kicker {
  margin: 0 0 4px;
  color: var(--muted);
  font-size: 12px;
}

.panel h3 {
  margin: 0;
  font-family: "Syne", sans-serif;
  font-size: 24px;
  letter-spacing: -0.04em;
}

.progress-list,
.activity-list,
.resource-list {
  display: grid;
  gap: 14px;
}

.progress-item,
.activity-item,
.resource-item {
  display: flex;
  align-items: center;
  gap: 14px;
}

.progress-index,
.activity-icon,
.resource-icon {
  width: 42px;
  height: 42px;
  border-radius: 14px;
  display: grid;
  place-items: center;
  flex: 0 0 auto;
  font-size: 14px;
  font-weight: 700;
}

.progress-item h4,
.activity-item h4,
.resource-item h4 {
  margin: 0 0 4px;
  font-size: 15px;
}

.progress-item p,
.activity-item p,
.resource-item p {
  margin: 0;
  color: var(--muted);
  font-size: 13px;
  line-height: 1.45;
}

.progress-meta,
.activity-time {
  margin-left: auto;
  color: var(--muted-2);
  font-size: 12px;
  white-space: nowrap;
}

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

.metric-card {
  padding: 18px;
  border-radius: 18px;
  background: var(--surface-soft);
  border: 1px solid rgba(143, 152, 189, 0.14);
}

.metric-value {
  margin: 0;
  font-family: "Syne", sans-serif;
  font-size: 28px;
  letter-spacing: -0.05em;
}

.metric-label {
  margin: 6px 0 0;
  color: var(--muted);
  font-size: 13px;
}

.metric-delta {
  margin-top: 10px;
  color: var(--green);
  font-weight: 600;
  font-size: 13px;
}

.resource-item {
  padding: 14px 16px;
  background: var(--surface-soft);
  border-radius: 18px;
}

.resource-link {
  margin-left: auto;
  color: var(--purple);
  font-weight: 700;
  text-decoration: none;
}

@media (max-width: 1100px) {
  .tool-grid { grid-template-columns: repeat(4, minmax(0, 1fr)); }
  .hero { grid-template-columns: 1fr; }
  .validator-shell { grid-template-columns: 1fr; }
}

@media (max-width: 880px) {
  .app-shell {
    width: min(100vw - 16px, 1320px);
    margin: 8px auto;
    grid-template-columns: 1fr;
  }

  .sidebar { display: none; }
  .main { padding: 16px; }

  .topbar {
    flex-direction: column;
    align-items: stretch;
  }

  .topbar-actions { flex-wrap: wrap; }

  .search {
    min-width: 0;
    flex: 1 1 100%;
  }

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

  .validator-intro {
    flex-direction: column;
    align-items: flex-start;
  }
}

@media (max-width: 640px) {
  .tool-grid,
  .dashboard-grid,
  .metric-grid {
    grid-template-columns: 1fr;
  }

  .ask-box { flex-wrap: wrap; }
  .send-button { width: 100%; }
  .hero { padding: 24px 20px; }
  .validator-lab { padding: 20px; }
}
