/* KitCheck Styles */
:root {
  --red: #dc2626;
  --red-light: #fef2f2;
  --amber: #d97706;
  --amber-light: #fffbeb;
  --green: #16a34a;
  --green-light: #f0fdf4;
  --gray-50: #f8fafc;
  --gray-100: #f1f5f9;
  --gray-200: #e2e8f0;
  --gray-300: #cbd5e1;
  --gray-400: #94a3b8;
  --gray-500: #64748b;
  --gray-600: #475569;
  --gray-700: #334155;
  --gray-800: #1e293b;
  --gray-900: #0f172a;
  --radius: 12px;
  --radius-sm: 8px;
  --shadow: 0 1px 3px rgba(0,0,0,.08), 0 1px 2px rgba(0,0,0,.06);
  --shadow-md: 0 4px 6px rgba(0,0,0,.07), 0 2px 4px rgba(0,0,0,.06);
  --font: system-ui, -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
}

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

html { scroll-behavior: smooth; }

body {
  font-family: var(--font);
  color: var(--gray-800);
  background: var(--gray-50);
  line-height: 1.6;
}

a { color: var(--red); text-decoration: none; }
a:hover { text-decoration: underline; }

img, svg { display: block; max-width: 100%; }

.container {
  width: 100%;
  max-width: 1200px;
  margin: 0 auto;
  padding: 0 20px;
}

.skip-link {
  position: absolute;
  top: -100px;
  left: 16px;
  background: var(--red);
  color: #fff;
  padding: 8px 16px;
  border-radius: var(--radius-sm);
  z-index: 1000;
}
.skip-link:focus { top: 16px; }

/* Header */
.site-header {
  background: #fff;
  border-bottom: 1px solid var(--gray-200);
  position: sticky;
  top: 0;
  z-index: 100;
}
.header-inner {
  display: flex;
  align-items: center;
  gap: 24px;
  height: 60px;
}
.logo {
  display: flex;
  align-items: center;
  gap: 8px;
  font-weight: 700;
  font-size: 1.1rem;
  color: var(--gray-900);
  flex-shrink: 0;
}
.logo:hover { text-decoration: none; }

.site-nav {
  display: flex;
  align-items: center;
  gap: 20px;
  margin-left: auto;
}
.site-nav a {
  color: var(--gray-600);
  font-size: .9rem;
  font-weight: 500;
}
.site-nav a:hover { color: var(--red); text-decoration: none; }

.mobile-nav-toggle {
  display: none;
  background: none;
  border: none;
  cursor: pointer;
  padding: 4px;
  flex-direction: column;
  gap: 5px;
}
.mobile-nav-toggle span {
  display: block;
  width: 22px;
  height: 2px;
  background: var(--gray-700);
  border-radius: 2px;
}

.mobile-nav {
  display: none;
  background: #fff;
  border-bottom: 1px solid var(--gray-200);
  padding: 12px 20px;
  flex-direction: column;
  gap: 8px;
}
.mobile-nav a {
  color: var(--gray-700);
  font-weight: 500;
  padding: 8px 0;
}
.mobile-nav[hidden] { display: none; }
.mobile-nav.open { display: flex; }

/* Hero */
.hero {
  background: linear-gradient(135deg, var(--gray-900) 0%, var(--gray-800) 100%);
  color: #fff;
  padding: 80px 0;
  text-align: center;
}
.hero h1 {
  font-size: clamp(2rem, 5vw, 3rem);
  font-weight: 800;
  line-height: 1.2;
  margin-bottom: 16px;
}
.hero-sub {
  font-size: 1.15rem;
  color: var(--gray-300);
  max-width: 600px;
  margin: 0 auto 32px;
}
.hero-actions {
  display: flex;
  gap: 12px;
  justify-content: center;
  flex-wrap: wrap;
}

/* Buttons */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 10px 20px;
  border-radius: var(--radius-sm);
  font-weight: 600;
  font-size: .95rem;
  cursor: pointer;
  border: 2px solid transparent;
  transition: all .15s ease;
}
.btn-primary {
  background: var(--red);
  color: #fff;
  border-color: var(--red);
}
.btn-primary:hover { background: #b91c1c; border-color: #b91c1c; text-decoration: none; color: #fff; }
.btn-ghost {
  background: transparent;
  color: var(--gray-700);
  border-color: var(--gray-300);
}
.btn-ghost:hover { border-color: var(--red); color: var(--red); text-decoration: none; }
.btn-danger {
  background: transparent;
  color: var(--red);
  border-color: var(--red);
}
.btn-danger:hover { background: var(--red-light); text-decoration: none; }
.btn-small { padding: 6px 14px; font-size: .85rem; }

/* Workspace */
.workspace-section { padding: 48px 0; }
.workspace-grid {
  display: grid;
  grid-template-columns: 260px 1fr;
  gap: 32px;
  align-items: start;
}

.kit-sidebar {
  background: #fff;
  border-radius: var(--radius);
  padding: 20px;
  box-shadow: var(--shadow);
  position: sticky;
  top: 80px;
}
.kit-sidebar h2 { font-size: 1rem; margin-bottom: 12px; }
.profile-list { margin-bottom: 16px; }
.profile-empty { font-size: .85rem; color: var(--gray-500); }
.profile-item {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 8px 10px;
  border-radius: var(--radius-sm);
  cursor: pointer;
  font-size: .9rem;
  margin-bottom: 4px;
}
.profile-item:hover { background: var(--gray-100); }
.profile-item.active { background: var(--red-light); color: var(--red); font-weight: 600; }
.profile-item button {
  background: none;
  border: none;
  cursor: pointer;
  color: var(--gray-400);
  font-size: 1.1rem;
  padding: 0 4px;
}
.profile-item button:hover { color: var(--red); }
.profile-actions { display: flex; flex-direction: column; gap: 8px; margin-bottom: 16px; }
.sidebar-note { font-size: .8rem; color: var(--gray-500); line-height: 1.5; }

.kit-main { min-width: 0; }
.kit-header {
  background: #fff;
  border-radius: var(--radius);
  padding: 24px;
  box-shadow: var(--shadow);
  margin-bottom: 24px;
}
.kit-name { font-size: 1.5rem; margin-bottom: 12px; }
.kit-meta { display: flex; gap: 10px; flex-wrap: wrap; }
.badge {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  padding: 4px 12px;
  border-radius: 999px;
  font-size: .8rem;
  font-weight: 600;
  background: var(--gray-100);
  color: var(--gray-600);
}
.badge:not(.badge-amber):not(.badge-green):not(.badge-gray) { background: var(--red-light); color: var(--red); }
.badge-amber { background: var(--amber-light); color: var(--amber); }
.badge-green { background: var(--green-light); color: var(--green); }
.badge-gray { background: var(--gray-100); color: var(--gray-600); }

.quick-add, .add-custom, .inventory-area, .restock-area {
  background: #fff;
  border-radius: var(--radius);
  padding: 24px;
  box-shadow: var(--shadow);
  margin-bottom: 24px;
}
.quick-add h3, .add-custom h3, .inventory-area h3, .restock-area h3,
.inventory-header h3 {
  font-size: 1.1rem;
  margin-bottom: 16px;
}
.quick-add-grid {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}
.chip {
  padding: 8px 16px;
  border-radius: 999px;
  border: 1px solid var(--gray-200);
  background: var(--gray-50);
  font-size: .85rem;
  font-weight: 500;
  cursor: pointer;
  transition: all .15s ease;
}
.chip:hover { border-color: var(--red); background: var(--red-light); color: var(--red); }

.add-form { display: flex; flex-direction: column; gap: 12px; }
.form-row { display: flex; gap: 12px; flex-wrap: wrap; }
.field { display: flex; flex-direction: column; gap: 4px; flex: 1; min-width: 140px; }
.field-small { max-width: 100px; flex: 0 0 100px; }
.field-label { font-size: .8rem; font-weight: 600; color: var(--gray-600); }
.field-label small { font-weight: 400; color: var(--gray-400); }
input, select {
  padding: 8px 12px;
  border: 1px solid var(--gray-300);
  border-radius: var(--radius-sm);
  font-size: .9rem;
  font-family: var(--font);
  background: #fff;
}
input:focus, select:focus { outline: 2px solid var(--red); outline-offset: 1px; border-color: var(--red); }

.inventory-header { display: flex; align-items: center; justify-content: space-between; flex-wrap: wrap; gap: 12px; margin-bottom: 16px; }
.inventory-filters { display: flex; gap: 6px; flex-wrap: wrap; }
.filter-btn {
  padding: 6px 14px;
  border-radius: 999px;
  border: 1px solid var(--gray-200);
  background: var(--gray-50);
  font-size: .8rem;
  font-weight: 500;
  cursor: pointer;
}
.filter-btn.active { background: var(--gray-800); color: #fff; border-color: var(--gray-800); }

.inventory-list { display: flex; flex-direction: column; gap: 8px; }
.item-row {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 12px 16px;
  border-radius: var(--radius-sm);
  border: 1px solid var(--gray-200);
  background: #fff;
}
.item-row.status-expired { border-color: #fca5a5; background: var(--red-light); }
.item-row.status-soon { border-color: #fcd34d; background: var(--amber-light); }
.item-row.status-good { border-color: #86efac; background: var(--green-light); }
.item-row.status-unknown { border-color: var(--gray-300); }

.item-info { flex: 1; min-width: 0; }
.item-name { font-weight: 600; font-size: .95rem; }
.item-detail { font-size: .8rem; color: var(--gray-500); }
.item-qty {
  font-weight: 700;
  font-size: .9rem;
  min-width: 32px;
  text-align: center;
}
.status-dot {
  width: 10px;
  height: 10px;
  border-radius: 50%;
  flex-shrink: 0;
}
.status-dot.expired { background: var(--red); }
.status-dot.soon { background: var(--amber); }
.status-dot.good { background: var(--green); }
.status-dot.unknown { background: var(--gray-400); }

.item-actions { display: flex; gap: 4px; }
.item-actions button {
  background: none;
  border: none;
  cursor: pointer;
  padding: 4px 8px;
  border-radius: 4px;
  font-size: .8rem;
  color: var(--gray-500);
}
.item-actions button:hover { background: var(--gray-200); color: var(--gray-800); }

.empty-state {
  text-align: center;
  padding: 40px 20px;
  color: var(--gray-400);
}
.empty-state svg { margin: 0 auto 12px; }

.restock-list { display: flex; flex-direction: column; gap: 6px; }
.restock-item {
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 8px 12px;
  border-radius: var(--radius-sm);
  background: var(--gray-50);
  font-size: .9rem;
}
.restock-item .restock-reason { font-size: .75rem; color: var(--gray-500); margin-left: auto; }

.action-bar {
  display: flex;
  gap: 10px;
  flex-wrap: wrap;
  padding: 24px 0;
}

/* Guide */
.guide-section { padding: 48px 0; background: var(--gray-100); }
.guide-section h2 { text-align: center; margin-bottom: 32px; font-size: 1.8rem; }
.guide-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(240px, 1fr));
  gap: 20px;
  margin-bottom: 32px;
}
.guide-card {
  background: #fff;
  border-radius: var(--radius);
  padding: 24px;
  box-shadow: var(--shadow);
}
.guide-step {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 32px;
  height: 32px;
  border-radius: 50%;
  background: var(--red);
  color: #fff;
  font-weight: 700;
  font-size: .9rem;
  margin-bottom: 12px;
}
.guide-card h3 { font-size: 1rem; margin-bottom: 8px; }
.guide-card p { font-size: .9rem; color: var(--gray-600); }

.guide-notes {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(260px, 1fr));
  gap: 20px;
}
.note-card {
  background: #fff;
  border-radius: var(--radius);
  padding: 20px;
  box-shadow: var(--shadow);
}
.note-card h3 { font-size: .95rem; margin-bottom: 10px; }
.note-card ul { padding-left: 18px; font-size: .88rem; color: var(--gray-600); }
.note-card li { margin-bottom: 6px; }

/* FAQ */
.faq-section { padding: 48px 0; }
.faq-section h2 { text-align: center; margin-bottom: 32px; font-size: 1.8rem; }
.faq-list {
  max-width: 720px;
  margin: 0 auto;
  display: flex;
  flex-direction: column;
  gap: 8px;
}
.faq-list details {
  background: #fff;
  border-radius: var(--radius);
  border: 1px solid var(--gray-200);
  overflow: hidden;
}
.faq-list summary {
  padding: 16px 20px;
  font-weight: 600;
  cursor: pointer;
  list-style: none;
  display: flex;
  align-items: center;
  justify-content: space-between;
}
.faq-list summary::-webkit-details-marker { display: none; }
.faq-list summary::after {
  content: '+';
  font-size: 1.3rem;
  color: var(--gray-400);
}
.faq-list details[open] summary::after { content: '−'; }
.faq-list details p {
  padding: 0 20px 16px;
  font-size: .9rem;
  color: var(--gray-600);
}

/* Footer */
.site-footer {
  background: var(--gray-900);
  color: var(--gray-400);
  padding: 48px 0 0;
}
.footer-grid {
  display: grid;
  grid-template-columns: 1.5fr 1fr 1fr;
  gap: 32px;
  margin-bottom: 32px;
}
.footer-brand .logo { color: #fff; margin-bottom: 8px; }
.footer-brand p { font-size: .85rem; line-height: 1.6; }
.footer-links h4 { color: #fff; font-size: .85rem; margin-bottom: 10px; }
.footer-links a { display: block; font-size: .85rem; margin-bottom: 6px; color: var(--gray-400); }
.footer-links a:hover { color: #fff; }
.footer-bottom {
  border-top: 1px solid var(--gray-800);
  padding: 16px 0;
  text-align: center;
  font-size: .8rem;
}
.footer-bottom a { color: var(--gray-300); }

/* Toast */
.toast-area { position: fixed; bottom: 24px; right: 24px; z-index: 200; display: flex; flex-direction: column; gap: 8px; }
.toast {
  background: var(--gray-800);
  color: #fff;
  padding: 12px 20px;
  border-radius: var(--radius-sm);
  font-size: .85rem;
  box-shadow: var(--shadow-md);
  animation: fadeIn .2s ease;
}
@keyframes fadeIn { from { opacity: 0; transform: translateY(8px); } to { opacity: 1; transform: translateY(0); } }

/* Print */
@media print {
  .site-header, .site-footer, .kit-sidebar, .quick-add, .add-custom, .action-bar, .inventory-filters, .mobile-nav-toggle, .hero-actions { display: none !important; }
  .workspace-grid { display: block; }
  .kit-main { box-shadow: none; }
  body { background: #fff; }
}

/* Responsive */
@media (max-width: 900px) {
  .workspace-grid { grid-template-columns: 1fr; }
  .kit-sidebar { position: static; }
  .footer-grid { grid-template-columns: 1fr 1fr; }
}

@media (max-width: 640px) {
  .site-nav { display: none; }
  .mobile-nav-toggle { display: flex; }
  .hero { padding: 48px 0; }
  .hero h1 { font-size: 1.8rem; }
  .guide-grid { grid-template-columns: 1fr; }
  .footer-grid { grid-template-columns: 1fr; }
  .form-row { flex-direction: column; }
  .field-small { max-width: 100%; }
  .kit-header { padding: 16px; }
  .quick-add, .add-custom, .inventory-area, .restock-area { padding: 16px; }
}

.muted { color: var(--gray-400); font-size: .9rem; }



/* Factory-injected deployment helpers. The AI owns the site design above this block. */
.ad-unit {
  width: min(100%, 720px);
  min-height: 120px;
  margin: 24px auto;
  display: block;
}

.legal-page {
  width: min(900px, calc(100% - 32px));
  margin: 40px auto;
}

.factory-fallback-nav {
  width: min(900px, calc(100% - 32px));
  margin: 24px auto 0;
  display: flex;
  flex-wrap: wrap;
  gap: 10px 16px;
  align-items: center;
  font-size: 0.95rem;
}

.factory-fallback-nav a {
  color: inherit;
  text-decoration: none;
  border-bottom: 1px solid currentColor;
}
