/* =====================================================
   Country & Global Reference — Phase 6 UI
   Extends ExploreCalcTools tokens; no new framework.
   ===================================================== */

.country-ref-page {
  padding-block: 0.25rem 1.5rem;
}
.country-ref-page .container {
  overflow-wrap: anywhere;
}
.country-ref-narrow {
  max-width: 840px;
}

/* —— Typography / hero —— */
.country-ref-kicker {
  margin: 0 0 0.45rem;
  font-size: 0.78rem;
  font-weight: 700;
  letter-spacing: 0.04em;
  text-transform: uppercase;
  color: var(--text-muted);
}
.country-ref-kicker a {
  color: var(--primary);
  text-decoration: none;
}
.country-ref-kicker a:hover,
.country-ref-kicker a:focus-visible {
  text-decoration: underline;
  outline: none;
}
.country-ref-hero,
.country-ref-tool-hero {
  margin: 0 0 1.35rem;
}
.country-ref-hero-grid {
  display: grid;
  grid-template-columns: minmax(0, 1.35fr) minmax(220px, 0.85fr);
  gap: 1.15rem;
  align-items: start;
}
.country-ref-identity {
  display: flex;
  gap: 0.85rem;
  align-items: flex-start;
  min-width: 0;
}
.country-ref-flag,
.country-ref-flag-lg {
  flex-shrink: 0;
  font-size: 2.5rem;
  line-height: 1;
  margin: 0;
}
.country-ref-flag-lg { font-size: 2.75rem; }
.country-ref-hero h1,
.country-ref-tool-hero h1 {
  margin: 0 0 0.4rem;
  font-family: var(--font-display);
  font-size: clamp(1.45rem, 2.4vw, 1.85rem);
  line-height: 1.25;
  overflow-wrap: anywhere;
}
.country-ref-hero .lead,
.country-ref-tool-hero .lead {
  margin: 0 0 0.95rem;
  max-width: 42rem;
  color: var(--text-muted);
  font-size: 0.98rem;
}
.country-ref-native {
  margin: 0 0 0.65rem;
  font-size: 1.05rem;
  color: var(--text);
  line-height: 1.45;
  overflow-wrap: anywhere;
}
.country-ref-hero-actions,
.country-ref-form-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 0.5rem;
  align-items: center;
}

/* Quick codes card */
.country-ref-chip-card {
  background: var(--card);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  box-shadow: var(--shadow);
  padding: 1rem 1.05rem;
}
.country-ref-chip-label {
  margin: 0 0 0.55rem;
  font-size: 0.72rem;
  font-weight: 800;
  letter-spacing: 0.05em;
  text-transform: uppercase;
  color: var(--text-muted);
}
.country-ref-chips {
  list-style: none;
  margin: 0;
  padding: 0;
  display: grid;
  gap: 0.45rem;
}
.country-ref-chips li {
  display: grid;
  grid-template-columns: 4.75rem minmax(0, 1fr) auto;
  gap: 0.4rem;
  align-items: center;
  font-size: 0.9rem;
  min-width: 0;
}
.country-ref-chips span { color: var(--text-muted); }
.country-ref-chips strong {
  font-family: ui-monospace, SFMono-Regular, Menlo, Consolas, monospace;
  font-weight: 700;
  overflow-wrap: anywhere;
}

/* —— Forms —— */
.country-ref-search-form,
.country-ref-postal-form {
  margin: 0 0 1.1rem;
  padding: 1rem 1.05rem;
  background: var(--card);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  box-shadow: var(--shadow);
}
.country-ref-search-form .form-help,
.country-ref-postal-form .form-help,
.country-info-finder .form-help {
  margin: 0.4rem 0 0;
  font-size: 0.82rem;
  color: var(--text-muted);
}
.country-ref-form-error {
  margin: 0.5rem 0 0;
  font-size: 0.88rem;
  color: #B91C1C;
  font-weight: 600;
}
.country-ref-postal-form .form-group {
  margin-bottom: 0.9rem;
}
.country-ref-postal-form label,
.country-ref-search-form .country-info-label,
.country-info-label {
  display: block;
  font-size: 0.8rem;
  font-weight: 700;
  letter-spacing: 0.02em;
  text-transform: uppercase;
  color: var(--text-muted);
  margin: 0 0 0.4rem;
}
.country-ref-postal-form select,
.country-ref-postal-form input[type="text"],
.country-ref-postal-form input[type="search"] {
  width: 100%;
  max-width: 100%;
  padding: 0.7rem 0.8rem;
  border: 1.5px solid var(--border);
  border-radius: var(--radius-sm);
  font: inherit;
  background: #fff;
  color: var(--text);
}
.country-ref-postal-form select:focus-visible,
.country-ref-postal-form input:focus-visible,
.country-info-search:focus-visible,
.country-info-combo-filter:focus-visible,
.country-info-combo-toggle:focus-visible,
.country-ref-copy:focus-visible,
.country-info-az-link:focus-visible,
.country-info-link:focus-visible,
.country-ref-row-link:focus-visible {
  outline: 3px solid rgba(37, 99, 235, 0.35);
  outline-offset: 2px;
  border-color: var(--primary);
}
.country-info-search-wrap {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  background: #fff;
  border: 1.5px solid var(--border);
  border-radius: var(--radius-sm);
  padding: 0.35rem 0.45rem 0.35rem 0.85rem;
  min-width: 0;
}
.country-info-search-wrap:focus-within {
  border-color: var(--primary);
  box-shadow: 0 0 0 3px rgba(37, 99, 235, 0.18);
}
.country-info-search-wrap i { color: var(--text-muted); flex-shrink: 0; }
.country-info-search {
  flex: 1;
  border: 0;
  outline: none;
  background: transparent;
  font: inherit;
  font-size: 1rem;
  color: var(--text);
  min-width: 0;
}
.country-info-search-wrap .btn { flex-shrink: 0; }
.country-ref-status {
  margin: 0 0 0.85rem;
  font-size: 0.9rem;
  color: var(--text-muted);
}
.country-ref-empty {
  margin: 1rem 0;
  padding: 1rem 1.05rem;
  border: 1px dashed var(--border);
  border-radius: var(--radius-sm);
  background: #fff;
  color: var(--text-muted);
  text-align: center;
}
.btn.is-busy,
.btn:disabled {
  opacity: 0.7;
  cursor: wait;
  pointer-events: none;
}

/* —— Profile definition groups —— */
.country-ref-section {
  margin: 0 0 1.25rem;
}
.country-ref-section > h2 {
  margin: 0 0 0.55rem;
  font-size: 1.05rem;
  font-family: var(--font-display);
}
.country-ref-dl {
  display: grid;
  gap: 0;
  margin: 0;
  border: 1px solid var(--border);
  border-radius: var(--radius);
  background: var(--card);
  box-shadow: var(--shadow);
  overflow: hidden;
}
.country-ref-field {
  display: grid;
  grid-template-columns: minmax(132px, 11.5rem) minmax(0, 1fr);
  gap: 0.65rem 1rem;
  padding: 0.8rem 1rem;
  border-bottom: 1px solid var(--border);
  margin: 0;
}
.country-ref-field:last-child { border-bottom: 0; }
.country-ref-field dt {
  margin: 0;
  font-size: 0.8rem;
  font-weight: 700;
  color: var(--text-muted);
}
.country-ref-field dd {
  margin: 0;
  color: var(--text);
  min-width: 0;
  overflow-wrap: anywhere;
}
.country-ref-field.is-empty dd { color: var(--text-muted); }
.country-ref-na {
  display: inline-block;
  padding: 0.1rem 0.4rem;
  border-radius: 0.3rem;
  background: #F1F5F9;
  color: #475569;
  font-size: 0.8rem;
  font-weight: 600;
}
.country-ref-field-note {
  display: block;
  margin-top: 0.3rem;
  font-size: 0.78rem;
  color: var(--text-muted);
  line-height: 1.4;
}
.country-ref-tz-list {
  margin: 0;
  padding-left: 1.1rem;
}
.country-ref-tz-list li {
  margin: 0.2rem 0;
  overflow-wrap: anywhere;
}
.country-ref-tz-list code,
.country-ref-page code {
  font-family: ui-monospace, SFMono-Regular, Menlo, Consolas, monospace;
  font-size: 0.88em;
  word-break: break-all;
}

/* —— Tables —— */
.country-ref-table-wrap {
  overflow-x: auto;
  -webkit-overflow-scrolling: touch;
  margin: 0 0 1.5rem;
  border: 1px solid var(--border);
  border-radius: var(--radius);
  background: var(--card);
  box-shadow: var(--shadow);
}
.country-ref-table {
  width: 100%;
  min-width: 560px;
  border-collapse: collapse;
  font-size: 0.92rem;
}
.country-ref-table th,
.country-ref-table td {
  padding: 0.7rem 0.85rem;
  text-align: left;
  border-bottom: 1px solid var(--border);
  vertical-align: top;
}
.country-ref-table th {
  background: #F8FAFC;
  font-size: 0.72rem;
  text-transform: uppercase;
  letter-spacing: 0.04em;
  color: var(--text-muted);
  position: sticky;
  top: 0;
  z-index: 1;
}
.country-ref-table tr:last-child td { border-bottom: 0; }
.country-ref-row-link {
  text-decoration: none;
  color: inherit;
  font-weight: 600;
  display: inline-flex;
  gap: 0.45rem;
  align-items: center;
  min-width: 0;
  max-width: 100%;
}
.country-ref-row-link:hover,
.country-ref-row-link:focus-visible {
  color: var(--primary);
}
.country-ref-row-link .country-ref-name-text {
  overflow-wrap: anywhere;
}
.country-ref-code-cell {
  display: flex;
  flex-wrap: wrap;
  gap: 0.35rem;
  align-items: center;
  margin-bottom: 0.25rem;
}

/* —— Copy / badges —— */
.country-ref-copy {
  border: 1px solid var(--border);
  background: #fff;
  border-radius: 0.35rem;
  padding: 0.2rem 0.5rem;
  font-size: 0.72rem;
  font-weight: 700;
  cursor: pointer;
  color: var(--primary);
  line-height: 1.2;
}
.country-ref-copy:hover {
  background: var(--primary-light);
  border-color: #93C5FD;
}
.country-ref-copy.is-copied {
  background: #D1FAE5;
  border-color: #6EE7B7;
  color: #065F46;
}
.country-ref-badge {
  display: inline-block;
  padding: 0.12rem 0.4rem;
  border-radius: 0.3rem;
  background: #FEF3C7;
  color: #92400E;
  font-size: 0.65rem;
  font-weight: 800;
  text-transform: uppercase;
  letter-spacing: 0.03em;
}
.country-ref-badge--ok {
  background: #D1FAE5;
  color: #065F46;
}
.country-ref-badge--info {
  background: var(--primary-light);
  color: #1E40AF;
}

/* —— Results —— */
.country-ref-result-card {
  margin: 1rem 0 1.35rem;
  padding: 1.1rem 1.15rem;
  border: 1px solid var(--border);
  border-radius: var(--radius);
  background: var(--card);
  box-shadow: var(--shadow);
}
.country-ref-result-card.is-ok {
  border-color: #6EE7B7;
  background: #ECFDF5;
}
.country-ref-result-card.is-bad {
  border-color: #FCA5A5;
  background: #FEF2F2;
}
.country-ref-result-head {
  display: flex;
  gap: 0.75rem;
  align-items: flex-start;
  min-width: 0;
  margin-bottom: 0.65rem;
}
.country-ref-result-head h2 {
  margin: 0 0 0.25rem;
  font-size: 1.2rem;
  overflow-wrap: anywhere;
}
.country-ref-code-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(148px, 1fr));
  gap: 0.75rem;
  margin: 0.85rem 0 0;
}
.country-ref-code-grid dt {
  margin: 0 0 0.2rem;
  font-size: 0.72rem;
  font-weight: 700;
  color: var(--text-muted);
  text-transform: uppercase;
}
.country-ref-code-grid dd { margin: 0; min-width: 0; overflow-wrap: anywhere; }
.country-ref-verdict {
  font-size: 1.05rem;
  font-weight: 800;
  margin: 0.45rem 0;
}
.country-ref-verdict--ok { color: #047857; }
.country-ref-verdict--bad { color: #B91C1C; }
.country-ref-alert {
  margin: 1rem 0;
  padding: 0.85rem 1rem;
  border-radius: var(--radius-sm);
  background: #FEF3C7;
  border: 1px solid #FCD34D;
  color: #78350F;
}
.country-ref-alert[role="alert"] {
  background: #FEF2F2;
  border-color: #FECACA;
  color: #7F1D1D;
}
.country-ref-explain { margin: 1.35rem 0; }
.country-ref-explain h2 { margin: 0 0 0.45rem; font-size: 1.1rem; }
.country-ref-explain ul {
  margin: 0.45rem 0 0;
  padding-left: 1.2rem;
  color: var(--text-muted);
}
.country-ref-mini-list {
  list-style: none;
  margin: 0;
  padding: 0;
  display: grid;
  gap: 0.4rem;
}
.country-ref-mini-list a {
  text-decoration: none;
  color: inherit;
  display: inline-flex;
  flex-wrap: wrap;
  gap: 0.35rem;
  align-items: baseline;
}
.country-ref-mini-list a:hover,
.country-ref-mini-list a:focus-visible {
  color: var(--primary);
}
.country-ref-examples-label {
  font-size: 0.85rem;
  font-weight: 700;
  margin: 1rem 0 0.35rem;
}
.country-ref-faqs { margin: 1.75rem 0 0; }
.country-ref-faqs h2 { margin: 0 0 0.75rem; font-size: 1.1rem; }
.country-ref-attribution { margin: 1.25rem 0 1.35rem; }
.country-ref-source {
  font-size: 0.85rem;
  color: var(--text-muted);
  margin: 0 0 0.45rem;
  line-height: 1.5;
}
.country-ref-limits {
  margin-top: 0.35rem;
  font-size: 0.86rem;
  color: var(--text-muted);
}
.country-ref-limits summary {
  cursor: pointer;
  font-weight: 700;
  color: var(--primary);
}
.country-ref-limits summary:focus-visible {
  outline: 3px solid rgba(37, 99, 235, 0.35);
  outline-offset: 2px;
}
.country-ref-limits ul {
  margin: 0.4rem 0 0;
  padding-left: 1.15rem;
}
.country-ref-live {
  position: absolute;
  width: 1px;
  height: 1px;
  overflow: hidden;
  clip: rect(0, 0, 0, 0);
}

/* —— Hub finder refinements —— */
.country-info-finder {
  margin: 0 0 1.35rem;
  padding: 1.05rem 1.1rem 0.95rem;
  background: var(--card);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  box-shadow: var(--shadow);
}
.country-info-finder-grid {
  display: grid;
  grid-template-columns: minmax(0, 1.15fr) minmax(0, 1fr);
  gap: 1rem 1.2rem;
  align-items: start;
}
.country-info-combo-toggle {
  width: 100%;
  display: flex;
  align-items: center;
  gap: 0.55rem;
  text-align: left;
  padding: 0.7rem 0.85rem;
  background: #fff;
  border: 1.5px solid var(--border);
  border-radius: var(--radius-sm);
  font: inherit;
  cursor: pointer;
  color: var(--text);
  min-width: 0;
}
.country-info-combo-toggle:hover {
  border-color: #93C5FD;
}
.country-info-combo-panel {
  position: absolute;
  z-index: 40;
  left: 0;
  right: 0;
  top: calc(100% + 0.35rem);
  background: #fff;
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
  box-shadow: var(--shadow-lg);
  padding: 0.5rem;
  max-height: 18rem;
  display: flex;
  flex-direction: column;
  gap: 0.4rem;
}
.country-info-combo-list [role="option"]:hover,
.country-info-combo-list [role="option"].is-active,
.country-info-combo-list [role="option"][aria-selected="true"] {
  background: var(--primary-light);
}
.country-info-az-link:hover,
.country-info-az-link:focus-visible {
  background: var(--primary-light);
  border-color: #93C5FD;
  color: var(--primary-dark);
}
.country-info-link {
  border: 1px solid var(--border);
  background: var(--card);
}
.country-info-link:hover,
.country-info-link:focus-visible {
  border-color: #93C5FD;
  background: #EFF6FF;
}
.country-info-iso {
  background: var(--primary-light);
  color: #1E40AF;
}
.country-info-name {
  overflow-wrap: anywhere;
  white-space: normal;
}

/* RTL-friendly native / mixed scripts */
.country-ref-page [dir="auto"],
.country-ref-native[dir="auto"] {
  unicode-bidi: plaintext;
}

@media (max-width: 900px) {
  .country-ref-hero-grid,
  .country-info-finder-grid {
    grid-template-columns: 1fr;
  }
}
@media (max-width: 640px) {
  .country-ref-field {
    grid-template-columns: 1fr;
    gap: 0.2rem;
  }
  .country-ref-chips li {
    grid-template-columns: 4rem minmax(0, 1fr);
  }
  .country-ref-chips li .country-ref-copy {
    grid-column: 1 / -1;
    justify-self: start;
  }
  .country-info-search-wrap {
    flex-wrap: wrap;
    padding: 0.55rem;
  }
  .country-info-search-wrap .btn {
    width: 100%;
  }
  .country-ref-table {
    min-width: 480px;
  }
}
/* Phase 7 — quality profile extras */
.country-ref-official {
  margin: 0 0 0.35rem;
  font-size: 0.95rem;
  color: var(--text-muted);
}
.country-ref-bullet-list {
  margin: 0;
  padding-left: 1.2rem;
  max-width: 44rem;
}
.country-ref-bullet-list li {
  margin: 0 0 0.45rem;
  line-height: 1.5;
}
.country-ref-related {
  list-style: none;
  margin: 0;
  padding: 0;
  display: grid;
  gap: 0.55rem;
}
.country-ref-related a {
  display: flex;
  flex-direction: column;
  gap: 0.15rem;
  padding: 0.7rem 0.85rem;
  border: 1px solid var(--border, #e2e8f0);
  border-radius: 0.5rem;
  text-decoration: none;
  color: inherit;
  background: var(--surface, #fff);
}
.country-ref-related a:hover,
.country-ref-related a:focus-visible {
  border-color: var(--primary);
  outline: none;
}
.country-ref-related strong {
  color: var(--primary);
  font-size: 0.95rem;
}
.country-ref-related span {
  font-size: 0.85rem;
  color: var(--text-muted);
}
.country-ref-profile-index {
  list-style: none;
  margin: 1rem 0 1.5rem;
  padding: 0;
  display: grid;
  gap: 0.65rem;
}
.country-ref-profile-card {
  display: flex;
  gap: 0.85rem;
  align-items: flex-start;
  padding: 0.85rem 1rem;
  border: 1px solid var(--border, #e2e8f0);
  border-radius: 0.55rem;
  text-decoration: none;
  color: inherit;
  background: var(--surface, #fff);
}
.country-ref-profile-card:hover,
.country-ref-profile-card:focus-visible {
  border-color: var(--primary);
  outline: none;
}
.country-ref-profile-card-flag {
  font-size: 1.75rem;
  line-height: 1;
}
.country-ref-profile-card-body {
  display: flex;
  flex-direction: column;
  gap: 0.2rem;
  min-width: 0;
}
.country-ref-profile-card-body strong {
  font-size: 1.05rem;
}
.country-ref-profile-card-meta {
  font-size: 0.82rem;
  color: var(--text-muted);
}
.country-ref-profile-card-blurb {
  font-size: 0.9rem;
  color: var(--text-muted);
  line-height: 1.45;
}
.country-ref-limitations {
  margin-top: 0.5rem;
}
.country-ref-trust {
  margin: 1.5rem 0 1rem;
  padding: 1rem 1.1rem;
  border: 1px solid var(--border, #e2e8f0);
  border-radius: 0.55rem;
  background: var(--surface, #fff);
  max-width: 52rem;
}
.country-ref-trust h2 {
  margin: 0 0 0.65rem;
  font-size: 1.1rem;
}
.country-ref-trust-sub {
  margin: 1rem 0 0.45rem;
  font-size: 0.95rem;
}
.country-ref-trust-class {
  margin: 0 0 0.75rem;
  line-height: 1.45;
}
.country-ref-trust-dl {
  margin: 0 0 0.75rem;
  display: grid;
  gap: 0.55rem;
}
.country-ref-trust-dl > div {
  display: grid;
  gap: 0.15rem;
}
.country-ref-trust-dl dt {
  font-size: 0.78rem;
  font-weight: 700;
  letter-spacing: 0.02em;
  text-transform: uppercase;
  color: var(--text-muted);
}
.country-ref-trust-dl dd {
  margin: 0;
  line-height: 1.45;
}
.country-ref-trust-attr {
  margin: 0 0 0.5rem;
  font-size: 0.92rem;
  color: var(--text-muted);
}
.country-ref-trust-actions {
  margin: 0.85rem 0 0;
  display: flex;
  flex-wrap: wrap;
  gap: 0.35rem 0.75rem;
  font-size: 0.92rem;
}
.country-ref-trust-actions a {
  color: var(--primary);
}
.country-ref-standard-tag {
  display: inline-block;
  margin-left: 0.35rem;
  padding: 0.05rem 0.35rem;
  font-size: 0.7rem;
  font-weight: 600;
  letter-spacing: 0.02em;
  text-transform: none;
  color: var(--text-muted);
  border: 1px solid var(--border, #e2e8f0);
  border-radius: 0.25rem;
  vertical-align: middle;
}
.country-ref-zero-note {
  display: block;
  margin-top: 0.25rem;
  font-size: 0.82rem;
  color: var(--text-muted);
}
.country-ref-na--na {
  font-style: italic;
}
.country-ref-h1-code {
  display: inline-block;
  margin-left: 0.4rem;
  padding: 0.12rem 0.45rem;
  font-size: 0.72em;
  font-weight: 600;
  vertical-align: middle;
  color: var(--text-muted);
  border: 1px solid var(--border, #e2e8f0);
  border-radius: 0.35rem;
}
.country-ref-key-facts-lead {
  margin: 0 0 0.65rem;
  max-width: 44rem;
  color: var(--text-muted);
  font-size: 0.92rem;
}
.country-ref-distinction-list {
  margin: 0;
  padding: 0;
  max-width: 44rem;
}
.country-ref-distinction {
  margin: 0 0 0.85rem;
  padding-bottom: 0.75rem;
  border-bottom: 1px solid var(--border, #e2e8f0);
}
.country-ref-distinction:last-child {
  border-bottom: 0;
  margin-bottom: 0;
  padding-bottom: 0;
}
.country-ref-distinction dt {
  margin: 0 0 0.25rem;
  font-weight: 700;
  font-size: 0.95rem;
}
.country-ref-distinction dd {
  margin: 0;
  color: var(--text-muted);
  line-height: 1.5;
}
.country-ref-distinction-solo {
  margin: 0;
  color: var(--text);
  line-height: 1.5;
}
.country-ref-table caption {
  caption-side: top;
  text-align: left;
  margin: 0 0 0.55rem;
  font-size: 0.9rem;
  color: var(--text-muted);
}
.country-ref-ad-sep {
  margin: 2rem 0 0.5rem;
  padding-top: 1.25rem;
  border-top: 1px solid var(--border, #e2e8f0);
  clear: both;
}
.country-ref-ad-label {
  margin: 0 0 0.5rem;
  font-size: 0.75rem;
  letter-spacing: 0.04em;
  text-transform: uppercase;
  color: var(--text-muted);
  text-align: center;
}
.country-ref-ad-sep .adsense-slot,
.country-ref-ad-sep .country-ref-ad {
  margin-top: 0.25rem;
  margin-bottom: 0;
}
/* —— Phase 13+ profile polish —— */
.country-ref-page--profile {
  padding-block: 0;
}
.country-ref-profile-shell {
  margin: 0 0 1.5rem;
}
.country-ref-hero--profile {
  margin: 0 0 1.5rem;
  padding: 1.35rem 0 1.5rem;
  background:
    radial-gradient(ellipse 80% 70% at 12% 0%, rgba(37, 99, 235, 0.16), transparent 55%),
    radial-gradient(ellipse 60% 50% at 92% 18%, rgba(16, 185, 129, 0.12), transparent 50%),
    linear-gradient(165deg, #0B1220 0%, #12203A 42%, #0F2744 100%);
  color: #E2E8F0;
  border-bottom: 1px solid rgba(148, 163, 184, 0.22);
}
.country-ref-kicker--on-hero,
.country-ref-kicker--on-hero a {
  color: #93C5FD;
}
.country-ref-hero--profile h1 {
  color: #F8FAFC;
  font-size: clamp(1.75rem, 3.2vw, 2.35rem);
  letter-spacing: -0.02em;
}
.country-ref-hero--profile .lead {
  color: #CBD5E1;
  max-width: 46rem;
  font-size: 1.02rem;
  line-height: 1.55;
}
.country-ref-hero--profile .country-ref-official {
  color: #94A3B8;
}
.country-ref-hero--profile .country-ref-native {
  color: #E2E8F0;
  font-size: 1.12rem;
}
.country-ref-region-line {
  margin: 0 0 0.65rem;
  font-size: 0.86rem;
  font-weight: 600;
  letter-spacing: 0.03em;
  text-transform: uppercase;
  color: #86EFAC;
}
.country-ref-flag--hero {
  font-size: 3.25rem;
  filter: drop-shadow(0 6px 16px rgba(0, 0, 0, 0.35));
}
.country-ref-hero--profile .country-ref-h1-code {
  color: #BFDBFE;
  border-color: rgba(147, 197, 253, 0.35);
  background: rgba(15, 23, 42, 0.35);
}
.country-ref-btn-on-hero {
  border-color: rgba(148, 163, 184, 0.45) !important;
  color: #F1F5F9 !important;
  background: rgba(15, 23, 42, 0.25) !important;
}
.country-ref-btn-on-hero:hover,
.country-ref-btn-on-hero:focus-visible {
  border-color: #93C5FD !important;
  color: #fff !important;
  background: rgba(37, 99, 235, 0.35) !important;
}
.country-ref-chip-card--hero {
  background: rgba(15, 23, 42, 0.45);
  border-color: rgba(148, 163, 184, 0.28);
  box-shadow: 0 12px 40px rgba(0, 0, 0, 0.28);
  backdrop-filter: blur(8px);
}
.country-ref-chip-card--hero .country-ref-chip-label,
.country-ref-chip-card--hero .country-ref-chips span {
  color: #94A3B8;
}
.country-ref-chip-card--hero .country-ref-chips strong {
  color: #F8FAFC;
}
.country-ref-chip-card--hero .country-ref-copy {
  background: rgba(37, 99, 235, 0.25);
  border-color: rgba(147, 197, 253, 0.4);
  color: #DBEAFE;
}
.country-ref-chip-card--hero .country-ref-copy:hover {
  background: rgba(37, 99, 235, 0.45);
  color: #fff;
}
.country-ref-snapshot {
  list-style: none;
  margin: 1.25rem 0 0;
  padding: 0;
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 0.65rem;
}
.country-ref-snapshot-item {
  padding: 0.85rem 0.95rem;
  border-radius: var(--radius-sm);
  background: rgba(15, 23, 42, 0.4);
  border: 1px solid rgba(148, 163, 184, 0.22);
  min-width: 0;
}
.country-ref-snapshot-label {
  display: block;
  margin-bottom: 0.25rem;
  font-size: 0.7rem;
  font-weight: 700;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  color: #94A3B8;
}
.country-ref-snapshot-value {
  display: block;
  font-family: var(--font-display);
  font-size: 1.05rem;
  font-weight: 700;
  color: #F8FAFC;
  overflow-wrap: anywhere;
}
.country-ref-profile-body {
  padding-bottom: 0.5rem;
}
.country-ref-section-head {
  margin: 0 0 0.75rem;
}
.country-ref-section-head h2 {
  margin: 0 0 0.3rem;
}
.country-ref-section-lead {
  margin: 0;
  max-width: 44rem;
  color: var(--text-muted);
  font-size: 0.9rem;
}
.country-ref-panel {
  padding: 1.15rem 1.2rem;
  background: var(--card);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  box-shadow: var(--shadow);
}
.country-ref-panel .country-ref-dl {
  border: 0;
  box-shadow: none;
  background: transparent;
}
.country-ref-panel-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 1rem;
  margin: 0 0 1rem;
}
.country-ref-panel-grid > .country-ref-section {
  margin: 0;
}
.country-ref-highlight-grid,
.country-ref-fact-grid {
  list-style: none;
  margin: 0;
  padding: 0;
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(240px, 1fr));
  gap: 0.65rem;
}
.country-ref-highlight-card,
.country-ref-fact-card {
  margin: 0;
  padding: 0.85rem 0.95rem;
  border-radius: var(--radius-sm);
  border: 1px solid var(--border);
  background: linear-gradient(180deg, #fff 0%, #F8FAFC 100%);
  line-height: 1.5;
  font-size: 0.92rem;
  position: relative;
  padding-left: 1.15rem;
}
.country-ref-highlight-card::before,
.country-ref-fact-card::before {
  content: "";
  position: absolute;
  left: 0;
  top: 0.65rem;
  bottom: 0.65rem;
  width: 3px;
  border-radius: 2px;
  background: linear-gradient(180deg, var(--primary), var(--secondary));
}
.country-ref-tz-cards {
  list-style: none;
  margin: 0;
  padding: 0;
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(220px, 1fr));
  gap: 0.65rem;
}
.country-ref-tz-card {
  padding: 0.9rem 1rem;
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
  background: #F8FAFC;
  min-width: 0;
}
.country-ref-tz-card-top {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 0.5rem;
  margin-bottom: 0.45rem;
}
.country-ref-tz-time {
  margin: 0 0 0.2rem;
  font-family: var(--font-display);
  font-size: 1.35rem;
  font-weight: 700;
  letter-spacing: -0.02em;
  color: var(--text);
}
.country-ref-tz-meta {
  margin: 0;
  font-size: 0.85rem;
  color: var(--text-muted);
  display: flex;
  flex-wrap: wrap;
  gap: 0.35rem;
  align-items: center;
}
.country-ref-locale-grid {
  list-style: none;
  margin: 0;
  padding: 0;
  display: grid;
  gap: 0.55rem;
}
.country-ref-locale-grid li {
  margin: 0;
  padding: 0.75rem 0.9rem;
  border-left: 3px solid var(--secondary);
  background: #F0FDF4;
  border-radius: 0 var(--radius-sm) var(--radius-sm) 0;
  line-height: 1.5;
  font-size: 0.93rem;
}
.country-ref-related--grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(240px, 1fr));
  gap: 0.65rem;
}
.country-ref-related--grid a {
  height: 100%;
  transition: border-color var(--transition), box-shadow var(--transition), transform var(--transition);
}
.country-ref-related--grid a:hover,
.country-ref-related--grid a:focus-visible {
  box-shadow: var(--shadow);
  transform: translateY(-1px);
}
.country-ref-page--index .country-ref-index-hero {
  padding: 1.25rem 1.3rem;
  margin-bottom: 1.25rem;
  border-radius: var(--radius);
  background:
    linear-gradient(135deg, rgba(37, 99, 235, 0.08), rgba(16, 185, 129, 0.06)),
    var(--card);
  border: 1px solid var(--border);
  box-shadow: var(--shadow);
}
.country-ref-page--index .country-ref-profile-index {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
  gap: 0.85rem;
}
.country-ref-page--index .country-ref-profile-card {
  height: 100%;
  transition: border-color var(--transition), box-shadow var(--transition), transform var(--transition);
  box-shadow: var(--shadow);
}
.country-ref-page--index .country-ref-profile-card:hover,
.country-ref-page--index .country-ref-profile-card:focus-visible {
  box-shadow: var(--shadow-lg);
  transform: translateY(-2px);
}
@keyframes country-ref-rise {
  from { opacity: 0; transform: translateY(8px); }
  to { opacity: 1; transform: translateY(0); }
}
@media (prefers-reduced-motion: no-preference) {
  .country-ref-hero--profile,
  .country-ref-snapshot-item,
  .country-ref-panel,
  .country-ref-highlight-card,
  .country-ref-fact-card,
  .country-ref-tz-card {
    animation: country-ref-rise 0.45s ease both;
  }
  .country-ref-snapshot-item:nth-child(2) { animation-delay: 0.05s; }
  .country-ref-snapshot-item:nth-child(3) { animation-delay: 0.1s; }
  .country-ref-snapshot-item:nth-child(4) { animation-delay: 0.15s; }
}
@media (max-width: 900px) {
  .country-ref-snapshot {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
  .country-ref-panel-grid {
    grid-template-columns: 1fr;
  }
}
@media (max-width: 640px) {
  .country-ref-hero--profile {
    padding: 1rem 0 1.15rem;
  }
  .country-ref-snapshot {
    grid-template-columns: 1fr;
  }
  .country-ref-identity {
    flex-direction: column;
    gap: 0.55rem;
  }
}
.country-ref-suite-nav {
  margin: 1.5rem 0 1rem;
  padding: 1rem 0 0;
  border-top: 1px solid var(--border, #e2e8f0);
}
.country-ref-suite-nav-heading {
  margin: 0 0 0.55rem;
  font-size: 1rem;
}
.country-ref-suite-nav-list {
  list-style: none;
  margin: 0;
  padding: 0;
  display: flex;
  flex-wrap: wrap;
  gap: 0.4rem 0.85rem;
}
.country-ref-suite-nav-list a {
  color: var(--primary);
  text-decoration: none;
  font-size: 0.9rem;
}
.country-ref-suite-nav-list a:hover,
.country-ref-suite-nav-list a:focus-visible {
  text-decoration: underline;
  outline: none;
}
.country-ref-suite-nav-list [aria-current="page"] {
  font-weight: 600;
  font-size: 0.9rem;
  color: var(--text);
}

@media (prefers-reduced-motion: reduce) {
  .country-ref-page *,
  .country-info-finder * {
    transition: none !important;
  }
}
