:root {
  --bg: #f8fafc;
  --primary: #2563eb;
  --primary-dark: #1d4ed8;
  --accent: #14b8a6;
  --accent-dark: #0f766e;
  --text: #0f172a;
  --muted: #64748b;
  --card: #ffffff;
  --border: #e2e8f0;
  --soft-blue: #eff6ff;
  --soft-teal: #f0fdfa;
  --shadow: 0 20px 50px rgba(15, 23, 42, 0.08);
  --radius: 24px;
}

* {
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
}

body {
  margin: 0;
  background:
    radial-gradient(circle at top left, rgba(37, 99, 235, 0.08), transparent 32rem),
    linear-gradient(180deg, #ffffff 0%, var(--bg) 34rem);
  color: var(--text);
  font-family:
    Inter, ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont,
    "Segoe UI", sans-serif;
  line-height: 1.6;
}

.admin-shell {
  width: min(1360px, calc(100% - 32px));
  padding-bottom: 56px;
}

.admin-hero,
.admin-filters,
.admin-panel,
.admin-overview {
  margin-top: 24px;
}

.admin-hero {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 20px;
  padding: 28px 0 8px;
}

.admin-hero h1 {
  margin: 0;
  font-size: 2.2rem;
}

.admin-hero p {
  margin: 8px 0 0;
  color: var(--muted);
}

.admin-filters {
  display: grid;
  grid-template-columns: minmax(220px, 1.5fr) repeat(3, minmax(150px, 1fr)) auto;
  gap: 12px;
  align-items: end;
  padding: 16px;
  border: 1px solid var(--border);
  border-radius: 8px;
  background: var(--card);
}

.admin-filters label {
  display: grid;
  gap: 6px;
  color: var(--muted);
  font-size: 0.86rem;
  font-weight: 800;
}

.admin-filters input,
.admin-filters select {
  width: 100%;
  min-height: 42px;
  border: 1px solid var(--border);
  border-radius: 8px;
  padding: 8px 10px;
  color: var(--text);
  background: #ffffff;
}

.admin-overview {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(160px, 1fr));
  gap: 12px;
}

.admin-stat,
.admin-panel {
  border: 1px solid var(--border);
  border-radius: 8px;
  background: var(--card);
  box-shadow: 0 10px 28px rgba(15, 23, 42, 0.05);
}

.admin-stat {
  padding: 16px;
}

.admin-stat span {
  display: block;
  color: var(--muted);
  font-size: 0.8rem;
  font-weight: 800;
}

.admin-stat strong {
  display: block;
  margin-top: 6px;
  font-size: 1.7rem;
}

.admin-panel {
  padding: 18px;
}

.admin-panel-heading {
  display: flex;
  justify-content: space-between;
  gap: 16px;
  margin-bottom: 12px;
}

.admin-panel h2 {
  margin: 0;
}

.admin-panel p,
.admin-warning {
  margin: 0;
  color: var(--muted);
}

.admin-warning {
  margin-top: 10px;
  color: #b91c1c;
  font-weight: 800;
}

.admin-table-wrap {
  overflow-x: auto;
}

.admin-table {
  width: 100%;
  border-collapse: collapse;
  min-width: 980px;
  font-size: 0.86rem;
}

.admin-table th,
.admin-table td {
  padding: 10px 12px;
  border-bottom: 1px solid var(--border);
  text-align: left;
  vertical-align: top;
  overflow-wrap: anywhere;
}

.admin-table th {
  color: var(--muted);
  font-size: 0.75rem;
  text-transform: uppercase;
}

.admin-badge {
  display: inline-flex;
  min-height: 24px;
  align-items: center;
  border: 1px solid var(--border);
  border-radius: 999px;
  padding: 2px 9px;
  background: var(--soft-blue);
  font-weight: 800;
}

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

button,
input {
  font: inherit;
}

.site-header,
.site-footer,
main {
  width: min(1120px, calc(100% - 40px));
  margin: 0 auto;
}

.site-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  padding: 24px 0;
}

.brand,
.header-nav,
.account-nav,
.account-state,
.hero-actions {
  display: flex;
  align-items: center;
}

.brand {
  gap: 10px;
  font-weight: 800;
  letter-spacing: 0;
}

.brand-mark {
  display: grid;
  width: 38px;
  height: 38px;
  place-items: center;
  border-radius: 12px;
  background: var(--text);
  color: #ffffff;
  font-size: 0.82rem;
}

.header-nav {
  gap: 24px;
  color: var(--muted);
  font-size: 0.95rem;
}

.header-nav a:hover {
  color: var(--text);
}

.account-nav {
  gap: 10px;
  min-width: 0;
}

.account-state {
  gap: 10px;
  min-width: 0;
}

.account-state span {
  max-width: 220px;
  color: var(--muted);
  font-size: 0.9rem;
  font-weight: 800;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.nav-button {
  border: 0;
  background: transparent;
  color: var(--muted);
  cursor: pointer;
  font-weight: 800;
}

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

.account-login-button {
  min-height: 40px;
  padding: 0 16px;
}

.modal-backdrop {
  position: fixed;
  inset: 0;
  z-index: 20;
  display: grid;
  place-items: center;
  padding: 24px;
  background: rgba(15, 23, 42, 0.42);
}

.auth-modal-card {
  position: relative;
  width: min(440px, 100%);
  border: 1px solid var(--border);
  border-radius: 24px;
  background: #ffffff;
  box-shadow: 0 30px 80px rgba(15, 23, 42, 0.24);
  padding: 26px;
}

.modal-close-button {
  position: absolute;
  top: 16px;
  right: 16px;
  display: grid;
  width: 34px;
  height: 34px;
  place-items: center;
  border: 1px solid var(--border);
  border-radius: 50%;
  background: #ffffff;
  color: var(--muted);
  cursor: pointer;
  font-size: 1.3rem;
  line-height: 1;
}

.modal-close-button:hover {
  color: var(--text);
}

.auth-tabs {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 6px;
  margin-top: 20px;
  border: 1px solid var(--border);
  border-radius: 999px;
  padding: 4px;
  background: var(--bg);
}

.auth-tab {
  min-height: 38px;
  border: 0;
  border-radius: 999px;
  background: transparent;
  color: var(--muted);
  cursor: pointer;
  font-size: 0.9rem;
  font-weight: 900;
}

.auth-tab.is-active {
  background: #ffffff;
  color: var(--text);
  box-shadow: 0 8px 20px rgba(15, 23, 42, 0.08);
}

.auth-form {
  display: grid;
  gap: 14px;
  margin-top: 20px;
}

.auth-form label {
  display: grid;
  gap: 7px;
  color: var(--muted);
  font-size: 0.88rem;
  font-weight: 800;
}

.auth-form input {
  width: 100%;
  min-height: 46px;
  border: 1px solid var(--border);
  border-radius: 14px;
  padding: 0 14px;
  color: var(--text);
}

.auth-form input:focus {
  border-color: var(--primary);
  outline: 3px solid rgba(37, 99, 235, 0.12);
}

.subscription-return-banner,
.subscription-status-card {
  margin: 18px 0 0;
  border: 1px solid rgba(20, 184, 166, 0.28);
  border-radius: 18px;
  background: linear-gradient(135deg, #ecfdf5, #ffffff);
  box-shadow: 0 18px 42px rgba(20, 184, 166, 0.11);
}

.subscription-return-banner {
  padding: 22px 24px;
}

.subscription-return-banner h2,
.subscription-status-card h2 {
  margin: 0;
  font-size: clamp(1.25rem, 2.6vw, 1.8rem);
  line-height: 1.15;
}

.subscription-return-banner p,
.subscription-status-card p {
  margin: 8px 0 0;
  color: var(--muted);
}

.subscription-status-card {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(320px, 0.72fr);
  gap: 20px;
  align-items: center;
  padding: 24px;
}

.subscription-status-metrics {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 10px;
  margin: 0;
}

.subscription-status-metrics div {
  min-width: 0;
  border: 1px solid rgba(20, 184, 166, 0.22);
  border-radius: 14px;
  background: #ffffff;
  padding: 12px;
}

.subscription-status-metrics dt {
  color: var(--muted);
  font-size: 0.76rem;
  font-weight: 900;
  text-transform: uppercase;
}

.subscription-status-metrics dd {
  margin: 4px 0 0;
  color: var(--text);
  font-size: 0.96rem;
  font-weight: 900;
  overflow-wrap: anywhere;
}

.hero {
  display: grid;
  grid-template-columns: minmax(0, 1.05fr) minmax(360px, 0.8fr);
  gap: 42px;
  align-items: center;
  min-height: calc(100vh - 88px);
  padding: 42px 0 64px;
}

.hero-copy h1 {
  max-width: 620px;
  margin: 0;
  font-size: clamp(2.8rem, 6vw, 5.1rem);
  line-height: 1;
  letter-spacing: 0;
}

.hero-subtitle {
  max-width: 660px;
  margin: 24px 0 0;
  color: var(--muted);
  font-size: 1.18rem;
}

.eyebrow,
.section-kicker {
  margin: 0 0 10px;
  color: var(--accent-dark);
  font-size: 0.78rem;
  font-weight: 800;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}

.hero-actions {
  gap: 12px;
  flex-wrap: wrap;
  margin-top: 32px;
}

.button {
  display: inline-flex;
  min-height: 48px;
  align-items: center;
  justify-content: center;
  gap: 8px;
  border: 1px solid transparent;
  border-radius: 999px;
  padding: 0 20px;
  cursor: pointer;
  font-weight: 800;
  transition:
    transform 160ms ease,
    border-color 160ms ease,
    background 160ms ease,
    box-shadow 160ms ease;
}

.button:hover:not(:disabled) {
  transform: translateY(-1px);
}

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

.button-primary {
  background: var(--primary);
  color: #ffffff;
  box-shadow: 0 14px 28px rgba(37, 99, 235, 0.2);
}

.button-primary:hover:not(:disabled) {
  background: var(--primary-dark);
}

.button-accent {
  background: var(--accent);
  color: #042f2e;
  box-shadow: 0 14px 28px rgba(20, 184, 166, 0.18);
}

.button-accent:hover:not(:disabled) {
  background: #2dd4bf;
}

.button-ghost {
  background: #ffffff;
  border-color: var(--border);
  color: var(--text);
}

.button-wide {
  width: 100%;
}

.upload-card,
.metric-card,
.trust-card,
.risk-card,
.result-hero-card,
.next-step-card,
.cleaning-options-card,
.insight-panel,
.process-card,
.summary-card,
.missing-preserved-card,
.poison-review-card,
.change-inspector-card,
.clean-warning-card,
.step-card,
.pricing-card,
.simple-card,
.price-card,
.support-section {
  border: 1px solid var(--border);
  border-radius: var(--radius);
  background: rgba(255, 255, 255, 0.92);
  box-shadow: var(--shadow);
}

.upload-card {
  padding: 26px;
}

.card-heading h2,
.section-heading h2,
.payment-section h2,
.support-section h2 {
  margin: 0;
  font-size: clamp(1.7rem, 3vw, 2.4rem);
  line-height: 1.1;
  letter-spacing: 0;
}

.card-heading p,
.section-heading p,
.payment-section p,
.support-section p {
  margin: 10px 0 0;
  color: var(--muted);
}

.support-section small {
  display: block;
  margin-top: 10px;
  color: var(--muted);
}

.trust-bullets {
  display: grid;
  gap: 8px;
  margin: 18px 0 0;
  padding: 0;
  list-style: none;
}

.trust-bullets li {
  position: relative;
  padding-left: 24px;
  color: var(--muted);
  font-size: 0.92rem;
  font-weight: 800;
}

.trust-bullets li::before {
  position: absolute;
  left: 0;
  top: 0.25rem;
  width: 14px;
  height: 14px;
  border-radius: 50%;
  background: var(--soft-teal);
  color: var(--accent-dark);
  content: "✓";
  font-size: 0.62rem;
  font-weight: 900;
  line-height: 14px;
  text-align: center;
}

.upload-dropzone {
  margin-top: 22px;
}

.upload-dropzone input {
  position: absolute;
  width: 1px;
  height: 1px;
  overflow: hidden;
  clip: rect(0, 0, 0, 0);
}

.upload-dropzone label {
  display: grid;
  min-height: 180px;
  place-items: center;
  border: 1.5px dashed #bfdbfe;
  border-radius: 20px;
  background: linear-gradient(180deg, #ffffff, var(--soft-blue));
  color: var(--text);
  cursor: pointer;
  text-align: center;
}

.upload-dropzone label.is-dragging {
  border-color: var(--primary);
  background: var(--soft-teal);
}

.upload-icon {
  display: grid;
  width: 46px;
  height: 46px;
  place-items: center;
  border-radius: 16px;
  background: var(--primary);
  color: #ffffff;
  font-size: 1.7rem;
  font-weight: 500;
}

.upload-dropzone small,
.upload-helper,
.status-message,
.job-id,
.price-note {
  color: var(--muted);
}

.upload-helper {
  min-height: 24px;
  margin: 14px 0 8px;
  font-size: 0.92rem;
  overflow-wrap: anywhere;
}

.upload-trust-list {
  display: grid;
  gap: 6px;
  margin: 0 0 14px;
  padding: 0;
  list-style: none;
}

.upload-trust-list li {
  color: var(--muted);
  font-size: 0.86rem;
  font-weight: 800;
}

.selected-file-card {
  display: grid;
  gap: 5px;
  border: 1px solid #99f6e4;
  border-radius: 18px;
  margin: 16px 0;
  padding: 16px;
  background: linear-gradient(180deg, #ffffff, var(--soft-teal));
}

.selected-file-card strong {
  color: var(--text);
  font-size: 1rem;
  overflow-wrap: anywhere;
}

.selected-file-card small {
  display: flex;
  justify-content: space-between;
  gap: 12px;
  color: var(--muted);
  font-weight: 700;
}

.selected-file-status {
  color: var(--accent-dark);
  font-size: 0.82rem;
  font-weight: 900;
  letter-spacing: 0.04em;
  text-transform: uppercase;
}

.status-message {
  min-height: 24px;
  margin: 14px 0 0;
  font-size: 0.94rem;
}

.status-message.is-error {
  color: #b91c1c;
}

.status-message.is-success {
  color: var(--accent-dark);
}

.section {
  padding: 72px 0;
}

.compact-section {
  padding-top: 24px;
}

.section-heading {
  max-width: 680px;
  margin-bottom: 26px;
}

.step-grid,
.pricing-grid,
.safety-grid {
  display: grid;
  gap: 16px;
}

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

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

.step-card,
.simple-card {
  padding: 22px;
}

.step-card span {
  display: grid;
  width: 34px;
  height: 34px;
  place-items: center;
  border-radius: 50%;
  background: var(--text);
  color: #ffffff;
  font-size: 0.9rem;
  font-weight: 900;
}

.step-card h3,
.simple-card h3 {
  margin: 16px 0 0;
  font-size: 1.05rem;
  line-height: 1.2;
}

.step-card p,
.simple-card p {
  margin: 8px 0 0;
  color: var(--muted);
  font-size: 0.94rem;
}

.dashboard-grid {
  display: grid;
  grid-template-columns: minmax(0, 1.1fr) minmax(280px, 0.75fr);
  gap: 16px;
  margin-bottom: 16px;
}

.trust-card,
.risk-card {
  min-height: 220px;
  padding: 26px;
}

.trust-card {
  background: linear-gradient(145deg, var(--text), #1e293b);
  color: #ffffff;
}

.trust-card span,
.risk-card span {
  display: block;
  color: var(--muted);
  font-size: 0.88rem;
  font-weight: 800;
}

.trust-card span {
  color: #cbd5e1;
}

.trust-card strong {
  display: block;
  margin-top: 18px;
  font-size: clamp(4rem, 9vw, 7rem);
  line-height: 0.9;
  letter-spacing: 0;
}

.trust-card p,
.risk-card p {
  max-width: 520px;
  margin: 18px 0 0;
}

.trust-card p {
  color: #cbd5e1;
}

.risk-badge {
  display: inline-flex;
  min-height: 52px;
  align-items: center;
  border-radius: 999px;
  margin-top: 22px;
  padding: 0 20px;
  background: var(--soft-blue);
  color: var(--primary-dark);
  font-size: 1.4rem;
  line-height: 1;
}

.risk-badge[data-risk="safe"] {
  background: var(--soft-teal);
  color: var(--accent-dark);
}

.risk-badge[data-risk="low"] {
  background: #ecfeff;
  color: #0e7490;
}

.risk-badge[data-risk="medium"] {
  background: #fffbeb;
  color: #b45309;
}

.risk-badge[data-risk="high"] {
  background: #fef2f2;
  color: #b91c1c;
}

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

.result-hero-card {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(300px, 0.52fr);
  gap: 22px;
  align-items: center;
  margin-bottom: 16px;
  padding: 28px;
  border-radius: 18px;
  background: #ffffff;
  box-shadow: 0 18px 42px rgba(15, 23, 42, 0.08);
}

.result-hero-copy {
  min-width: 0;
}

.result-hero-copy h3 {
  margin: 0;
  font-size: clamp(1.7rem, 3vw, 2.35rem);
  line-height: 1.08;
}

.result-hero-copy p:last-child {
  margin: 10px 0 0;
  color: var(--muted);
  font-weight: 700;
}

.result-hero-actions {
  display: grid;
  gap: 10px;
}

.result-hero-actions .button {
  width: 100%;
  min-width: 0;
}

.next-step-card {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(230px, 0.36fr);
  gap: 24px;
  align-items: center;
  margin: 16px 0;
  padding: 28px;
  background:
    linear-gradient(135deg, rgba(37, 99, 235, 0.11), rgba(20, 184, 166, 0.12)),
    #ffffff;
  box-shadow: 0 24px 56px rgba(37, 99, 235, 0.12);
}

.cleaning-options-card {
  margin: 16px 0;
  padding: 24px;
}

.cleaning-options-grid {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(320px, 0.9fr);
  gap: 16px;
  margin-top: 18px;
}

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

.cleaning-mode-toggle label {
  display: grid;
  grid-template-columns: auto minmax(0, 1fr);
  gap: 12px;
  align-items: start;
  border: 1px solid var(--border);
  border-radius: 14px;
  background: var(--bg);
  padding: 14px;
}

.cleaning-mode-toggle input {
  margin-top: 4px;
  accent-color: var(--primary);
}

.cleaning-mode-toggle strong {
  display: block;
  color: var(--text);
  font-size: 0.95rem;
}

.cleaning-mode-toggle small {
  display: block;
  margin-top: 4px;
  color: var(--muted);
  font-size: 0.86rem;
  line-height: 1.4;
}

.recommended-clean-summary {
  margin-top: 14px;
}

.recommended-clean-summary ul {
  display: grid;
  gap: 8px;
  margin: 0;
  padding-left: 18px;
  color: var(--muted);
  font-size: 0.9rem;
  line-height: 1.45;
}

.cleaning-option-group {
  display: grid;
  align-content: start;
  gap: 10px;
  border: 1px solid var(--border);
  border-radius: 18px;
  background: #ffffff;
  padding: 18px;
}

.cleaning-option-group h4 {
  margin: 0 0 4px;
  font-size: 1rem;
}

.cleaning-option-group-wide {
  grid-column: 1 / -1;
}

.cleaning-option-help {
  margin: 0;
  color: var(--muted);
  font-size: 0.9rem;
}

.cleaning-checkbox-option,
.duplicate-option {
  display: grid;
  grid-template-columns: auto minmax(0, 1fr);
  gap: 12px;
  align-items: start;
  border: 1px solid var(--border);
  border-radius: 14px;
  padding: 13px;
  background: var(--bg);
}

.cleaning-checkbox-option input,
.duplicate-option input {
  margin-top: 4px;
  accent-color: var(--primary);
}

.cleaning-checkbox-option strong,
.duplicate-option strong {
  display: block;
  color: var(--text);
  font-size: 0.94rem;
  line-height: 1.2;
}

.cleaning-checkbox-option small,
.duplicate-option small {
  display: block;
  margin-top: 4px;
  color: var(--muted);
  font-size: 0.86rem;
  line-height: 1.4;
}

.duplicate-options {
  display: grid;
  gap: 10px;
}

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

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

.missing-options-grid label {
  display: grid;
  gap: 8px;
  border: 1px solid var(--border);
  border-radius: 14px;
  background: var(--bg);
  padding: 13px;
}

.missing-options-grid span {
  color: var(--text);
  font-size: 0.92rem;
  font-weight: 900;
}

.missing-options-grid select,
.missing-options-grid input {
  width: 100%;
  min-height: 40px;
  border: 1px solid var(--border);
  border-radius: 10px;
  background: #ffffff;
  color: var(--text);
  padding: 0 10px;
}

.missing-options-grid input.is-disabled {
  border-color: #dbe3ef;
  background: #f1f5f9;
  color: #94a3b8;
  cursor: not-allowed;
}

.missing-options-grid label.custom-input-inactive input {
  opacity: 0.72;
}

.next-step-card h3 {
  margin: 0;
  font-size: clamp(1.35rem, 3vw, 2rem);
  line-height: 1.15;
}

.next-step-card p {
  margin: 10px 0 0;
  color: var(--muted);
}

.next-step-action {
  display: grid;
  gap: 10px;
}

.next-step-action .button {
  width: 100%;
}

.primary-reclean-action {
  display: grid;
  gap: 8px;
  margin-top: 2px;
}

.primary-reclean-action .button {
  min-height: 54px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  border: 1px solid rgba(37, 99, 235, 0.42);
  border-radius: 999px;
  background: linear-gradient(135deg, #eff6ff, #eefdfb);
  color: var(--primary-dark);
  box-shadow: 0 12px 24px rgba(37, 99, 235, 0.12);
  font-weight: 900;
  transition: transform 160ms ease, box-shadow 160ms ease, border-color 160ms ease, background 160ms ease;
}

.primary-reclean-action .button:hover:not(:disabled) {
  border-color: rgba(20, 184, 166, 0.62);
  background: linear-gradient(135deg, #dbeafe, #ccfbf1);
  box-shadow: 0 16px 30px rgba(20, 184, 166, 0.16);
  transform: translateY(-1px);
}

.primary-reclean-action .button span {
  font-size: 1.08rem;
  line-height: 1;
}

.primary-reclean-action small {
  color: var(--muted);
  font-size: 0.82rem;
  line-height: 1.35;
  text-align: center;
}

.next-step-ready {
  color: var(--accent-dark);
  font-size: 0.9rem;
  font-weight: 900;
  text-align: center;
}

.summary-card-heading {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  margin-bottom: 16px;
}

.is-result-mode .dashboard-grid,
.is-result-mode .overview-grid,
.is-result-mode .payment-success-banner {
  display: none !important;
}

.is-unlocked-result #next-step-card {
  display: none !important;
}

.is-result-mode .header-nav {
  display: none;
}

.is-result-mode #results > .section-heading {
  display: none;
}

.is-unlocked-result .upload-card {
  align-self: start;
  box-shadow: 0 10px 28px rgba(15, 23, 42, 0.05);
}

.is-unlocked-result .upload-card .card-heading,
.is-unlocked-result .upload-card .trust-bullets,
.is-unlocked-result .upload-card .upload-trust-list,
.is-unlocked-result .upload-card .upload-helper,
.is-unlocked-result .upload-card .selected-file-card small,
.is-unlocked-result #main-action-button,
.is-unlocked-result #primary-reclean-action {
  display: none !important;
}

.is-unlocked-result .upload-dropzone label {
  min-height: 110px;
}

.summary-card-heading h3 {
  margin: 0;
}

.summary-card-heading .button {
  flex: 0 0 auto;
}

.payment-success-banner {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(220px, 0.42fr);
  gap: 22px;
  align-items: center;
  margin: 16px 0;
  padding: 24px;
  border: 1px solid rgba(20, 184, 166, 0.28);
  border-radius: 18px;
  background: linear-gradient(135deg, #ecfdf5, #ffffff);
  box-shadow: 0 18px 42px rgba(20, 184, 166, 0.13);
}

.payment-success-banner h3 {
  margin: 0;
  font-size: clamp(1.2rem, 2.4vw, 1.65rem);
  line-height: 1.2;
}

.payment-success-banner p {
  margin: 8px 0 0;
  color: var(--muted);
}

.payment-success-banner ul {
  display: grid;
  gap: 8px;
  margin: 0;
  padding: 0;
  list-style: none;
}

.payment-success-banner li {
  display: flex;
  align-items: center;
  gap: 8px;
  color: var(--accent-dark);
  font-size: 0.92rem;
  font-weight: 900;
}

.payment-success-banner li::before {
  content: "";
  width: 8px;
  height: 8px;
  flex: 0 0 auto;
  border-radius: 999px;
  background: var(--accent);
}

.clean-primary-button {
  min-height: 58px;
  border: 0;
  border-radius: 999px;
  background: linear-gradient(135deg, var(--primary), var(--accent));
  color: #ffffff;
  box-shadow: 0 18px 34px rgba(37, 99, 235, 0.25);
  font-size: 1.02rem;
}

.clean-primary-button:hover:not(:disabled) {
  background: linear-gradient(135deg, var(--primary-dark), #0d9488);
  box-shadow: 0 22px 42px rgba(20, 184, 166, 0.24);
}

.clean-primary-button:disabled {
  background: #cbd5e1;
  color: #475569;
  box-shadow: none;
}

.process-card .button {
  width: 100%;
}

.metric-card {
  min-height: 138px;
  padding: 22px;
}

.metric-card span {
  display: block;
  color: var(--muted);
  font-size: 0.88rem;
  font-weight: 700;
}

.metric-card strong {
  display: block;
  margin-top: 18px;
  font-size: clamp(2rem, 5vw, 3rem);
  line-height: 1;
  letter-spacing: 0;
}

.metric-card small {
  display: block;
  margin-top: 12px;
  color: var(--muted);
  font-size: 0.88rem;
  font-weight: 700;
}

.job-id {
  margin-top: 16px;
  font-size: 0.88rem;
  overflow-wrap: anywhere;
}

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

.insight-panel,
.change-inspector-card,
.clean-warning-card,
.missing-preserved-card,
.poison-review-card {
  padding: 24px;
}

.change-inspector-card {
  margin-top: 16px;
}

.change-inspector-card summary {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  cursor: pointer;
  list-style: none;
}

.change-inspector-card summary::-webkit-details-marker {
  display: none;
}

.change-inspector-card summary strong {
  display: block;
  color: var(--text);
  font-size: 1.08rem;
}

.change-inspector-card summary::after {
  content: "+";
  display: grid;
  width: 32px;
  height: 32px;
  flex: 0 0 auto;
  place-items: center;
  border: 1px solid var(--border);
  border-radius: 999px;
  color: var(--muted);
  font-weight: 900;
}

.change-inspector-card[open] summary::after {
  content: "-";
}

.change-inspector-count {
  margin-left: auto;
  color: var(--muted);
  font-size: 0.88rem;
  font-weight: 900;
  white-space: nowrap;
}

.missing-preserved-card,
.poison-review-card {
  margin-top: 16px;
}

.missing-preserved-table,
.poison-summary-table {
  width: 100%;
  min-width: 620px;
  border-collapse: collapse;
  margin-top: 16px;
  font-size: 0.9rem;
}

.missing-preserved-card,
.poison-review-card {
  overflow-x: auto;
}

.missing-preserved-table th,
.missing-preserved-table td,
.poison-summary-table th,
.poison-summary-table td {
  border-bottom: 1px solid var(--border);
  padding: 11px 10px;
  text-align: left;
  vertical-align: top;
}

.missing-preserved-table th,
.poison-summary-table th {
  color: var(--muted);
  font-size: 0.76rem;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}

.missing-preserved-table td:last-child {
  color: var(--accent-dark);
  font-weight: 900;
}

.missing-preserved-note,
.poison-review-note {
  margin: 12px 0 0;
  color: var(--muted);
  font-size: 0.88rem;
}

.panel-heading h3 {
  margin: 0;
  font-size: 1.18rem;
  line-height: 1.2;
}

.insight-list {
  display: grid;
  gap: 12px;
  margin: 18px 0 0;
  padding: 0;
  list-style: none;
}

.insight-list li {
  border: 1px solid var(--border);
  border-radius: 16px;
  background: #ffffff;
  padding: 14px;
}

.insight-list strong {
  display: block;
  color: var(--text);
  font-size: 0.95rem;
  text-transform: capitalize;
}

.insight-list span {
  display: block;
  margin-top: 4px;
  color: var(--muted);
  font-size: 0.9rem;
}

.warning-list li {
  background: #fffbeb;
  border-color: #fde68a;
}

.processing-note-list li {
  background: #f8fafc;
  border-color: #dbeafe;
}

.processing-note-list strong {
  color: var(--primary-dark);
}

.split-section,
.payment-section,
.support-section {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(320px, 0.72fr);
  gap: 24px;
  align-items: start;
}

.process-card,
.summary-card,
.change-inspector-card,
.clean-warning-card,
.pricing-card,
.price-card {
  padding: 26px;
}

.pricing-section {
  padding-top: 48px;
}

.pricing-usage-summary {
  border-left: 3px solid var(--accent);
  margin-top: 14px !important;
  padding-left: 12px;
  color: var(--accent-dark) !important;
  font-weight: 900;
}

.pricing-card {
  display: grid;
  align-content: start;
  gap: 16px;
}

.pricing-card-featured {
  border-color: #bfdbfe;
  background: linear-gradient(180deg, #ffffff, var(--soft-blue));
}

.pricing-card strong {
  color: var(--text);
  font-size: clamp(2.2rem, 5vw, 3.2rem);
  line-height: 1;
  letter-spacing: 0;
}

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

.pricing-card li {
  color: var(--muted);
  font-weight: 800;
}

.pricing-card small {
  min-height: 22px;
  color: var(--muted);
  font-size: 0.88rem;
}

.pricing-card small.is-error {
  color: #b91c1c;
}

.pricing-card small.is-success {
  color: var(--accent-dark);
}

.pricing-plan-button {
  width: 100%;
  margin-top: 4px;
}

.clean-list {
  display: grid;
  gap: 12px;
  margin: 0 0 24px;
  padding: 0;
  list-style: none;
}

.clean-list li {
  position: relative;
  padding-left: 28px;
  color: var(--muted);
}

.clean-list li::before {
  position: absolute;
  left: 0;
  top: 0.18rem;
  width: 18px;
  height: 18px;
  border-radius: 50%;
  background: var(--soft-teal);
  color: var(--accent-dark);
  content: "✓";
  font-size: 0.74rem;
  font-weight: 900;
  line-height: 18px;
  text-align: center;
}

.summary-card {
  grid-column: 2;
}

.change-inspector-card {
  grid-column: 1 / -1;
}

.clean-warning-card {
  grid-column: 1 / -1;
}

.change-inspector-table {
  margin-top: 18px;
  overflow-x: auto;
}

.change-inspector-table table {
  width: 100%;
  min-width: 760px;
  border-collapse: collapse;
  font-size: 0.9rem;
}

.change-inspector-table th,
.change-inspector-table td {
  border-bottom: 1px solid var(--border);
  padding: 12px 10px;
  text-align: left;
  vertical-align: top;
}

.change-inspector-table th {
  color: var(--muted);
  font-size: 0.76rem;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}

.change-inspector-table td {
  color: var(--text);
}

.change-inspector-table td:nth-child(3) {
  width: 88px;
  font-weight: 800;
}

.change-inspector-table td:nth-child(5) {
  color: var(--muted);
}

.change-inspector-note {
  margin: 12px 0 0;
  color: var(--muted);
  font-size: 0.88rem;
}

.results-section .summary-card,
.results-section .change-inspector-card,
.results-section .clean-warning-card {
  margin-top: 16px;
}

.results-section .summary-card {
  grid-column: auto;
}

.results-section .summary-card dl {
  grid-template-columns: repeat(5, minmax(0, 1fr));
}

.results-section .summary-card dl div {
  display: grid;
  gap: 4px;
  align-content: start;
  justify-content: stretch;
  border: 1px solid var(--border);
  border-radius: 14px;
  padding: 14px;
}

.summary-card h3 {
  margin: 0 0 16px;
  font-size: 1.15rem;
}

.summary-card dl {
  display: grid;
  gap: 12px;
  margin: 0;
}

.summary-card dl div {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  border-bottom: 1px solid var(--border);
  padding-bottom: 12px;
}

.summary-card dt {
  color: var(--muted);
}

.summary-card dd {
  margin: 0;
  font-weight: 800;
}

.payment-section {
  align-items: center;
  border-top: 1px solid var(--border);
  border-bottom: 1px solid var(--border);
}

.price-card {
  text-align: center;
}

.price {
  display: block;
  font-size: 4.4rem;
  font-weight: 900;
  line-height: 1;
  letter-spacing: 0;
}

.price-note {
  display: block;
  margin: 6px 0 22px;
}

.support-section {
  margin: 72px auto;
  padding: 28px;
  align-items: center;
}

.support-actions {
  display: flex;
  flex-wrap: wrap;
  justify-content: flex-end;
  gap: 10px;
}

.support-actions .button {
  min-width: 82px;
}

.support-actions small {
  flex-basis: 100%;
  color: var(--muted);
  font-size: 0.88rem;
  text-align: right;
}

.support-actions small.is-error {
  color: #b91c1c;
}

.support-actions small.is-success {
  color: var(--accent-dark);
}

.support-section .support-actions {
  justify-self: end;
}

.site-footer {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 18px;
  border-top: 1px solid var(--border);
  padding: 26px 0 34px;
  color: var(--muted);
  font-size: 0.92rem;
}

.site-footer span:first-child {
  color: var(--text);
  font-weight: 800;
}

.site-footer a {
  color: var(--muted);
  font-weight: 700;
}

.site-footer a:hover {
  color: var(--primary);
}

.faq-list {
  display: grid;
  gap: 10px;
}

.faq-list details {
  border: 1px solid var(--border);
  border-radius: 18px;
  background: rgba(255, 255, 255, 0.92);
  box-shadow: 0 12px 30px rgba(15, 23, 42, 0.05);
  padding: 18px 20px;
}

.faq-list summary {
  cursor: pointer;
  color: var(--text);
  font-weight: 900;
}

.faq-list p {
  margin: 10px 0 0;
  color: var(--muted);
}

.is-hidden {
  display: none !important;
}

@media (max-width: 900px) {
  .site-header {
    flex-wrap: wrap;
  }

  .brand {
    flex: 1 1 auto;
  }

  .header-nav {
    order: 3;
    width: 100%;
    justify-content: space-between;
  }

  .account-nav {
    flex: 0 1 auto;
  }

  .hero,
  .split-section,
  .payment-section,
  .support-section {
    grid-template-columns: 1fr;
  }

  .hero {
    min-height: auto;
  }

  .dashboard-grid,
  .insight-grid,
  .result-hero-card,
  .cleaning-options-grid,
  .cleaning-mode-toggle,
  .step-grid,
  .pricing-grid,
  .safety-grid,
  .next-step-card,
  .payment-success-banner,
  .subscription-status-card {
    grid-template-columns: 1fr;
  }

  .subscription-status-metrics {
    grid-template-columns: 1fr;
  }

  .missing-options-grid,
  .number-options-grid {
    grid-template-columns: 1fr;
  }

  .summary-card-heading {
    display: grid;
  }

  .summary-card-heading .button {
    width: 100%;
  }

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

  .summary-card {
    grid-column: auto;
  }

  .results-section .summary-card dl {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .support-section .support-actions {
    justify-self: start;
  }

  .support-actions {
    justify-content: flex-start;
  }

  .support-actions small {
    text-align: left;
  }
}

@media (max-width: 640px) {
  .site-header,
  .site-footer,
  main {
    width: min(100% - 28px, 1120px);
  }

  .site-header,
  .site-footer {
    align-items: flex-start;
    flex-direction: column;
  }

  .account-nav {
    width: 100%;
    justify-content: space-between;
  }

  .account-state {
    min-width: 0;
  }

  .account-state span {
    max-width: 180px;
  }

  .header-nav {
    width: 100%;
    justify-content: space-between;
    gap: 10px;
    font-size: 0.9rem;
  }

  .hero {
    padding-top: 24px;
  }

  .hero-copy h1 {
    font-size: 3.15rem;
  }

  .upload-card,
  .result-hero-card,
  .process-card,
  .cleaning-options-card,
  .summary-card,
  .change-inspector-card,
  .clean-warning-card,
  .step-card,
  .pricing-card,
  .simple-card,
  .price-card,
  .support-section {
    border-radius: 20px;
    padding: 20px;
  }

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

  .results-section .summary-card dl {
    grid-template-columns: 1fr;
  }
}
