@import url('https://fonts.googleapis.com/css2?family=Noto+Sans+KR:wght@400;500;600;700;800&display=swap');

:root {
  font-family: 'Noto Sans KR', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
  color: #1a2e26;
  background: #f8faf7;
  font-synthesis: none;
  --green: #176c50;
  --green-dark: #0f4f3a;
  --green-light: #e8f3ee;
  --line: #dfe5df;
  --card-bg: #ffffff;
  --text-muted: #64756c;
  --text-main: #182f28;
  --shadow-sm: 0 2px 4px rgba(0, 0, 0, 0.04);
  --shadow-md: 0 4px 12px rgba(23, 108, 80, 0.08);
}

* {
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
  scroll-padding-top: 24px;
}

body {
  margin: 0;
  line-height: 1.6;
}

a {
  color: inherit;
  text-decoration: none;
}

button, input, select {
  font: inherit;
  touch-action: manipulation;
}

button {
  cursor: pointer;
  transition: all 0.15s ease;
}

button:disabled {
  opacity: 0.45;
  cursor: default;
}

a:focus-visible, button:focus-visible, input:focus-visible, select:focus-visible {
  outline: 3px solid #c58e31;
  outline-offset: 3px;
}

header, main, footer {
  max-width: 1280px;
  margin: auto;
}

header {
  padding: 24px 32px;
  display: flex;
  justify-content: space-between;
  align-items: center;
  border-bottom: 1px solid var(--line);
}

.brand {
  display: flex;
  gap: 14px;
  align-items: center;
  font-weight: 800;
  font-size: 18px;
}

.brand small {
  display: block;
  font-weight: 500;
  font-size: 11px;
  letter-spacing: 1px;
  margin-top: 3px;
  color: var(--text-muted);
}

.logo {
  font-size: 28px;
  color: white;
  background: var(--green);
  width: 44px;
  height: 44px;
  display: grid;
  place-content: center;
  border-radius: 12px;
  position: relative;
  box-shadow: 0 3px 8px rgba(23, 108, 80, 0.3);
}

.logo span {
  position: absolute;
  right: 5px;
  top: 1px;
  font-size: 18px;
  color: #d8eaa6;
}

nav {
  display: flex;
  gap: 28px;
  font-size: 13px;
  font-weight: 600;
}

main {
  padding: 0 32px;
}

/* 상단 법정 고지문 배너 */
.banner-notice {
  margin-top: 24px;
  display: flex;
  gap: 16px;
  align-items: flex-start;
  background: #fdfaf2;
  border: 1px solid #ebd9b0;
  border-left: 5px solid #d4952b;
  border-radius: 10px;
  padding: 16px 20px;
  box-shadow: var(--shadow-sm);
}

.notice-icon {
  display: grid;
  place-content: center;
  width: 28px;
  height: 28px;
  background: #f3e5c4;
  color: #8c5b08;
  font-weight: 800;
  border-radius: 50%;
  flex-shrink: 0;
  font-size: 14px;
}

.notice-text strong {
  display: block;
  font-size: 13px;
  color: #794e05;
  margin-bottom: 4px;
}

.notice-text p {
  margin: 0;
  font-size: 12px;
  color: #5c451b;
  line-height: 1.6;
}

/* Hero Section */
.hero {
  display: grid;
  grid-template-columns: 1.3fr 1fr;
  gap: 60px;
  padding: 48px 0 52px;
  align-items: center;
}

.eyebrow {
  font-size: 11px;
  letter-spacing: 2px;
  font-weight: 700;
  color: var(--green);
}

h1 {
  font-size: 44px;
  line-height: 1.32;
  letter-spacing: -2px;
  margin: 16px 0 20px;
  color: var(--text-main);
}

h1 span {
  color: var(--green);
}

.hero p {
  font-size: 15px;
  line-height: 1.85;
  color: var(--text-muted);
}

.primary {
  background: var(--green);
  color: white;
  display: inline-block;
  padding: 13px 24px;
  border-radius: 8px;
  font-size: 13px;
  font-weight: 600;
  margin-top: 16px;
  box-shadow: 0 4px 12px rgba(23, 108, 80, 0.25);
}

.primary:hover {
  background: var(--green-dark);
}

.hero-card {
  background: #edf3e7;
  border: 1px solid #dce6d4;
  border-radius: 20px;
  padding: 26px 28px;
  transform: rotate(-0.5deg);
  position: relative;
  box-shadow: var(--shadow-sm);
}

.card-top {
  font-size: 10px;
  letter-spacing: 2px;
  font-weight: 700;
  margin-bottom: 22px;
  display: flex;
  align-items: center;
  gap: 8px;
  color: #3b5243;
}

.dot {
  width: 7px;
  height: 7px;
  border-radius: 100%;
  background: #3e8853;
}

.flow-node {
  background: #ffffff;
  padding: 16px 18px;
  border: 1px solid #d4dfce;
  border-radius: 12px;
  font-weight: 700;
  font-size: 14px;
  box-shadow: 0 3px 0 #d9e2d3;
}

.flow-node span {
  display: block;
  font-size: 11px;
  font-weight: 400;
  color: #63776c;
  margin-top: 6px;
}

.flow-node.accent {
  background: #176c50;
  color: white;
  border-color: #176c50;
  box-shadow: 0 3px 0 #0f4f3a;
}

.flow-node.accent span {
  color: #dbe7df;
}

.connector {
  padding: 12px 0;
  text-align: center;
  font-size: 11px;
  font-weight: 600;
  color: #4f6a5a;
}

.hero-card p {
  font-size: 11px;
  text-align: center;
  margin: 18px 0 0;
  color: #617568;
}

/* Stats Section */
.stats {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  background: white;
  border: 1px solid var(--line);
  border-radius: 14px;
  padding: 22px 0;
  box-shadow: var(--shadow-sm);
}

.stats article {
  padding: 0 24px;
  border-right: 1px solid var(--line);
}

.stats article:last-child {
  border: 0;
}

.stats span, .stats small {
  display: block;
  font-size: 12px;
  color: var(--text-muted);
}

.stats strong {
  display: block;
  font-size: 32px;
  font-weight: 700;
  margin: 6px 0;
  color: var(--text-main);
}

.stats strong.date {
  font-size: 22px;
  min-height: 48px;
  display: flex;
  align-items: center;
}

.stats small {
  font-size: 11px;
}

/* Explore Section */
.explore {
  padding-top: 54px;
}

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

h2 {
  font-size: 24px;
  letter-spacing: -0.8px;
  margin: 8px 0 0;
  color: var(--text-main);
}

.secondary {
  background: white;
  color: #27473a;
  border: 1px solid #c9d7cb;
  padding: 10px 16px;
  border-radius: 8px;
  font-size: 12px;
  font-weight: 600;
}

.secondary:hover:not(:disabled) {
  background: #f0f5f1;
  border-color: #aebfb0;
}

/* Filter Bar */
.filters {
  display: flex;
  align-items: flex-end;
  gap: 12px;
  background: #ecf1ea;
  border: 1px solid var(--line);
  border-radius: 14px;
  padding: 18px 20px;
  flex-wrap: wrap;
}

.filters label {
  display: flex;
  flex-direction: column;
  gap: 6px;
  font-size: 11px;
  color: #405748;
  font-weight: 700;
}

.search {
  flex: 2;
  min-width: 260px;
}

.filters input, .filters select {
  background: white;
  border: 1px solid #cfdacf;
  padding: 10px 12px;
  border-radius: 8px;
  font-size: 12px;
  color: #1e3328;
  height: 42px;
}

.filters input:focus, .filters select:focus {
  border-color: var(--green);
}

.filters select {
  max-width: 170px;
}

.filters .secondary {
  height: 42px;
}

/* Dynamic Badge Bar */
.badge-bar {
  display: flex;
  gap: 8px;
  margin: 18px 0 10px;
  flex-wrap: wrap;
}

.summary-pill {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  background: #ffffff;
  border: 1px solid #d5e0d4;
  border-radius: 20px;
  padding: 5px 12px;
  font-size: 11px;
  font-weight: 600;
  color: #385042;
  box-shadow: var(--shadow-sm);
}

.summary-pill.primary-pill {
  background: var(--green-light);
  border-color: #bad3c5;
  color: var(--green-dark);
}

.pill-count {
  background: #e2ede5;
  color: var(--green-dark);
  padding: 1px 7px;
  border-radius: 12px;
  font-size: 10px;
  font-weight: 700;
}

.primary-pill .pill-count {
  background: var(--green);
  color: white;
}

.result-head {
  display: flex;
  justify-content: space-between;
  font-size: 12px;
  color: var(--text-muted);
  margin: 18px 0 12px;
}

.result-head span:first-child {
  color: var(--text-main);
  font-weight: 700;
}

/* Empty State */
.empty {
  padding: 56px 20px;
  text-align: center;
  background: white;
  border: 1px dashed #cad7c7;
  border-radius: 14px;
}

.empty .empty-icon {
  display: grid;
  place-content: center;
  margin: 0 auto 16px;
  border-radius: 16px;
  background: #eff5eb;
  color: var(--green);
  width: 54px;
  height: 54px;
  font-size: 26px;
}

.empty h3 {
  font-size: 16px;
  margin: 0 0 8px;
  color: var(--text-main);
}

.empty p {
  font-size: 12px;
  color: var(--text-muted);
  margin: 0;
}

/* Table */
.table-wrap {
  overflow-x: auto;
  border: 1px solid var(--line);
  border-radius: 12px;
  background: white;
  box-shadow: var(--shadow-sm);
}

table {
  width: 100%;
  border-collapse: collapse;
  font-size: 12px;
  text-align: left;
}

th {
  padding: 14px 16px;
  background: #eef3eb;
  font-size: 11px;
  color: #3b5042;
  font-weight: 700;
  white-space: nowrap;
  border-bottom: 1px solid var(--line);
}

td {
  padding: 14px 16px;
  border-bottom: 1px solid #edf2ec;
  vertical-align: top;
}

tr:hover td {
  background: #fbfdfa;
}

.product-title {
  display: block;
  font-size: 13px;
  color: var(--text-main);
  margin-bottom: 4px;
}

.meta-code {
  display: block;
  color: var(--text-muted);
  font-size: 10px;
  margin-bottom: 6px;
}

.spec-cell {
  color: #44594c;
  line-height: 1.5;
  display: block;
  max-width: 260px;
  word-break: break-word;
}

.price-cell {
  white-space: nowrap;
  color: var(--green);
  font-size: 13px;
}

.company-name {
  font-weight: 600;
  display: block;
  color: #233a2e;
}

.region-meta {
  color: #728479;
  font-size: 10px;
  display: block;
  margin-top: 3px;
}

.bizno-code {
  font-family: 'Consolas', 'Menlo', monospace;
  font-size: 11px;
  background: #f2f6f1;
  padding: 2px 5px;
  border-radius: 4px;
  color: #274435;
}

.tag {
  display: inline-block;
  padding: 3px 6px;
  border-radius: 5px;
  font-size: 10px;
  font-weight: 600;
  margin: 2px 2px 2px 0;
}

.tag-type {
  background: #e9f2e7;
  color: #1e5f3c;
  border: 1px solid #d3e4d0;
}

.mini-tag {
  display: inline-block;
  font-size: 9px;
  font-weight: 700;
  padding: 2px 5px;
  border-radius: 4px;
  margin-right: 4px;
}

.tag-accent {
  background: #fdf2d8;
  color: #936009;
  border: 1px solid #f0dcab;
}

.tag-sme {
  background: #e7effb;
  color: #1d4e89;
  border: 1px solid #cadbf2;
}

.tag-warn {
  background: #fbeae8;
  color: #b52c21;
  border: 1px solid #f3cbca;
}

.cert-item {
  font-size: 11px;
  color: #234c38;
  line-height: 1.4;
  margin-bottom: 2px;
}

.cert-item.duty {
  color: #1a4d70;
}

.text-muted {
  color: #9ba89f;
  font-size: 11px;
}

/* Status Badges */
.status-badge {
  display: inline-block;
  font-size: 10px;
  font-weight: 700;
  padding: 4px 8px;
  border-radius: 6px;
  white-space: nowrap;
}

.status-badge.valid {
  background: #eaf5ec;
  color: #1d6e3c;
  border: 1px solid #c8e5cc;
}

.status-badge.warning {
  background: #fdf3e2;
  color: #9f5b08;
  border: 1px solid #f5dcaf;
}

.status-badge.expired {
  background: #f0f2f0;
  color: #6a786f;
  border: 1px solid #d9dfd9;
}

.status-badge.neutral {
  background: #f4f7f4;
  color: #6a7b70;
}

/* Pagination */
.pagination {
  display: flex;
  justify-content: center;
  align-items: center;
  gap: 16px;
  margin-top: 24px;
  font-size: 12px;
  font-weight: 600;
}

.pagination[hidden] {
  display: none;
}

/* Method Section */
.method {
  padding: 56px 0 44px;
}

.steps {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 24px;
  margin-top: 24px;
}

.steps article {
  background: white;
  border: 1px solid var(--line);
  border-radius: 12px;
  padding: 24px;
  box-shadow: var(--shadow-sm);
}

.steps b {
  font-size: 14px;
  color: var(--green);
  display: block;
  margin-bottom: 8px;
}

.steps h3 {
  font-size: 15px;
  margin: 0 0 8px;
  color: var(--text-main);
}

.steps p {
  font-size: 12px;
  line-height: 1.8;
  color: var(--text-muted);
  margin: 0;
}

.steps code {
  background: #edf2ea;
  padding: 2px 4px;
  border-radius: 4px;
  font-size: 11px;
}

/* Source Section */
.source {
  border: 1px solid var(--line);
  background: #edf2ea;
  border-radius: 12px;
  padding: 22px 26px;
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 40px;
}

.source h3 {
  font-size: 13px;
  margin: 0 0 6px;
  color: var(--text-main);
}

.source p {
  font-size: 11px;
  line-height: 1.7;
  color: var(--text-muted);
  margin: 0;
}

.source a {
  font-size: 12px;
  white-space: nowrap;
  color: var(--green);
  font-weight: 700;
}

/* Footer */
footer {
  padding: 24px 32px;
  display: flex;
  justify-content: space-between;
  border-top: 1px solid var(--line);
  font-size: 11px;
  color: var(--text-muted);
}

/* Responsive */
@media (max-width: 900px) {
  .hero {
    grid-template-columns: 1fr;
    gap: 32px;
    padding: 36px 0;
  }
  .stats {
    grid-template-columns: 1fr 1fr;
    gap: 16px;
    padding: 16px;
  }
  .stats article {
    border: 0;
    padding: 8px 12px;
  }
  .steps {
    grid-template-columns: 1fr;
    gap: 16px;
  }
  .filters {
    gap: 10px;
  }
  .filters select {
    max-width: none;
    flex: 1;
  }
}

/* ---------- 품명 카드 (STEP 1) ---------- */
.category-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(230px, 1fr));
  gap: 12px;
  margin-top: 18px;
}
.category-card {
  display: flex;
  flex-direction: column;
  gap: 8px;
  text-align: left;
  background: var(--card-bg);
  border: 1px solid var(--line);
  border-radius: 14px;
  padding: 16px 18px;
  cursor: pointer;
  font: inherit;
  color: var(--text-main);
  box-shadow: var(--shadow-sm);
  transition: border-color .15s, box-shadow .15s, transform .15s;
}
.category-card:hover { border-color: var(--green); box-shadow: var(--shadow-md); transform: translateY(-1px); }
.category-card.active { border-color: var(--green); background: var(--green-light); }
.category-card strong { font-size: 17px; letter-spacing: -0.01em; }
.category-count { font-size: 12px; color: #385042; }
.category-count b { color: var(--green-dark); font-size: 13px; }
.category-count small { color: var(--text-muted); }
.category-types { display: flex; flex-wrap: wrap; gap: 4px; }

.summary-pill button, button.summary-pill { cursor: pointer; font: inherit; }
button.summary-pill.active { background: var(--green); border-color: var(--green); color: #fff; }
button.summary-pill b { font-weight: 800; }

.filters label.check {
  flex-direction: row;
  align-items: center;
  gap: 8px;
  height: 42px;
  font-size: 12px;
  cursor: pointer;
}
.filters label.check input { width: 16px; height: 16px; height: auto; accent-color: var(--green); }

.mini-tag.hit { background: #fff3c4; border-color: #e6c860; color: #6b4e00; }
.status-badge.valid { background: var(--green-light); color: var(--green-dark); }
.status-badge.expired { background: #fdecec; color: #9b2c2c; }
.tag-warn { background: #fdecec; color: #9b2c2c; border-color: #f3c5c5; }

.contact { display: block; color: var(--text-muted); font-size: 11px; line-height: 1.5; }
.contact.addr { max-width: 260px; }
.contact a { color: var(--green-dark); text-decoration: none; }
.contact a:hover { text-decoration: underline; }

/* 통합 메뉴 (구매이음 · Supplier Diversity) */
nav a[aria-current="page"] { color: var(--green); }
.secondary-link { margin-left: 8px; background: transparent; color: var(--green); border: 1px solid var(--green); }
@media (max-width: 760px) {
  header { flex-wrap: wrap; gap: 12px; padding: 16px; }
  nav { flex-wrap: wrap; gap: 8px 14px; font-size: 12px; }
  .secondary-link { margin: 8px 0 0; }
}
