/* ============================================================
   FormPhotoResize.in — Shared Design System
   Phase 1 · style.css
   ============================================================ */

/* ── Google Font ── */
@import url('https://fonts.googleapis.com/css2?family=Inter:wght@400;500;600;700;800&display=swap');

/* ── Design Tokens ── */
:root {
  /* Palette */
  --navy:        #0F172A;
  --navy-800:    #1E293B;
  --navy-700:    #334155;
  --saffron:     #F97316;
  --saffron-light: #FFF7ED;
  --saffron-mid: #FDBA74;
  --green:       #16A34A;
  --green-bg:    #F0FDF4;
  --red:         #DC2626;
  --red-bg:      #FEF2F2;
  --blue:        #2563EB;
  --blue-bg:     #EFF6FF;

  /* Neutrals */
  --bg:          #F1F5F9;
  --surface:     #FFFFFF;
  --border:      #E2E8F0;
  --border-dark: #CBD5E1;
  --text:        #0F172A;
  --muted:       #64748B;
  --muted-light: #94A3B8;

  /* Radius */
  --r-sm:  6px;
  --r:     10px;
  --r-lg:  16px;
  --r-xl:  20px;

  /* Shadow */
  --shadow-sm: 0 1px 2px rgba(0,0,0,0.06);
  --shadow:    0 1px 4px rgba(0,0,0,0.08), 0 2px 8px rgba(0,0,0,0.04);
  --shadow-md: 0 4px 16px rgba(0,0,0,0.10), 0 1px 4px rgba(0,0,0,0.06);

  /* Transitions */
  --t: 0.15s ease;
}

/* ── Reset ── */
*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }
html { scroll-behavior: smooth; }
body {
  font-family: 'Inter', system-ui, -apple-system, sans-serif;
  background: var(--bg);
  color: var(--text);
  font-size: 15px;
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
}
img { display: block; max-width: 100%; }
button { font-family: inherit; cursor: pointer; }
a { color: inherit; text-decoration: none; }

/* ============================================================
   HEADER / NAV
   ============================================================ */
.site-header {
  position: sticky;
  top: 0;
  z-index: 100;
  background: var(--navy);
  border-bottom: 1px solid var(--navy-800);
  box-shadow: 0 2px 8px rgba(0,0,0,0.25);
}

.header-inner {
  max-width: 1100px;
  margin: 0 auto;
  padding: 0 20px;
  height: 58px;
  display: flex;
  align-items: center;
  gap: 20px;
}

/* Logo */
.site-logo {
  display: flex;
  align-items: center;
  gap: 10px;
  flex-shrink: 0;
  text-decoration: none;
}
.logo-mark {
  width: 34px;
  height: 34px;
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
  border-radius: var(--r-sm);
  overflow: hidden;
}
.logo-name {
  font-size: 16px;
  font-weight: 700;
  color: white;
  line-height: 1.2;
}
.logo-tld { color: var(--saffron); }
.logo-tagline {
  font-size: 10px;
  color: var(--muted-light);
  font-weight: 400;
  display: block;
}

/* Nav links */
.site-nav {
  display: flex;
  align-items: center;
  gap: 2px;
  margin-left: auto;
  flex-wrap: nowrap;
  overflow-x: auto;
  scrollbar-width: none;
}
.site-nav::-webkit-scrollbar { display: none; }

.nav-link {
  font-size: 13px;
  font-weight: 500;
  color: var(--muted-light);
  padding: 6px 12px;
  border-radius: var(--r-sm);
  white-space: nowrap;
  transition: background var(--t), color var(--t);
  text-decoration: none;
}
.nav-link:hover { background: rgba(255,255,255,0.08); color: white; }
.nav-link.active { background: var(--saffron); color: white; }

/* Nav badge */
.nav-badge {
  font-size: 9px;
  font-weight: 700;
  background: var(--saffron);
  color: white;
  border-radius: 99px;
  padding: 1px 5px;
  margin-left: 4px;
  vertical-align: middle;
  letter-spacing: 0.03em;
}

/* Mobile hamburger */
.nav-toggle {
  display: none;
  background: none;
  border: none;
  color: white;
  font-size: 22px;
  padding: 4px;
  margin-left: auto;
}

@media (max-width: 680px) {
  .site-nav { display: none; }
  .site-nav.open {
    display: flex;
    flex-direction: column;
    align-items: flex-start;
    position: absolute;
    top: 58px;
    left: 0; right: 0;
    background: var(--navy-800);
    padding: 12px 16px 16px;
    gap: 4px;
    border-bottom: 1px solid var(--navy-700);
    z-index: 99;
  }
  .nav-toggle { display: flex; }
  .logo-tagline { display: none; }
}

/* ============================================================
   PAGE LAYOUT
   ============================================================ */
.page-wrap {
  max-width: 860px;
  margin: 0 auto;
  padding: 32px 16px 80px;
}

/* ── Page hero ── */
.page-hero {
  margin-bottom: 28px;
}
.page-eyebrow {
  font-size: 11px;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  color: var(--saffron);
  margin-bottom: 6px;
  display: flex;
  align-items: center;
  gap: 6px;
}
.page-eyebrow::before {
  content: '';
  display: block;
  width: 20px;
  height: 2px;
  background: var(--saffron);
  border-radius: 2px;
}
.page-title {
  font-size: clamp(22px, 4vw, 30px);
  font-weight: 800;
  color: var(--text);
  line-height: 1.25;
  margin-bottom: 8px;
  letter-spacing: -0.02em;
}
.page-subtitle {
  font-size: 14px;
  color: var(--muted);
  max-width: 580px;
  line-height: 1.65;
}

/* ── Privacy banner ── */
.privacy-banner {
  display: flex;
  align-items: center;
  gap: 10px;
  background: var(--green-bg);
  border: 1px solid #BBF7D0;
  border-radius: var(--r);
  padding: 10px 16px;
  font-size: 13px;
  color: #15803D;
  font-weight: 500;
  margin-bottom: 24px;
}
.privacy-banner svg { flex-shrink: 0; }

/* ============================================================
   STEP PROGRESS (Signature element)
   ============================================================ */
.step-bar {
  display: flex;
  align-items: center;
  gap: 0;
  margin-bottom: 28px;
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--r);
  padding: 0;
  overflow: hidden;
}

.step-item {
  flex: 1;
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 14px 16px;
  position: relative;
  transition: background var(--t);
}
.step-item + .step-item::before {
  content: '';
  position: absolute;
  left: 0; top: 12px; bottom: 12px;
  width: 1px;
  background: var(--border);
}
.step-item.done   { background: var(--green-bg); }
.step-item.active { background: var(--saffron-light); }

.step-num {
  width: 28px;
  height: 28px;
  border-radius: 50%;
  border: 2px solid var(--border-dark);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 12px;
  font-weight: 700;
  color: var(--muted);
  flex-shrink: 0;
  transition: all var(--t);
}
.step-item.done   .step-num { background: var(--green);   border-color: var(--green);   color: white; }
.step-item.active .step-num { background: var(--saffron); border-color: var(--saffron); color: white; }

.step-label {
  font-size: 12px;
  font-weight: 600;
  color: var(--muted);
  line-height: 1.3;
}
.step-item.done   .step-label { color: var(--green); }
.step-item.active .step-label { color: var(--saffron); }
.step-sublabel {
  font-size: 11px;
  font-weight: 400;
  color: var(--muted-light);
  display: block;
}

@media (max-width: 520px) {
  .step-sublabel { display: none; }
  .step-item { padding: 12px 10px; gap: 7px; }
}

/* ============================================================
   PRESET GRID
   ============================================================ */
.section-label {
  font-size: 11px;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.07em;
  color: var(--muted);
  margin-bottom: 10px;
}

.preset-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(148px, 1fr));
  gap: 8px;
  margin-bottom: 24px;
}

.preset-btn {
  background: var(--surface);
  border: 1.5px solid var(--border);
  border-radius: var(--r);
  padding: 13px 14px;
  text-align: left;
  transition: border-color var(--t), background var(--t), box-shadow var(--t);
  position: relative;
  overflow: hidden;
}
.preset-btn::after {
  content: '';
  position: absolute;
  top: 0; left: 0; right: 0;
  height: 3px;
  background: var(--saffron);
  transform: scaleX(0);
  transform-origin: left;
  transition: transform var(--t);
}
.preset-btn:hover { border-color: var(--saffron-mid); box-shadow: var(--shadow); }
.preset-btn:hover::after { transform: scaleX(1); }
.preset-btn.active {
  border-color: var(--saffron);
  background: var(--saffron-light);
  box-shadow: var(--shadow);
}
.preset-btn.active::after { transform: scaleX(1); }

.p-icon   { font-size: 20px; margin-bottom: 6px; display: block; }
.p-name   { font-size: 13px; font-weight: 700; color: var(--text);  display: block; }
.p-size   { font-size: 11px; color: var(--muted); display: block; margin-top: 2px; }
.p-kb     { font-size: 11px; color: var(--saffron); font-weight: 600; display: block; }

/* ============================================================
   SPEC TABLE
   ============================================================ */
.spec-table {
  width: 100%;
  border-collapse: collapse;
  font-size: 13px;
  margin-bottom: 24px;
  background: var(--surface);
  border-radius: var(--r);
  overflow: hidden;
  border: 1px solid var(--border);
}
.spec-table th {
  background: var(--navy);
  color: white;
  font-weight: 600;
  padding: 10px 14px;
  text-align: left;
  font-size: 12px;
  letter-spacing: 0.03em;
}
.spec-table td {
  padding: 9px 14px;
  border-bottom: 1px solid var(--border);
  color: var(--text);
}
.spec-table tr:last-child td { border-bottom: none; }
.spec-table tr:nth-child(even) td { background: var(--bg); }
.spec-val { font-weight: 700; color: var(--navy); }

/* ============================================================
   UPLOAD ZONE
   ============================================================ */
.upload-zone {
  border: 2px dashed var(--border-dark);
  border-radius: var(--r-lg);
  padding: 48px 24px;
  text-align: center;
  background: var(--surface);
  cursor: pointer;
  transition: border-color var(--t), background var(--t);
  margin-bottom: 20px;
  position: relative;
}
.upload-zone:hover,
.upload-zone.drag {
  border-color: var(--saffron);
  background: var(--saffron-light);
}
.upload-zone input[type="file"] { display: none; }

.upload-icon {
  width: 56px;
  height: 56px;
  background: var(--bg);
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  margin: 0 auto 16px;
  font-size: 26px;
  transition: background var(--t);
}
.upload-zone:hover .upload-icon,
.upload-zone.drag  .upload-icon { background: var(--saffron-mid); }

.upload-title { font-size: 15px; font-weight: 700; color: var(--text); margin-bottom: 4px; }
.upload-sub   { font-size: 13px; color: var(--muted); }
.upload-sub strong { color: var(--saffron); }
.upload-hint  { font-size: 12px; color: var(--muted-light); margin-top: 8px; }

/* Loaded state */
.upload-zone.loaded { border-style: solid; border-color: var(--green); background: #1a1a2e; padding: 0; overflow: hidden; min-height: 280px; cursor: pointer; position: relative; }
.upload-zone.loaded .upload-icon { display: none; }
.upload-zone.loaded .upload-title { display: none; }
.upload-zone.loaded .upload-hint  { display: none; }

/* Live photo preview inside upload zone */
.upload-live-preview {
  display: block;
  width: 100%;
  height: 280px;
  object-fit: contain;
  object-position: center;
  transition: filter 0.2s ease;
}
.upload-change-hint {
  display: block;
  font-size: 12px;
  color: rgba(255,255,255,0.8);
  background: rgba(0,0,0,0.55);
  text-align: center;
  padding: 7px 12px;
  backdrop-filter: blur(4px);
}
.upload-zone.loaded .upload-sub {
  position: absolute;
  bottom: 0; left: 0; right: 0;
}

/* Brightness / Contrast sliders */
.adj-sliders {
  background: var(--surface);
  border: 1.5px solid var(--border);
  border-radius: var(--r-md);
  padding: 16px 18px;
  margin-top: 12px;
  display: flex;
  flex-direction: column;
  gap: 14px;
}
.adj-row { display: flex; flex-direction: column; gap: 6px; }
.adj-label {
  display: flex;
  justify-content: space-between;
  align-items: center;
  font-size: 12.5px;
  font-weight: 600;
  color: var(--text);
}
.adj-val {
  font-size: 12px;
  font-weight: 700;
  color: var(--saffron);
  min-width: 28px;
  text-align: right;
}
.adj-sliders input[type="range"] {
  width: 100%;
  accent-color: var(--saffron);
  height: 4px;
  cursor: pointer;
}
.adj-reset {
  background: none;
  border: 1px solid var(--border);
  border-radius: var(--r-sm);
  padding: 6px 12px;
  font-size: 12px;
  color: var(--muted);
  cursor: pointer;
  font-family: inherit;
  align-self: flex-start;
  transition: border-color 0.15s, color 0.15s;
}
.adj-reset:hover { border-color: var(--saffron); color: var(--saffron); }

/* AI Auto-face-crop toggle */
.auto-face-wrap { margin-top: 10px; }
.auto-face-toggle {
  display: flex;
  align-items: center;
  gap: 8px;
  font-size: 13px;
  font-weight: 600;
  color: var(--text);
  cursor: pointer;
  user-select: none;
}
.auto-face-toggle input[type="checkbox"] {
  width: 16px;
  height: 16px;
  accent-color: var(--saffron);
  cursor: pointer;
}
.auto-face-toggle em { font-style: normal; font-weight: 500; color: var(--muted); }
.face-status {
  display: flex;
  align-items: center;
  gap: 6px;
  font-size: 12.5px;
  margin-top: 6px;
  padding: 6px 10px;
  border-radius: var(--r-sm);
  background: var(--bg);
  color: var(--muted);
  border: 1px solid var(--border);
}
.face-status.ok   { color: var(--green);   border-color: #BBF7D0; background: var(--green-bg); }
.face-status.busy { color: var(--saffron); border-color: var(--saffron-mid); background: var(--saffron-light); }
.face-status.info { color: var(--muted); }

/* ============================================================
   SETTINGS ROW
   ============================================================ */
.settings-grid {
  display: grid;
  grid-template-columns: 1fr 1fr 1fr;
  gap: 12px;
  margin-bottom: 16px;
}
@media (max-width: 500px) { .settings-grid { grid-template-columns: 1fr 1fr; } }

.field { display: flex; flex-direction: column; gap: 5px; }
.field-label {
  font-size: 11px;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.06em;
  color: var(--muted);
}
.field input[type="number"],
.field select {
  border: 1.5px solid var(--border);
  border-radius: var(--r-sm);
  padding: 9px 11px;
  font-size: 14px;
  font-family: inherit;
  color: var(--text);
  background: var(--surface);
  outline: none;
  transition: border-color var(--t);
  -moz-appearance: textfield;
}
.field input[type="number"]::-webkit-inner-spin-button { opacity: 0.5; }
.field input[type="number"]:focus,
.field select:focus { border-color: var(--saffron); }

/* Quality row */
.quality-wrap { margin-bottom: 20px; }
.quality-row  { display: flex; align-items: center; gap: 12px; margin-top: 5px; }
.quality-row input[type="range"] {
  flex: 1;
  accent-color: var(--saffron);
  height: 4px;
  cursor: pointer;
}
.quality-val {
  font-size: 14px;
  font-weight: 700;
  color: var(--saffron);
  min-width: 40px;
  text-align: right;
}

/* ============================================================
   PROCESS BUTTON
   ============================================================ */
.btn-process {
  width: 100%;
  background: var(--navy);
  color: white;
  border: none;
  border-radius: var(--r);
  padding: 14px 28px;
  font-size: 15px;
  font-weight: 700;
  letter-spacing: 0.01em;
  margin-bottom: 24px;
  transition: background var(--t), transform var(--t), box-shadow var(--t);
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
}
.btn-process:hover:not(:disabled) {
  background: var(--saffron);
  box-shadow: 0 4px 12px rgba(249,115,22,0.35);
  transform: translateY(-1px);
}
.btn-process:disabled { opacity: 0.45; cursor: not-allowed; }
.btn-process svg { width: 18px; height: 18px; }

/* ============================================================
   RESULT CARD
   ============================================================ */
.result-card {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--r-lg);
  box-shadow: var(--shadow-md);
  overflow: hidden;
  display: none;
  margin-bottom: 24px;
}
.result-card.show { display: block; }

.result-header {
  background: var(--navy);
  color: white;
  padding: 14px 20px;
  font-size: 14px;
  font-weight: 700;
  display: flex;
  align-items: center;
  gap: 8px;
}
.result-badge {
  font-size: 11px;
  font-weight: 700;
  background: var(--green);
  color: white;
  border-radius: 99px;
  padding: 2px 8px;
  margin-left: auto;
}

.result-body { padding: 20px; }

/* Preview row */
.preview-row {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 12px;
  margin-bottom: 16px;
}
@media (max-width: 420px) { .preview-row { grid-template-columns: 1fr; } }

.preview-box {
  border: 1px solid var(--border);
  border-radius: var(--r);
  overflow: hidden;
  background: #F8FAFC;
}
.preview-box img {
  width: 100%;
  height: 180px;
  object-fit: contain;
  display: block;
}
.preview-box-label {
  font-size: 11px;
  font-weight: 600;
  color: var(--muted);
  padding: 8px 12px;
  background: var(--surface);
  border-top: 1px solid var(--border);
  display: flex;
  align-items: center;
  justify-content: space-between;
}
.preview-box-label .size-tag {
  font-size: 10px;
  background: var(--bg);
  border-radius: 99px;
  padding: 2px 7px;
  color: var(--muted);
}

/* Stats row */
.stats-row {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 8px;
  margin-bottom: 16px;
}
@media (max-width: 500px) { .stats-row { grid-template-columns: 1fr 1fr; } }

.stat-box {
  background: var(--bg);
  border-radius: var(--r-sm);
  padding: 10px 12px;
}
.stat-box.success { background: var(--green-bg); }
.stat-box.warn    { background: #FEF9C3; }
.s-label { font-size: 10px; font-weight: 600; text-transform: uppercase; letter-spacing: 0.05em; color: var(--muted); margin-bottom: 3px; }
.s-val   { font-size: 16px; font-weight: 800; color: var(--text); }
.stat-box.success .s-val { color: var(--green); }
.stat-box.warn    .s-val { color: #A16207; }

/* Validation strip */
.validation-strip {
  border-radius: var(--r-sm);
  padding: 10px 14px;
  font-size: 13px;
  font-weight: 600;
  margin-bottom: 16px;
  display: flex;
  align-items: center;
  gap: 8px;
}
.validation-strip.pass { background: var(--green-bg); color: #15803D; border: 1px solid #BBF7D0; }
.validation-strip.fail { background: var(--red-bg);   color: var(--red);   border: 1px solid #FECACA; }
.validation-strip.warn { background: #FEF9C3; color: #A16207; border: 1px solid #FDE68A; }

/* Download button */
.btn-download {
  width: 100%;
  background: var(--green);
  color: white;
  border: none;
  border-radius: var(--r);
  padding: 13px 24px;
  font-size: 15px;
  font-weight: 700;
  transition: background var(--t), transform var(--t), box-shadow var(--t);
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
}
.btn-download:hover {
  background: #15803D;
  transform: translateY(-1px);
  box-shadow: 0 4px 12px rgba(22,163,74,0.30);
}
.btn-filename {
  font-size: 12px;
  font-weight: 400;
  opacity: 0.8;
  margin-top: 6px;
  text-align: center;
  color: var(--muted);
}

/* ============================================================
   INFO / WARNING NOTES
   ============================================================ */
.info-note {
  border-radius: var(--r-sm);
  padding: 12px 16px;
  font-size: 13px;
  line-height: 1.6;
  margin-bottom: 20px;
  display: flex;
  align-items: flex-start;
  gap: 10px;
}
.info-note.warning {
  background: #FFFBEB;
  border-left: 3px solid #F59E0B;
  color: #92400E;
}
.info-note.info {
  background: var(--blue-bg);
  border-left: 3px solid var(--blue);
  color: #1D4ED8;
}
.info-note.tip {
  background: var(--saffron-light);
  border-left: 3px solid var(--saffron);
  color: #9A3412;
}

/* ============================================================
   RELATED PAGES STRIP
   ============================================================ */
.related-strip {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--r-lg);
  padding: 20px;
  margin-bottom: 28px;
}
.related-strip h3 {
  font-size: 13px;
  font-weight: 700;
  color: var(--muted);
  text-transform: uppercase;
  letter-spacing: 0.06em;
  margin-bottom: 12px;
}
.related-links {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}
.related-link {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  font-size: 13px;
  font-weight: 600;
  color: var(--navy);
  background: var(--bg);
  border: 1px solid var(--border);
  border-radius: 99px;
  padding: 6px 14px;
  transition: border-color var(--t), background var(--t), color var(--t);
  text-decoration: none;
}
.related-link:hover {
  border-color: var(--saffron);
  background: var(--saffron-light);
  color: var(--saffron);
}

/* ============================================================
   FAQ SECTION
   ============================================================ */
.faq-section { margin-top: 40px; }
.faq-section > h2 {
  font-size: 20px;
  font-weight: 800;
  color: var(--text);
  margin-bottom: 16px;
  letter-spacing: -0.01em;
}

.faq-item {
  border-top: 1px solid var(--border);
}
.faq-item:last-child { border-bottom: 1px solid var(--border); }

.faq-q-btn {
  width: 100%;
  background: none;
  border: none;
  text-align: left;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  padding: 16px 0;
  font-size: 14px;
  font-weight: 600;
  color: var(--text);
  cursor: pointer;
  transition: color var(--t);
}
.faq-q-btn:hover { color: var(--saffron); }
.faq-chevron {
  font-size: 18px;
  color: var(--muted-light);
  transition: transform var(--t);
  flex-shrink: 0;
}
.faq-item.open .faq-chevron { transform: rotate(180deg); color: var(--saffron); }
.faq-item.open .faq-q-btn   { color: var(--saffron); }

.faq-answer {
  display: none;
  font-size: 13px;
  color: var(--muted);
  line-height: 1.7;
  padding-bottom: 16px;
}
.faq-item.open .faq-answer { display: block; }

/* ============================================================
   FOOTER
   ============================================================ */
.site-footer {
  background: var(--navy);
  color: var(--muted-light);
  font-size: 13px;
  padding: 32px 20px 24px;
  margin-top: 40px;
}
.footer-inner {
  max-width: 1100px;
  margin: 0 auto;
  display: grid;
  grid-template-columns: 1fr auto;
  gap: 24px;
  align-items: start;
}
@media (max-width: 560px) { .footer-inner { grid-template-columns: 1fr; } }

.footer-brand .logo-name { color: white; font-size: 15px; margin-bottom: 6px; }
.footer-brand p { font-size: 12px; line-height: 1.6; max-width: 320px; color: var(--muted-light); }
.footer-links {
  display: flex;
  flex-direction: column;
  gap: 6px;
  text-align: right;
}
@media (max-width: 560px) { .footer-links { text-align: left; flex-direction: row; flex-wrap: wrap; gap: 8px; } }
.footer-links a { color: var(--muted-light); font-size: 12px; transition: color var(--t); }
.footer-links a:hover { color: var(--saffron); }
.footer-bottom {
  max-width: 1100px;
  margin: 20px auto 0;
  padding-top: 16px;
  border-top: 1px solid var(--navy-700);
  font-size: 12px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: 8px;
  color: var(--navy-700);
}
.footer-bottom span { color: var(--muted-light); }

/* ============================================================
   HOMEPAGE — CATEGORY CARDS
   ============================================================ */
.category-section { margin-bottom: 36px; }
.category-section > h2 {
  font-size: 17px;
  font-weight: 800;
  color: var(--text);
  margin-bottom: 14px;
  display: flex;
  align-items: center;
  gap: 8px;
}
.category-section > h2 .cat-tag {
  font-size: 10px;
  font-weight: 700;
  background: var(--saffron);
  color: white;
  border-radius: 99px;
  padding: 2px 8px;
  letter-spacing: 0.04em;
  text-transform: uppercase;
}

.card-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(200px, 1fr));
  gap: 10px;
}

.tool-card {
  background: var(--surface);
  border: 1.5px solid var(--border);
  border-radius: var(--r-lg);
  padding: 18px 16px;
  text-decoration: none;
  display: block;
  transition: border-color var(--t), box-shadow var(--t), transform var(--t);
  position: relative;
  overflow: hidden;
}
.tool-card::before {
  content: '';
  position: absolute;
  bottom: 0; left: 0; right: 0;
  height: 3px;
  background: var(--saffron);
  transform: scaleX(0);
  transform-origin: left;
  transition: transform var(--t);
}
.tool-card:hover {
  border-color: var(--saffron-mid);
  box-shadow: var(--shadow-md);
  transform: translateY(-2px);
}
.tool-card:hover::before { transform: scaleX(1); }

.tool-card-icon { font-size: 28px; margin-bottom: 10px; display: block; }
.tool-card-name { font-size: 14px; font-weight: 700; color: var(--text); margin-bottom: 3px; }
.tool-card-meta { font-size: 11px; color: var(--muted); line-height: 1.4; }
.tool-card-kb   {
  display: inline-block;
  font-size: 10px;
  font-weight: 700;
  background: var(--saffron-light);
  color: var(--saffron);
  border-radius: 99px;
  padding: 2px 8px;
  margin-top: 6px;
}
.tool-card-ai {
  display: inline-block;
  font-size: 10px;
  font-weight: 700;
  background: #EDE9FE;
  color: #7C3AED;
  border-radius: 99px;
  padding: 2px 8px;
  margin-top: 6px;
}

/* Hero stats bar */
.hero-stats {
  display: flex;
  gap: 0;
  background: var(--navy);
  border-radius: var(--r-lg);
  overflow: hidden;
  margin-bottom: 32px;
}
.hero-stat {
  flex: 1;
  padding: 16px 18px;
  text-align: center;
  border-right: 1px solid var(--navy-700);
}
.hero-stat:last-child { border-right: none; }
.hs-val  { font-size: 22px; font-weight: 800; color: white; display: block; }
.hs-label { font-size: 11px; color: var(--muted-light); display: block; margin-top: 2px; }
.hs-val em { color: var(--saffron); font-style: normal; }

@media (max-width: 480px) {
  .hero-stat { padding: 12px 10px; }
  .hs-val  { font-size: 18px; }
  .hs-label { font-size: 10px; }
}

/* ============================================================
   UTILITY CLASSES
   ============================================================ */
.mt-0  { margin-top: 0; }
.mb-16 { margin-bottom: 16px; }
.mb-24 { margin-bottom: 24px; }
.text-center { text-align: center; }
.hidden { display: none !important; }
