/* ── Crimson Desert DB — Design System ── */
/* Crimson-themed dark design: earthy/crimson tones matching the game's aesthetic */

:root {
  --bg: #1a1210;
  --surface: #241a16;
  --border: rgba(196, 96, 64, 0.15);
  --border-strong: rgba(196, 96, 64, 0.4);
  --border-hover: rgba(196, 96, 64, 0.7);
  --text: #ffffff;
  --text2: #b8a89a;
  --text3: #8a7c70;
  --muted-bg: #2c2018;
  --accent: #c46040;
  --accent-l: rgba(196, 96, 64, 0.1);
  --accent-d: #d88468;
  --gold: #d4a644;
  --gold-l: rgba(212, 166, 68, 0.1);
  --blue: #4a90d9;
  --blue-l: rgba(74, 144, 217, 0.1);
  --red: #e05550;
  --red-l: rgba(224, 85, 80, 0.1);
  --green: #5a9e6f;
  --green-l: rgba(90, 158, 111, 0.1);
  --purple: #9b6bae;
  --purple-l: rgba(155, 107, 174, 0.1);
  --nav-bg: #1e1610;
  --footer-bg: #120c08;
  --footer-text: #8a7c70;
  --footer-link: #c46040;
  --topbar-bg: #120c08;
  --topbar-text: #b8a89a;
  --radius: 12px;
  --radius-sm: 8px;
  --max-width: 1200px;
}

/* ── Reset & Base ── */
*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }

html {
  font-size: 16px;
  scroll-behavior: smooth;
  -webkit-text-size-adjust: 100%;
}

body {
  font-family: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
  background: var(--bg);
  color: var(--text);
  line-height: 1.6;
  min-height: 100vh;
}

a { color: var(--accent-d); text-decoration: none; transition: color .15s; }
a:hover { color: var(--accent); }

img { max-width: 100%; height: auto; display: block; }

/* ── Top Bar ── */
.top-bar {
  background: var(--topbar-bg);
  color: var(--topbar-text);
  text-align: center;
  padding: 6px 16px;
  font-size: 13px;
  border-bottom: 1px solid var(--border);
}

/* ── Navigation ── */
nav {
  background: var(--nav-bg);
  border-bottom: 1px solid var(--border);
  position: sticky;
  top: 0;
  z-index: 100;
  backdrop-filter: blur(8px);
}

.nav-inner {
  max-width: var(--max-width);
  margin: 0 auto;
  display: flex;
  align-items: center;
  gap: 4px;
  padding: 0 16px;
  height: 52px;
  overflow: visible;
}

.nav-inner::-webkit-scrollbar { height: 0; }

.logo {
  display: flex;
  align-items: center;
  gap: 6px;
  font-size: 18px;
  font-weight: 700;
  color: var(--text) !important;
  white-space: nowrap;
  margin-right: 8px;
  flex-shrink: 0;
}

.logo-icon {
  width: 28px;
  height: 28px;
  background: var(--accent);
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 14px;
}

.logo span { color: var(--accent); }

.nav-link {
  display: inline-flex;
  align-items: center;
  padding: 6px 12px;
  border-radius: var(--radius-sm);
  font-size: 14px;
  font-weight: 500;
  color: var(--text2) !important;
  white-space: nowrap;
  transition: color .15s, background .15s;
  flex-shrink: 0;
}

.nav-link:hover { color: var(--text) !important; background: var(--accent-l); }
.nav-link.active { color: var(--accent-d) !important; background: var(--accent-l); }

.nav-dropdown {
  position: relative;
  flex-shrink: 0;
}

.nav-dropdown-toggle {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  padding: 6px 12px;
  border-radius: var(--radius-sm);
  font-size: 14px;
  font-weight: 500;
  color: var(--text2) !important;
  white-space: nowrap;
  cursor: pointer;
  background: none;
  border: none;
  font-family: inherit;
}

.nav-dropdown-toggle:hover { color: var(--text) !important; background: var(--accent-l); }

.nav-dropdown-toggle::after {
  content: '';
  display: inline-block;
  width: 0;
  height: 0;
  border-left: 4px solid transparent;
  border-right: 4px solid transparent;
  border-top: 4px solid var(--text3);
  margin-left: 2px;
}

.nav-dropdown-menu {
  display: none;
  position: absolute;
  top: 100%;
  left: 0;
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
  padding: 6px 0;
  min-width: 160px;
  z-index: 200;
  box-shadow: 0 8px 24px rgba(0,0,0,0.4);
}

.nav-dropdown:hover .nav-dropdown-menu,
.nav-dropdown:focus-within .nav-dropdown-menu { display: block; }

.nav-dropdown-menu a {
  display: block;
  padding: 8px 16px;
  font-size: 14px;
  color: var(--text2) !important;
  white-space: nowrap;
  transition: color .15s, background .15s;
}

.nav-dropdown-menu a:hover { color: var(--text) !important; background: var(--accent-l); }

/* ── Page wrapper ── */
.page { max-width: var(--max-width); margin: 0 auto; padding: 0 16px 40px; }

/* ── Hero ── */
.hero {
  text-align: center;
  padding: 40px 0 12px;
}

.hero h1 {
  font-size: 32px;
  font-weight: 700;
  margin-bottom: 10px;
  line-height: 1.3;
}

.hero h1 span { color: var(--accent); }

.hero .hero-sub {
  color: var(--text);
  font-size: 16px;
  max-width: 640px;
  margin: 0 auto 24px;
  line-height: 1.7;
}

.hero-search {
  max-width: 560px;
  margin: 0 auto 8px;
  position: relative;
}

.hero-search input {
  width: 100%;
  padding: 14px 48px 14px 20px;
  border: 1px solid var(--border-strong);
  border-radius: var(--radius);
  background: var(--surface);
  color: var(--text);
  font-size: 16px;
  font-family: inherit;
  transition: border-color .2s, box-shadow .2s;
  outline: none;
}

.hero-search input:focus {
  border-color: var(--accent);
  box-shadow: 0 0 0 3px var(--accent-l);
}

.hero-search .search-icon {
  position: absolute;
  right: 14px;
  top: 50%;
  transform: translateY(-50%);
  font-size: 18px;
  color: var(--text3);
  pointer-events: none;
}

.hero-quick {
  display: flex;
  justify-content: center;
  gap: 16px;
  flex-wrap: wrap;
  margin-top: 20px;
}

.hero-quick a {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 4px;
  padding: 18px 32px;
  border-radius: var(--radius);
  border: 1px solid var(--accent);
  background: var(--accent-l);
  text-decoration: none !important;
  transition: background .2s, border-color .2s, transform .2s;
  min-width: 180px;
}

.hero-quick a:hover {
  background: var(--accent);
  border-color: var(--accent-d);
  transform: translateY(-2px);
}

.hero-quick .hq-icon { font-size: 28px; line-height: 1; }
.hero-quick .hq-label { font-size: 16px; font-weight: 700; color: #fff; }
.hero-quick .hq-sub { font-size: 12px; color: var(--accent-d); font-weight: 500; }
.hero-quick a:hover .hq-sub { color: rgba(255,255,255,0.8); }

@media (max-width: 600px) {
  .hero-quick a { min-width: 140px; padding: 14px 20px; }
  .hero-quick .hq-label { font-size: 14px; }
}

/* ── Hub Grid (3x3 cards) ── */
.hub-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 16px;
  margin: 32px 0;
}

@media (max-width: 768px) { .hub-grid { grid-template-columns: repeat(2, 1fr); } }
@media (max-width: 480px) { .hub-grid { grid-template-columns: 1fr; } }

.hub-card {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 10px;
  padding: 32px 16px;
  background: var(--surface);
  border: 1px solid var(--border-strong);
  border-radius: var(--radius);
  text-decoration: none !important;
  transition: transform .25s ease, border-color .25s ease, box-shadow .25s ease;
  position: relative;
  overflow: hidden;
}

.hub-card:hover {
  transform: translateY(-2px);
  border-color: var(--border-hover);
  box-shadow: 0 4px 20px rgba(0,0,0,0.3);
}

.hub-card.featured { border-color: var(--accent); }

.hub-card .card-icon {
  font-size: 36px;
  width: 56px;
  height: 56px;
  background: var(--accent-l);
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
}

.hub-card .card-label {
  font-size: 15px;
  font-weight: 600;
  color: var(--text);
}

.hub-card .card-count {
  font-size: 15px;
  color: var(--text);
}

/* ── Ad placeholder ── */
.ad-box {
  display: flex;
  align-items: center;
  justify-content: center;
  min-height: 90px;
  background: var(--surface);
  border: 1px dashed var(--border);
  border-radius: var(--radius-sm);
  margin: 24px 0;
  color: var(--text3);
  font-size: 13px;
}

.ad-leaderboard { min-height: 90px; }
.ad-banner { min-height: 90px; }
.ad-rectangle { min-height: 280px; width: 336px; max-width: 100%; margin-left: auto; margin-right: auto; }

/* ── Filter bar ── */
.filter-chips {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin-bottom: 12px;
}

.chip {
  padding: 7px 16px;
  border: 1px solid var(--border);
  border-radius: 20px;
  font-size: 14px;
  font-weight: 500;
  cursor: pointer;
  background: var(--surface);
  color: var(--text2);
  font-family: inherit;
  transition: all .15s;
}

.chip:hover { border-color: var(--accent); color: var(--accent-d); }
.chip.active { background: var(--accent); color: #fff; border-color: var(--accent); }

.filter-bar {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  align-items: center;
  margin-bottom: 16px;
}

.filter-bar input[type="text"] {
  flex: 1;
  min-width: 200px;
  padding: 11px 15px;
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
  background: var(--surface);
  color: var(--text);
  font-size: 16px;
  font-family: inherit;
  outline: none;
  transition: border-color .2s;
}

.filter-bar input[type="text"]:focus { border-color: var(--accent); }

.filter-bar select {
  padding: 11px 32px 11px 14px;
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
  background: var(--surface);
  color: var(--text);
  font-size: 16px;
  font-family: inherit;
  outline: none;
  cursor: pointer;
  appearance: none;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='12' viewBox='0 0 12 12'%3E%3Cpath fill='%238a7c70' d='M6 8L1 3h10z'/%3E%3C/svg%3E");
  background-repeat: no-repeat;
  background-position: right 10px center;
}

.result-count {
  font-size: 15px;
  color: var(--text);
  white-space: nowrap;
}

/* ── Card Grid (for database listing pages) ── */
.card-grid {
  display: grid;
  grid-template-columns: repeat(5, 1fr);
  gap: 14px;
  margin-bottom: 24px;
}

@media (max-width: 1000px) { .card-grid { grid-template-columns: repeat(4, 1fr); } }
@media (max-width: 768px)  { .card-grid { grid-template-columns: repeat(3, 1fr); } }
@media (max-width: 480px)  { .card-grid { grid-template-columns: repeat(2, 1fr); } }

.item-card {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 8px;
  padding: 24px 16px;
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  text-decoration: none !important;
  transition: transform .25s ease, border-color .25s ease;
  position: relative;
}

.item-card:hover {
  transform: translateY(-2px);
  border-color: var(--border-hover);
}

.item-card .item-rarity {
  position: absolute;
  top: 10px;
  left: 10px;
  font-size: 14px;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: .04em;
  padding: 4px 12px;
  border-radius: 10px;
}

/* Rarity colors */
.r-common    { background: var(--muted-bg); color: var(--text); }
.r-uncommon  { background: var(--green-l); color: var(--green); }
.r-rare      { background: var(--blue-l); color: var(--blue); }
.r-epic      { background: var(--purple-l); color: var(--purple); }
.r-legendary { background: var(--gold-l); color: var(--gold); }

.item-card .item-img {
  width: 80px;
  height: 80px;
  background: var(--muted-bg);
  border-radius: var(--radius-sm);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 36px;
  margin-top: 12px;
}

.item-card .item-img img {
  width: 64px;
  height: 64px;
  object-fit: contain;
}

.item-card .item-name {
  font-size: 16px;
  font-weight: 600;
  color: var(--text);
  text-align: center;
  line-height: 1.3;
}

.item-card .item-meta {
  font-size: 14px;
  color: var(--text);
  text-align: center;
}

/* ── Table view ── */
.data-table-wrap {
  overflow-x: auto;
  margin-bottom: 24px;
}

.data-table {
  width: 100%;
  border-collapse: collapse;
  font-size: 15px;
}

.data-table th {
  text-align: left;
  padding: 10px 12px;
  border-bottom: 2px solid var(--border);
  color: var(--text);
  font-weight: 600;
  font-size: 14px;
  white-space: nowrap;
  cursor: pointer;
  user-select: none;
}

.data-table th:hover { color: var(--accent-d); }

.data-table th .sort-arrow {
  margin-left: 4px;
  font-size: 14px;
  opacity: 0.4;
}

.data-table th.sorted .sort-arrow { opacity: 1; }

.data-table td {
  padding: 10px 12px;
  border-bottom: 1px solid var(--border);
  color: var(--text);
  white-space: nowrap;
}

.data-table tr:hover td { background: var(--accent-l); }

.data-table .td-name a { color: var(--accent-d) !important; font-weight: 500; }
.data-table .td-name a:hover { color: var(--accent) !important; }

/* View toggle */
.view-toggle {
  display: flex;
  gap: 0;
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
  overflow: hidden;
}

.view-toggle button {
  padding: 9px 14px;
  border: none;
  background: var(--surface);
  color: var(--text);
  cursor: pointer;
  font-size: 15px;
  font-family: inherit;
  transition: background .15s, color .15s;
}

.view-toggle button:hover { background: var(--muted-bg); color: var(--text2); }
.view-toggle button.active { background: var(--accent); color: #fff; }

/* ── Detail page ── */
.detail-hero {
  padding: 24px 0 0;
  margin-bottom: 16px;
}

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

.breadcrumb a { color: var(--text); }
.breadcrumb a:hover { color: var(--accent-d); }
.breadcrumb .sep { color: var(--text3); }

.detail-header {
  display: flex;
  align-items: flex-start;
  gap: 24px;
  flex-wrap: wrap;
}

.detail-icon {
  width: 80px;
  height: 80px;
  background: var(--muted-bg);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 40px;
  flex-shrink: 0;
}

.detail-icon img {
  width: 64px;
  height: 64px;
  object-fit: contain;
}

.detail-title-block { flex: 1; min-width: 240px; }

.detail-title-block h1 {
  font-size: 26px;
  font-weight: 700;
  margin-bottom: 4px;
}

.detail-title-block h1 .rarity-badge {
  display: inline-block;
  font-size: 16px;
  font-weight: 600;
  text-transform: uppercase;
  padding: 3px 12px;
  border-radius: 10px;
  margin-left: 10px;
  vertical-align: middle;
}

.detail-title-block .detail-sub {
  font-size: 15px;
  color: var(--text);
  margin-bottom: 8px;
}

.detail-tags {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
  margin-top: 8px;
}

.tag {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  padding: 3px 10px;
  border-radius: 12px;
  font-size: 14px;
  font-weight: 500;
  background: var(--muted-bg);
  color: var(--text);
  border: 1px solid var(--border);
}

/* ── Stats panel ── */
.stats-panel {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(140px, 1fr));
  gap: 12px;
  margin: 24px 0;
}

.stat-box {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
  padding: 14px 16px;
  text-align: center;
}

.stat-box .stat-value {
  font-size: 26px;
  font-weight: 700;
  color: var(--accent-d);
}

.stat-box .stat-label {
  font-size: 14px;
  color: var(--text);
  text-transform: uppercase;
  letter-spacing: .04em;
  margin-top: 4px;
}

/* ── Info sections ── */
.info-section {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 20px;
  margin-bottom: 20px;
}

.info-section h2 {
  font-size: 20px;
  font-weight: 600;
  margin-bottom: 12px;
  color: var(--text);
  padding-bottom: 10px;
  border-bottom: 1px solid var(--border);
}

.info-section p { color: var(--text); font-size: 16px; line-height: 1.7; }

.info-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(200px, 1fr));
  gap: 8px;
}

.info-row {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 6px 0;
  border-bottom: 1px solid var(--border);
  font-size: 15px;
}

.info-row:last-child { border-bottom: none; }
.info-row .info-label { color: var(--text); }
.info-row .info-value { color: var(--text); font-weight: 500; }

/* ── Materials list ── */
.material-list {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}

.material-item {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 6px 12px;
  background: var(--muted-bg);
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
  font-size: 13px;
  color: var(--text2);
}

.material-item .mat-qty { color: var(--accent-d); font-weight: 600; }

/* ── Character restriction badges ── */
.char-badge {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  padding: 4px 12px;
  border-radius: 12px;
  font-size: 15px;
  font-weight: 500;
  background: var(--accent-l);
  color: var(--accent-d);
}

/* ── Section links ── */
.section-links {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(240px, 1fr));
  gap: 12px;
  margin: 16px 0 24px;
}

.section-link {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 14px 16px;
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
  text-decoration: none !important;
  transition: border-color .2s, transform .2s;
}

.section-link:hover { border-color: var(--border-hover); transform: translateX(4px); }

.section-link .sl-icon {
  font-size: 22px;
  width: 36px;
  text-align: center;
}

.section-link .sl-name {
  font-size: 14px;
  font-weight: 500;
  color: var(--text);
}

.section-link .sl-sub {
  font-size: 12px;
  color: var(--text3);
}

/* ── Tool pages ── */
.tool-card {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 24px;
  margin-bottom: 20px;
}

.tool-card h2 {
  font-size: 18px;
  font-weight: 600;
  margin-bottom: 8px;
}

.tool-card p {
  color: var(--text2);
  font-size: 14px;
  margin-bottom: 16px;
  line-height: 1.7;
}

/* Form elements for tools */
.form-group {
  margin-bottom: 14px;
}

.form-group label {
  display: block;
  font-size: 13px;
  font-weight: 600;
  color: var(--text2);
  margin-bottom: 6px;
  text-transform: uppercase;
  letter-spacing: .03em;
}

.form-select {
  width: 100%;
  padding: 10px 14px;
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
  background: var(--muted-bg);
  color: var(--text);
  font-size: 14px;
  font-family: inherit;
  cursor: pointer;
  appearance: none;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='12' viewBox='0 0 12 12'%3E%3Cpath fill='%238a7c70' d='M6 8L1 3h10z'/%3E%3C/svg%3E");
  background-repeat: no-repeat;
  background-position: right 12px center;
}

.btn {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 10px 22px;
  border-radius: var(--radius-sm);
  font-size: 14px;
  font-weight: 600;
  cursor: pointer;
  border: none;
  color: #fff;
  font-family: inherit;
  transition: opacity .15s, transform .15s;
}

.btn:hover { opacity: .9; transform: translateY(-1px); }
.btn:active { transform: translateY(0); }

.btn-primary { background: var(--accent); }
.btn-secondary { background: var(--muted-bg); color: var(--text2); border: 1px solid var(--border); }
.btn-blue { background: var(--blue); }

/* ── Equipment Compare ── */
.compare-table {
  width: 100%;
  border-collapse: collapse;
  font-size: 14px;
}

.compare-table th,
.compare-table td {
  padding: 10px 14px;
  border: 1px solid var(--border);
  text-align: center;
}

.compare-table th {
  background: var(--surface);
  color: var(--text2);
  font-weight: 600;
  font-size: 13px;
}

.compare-table .stat-better { color: var(--green); font-weight: 600; }
.compare-table .stat-worse { color: var(--red); }

/* ── Tool total stats ── */
.totals-panel {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(120px, 1fr));
  gap: 10px;
  margin: 16px 0;
}

.total-stat {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
  padding: 12px;
  text-align: center;
}

.total-stat .ts-val {
  font-size: 22px;
  font-weight: 700;
  color: var(--accent-d);
}

.total-stat .ts-label {
  font-size: 10px;
  color: var(--text3);
  text-transform: uppercase;
  letter-spacing: .04em;
  margin-top: 2px;
}

/* ── Coming Soon placeholder ── */
.coming-soon {
  text-align: center;
  padding: 60px 20px;
  color: var(--text3);
}

.coming-soon .cs-icon { font-size: 48px; margin-bottom: 12px; }
.coming-soon h2 { font-size: 20px; color: var(--text2); margin-bottom: 8px; }

/* ── Footer ── */
footer {
  background: var(--footer-bg);
  border-top: 1px solid var(--border);
  padding: 40px 16px 24px;
  margin-top: 40px;
}

.footer-inner {
  max-width: var(--max-width);
  margin: 0 auto;
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(160px, 1fr));
  gap: 24px;
}

.footer-col h4 {
  font-size: 14px;
  font-weight: 600;
  color: var(--text);
  margin-bottom: 10px;
}

.footer-col a {
  display: block;
  font-size: 13px;
  color: var(--footer-text);
  padding: 3px 0;
  transition: color .15s;
}

.footer-col a:hover { color: var(--footer-link); }

.footer-bottom {
  max-width: var(--max-width);
  margin: 24px auto 0;
  padding-top: 16px;
  border-top: 1px solid var(--border);
  text-align: center;
  font-size: 12px;
  color: var(--footer-text);
}

.footer-bottom a { color: var(--footer-link); }

/* ── Cookie Consent Banner ── */
.cookie-banner {
  position: fixed;
  bottom: 0;
  left: 0;
  right: 0;
  background: var(--surface);
  border-top: 1px solid var(--border);
  padding: 16px;
  z-index: 9999;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 16px;
  flex-wrap: wrap;
  font-size: 14px;
  color: var(--text2);
}

.cookie-banner.hidden { display: none; }

.cookie-banner a { color: var(--accent-d); text-decoration: underline; }

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

.text-center { text-align: center; }
.mt-16 { margin-top: 16px; }
.mb-16 { margin-bottom: 16px; }
.mt-24 { margin-top: 24px; }
.mb-24 { margin-bottom: 24px; }

/* ── "Suggest Edit" link ── */
.suggest-edit {
  text-align: right;
  font-size: 14px;
  color: var(--text);
  margin-top: 12px;
}

.suggest-edit a { color: var(--text3); }
.suggest-edit a:hover { color: var(--accent-d); }

/* ── Region Cards (Homepage) ── */
.region-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(220px, 1fr));
  gap: 16px;
  margin: 16px 0 32px;
}

.region-card {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 24px 20px;
  transition: border-color .25s, transform .25s;
}

.region-card:hover {
  border-color: var(--border-hover);
  transform: translateY(-2px);
}

.region-card .rc-header {
  display: flex;
  align-items: center;
  gap: 10px;
  margin-bottom: 10px;
}

.region-card .rc-icon {
  font-size: 34px;
  width: 52px;
  height: 52px;
  background: var(--accent-l);
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
}

.region-card .rc-name {
  font-size: 20px;
  font-weight: 700;
  color: var(--text);
}

.region-card .rc-level {
  display: inline-block;
  font-size: 16px;
  font-weight: 600;
  padding: 4px 14px;
  border-radius: 10px;
  background: var(--gold-l);
  color: var(--gold);
  margin-left: auto;
  white-space: nowrap;
}

.region-card .rc-desc {
  font-size: 15px;
  color: var(--text);
  line-height: 1.65;
  margin-bottom: 14px;
}

.region-card .rc-meta {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}

.region-card .rc-tag {
  font-size: 14px;
  padding: 5px 12px;
  border-radius: 10px;
  background: var(--muted-bg);
  color: var(--text);
  border: 1px solid var(--border);
}

.region-card .rc-tag strong { color: var(--accent-d); }

/* ── System Cards (Homepage) ── */
.system-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(260px, 1fr));
  gap: 16px;
  margin: 16px 0 32px;
}

.system-card {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 24px;
  transition: border-color .25s, transform .25s;
}

.system-card:hover {
  border-color: var(--border-hover);
  transform: translateY(-2px);
}

.system-card .sc-icon {
  font-size: 38px;
  width: 60px;
  height: 60px;
  border-radius: var(--radius-sm);
  display: flex;
  align-items: center;
  justify-content: center;
  margin-bottom: 14px;
}

.system-card .sc-name {
  font-size: 20px;
  font-weight: 700;
  color: var(--text);
  margin-bottom: 8px;
}

.system-card .sc-desc {
  font-size: 17px;
  color: var(--text);
  line-height: 1.65;
  margin-bottom: 16px;
}

.system-card .sc-points {
  display: flex;
  flex-direction: column;
  gap: 9px;
}

.system-card .sc-point {
  font-size: 15px;
  color: var(--text);
  padding-left: 18px;
  position: relative;
  line-height: 1.8;
}

.system-card .sc-point::before {
  content: '';
  position: absolute;
  left: 0;
  top: 9px;
  width: 6px;
  height: 6px;
  border-radius: 50%;
  background: var(--accent);
}

.system-card .sc-link {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  margin-top: 14px;
  font-size: 16px;
  font-weight: 600;
  color: var(--accent-d);
}

.system-card .sc-link:hover { color: var(--accent); }

/* ── Section heading ── */
.section-heading {
  text-align: center;
  margin-bottom: 4px;
}

.section-heading h2 {
  font-size: 24px;
  font-weight: 700;
  color: var(--text);
}

.section-heading p {
  color: var(--text);
  font-size: 17px;
  margin-top: 4px;
}

/* ── FAQ Section (Homepage) ── */
.faq-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(340px, 1fr));
  gap: 16px;
  margin: 16px 0 32px;
}

.faq-item {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
  padding: 20px 24px;
  transition: border-color .2s;
}

.faq-item:hover { border-color: var(--border-hover); }

.faq-item .faq-q {
  font-size: 15px;
  font-weight: 600;
  color: var(--text);
  margin-bottom: 10px;
  display: flex;
  align-items: flex-start;
  gap: 10px;
  line-height: 1.7;
}

.faq-item .faq-q .faq-icon {
  color: var(--accent);
  flex-shrink: 0;
  font-weight: 700;
}

.faq-item .faq-a {
  font-size: 14px;
  color: var(--text);
  line-height: 1.8;
  padding-left: 24px;
}

.faq-item .faq-a a { color: var(--accent-d); font-weight: 500; }
.faq-item .faq-a a:hover { color: var(--accent); }

@media (max-width: 600px) {
  .faq-grid { grid-template-columns: 1fr; }
}

/* ── Download Cards (Homepage) ── */
.download-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(260px, 1fr));
  gap: 16px;
  margin: 16px 0 32px;
}

.dl-card {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 24px;
  transition: border-color .25s, transform .25s;
}

.dl-card:hover {
  border-color: var(--border-hover);
  transform: translateY(-2px);
}

.dl-card .dl-icon {
  font-size: 36px;
  width: 56px;
  height: 56px;
  border-radius: var(--radius-sm);
  display: flex;
  align-items: center;
  justify-content: center;
  margin-bottom: 14px;
}

.dl-card .dl-name {
  font-size: 18px;
  font-weight: 700;
  color: var(--text);
  margin-bottom: 6px;
}

.dl-card .dl-desc {
  font-size: 14px;
  color: var(--text);
  line-height: 1.65;
  margin-bottom: 10px;
}

.dl-card .dl-meta {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
}

.dl-card .dl-tag {
  font-size: 12px;
  padding: 4px 10px;
  border-radius: 8px;
  font-weight: 500;
  color: var(--text);
  border: 1px solid var(--border);
}

.dl-card .dl-tag.green { background: var(--green-l); border-color: var(--green); color: var(--green); }
.dl-card .dl-tag.blue  { background: var(--blue-l);  border-color: var(--blue);  color: var(--blue); }
.dl-card .dl-tag.gold  { background: var(--gold-l);  border-color: var(--gold);  color: var(--gold); }

@media (max-width: 600px) {
  .download-grid { grid-template-columns: 1fr; }
}

/* ── Responsive tweaks ── */
@media (max-width: 600px) {
  .hero h1 { font-size: 24px; }
  .hero .hero-sub { font-size: 14px; }
  .stats-panel { grid-template-columns: repeat(2, 1fr); }
  .nav-inner { gap: 2px; padding: 0 8px; }
  .nav-link { padding: 6px 8px; font-size: 13px; }
  .region-grid { grid-template-columns: 1fr; }
  .system-grid { grid-template-columns: 1fr; }
}
