@import url('https://fonts.googleapis.com/css2?family=Cormorant+Garamond:ital,wght@0,400;0,500;0,600;0,700;1,400;1,500&family=Work+Sans:wght@400;500;600;700&display=swap');

/* ============================================================
   BUDAPEST — Belle Époque / Thermal-Bath Elegance
   Deep navy + antique gold + ivory. Serif Cormorant headings,
   restrained Work Sans body. Formal, editorial, symmetrical,
   thin gold rules, understated ornament. Sharp ~2px corners.
   Table-forward, dense.
   ============================================================ */

:root {
  --ink: #1a2437;          /* deep midnight navy — primary text */
  --ink-soft: #55607a;     /* muted slate-navy */
  --line: #d8cba8;         /* antique gold hairline */
  --bg: #fbf7ee;           /* warm ivory */
  --bg-soft: #f3ecdb;      /* aged parchment */
  --accent: #1e2f52;       /* imperial navy */
  --accent-soft: #e7ddc2;  /* soft gilt tint */

  --good: #4a6f3d;         /* restrained laurel green */
  --good-bg: #e5e8d3;
  --mid: #9a6a12;          /* antique bronze-gold */
  --mid-bg: #f4e7c6;
  --bad: #8f2f2a;          /* deep venetian red */
  --bad-bg: #f1ddd4;
  --unknown: #7c7566;      /* aged sepia grey */

  --max-width: 74rem;

  --gold: #b8912f;         /* luminous antique gold accent */
  --gold-soft: #cfa94a;
}

* { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; }

body {
  margin: 0;
  font-family: "Work Sans", system-ui, -apple-system, "Segoe UI", Roboto, sans-serif;
  font-size: 1rem;
  line-height: 1.62;
  color: var(--ink);
  background:
    linear-gradient(180deg, rgba(30,47,82,0.02), rgba(30,47,82,0)) ,
    var(--bg);
  background-attachment: fixed;
}

.container { max-width: var(--max-width); margin: 0 auto; padding: 0 1.5rem; }
main.container { padding-top: 1.75rem; padding-bottom: 3.5rem; }

a { color: var(--accent); text-underline-offset: 2px; }
a:hover { text-decoration-thickness: 2px; text-decoration-color: var(--gold); }

/* Serif, editorial headings */
h1, h2, h3 {
  font-family: "Cormorant Garamond", Georgia, "Times New Roman", serif;
  font-weight: 600;
  color: var(--ink);
  letter-spacing: 0.005em;
}
h1 { font-size: 2.55rem; line-height: 1.14; margin: 0.6rem 0 0.85rem; font-weight: 700; }
h2 {
  font-size: 1.85rem; margin: 2.25rem 0 0.6rem; font-weight: 600;
  padding-bottom: 0.3rem; border-bottom: 1px solid var(--line);
}
h3 { font-size: 1.4rem; margin: 1.4rem 0 0.4rem; font-weight: 600; }

p { margin: 0.5rem 0 1rem; }
.lead {
  font-family: "Cormorant Garamond", Georgia, serif;
  font-size: 1.4rem; font-style: italic; line-height: 1.45;
  color: var(--ink-soft); max-width: 52rem; font-weight: 500;
}
.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: linear-gradient(180deg, var(--bg) 0%, var(--bg-soft) 100%);
  box-shadow: 0 1px 0 var(--gold-soft), 0 2px 0 var(--bg);
  position: relative;
}
.site-header::after {
  content: ""; position: absolute; left: 0; right: 0; bottom: -3px; height: 2px;
  background: linear-gradient(90deg, transparent, var(--gold) 20%, var(--gold) 80%, transparent);
  opacity: 0.55;
}
.site-header .container {
  display: flex; flex-wrap: wrap; align-items: baseline; gap: 0.5rem 2rem;
  padding-top: 1.15rem; padding-bottom: 1rem;
}
.brand { text-decoration: none; color: var(--ink); display: flex; flex-direction: column; }
.brand-name {
  font-family: "Cormorant Garamond", Georgia, serif;
  font-weight: 700; font-size: 1.65rem; letter-spacing: 0.02em; line-height: 1;
  color: var(--accent);
}
.brand-tagline {
  font-size: 0.72rem; color: var(--ink-soft); text-transform: uppercase;
  letter-spacing: 0.22em; margin-top: 0.2rem;
}
.site-nav { display: flex; flex-wrap: wrap; gap: 0.25rem 1.4rem; font-size: 0.82rem; }
.site-nav a {
  text-decoration: none; color: var(--ink-soft); padding: 0.15rem 0;
  border-bottom: 2px solid transparent;
  text-transform: uppercase; letter-spacing: 0.1em; font-size: 0.76rem; font-weight: 500;
}
.site-nav a:hover { color: var(--accent); border-bottom-color: var(--gold); }
.site-nav a[aria-current="page"] { color: var(--accent); border-bottom-color: var(--gold); }

.lang-switcher { margin-left: auto; font-size: 0.82rem; white-space: nowrap; }
.lang-switcher a { text-decoration: none; color: var(--ink-soft); }
.lang-switcher a:hover { color: var(--accent); text-decoration: underline; }
.lang-current { font-weight: 700; color: var(--gold); }
.lang-sep { color: var(--line); }

/* ---------------- Hero ---------------- */
.hero {
  position: relative;
  padding: 1rem 0 0.5rem;
}
.hero h1 { max-width: 46rem; }
.hero h1::after {
  content: ""; display: block; width: 5rem; height: 2px; margin: 0.7rem 0 0;
  background: linear-gradient(90deg, var(--gold), var(--gold-soft));
}
.hero-links { font-size: 0.95rem; }

/* ---------------- Profile controls ---------------- */
.ranking-controls { margin: 1.75rem 0 1rem; }
.profile-buttons { display: flex; flex-wrap: wrap; gap: 0.5rem; }
.profile-btn {
  font: inherit; font-size: 0.78rem;
  padding: 0.4rem 1rem;
  border: 1px solid var(--line); border-radius: 2px;
  background: var(--bg); color: var(--ink-soft);
  cursor: pointer;
  text-transform: uppercase; letter-spacing: 0.09em; font-weight: 500;
  transition: all 0.15s ease;
}
.profile-btn:hover { border-color: var(--gold); color: var(--accent); background: var(--bg-soft); }
.profile-btn[aria-pressed="true"] {
  background: var(--accent); border-color: var(--accent); color: var(--bg);
  box-shadow: inset 0 0 0 1px var(--gold-soft);
}
.profile-desc { min-height: 1.4em; margin: 0.7rem 0 0; font-size: 0.92rem; font-style: italic; color: var(--ink-soft); }
.table-filter { margin-top: 0.85rem; }
.table-filter input {
  font: inherit; font-size: 0.92rem; width: 100%; max-width: 20rem;
  padding: 0.45rem 0.75rem; border: 1px solid var(--line); border-radius: 2px;
  background: var(--bg); color: var(--ink);
}
.table-filter input:focus { outline: 2px solid var(--gold-soft); outline-offset: 1px; border-color: var(--gold); }

/* ---------------- Tables ---------------- */
.table-wrap { overflow-x: auto; }
table { border-collapse: collapse; width: 100%; font-size: 0.92rem; }
th, td { text-align: left; padding: 0.55rem 0.7rem; border-bottom: 1px solid var(--line); vertical-align: top; }
thead th {
  font-size: 0.72rem; text-transform: uppercase; letter-spacing: 0.11em;
  color: var(--accent); font-weight: 600;
  border-bottom: 2px solid var(--gold-soft);
  background: var(--bg-soft);
  font-family: "Work Sans", sans-serif;
}
td.num, th.num { text-align: right; font-variant-numeric: tabular-nums; }

.ranking-table {
  border: 1px solid var(--line);
  box-shadow: 0 1px 0 var(--gold-soft);
}
.ranking-table tbody tr:nth-child(even) { background: rgba(243,236,219,0.5); }
.ranking-table tbody tr:hover { background: var(--accent-soft); }
.rank-cell {
  font-family: "Cormorant Garamond", serif; font-size: 1.25rem; font-weight: 700;
  font-variant-numeric: tabular-nums; color: var(--gold); width: 2.4rem; text-align: center;
}
.name-cell a { font-weight: 600; text-decoration: none; color: var(--accent); }
.name-cell a:hover { text-decoration: underline; text-decoration-color: var(--gold); }
.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: 700; }
.flags-cell .flag-none { color: var(--ink-soft); }
.table-note { margin-top: 0.85rem; max-width: 52rem; font-size: 0.9rem; color: var(--ink-soft); }

.excluded-note { margin-top: 1.1rem; 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.14em 0.5em; border-radius: 2px;
  font-family: "Cormorant Garamond", serif;
  font-weight: 700; font-size: 1.05em; font-variant-numeric: tabular-nums;
  border: 1px solid transparent;
}
.score-high { background: var(--good-bg); color: var(--good); border-color: rgba(74,111,61,0.35); }
.score-mid { background: var(--mid-bg); color: var(--mid); border-color: rgba(154,106,18,0.35); }
.score-low { background: var(--bad-bg); color: var(--bad); border-color: rgba(143,47,42,0.35); }
.score-na { background: var(--bg-soft); color: var(--unknown); border-color: var(--line); }

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

/* ---------------- Cards ---------------- */
.cards-section { margin-top: 2.75rem; }
.cards-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(19rem, 1fr)); gap: 1.15rem; }
.clinic-card {
  border: 1px solid var(--line); border-radius: 2px; padding: 1.1rem 1.2rem;
  background: var(--bg);
  box-shadow: 0 1px 2px rgba(26,36,55,0.05), inset 0 0 0 1px rgba(184,145,47,0.08);
  position: relative;
}
.clinic-card::before {
  content: ""; position: absolute; top: 0; left: 0; right: 0; height: 2px;
  background: linear-gradient(90deg, var(--gold-soft), transparent 70%);
}
.card-head { display: flex; align-items: baseline; justify-content: space-between; gap: 0.75rem; }
.card-head h3 { margin: 0; font-size: 1.3rem; }
.card-head a { text-decoration: none; color: var(--accent); }
.card-head a:hover { text-decoration: underline; text-decoration-color: var(--gold); }
.card-summary { font-size: 0.88rem; color: var(--ink-soft); }
.card-bars { display: flex; flex-direction: column; gap: 0.32rem; margin: 0.7rem 0; }
.card-bar-row { display: flex; align-items: center; gap: 0.5rem; font-size: 0.76rem; }
.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.83rem; color: var(--ink-soft); margin-bottom: 0.5rem; letter-spacing: 0.02em; }
.clinic-head {
  display: flex; justify-content: space-between; align-items: flex-start; gap: 1.5rem;
  flex-wrap: wrap; border-bottom: 2px solid var(--gold-soft); padding-bottom: 1.1rem;
}
.clinic-headline {
  font-family: "Cormorant Garamond", serif; font-style: italic;
  font-size: 1.35rem; line-height: 1.4; max-width: 46rem; color: var(--ink-soft);
}
.clinic-score-big {
  font-family: "Cormorant Garamond", serif;
  font-size: 2.6rem; display: flex; align-items: baseline; gap: 0.2rem;
}
.clinic-score-big .score-badge { padding: 0.12em 0.45em; }
.score-of { color: var(--ink-soft); font-size: 1.1rem; }

.chip-list { list-style: none; padding: 0; display: flex; flex-wrap: wrap; gap: 0.5rem; }
.chip {
  display: inline-flex; align-items: baseline; gap: 0.5em;
  border: 1px solid var(--line); border-radius: 2px; padding: 0.32rem 0.75rem; font-size: 0.83rem;
  background: var(--bg);
}
.chip-ranked { background: var(--accent-soft); border-color: var(--gold-soft); }
.chip-rank { font-family: "Cormorant Garamond", serif; font-weight: 700; font-size: 1.1em; 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.75rem; }
.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.6rem; min-width: 14rem; font-variant-numeric: tabular-nums; font-size: 0.9rem; }
.crit-table { font-size: 0.9rem; }
.crit-table td { padding: 0.38rem 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; }
.crit-unknown .crit-label { color: var(--unknown); }

.status { font-weight: 700; }
.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.55rem 0.8rem; border-left: 3px solid var(--bad); background: var(--bad-bg);
  border-radius: 0 2px 2px 0; margin-bottom: 0.5rem; font-size: 0.92rem;
}
.flag-low { border-left-color: var(--mid); background: var(--mid-bg); }
.flag-sev { text-transform: uppercase; font-size: 0.7rem; font-weight: 700; letter-spacing: 0.08em; margin-right: 0.3rem; }

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

.kv-table th { width: 9rem; font-weight: 600; color: var(--ink-soft); background: transparent; text-transform: none; letter-spacing: 0; }
.src-id { font-variant-numeric: tabular-nums; color: var(--ink-soft); width: 3rem; }
.src-ref { font-size: 0.82em; text-decoration: none; color: var(--accent); }
.src-manual { color: var(--ink-soft); font-style: italic; }
.sources-table td { word-break: break-word; }
:target { background: var(--mid-bg); transition: background 0.6s; }

.report-cta {
  margin-top: 2.75rem; border: 1px solid var(--gold-soft); border-radius: 2px;
  padding: 1.15rem 1.35rem; background: var(--bg-soft);
  box-shadow: inset 0 0 0 1px var(--bg);
}

/* ---------------- Buttons & forms ---------------- */
.btn {
  display: inline-block; background: var(--accent); color: var(--bg);
  border: 1px solid var(--accent); border-radius: 2px; padding: 0.55rem 1.3rem;
  font: inherit; font-size: 0.8rem; text-decoration: none; cursor: pointer;
  text-transform: uppercase; letter-spacing: 0.1em; font-weight: 600;
  box-shadow: inset 0 0 0 1px var(--gold-soft);
  transition: all 0.15s ease;
}
.btn:hover { background: #16233f; box-shadow: inset 0 0 0 1px var(--gold); }
.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.1rem; }
.form-row label { display: block; font-size: 0.86rem; font-weight: 600; margin-bottom: 0.28rem; letter-spacing: 0.02em; }
.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.5rem 0.7rem; border: 1px solid var(--line); border-radius: 2px; background: var(--bg); color: var(--ink);
}
.form-row input:focus, .form-row select:focus, .form-row textarea:focus {
  outline: 2px solid var(--gold-soft); outline-offset: 1px; border-color: var(--gold);
}

/* ---------------- Methodology ---------------- */
.formula {
  background: var(--bg-soft); border: 1px solid var(--line); border-left: 3px solid var(--gold);
  border-radius: 0 2px 2px 0;
  padding: 0.85rem 1.1rem; 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: 2.75rem; border-top: 2px solid var(--gold-soft); padding-top: 1.1rem; }

/* ---------------- Footer ---------------- */
.site-footer {
  border-top: 1px solid var(--line);
  background: linear-gradient(180deg, var(--bg-soft), var(--bg));
  margin-top: 2.5rem; font-size: 0.85rem; color: var(--ink-soft);
  position: relative;
}
.site-footer::before {
  content: ""; position: absolute; top: -3px; left: 0; right: 0; height: 2px;
  background: linear-gradient(90deg, transparent, var(--gold) 20%, var(--gold) 80%, transparent);
  opacity: 0.5;
}
.site-footer .container { padding-top: 1.4rem; padding-bottom: 1.65rem; }
.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.11em;
  color: var(--accent); font-weight: 600; background: var(--bg-soft);
}
.doctors-table td .lic-missing { color: var(--bad); font-size: 0.9em; }

/* ---------------- Feedback form ---------------- */
.req { color: var(--bad); }
.contact-fieldset {
  border: 1px solid var(--gold-soft); border-radius: 2px;
  padding: 0.5rem 1.1rem 1.1rem; margin: 1.35rem 0; background: var(--bg);
}
.contact-fieldset legend {
  font-family: "Cormorant Garamond", serif; font-weight: 700; font-size: 1.2rem;
  padding: 0 0.5rem; color: var(--accent);
}
.contacts-hint { margin: 0.3rem 0 0.8rem; }
.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.5rem; }
.form-ok { color: var(--good); font-weight: 700; }
.form-err { color: var(--bad); }
.cf-turnstile { margin: 1rem 0; }

/* ---------------- Data banner ---------------- */
.data-banner {
  background: var(--accent); color: var(--bg);
  border-bottom: 2px solid var(--gold);
  font-size: 0.85rem; padding: 0.5rem 0;
}
.data-banner a { color: var(--gold-soft); }

/* ---------------- Responsive ---------------- */
@media (max-width: 640px) {
  h1 { font-size: 2rem; }
  h2 { font-size: 1.5rem; }
  .clinic-score-big { font-size: 2rem; }
  .lead { font-size: 1.2rem; }
  .site-header .container { padding-top: 0.9rem; padding-bottom: 0.8rem; }
  .brand-name { font-size: 1.4rem; }
  main.container { padding-top: 1.25rem; }
}

/* ---------------- Print ---------------- */
@media print {
  body { background: #fff; color: #000; }
  .site-header::after, .site-footer::before, .clinic-card::before, .hero h1::after { display: none; }
  .btn, .profile-buttons, .table-filter, .lang-switcher { display: none; }
  a { color: #000; text-decoration: underline; }
  .clinic-card, .ranking-table, .contact-fieldset { box-shadow: none; }
  thead th, .doctors-table th { background: #eee; color: #000; }
}
