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

/* ============================================================
   Seoul — ultra-minimal K-clean dental rating site.
   Mostly white, soft light-grey surfaces, single fresh mint /
   soft-blue accent. Generous whitespace, light font weights,
   thin borders, gentle ~14px rounded corners. Calm, premium.
   ============================================================ */

:root {
  --ink: #2a2f36;
  --ink-soft: #8a929c;
  --line: #ecedf0;
  --bg: #ffffff;
  --bg-soft: #f7f8fa;
  --accent: #35b8ac;          /* fresh mint */
  --accent-soft: #e6f6f4;
  --good: #2fae8f;
  --good-bg: #e7f6f1;
  --mid: #c69a3e;
  --mid-bg: #fbf4e3;
  --bad: #d96a72;
  --bad-bg: #fbeced;
  --unknown: #aab1ba;
  --max-width: 74rem;

  --radius: 14px;
  --radius-sm: 10px;
  --radius-pill: 999px;
  --shadow-soft: 0 1px 2px rgba(42, 47, 54, 0.03), 0 8px 24px rgba(42, 47, 54, 0.04);
  --shadow-hover: 0 2px 4px rgba(42, 47, 54, 0.04), 0 14px 34px rgba(53, 184, 172, 0.10);
}

* { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; }
body {
  margin: 0;
  font-family: "Inter", "Noto Sans KR", system-ui, -apple-system, "Segoe UI", Roboto, sans-serif;
  font-size: 1rem;
  font-weight: 400;
  line-height: 1.7;
  color: var(--ink);
  background: var(--bg);
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
}
.container { max-width: var(--max-width); margin: 0 auto; padding: 0 1.75rem; }
main.container { padding-top: 2.5rem; padding-bottom: 5rem; }

a { color: var(--accent); text-decoration: none; transition: color 0.18s ease; }
a:hover { color: #268e84; text-decoration: underline; text-decoration-thickness: 1px; text-underline-offset: 3px; }

h1 { font-size: 2rem; font-weight: 600; line-height: 1.2; letter-spacing: -0.02em; margin: 0.75rem 0 1rem; }
h2 { font-size: 1.3rem; font-weight: 600; letter-spacing: -0.01em; margin: 3rem 0 0.75rem; }
h3 { font-size: 1.06rem; font-weight: 600; margin: 1.75rem 0 0.5rem; }
p { margin: 0.6rem 0 1.1rem; }
.lead { font-size: 1.12rem; font-weight: 300; color: var(--ink-soft); max-width: 52rem; line-height: 1.75; }
.muted { color: var(--ink-soft); font-size: 0.88rem; }
.nowrap { white-space: nowrap; }
.visually-hidden { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); }

/* ---------- Header ---------- */
.site-header {
  border-bottom: 1px solid var(--line);
  background: rgba(255, 255, 255, 0.85);
  backdrop-filter: saturate(140%) blur(10px);
  position: sticky;
  top: 0;
  z-index: 20;
}
.site-header .container { display: flex; flex-wrap: wrap; align-items: baseline; gap: 0.6rem 2.5rem; padding-top: 1.35rem; padding-bottom: 1.2rem; }
.brand { color: var(--ink); display: flex; flex-direction: column; }
.brand:hover { text-decoration: none; }
.brand-name { font-weight: 700; font-size: 1.2rem; letter-spacing: -0.02em; }
.brand-tagline { font-size: 0.76rem; font-weight: 300; color: var(--ink-soft); letter-spacing: 0.02em; }
.site-nav { display: flex; flex-wrap: wrap; gap: 0.25rem 1.4rem; font-size: 0.92rem; }
.site-nav a { color: var(--ink-soft); padding: 0.2rem 0; border-bottom: 2px solid transparent; font-weight: 400; }
.site-nav a:hover { color: var(--accent); text-decoration: none; }
.site-nav a[aria-current="page"] { color: var(--ink); border-bottom-color: var(--accent); }
.lang-switcher { margin-left: auto; font-size: 0.84rem; white-space: nowrap; }
.lang-switcher a { color: var(--ink-soft); }
.lang-switcher a:hover { color: var(--accent); text-decoration: none; }
.lang-current { font-weight: 600; color: var(--accent); }
.lang-sep { color: var(--line); }

/* ---------- Hero ---------- */
.hero {
  margin-top: 1rem;
  padding: 2.75rem 0 2.25rem;
}
.hero h1 { max-width: 46rem; font-size: 2.4rem; font-weight: 600; }
.hero-links { font-size: 0.95rem; margin-top: 1.25rem; display: flex; flex-wrap: wrap; gap: 0.6rem 1.5rem; }

/* ---------- Profile controls ---------- */
.ranking-controls { margin: 2rem 0 1.25rem; }
.profile-buttons { display: flex; flex-wrap: wrap; gap: 0.55rem; }
.profile-btn {
  font: inherit; font-size: 0.86rem; font-weight: 500;
  padding: 0.45rem 1.05rem;
  border: 1px solid var(--line); border-radius: var(--radius-pill);
  background: var(--bg); color: var(--ink-soft);
  cursor: pointer;
  transition: all 0.18s ease;
}
.profile-btn:hover { border-color: var(--accent); color: var(--accent); background: var(--accent-soft); }
.profile-btn[aria-pressed="true"] {
  background: var(--accent); border-color: var(--accent); color: #fff;
  box-shadow: 0 6px 16px rgba(53, 184, 172, 0.25);
}
.profile-desc { min-height: 1.4em; margin: 0.85rem 0 0; font-size: 0.9rem; font-weight: 300; color: var(--ink-soft); }
.table-filter { margin-top: 1rem; }
.table-filter input {
  font: inherit; font-size: 0.92rem; width: 100%; max-width: 22rem;
  padding: 0.55rem 0.95rem; border: 1px solid var(--line); border-radius: var(--radius-pill);
  background: var(--bg-soft);
  transition: border-color 0.18s ease, box-shadow 0.18s ease, background 0.18s ease;
}
.table-filter input:focus {
  outline: none; border-color: var(--accent); background: var(--bg);
  box-shadow: 0 0 0 4px var(--accent-soft);
}

/* ---------- Tables ---------- */
.table-wrap {
  overflow-x: auto;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: var(--bg);
  box-shadow: var(--shadow-soft);
}
table { border-collapse: collapse; width: 100%; font-size: 0.92rem; }
th, td { text-align: left; padding: 0.75rem 0.95rem; border-bottom: 1px solid var(--line); vertical-align: top; }
thead th {
  font-size: 0.72rem; font-weight: 600; text-transform: uppercase; letter-spacing: 0.08em;
  color: var(--ink-soft); border-bottom: 1px solid var(--line);
  background: var(--bg-soft);
}
td.num, th.num { text-align: right; font-variant-numeric: tabular-nums; }
tbody tr:last-child td { border-bottom: none; }

.ranking-table tbody tr { transition: background 0.15s ease; }
.ranking-table tbody tr:hover { background: var(--accent-soft); }
.rank-cell { font-variant-numeric: tabular-nums; color: var(--ink-soft); width: 2.4rem; font-weight: 500; }
.name-cell a { font-weight: 600; color: var(--ink); }
.name-cell a:hover { color: var(--accent); text-decoration: none; }
.score-cell { white-space: nowrap; }
.th-sub { font-size: 0.7em; color: var(--ink-soft); margin-left: 0.15em; text-transform: none; letter-spacing: 0; }
.cat-cell { white-space: nowrap; font-variant-numeric: tabular-nums; }
.cat-max { color: var(--ink-soft); font-size: 0.8em; }
.flags-cell .flag-count { color: var(--bad); font-weight: 600; }
.flags-cell .flag-none { color: var(--ink-soft); }
.table-note { margin-top: 1rem; max-width: 52rem; font-weight: 300; }

.excluded-note { margin-top: 1.25rem; font-size: 0.92rem; }
.excluded-note summary { cursor: pointer; color: var(--ink-soft); }

/* ---------- Score badges ---------- */
.score-badge {
  display: inline-block; min-width: 2.6em; text-align: center;
  padding: 0.2em 0.55em; border-radius: var(--radius-pill);
  font-weight: 600; font-variant-numeric: tabular-nums;
  font-size: 0.94em;
}
.score-high { background: var(--good-bg); color: #1f8f74; }
.score-mid { background: var(--mid-bg); color: #a97e28; }
.score-low { background: var(--bad-bg); color: #c1545c; }
.score-na { background: var(--bg-soft); color: var(--unknown); }

/* ---------- Bars ---------- */
.bar {
  background: var(--bg-soft); border: 1px solid var(--line); border-radius: var(--radius-pill);
  height: 0.55rem; overflow: hidden; min-width: 6rem; flex: 1;
}
.bar-fill {
  background: linear-gradient(90deg, #4fd0c3, var(--accent));
  height: 100%; border-radius: var(--radius-pill);
}

/* ---------- Cards ---------- */
.cards-section { margin-top: 3.5rem; }
.cards-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(20rem, 1fr)); gap: 1.35rem; }
.clinic-card {
  border: 1px solid var(--line); border-radius: var(--radius);
  padding: 1.5rem 1.6rem; background: var(--bg);
  box-shadow: var(--shadow-soft);
  transition: transform 0.2s ease, box-shadow 0.2s ease, border-color 0.2s ease;
}
.clinic-card:hover { transform: translateY(-3px); box-shadow: var(--shadow-hover); border-color: #d6e9e7; }
.card-head { display: flex; align-items: baseline; justify-content: space-between; gap: 0.75rem; }
.card-head h3 { margin: 0; font-size: 1.05rem; font-weight: 600; }
.card-head a { color: var(--ink); }
.card-head a:hover { color: var(--accent); text-decoration: none; }
.card-summary { font-size: 0.88rem; font-weight: 300; color: var(--ink-soft); }
.card-bars { display: flex; flex-direction: column; gap: 0.4rem; margin: 0.9rem 0; }
.card-bar-row { display: flex; align-items: center; gap: 0.6rem; font-size: 0.78rem; }
.card-bar-label { flex: 0 0 9.5rem; color: var(--ink-soft); }
.card-bar-pts { flex: 0 0 3.2rem; text-align: right; font-variant-numeric: tabular-nums; color: var(--ink-soft); }
.card-meta { font-size: 0.8rem; color: var(--ink-soft); margin-bottom: 0; }

/* ---------- Clinic page ---------- */
.breadcrumbs { font-size: 0.85rem; color: var(--ink-soft); margin-bottom: 0.75rem; }
.clinic-head {
  display: flex; justify-content: space-between; align-items: flex-start; gap: 1.75rem; flex-wrap: wrap;
  border-bottom: 1px solid var(--line); padding-bottom: 1.75rem; margin-bottom: 0.5rem;
}
.clinic-headline { font-size: 1.05rem; font-weight: 300; max-width: 46rem; color: var(--ink-soft); }
.clinic-score-big { font-size: 2.1rem; font-weight: 600; display: flex; align-items: baseline; gap: 0.25rem; }
.clinic-score-big .score-badge { padding: 0.18em 0.55em; }
.score-of { color: var(--ink-soft); font-size: 1rem; font-weight: 300; }

.chip-list { list-style: none; padding: 0; display: flex; flex-wrap: wrap; gap: 0.55rem; }
.chip {
  display: inline-flex; align-items: baseline; gap: 0.5em;
  border: 1px solid var(--line); border-radius: var(--radius-pill);
  padding: 0.4rem 0.9rem; font-size: 0.85rem; background: var(--bg);
}
.chip-ranked { background: var(--accent-soft); border-color: transparent; }
.chip-rank { font-weight: 700; color: var(--accent); }
.chip-excluded { color: var(--ink-soft); }
.chip-excluded .chip-rank { color: var(--unknown); font-weight: 400; }
.chip-score { color: var(--ink-soft); }

.two-col { display: grid; grid-template-columns: 1fr 1fr; gap: 0 2.5rem; }
@media (max-width: 44rem) { .two-col { grid-template-columns: 1fr; } }
.plus-list li::marker { color: var(--good); }
.minus-list li::marker { color: var(--bad); }

.cat-section {
  margin-top: 1.5rem; padding: 1.5rem 1.75rem;
  border: 1px solid var(--line); border-radius: var(--radius); background: var(--bg);
  box-shadow: var(--shadow-soft);
}
.cat-section-head { display: flex; justify-content: space-between; align-items: center; gap: 1.5rem; flex-wrap: wrap; }
.cat-section-head h3 { margin: 0; }
.cat-section-score { display: flex; align-items: center; gap: 0.7rem; min-width: 14rem; font-variant-numeric: tabular-nums; font-size: 0.9rem; }
.crit-table { font-size: 0.9rem; }
.crit-table td { padding: 0.45rem 0.5rem; }
.crit-status { width: 1.6rem; }
.crit-pts { text-align: right; white-space: nowrap; font-variant-numeric: tabular-nums; color: var(--ink-soft); width: 4rem; }
.crit-note { color: var(--ink-soft); font-size: 0.85em; font-weight: 300; }
.crit-unknown .crit-label { color: var(--unknown); }

.status { font-weight: 600; }
.st-earned { color: var(--good); }
.st-partial { color: var(--mid); }
.st-missed { color: var(--bad); }
.st-unknown { color: var(--unknown); }

.flag-list { list-style: none; padding: 0; }
.flag {
  padding: 0.75rem 1rem; border-left: 3px solid var(--bad); background: var(--bad-bg);
  border-radius: 0 var(--radius-sm) var(--radius-sm) 0; margin-bottom: 0.6rem; font-size: 0.92rem;
}
.flag-low { border-left-color: var(--mid); background: var(--mid-bg); }
.flag-sev { text-transform: uppercase; font-size: 0.72rem; font-weight: 700; letter-spacing: 0.06em; margin-right: 0.35rem; }

.unknown-list { columns: 2; column-gap: 2.5rem; font-size: 0.92rem; color: var(--ink-soft); font-weight: 300; }
@media (max-width: 44rem) { .unknown-list { columns: 1; } }

.kv-table th { width: 9rem; font-weight: 500; color: var(--ink-soft); }
.src-id { font-variant-numeric: tabular-nums; color: var(--ink-soft); width: 3rem; }
.src-ref { font-size: 0.82em; color: var(--accent); }
.src-manual { color: var(--ink-soft); font-style: italic; }
.sources-table td { word-break: break-word; }
:target { background: var(--accent-soft); transition: background 0.6s; }

.report-cta {
  margin-top: 3rem; border: 1px solid var(--line); border-radius: var(--radius);
  padding: 1.5rem 1.75rem; background: var(--bg-soft);
}

/* ---------- Buttons & forms ---------- */
.btn {
  display: inline-block; background: var(--accent); color: #fff;
  border: none; border-radius: var(--radius-pill); padding: 0.6rem 1.5rem;
  font: inherit; font-size: 0.92rem; font-weight: 500; cursor: pointer;
  transition: transform 0.15s ease, box-shadow 0.18s ease, background 0.18s ease;
  box-shadow: 0 6px 16px rgba(53, 184, 172, 0.22);
}
.btn:hover { background: #2ba99d; transform: translateY(-1px); text-decoration: none; box-shadow: 0 10px 22px rgba(53, 184, 172, 0.28); }
.btn-secondary {
  background: var(--bg); color: var(--accent); border: 1px solid var(--accent);
  box-shadow: none;
}
.btn-secondary:hover { background: var(--accent-soft); box-shadow: none; }
.report-form { max-width: 36rem; }
.form-row { margin-bottom: 1.25rem; }
.form-row label { display: block; font-size: 0.88rem; font-weight: 500; margin-bottom: 0.35rem; }
.form-row .check-label { font-weight: 400; }
.form-row input[type="url"], .form-row input[type="email"], .form-row select, .form-row textarea {
  width: 100%; font: inherit; font-size: 0.95rem;
  padding: 0.6rem 0.85rem; border: 1px solid var(--line); border-radius: var(--radius-sm);
  background: var(--bg-soft);
  transition: border-color 0.18s ease, box-shadow 0.18s ease, background 0.18s ease;
}
.form-row input[type="url"]:focus, .form-row input[type="email"]:focus,
.form-row select:focus, .form-row textarea:focus {
  outline: none; border-color: var(--accent); background: var(--bg);
  box-shadow: 0 0 0 4px var(--accent-soft);
}

/* ---------- Methodology ---------- */
.formula {
  background: var(--bg-soft); border: 1px solid var(--line); border-radius: var(--radius-sm);
  padding: 1rem 1.25rem; font-size: 0.9rem; overflow-x: auto;
}
.method-table td, .method-table th { font-size: 0.9rem; }
.profile-matrix td, .profile-matrix th { white-space: nowrap; }
.profile-matrix td:last-child, .profile-matrix th:last-child { white-space: normal; min-width: 14rem; }

/* ---------- Home audit block ---------- */
.home-audit { margin-top: 3rem; border-top: 1px solid var(--line); padding-top: 1.5rem; }

/* ---------- Footer ---------- */
.site-footer {
  border-top: 1px solid var(--line); background: var(--bg-soft);
  margin-top: 3.5rem; font-size: 0.85rem; color: var(--ink-soft); font-weight: 300;
}
.site-footer .container { padding-top: 2rem; padding-bottom: 2.5rem; }
.site-footer p { max-width: 60rem; }

/* ---------- Licensing & Credentials ---------- */
#licensing .lic-missing { color: var(--bad); }
.doctors-table { margin-top: 0.5rem; font-size: 0.92rem; }
.doctors-table th { font-size: 0.72rem; text-transform: uppercase; letter-spacing: 0.08em; color: var(--ink-soft); }
.doctors-table td .lic-missing { color: var(--bad); font-size: 0.9em; }

/* ---------- Feedback form (unified) ---------- */
.req { color: var(--bad); }
.contact-fieldset {
  border: 1px solid var(--line); border-radius: var(--radius);
  padding: 0.75rem 1.25rem 1.25rem; margin: 1.5rem 0; background: var(--bg);
}
.contact-fieldset legend { font-weight: 600; padding: 0 0.5rem; }
.contacts-hint { margin: 0.4rem 0 0.9rem; }
.hp-field { position: absolute !important; left: -9999px !important; width: 1px; height: 1px; overflow: hidden; }
.form-error { color: var(--bad); font-size: 0.9rem; margin-top: 0.4rem; }
.form-status { min-height: 1.2em; font-size: 0.95rem; margin-top: 0.6rem; }
.form-ok { color: var(--good); font-weight: 600; }
.form-err { color: var(--bad); }
.cf-turnstile { margin: 1.25rem 0; }

/* ---------- Data banner (if present) ---------- */
.data-banner {
  background: var(--accent-soft); border: 1px solid #cdeeeb;
  border-radius: var(--radius); padding: 0.85rem 1.25rem; margin: 1.25rem 0;
  font-size: 0.9rem; color: #1f8f74;
}

/* ---------- Responsive ---------- */
@media (max-width: 640px) {
  .container { padding: 0 1.15rem; }
  main.container { padding-top: 1.75rem; padding-bottom: 3.5rem; }
  h1 { font-size: 1.7rem; }
  .hero { padding: 1.75rem 0 1.5rem; }
  .hero h1 { font-size: 1.85rem; }
  .lead { font-size: 1.02rem; }
  .site-header .container { gap: 0.5rem 1.25rem; }
  .clinic-score-big { font-size: 1.75rem; }
  .cat-section { padding: 1.15rem 1.15rem; }
  th, td { padding: 0.6rem 0.7rem; }
}

/* ---------- Print ---------- */
@media print {
  .site-header, .site-footer, .profile-buttons, .table-filter, .report-cta, .btn, .lang-switcher {
    display: none !important;
  }
  body { color: #000; background: #fff; }
  .clinic-card, .cat-section, .table-wrap { box-shadow: none; border-color: #ccc; }
  a { color: #000; text-decoration: underline; }
}
