:root {
  --navy: #15211d;
  --blue: #0e7c7b;
  --blue-hover: #0a5f5e;
  --aqua: #2fa39a;
  --canvas: #f4f7f5;
  --notice: #e76f51;
  --white: #ffffff;
  --text: #17221e;
  --text-secondary: #4d5d57;
  --text-muted: #84918b;
  --border: #d7e0dc;
  --border-light: #e4ebe8;
  --surface: #edf3f1;
  --surface-hover: #e2ebe8;
  --font-ui: 'Inter', system-ui, -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
  --font-mono: 'JetBrains Mono', 'Cascadia Code', 'SF Mono', Consolas, monospace;
  --font-size-xs: 0.75rem;
  --font-size-sm: 0.875rem;
  --font-size-base: 1rem;
  --font-size-md: 1.125rem;
  --font-size-lg: 1.25rem;
  --font-size-xl: 1.5rem;
  --line-height-base: 1.55;
  --line-height-relaxed: 1.7;
  --spacing-xs: 4px;
  --spacing-sm: 8px;
  --spacing-md: 16px;
  --spacing-lg: 24px;
  --spacing-xl: 32px;
  --spacing-2xl: 48px;
  --spacing-3xl: 64px;
  --radius-sm: 8px;
  --radius: 12px;
  --radius-lg: 16px;
  --shadow-sm: 0 1px 2px rgba(21, 33, 29, 0.04);
  --shadow: 0 1px 4px rgba(21, 33, 29, 0.06), 0 4px 16px rgba(21, 33, 29, 0.04);
  --shadow-hover: 0 1px 4px rgba(21, 33, 29, 0.08), 0 8px 22px rgba(21, 33, 29, 0.08);
  --focus-ring: 0 0 0 3px rgba(14, 124, 123, 0.25);
  --transition-fast: 150ms ease;
  --transition-base: 200ms ease;
  --transition-slow: 300ms ease;
  --max-content: 1200px;
  --header-height: 68px;
  --header-height-mobile: 60px;
  --gutter-desktop: 28px;
  --gutter-mobile: 16px;
}

*,
*::before,
*::after {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
}

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

body {
  font-family: var(--font-ui);
  font-size: var(--font-size-base);
  line-height: var(--line-height-base);
  color: var(--text);
  background-color: var(--white);
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
}

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

a:hover {
  text-decoration: underline;
}

img,
svg {
  max-width: 100%;
  height: auto;
}

button,
input,
select,
textarea {
  font-family: inherit;
  font-size: inherit;
}

code {
  font-family: var(--font-mono);
  font-size: 0.92em;
  background: var(--surface);
  border-radius: 5px;
  padding: 1px 5px;
}

.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;
}

.container {
  max-width: var(--max-content);
  margin: 0 auto;
  padding: 0 var(--gutter-desktop);
}

.mono {
  font-family: var(--font-mono);
}

.skip-link {
  position: absolute;
  left: -9999px;
  top: 0;
  background: var(--navy);
  color: var(--white);
  padding: 10px 16px;
  border-radius: 0 0 var(--radius-sm) 0;
  z-index: 200;
  font-size: var(--font-size-sm);
}

.skip-link:focus {
  left: 0;
  top: 12px;
}

:focus-visible {
  outline: 2px solid var(--blue);
  outline-offset: 2px;
}

.site-header {
  position: sticky;
  top: 0;
  z-index: 100;
  height: var(--header-height);
  background: rgba(255, 255, 255, 0.94);
  backdrop-filter: blur(14px);
  -webkit-backdrop-filter: blur(14px);
  border-bottom: 1px solid var(--border);
}

.site-header .container {
  display: flex;
  align-items: center;
  justify-content: space-between;
  height: 100%;
  gap: var(--spacing-lg);
}

.wordmark {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  font-size: 15px;
  font-weight: 700;
  color: var(--navy);
  text-decoration: none;
  letter-spacing: -0.01em;
  white-space: nowrap;
}

.wordmark:hover {
  text-decoration: none;
  opacity: 0.85;
}

.wordmark-mark {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 32px;
  height: 32px;
  flex-shrink: 0;
  background: var(--navy);
  border-radius: 7px;
  color: var(--white);
  font-size: 11px;
  font-weight: 800;
  letter-spacing: 0;
  position: relative;
  overflow: hidden;
}

.wordmark-mark::after {
  content: '';
  position: absolute;
  inset: 0;
  background: repeating-linear-gradient(
    0deg,
    transparent,
    transparent 2.5px,
    rgba(255, 255, 255, 0.08) 2.5px,
    rgba(255, 255, 255, 0.08) 3px
  );
}

.header-nav {
  display: flex;
  align-items: center;
  gap: 20px;
}

.header-nav a {
  color: var(--text-secondary);
  font-size: 14px;
  font-weight: 500;
  padding: var(--spacing-xs) 0;
  transition: color var(--transition-fast);
}

.header-nav a:hover {
  color: var(--navy);
  text-decoration: none;
}

.header-nav .header-cta {
  background: var(--blue);
  color: var(--white);
  font-weight: 600;
  padding: 8px 18px;
  border-radius: var(--radius-sm);
}

.header-nav .header-cta:hover {
  background: var(--blue-hover);
  color: var(--white);
}

.hamburger {
  display: none;
  background: none;
  border: none;
  cursor: pointer;
  padding: var(--spacing-sm);
  min-width: 44px;
  min-height: 44px;
  align-items: center;
  justify-content: center;
  border-radius: var(--radius-sm);
  color: var(--text);
}

.hamburger:hover {
  background: var(--surface);
}

.hamburger svg {
  width: 24px;
  height: 24px;
}

.hamburger .icon-close {
  display: none;
}

.hamburger.active .icon-menu {
  display: none;
}

.hamburger.active .icon-close {
  display: block;
}

.site-footer {
  background: var(--navy);
  color: rgba(255, 255, 255, 0.75);
  padding: 56px 0 32px;
  margin-top: 24px;
}

.footer-grid {
  display: grid;
  grid-template-columns: 1.6fr 1fr 1fr 1fr;
  gap: 40px;
  margin-bottom: 40px;
}

.footer-brand {
  display: flex;
  align-items: center;
  gap: 10px;
  font-size: 15px;
  font-weight: 700;
  color: var(--white);
  margin-bottom: 12px;
}

.footer-brand .wordmark-mark {
  background: rgba(255, 255, 255, 0.12);
}

.footer-desc {
  font-size: var(--font-size-sm);
  line-height: var(--line-height-relaxed);
  max-width: 340px;
}

.footer-note {
  font-size: 12.5px;
  color: rgba(255, 255, 255, 0.45);
  margin-top: 12px;
  max-width: 340px;
}

.footer-col h4 {
  font-size: 12px;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  color: rgba(255, 255, 255, 0.45);
  margin-bottom: 14px;
}

.footer-col ul {
  list-style: none;
  display: grid;
  gap: 8px;
}

.footer-col a {
  font-size: var(--font-size-sm);
  color: rgba(255, 255, 255, 0.7);
  transition: color var(--transition-fast);
}

.footer-col a:hover {
  color: var(--white);
  text-decoration: none;
}

.footer-bottom {
  display: flex;
  justify-content: space-between;
  gap: var(--spacing-md);
  flex-wrap: wrap;
  padding-top: 22px;
  border-top: 1px solid rgba(255, 255, 255, 0.12);
  font-size: 13px;
  color: rgba(255, 255, 255, 0.4);
}

.breadcrumbs {
  padding: var(--spacing-lg) 0 0;
  font-size: var(--font-size-sm);
  color: var(--text-muted);
}

.breadcrumbs ol {
  list-style: none;
  display: flex;
  gap: var(--spacing-sm);
  flex-wrap: wrap;
}

.breadcrumbs li {
  display: inline-flex;
  align-items: center;
  gap: var(--spacing-sm);
}

.breadcrumbs a {
  color: var(--text-muted);
}

.breadcrumbs a:hover {
  color: var(--blue);
}

.breadcrumbs [aria-current='page'] {
  color: var(--text);
  font-weight: 500;
}

.legal-page,
.article-page {
  max-width: 820px;
}

.legal-page h1,
.article-page h1 {
  font-size: clamp(26px, 3vw, 34px);
  color: var(--navy);
  line-height: 1.15;
  margin: 32px 0 12px;
}

.legal-page h2,
.article-page h2 {
  font-size: 20px;
  color: var(--navy);
  margin: 28px 0 8px;
}

.legal-page p,
.article-page p {
  color: var(--text-secondary);
  line-height: var(--line-height-relaxed);
  margin-bottom: 14px;
}

.legal-page a,
.article-page a {
  text-decoration: underline;
}

.legal-list {
  margin: 0 0 16px 20px;
  color: var(--text-secondary);
  line-height: var(--line-height-relaxed);
  display: grid;
  gap: 6px;
}

.article-page {
  padding-bottom: 64px;
}

.guide-meta {
  color: var(--text-muted);
  font-size: var(--font-size-sm);
  margin-bottom: 28px;
}

@media (prefers-reduced-motion: reduce) {
  html {
    scroll-behavior: auto;
  }

  *,
  *::before,
  *::after {
    animation-duration: 0.01ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: 0.01ms !important;
  }
}

@media (max-width: 768px) {
  :root {
    --header-height: var(--header-height-mobile);
  }

  .container {
    padding: 0 var(--gutter-mobile);
  }

  .header-nav {
    position: fixed;
    top: var(--header-height-mobile);
    left: 0;
    right: 0;
    flex-direction: column;
    gap: 0;
    background: var(--white);
    border-bottom: 1px solid var(--border);
    padding: var(--spacing-sm) 0;
    transform: translateY(-100%);
    opacity: 0;
    pointer-events: none;
    transition: transform var(--transition-base), opacity var(--transition-base);
    z-index: 99;
  }

  .header-nav.open {
    transform: translateY(0);
    opacity: 1;
    pointer-events: auto;
  }

  .header-nav a {
    display: flex;
    align-items: center;
    min-height: 44px;
    width: 100%;
    padding: var(--spacing-md) var(--gutter-mobile);
    font-size: var(--font-size-base);
  }

  .header-nav a:hover {
    background: var(--surface);
    color: var(--navy);
  }

  .header-nav .header-cta {
    border-radius: 0;
  }

  .hamburger {
    display: flex;
  }

  .footer-grid {
    grid-template-columns: 1fr 1fr;
    gap: 28px;
  }

  .footer-bottom {
    flex-direction: column;
    align-items: flex-start;
  }
}

@media (max-width: 480px) {
  .wordmark {
    font-size: 14px;
  }

  .footer-grid {
    grid-template-columns: 1fr;
  }
}

/* Hero */
.hero {
  padding: 56px 0 52px;
  position: relative;
  overflow: hidden;
  background: var(--canvas);
}

.hero::before {
  content: '';
  position: absolute;
  inset: 0;
  pointer-events: none;
  opacity: 0.5;
  background-image:
    linear-gradient(rgba(25, 118, 210, 0.04) 1px, transparent 1px),
    linear-gradient(90deg, rgba(25, 118, 210, 0.04) 1px, transparent 1px);
  background-size: 40px 40px;
  mask-image: radial-gradient(ellipse 70% 60% at 50% 40%, black 30%, transparent 70%);
  -webkit-mask-image: radial-gradient(ellipse 70% 60% at 50% 40%, black 30%, transparent 70%);
}

.hero .container {
  position: relative;
  z-index: 1;
}

.hero h1 {
  font-size: clamp(34px, 4vw, 50px);
  font-weight: 700;
  color: var(--navy);
  line-height: 1.1;
  letter-spacing: 0;
  margin-bottom: 10px;
}

.hero-tagline {
  font-size: clamp(16px, 1.8vw, 18px);
  color: var(--text-secondary);
  line-height: 1.55;
  max-width: 620px;
  margin-bottom: 28px;
}

/* Workspace and search */
.workspace {
  max-width: 720px;
  background: var(--white);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  box-shadow: var(--shadow);
  overflow: visible;
  padding: 24px;
  position: relative;
}

.search-wrap {
  position: relative;
}

.search-field label {
  display: block;
  font-size: 13px;
  font-weight: 600;
  color: var(--text-secondary);
  text-transform: uppercase;
  letter-spacing: 0.06em;
  margin-bottom: 12px;
}

.search-input-row {
  display: flex;
  gap: 10px;
}

.search-input {
  flex: 1;
  min-width: 0;
  height: 52px;
  padding: 0 18px;
  border: 1.5px solid var(--border);
  border-radius: var(--radius);
  font-size: 16px;
  font-family: var(--font-ui);
  color: var(--text);
  background: var(--white);
  outline: none;
  transition: border-color var(--transition-fast);
}

.search-input:focus {
  border-color: var(--blue);
  box-shadow: var(--focus-ring);
}

.search-input::placeholder {
  color: var(--text-muted);
}

.search-input.error {
  border-color: var(--notice);
}

.search-submit {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  height: 52px;
  padding: 0 26px;
  background: var(--blue);
  color: var(--white);
  border: none;
  border-radius: var(--radius);
  font-size: 15px;
  font-weight: 600;
  cursor: pointer;
  white-space: nowrap;
  transition: background var(--transition-fast), box-shadow var(--transition-fast);
}

.search-submit:hover {
  background: var(--blue-hover);
  box-shadow: 0 4px 12px rgba(14, 124, 123, 0.22);
}

.search-submit svg {
  width: 18px;
  height: 18px;
}

.field-hint {
  font-size: 12.5px;
  color: var(--text-muted);
  margin-top: 10px;
}

.field-error {
  font-size: 13px;
  color: var(--notice);
  margin-top: 8px;
  font-weight: 500;
}

.postal-lookup-block {
  margin: 40px 0;
  padding: 24px;
  border: 1px solid var(--border);
  border-radius: var(--radius);
  background: var(--white);
}

.postal-lookup-form {
  max-width: 720px;
}

.postal-lookup-results {
  margin-top: 20px;
}

.postal-lookup-summary {
  font-size: 14px;
  color: var(--text-secondary);
  line-height: 1.55;
  margin: 0 0 12px;
}

.postal-match-list {
  display: grid;
  gap: 8px;
  list-style: none;
  margin: 0;
  padding: 0;
}

.postal-match-list li {
  margin: 0;
}

.postal-match-list a {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 10px 14px;
  border: 1px solid var(--border-light);
  border-radius: var(--radius-sm);
  background: var(--white);
  color: var(--text);
  font-size: 14px;
}

.postal-match-list a:hover {
  border-color: var(--blue);
  background: var(--surface);
  text-decoration: none;
}

.postal-match-name {
  flex: 1;
  min-width: 0;
  font-weight: 600;
}

.postal-match-code {
  width: 44px;
  font-size: 12px;
  color: var(--blue);
}

.postal-match-format {
  font-size: 12px;
  color: var(--text-muted);
  text-align: right;
}

.search-suggest {
  position: absolute;
  top: calc(100% + 8px);
  left: 0;
  right: 0;
  z-index: 20;
  background: var(--white);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  box-shadow: var(--shadow-hover);
  max-height: 340px;
  overflow-y: auto;
}

.search-suggest-item {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  padding: 12px 16px;
  border-bottom: 1px solid var(--border-light);
  color: var(--text);
  font-size: 14px;
}

.search-suggest-item:last-child {
  border-bottom: none;
}

.search-suggest-item:hover {
  background: var(--surface);
  text-decoration: none;
}

.search-suggest-name {
  font-weight: 500;
}

.search-suggest-codes {
  font-family: var(--font-mono);
  font-size: 11px;
  color: var(--text-muted);
  white-space: nowrap;
}

.example-chips {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin-top: 16px;
  align-items: center;
}

.example-chips-label {
  font-size: 12px;
  color: var(--text-muted);
  font-weight: 500;
  margin-right: 4px;
}

.chip {
  padding: 6px 14px;
  border-radius: 20px;
  font-size: 13px;
  font-weight: 500;
  font-family: var(--font-ui);
  cursor: pointer;
  transition: all var(--transition-fast);
  border: 1px solid var(--border-light);
  background: var(--white);
  color: var(--text);
}

.chip:hover {
  background: var(--surface);
  border-color: var(--border);
  color: var(--blue);
}

.chip kbd {
  font-family: var(--font-mono);
  font-size: 11px;
  background: var(--surface);
  padding: 2px 6px;
  border-radius: 4px;
  margin-left: 6px;
  color: var(--text-muted);
}

.privacy-note {
  margin-top: 14px;
  font-size: 12.5px;
  color: var(--text-muted);
  display: flex;
  align-items: center;
  gap: 6px;
}

.privacy-note::before {
  content: '';
  width: 6px;
  height: 6px;
  background: var(--aqua);
  border-radius: 50%;
  flex-shrink: 0;
}

/* Sections */
.section {
  padding: 68px 0;
}

.section-alt {
  background: var(--canvas);
  border-top: 1px solid var(--border-light);
  border-bottom: 1px solid var(--border-light);
}

.section-eyebrow {
  font-size: 11.5px;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.09em;
  color: var(--blue);
  margin-bottom: 8px;
}

.section-heading {
  font-size: clamp(22px, 2.2vw, 28px);
  font-weight: 700;
  color: var(--navy);
  margin-bottom: 6px;
  letter-spacing: 0;
}

.section-subheading {
  font-size: 16px;
  color: var(--text-secondary);
  margin-bottom: 32px;
  max-width: 620px;
}

/* Country cards */
.countries-grid,
.extensions-grid {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 12px;
}

.country-card {
  background: var(--white);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  transition: all var(--transition-fast);
}

.country-card:hover {
  border-color: var(--blue);
  box-shadow: var(--shadow);
  transform: translateY(-1px);
}

.country-card-link {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 16px;
  color: inherit;
  text-decoration: none;
}

.country-card-link:hover {
  text-decoration: none;
}

.country-card-id {
  width: 42px;
  height: 42px;
  border-radius: var(--radius-sm);
  background: var(--surface);
  display: flex;
  align-items: center;
  justify-content: center;
  font-weight: 700;
  font-size: 15px;
  color: var(--navy);
  flex-shrink: 0;
  font-family: var(--font-mono);
}

.country-card-main {
  display: flex;
  flex-direction: column;
  min-width: 0;
}

.country-card-name {
  font-weight: 500;
  font-size: 14px;
  color: var(--text);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.country-card-codes {
  font-family: var(--font-mono);
  font-size: 11px;
  color: var(--text-muted);
  margin-top: 2px;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

/* Code type guide */
.codes-guide-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 12px;
}

.code-type-card {
  background: var(--white);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 20px;
  transition: border-color var(--transition-fast);
}

.code-type-card:hover {
  border-color: var(--blue);
}

.code-type-icon {
  width: 44px;
  height: 44px;
  border-radius: var(--radius-sm);
  background: var(--surface);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 13px;
  font-weight: 700;
  color: var(--navy);
  margin-bottom: 14px;
}

.code-type-card h3 {
  font-size: 15px;
  font-weight: 600;
  color: var(--navy);
  margin-bottom: 4px;
}

.code-type-card p {
  font-size: 13px;
  color: var(--text-secondary);
  line-height: 1.5;
}

.code-type-example {
  margin-top: 10px;
  font-family: var(--font-mono);
  font-size: 12px;
  color: var(--blue);
  background: var(--surface);
  padding: 4px 10px;
  border-radius: 5px;
  display: inline-block;
}

/* Region browser */
.region-tabs {
  display: flex;
  gap: 4px;
  flex-wrap: wrap;
  margin-bottom: 20px;
}

.region-tab {
  padding: 8px 18px;
  border-radius: var(--radius-sm);
  border: 1.5px solid var(--border);
  background: var(--white);
  font-size: 14px;
  font-weight: 500;
  font-family: var(--font-ui);
  color: var(--text-secondary);
  cursor: pointer;
  transition: all var(--transition-fast);
}

.region-tab:hover:not(.active) {
  background: var(--surface);
  color: var(--text);
}

.region-tab.active {
  background: var(--navy);
  color: var(--white);
  border-color: var(--navy);
}

.region-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 8px;
}

.region-item {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 10px 14px;
  border-radius: var(--radius-sm);
  text-decoration: none;
  color: var(--text);
  font-size: 14px;
  font-weight: 500;
  border: 1px solid transparent;
  transition: all var(--transition-fast);
}

.region-item:hover {
  background: var(--surface);
  border-color: var(--border);
  color: var(--blue);
  text-decoration: none;
}

.region-item-code {
  font-size: 11px;
  color: var(--text-muted);
  min-width: 28px;
}

.region-item-name {
  flex: 1;
  min-width: 0;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.region-item-call {
  font-size: 11px;
  color: var(--text-muted);
  margin-left: auto;
}

html.js .region-panel {
  display: none;
}

html.js .region-panel.active {
  display: block;
}

/* Reference table */
.table-wrap {
  overflow-x: auto;
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  background: var(--white);
}

.table-wrap table {
  width: 100%;
  border-collapse: collapse;
  font-size: 14px;
  min-width: 700px;
}

.table-wrap thead th {
  text-align: left;
  padding: 14px 16px;
  font-size: 12px;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.06em;
  color: var(--text-muted);
  background: var(--canvas);
  border-bottom: 1px solid var(--border);
  white-space: nowrap;
}

.table-wrap tbody td {
  padding: 12px 16px;
  border-bottom: 1px solid var(--border-light);
  color: var(--text);
  font-size: 13.5px;
}

.table-wrap tbody tr:hover {
  background: var(--surface);
}

.table-wrap tbody tr:last-child td {
  border-bottom: none;
}

.td-code {
  font-size: 12px;
  color: var(--blue);
}

.td-country {
  font-weight: 500;
}

.table-view-all {
  display: block;
  text-align: center;
  padding: 16px;
  font-size: 14px;
  font-weight: 600;
  color: var(--blue);
  text-decoration: none;
  background: var(--canvas);
  border-top: 1px solid var(--border);
  border-radius: 0 0 var(--radius-lg) var(--radius-lg);
  transition: background var(--transition-fast);
}

.table-view-all:hover {
  background: var(--surface-hover);
}

/* Guides */
.guides-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 14px;
}

.guide-card {
  background: var(--white);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 22px 20px;
  text-decoration: none;
  color: inherit;
  transition: all var(--transition-fast);
  display: flex;
  flex-direction: column;
}

.guide-card:hover {
  border-color: var(--blue);
  box-shadow: var(--shadow);
  transform: translateY(-2px);
  text-decoration: none;
}

.guide-card-tag {
  font-size: 11px;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.06em;
  color: var(--blue);
  margin-bottom: 10px;
}

.guide-card-title {
  font-size: 16px;
  font-weight: 600;
  color: var(--navy);
  line-height: 1.35;
  margin-bottom: 8px;
}

.guide-card-desc {
  font-size: 13px;
  color: var(--text-secondary);
  line-height: 1.5;
  margin-bottom: 14px;
}

.guide-card-time {
  font-size: 12px;
  color: var(--text-muted);
  margin-top: auto;
}

/* FAQ */
.accordion {
  max-width: 760px;
}

.accordion-item {
  border-bottom: 1px solid var(--border);
}

.accordion-item:first-child {
  border-top: 1px solid var(--border);
}

.accordion-trigger {
  width: 100%;
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 18px 0;
  background: none;
  border: none;
  cursor: pointer;
  font-family: var(--font-ui);
  font-size: 15px;
  font-weight: 500;
  color: var(--text);
  text-align: left;
  gap: 14px;
  list-style: none;
}

.accordion-trigger::-webkit-details-marker {
  display: none;
}

.accordion-trigger:hover {
  color: var(--blue);
}

.accordion-chevron {
  color: var(--text-muted);
  width: 14px;
  height: 14px;
  flex-shrink: 0;
  transition: transform var(--transition-fast);
}

.accordion-item[open] .accordion-chevron {
  transform: rotate(180deg);
}

.accordion-content {
  padding: 0 0 18px;
}

.accordion-content p {
  font-size: 15px;
  color: var(--text-secondary);
  line-height: 1.7;
}

/* Detail pages */
.detail-page {
  padding-bottom: 72px;
}

.detail-hero {
  padding: 40px 0 32px;
}

.detail-hero h1 {
  font-size: clamp(28px, 3vw, 40px);
  color: var(--navy);
  line-height: 1.12;
  margin: 10px 0;
}

.detail-hero .hero-tagline {
  margin-bottom: 0;
}

.meta-line {
  display: flex;
  align-items: center;
  gap: 12px;
  flex-wrap: wrap;
  font-size: 13px;
  color: var(--text-muted);
}

.code-panel {
  background: var(--white);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  box-shadow: var(--shadow);
  padding: 28px;
  margin-bottom: 28px;
}

.code-panel-meta {
  display: flex;
  align-items: center;
  gap: 12px;
  flex-wrap: wrap;
  font-size: 13px;
  color: var(--text-muted);
  margin-bottom: 20px;
}

.code-grid {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 1px;
  background: var(--border-light);
  border: 1px solid var(--border-light);
  border-radius: var(--radius);
  overflow: hidden;
}

.code-item {
  background: var(--white);
  padding: 18px 20px;
  min-width: 0;
}

.code-item-wide {
  grid-column: 1 / -1;
}

.code-item dt {
  font-size: 12px;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.06em;
  color: var(--text-muted);
  margin-bottom: 8px;
}

.code-item dd {
  font-size: 18px;
  font-weight: 600;
  color: var(--navy);
  min-width: 0;
}

.code-value {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  flex-wrap: wrap;
}

.code-item .code-note {
  font-size: 13px;
  color: var(--text-secondary);
  margin-top: 10px;
  line-height: 1.5;
}

.copy-button {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
  padding: 7px 12px;
  font-size: 12.5px;
  font-weight: 600;
  color: var(--text-secondary);
  cursor: pointer;
  min-height: 40px;
  transition: all var(--transition-fast);
}

.copy-button:hover {
  background: var(--surface-hover);
  border-color: var(--blue);
  color: var(--blue);
}

.copy-button svg {
  width: 14px;
  height: 14px;
}

.source-block {
  margin-top: 24px;
}

.source-block h2 {
  font-size: 15px;
  color: var(--navy);
  margin-bottom: 8px;
}

.source-block p {
  font-size: 13.5px;
  color: var(--text-secondary);
}

.source-block a {
  text-decoration: underline;
}

.detail-grid {
  display: grid;
  grid-template-columns: 1.6fr 1fr;
  gap: 28px;
  align-items: start;
}

.detail-panel {
  background: var(--white);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  padding: 28px;
}

.detail-panel h2 {
  font-size: 18px;
  color: var(--navy);
  margin: 0 0 8px;
}

.detail-panel h2:not(:first-child) {
  margin-top: 24px;
}

.detail-panel p {
  color: var(--text-secondary);
  line-height: 1.7;
  margin-bottom: 8px;
}

.detail-list {
  display: grid;
  gap: 18px;
}

.detail-list dt {
  font-size: 12px;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.06em;
  color: var(--text-muted);
  margin-bottom: 4px;
}

.detail-list dd {
  font-size: 15px;
  color: var(--text);
}

/* Related and review lists */
.related-block {
  margin-top: 40px;
}

.related-block h2 {
  font-size: 20px;
  color: var(--navy);
  margin-bottom: 14px;
}

.related-list {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 10px;
}

.related-list a {
  display: flex;
  align-items: center;
  gap: 10px;
  background: var(--white);
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
  padding: 12px 14px;
  color: var(--text);
  font-size: 14px;
  font-weight: 500;
  transition: all var(--transition-fast);
}

.related-list a:hover {
  border-color: var(--blue);
  box-shadow: var(--shadow);
  text-decoration: none;
}

.related-list .mono {
  font-size: 12px;
  color: var(--blue);
  min-width: 32px;
}

.review-list {
  list-style: none;
  display: grid;
  gap: 10px;
  max-width: 720px;
}

.review-item {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 14px;
  background: var(--white);
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
  padding: 12px 16px;
}

.review-item-main {
  display: flex;
  align-items: center;
  gap: 12px;
  flex-wrap: wrap;
}

.review-name {
  font-weight: 500;
  color: var(--text);
}

.review-date {
  font-size: 12.5px;
  color: var(--text-muted);
  font-family: var(--font-mono);
}

.review-link {
  font-size: 13.5px;
  font-weight: 600;
  white-space: nowrap;
}

/* Filters */
.filter-bar {
  display: flex;
  align-items: center;
  gap: 8px;
  flex-wrap: wrap;
  margin: 24px 0 18px;
}

.cat-pill {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 8px 16px;
  border-radius: 20px;
  border: 1.5px solid var(--border);
  background: var(--white);
  font-size: 13.5px;
  font-weight: 500;
  font-family: var(--font-ui);
  color: var(--text-secondary);
  cursor: pointer;
  transition: all var(--transition-fast);
}

.cat-pill:hover:not(.active) {
  background: var(--surface);
  color: var(--text);
}

.cat-pill.active {
  background: var(--navy);
  color: var(--white);
  border-color: var(--navy);
}

.cat-pill-count {
  font-size: 12px;
  opacity: 0.8;
}

.filter-count {
  margin-left: auto;
  font-size: 13px;
  color: var(--text-muted);
}

.empty-state {
  border: 1px dashed var(--border);
  border-radius: var(--radius);
  padding: 48px 24px;
  text-align: center;
  color: var(--text-muted);
  margin: 24px 0;
}

.empty-state-icon {
  font-size: 28px;
  margin-bottom: 10px;
}

.empty-state-text {
  font-size: 15px;
}

/* Buttons and badges */
.button {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 48px;
  padding: 0 22px;
  border-radius: var(--radius-sm);
  background: var(--blue);
  color: var(--white);
  font-size: 15px;
  font-weight: 600;
  text-decoration: none;
  transition: background var(--transition-fast), box-shadow var(--transition-fast);
}

.button:hover {
  background: var(--blue-hover);
  color: var(--white);
  text-decoration: none;
}

.button-secondary {
  background: var(--white);
  color: var(--blue);
  border: 1.5px solid var(--border);
}

.button-secondary:hover {
  background: var(--surface);
  color: var(--blue);
}

.badge {
  display: inline-flex;
  align-items: center;
  padding: 3px 10px;
  border-radius: 20px;
  font-size: 11px;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.05em;
}

.badge-teal {
  background: rgba(0, 168, 150, 0.12);
  color: #007d70;
}

.badge-primary {
  background: rgba(25, 118, 210, 0.12);
  color: var(--blue);
}

.badge-notice {
  background: rgba(231, 111, 81, 0.12);
  color: #c24f31;
}

.badge-neutral {
  background: var(--surface);
  color: var(--text-secondary);
}

/* Error page */
.error-page {
  text-align: center;
  padding: 80px 0;
}

.error-page h1 {
  font-size: clamp(28px, 3vw, 40px);
  color: var(--navy);
  margin-bottom: 12px;
}

.error-page p {
  color: var(--text-secondary);
  margin-bottom: 28px;
}

.home-links {
  display: flex;
  gap: 12px;
  justify-content: center;
  flex-wrap: wrap;
}

/* Responsive */
@media (max-width: 1024px) {
  .countries-grid,
  .extensions-grid {
    grid-template-columns: repeat(3, 1fr);
  }

  .codes-guide-grid {
    grid-template-columns: repeat(2, 1fr);
  }

  .region-grid {
    grid-template-columns: repeat(2, 1fr);
  }

  .guides-grid {
    grid-template-columns: repeat(2, 1fr);
  }

  .detail-grid {
    grid-template-columns: 1fr;
  }
}

@media (max-width: 768px) {
  .hero {
    padding: 40px 0 36px;
  }

  .workspace {
    padding: 18px;
  }

  .search-input,
  .search-submit {
    height: 48px;
  }

  .search-input {
    font-size: 15px;
  }

  .search-submit {
    padding: 0 18px;
    font-size: 14px;
  }

  .countries-grid,
  .extensions-grid {
    grid-template-columns: repeat(2, 1fr);
  }

  .codes-guide-grid {
    grid-template-columns: 1fr;
  }

  .region-grid {
    grid-template-columns: 1fr;
  }

  .guides-grid {
    grid-template-columns: 1fr;
  }

  .related-list {
    grid-template-columns: 1fr;
  }

  .code-grid {
    grid-template-columns: 1fr;
  }

  .code-item-wide {
    grid-column: auto;
  }

  .filter-count {
    margin-left: 0;
    width: 100%;
  }
}

@media (max-width: 480px) {
  .hero {
    padding: 32px 0 28px;
  }

  .hero h1 {
    font-size: 26px;
  }

  .hero-tagline {
    font-size: 15px;
    margin-bottom: 24px;
  }

  .workspace {
    padding: 14px;
  }

  .search-input-row {
    flex-direction: column;
    gap: 8px;
  }

  .search-submit {
    width: 100%;
  }

  .search-submit-text {
    display: none;
  }

  .countries-grid,
  .extensions-grid {
    grid-template-columns: repeat(2, 1fr);
    gap: 8px;
  }

  .country-card-link {
    padding: 12px;
  }

  .country-card-id {
    width: 36px;
    height: 36px;
    font-size: 13px;
  }

  .country-card-name {
    font-size: 13px;
  }

  .country-card-codes {
    font-size: 10px;
  }

  .section {
    padding: 44px 0;
  }

  .region-tab {
    padding: 6px 12px;
    font-size: 13px;
  }

  .code-panel {
    padding: 18px;
  }

  .detail-panel {
    padding: 20px;
  }

  .detail-hero {
    padding: 28px 0 24px;
  }

  .error-page {
    padding: 56px 0;
  }
}

/* World Lookup Hub: directory surface */
.home-hero {
  padding: 48px 0 44px;
  position: relative;
  overflow: hidden;
  background: var(--canvas);
  border-bottom: 1px solid var(--border-light);
}

.home-hero::before {
  content: '';
  position: absolute;
  inset: 0;
  pointer-events: none;
  opacity: 0.9;
  background-image:
    linear-gradient(rgba(14, 124, 123, 0.045) 1px, transparent 1px),
    linear-gradient(90deg, rgba(14, 124, 123, 0.035) 1px, transparent 1px);
  background-size: 44px 44px;
  mask-image: radial-gradient(ellipse 72% 62% at 50% 38%, black 28%, transparent 74%);
  -webkit-mask-image: radial-gradient(ellipse 72% 62% at 50% 38%, black 28%, transparent 74%);
}

.home-hero .container {
  position: relative;
  z-index: 1;
}

.home-hero h1 {
  font-size: clamp(32px, 4.4vw, 52px);
  font-weight: 700;
  color: var(--navy);
  line-height: 1.08;
  letter-spacing: 0;
  max-width: 760px;
  margin-bottom: 12px;
}

.home-hero .hero-tagline {
  font-size: clamp(16px, 1.7vw, 18px);
  color: var(--text-secondary);
  line-height: 1.55;
  max-width: 640px;
  margin-bottom: 26px;
}

.lookup-section {
  padding: 44px 0;
}

.lookup-index {
  display: grid;
  gap: 10px;
}

.lookup-row {
  display: grid;
  grid-template-columns: 74px minmax(0, 1fr) auto;
  align-items: center;
  gap: 18px;
  background: var(--white);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 14px 18px;
  color: inherit;
  text-decoration: none;
  transition: border-color var(--transition-fast), box-shadow var(--transition-fast), transform var(--transition-fast);
}

.lookup-row:hover {
  border-color: var(--blue);
  box-shadow: var(--shadow);
  text-decoration: none;
  transform: translateY(-1px);
}

.lookup-mark {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 74px;
  height: 48px;
  border-radius: var(--radius-sm);
  background: var(--surface);
  color: var(--blue);
  font-size: 14px;
  font-weight: 700;
  letter-spacing: 0.02em;
}

.lookup-body {
  display: grid;
  gap: 4px;
  min-width: 0;
}

.lookup-name {
  font-size: 16px;
  font-weight: 700;
  color: var(--navy);
}

.lookup-desc {
  font-size: 13.5px;
  color: var(--text-secondary);
  line-height: 1.5;
}

.lookup-examples {
  font-size: 11px;
  color: var(--text-muted);
}

.lookup-open {
  font-size: 13px;
  font-weight: 600;
  color: var(--blue);
  white-space: nowrap;
}

.code-chip-group {
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  gap: 8px;
  margin-bottom: 10px;
}

.code-chip-label {
  width: 92px;
  font-size: 12px;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.07em;
  color: var(--text-muted);
}

.code-chip {
  padding: 7px 13px;
  border: 1px solid var(--border);
  border-radius: 20px;
  background: var(--white);
  color: var(--text);
  font-size: 12.5px;
  font-weight: 600;
  transition: all var(--transition-fast);
}

.code-chip:hover {
  border-color: var(--blue);
  color: var(--blue);
  background: var(--surface);
  text-decoration: none;
}

.directory-row {
  display: grid;
  grid-template-columns: 150px minmax(0, 1fr) auto;
  align-items: center;
  gap: 14px;
  padding: 11px 4px;
  border-bottom: 1px solid var(--border-light);
  color: var(--text);
  text-decoration: none;
}

.directory-row:last-child {
  border-bottom: none;
}

.directory-row:hover {
  background: var(--surface);
  text-decoration: none;
}

.directory-code {
  color: var(--blue);
  font-size: 14px;
  font-weight: 700;
}

.directory-value {
  font-size: 14px;
  color: var(--text-secondary);
  min-width: 0;
}

.directory-value a {
  color: var(--text);
}

.directory-value a:hover {
  color: var(--blue);
}

.directory-offset {
  font-size: 12px;
  color: var(--text-muted);
  white-space: nowrap;
}

.inline-link-row {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  margin-top: 18px;
  font-size: 14px;
  font-weight: 600;
}

.inline-link-row span {
  color: var(--border);
}

.dialing-block {
  background: var(--surface);
  border: 1px solid var(--border-light);
  border-radius: var(--radius);
  padding: 24px 26px;
  margin-bottom: 28px;
}

.dialing-block h2 {
  font-size: 20px;
  color: var(--navy);
  margin-bottom: 10px;
}

.dialing-block p {
  color: var(--text-secondary);
  line-height: 1.65;
  margin-bottom: 8px;
}

.dialing-format {
  font-size: 14px;
  color: var(--blue);
  background: var(--white);
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
  padding: 10px 14px;
  margin: 12px 0;
  overflow-x: auto;
}

.code-pattern {
  font-size: 13px;
  overflow-wrap: anywhere;
}

.country-card-flag {
  width: 52px;
  height: 39px;
  object-fit: cover;
  border: 1px solid var(--border);
  border-radius: 4px;
  flex-shrink: 0;
  background: var(--surface);
}

.country-card-id {
  display: none;
}

.country-card-link {
  align-items: center;
  gap: 12px;
}

.td-count {
  text-align: right;
  color: var(--text-muted);
  font-variant-numeric: tabular-nums;
}

.search-suggest-item {
  display: grid;
  grid-template-columns: 86px 64px minmax(0, 1fr);
  align-items: center;
  gap: 12px;
}

.search-suggest-type {
  font-size: 11px;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.06em;
  color: var(--blue);
}

.search-suggest-code {
  font-family: var(--font-mono);
  font-size: 12px;
  font-weight: 600;
  color: var(--text);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.search-suggest-main {
  display: grid;
  gap: 2px;
  min-width: 0;
}

.search-suggest-name {
  font-weight: 500;
  font-size: 14px;
  color: var(--text);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.search-suggest-sublabel {
  font-size: 12px;
  color: var(--text-muted);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

@media (max-width: 768px) {
  .home-hero {
    padding: 36px 0 32px;
  }

  .home-hero h1 {
    font-size: clamp(28px, 6vw, 38px);
  }

  .lookup-row {
    grid-template-columns: 58px minmax(0, 1fr);
    gap: 12px;
  }

  .lookup-mark {
    width: 58px;
    height: 44px;
    font-size: 13px;
  }

  .lookup-open {
    grid-column: 2;
  }

  .directory-row {
    grid-template-columns: 104px minmax(0, 1fr);
  }

  .directory-offset {
    grid-column: 2;
  }

  .search-suggest-item {
    grid-template-columns: 72px 52px minmax(0, 1fr);
    gap: 8px;
  }
}

@media (max-width: 480px) {
  .country-card,
  .country-card-link {
    min-width: 0;
  }

  .country-card-link {
    gap: 8px;
  }

  .country-card-flag {
    width: 44px;
    height: 33px;
  }

  .code-chip-label {
    width: 100%;
  }

  .lookup-row {
    grid-template-columns: 1fr;
    padding: 12px 14px;
  }

  .lookup-mark {
    width: 44px;
    height: 38px;
  }

  .lookup-open {
    grid-column: auto;
  }

  .directory-row {
    grid-template-columns: 1fr;
    gap: 4px;
    padding: 12px 4px;
  }

  .directory-offset {
    grid-column: auto;
  }

  .search-suggest-item {
    grid-template-columns: 1fr;
    gap: 4px;
  }

  .postal-match-list a {
    flex-wrap: wrap;
  }

  .postal-match-format {
    width: 100%;
    text-align: left;
  }

  .dialing-block {
    padding: 18px;
  }
}
