:root {
  color-scheme: dark;
  --navy-950: #080d1a;
  --navy-900: #0f172a;
  --navy-850: #131d32;
  --navy-800: #1e293b;
  --navy-700: #334155;
  --slate-500: #64748b;
  --slate-400: #94a3b8;
  --slate-300: #cbd5e1;
  --slate-100: #f1f5f9;
  --white: #ffffff;
  --blue-600: #2563eb;
  --blue-500: #3b82f6;
  --blue-300: #93c5fd;
  --teal-600: #0f766e;
  --teal-400: #2dd4bf;
  --green-500: #22c55e;
  --amber-500: #f59e0b;
  --red-500: #ef4444;
  --red-300: #fca5a5;
  --border: rgba(148, 163, 184, 0.2);
  --border-strong: rgba(148, 163, 184, 0.34);
  --shadow: 0 24px 60px rgba(0, 0, 0, 0.28);
  --radius-xl: 24px;
  --radius-lg: 18px;
  --radius-md: 13px;
  --safe-bottom: max(22px, env(safe-area-inset-bottom));
}

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

html {
  min-height: 100%;
  scroll-behavior: smooth;
  background: var(--navy-950);
}

body {
  min-width: 320px;
  min-height: 100%;
  margin: 0;
  background:
    radial-gradient(circle at 10% -10%, rgba(37, 99, 235, 0.22), transparent 32rem),
    radial-gradient(circle at 100% 20%, rgba(15, 118, 110, 0.13), transparent 28rem),
    linear-gradient(180deg, var(--navy-950) 0%, var(--navy-900) 38%, #0b1221 100%);
  color: var(--slate-100);
  font-family: Inter, ui-sans-serif, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
  font-size: 16px;
  line-height: 1.5;
  -webkit-font-smoothing: antialiased;
  -webkit-tap-highlight-color: transparent;
}

button,
input {
  font: inherit;
}

button,
summary,
a {
  -webkit-tap-highlight-color: transparent;
}

button {
  color: inherit;
}

a {
  color: var(--blue-300);
}

.app-shell {
  width: min(100%, 780px);
  min-height: 100vh;
  margin: 0 auto;
  padding:
    max(12px, env(safe-area-inset-top))
    clamp(16px, 4vw, 28px)
    var(--safe-bottom);
}

.topbar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  min-height: 56px;
  margin-bottom: clamp(30px, 7vw, 56px);
}

.brand {
  display: inline-flex;
  align-items: center;
  gap: 11px;
  color: var(--slate-100);
  text-decoration: none;
}

.brand img {
  width: 40px;
  height: 40px;
  border: 1px solid rgba(255, 255, 255, 0.12);
  border-radius: 11px;
  object-fit: cover;
  box-shadow: 0 8px 24px rgba(0, 0, 0, 0.26);
}

.brand span {
  display: grid;
  line-height: 1.2;
}

.brand strong {
  font-size: 16px;
  letter-spacing: -0.01em;
}

.brand small {
  margin-top: 3px;
  color: var(--slate-400);
  font-size: 11px;
}

main {
  display: grid;
  gap: 18px;
}

.intro {
  padding: 0 2px 10px;
}

.eyebrow,
.step-label {
  color: var(--blue-300);
  font-size: 11px;
  font-weight: 800;
  letter-spacing: 0.12em;
  text-transform: uppercase;
}

.eyebrow {
  display: inline-flex;
  align-items: center;
  gap: 8px;
}

.eyebrow > span {
  width: 7px;
  height: 7px;
  border-radius: 50%;
  background: var(--teal-400);
  box-shadow: 0 0 0 5px rgba(45, 212, 191, 0.11);
}

.intro h1 {
  max-width: 680px;
  margin: 13px 0 14px;
  font-size: clamp(34px, 9vw, 58px);
  font-weight: 800;
  letter-spacing: -0.045em;
  line-height: 1.02;
}

.intro p {
  max-width: 650px;
  margin: 0;
  color: var(--slate-300);
  font-size: clamp(16px, 4.4vw, 19px);
  line-height: 1.65;
}

.checker-card,
.activity-card,
.trust-card,
.results-section {
  border: 1px solid var(--border);
  border-radius: var(--radius-xl);
  background: rgba(19, 29, 50, 0.9);
  box-shadow: var(--shadow);
  backdrop-filter: blur(16px);
}

.checker-card,
.activity-card,
.results-section {
  padding: clamp(20px, 5vw, 30px);
}

.section-heading {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 16px;
  margin-bottom: 22px;
}

.section-heading h2,
.result-summary h2,
.trust-card h2,
.dialog-header h2 {
  margin: 5px 0 0;
  font-size: clamp(20px, 5vw, 26px);
  letter-spacing: -0.025em;
  line-height: 1.2;
}

.free-pill {
  flex: none;
  padding: 6px 10px;
  border: 1px solid rgba(45, 212, 191, 0.25);
  border-radius: 999px;
  background: rgba(15, 118, 110, 0.15);
  color: #99f6e4;
  font-size: 11px;
  font-weight: 800;
  letter-spacing: 0.06em;
  text-transform: uppercase;
}

form {
  display: grid;
  gap: 12px;
}

label {
  color: var(--slate-300);
  font-size: 13px;
  font-weight: 700;
}

label span {
  color: var(--slate-500);
  font-weight: 500;
}

.input-wrap {
  position: relative;
}

.input-icon {
  position: absolute;
  top: 50%;
  left: 15px;
  width: 21px;
  height: 21px;
  color: var(--slate-400);
  pointer-events: none;
  transform: translateY(-50%);
}

svg {
  display: block;
  width: 100%;
  height: 100%;
  fill: none;
  stroke: currentColor;
  stroke-linecap: round;
  stroke-linejoin: round;
  stroke-width: 1.8;
}

input {
  width: 100%;
  min-height: 54px;
  padding: 13px 15px;
  border: 1px solid var(--border-strong);
  border-radius: var(--radius-md);
  outline: none;
  background: rgba(8, 13, 26, 0.72);
  color: var(--white);
  font-size: 16px;
  transition: border-color 160ms ease, box-shadow 160ms ease, background 160ms ease;
}

.input-wrap input {
  padding-left: 47px;
}

input::placeholder {
  color: var(--slate-500);
}

input:focus {
  border-color: var(--blue-500);
  background: rgba(8, 13, 26, 0.95);
  box-shadow: 0 0 0 4px rgba(59, 130, 246, 0.14);
}

input[aria-invalid="true"] {
  border-color: var(--red-500);
  box-shadow: 0 0 0 4px rgba(239, 68, 68, 0.12);
}

.field-help {
  margin: -2px 1px 3px;
  color: var(--slate-500);
  font-size: 11px;
  line-height: 1.55;
}

.quick-actions,
.result-actions {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 10px;
}

.button {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 9px;
  min-height: 48px;
  padding: 11px 15px;
  border: 1px solid transparent;
  border-radius: 12px;
  cursor: pointer;
  font-size: 14px;
  font-weight: 750;
  line-height: 1.2;
  text-decoration: none;
  transition: transform 140ms ease, border-color 140ms ease, background 140ms ease, opacity 140ms ease;
}

.button svg {
  flex: none;
  width: 19px;
  height: 19px;
}

.button:active {
  transform: scale(0.985);
}

.button:focus-visible,
.text-button:focus-visible,
.icon-button:focus-visible,
.activity-item:focus-visible {
  outline: 3px solid rgba(147, 197, 253, 0.75);
  outline-offset: 2px;
}

.button:disabled {
  cursor: wait;
  opacity: 0.68;
}

.button-primary {
  border-color: rgba(147, 197, 253, 0.12);
  background: linear-gradient(135deg, var(--blue-600), var(--teal-600));
  color: var(--white);
  box-shadow: 0 12px 30px rgba(37, 99, 235, 0.24);
}

.button-primary:hover {
  background: linear-gradient(135deg, #2f6fea, #10877d);
}

.button-secondary {
  border-color: var(--border-strong);
  background: rgba(30, 41, 59, 0.72);
  color: var(--slate-100);
}

.button-secondary:hover {
  border-color: rgba(147, 197, 253, 0.45);
  background: rgba(51, 65, 85, 0.72);
}

.button-quiet {
  min-height: 38px;
  padding: 8px 13px;
  border-color: var(--border);
  background: rgba(30, 41, 59, 0.62);
  color: var(--slate-300);
  font-size: 12px;
}

.button-full {
  width: 100%;
}

.check-button {
  min-height: 56px;
  margin-top: 3px;
  font-size: 15px;
}

.button-loading {
  display: none;
  align-items: center;
  gap: 10px;
}

.is-busy .button-label {
  display: none;
}

.is-busy .button-loading {
  display: inline-flex;
}

.spinner {
  width: 18px;
  height: 18px;
  border: 2px solid rgba(255, 255, 255, 0.34);
  border-top-color: var(--white);
  border-radius: 50%;
  animation: spin 700ms linear infinite;
}

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

.optional-fields {
  border-top: 1px solid var(--border);
  border-bottom: 1px solid var(--border);
}

.optional-fields summary {
  min-height: 44px;
  padding: 12px 1px;
  color: var(--slate-400);
  cursor: pointer;
  font-size: 12px;
  font-weight: 700;
  list-style-position: inside;
}

.optional-field {
  display: grid;
  gap: 8px;
  padding-bottom: 14px;
}

.source-line {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: center;
  gap: 7px;
  margin-top: 18px;
  color: var(--slate-500);
  font-size: 10px;
  text-transform: uppercase;
  letter-spacing: 0.08em;
}

.source-line strong {
  padding: 4px 7px;
  border: 1px solid var(--border);
  border-radius: 999px;
  color: var(--slate-400);
  font-size: 9px;
}

.status-region {
  display: grid;
  grid-template-columns: 12px 1fr;
  gap: 12px;
  padding: 16px 18px;
  border: 1px solid var(--border);
  border-radius: var(--radius-md);
  background: rgba(30, 41, 59, 0.72);
}

.status-region[data-tone="error"] {
  border-color: rgba(239, 68, 68, 0.35);
  background: rgba(127, 29, 29, 0.2);
}

.status-region[data-tone="success"] {
  border-color: rgba(45, 212, 191, 0.3);
  background: rgba(15, 118, 110, 0.16);
}

.status-icon {
  width: 10px;
  height: 10px;
  margin-top: 6px;
  border-radius: 50%;
  background: var(--blue-500);
  box-shadow: 0 0 0 4px rgba(59, 130, 246, 0.12);
}

[data-tone="error"] .status-icon {
  background: var(--red-500);
  box-shadow: 0 0 0 4px rgba(239, 68, 68, 0.12);
}

[data-tone="success"] .status-icon {
  background: var(--teal-400);
  box-shadow: 0 0 0 4px rgba(45, 212, 191, 0.12);
}

.status-region strong {
  font-size: 14px;
}

.status-region p {
  margin: 3px 0 0;
  color: var(--slate-400);
  font-size: 12px;
}

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

.result-summary {
  display: grid;
  grid-template-columns: 48px 1fr;
  gap: 15px;
  align-items: start;
}

.summary-icon,
.trust-icon {
  display: grid;
  place-items: center;
  border-radius: 14px;
}

.summary-icon {
  width: 48px;
  height: 48px;
  background: rgba(59, 130, 246, 0.12);
  color: var(--blue-300);
}

.result-summary[data-state="alert"] .summary-icon {
  background: rgba(239, 68, 68, 0.13);
  color: var(--red-300);
}

.result-summary[data-state="watch"] .summary-icon {
  background: rgba(245, 158, 11, 0.13);
  color: #fcd34d;
}

.result-summary[data-state="none"] .summary-icon {
  background: rgba(45, 212, 191, 0.12);
  color: #99f6e4;
}

.summary-icon svg {
  width: 25px;
  height: 25px;
}

.result-summary p {
  margin: 6px 0 0;
  color: var(--slate-400);
  font-size: 13px;
}

.results-list {
  display: grid;
  gap: 12px;
}

.recall-card {
  overflow: hidden;
  border: 1px solid var(--border);
  border-left: 4px solid var(--slate-500);
  border-radius: var(--radius-lg);
  background: rgba(8, 13, 26, 0.58);
}

.recall-card.high {
  border-left-color: var(--red-500);
}

.recall-card.medium {
  border-left-color: var(--amber-500);
}

.recall-card.low {
  border-left-color: var(--slate-500);
}

.recall-card-main {
  padding: 17px;
}

.badges {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
  margin-bottom: 12px;
}

.badge {
  padding: 4px 7px;
  border: 1px solid var(--border);
  border-radius: 999px;
  background: rgba(51, 65, 85, 0.46);
  color: var(--slate-300);
  font-size: 9px;
  font-weight: 850;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}

.badge-high,
.badge-active {
  border-color: rgba(239, 68, 68, 0.28);
  background: rgba(239, 68, 68, 0.12);
  color: var(--red-300);
}

.badge-medium,
.badge-watch {
  border-color: rgba(245, 158, 11, 0.28);
  background: rgba(245, 158, 11, 0.11);
  color: #fcd34d;
}

.recall-card h3 {
  margin: 0;
  font-size: 16px;
  line-height: 1.35;
}

.recall-reason {
  margin: 9px 0 13px;
  color: var(--slate-300);
  font-size: 13px;
  line-height: 1.58;
}

.recall-meta {
  display: grid;
  grid-template-columns: 1fr;
  gap: 6px;
  margin: 0;
}

.recall-meta div {
  display: grid;
  grid-template-columns: 68px 1fr;
  gap: 8px;
  font-size: 11px;
}

.recall-meta dt {
  color: var(--slate-500);
}

.recall-meta dd {
  margin: 0;
  color: var(--slate-400);
  overflow-wrap: anywhere;
}

.match-details {
  border-top: 1px solid var(--border);
}

.match-details summary {
  min-height: 45px;
  padding: 13px 17px;
  color: var(--slate-400);
  cursor: pointer;
  font-size: 11px;
  font-weight: 750;
  list-style-position: inside;
}

.match-details-content {
  padding: 0 17px 16px;
}

.match-details ul {
  margin: 0 0 13px;
  padding-left: 18px;
  color: var(--slate-400);
  font-size: 11px;
}

.source-link {
  display: inline-flex;
  min-height: 40px;
  align-items: center;
  color: var(--blue-300);
  font-size: 12px;
  font-weight: 750;
}

.no-match-card,
.premium-card {
  padding: 19px;
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  background: rgba(8, 13, 26, 0.52);
}

.no-match-card h3,
.premium-card h3 {
  margin: 0 0 8px;
  font-size: 16px;
}

.no-match-card p,
.premium-card p {
  margin: 0;
  color: var(--slate-400);
  font-size: 13px;
  line-height: 1.6;
}

.result-actions {
  margin-top: 1px;
}

.safety-note {
  margin: 0;
  padding-top: 15px;
  border-top: 1px solid var(--border);
  color: var(--slate-500);
  font-size: 10px;
  line-height: 1.6;
}

.activity-card {
  box-shadow: none;
}

.text-button {
  min-height: 38px;
  padding: 5px 0 5px 10px;
  border: 0;
  background: none;
  color: var(--slate-500);
  cursor: pointer;
  font-size: 11px;
}

.activity-group + .activity-group {
  margin-top: 22px;
  padding-top: 18px;
  border-top: 1px solid var(--border);
}

.activity-group h3 {
  margin: 0 0 10px;
  color: var(--slate-400);
  font-size: 11px;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}

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

.activity-item {
  display: grid;
  grid-template-columns: 1fr auto;
  gap: 10px;
  align-items: center;
  width: 100%;
  min-height: 54px;
  padding: 10px 12px;
  border: 1px solid var(--border);
  border-radius: 11px;
  background: rgba(8, 13, 26, 0.46);
  color: var(--slate-100);
  text-align: left;
}

button.activity-item {
  cursor: pointer;
}

.activity-copy {
  min-width: 0;
}

.activity-copy strong,
.activity-copy small {
  display: block;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.activity-copy strong {
  font-size: 12px;
}

.activity-copy small {
  margin-top: 3px;
  color: var(--slate-500);
  font-size: 10px;
}

.activity-status {
  color: var(--slate-500);
  font-size: 10px;
  white-space: nowrap;
}

.remove-button {
  min-width: 42px;
  min-height: 42px;
  padding: 0 8px;
  border: 0;
  background: transparent;
  color: var(--slate-500);
  cursor: pointer;
  font-size: 18px;
}

.trust-card {
  display: grid;
  grid-template-columns: 42px 1fr;
  gap: 14px;
  padding: 20px;
  box-shadow: none;
}

.trust-icon {
  width: 42px;
  height: 42px;
  background: rgba(45, 212, 191, 0.1);
  color: #99f6e4;
}

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

.trust-card h2 {
  font-size: 16px;
}

.trust-card p {
  margin: 7px 0 0;
  color: var(--slate-400);
  font-size: 12px;
  line-height: 1.6;
}

footer {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 11px 18px;
  padding: 34px 4px 12px;
  color: var(--slate-500);
  font-size: 10px;
}

footer a {
  color: var(--slate-400);
  text-decoration: none;
}

dialog {
  width: min(calc(100% - 24px), 620px);
  margin: auto;
  padding: 20px;
  border: 1px solid var(--border-strong);
  border-radius: var(--radius-xl);
  background: var(--navy-850);
  color: var(--slate-100);
  box-shadow: 0 30px 90px rgba(0, 0, 0, 0.58);
}

dialog::backdrop {
  background: rgba(2, 6, 23, 0.84);
  backdrop-filter: blur(8px);
}

.dialog-header {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 16px;
  margin-bottom: 17px;
}

.icon-button {
  display: grid;
  flex: none;
  width: 44px;
  height: 44px;
  place-items: center;
  border: 1px solid var(--border);
  border-radius: 50%;
  background: rgba(30, 41, 59, 0.7);
  color: var(--slate-300);
  cursor: pointer;
  font-size: 24px;
  line-height: 1;
}

.camera-frame {
  position: relative;
  overflow: hidden;
  aspect-ratio: 4 / 3;
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  background: var(--navy-950);
}

.camera-frame video {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.scan-guide {
  position: absolute;
  inset: 15%;
  border: 2px solid rgba(255, 255, 255, 0.8);
  border-radius: 12px;
  box-shadow: 0 0 0 999px rgba(2, 6, 23, 0.34);
}

.scan-guide span {
  position: absolute;
  top: 50%;
  right: 7%;
  left: 7%;
  height: 2px;
  background: var(--red-500);
  box-shadow: 0 0 12px rgba(239, 68, 68, 0.65);
  animation: scan 1.7s ease-in-out infinite alternate;
}

@keyframes scan {
  from {
    transform: translateY(-70px);
  }
  to {
    transform: translateY(70px);
  }
}

.scanner-dialog > p {
  margin: 13px 0;
  color: var(--slate-400);
  font-size: 12px;
  text-align: center;
}

.install-dialog ol {
  display: grid;
  gap: 13px;
  margin: 0;
  padding: 0 0 0 24px;
  color: var(--slate-300);
  font-size: 14px;
}

.noscript {
  position: fixed;
  right: 12px;
  bottom: 12px;
  left: 12px;
  padding: 14px;
  border: 1px solid rgba(239, 68, 68, 0.35);
  border-radius: 12px;
  background: #450a0a;
  color: #fecaca;
  text-align: center;
}

[hidden] {
  display: none !important;
}

@media (min-width: 640px) {
  .app-shell {
    padding-top: 24px;
  }

  .checker-card,
  .activity-card,
  .results-section {
    padding: 30px;
  }

  .recall-meta {
    grid-template-columns: 1fr 1fr;
  }

  .recall-meta div {
    grid-template-columns: 72px 1fr;
  }
}

@media (max-width: 430px) {
  .result-actions {
    grid-template-columns: 1fr;
  }

  .button {
    padding-right: 11px;
    padding-left: 11px;
  }
}

@media (display-mode: standalone) {
  .install-button {
    display: none !important;
  }
}

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