:root {
  --bg: #f7f4ed;
  --surface: #fffdf8;
  --surface-2: #f0eadf;
  --ink: #18221f;
  --nav-bg: #07100d;
  --nav-cream: #fffce8;
  --brand-green: #5fe49a;
  --muted: #64716c;
  --line: rgba(24, 34, 31, 0.12);
  --accent: #0f766e;
  --accent-2: #cf5f3f;
  --good: #0f766e;
  --warn: #b45309;
  --danger: #b42318;
  --shadow: 0 18px 60px rgba(33, 41, 35, 0.12);
  font-family: Inter, ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
}

* {
  box-sizing: border-box;
}

html {
  min-height: 100%;
  scroll-behavior: smooth;
}

body {
  min-height: 100%;
  margin: 0;
  color: var(--ink);
  background: var(--bg);
}

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

button {
  cursor: pointer;
}

a {
  color: inherit;
}

.app-shell {
  width: 100%;
  margin: 0;
  padding: 0;
}

.topbar {
  position: sticky;
  top: 0;
  z-index: 10;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  min-height: 74px;
  width: 100%;
  margin: 0;
  padding: 10px max(16px, calc((100vw - 1120px) / 2 + 16px));
  border: 0;
  border-bottom: 1px solid rgba(95, 228, 154, 0.24);
  border-radius: 0;
  background:
    linear-gradient(135deg, rgba(95, 228, 154, 0.14), transparent 30%),
    var(--nav-bg);
  box-shadow: 0 10px 28px rgba(7, 16, 13, 0.14);
  backdrop-filter: blur(16px);
}

.brand {
  display: inline-flex;
  align-items: center;
  min-width: 0;
  text-decoration: none;
}

.brand-logo {
  display: block;
  width: clamp(154px, 18vw, 220px);
  height: 52px;
  object-fit: contain;
  object-position: left center;
}

.site-nav {
  display: inline-flex;
  align-items: center;
  justify-content: flex-end;
  gap: 8px;
  min-width: 0;
}

.site-nav a {
  display: inline-flex;
  min-height: 38px;
  align-items: center;
  justify-content: center;
  padding: 0 14px;
  border: 1px solid transparent;
  border-radius: 999px;
  color: rgba(255, 252, 232, 0.82);
  font-size: 14px;
  font-weight: 800;
  text-decoration: none;
}

.site-nav a:hover,
.site-nav a:focus-visible,
.site-nav a[aria-current="page"] {
  border-color: rgba(95, 228, 154, 0.36);
  background: rgba(255, 252, 232, 0.08);
  color: var(--nav-cream);
}

.brand strong,
.brand small {
  display: block;
  line-height: 1.1;
}

.brand strong {
  color: var(--nav-cream);
  font-size: 14px;
}

.brand small {
  margin-top: 3px;
  color: rgba(255, 252, 232, 0.64);
  font-size: 12px;
}

.ghost-link {
  display: inline-flex;
  min-height: 38px;
  align-items: center;
  justify-content: center;
  padding: 0 14px;
  border: 1px solid rgba(95, 228, 154, 0.36);
  border-radius: 999px;
  background: rgba(255, 252, 232, 0.08);
  color: var(--nav-cream);
  font-size: 14px;
  font-weight: 800;
  text-decoration: none;
}

.ghost-link:hover {
  background: rgba(95, 228, 154, 0.14);
  color: #ffffff;
}

.app-main {
  padding-bottom: 56px;
}

.app-main > :not(.hero),
.admin-layout {
  width: min(1120px, calc(100% - 32px));
  margin-left: auto;
  margin-right: auto;
}

.hero {
  position: relative;
  display: block;
  width: 100%;
  min-height: calc(100vh - 74px);
  padding: 34px 16px 58px;
  border-radius: 0 0 38px 38px;
  background:
    radial-gradient(circle at 18% 18%, rgba(255, 252, 232, 0.82), transparent 28%),
    radial-gradient(circle at 78% 8%, rgba(95, 228, 154, 0.62), transparent 30%),
    linear-gradient(145deg, #5fe49a 0%, #eaffef 48%, #fffdf8 100%);
}

.hero-card {
  width: min(1120px, 100%);
  margin: 0 auto;
  overflow: hidden;
  border: 1px solid rgba(24, 34, 31, 0.1);
  border-radius: 18px;
  background: rgba(255, 253, 248, 0.94);
  box-shadow: 0 26px 90px rgba(7, 16, 13, 0.18);
}

.hero-top {
  display: grid;
  grid-template-columns: minmax(0, 0.95fr) minmax(420px, 1.05fr);
  min-height: 560px;
}

.hero-title-panel {
  display: flex;
  flex-direction: column;
  justify-content: center;
  padding: clamp(30px, 6vw, 72px);
  background: #fffdf8;
}

.hero-title-panel h1 {
  margin-bottom: 0;
}

.hero-image-panel {
  position: relative;
  display: grid;
  min-height: 560px;
  place-items: center;
  overflow: hidden;
  background: #f2f7ef;
}

.hero-main-image {
  display: block;
  width: 100%;
  height: 100%;
  object-fit: contain;
  object-position: center;
}

.hero-bottom {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  gap: 18px 24px;
  align-items: center;
  padding: 24px clamp(24px, 5vw, 54px) 30px;
  border-top: 1px solid rgba(24, 34, 31, 0.08);
}

.hero-bottom .hero-text {
  margin-bottom: 0;
}

.hero-bottom .hero-actions,
.hero-bottom .trust-strip {
  margin-top: 0;
}

.hero-bottom .trust-strip {
  grid-column: 1 / -1;
}

.eyebrow {
  margin: 0 0 10px;
  color: var(--accent);
  font-size: 12px;
  font-weight: 800;
  letter-spacing: 0;
  text-transform: uppercase;
}

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

h1 {
  max-width: 740px;
  margin-bottom: 18px;
  font-size: clamp(40px, 8vw, 82px);
  line-height: 0.94;
  letter-spacing: 0;
}

h2 {
  margin-bottom: 12px;
  font-size: clamp(28px, 5vw, 48px);
  line-height: 1;
  letter-spacing: 0;
}

h3 {
  margin-bottom: 10px;
  font-size: 22px;
  letter-spacing: 0;
}

.hero-text {
  max-width: 600px;
  color: var(--muted);
  font-size: 18px;
  line-height: 1.6;
}

.hero-actions,
.choice-actions,
.lead-actions,
.result-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 12px;
  margin-top: 24px;
}

.primary-btn,
.secondary-btn,
.text-btn,
.icon-btn {
  display: inline-flex;
  min-height: 52px;
  align-items: center;
  justify-content: center;
  border: 0;
  border-radius: 8px;
  text-decoration: none;
  transition: transform 180ms ease, box-shadow 180ms ease, background 180ms ease;
}

.primary-btn {
  padding: 0 22px;
  background: var(--ink);
  color: #fffdf8;
  box-shadow: 0 14px 28px rgba(24, 34, 31, 0.16);
  font-weight: 800;
}

.secondary-btn,
.text-btn {
  padding: 0 18px;
  border: 1px solid var(--line);
  background: rgba(255, 253, 248, 0.84);
  color: var(--ink);
  font-weight: 750;
}

.text-btn {
  min-height: 44px;
  color: var(--muted);
}

.primary-btn:hover,
.secondary-btn:hover,
.text-btn:hover,
.icon-btn:hover,
.diagnostic-card:hover,
.answer-card:hover {
  transform: translateY(-2px);
}

.primary-btn:disabled,
.secondary-btn:disabled,
.text-btn:disabled {
  cursor: not-allowed;
  opacity: 0.56;
  box-shadow: none;
  transform: none;
}

.trust-strip {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  margin-top: 24px;
}

.trust-strip span,
.result-pill,
.admin-pill {
  display: inline-flex;
  min-height: 34px;
  align-items: center;
  gap: 7px;
  padding: 0 12px;
  border: 1px solid var(--line);
  border-radius: 999px;
  background: rgba(255, 253, 248, 0.72);
  color: var(--muted);
  font-size: 13px;
  font-weight: 700;
}

.trust-chip svg,
.card-duration svg {
  width: 16px;
  height: 16px;
  flex: 0 0 auto;
  fill: currentColor;
}

.trust-chip {
  box-shadow: 0 8px 22px rgba(24, 34, 31, 0.06);
}

.trust-chip.is-featured {
  border-color: rgba(15, 118, 110, 0.24);
  background: linear-gradient(135deg, rgba(95, 228, 154, 0.2), rgba(255, 253, 248, 0.92));
  color: var(--accent);
  animation: chipBreathe 3.4s ease-in-out infinite;
}

@keyframes chipBreathe {
  0%,
  100% {
    box-shadow: 0 8px 22px rgba(24, 34, 31, 0.06);
  }
  50% {
    box-shadow: 0 10px 28px rgba(15, 118, 110, 0.16);
  }
}

.signal-panel {
  position: relative;
  min-height: 520px;
  overflow: hidden;
  border: 1px solid rgba(24, 34, 31, 0.1);
  border-radius: 16px;
  background:
    radial-gradient(circle at 68% 22%, rgba(15, 118, 110, 0.2), transparent 32%),
    linear-gradient(160deg, rgba(255, 253, 248, 0.96), rgba(240, 234, 223, 0.82));
  box-shadow: var(--shadow);
}

.signal-panel::before {
  content: "";
  position: absolute;
  inset: 28px;
  border: 1px solid rgba(24, 34, 31, 0.12);
  border-radius: 12px;
}

.signal-orbit {
  position: absolute;
  inset: 72px 58px 120px;
  border: 1px solid rgba(24, 34, 31, 0.12);
  border-radius: 999px;
  animation: pulseRing 5s ease-in-out infinite;
}

.signal-orbit span {
  position: absolute;
  width: 14px;
  height: 14px;
  border-radius: 999px;
  background: var(--accent);
}

.signal-orbit span:nth-child(1) {
  top: 12%;
  left: 18%;
}

.signal-orbit span:nth-child(2) {
  top: 50%;
  right: 8%;
  background: var(--accent-2);
}

.signal-orbit span:nth-child(3) {
  bottom: 8%;
  left: 45%;
  background: #2563eb;
}

.score-preview {
  position: absolute;
  top: 50%;
  left: 50%;
  display: grid;
  width: 190px;
  height: 190px;
  place-items: center;
  translate: -50% -50%;
  border: 1px solid rgba(24, 34, 31, 0.13);
  border-radius: 999px;
  background: rgba(255, 253, 248, 0.82);
  text-align: center;
}

.score-preview small,
.score-preview span {
  color: var(--muted);
  font-size: 12px;
  font-weight: 800;
}

.score-preview strong {
  display: block;
  font-size: 64px;
  line-height: 1;
}

.mini-insights {
  position: absolute;
  right: 28px;
  bottom: 28px;
  left: 28px;
  padding: 18px;
  border: 1px solid rgba(24, 34, 31, 0.12);
  border-radius: 12px;
  background: rgba(255, 253, 248, 0.9);
}

.mini-insights p {
  margin-bottom: 6px;
  color: var(--muted);
  font-size: 13px;
  font-weight: 800;
}

.mini-insights strong {
  font-size: 20px;
}

@keyframes pulseRing {
  0%,
  100% {
    transform: scale(1);
  }
  50% {
    transform: scale(1.025);
  }
}

.diagnostic-section {
  padding: 42px 0;
}

.section-heading {
  max-width: 720px;
  margin-bottom: 24px;
}

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

.diagnostic-card {
  position: relative;
  display: flex;
  min-height: 258px;
  flex-direction: column;
  overflow: hidden;
  padding: 18px;
  border: 1px solid rgba(24, 34, 31, 0.1);
  border-radius: 8px;
  background:
    linear-gradient(135deg, color-mix(in srgb, var(--card-accent) 13%, transparent), transparent 42%),
    linear-gradient(180deg, rgba(255, 253, 248, 0.96), rgba(255, 253, 248, 0.78));
  color: var(--ink);
  text-align: left;
  box-shadow: 0 14px 42px rgba(33, 41, 35, 0.08);
  transition: border-color 180ms ease, transform 180ms ease, box-shadow 180ms ease, background 180ms ease;
}

.diagnostic-card::before {
  content: "";
  position: absolute;
  inset: 0 0 auto;
  height: 5px;
  background: var(--card-accent, var(--accent));
}

.diagnostic-card:hover,
.diagnostic-card:focus-visible {
  border-color: color-mix(in srgb, var(--card-accent) 42%, var(--line));
  box-shadow: 0 22px 58px rgba(33, 41, 35, 0.14);
}

.diagnostic-card:focus-visible {
  outline: 3px solid color-mix(in srgb, var(--card-accent) 30%, transparent);
  outline-offset: 3px;
}

.card-visual {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 14px;
  margin-bottom: 24px;
}

.card-icon {
  display: inline-grid;
  width: 58px;
  height: 58px;
  flex: 0 0 auto;
  place-items: center;
  border: 1px solid color-mix(in srgb, var(--card-accent) 24%, transparent);
  border-radius: 8px;
  background:
    linear-gradient(145deg, color-mix(in srgb, var(--card-accent) 16%, #fffdf8), #fffdf8);
  color: var(--card-accent, var(--accent));
  box-shadow: 0 12px 28px color-mix(in srgb, var(--card-accent) 18%, transparent);
  transition: transform 180ms ease;
}

.card-icon svg {
  width: 30px;
  height: 30px;
  fill: none;
  stroke: currentColor;
  stroke-linecap: round;
  stroke-linejoin: round;
  stroke-width: 1.8;
}

.diagnostic-card:hover .card-icon,
.diagnostic-card:focus-visible .card-icon {
  transform: translateY(-2px) rotate(-2deg);
}

.card-copy {
  display: grid;
  gap: 10px;
}

.diagnostic-card strong {
  font-size: 23px;
  line-height: 1.08;
}

.diagnostic-card p {
  margin: 0;
  color: var(--muted);
  line-height: 1.45;
}

.diagnostic-card small,
.card-topline {
  color: var(--muted);
  font-size: 12px;
  font-weight: 800;
}

.card-topline {
  display: flex;
  flex-wrap: wrap;
  justify-content: flex-end;
  gap: 8px;
  align-items: center;
  text-align: right;
}

.card-topline::before {
  content: none;
}

.card-duration {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  padding: 4px 8px;
  border-radius: 999px;
  background: rgba(24, 34, 31, 0.05);
  color: var(--card-accent, var(--accent));
}

.card-cta {
  display: inline-flex;
  width: fit-content;
  align-items: center;
  gap: 8px;
  margin-top: auto;
  padding-top: 22px;
  color: var(--card-accent, var(--accent));
  font-size: 13px;
  font-weight: 900;
}

.card-cta svg {
  width: 18px;
  height: 18px;
  fill: none;
  stroke: currentColor;
  stroke-linecap: round;
  stroke-linejoin: round;
  stroke-width: 2;
  transition: transform 180ms ease;
}

.diagnostic-card:hover .card-cta svg,
.diagnostic-card:focus-visible .card-cta svg {
  transform: translateX(4px);
}

.assistant-screen {
  display: grid;
  min-height: calc(100vh - 112px);
  align-items: center;
  padding: 18px 0 42px;
}

.assistant-card {
  position: relative;
  width: min(680px, 100%);
  margin: 0 auto;
  padding: 24px;
  border: 1px solid rgba(24, 34, 31, 0.1);
  border-radius: 16px;
  background: rgba(255, 253, 248, 0.9);
  box-shadow: var(--shadow);
}

.assistant-card.wide {
  width: min(980px, 100%);
}

.assistant-card::before {
  content: "";
  position: absolute;
  inset: 0 0 auto;
  height: 5px;
  border-radius: 16px 16px 0 0;
  background: linear-gradient(90deg, var(--accent), rgba(24, 34, 31, 0.14));
}

.progress-wrap {
  margin-bottom: 24px;
}

.progress-meta {
  display: flex;
  justify-content: space-between;
  gap: 12px;
  margin-bottom: 8px;
  color: var(--muted);
  font-size: 13px;
  font-weight: 800;
}

.progress-bar {
  height: 9px;
  overflow: hidden;
  border-radius: 999px;
  background: rgba(24, 34, 31, 0.09);
}

.progress-bar span {
  display: block;
  width: var(--progress, 0%);
  height: 100%;
  border-radius: inherit;
  background: var(--accent);
  transition: width 260ms ease;
}

.assistant-kicker {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin-bottom: 16px;
}

.assistant-kicker span {
  min-height: 30px;
  padding: 7px 10px 0;
  border-radius: 999px;
  background: rgba(15, 118, 110, 0.1);
  color: var(--accent);
  font-size: 12px;
  font-weight: 850;
}

.question-title {
  margin-bottom: 8px;
  font-size: clamp(28px, 7vw, 44px);
  line-height: 1.02;
}

.question-helper {
  margin-bottom: 22px;
  color: var(--muted);
  font-size: 16px;
  line-height: 1.5;
}

.selection-note {
  display: inline-flex;
  min-height: 30px;
  align-items: center;
  margin: 0 0 14px;
  padding: 0 10px;
  border-radius: 999px;
  background: color-mix(in srgb, var(--accent) 12%, #fffdf8);
  color: var(--accent);
  font-size: 12px;
  font-weight: 850;
}

.answer-grid {
  display: grid;
  gap: 12px;
}

.answer-card {
  width: 100%;
  min-height: 86px;
  padding: 16px;
  border: 1px solid rgba(24, 34, 31, 0.12);
  border-radius: 12px;
  background: #fffdf8;
  color: var(--ink);
  text-align: left;
  transition: border 180ms ease, transform 180ms ease, background 180ms ease;
}

.answer-card.is-selected {
  border-color: var(--accent);
  background: color-mix(in srgb, var(--accent) 10%, #fffdf8);
}

.answer-card strong {
  display: block;
  margin-bottom: 4px;
  font-size: 17px;
}

.answer-card span {
  color: var(--muted);
  font-size: 14px;
  line-height: 1.35;
}

.assistant-footer {
  display: flex;
  justify-content: space-between;
  gap: 12px;
  margin-top: 22px;
}

.assistant-footer .primary-btn,
.assistant-footer .secondary-btn {
  flex: 1;
}

.lead-form {
  display: grid;
  gap: 12px;
  margin-top: 22px;
}

.form-row {
  display: grid;
  gap: 7px;
}

.form-row label {
  color: var(--muted);
  font-size: 13px;
  font-weight: 850;
}

.form-row input,
.form-row select,
.form-row textarea,
.admin-filter input {
  width: 100%;
  min-height: 52px;
  padding: 13px 14px;
  border: 1px solid rgba(24, 34, 31, 0.15);
  border-radius: 8px;
  background: #fffdf8;
  color: var(--ink);
  outline: none;
}

.form-row textarea {
  min-height: 92px;
  resize: vertical;
}

.form-row input:focus,
.form-row select:focus,
.form-row textarea:focus,
.admin-filter input:focus {
  border-color: var(--accent);
  box-shadow: 0 0 0 4px color-mix(in srgb, var(--accent) 12%, transparent);
}

.checkbox-row {
  display: flex;
  gap: 10px;
  align-items: flex-start;
  padding: 12px;
  border: 1px solid rgba(24, 34, 31, 0.12);
  border-radius: 8px;
  background: rgba(24, 34, 31, 0.04);
  color: var(--muted);
  font-size: 13px;
  line-height: 1.4;
}

.checkbox-row input {
  width: 18px;
  height: 18px;
  margin-top: 1px;
  accent-color: var(--accent);
  flex: 0 0 auto;
}

.privacy-note,
.inline-message {
  color: var(--muted);
  font-size: 13px;
  line-height: 1.45;
}

.inline-message {
  min-height: 20px;
}

.inline-message.error {
  color: var(--danger);
}

.inline-message.success {
  color: var(--good);
}

.result-hero {
  display: grid;
  grid-template-columns: minmax(180px, 260px) minmax(0, 1fr);
  gap: 26px;
  align-items: center;
}

.score-ring {
  position: relative;
  display: grid;
  aspect-ratio: 1;
  place-items: center;
  border-radius: 999px;
  background:
    conic-gradient(var(--accent) calc(var(--score) * 1%), rgba(24, 34, 31, 0.1) 0),
    #fffdf8;
}

.score-ring::after {
  content: "";
  position: absolute;
  inset: 14px;
  border-radius: inherit;
  background: var(--surface);
}

.score-ring span {
  position: relative;
  z-index: 1;
  display: block;
  color: var(--muted);
  font-size: 12px;
  font-weight: 850;
  text-align: center;
}

.score-ring strong {
  position: relative;
  z-index: 1;
  display: block;
  font-size: 58px;
  line-height: 0.95;
  text-align: center;
}

.result-summary {
  color: var(--muted);
  font-size: 17px;
  line-height: 1.55;
}

.result-sections {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(260px, 0.8fr);
  gap: 16px;
  margin-top: 26px;
}

.result-block {
  padding: 18px;
  border: 1px solid var(--line);
  border-radius: 12px;
  background: rgba(255, 253, 248, 0.7);
}

.recommendation-list {
  display: grid;
  gap: 10px;
  margin: 0;
  padding: 0;
  list-style: none;
}

.recommendation-list li {
  padding: 12px;
  border-radius: 8px;
  background: rgba(24, 34, 31, 0.05);
  line-height: 1.4;
}

.loading-state {
  display: grid;
  min-height: 260px;
  place-items: center;
  text-align: center;
}

.loader {
  width: 46px;
  height: 46px;
  margin: 0 auto 18px;
  border: 4px solid rgba(24, 34, 31, 0.12);
  border-top-color: var(--accent);
  border-radius: 999px;
  animation: spin 900ms linear infinite;
}

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

.admin-layout {
  display: grid;
  gap: 18px;
  padding-top: 14px;
}

.admin-header {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  gap: 14px;
  align-items: end;
}

.admin-header p {
  max-width: 720px;
  color: var(--muted);
  line-height: 1.55;
}

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

.metric-card,
.lead-card,
.admin-panel {
  border: 1px solid var(--line);
  border-radius: 12px;
  background: rgba(255, 253, 248, 0.82);
  box-shadow: 0 10px 34px rgba(33, 41, 35, 0.06);
}

.metric-card {
  min-height: 130px;
  padding: 16px;
}

.metric-card span {
  color: var(--muted);
  font-size: 12px;
  font-weight: 850;
}

.metric-card strong {
  display: block;
  margin-top: 18px;
  font-size: 38px;
}

.admin-panel {
  padding: 16px;
}

.admin-filter {
  display: flex;
  gap: 10px;
  align-items: center;
}

.lead-list {
  display: grid;
  gap: 10px;
  margin-top: 14px;
}

.lead-card {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(260px, 320px) auto;
  gap: 14px;
  align-items: start;
  padding: 14px;
}

.lead-main {
  min-width: 0;
}

.lead-card strong {
  display: block;
  margin-bottom: 5px;
}

.lead-card p {
  margin-bottom: 8px;
  color: var(--muted);
  font-size: 14px;
  line-height: 1.45;
}

.lead-meta {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
}

.lead-admin-actions {
  display: flex;
  justify-content: flex-end;
}

.client-history-panel {
  display: grid;
  gap: 12px;
  padding: 14px;
  border: 1px solid rgba(24, 34, 31, 0.08);
  border-radius: 10px;
  background: linear-gradient(135deg, rgba(95, 228, 154, 0.1), rgba(255, 253, 248, 0.72));
}

.client-history-head {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  gap: 10px;
}

.client-history-head span {
  color: var(--muted);
  font-size: 12px;
  font-weight: 850;
  text-transform: uppercase;
}

.client-history-head strong {
  margin: 0;
  font-size: 14px;
}

.client-history-list {
  display: grid;
  gap: 8px;
}

.history-item {
  display: grid;
  gap: 3px;
  padding: 10px;
  border: 1px solid rgba(24, 34, 31, 0.08);
  border-radius: 8px;
  background: rgba(255, 253, 248, 0.78);
}

.history-item.is-current {
  border-color: rgba(15, 118, 110, 0.3);
  box-shadow: inset 3px 0 0 var(--accent);
}

.history-item span,
.history-item small,
.history-item em,
.client-history-panel p {
  color: var(--muted);
  font-size: 12px;
  line-height: 1.35;
}

.history-item strong {
  margin: 0;
  font-size: 13px;
  line-height: 1.25;
}

.history-item em {
  font-style: normal;
  font-weight: 800;
}

.client-history-panel p {
  margin: 0;
}

.admin-details {
  margin-top: 12px;
  border-top: 1px solid var(--line);
  padding-top: 10px;
}

.admin-details summary {
  cursor: pointer;
  color: var(--accent);
  font-size: 13px;
  font-weight: 850;
}

.admin-detail-grid {
  display: grid;
  grid-template-columns: minmax(0, 0.9fr) minmax(0, 1.1fr);
  gap: 14px;
  margin-top: 12px;
}

.admin-detail-grid h4 {
  margin: 0 0 8px;
  font-size: 13px;
}

.compact-list,
.answer-history {
  display: grid;
  gap: 8px;
  margin: 0;
  padding-left: 18px;
}

.compact-list li,
.answer-history li {
  color: var(--muted);
  font-size: 13px;
  line-height: 1.35;
}

.answer-history span,
.answer-history strong {
  display: block;
}

.answer-history strong {
  margin: 2px 0 0;
  color: var(--ink);
  font-size: 13px;
}

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

.admin-pill.priority-high {
  color: #7f1d1d;
  background: #fee2e2;
}

.admin-pill.priority-medium {
  color: #78350f;
  background: #fef3c7;
}

.admin-pill.priority-low {
  color: #064e3b;
  background: #d1fae5;
}

.empty-state {
  padding: 22px;
  border: 1px dashed var(--line);
  border-radius: 12px;
  color: var(--muted);
  text-align: center;
}

.contact-main {
  width: min(1120px, calc(100% - 32px));
  margin: 0 auto;
  padding: 54px 0 18px;
}

.contact-hero {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(300px, 420px);
  gap: 28px;
  align-items: end;
  padding: clamp(26px, 5vw, 56px);
  border: 1px solid rgba(24, 34, 31, 0.1);
  border-radius: 16px;
  background:
    radial-gradient(circle at 12% 10%, rgba(95, 228, 154, 0.2), transparent 30%),
    linear-gradient(145deg, #fffdf8, rgba(234, 255, 239, 0.78));
  box-shadow: var(--shadow);
}

.contact-hero h1 {
  max-width: 760px;
}

.contact-hero p {
  max-width: 640px;
  color: var(--muted);
  font-size: 18px;
  line-height: 1.6;
}

.contact-direct {
  display: grid;
  gap: 12px;
}

.contact-link-card {
  display: grid;
  grid-template-columns: 54px minmax(0, 1fr);
  gap: 14px;
  align-items: center;
  padding: 14px;
  border: 1px solid rgba(15, 118, 110, 0.14);
  border-radius: 10px;
  background: rgba(255, 253, 248, 0.82);
  text-decoration: none;
  transition: transform 180ms ease, border-color 180ms ease, box-shadow 180ms ease;
}

.contact-link-card:hover {
  border-color: rgba(15, 118, 110, 0.34);
  box-shadow: 0 14px 32px rgba(15, 118, 110, 0.12);
  transform: translateY(-2px);
}

.contact-icon {
  display: grid;
  width: 54px;
  height: 54px;
  place-items: center;
  border-radius: 8px;
  background: rgba(95, 228, 154, 0.16);
  color: var(--accent);
}

.contact-icon svg {
  width: 26px;
  height: 26px;
  fill: none;
  stroke: currentColor;
  stroke-linecap: round;
  stroke-linejoin: round;
  stroke-width: 1.8;
}

.contact-link-card small,
.contact-link-card strong {
  display: block;
}

.contact-link-card small {
  color: var(--muted);
  font-size: 12px;
  font-weight: 850;
  text-transform: uppercase;
}

.contact-link-card strong {
  overflow-wrap: anywhere;
  font-size: 17px;
}

.contact-panel {
  margin-top: 18px;
  padding: clamp(18px, 4vw, 30px);
  border: 1px solid var(--line);
  border-radius: 16px;
  background: rgba(255, 253, 248, 0.86);
  box-shadow: 0 12px 40px rgba(33, 41, 35, 0.08);
}

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

.contact-form .full,
.contact-actions {
  grid-column: 1 / -1;
}

.contact-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 12px;
  margin-top: 4px;
}

.legal-main {
  width: min(900px, calc(100% - 32px));
  min-height: calc(100vh - 300px);
  margin: 0 auto;
  padding: 64px 0;
}

.legal-panel {
  padding: clamp(24px, 5vw, 52px);
  border: 1px solid var(--line);
  border-radius: 16px;
  background: var(--surface);
  box-shadow: var(--shadow);
}

.legal-panel h1 {
  max-width: 760px;
  font-size: clamp(38px, 6vw, 68px);
}

.legal-panel p {
  max-width: 760px;
  color: var(--muted);
  font-size: 18px;
  line-height: 1.7;
}

.site-footer {
  display: grid;
  grid-template-columns: minmax(0, 1.2fr) auto;
  gap: 22px;
  align-items: end;
  width: 100%;
  margin: 48px 0 0;
  padding: 28px max(16px, calc((100vw - 1120px) / 2 + 16px)) 24px;
  border: 0;
  border-top: 1px solid rgba(95, 228, 154, 0.24);
  border-radius: 0;
  background:
    linear-gradient(135deg, rgba(95, 228, 154, 0.14), transparent 34%),
    var(--nav-bg);
  color: var(--nav-cream);
  box-shadow: none;
}

.footer-brand {
  max-width: 520px;
}

.footer-logo {
  display: block;
  width: min(230px, 70vw);
  height: 58px;
  object-fit: contain;
  object-position: left center;
}

.footer-brand p {
  margin: 10px 0 0;
  color: rgba(255, 252, 232, 0.68);
  line-height: 1.5;
}

.footer-links {
  display: flex;
  flex-wrap: wrap;
  justify-content: flex-end;
  gap: 10px;
}

.footer-links a {
  display: inline-flex;
  min-height: 34px;
  align-items: center;
  padding: 0 12px;
  border: 1px solid rgba(95, 228, 154, 0.3);
  border-radius: 999px;
  color: var(--nav-cream);
  background: rgba(255, 252, 232, 0.06);
  font-size: 13px;
  font-weight: 800;
  text-decoration: none;
}

.footer-links a:hover {
  background: rgba(95, 228, 154, 0.14);
}

.footer-meta {
  grid-column: 1 / -1;
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  padding-top: 18px;
  border-top: 1px solid rgba(255, 252, 232, 0.1);
}

.footer-meta span {
  color: rgba(255, 252, 232, 0.72);
  font-size: 12px;
  font-weight: 700;
}

@media (max-width: 860px) {
  .hero,
  .result-hero,
  .result-sections,
  .admin-header,
  .site-footer {
    grid-template-columns: 1fr;
  }

  .footer-links {
    justify-content: flex-start;
  }

  .hero {
    min-height: auto;
    padding-top: 18px;
  }

  .hero-top,
  .hero-bottom {
    grid-template-columns: 1fr;
  }

  .hero-top {
    min-height: auto;
  }

  .hero-image-panel {
    min-height: 520px;
  }

  .signal-panel {
    min-height: 360px;
  }

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

  .contact-hero,
  .contact-form,
  .lead-card,
  .admin-detail-grid {
    grid-template-columns: 1fr;
  }

  .lead-admin-actions {
    justify-content: flex-start;
  }
}

@media (max-width: 620px) {
  .app-shell {
    padding: 0;
  }

  .topbar {
    gap: 10px;
    padding-bottom: 10px;
  }

  .brand-logo {
    width: 158px;
    height: 54px;
  }

  .site-nav {
    gap: 4px;
  }

  .site-nav a {
    min-height: 34px;
    padding: 0 9px;
    font-size: 12px;
  }

  .ghost-link {
    min-height: 34px;
    padding: 0 10px;
    font-size: 12px;
  }

  h1 {
    font-size: 46px;
  }

  .hero {
    padding: 16px 12px 44px;
    border-radius: 0 0 28px 28px;
  }

  .hero-card {
    border-radius: 14px;
  }

  .hero-title-panel {
    padding: 24px;
  }

  .hero-image-panel {
    min-height: 430px;
  }

  .hero-main-image {
    object-position: center;
  }

  .hero-bottom {
    padding: 20px;
  }

  .hero-text {
    font-size: 16px;
  }

  .hero-actions,
  .choice-actions,
  .lead-actions,
  .result-actions,
  .contact-actions,
  .assistant-footer,
  .admin-filter {
    flex-direction: column;
  }

  .primary-btn,
  .secondary-btn,
  .text-btn {
    width: 100%;
  }

  .signal-panel {
    min-height: 330px;
    border-radius: 12px;
  }

  .score-preview {
    width: 148px;
    height: 148px;
    top: 42%;
  }

  .score-preview strong {
    font-size: 48px;
  }

  .diagnostic-grid,
  .admin-grid {
    grid-template-columns: 1fr;
  }

  .diagnostic-card {
    min-height: 168px;
  }

  .assistant-screen {
    min-height: calc(100vh - 84px);
    align-items: stretch;
    padding: 8px 0 28px;
  }

  .assistant-card {
    display: flex;
    flex-direction: column;
    padding: 18px;
    border-radius: 12px;
  }

  .question-title {
    font-size: 31px;
  }

  .answer-card {
    min-height: 78px;
  }

  .contact-main {
    width: min(100% - 32px, 1120px);
    padding-top: 54px;
  }

  .contact-hero {
    padding: 26px;
  }

  .contact-link-card {
    grid-template-columns: 44px minmax(0, 1fr);
    gap: 10px;
    padding: 12px;
  }

  .contact-icon {
    width: 44px;
    height: 44px;
  }

  .contact-icon svg {
    width: 23px;
    height: 23px;
  }

  .contact-link-card strong {
    font-size: 15px;
  }

  .assistant-footer {
    margin-top: auto;
    padding-top: 18px;
  }

  .lead-card {
    grid-template-columns: 1fr;
  }

  .site-footer {
    padding: 22px 16px;
  }
}
