/* Automostly — Material Design 3 dark token definitions + base styles */

:root {
  /* M3 dark color tokens */
  --md-sys-color-background:        #0f172a;
  --md-sys-color-surface:           #1e293b;
  --md-sys-color-surface-variant:   #253246;
  --md-sys-color-surface-container: #162032;
  --md-sys-color-primary:           #06b6d4;
  --md-sys-color-secondary:         #a855f7;
  --md-sys-color-on-primary:        #0f172a;
  --md-sys-color-on-secondary:      #ffffff;
  --md-sys-color-on-background:     #f1f5f9;
  --md-sys-color-on-surface:        #e2e8f0;
  --md-sys-color-on-surface-variant:#94a3b8;
  --md-sys-color-outline:           #334155;
  --md-sys-color-outline-variant:   #1e293b;
  --md-sys-color-error:             #f87171;
  --md-sys-color-success:           #34d399;

  /* Gradients */
  --gradient-primary: linear-gradient(135deg, #06b6d4, #a855f7);
  --gradient-surface: linear-gradient(180deg, #1e293b 0%, #162032 100%);

  /* Shape */
  --radius-card:  12px;
  --radius-input:  8px;
  --radius-badge:  6px;
  --radius-btn:    8px;

  /* Elevation shadows */
  --shadow-sm:  0 1px 3px rgba(0,0,0,.4);
  --shadow-md:  0 4px 12px rgba(0,0,0,.5);
  --shadow-lg:  0 8px 32px rgba(0,0,0,.6);
}

/* ── Reset ── */
*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }

html { font-size: 16px; scroll-behavior: smooth; }

body {
  font-family: 'Inter', system-ui, -apple-system, sans-serif;
  background-color: var(--md-sys-color-background);
  color: var(--md-sys-color-on-background);
  line-height: 1.6;
  min-height: 100vh;
}

/* ── Typography ── */
h1, h2, h3, h4 { font-weight: 700; line-height: 1.25; color: var(--md-sys-color-on-background); }
h1 { font-size: clamp(2rem, 5vw, 3rem); }
h2 { font-size: clamp(1.5rem, 3vw, 2rem); }
h3 { font-size: 1.25rem; }
h4 { font-size: 1rem; }
p  { color: var(--md-sys-color-on-surface); }
a  { color: var(--md-sys-color-primary); text-decoration: none; }
a:hover { text-decoration: underline; }

/* ── Layout ── */
.container {
  max-width: 1100px;
  margin: 0 auto;
  padding: 0 24px;
}

/* ── Nav ── */
nav {
  position: sticky;
  top: 0;
  z-index: 100;
  background: rgba(15, 23, 42, 0.9);
  backdrop-filter: blur(12px);
  border-bottom: 1px solid var(--md-sys-color-outline);
}
.nav-inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  height: 60px;
  gap: 16px;
}
.nav-logo {
  font-size: 1.125rem;
  font-weight: 700;
  background: var(--gradient-primary);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
  text-decoration: none;
}
.nav-links {
  display: flex;
  gap: 24px;
  list-style: none;
}
.nav-links a {
  font-size: .875rem;
  font-weight: 500;
  color: var(--md-sys-color-on-surface-variant);
  transition: color .2s;
}
.nav-links a:hover { color: var(--md-sys-color-primary); text-decoration: none; }
.nav-actions { display: flex; gap: 12px; align-items: center; }

/* ── Buttons ── */
.btn {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 10px 22px;
  border: none;
  border-radius: var(--radius-btn);
  font-family: inherit;
  font-size: .875rem;
  font-weight: 600;
  cursor: pointer;
  transition: opacity .2s, transform .15s;
  text-decoration: none;
}
.btn:hover { opacity: .88; text-decoration: none; transform: translateY(-1px); }
.btn:active { transform: translateY(0); }

.btn-primary {
  background: var(--gradient-primary);
  color: #fff;
  box-shadow: 0 2px 12px rgba(6,182,212,.25);
}
.btn-secondary {
  background: var(--md-sys-color-surface);
  color: var(--md-sys-color-on-surface);
  border: 1px solid var(--md-sys-color-outline);
}
.btn-ghost {
  background: transparent;
  color: var(--md-sys-color-primary);
  border: 1px solid var(--md-sys-color-primary);
}
.btn-danger {
  background: var(--md-sys-color-error);
  color: #fff;
}
.btn-sm { padding: 6px 14px; font-size: .8rem; }
.btn-lg { padding: 14px 32px; font-size: 1rem; }
.btn:disabled { opacity: .4; cursor: not-allowed; transform: none; }

/* ── Cards ── */
.card {
  background: var(--md-sys-color-surface);
  border: 1px solid var(--md-sys-color-outline);
  border-radius: var(--radius-card);
  padding: 24px;
  box-shadow: var(--shadow-sm);
}
.card-lg { padding: 36px; }

/* ── Forms ── */
.form-group { display: flex; flex-direction: column; gap: 6px; }
.form-label { font-size: .875rem; font-weight: 500; color: var(--md-sys-color-on-surface); }
.form-hint  { font-size: .75rem; color: var(--md-sys-color-on-surface-variant); }

.form-input,
.form-select,
.form-textarea {
  width: 100%;
  padding: 10px 14px;
  background: var(--md-sys-color-background);
  border: 1px solid var(--md-sys-color-outline);
  border-radius: var(--radius-input);
  color: var(--md-sys-color-on-surface);
  font-family: inherit;
  font-size: .9rem;
  transition: border-color .2s, box-shadow .2s;
  outline: none;
}
.form-input:focus,
.form-select:focus,
.form-textarea:focus {
  border-color: var(--md-sys-color-primary);
  box-shadow: 0 0 0 3px rgba(6,182,212,.15);
}
.form-input::placeholder { color: var(--md-sys-color-on-surface-variant); }
.form-input:disabled,
.form-select:disabled { opacity: .45; cursor: not-allowed; }
.form-textarea { resize: vertical; min-height: 80px; }
.form-select option { background: var(--md-sys-color-surface); }

/* ── Alerts ── */
.alert {
  padding: 12px 16px;
  border-radius: var(--radius-input);
  font-size: .875rem;
  border: 1px solid;
}
.alert-error   { background: rgba(248,113,113,.1); border-color: var(--md-sys-color-error);   color: var(--md-sys-color-error); }
.alert-success { background: rgba(52,211,153,.1);  border-color: var(--md-sys-color-success); color: var(--md-sys-color-success); }
.alert-info    { background: rgba(6,182,212,.1);   border-color: var(--md-sys-color-primary); color: var(--md-sys-color-primary); }

/* ── Badges ── */
.badge-chip {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  padding: 2px 10px;
  border-radius: 99px;
  font-size: .75rem;
  font-weight: 600;
}
.badge-verified    { background: rgba(6,182,212,.15);  color: var(--md-sys-color-primary); border: 1px solid rgba(6,182,212,.3); }
.badge-self-declared { background: rgba(148,163,184,.1); color: var(--md-sys-color-on-surface-variant); border: 1px solid var(--md-sys-color-outline); }

/* ── Code blocks ── */
.code-block {
  background: #0a1628;
  border: 1px solid var(--md-sys-color-outline);
  border-radius: var(--radius-input);
  padding: 16px;
  font-family: 'JetBrains Mono', 'Fira Code', monospace;
  font-size: .8rem;
  color: #94d1ff;
  overflow-x: auto;
  white-space: pre;
}

/* ── Section spacing ── */
section { padding: 80px 0; }
.section-title { text-align: center; margin-bottom: 48px; }
.section-title p { color: var(--md-sys-color-on-surface-variant); margin-top: 12px; font-size: 1.1rem; }

/* ── Grid helpers ── */
.grid-2 { display: grid; grid-template-columns: repeat(auto-fit, minmax(280px, 1fr)); gap: 24px; }
.grid-3 { display: grid; grid-template-columns: repeat(auto-fit, minmax(220px, 1fr)); gap: 24px; }

/* ── Divider ── */
.divider { border: none; border-top: 1px solid var(--md-sys-color-outline); margin: 32px 0; }

/* ── Score display ── */
.score-display {
  font-size: 2.5rem;
  font-weight: 800;
  background: var(--gradient-primary);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
}

/* ── Utility ── */
.text-muted    { color: var(--md-sys-color-on-surface-variant); }
.text-primary  { color: var(--md-sys-color-primary); }
.text-sm       { font-size: .875rem; }
.text-xs       { font-size: .75rem; }
.text-center   { text-align: center; }
.flex          { display: flex; }
.flex-center   { display: flex; align-items: center; justify-content: center; }
.flex-between  { display: flex; align-items: center; justify-content: space-between; }
.gap-8         { gap: 8px; }
.gap-12        { gap: 12px; }
.gap-16        { gap: 16px; }
.gap-24        { gap: 24px; }
.mt-8          { margin-top: 8px; }
.mt-16         { margin-top: 16px; }
.mt-24         { margin-top: 24px; }
.mt-32         { margin-top: 32px; }
.mb-8          { margin-bottom: 8px; }
.mb-16         { margin-bottom: 16px; }
.mb-24         { margin-bottom: 24px; }
.w-full        { width: 100%; }

/* ── Spinner ── */
.spinner {
  display: inline-block;
  width: 20px; height: 20px;
  border: 2px solid var(--md-sys-color-outline);
  border-top-color: var(--md-sys-color-primary);
  border-radius: 50%;
  animation: spin .7s linear infinite;
}
@keyframes spin { to { transform: rotate(360deg); } }

/* ── Footer ── */
footer {
  border-top: 1px solid var(--md-sys-color-outline);
  padding: 40px 0;
  color: var(--md-sys-color-on-surface-variant);
  font-size: .875rem;
}
.footer-inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: 16px;
}

/* ── Responsive ── */
@media (max-width: 768px) {
  .container { padding: 0 16px; }
  section { padding: 48px 0; }
  .nav-links { display: none; }
  .footer-inner { flex-direction: column; text-align: center; }
}
