:root {
  --bg: #f4efe6;
  --surface: #fffaf2;
  --surface-strong: #fff;
  --text: #1d1a16;
  --muted: #655c52;
  --line: #d9ccbb;
  --accent: #0b6e4f;
  --accent-soft: #dff3ea;
  --shadow: 0 18px 40px rgba(29, 26, 22, 0.08);
}

* {
  box-sizing: border-box;
}

.sr-only {
  position: absolute;
  width: 1px;
  height: 1px;
  padding: 0;
  margin: -1px;
  overflow: hidden;
  clip: rect(0, 0, 0, 0);
  white-space: nowrap;
  border: 0;
}

body {
  margin: 0;
  font-family: Georgia, "Times New Roman", serif;
  color: var(--text);
  background:
    radial-gradient(circle at top left, rgba(11, 110, 79, 0.08), transparent 30%),
    linear-gradient(180deg, #f7f2ea 0%, var(--bg) 100%);
}

a {
  color: var(--accent);
  text-decoration: none;
}

a:hover {
  text-decoration: underline;
}

.layout {
  max-width: 1180px;
  margin: 0 auto;
  padding: 32px 20px 56px;
}

.site-footer {
  margin-top: 28px;
  padding: 20px 24px;
  border: 1px solid var(--line);
  border-radius: 20px;
  background: rgba(255, 250, 242, 0.88);
  box-shadow: var(--shadow);
  text-align: center;
}

.site-footer p {
  margin: 0;
  color: var(--muted);
  line-height: 1.6;
}

.footer-nav {
  display: flex;
  justify-content: center;
  flex-wrap: wrap;
  gap: 14px;
  margin-top: 10px;
  font-size: 14px;
}

.footer-nav a {
  color: var(--accent);
  font-weight: 700;
}

.hero {
  background: linear-gradient(135deg, rgba(11, 110, 79, 0.08), rgba(255, 255, 255, 0.85));
  border: 1px solid var(--line);
  border-radius: 28px;
  padding: 36px;
  box-shadow: var(--shadow);
  margin-bottom: 28px;
}

.hero-country {
  margin-bottom: 20px;
}

.site-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  margin-bottom: 18px;
  padding: 14px 18px;
  background: rgba(255, 250, 242, 0.88);
  border: 1px solid var(--line);
  border-radius: 18px;
  box-shadow: var(--shadow);
  backdrop-filter: blur(8px);
}

.brand {
  font-size: 18px;
  font-weight: 700;
  color: var(--text);
  text-decoration: none;
}

.brand:hover {
  text-decoration: none;
}

.locale-nav {
  display: flex;
  gap: 8px;
  flex-wrap: wrap;
}

.locale-link {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-width: 44px;
  padding: 8px 10px;
  border-radius: 999px;
  border: 1px solid var(--line);
  background: var(--surface-strong);
  color: var(--muted);
  text-decoration: none;
  font-size: 13px;
  font-weight: 700;
}

.locale-link.is-active {
  background: var(--accent);
  color: #fff;
  border-color: var(--accent);
}

.breadcrumb {
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  gap: 8px;
  margin: 0 0 16px;
  color: var(--muted);
  font-size: 14px;
}

.breadcrumb a {
  color: var(--muted);
  text-decoration: none;
}

.breadcrumb a:hover {
  text-decoration: underline;
}

.breadcrumb-separator {
  color: #9b8f82;
}

.eyebrow,
.rank {
  margin: 0 0 10px;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  font-size: 12px;
  color: var(--muted);
}

h1,
h2,
h3 {
  margin: 0 0 12px;
  line-height: 1.1;
}

h1 {
  font-size: clamp(34px, 5vw, 50px);
}

h2 {
  font-size: clamp(24px, 3vw, 34px);
}

h3 {
  font-size: 18px;
}

.hero-text,
.card-text,
.city-summary,
.notes li,
.stat-card p,
.score-row span,
.tag-list li {
  color: var(--muted);
  line-height: 1.6;
}

.grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(260px, 1fr));
  gap: 20px;
}

.table-section {
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: 24px;
  padding: 18px;
  box-shadow: var(--shadow);
}

.table-wrap {
  overflow-x: auto;
}

.table-controls {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
  gap: 14px;
  margin-bottom: 18px;
}

.slider-group {
  background: rgba(11, 110, 79, 0.05);
  border: 1px solid var(--line);
  border-radius: 18px;
  padding: 14px 14px 12px;
}

.slider-label {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  gap: 10px;
  font-size: 14px;
  font-weight: 700;
  margin-bottom: 10px;
}

.table-slider {
  width: 100%;
  accent-color: var(--accent);
}

.slider-pair {
  display: grid;
  gap: 8px;
}

.table-filter-input {
  width: 100%;
  border: 1px solid var(--line);
  background: var(--surface-strong);
  color: var(--text);
  border-radius: 12px;
  padding: 10px 12px;
  font: inherit;
  outline: none;
  font-weight: 400;
}

.table-filter-input:focus {
  border-color: rgba(11, 110, 79, 0.5);
  box-shadow: 0 0 0 4px rgba(11, 110, 79, 0.08);
}

.th-stack {
  display: grid;
  gap: 10px;
}

.pagination {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  margin-top: 18px;
  justify-content: center;
}

.pagination-link {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-width: 42px;
  padding: 10px 14px;
  border-radius: 999px;
  border: 1px solid var(--line);
  background: var(--surface-strong);
  color: var(--text);
  font-weight: 700;
  text-decoration: none;
  box-shadow: var(--shadow);
}

.pagination-link:hover {
  text-decoration: none;
  border-color: rgba(11, 110, 79, 0.4);
}

.pagination-link.is-active {
  background: var(--accent);
  color: #fff;
  border-color: var(--accent);
}

.pagination-link-nav {
  padding-inline: 16px;
}

.country-table {
  width: 100%;
  border-collapse: collapse;
  min-width: 760px;
}

.country-table th,
.country-table td {
  text-align: left;
  padding: 14px 16px;
  border-bottom: 1px solid var(--line);
  vertical-align: middle;
}

.country-table thead th {
  font-size: 14px;
  text-transform: uppercase;
  letter-spacing: 0.06em;
  color: var(--muted);
  background: rgba(11, 110, 79, 0.05);
  position: sticky;
  top: 0;
  white-space: normal;
  line-height: 1.25;
  min-width: 110px;
  padding-left: 34px;
}

.country-table tbody tr:hover {
  background: rgba(11, 110, 79, 0.04);
}

.country-table tbody td:first-child a {
  font-weight: 700;
}

.country-link {
  display: inline-flex;
  align-items: center;
  gap: 10px;
}

.inline-flag-list {
  display: flex;
  align-items: center;
  gap: 6px;
  flex-wrap: wrap;
  min-width: 96px;
}

.inline-flag {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  font-size: 18px;
  line-height: 1;
  cursor: help;
}

.metric-cell {
  border-radius: 12px;
  background-clip: padding-box;
  font-weight: 700;
}

.is-sortable {
  cursor: pointer;
  user-select: none;
  white-space: normal;
  position: relative;
}

.is-sortable::after {
  content: "↕";
  position: absolute;
  left: 12px;
  top: 14px;
  color: #9b8f82;
}

.is-sortable[data-direction="asc"]::after {
  content: "↑";
  color: var(--accent);
}

.is-sortable[data-direction="desc"]::after {
  content: "↓";
  color: var(--accent);
}

.card,
.notes,
.city-block {
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: 24px;
  padding: 24px;
  box-shadow: var(--shadow);
}

.city-block {
  overflow: hidden;
}

.city-cover {
  margin: -24px -24px 18px;
  border-bottom: 1px solid var(--line);
  background: rgba(11, 110, 79, 0.04);
}

.city-cover img {
  display: block;
  width: 100%;
  height: auto;
  object-fit: cover;
}

.city-cover-list img {
  aspect-ratio: 16 / 8;
  max-height: 260px;
}

.city-cover-detail img {
  aspect-ratio: 16 / 7;
  max-height: 420px;
}

.card-meta {
  display: flex;
  justify-content: space-between;
  gap: 12px;
  margin-top: 18px;
  font-size: 14px;
}

.notes ul {
  margin: 0;
  padding-left: 18px;
}

.legal-notes {
  display: grid;
  gap: 18px;
}

.legal-section h2 {
  margin-bottom: 8px;
}

.legal-section p {
  margin: 0;
  color: var(--muted);
  line-height: 1.7;
}

.cities {
  margin-top: 24px;
}

.city-block + .city-block {
  margin-top: 20px;
}

.city-header {
  display: flex;
  align-items: baseline;
  gap: 14px;
  flex-wrap: wrap;
}

.stats-grid,
.section-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
  gap: 16px;
  margin-top: 20px;
}

.stat-card,
.section-grid section {
  background: var(--surface-strong);
  border: 1px solid var(--line);
  border-radius: 18px;
  padding: 18px;
}

.score-list {
  display: grid;
  gap: 10px;
}

.score-row {
  display: flex;
  justify-content: space-between;
  gap: 12px;
  border-bottom: 1px solid var(--line);
  padding-bottom: 8px;
  padding-top: 8px;
  padding-inline: 10px;
  border-radius: 12px;
}

.score-row:last-child {
  border-bottom: 0;
  padding-bottom: 0;
}

.tag-list {
  list-style: none;
  padding: 0;
  margin: 0;
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
}

.tag-list li {
  background: var(--accent-soft);
  color: #124b3a;
  border-radius: 999px;
  padding: 8px 12px;
  font-size: 14px;
  line-height: 1.3;
}

.flag-list,
.compare-list {
  list-style: none;
  padding: 0;
  margin: 0;
  display: grid;
  gap: 10px;
}

.flag-list li,
.compare-list li {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 10px 12px;
  border-radius: 14px;
  background: var(--surface-strong);
  border: 1px solid var(--line);
  color: var(--muted);
}

.flag {
  font-size: 18px;
  line-height: 1;
}

.compare-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
  gap: 16px;
  margin-top: 16px;
}

.compare-card {
  border-radius: 18px;
  padding: 18px;
  border: 1px solid var(--line);
}

.compare-card-pro {
  background: linear-gradient(180deg, #eefaf2 0%, #ffffff 100%);
}

.compare-card-con {
  background: linear-gradient(180deg, #fff1ef 0%, #ffffff 100%);
}

.compare-symbol {
  width: 24px;
  height: 24px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  border-radius: 999px;
  font-weight: 700;
  flex: 0 0 24px;
}

.compare-card-pro .compare-symbol {
  background: #d9f5e5;
  color: #0b6e4f;
}

.compare-card-con .compare-symbol {
  background: #ffdeda;
  color: #a02f1d;
}

.score-9,
.score-8 {
  background: linear-gradient(90deg, rgba(42, 157, 87, 0.14), rgba(42, 157, 87, 0.04));
}

.score-7,
.score-6 {
  background: linear-gradient(90deg, rgba(132, 199, 88, 0.16), rgba(132, 199, 88, 0.05));
}

.score-5 {
  background: linear-gradient(90deg, rgba(238, 196, 71, 0.18), rgba(238, 196, 71, 0.05));
}

.score-4,
.score-3 {
  background: linear-gradient(90deg, rgba(244, 162, 97, 0.18), rgba(244, 162, 97, 0.05));
}

.score-2,
.score-1 {
  background: linear-gradient(90deg, rgba(230, 57, 70, 0.18), rgba(230, 57, 70, 0.05));
}

.sea-very-close,
.sea-close {
  background: linear-gradient(135deg, rgba(54, 162, 235, 0.18), rgba(54, 162, 235, 0.05));
}

.sea-medium {
  background: linear-gradient(135deg, rgba(110, 193, 228, 0.16), rgba(110, 193, 228, 0.05));
}

.sea-far {
  background: linear-gradient(135deg, rgba(255, 196, 112, 0.15), rgba(255, 196, 112, 0.05));
}

.sea-inland {
  background: linear-gradient(135deg, rgba(201, 173, 255, 0.14), rgba(201, 173, 255, 0.05));
}

.temp-hot {
  background: linear-gradient(135deg, rgba(231, 111, 81, 0.2), rgba(255, 201, 138, 0.08));
}

.temp-warm {
  background: linear-gradient(135deg, rgba(244, 162, 97, 0.18), rgba(255, 227, 166, 0.08));
}

.temp-mild {
  background: linear-gradient(135deg, rgba(114, 182, 246, 0.16), rgba(196, 232, 255, 0.08));
}

.temp-cool {
  background: linear-gradient(135deg, rgba(69, 123, 157, 0.18), rgba(192, 224, 255, 0.08));
}

.back-link {
  display: inline-block;
  margin-top: 12px;
  font-weight: 700;
}

.cookie-banner {
  position: fixed;
  left: 16px;
  right: 16px;
  bottom: 16px;
  z-index: 40;
}

.cookie-banner-inner {
  max-width: 980px;
  margin: 0 auto;
  padding: 18px 20px;
  border-radius: 20px;
  border: 1px solid var(--line);
  background: rgba(255, 250, 242, 0.96);
  box-shadow: 0 20px 48px rgba(29, 26, 22, 0.18);
  backdrop-filter: blur(10px);
}

.cookie-banner p {
  margin: 0;
  color: var(--text);
  line-height: 1.6;
}

.cookie-banner-actions {
  display: flex;
  align-items: center;
  gap: 10px;
  flex-wrap: wrap;
  margin-top: 14px;
}

.cookie-button {
  appearance: none;
  border: 1px solid var(--line);
  border-radius: 999px;
  padding: 10px 14px;
  font: inherit;
  font-weight: 700;
  cursor: pointer;
}

.cookie-button-primary {
  background: var(--accent);
  color: #fff;
  border-color: var(--accent);
}

.cookie-button-secondary {
  background: var(--surface-strong);
  color: var(--text);
}

.cookie-link {
  color: var(--accent);
  font-weight: 700;
}

@media (max-width: 720px) {
  .layout {
    padding: 16px 14px 40px;
  }

  .hero,
  .card,
  .notes,
  .city-block {
    padding: 20px;
    border-radius: 20px;
  }

  .site-header {
    flex-direction: column;
    align-items: flex-start;
  }

  .card-meta,
  .city-header {
    flex-direction: column;
    align-items: flex-start;
  }

  .cookie-banner {
    left: 12px;
    right: 12px;
    bottom: 12px;
  }

  .cookie-banner-inner {
    padding: 16px;
    border-radius: 18px;
  }
}