/* Reset & Base */
*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }
html { font-size: 16px; scroll-behavior: smooth; }
body {
  font-family: system-ui, -apple-system, 'Segoe UI', Roboto, sans-serif;
  line-height: 1.55;
  color: #1e1e1e;
  background: #faf9f6;
  -webkit-font-smoothing: antialiased;
}

/* Header */
.site-header {
  background: #fff;
  border-bottom: 1px solid #e0dcd5;
  position: sticky;
  top: 0;
  z-index: 100;
}
.header-inner {
  max-width: 1200px;
  margin: 0 auto;
  padding: 0.75rem 1.5rem;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
  flex-wrap: wrap;
}
.logo {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  text-decoration: none;
  color: #2c2c2c;
  font-weight: 700;
  font-size: 1.25rem;
  letter-spacing: -0.01em;
}
.logo svg { flex-shrink: 0; }
.main-nav { display: flex; gap: 1.5rem; }
.main-nav a {
  text-decoration: none;
  color: #555;
  font-weight: 500;
  font-size: 0.95rem;
  transition: color 0.15s;
}
.main-nav a:hover, .main-nav a:focus { color: #1e1e1e; text-decoration: underline; }

/* Main */
main {
  max-width: 1200px;
  margin: 0 auto;
  padding: 2rem 1.5rem 4rem;
}

/* Sections */
section { margin-bottom: 3.5rem; }
.section-header { margin-bottom: 1.5rem; }
h1 { font-size: 2rem; font-weight: 700; letter-spacing: -0.02em; margin-bottom: 0.25rem; }
h2 { font-size: 1.5rem; font-weight: 700; letter-spacing: -0.01em; margin-bottom: 0.5rem; }
h3 { font-size: 1.15rem; font-weight: 600; margin-bottom: 0.4rem; }
.section-subtitle { color: #555; font-size: 1rem; max-width: 650px; }

/* Filter Bar */
.filter-bar {
  background: #fff;
  border: 1px solid #e0dcd5;
  border-radius: 10px;
  padding: 1.25rem 1.5rem;
  margin-bottom: 1.5rem;
}
.filter-row {
  display: flex;
  flex-wrap: wrap;
  gap: 1rem 1.5rem;
  align-items: flex-end;
  margin-bottom: 1rem;
}
.filter-group {
  display: flex;
  flex-direction: column;
  gap: 0.3rem;
  min-width: 140px;
  flex: 1 1 160px;
}
.filter-group label {
  font-size: 0.8rem;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.04em;
  color: #666;
}
.filter-group input[type="text"],
.filter-group select {
  padding: 0.5rem 0.75rem;
  border: 1px solid #ccc;
  border-radius: 6px;
  font-size: 0.9rem;
  background: #fff;
  color: #1e1e1e;
  width: 100%;
}
.filter-group input[type="text"]:focus,
.filter-group select:focus {
  outline: 2px solid #4a6fa5;
  outline-offset: 1px;
  border-color: #4a6fa5;
}
.price-range { flex: 2 1 220px; }
.range-inputs { display: flex; align-items: center; gap: 0.75rem; }
#price-slider { flex: 1; accent-color: #4a6fa5; }
#price-slider-label { font-size: 0.85rem; color: #444; white-space: nowrap; min-width: 70px; }
.filter-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 0.5rem;
}
.btn-outline {
  padding: 0.45rem 0.9rem;
  border: 1px solid #ccc;
  border-radius: 6px;
  background: #fff;
  font-size: 0.85rem;
  cursor: pointer;
  color: #333;
  transition: background 0.15s, border-color 0.15s;
}
.btn-outline:hover { background: #f0ede6; border-color: #aaa; }
.btn-primary {
  padding: 0.6rem 1.4rem;
  background: #2c2c2c;
  color: #fff;
  border: none;
  border-radius: 6px;
  font-size: 0.95rem;
  font-weight: 600;
  cursor: pointer;
  transition: background 0.15s;
}
.btn-primary:hover { background: #1a1a1a; }

/* Table */
.table-wrapper { overflow-x: auto; }
.supplier-table {
  width: 100%;
  border-collapse: collapse;
  background: #fff;
  border: 1px solid #e0dcd5;
  border-radius: 8px;
  overflow: hidden;
  font-size: 0.9rem;
}
.supplier-table th {
  background: #f5f2ed;
  text-align: left;
  padding: 0.7rem 1rem;
  font-weight: 600;
  font-size: 0.8rem;
  text-transform: uppercase;
  letter-spacing: 0.04em;
  color: #555;
  border-bottom: 2px solid #e0dcd5;
}
.supplier-table td {
  padding: 0.65rem 1rem;
  border-bottom: 1px solid #eee;
  vertical-align: top;
}
.supplier-table tbody tr { cursor: pointer; transition: background 0.1s; }
.supplier-table tbody tr:hover { background: #faf8f4; }
.supplier-table tbody tr.selected { background: #edf2f9; }
.save-btn {
  background: none;
  border: none;
  font-size: 1.3rem;
  cursor: pointer;
  padding: 0.2rem;
  line-height: 1;
  color: #ccc;
  transition: color 0.15s;
}
.save-btn.saved { color: #e6a817; }
.table-empty {
  text-align: center;
  padding: 2rem;
  color: #777;
  font-style: italic;
}

/* Detail Panel */
.detail-panel {
  background: #fff;
  border: 1px solid #e0dcd5;
  border-radius: 10px;
  padding: 1.5rem;
  margin-top: 1rem;
  position: relative;
  box-shadow: 0 2px 8px rgba(0,0,0,0.04);
}
.detail-close {
  position: absolute;
  top: 0.75rem;
  right: 1rem;
  background: none;
  border: none;
  font-size: 1.5rem;
  cursor: pointer;
  color: #888;
  line-height: 1;
}
.detail-close:hover { color: #333; }
.detail-list {
  display: grid;
  grid-template-columns: 160px 1fr;
  gap: 0.5rem 1rem;
  margin-top: 1rem;
  font-size: 0.9rem;
}
.detail-list dt { font-weight: 600; color: #555; }
.detail-list dd { color: #1e1e1e; }
.detail-list a { color: #4a6fa5; }

/* Wizard */
.wizard-section {
  background: #fff;
  border: 1px solid #e0dcd5;
  border-radius: 10px;
  padding: 2rem;
}
.wizard-layout {
  display: flex;
  flex-wrap: wrap;
  gap: 2rem;
  margin-top: 1.5rem;
}
.wizard-inputs {
  flex: 1 1 280px;
  display: flex;
  flex-direction: column;
  gap: 1rem;
}
.wizard-group label {
  display: block;
  font-weight: 600;
  font-size: 0.85rem;
  margin-bottom: 0.3rem;
  color: #444;
}
.wizard-group select,
.wizard-group input[type="number"] {
  width: 100%;
  padding: 0.5rem 0.75rem;
  border: 1px solid #ccc;
  border-radius: 6px;
  font-size: 0.9rem;
}
.wizard-results {
  flex: 2 1 400px;
  background: #f9f7f3;
  border-radius: 8px;
  padding: 1.5rem;
}
.wizard-results h3 { margin-bottom: 0.75rem; }
.wiz-rec-card {
  background: #fff;
  border: 1px solid #e0dcd5;
  border-radius: 6px;
  padding: 0.75rem 1rem;
  margin-bottom: 0.75rem;
  font-size: 0.9rem;
}
.wiz-rec-card strong { display: block; margin-bottom: 0.2rem; }

/* Supporting Content */
.support-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(300px, 1fr));
  gap: 1.5rem;
  margin-top: 1.5rem;
}
.support-card {
  background: #fff;
  border: 1px solid #e0dcd5;
  border-radius: 8px;
  padding: 1.25rem;
}
.support-card h3 { font-size: 1.05rem; }
.support-card p, .support-card li { font-size: 0.9rem; color: #333; }
.support-card ul { padding-left: 1.2rem; margin-top: 0.3rem; }
.support-card li { margin-bottom: 0.3rem; }
.support-note {
  margin-top: 2rem;
  padding: 1rem;
  background: #f5f2ed;
  border-radius: 6px;
  font-size: 0.85rem;
  color: #555;
}

/* Reference Table */
.ref-table-wrapper { overflow-x: auto; margin-top: 1rem; }
.ref-table {
  width: 100%;
  border-collapse: collapse;
  background: #fff;
  border: 1px solid #e0dcd5;
  border-radius: 8px;
  overflow: hidden;
  font-size: 0.9rem;
}
.ref-table th {
  background: #f5f2ed;
  padding: 0.6rem 1rem;
  font-weight: 600;
  font-size: 0.8rem;
  text-transform: uppercase;
  letter-spacing: 0.04em;
  color: #555;
  border-bottom: 2px solid #e0dcd5;
  text-align: left;
}
.ref-table td { padding: 0.6rem 1rem; border-bottom: 1px solid #eee; }

/* Footer */
.site-footer {
  background: #fff;
  border-top: 1px solid #e0dcd5;
  padding: 1.5rem;
  margin-top: 2rem;
}
.footer-inner {
  max-width: 1200px;
  margin: 0 auto;
  display: flex;
  flex-wrap: wrap;
  justify-content: space-between;
  align-items: center;
  gap: 1rem;
  font-size: 0.85rem;
  color: #666;
}
.footer-nav { display: flex; gap: 1.5rem; flex-wrap: wrap; }
.footer-nav a { color: #555; text-decoration: none; }
.footer-nav a:hover { text-decoration: underline; color: #1e1e1e; }

/* Responsive */
@media (max-width: 768px) {
  .header-inner { padding: 0.5rem 1rem; }
  main { padding: 1.5rem 1rem 3rem; }
  h1 { font-size: 1.6rem; }
  .filter-row { flex-direction: column; gap: 0.75rem; }
  .filter-group { flex: 1 1 auto; min-width: 100%; }
  .wizard-layout { flex-direction: column; }
  .detail-list { grid-template-columns: 1fr; }
  .support-grid { grid-template-columns: 1fr; }
  .footer-inner { flex-direction: column; text-align: center; }
}

@media (max-width: 480px) {
  .supplier-table { font-size: 0.8rem; }
  .supplier-table th, .supplier-table td { padding: 0.4rem 0.5rem; }
  .filter-actions { flex-direction: column; }
  .btn-outline, .btn-primary { width: 100%; text-align: center; }
}

/* Print */
@media print {
  .site-header, .filter-bar, .detail-panel, .site-footer, .wizard-section, .supporting-section, .reference-section,
  .save-btn, .detail-close, .filter-actions { display: none; }
  .supplier-table { border: 1px solid #000; }
  body { background: #fff; color: #000; }
}



/* 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;
}
