/* ═══════════════════════════════════════════════
   RESET & TOKENS
═══════════════════════════════════════════════ */
*,
*::before,
*::after {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
}

:root {
  /* Brand palette */
  --cream: #faf7f2;
  --cream2: #f4ede3;
  --cream3: #ece4d8;
  --white: #ffffff;
  --accent: #1a6b3c;
  --accent2: #228b4e;
  --accent-lt: #e8f5ee;
  --accent-md: #b8dfca;
  --accent-dark: #145530;
  --red: #b91c1c;
  --border: #ddd5c8;
  --border2: #c8bfb2;
  --text: #1c1714;
  --text2: #5c5248;
  --text3: #716860; /* WCAG fix: was #9c8f84 (3.15:1 on white, FAIL) → now 5.45:1 */
  --shadow-sm: rgba(60, 40, 20, 0.06);
  --shadow-md: rgba(60, 40, 20, 0.13);
  --shadow-lg: rgba(60, 40, 20, 0.18);

  /* Semantic aliases used by header/footer components */
  --info-50: #eff6ff;
  --info-700: #1d4ed8;
  --warning-50: #fffbeb;
  --warning-700: #b45309;

  --nav-h: 64px;
}

html {
  scroll-behavior: smooth;
}

body {
  min-height: 100vh;
  font-family: "DM Sans", sans-serif;
  background: var(--cream);
  background-image: radial-gradient(circle, #cfc5b8 1px, transparent 1px);
  background-size: 22px 22px;
  color: var(--text);
  display: flex;
  flex-direction: column;
}

a {
  text-decoration: none;
  color: inherit;
}
button {
  font-family: inherit;
  cursor: pointer;
}
svg {
  display: inline-block;
  vertical-align: middle;
}

/* ═══════════════════════════════════════════════
   MASTHEAD / NAV
═══════════════════════════════════════════════ */
.masthead-top {
  position: sticky;
  top: 0;
  z-index: 100;
  background: var(--white);
  border-bottom: 1px solid var(--border);
  box-shadow: 0 2px 12px var(--shadow-sm);
}

.masthead {
  max-width: 1200px;
  margin: 0 auto;
  padding: 0 1.5rem;
  height: var(--nav-h);
  display: flex;
  align-items: center;
  gap: 0;
}

/* Logo */
.logo {
  display: flex;
  align-items: center;
  gap: 8px;
  font-family: "DM Sans", sans-serif;
  font-size: 1.1rem;
  font-weight: 700;
  color: var(--text);
  letter-spacing: -0.02em;
  margin-right: 2rem;
  flex-shrink: 0;
  transition: opacity 0.15s;
}
.logo:hover {
  opacity: 0.8;
}

.logo-icon {
  width: 30px;
  height: 30px;
  background: var(--accent);
  border-radius: 8px;
  display: flex;
  align-items: center;
  justify-content: center;
  color: #fff;
  flex-shrink: 0;
}
.logo-icon svg {
  width: 16px;
  height: 16px;
}

/* Main nav */
.main-nav {
  display: flex;
  align-items: center;
  gap: 2px;
  flex: 1;
}

.nav-item {
  position: relative;
}

.nav-link {
  display: inline-flex;
  align-items: center;
  gap: 5px;
  padding: 8px 12px;
  border-radius: 8px;
  font-size: 13.5px;
  font-weight: 500;
  color: var(--text2);
  background: transparent;
  border: none;
  white-space: nowrap;
  transition:
    background 0.14s,
    color 0.14s;
}
.nav-link svg {
  width: 15px;
  height: 15px;
  flex-shrink: 0;
}
.nav-link:hover,
.nav-link.active {
  background: var(--accent-lt);
  color: var(--accent);
}

.nav-chevron {
  display: inline-flex;
  transition: transform 0.2s;
}
.nav-chevron svg {
  width: 13px;
  height: 13px;
}
.nav-item:hover .nav-chevron {
  transform: rotate(180deg);
}

/* Mega dropdown */
.mega-dropdown {
  position: absolute;
  top: calc(100% + 8px);
  left: 0;
  background: var(--white);
  border: 1px solid var(--border);
  border-radius: 14px;
  box-shadow: 0 8px 32px var(--shadow-md);
  min-width: 280px;
  padding: 1rem;
  z-index: 200;
  animation: dropIn 0.18s ease both;
}

.mega-dropdown.wide {
  min-width: 560px;
}

@keyframes dropIn {
  from {
    opacity: 0;
    transform: translateY(-6px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

.mega-dropdown[hidden] {
  display: none;
}

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

.dropdown-header {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 0 4px 12px;
  border-bottom: 1px solid var(--border);
  margin-bottom: 10px;
}

.dropdown-header-icon {
  width: 38px;
  height: 38px;
  border-radius: 10px;
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
  color: var(--accent);
  background: var(--accent-lt);
}
.dropdown-header-icon svg {
  width: 18px;
  height: 18px;
}

.dropdown-header h4 {
  font-size: 13px;
  font-weight: 700;
  color: var(--text);
  margin-bottom: 2px;
}
.dropdown-header p {
  font-size: 12px;
  color: var(--text3);
}

.dropdown-cols {
  display: grid;
  gap: 4px;
}
.dropdown-cols.cols-2 {
  grid-template-columns: 1fr 1fr;
}
.dropdown-cols.cols-3 {
  grid-template-columns: 1fr 1fr 1fr;
}
.dropdown-cols:not(.cols-2):not(.cols-3) {
  grid-template-columns: 1fr 1fr;
}

.dropdown-link {
  display: flex;
  align-items: center;
  gap: 9px;
  padding: 9px 10px;
  border-radius: 8px;
  font-size: 13px;
  font-weight: 500;
  color: var(--text2);
  transition:
    background 0.12s,
    color 0.12s;
}
.dropdown-link:hover {
  background: var(--accent-lt);
  color: var(--accent);
}

.dropdown-link-icon {
  width: 28px;
  height: 28px;
  background: var(--cream2);
  border-radius: 6px;
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
}
.dropdown-link-icon svg {
  width: 14px;
  height: 14px;
}
.dropdown-link:hover .dropdown-link-icon {
  background: var(--accent-md);
}

.dropdown-link-text {
  display: flex;
  flex-direction: column;
}
.dropdown-link-desc {
  font-size: 11px;
  font-weight: 400;
  color: var(--text3);
  margin-top: 1px;
}

/* Nav right */
.nav-right {
  display: flex;
  align-items: center;
  gap: 10px;
  margin-left: auto;
}

.btn {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 8px 16px;
  border-radius: 8px;
  font-size: 13.5px;
  font-weight: 600;
  border: none;
  transition: all 0.15s;
  cursor: pointer;
}
.btn svg {
  width: 15px;
  height: 15px;
}
.btn-primary {
  background: var(--accent);
  color: #fff;
}
.btn-primary:hover {
  background: var(--accent-dark);
}
.btn-sm {
  padding: 6px 14px;
  font-size: 12.5px;
}

/* Hamburger */
.menu-toggle {
  display: none;
  align-items: center;
  justify-content: center;
  width: 36px;
  height: 36px;
  border-radius: 8px;
  border: 1px solid var(--border);
  background: transparent;
  color: var(--text2);
  transition: background 0.14s;
}
.menu-toggle svg {
  width: 18px;
  height: 18px;
}
.menu-toggle:hover {
  background: var(--cream2);
}

/* ═══════════════════════════════════════════════
   PAGE BODY
═══════════════════════════════════════════════ */
.page {
  flex: 1;
  display: flex;
  flex-direction: column;
  align-items: center;
  padding: 3.5rem 1rem 0;
  position: relative;
}

/* Soft green radial glow */
.page::before {
  content: "";
  position: fixed;
  top: -120px;
  left: 50%;
  transform: translateX(-50%);
  width: 700px;
  height: 420px;
  background: radial-gradient(
    ellipse,
    rgba(26, 107, 60, 0.07) 0%,
    transparent 68%
  );
  pointer-events: none;
  z-index: 0;
}

.converter-wrap {
  display: flex;
  flex-direction: column;
  align-items: center;
  width: 100%;
  padding-bottom: 3rem;
  position: relative;
  z-index: 1;
}

/* ── Converter header ── */
.conv-header {
  text-align: center;
  margin-bottom: 2rem;
  animation: slideUp 0.5s ease both;
}

.eyebrow {
  display: inline-flex;
  align-items: center;
  gap: 9px;
  font-family: "DM Mono", monospace;
  font-size: 11px;
  letter-spacing: 0.18em;
  color: var(--accent);
  text-transform: uppercase;
  margin-bottom: 0.85rem;
}
.eyebrow::before,
.eyebrow::after {
  content: "";
  display: block;
  width: 22px;
  height: 1px;
  background: var(--accent);
  opacity: 0.45;
}

h1 {
  font-family: "Playfair Display", serif;
  font-size: clamp(2rem, 5vw, 3rem);
  font-weight: 800;
  letter-spacing: -0.025em;
  line-height: 1.05;
  color: var(--text);
}
h1 em {
  font-style: italic;
  color: var(--accent);
}

.rate-pill {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  margin-top: 1.1rem;
  background: var(--white);
  border: 1px solid var(--border);
  border-radius: 100px;
  padding: 6px 16px;
  font-family: "DM Mono", monospace;
  font-size: 12px;
  color: var(--text2);
  box-shadow: 0 2px 10px var(--shadow-sm);
  animation: slideUp 0.5s 0.08s ease both;
}

.live-dot {
  width: 7px;
  height: 7px;
  background: var(--accent2);
  border-radius: 50%;
  flex-shrink: 0;
  animation: blink 2s infinite;
}

@keyframes blink {
  0%,
  100% {
    opacity: 1;
    box-shadow: 0 0 0 0 rgba(34, 139, 78, 0.5);
  }
  50% {
    opacity: 0.6;
    box-shadow: 0 0 0 5px rgba(34, 139, 78, 0);
  }
}

.rate-num {
  color: var(--accent);
  font-weight: 500;
}
.rate-sep {
  color: var(--border2);
}

/* ── Converter card ── */
.card {
  width: 100%;
  max-width: 460px;
  background: var(--white);
  border: 1px solid var(--border);
  border-radius: 24px;
  overflow: hidden;
  box-shadow:
    0 6px 28px var(--shadow-sm),
    0 1px 5px var(--shadow-md);
  animation: slideUp 0.5s 0.14s ease both;
  position: relative;
}
.card::before {
  content: "";
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  height: 3px;
  background: linear-gradient(90deg, var(--accent), #5cb87a, var(--accent));
}

/* ── Fields ── */
.field {
  padding: 1.45rem 1.6rem;
  transition: background 0.18s;
}
.field:hover {
  background: #fdfbf9;
}
.field.active {
  background: var(--accent-lt);
}

.field-top {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 0.6rem;
}

.field-label {
  display: flex;
  align-items: center;
  gap: 7px;
  font-size: 11px;
  font-weight: 600;
  letter-spacing: 0.11em;
  text-transform: uppercase;
  color: var(--text3);
}

/* Flags */
.flag {
  width: 22px;
  height: 15px;
  border-radius: 3px;
  overflow: hidden;
  flex-shrink: 0;
  position: relative;
  display: inline-block;
}
.flag-us {
  background: #b22234;
}
.flag-us::before {
  content: "";
  position: absolute;
  inset: 0;
  background: repeating-linear-gradient(
    to bottom,
    transparent 0%,
    transparent 14.3%,
    rgba(255, 255, 255, 0.88) 14.3%,
    rgba(255, 255, 255, 0.88) 28.6%
  );
}
.flag-us::after {
  content: "";
  position: absolute;
  top: 0;
  left: 0;
  width: 40%;
  height: 54%;
  background: #3c3b6e;
}
.flag-bd {
  background: #006a4e;
}
.flag-bd::after {
  content: "";
  position: absolute;
  width: 9px;
  height: 9px;
  background: #f42a41;
  border-radius: 50%;
  top: 50%;
  left: 54%;
  transform: translate(-50%, -50%);
}

.badge {
  font-family: "DM Mono", monospace;
  font-size: 11px;
  font-weight: 500;
  color: var(--accent);
  background: var(--accent-lt);
  border: 1px solid var(--accent-md);
  border-radius: 6px;
  padding: 3px 9px;
  letter-spacing: 0.05em;
}

.field-body {
  display: flex;
  align-items: baseline;
  gap: 5px;
}

.sym {
  font-family: "DM Mono", monospace;
  font-size: 22px;
  font-weight: 400;
  color: var(--text3);
  flex-shrink: 0;
  line-height: 1;
}

.field input {
  flex: 1;
  background: transparent;
  border: none;
  outline: none;
  font-family: "Playfair Display", serif;
  font-size: clamp(30px, 6.5vw, 42px);
  font-weight: 700;
  letter-spacing: -0.025em;
  color: var(--text);
  min-width: 0;
  caret-color: var(--accent);
}
.field input::placeholder {
  color: var(--text3); /* WCAG fix: was #d8cfc5 (1.54:1 FAIL) */
}
.field input::-webkit-inner-spin-button {
  -webkit-appearance: none;
}

.result-val {
  font-family: "Playfair Display", serif;
  font-size: clamp(30px, 6.5vw, 42px);
  font-weight: 700;
  letter-spacing: -0.025em;
  color: var(--accent);
  word-break: break-all;
}
.result-val.pop {
  animation: popIn 0.26s ease;
}
@keyframes popIn {
  from {
    opacity: 0.2;
    transform: translateY(5px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}
.field-out .sym {
  color: var(--accent);
  opacity: 0.55;
}

/* ── Swap divider ── */
.swap-row {
  display: flex;
  align-items: center;
  padding: 0 1.6rem;
  background: var(--cream2);
  border-top: 1px solid var(--border);
  border-bottom: 1px solid var(--border);
}
.swap-line {
  flex: 1;
  height: 1px;
  background: var(--border);
}

.swap-btn {
  display: flex;
  align-items: center;
  gap: 7px;
  background: var(--white);
  border: 1px solid var(--border2);
  border-radius: 100px;
  padding: 7px 16px;
  font-family: "DM Mono", monospace;
  font-size: 11px;
  letter-spacing: 0.06em;
  color: var(--text2);
  box-shadow: 0 1px 4px var(--shadow-sm);
  transition: all 0.17s;
  margin: 10px 12px;
}
.swap-btn:hover {
  background: var(--accent-lt);
  border-color: var(--accent-md);
  color: var(--accent);
  box-shadow: 0 3px 12px rgba(26, 107, 60, 0.13);
  transform: scale(1.04);
}
.swap-btn:active {
  transform: scale(0.97);
}
.s-icon {
  font-size: 14px;
  display: inline-block;
  transition: transform 0.35s;
}
.swap-btn:hover .s-icon {
  transform: rotate(180deg);
}

.dir-lbl {
  font-family: "DM Mono", monospace;
  font-size: 11px;
  color: var(--text3);
  letter-spacing: 0.05em;
}

/* ── Quick presets ── */
.quick {
  padding: 1.1rem 1.6rem;
  background: var(--cream2);
  border-top: 1px solid var(--border);
}
.q-head {
  font-size: 10px;
  font-weight: 600;
  letter-spacing: 0.13em;
  text-transform: uppercase;
  color: var(--text3);
  margin-bottom: 9px;
}
.q-row {
  display: flex;
  gap: 7px;
  flex-wrap: wrap;
}

.q-btn {
  flex: 1;
  min-width: 52px;
  font-family: "DM Mono", monospace;
  font-size: 12px;
  padding: 7px 4px;
  border: 1px solid var(--border);
  border-radius: 8px;
  background: var(--white);
  color: var(--text2);
  box-shadow: 0 1px 3px var(--shadow-sm);
  transition: all 0.14s;
}
.q-btn:hover {
  border-color: var(--accent-md);
  color: var(--accent);
  background: var(--accent-lt);
}
.q-btn.on {
  border-color: var(--accent);
  color: var(--accent);
  background: var(--accent-lt);
  font-weight: 500;
}

/* ── Stats grid ── */
.stats {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 1px;
  background: var(--border);
  border-top: 1px solid var(--border);
}
.stat {
  background: var(--white);
  padding: 1rem 1.3rem;
  transition: background 0.13s;
}
.stat:hover {
  background: #fdfbf9;
}
.stat-lbl {
  font-size: 10px;
  font-weight: 600;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: var(--text3);
  margin-bottom: 5px;
}
.stat-val {
  font-family: "DM Mono", monospace;
  font-size: 15px;
  font-weight: 500;
  color: var(--text);
}
.stat-val.up {
  color: var(--accent);
}
.stat-val.down {
  color: var(--red);
}

/* ── Converter footer note ── */
.conv-note {
  margin-top: 1rem;
  font-family: "DM Mono", monospace;
  font-size: 10px;
  color: var(--text3);
  letter-spacing: 0.07em;
  text-align: center;
  line-height: 1.7;
  animation: slideUp 0.5s 0.3s ease both;
}

/* ═══════════════════════════════════════════════
   SEO CONTENT
═══════════════════════════════════════════════ */
.seo-wrap {
  width: 100%;
  max-width: 860px;
  margin: 0 auto;
  padding: 0 1rem 4rem;
  position: relative;
  z-index: 1;
}

.seo-section {
  margin-bottom: 3rem;
}

.seo-section h2 {
  font-family: "Playfair Display", serif;
  font-size: clamp(1.35rem, 3vw, 1.75rem);
  font-weight: 700;
  letter-spacing: -0.02em;
  color: var(--text);
  margin-bottom: 1rem;
  padding-bottom: 0.65rem;
  border-bottom: 2px solid var(--cream3);
  position: relative;
}
.seo-section h2::after {
  content: "";
  position: absolute;
  bottom: -2px;
  left: 0;
  width: 48px;
  height: 2px;
  background: var(--accent);
}

.seo-section h3 {
  font-size: 1rem;
  font-weight: 600;
  color: var(--text);
  margin: 1.25rem 0 0.4rem;
}

.seo-section p {
  font-size: 0.95rem;
  line-height: 1.8;
  color: var(--text2);
  margin-bottom: 0.85rem;
}
.seo-section p strong {
  color: var(--text);
  font-weight: 600;
}

/* Rate table */
.rate-table {
  width: 100%;
  border-collapse: collapse;
  font-size: 0.9rem;
  margin: 1rem 0 0.5rem;
  border-radius: 12px;
  overflow: hidden;
  box-shadow: 0 2px 10px var(--shadow-sm);
}
.rate-table thead tr {
  background: var(--accent);
  color: #fff;
}
.rate-table thead th {
  padding: 11px 16px;
  text-align: left;
  font-weight: 600;
  font-size: 11px;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}
.rate-table tbody tr {
  background: var(--white);
  border-bottom: 1px solid var(--border);
  transition: background 0.12s;
}
.rate-table tbody tr:last-child {
  border-bottom: none;
}
.rate-table tbody tr:hover {
  background: var(--accent-lt);
}
.rate-table td {
  padding: 11px 16px;
  color: var(--text2);
  font-family: "DM Mono", monospace;
}
.rate-table td:first-child {
  font-family: "DM Sans", sans-serif;
  font-weight: 500;
  color: var(--text);
}
.rate-table td.up {
  color: var(--accent);
  font-weight: 500;
}
.rate-table td.down {
  color: var(--red);
  font-weight: 500;
}

/* Info cards */
.info-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
  gap: 14px;
  margin-top: 1rem;
}
.info-card {
  background: var(--white);
  border: 1px solid var(--border);
  border-radius: 14px;
  padding: 1.2rem 1.3rem;
  box-shadow: 0 2px 8px var(--shadow-sm);
  transition:
    transform 0.15s,
    box-shadow 0.15s;
}
.info-card:hover {
  transform: translateY(-2px);
  box-shadow: 0 5px 18px var(--shadow-sm);
}
.info-card-icon {
  font-size: 22px;
  margin-bottom: 0.6rem;
  display: block;
}
.info-card h3 {
  font-size: 0.92rem;
  font-weight: 600;
  color: var(--text);
  margin: 0 0 0.4rem;
}
.info-card p {
  font-size: 0.85rem;
  color: var(--text2);
  line-height: 1.6;
  margin: 0;
}

/* Divider */
.seo-divider {
  width: 100%;
  height: 1px;
  background: linear-gradient(90deg, transparent, var(--border), transparent);
  margin: 1rem 0 3rem;
}

/* Tips list */
.tips-list {
  list-style: none;
  margin-top: 0.75rem;
}
.tips-list li {
  display: flex;
  gap: 12px;
  align-items: flex-start;
  padding: 10px 0;
  border-bottom: 1px solid var(--cream3);
  font-size: 0.9rem;
  color: var(--text2);
  line-height: 1.6;
}
.tips-list li:last-child {
  border-bottom: none;
}
.tip-num {
  flex-shrink: 0;
  width: 24px;
  height: 24px;
  background: var(--accent-lt);
  border: 1px solid var(--accent-md);
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  font-family: "DM Mono", monospace;
  font-size: 11px;
  font-weight: 500;
  color: var(--accent);
  margin-top: 1px;
}

/* FAQ */
.faq-list {
  list-style: none;
  margin-top: 0.5rem;
}
.faq-item {
  border: 1px solid var(--border);
  border-radius: 12px;
  background: var(--white);
  margin-bottom: 10px;
  overflow: hidden;
  box-shadow: 0 1px 4px var(--shadow-sm);
  transition: box-shadow 0.15s;
}
.faq-item:hover {
  box-shadow: 0 3px 12px var(--shadow-sm);
}
.faq-q {
  width: 100%;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  padding: 14px 18px;
  background: transparent;
  border: none;
  text-align: left;
  font-size: 0.93rem;
  font-weight: 600;
  color: var(--text);
  transition: background 0.15s;
}
.faq-q:hover {
  background: var(--cream2);
}
.faq-chevron {
  font-size: 12px;
  color: var(--accent);
  transition: transform 0.25s;
  flex-shrink: 0;
}
.faq-item.open .faq-chevron {
  transform: rotate(180deg);
}
.faq-a {
  max-height: 0;
  overflow: hidden;
  transition:
    max-height 0.3s ease,
    padding 0.3s ease;
  padding: 0 18px;
  font-size: 0.9rem;
  line-height: 1.75;
  color: var(--text2);
}
.faq-item.open .faq-a {
  max-height: 300px;
  padding: 0 18px 14px;
}

/* ═══════════════════════════════════════════════
   SITE FOOTER
   FIX 1 — contrast: .footer-tagline and .footer-col-title
            changed from var(--text3) #9c8f84 → var(--text2) #5c5248 (and --text3 globally updated to #716860)
            which passes 4.5:1 on white background
   FIX 2 — touch targets: .footer-link
            added min-height + padding so tap area ≥ 48px
═══════════════════════════════════════════════ */
.site-footer {
  background: var(--white);
  border-top: 1px solid var(--border);
  margin-top: auto;
}

.footer-top {
  max-width: 1200px;
  margin: 0 auto;
  padding: 3rem 1.5rem 2rem;
  display: grid;
  grid-template-columns: 2fr 1fr 1fr 1fr 1fr;
  gap: 2rem;
}

/* Brand col */
.footer-logo {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  font-size: 1.05rem;
  font-weight: 700;
  color: var(--text);
  letter-spacing: -0.02em;
  margin-bottom: 0.85rem;
  transition: opacity 0.15s;
}
.footer-logo:hover {
  opacity: 0.8;
}

.footer-logo-icon {
  width: 28px;
  height: 28px;
  background: var(--accent);
  border-radius: 7px;
  display: flex;
  align-items: center;
  justify-content: center;
  color: #fff;
}
.footer-logo-icon svg {
  width: 14px;
  height: 14px;
}

/* FIX 1a — was color: var(--text3) = #9c8f84 (fails contrast on white)
             now color: var(--text2) = #5c5248 (passes 4.5:1 on white) */
.footer-tagline {
  font-size: 13px;
  color: var(--text2);
  line-height: 1.6;
  max-width: 220px;
}

/* Footer cols */
/* FIX 1b — was color: var(--text3) = #9c8f84 (fails contrast on white)
             now color: var(--text2) = #5c5248 (passes 4.5:1 on white) */
.footer-col-title {
  font-size: 11px;
  font-weight: 700;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--text2);
  margin-bottom: 1rem;
}

.footer-links {
  display: flex;
  flex-direction: column;
  gap: 6px;
}

/* FIX 2 — touch targets: added min-height: 48px and vertical padding
           so every footer link meets the 48×48 px minimum tap area.
           display changed to flex (was inline-flex) so min-height applies
           predictably in a column layout. */
.footer-link {
  display: flex;
  align-items: center;
  gap: 7px;
  font-size: 13.5px;
  color: var(--text2);
  transition: color 0.14s;
  min-height: 38px;
  padding: 10px 6px;
}
.footer-link svg {
  width: 13px;
  height: 13px;
  flex-shrink: 0;
  color: var(--text3);
}
.footer-link:hover {
  color: var(--accent);
}
.footer-link:hover svg {
  color: var(--accent);
}

/* Footer mid – newsletter */
.footer-mid {
  max-width: 1200px;
  margin: 0 auto;
  padding: 1.5rem 1.5rem;
  border-top: 1px solid var(--border);
  display: flex;
  align-items: center;
  gap: 2rem;
  flex-wrap: wrap;
}

.footer-mid p:first-child {
  font-weight: 600;
  font-size: 14px;
  color: var(--text);
}
.footer-mid p:last-of-type {
  font-size: 12px;
  color: var(--text3);
  margin-top: 2px;
}

.footer-newsletter {
  display: flex;
  gap: 8px;
  flex: 1;
  min-width: 260px;
}
.footer-newsletter input {
  flex: 1;
  padding: 8px 14px;
  border: 1px solid var(--border);
  border-radius: 8px;
  background: var(--cream);
  font-size: 13px;
  color: var(--text);
  outline: none;
  transition: border-color 0.15s;
  font-family: "DM Sans", sans-serif;
}
.footer-newsletter input:focus {
  border-color: var(--accent-md);
}
.footer-newsletter input::placeholder {
  color: var(--text3);
}

.footer-mid-right {
  display: flex;
  gap: 12px;
  margin-left: auto;
  flex-shrink: 0;
}
.footer-mid-link {
  font-size: 12px;
  color: var(--text3);
  transition: color 0.14s;
}
.footer-mid-link:hover {
  color: var(--accent);
}

/* Footer bottom */
.footer-bottom {
  max-width: 1200px;
  margin: 0 auto;
  padding: 1.1rem 1.5rem;
  border-top: 1px solid var(--border);
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
  flex-wrap: wrap;
}
.footer-bottom p {
  font-size: 12px;
  color: var(--text3);
}

.footer-bottom-right {
  display: flex;
  align-items: center;
  gap: 1.5rem;
  font-size: 12px;
  color: var(--text3);
}
.footer-bottom-right svg {
  width: 13px;
  height: 13px;
  color: #e05252;
}

.kbd {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 1px 6px;
  background: var(--cream3);
  border: 1px solid var(--border2);
  border-radius: 4px;
  font-family: "DM Mono", monospace;
  font-size: 10px;
  color: var(--text2);
}

/* ═══════════════════════════════════════════════
   ANIMATIONS
═══════════════════════════════════════════════ */
@keyframes slideUp {
  from {
    opacity: 0;
    transform: translateY(16px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

/* ═══════════════════════════════════════════════
   RESPONSIVE
═══════════════════════════════════════════════ */
@media (max-width: 960px) {
  .footer-top {
    grid-template-columns: 1fr 1fr 1fr;
  }
  .footer-brand {
    grid-column: 1 / -1;
  }
}

@media (max-width: 768px) {
  .main-nav {
    display: none;
  }
  .main-nav.open {
    display: flex;
    flex-direction: column;
    align-items: stretch;
    position: absolute;
    top: var(--nav-h);
    left: 0;
    right: 0;
    background: var(--white);
    border-bottom: 1px solid var(--border);
    padding: 1rem 1.5rem;
    box-shadow: 0 8px 20px var(--shadow-md);
    z-index: 90;
    gap: 4px;
  }
  .nav-item {
    width: 100%;
  }
  .nav-link {
    width: 100%;
    justify-content: space-between;
  }
  .mega-dropdown {
    position: static;
    box-shadow: none;
    border-radius: 10px;
    margin-top: 4px;
  }
  .mega-dropdown.wide {
    min-width: unset;
  }
  .dropdown-cols.cols-3 {
    grid-template-columns: 1fr 1fr;
  }
  .menu-toggle {
    display: flex;
  }
  .footer-top {
    grid-template-columns: 1fr 1fr;
  }
  .footer-mid {
    flex-direction: column;
    align-items: flex-start;
    gap: 1rem;
  }
  .footer-mid-right {
    margin-left: 0;
  }
}

@media (max-width: 500px) {
  .card {
    border-radius: 18px;
  }
  .field {
    padding: 1.1rem 1.2rem;
  }
  .swap-row {
    padding: 0 1.2rem;
  }
  .quick {
    padding: 1rem 1.2rem;
  }
  .stat {
    padding: 0.85rem 1rem;
  }
  .footer-top {
    grid-template-columns: 1fr;
  }
  .info-grid {
    grid-template-columns: 1fr 1fr;
  }
  .rate-table thead th,
  .rate-table td {
    padding: 9px 10px;
    font-size: 0.82rem;
  }
  .footer-bottom {
    flex-direction: column;
    align-items: flex-start;
  }
  .footer-bottom-right {
    flex-direction: column;
    gap: 6px;
  }
}
/* ─── Page Shell ──────────────────────────────────────── */
.page {
  max-width: 900px;
  margin: 0 auto;
  padding: 80px 24px 120px;
}

/* ─── Section ─────────────────────────────────────────── */
.section {
  position: relative;
}

/* Decorative vertical rule on the left */
.section::before {
  content: "";
  position: absolute;
  left: -24px;
  top: 0;
  bottom: 0;
  width: 2px;
  background: linear-gradient(to bottom, var(--accent-md), transparent);
  border-radius: 2px;
  opacity: 0.5;
}

/* ─── Section Label ───────────────────────────────────── */
.section-label {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  font-family: var(--font-body);
  font-size: 11px;
  font-weight: 500;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--accent);
  background: var(--accent-lt);
  border: 1px solid var(--accent-md);
  border-radius: 100px;
  padding: 4px 14px;
  margin-bottom: 16px;
  animation: fadeUp 0.5s ease both;
}

.section-label::before {
  content: "";
  display: inline-block;
  width: 6px;
  height: 6px;
  border-radius: 50%;
  background: var(--accent);
}

/* ─── Heading ─────────────────────────────────────────── */
#howto-heading {
  font-family: var(--font-display);
  font-size: clamp(26px, 4vw, 38px);
  font-weight: 500;
  color: var(--text);
  line-height: 1.25;
  letter-spacing: -0.01em;
  margin-bottom: 14px;
  animation: fadeUp 0.5s 0.07s ease both;
}

/* ─── Intro ───────────────────────────────────────────── */
.section-intro {
  font-size: 16px;
  color: var(--text2);
  line-height: 1.75;
  max-width: 580px;
  margin-bottom: 44px;
  animation: fadeUp 0.5s 0.12s ease both;
}

/* ─── Grid ────────────────────────────────────────────── */
.explain-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 20px;
  animation: fadeUp 0.5s 0.18s ease both;
}

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

/* ─── Cards ───────────────────────────────────────────── */
.explain-card {
  background: var(--white);
  border: 1px solid var(--border);
  border-radius: 18px;
  padding: 28px 26px;
  box-shadow:
    0 2px 8px var(--shadow-sm),
    0 0 0 0 var(--accent-md);
  transition:
    box-shadow 0.25s ease,
    transform 0.25s ease,
    border-color 0.25s ease;
}

.explain-card:hover {
  box-shadow: 0 6px 24px var(--shadow-md);
  transform: translateY(-2px);
  border-color: var(--border2);
}

.explain-card h3 {
  font-family: var(--font-display);
  font-size: 17px;
  font-weight: 500;
  color: var(--text);
  margin-bottom: 14px;
  padding-bottom: 12px;
  border-bottom: 1px solid var(--border);
}

.explain-card > p {
  font-size: 14.5px;
  color: var(--text2);
  line-height: 1.75;
  margin-bottom: 4px;
}

/* ─── Formula Block ───────────────────────────────────── */
.big-formula {
  margin: 18px 0;
  padding: 16px 20px;
  background: var(--accent-lt);
  border: 1px solid var(--accent-md);
  border-radius: 12px;
  font-family: var(--font-display);
  font-size: 19px;
  font-weight: 600;
  color: var(--accent-dark);
  text-align: center;
  letter-spacing: 0.02em;
  position: relative;
  overflow: hidden;
}

/* Subtle shimmer accent on formula */
.big-formula::after {
  content: "";
  position: absolute;
  inset: 0;
  background: linear-gradient(
    120deg,
    transparent 30%,
    rgba(255, 255, 255, 0.35) 50%,
    transparent 70%
  );
  pointer-events: none;
}

/* ─── Steps ───────────────────────────────────────────── */
.step {
  display: flex;
  gap: 16px;
  align-items: flex-start;
  padding: 16px 0;
  border-bottom: 1px solid var(--border);
  transition: background 0.2s;
}

.step:first-of-type {
  padding-top: 4px;
}
.step:last-of-type {
  border-bottom: none;
  padding-bottom: 0;
}

/* Number bubble */
.step-num {
  flex-shrink: 0;
  width: 30px;
  height: 30px;
  border-radius: 50%;
  background: var(--accent);
  color: #fff;
  font-family: var(--font-display);
  font-size: 13px;
  font-weight: 600;
  display: flex;
  align-items: center;
  justify-content: center;
  margin-top: 3px;
  box-shadow: 0 2px 6px rgba(26, 107, 60, 0.25);
  transition:
    transform 0.2s ease,
    box-shadow 0.2s ease;
}

.step:hover .step-num {
  transform: scale(1.12);
  box-shadow: 0 4px 12px rgba(26, 107, 60, 0.35);
}

.step-body h4 {
  font-family: var(--font-body);
  font-size: 14.5px;
  font-weight: 500;
  color: var(--text);
  margin-bottom: 4px;
}

.step-body p {
  font-size: 13.5px;
  color: var(--text2);
  line-height: 1.65;
}

/* ─── Strong / Emphasis ───────────────────────────────── */
strong {
  color: var(--text);
  font-weight: 500;
}

/* ─── Animations ──────────────────────────────────────── */
@keyframes fadeUp {
  from {
    opacity: 0;
    transform: translateY(14px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}
/* ── Breadcrumb nav ─────────────────────────────────── */
/* ── Breadcrumb nav ─────────────────────────────────── */
.breadcrumbs {
  display: block;
  width: 100%;
  max-width: 1200px;
  margin: 0 auto;
  padding: 0.6rem 1.5rem;
}

.breadcrumbs ol {
  list-style: none;
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  gap: 2px;
}

/* Every item is a flex row so the separator sits inline */
.breadcrumbs li {
  display: flex;
  align-items: center;
  gap: 2px;
}

/* Chevron separator — CSS-only, no extra markup */
.breadcrumbs li + li::before {
  content: "";
  display: inline-block;
  width: 5px;
  height: 5px;
  border-right: 1.5px solid var(--text3);
  border-top: 1.5px solid var(--text3);
  transform: rotate(45deg);
  margin: 0 6px;
  flex-shrink: 0;
}

/* Links */
.breadcrumbs a {
  font-size: 13px;
  font-weight: 400;
  color: var(--text3);
  text-decoration: none;
  padding: 4px 8px;
  border-radius: 6px;
  transition:
    color 0.18s ease,
    background 0.18s ease;
  white-space: nowrap;
}

.breadcrumbs a:hover {
  color: var(--accent);
  background: var(--accent-lt);
}

.breadcrumbs a:active {
  color: var(--accent-dark);
}

/* Current page — pill style */
.breadcrumbs li[aria-current="page"] {
  font-size: 13px;
  font-weight: 500;
  color: var(--accent-dark);
  background: var(--accent-lt);
  border: 1px solid var(--accent-md);
  border-radius: 6px;
  padding: 4px 10px;
  white-space: nowrap;
}

.section-header {
  display: flex;
  align-items: center;
  gap: 10px;
  margin-bottom: 1.25rem;
}

.section-icon {
  width: 32px;
  height: 32px;
  background: var(--accent-lt);
  border-radius: 8px;
  display: flex;
  align-items: center;
  justify-content: center;
  color: var(--accent);
  flex-shrink: 0;
}

.section-header h2 {
  font-size: 14px;
  font-weight: 600;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  color: var(--text2);
  font-family: "Georgia", serif;
  white-space: nowrap;
}
.links-grid {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 8px;
  margin-bottom: 1.25rem;
}

.tool-link {
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 9px 10px;
  background: var(--cream);
  border: 1px solid var(--border);
  border-radius: 7px;
  font-size: 13px;
  font-weight: 500;
  color: var(--text2);
  text-decoration: none;
  text-align: center;
  transition:
    background 0.15s,
    border-color 0.15s,
    color 0.15s,
    transform 0.1s;
  font-family: system-ui, sans-serif;
  line-height: 1.2;
}

.tool-link:hover {
  background: var(--accent-lt);
  border-color: var(--accent-md);
  color: var(--accent-dark);
  transform: translateY(-1px);
}

.view-all-link {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  font-size: 13px;
  font-weight: 500;
  color: var(--accent);
  text-decoration: none;
  font-family: system-ui, sans-serif;
  padding: 6px 0;
  border-bottom: 1px solid transparent;
  transition:
    border-color 0.15s,
    color 0.15s;
}

.view-all-link:hover {
  color: var(--accent-dark);
  border-bottom-color: var(--accent-md);
}
.link-container {
  background: var(--white);
  border: 1px solid var(--border);
  border-radius: 12px;
  padding: 1.75rem 2rem 1.5rem;

  box-shadow:
    0 2px 8px var(--shadow-sm),
    0 1px 2px var(--shadow-sm);
}
/* ── Base flag span ── */
.flag {
  display: inline-block;
  width: 24px;
  height: 16px;
  border-radius: 2px;
  position: relative;
  overflow: hidden;
  vertical-align: middle;
  flex-shrink: 0;
  box-shadow: 0 0 0 1px rgba(0, 0, 0, 0.12);
}

/* ════════════════════════════════
   🇦🇺  AUSTRALIA
════════════════════════════════ */
.flag-au {
  background: #012169;
}

/* Union Jack — diagonal crosses (St Andrew white + St Patrick red) */
.flag-au::before {
  content: "";
  position: absolute;
  inset: 0;
  background:
    /* St Andrew — white diagonals */
    linear-gradient(
      to bottom right,
      transparent calc(50% - 12%),
      #fff calc(50% - 12%),
      #fff calc(50% + 12%),
      transparent calc(50% + 12%)
    ),
    linear-gradient(
      to bottom left,
      transparent calc(50% - 12%),
      #fff calc(50% - 12%),
      #fff calc(50% + 12%),
      transparent calc(50% + 12%)
    );
  /* only covers the canton (left 50% × top 55%) */
  width: 50%;
  height: 55%;
}

/* St George cross (white arms + red bar) + red diagonal offset */
.flag-au::after {
  content: "";
  position: absolute;
  top: 0;
  left: 0;
  width: 50%;
  height: 55%;
  background:
    /* St Patrick — red diagonals (narrower, offset) */
    linear-gradient(
      to bottom right,
      transparent calc(50% - 6%),
      #c8102e calc(50% - 6%),
      #c8102e 50%,
      transparent 50%
    ),
    linear-gradient(
      to bottom left,
      transparent 50%,
      #c8102e 50%,
      #c8102e calc(50% + 6%),
      transparent calc(50% + 6%)
    ),
    /* St George — white horizontal */
    linear-gradient(
        to bottom,
        transparent calc(50% - 14%),
        #fff calc(50% - 14%),
        #fff calc(50% + 14%),
        transparent calc(50% + 14%)
      ),
    /* St George — white vertical */
    linear-gradient(
        to right,
        transparent calc(50% - 14%),
        #fff calc(50% - 14%),
        #fff calc(50% + 14%),
        transparent calc(50% + 14%)
      ),
    /* St George — red horizontal */
    linear-gradient(
        to bottom,
        transparent calc(50% - 8%),
        #c8102e calc(50% - 8%),
        #c8102e calc(50% + 8%),
        transparent calc(50% + 8%)
      ),
    /* St George — red vertical */
    linear-gradient(
        to right,
        transparent calc(50% - 8%),
        #c8102e calc(50% - 8%),
        #c8102e calc(50% + 8%),
        transparent calc(50% + 8%)
      );
}

/* ════════════════════════════════
   🇪🇺  EUROPEAN UNION
════════════════════════════════ */
.flag-eu {
  background: #003399;
}

/* 12 gold stars in a circle using repeating conic-gradient trick */
.flag-eu::before {
  content: "";
  position: absolute;
  inset: 0;
  /*
    Each star is rendered as a tiny gold dot at 30° intervals
    around the center. Pure CSS stars at this size (24×16px)
    are 1–2px each — we use radial-gradient clusters.
  */
  background:
    /* top         */
    radial-gradient(circle 1.1px at 50% 18%, #ffcc00 100%, transparent 100%),
    /* top-right-1 */
    radial-gradient(circle 1.1px at 67% 23%, #ffcc00 100%, transparent 100%),
    /* right-top   */
    radial-gradient(circle 1.1px at 78% 36%, #ffcc00 100%, transparent 100%),
    /* right       */
    radial-gradient(circle 1.1px at 82% 50%, #ffcc00 100%, transparent 100%),
    /* right-bot   */
    radial-gradient(circle 1.1px at 78% 64%, #ffcc00 100%, transparent 100%),
    /* bot-right-1 */
    radial-gradient(circle 1.1px at 67% 77%, #ffcc00 100%, transparent 100%),
    /* bottom      */
    radial-gradient(circle 1.1px at 50% 82%, #ffcc00 100%, transparent 100%),
    /* bot-left-1  */
    radial-gradient(circle 1.1px at 33% 77%, #ffcc00 100%, transparent 100%),
    /* left-bot    */
    radial-gradient(circle 1.1px at 22% 64%, #ffcc00 100%, transparent 100%),
    /* left        */
    radial-gradient(circle 1.1px at 18% 50%, #ffcc00 100%, transparent 100%),
    /* left-top    */
    radial-gradient(circle 1.1px at 22% 36%, #ffcc00 100%, transparent 100%),
    /* top-left-1  */
    radial-gradient(circle 1.1px at 33% 23%, #ffcc00 100%, transparent 100%);
}
