/*
 * Cash by Country design system
 * Direction: Modern Travel Ledger
 * This file intentionally loads after page-specific styles and normalizes the
 * shared visual language without replacing country artwork or data logic.
 */

:root {
  color-scheme: light;
  --cbc-ink: #172321;
  --cbc-ink-soft: #2f3e3b;
  --cbc-muted: #63706d;
  --cbc-paper: #f6f4ec;
  --cbc-paper-deep: #eee9dc;
  --cbc-surface: #fffefa;
  --cbc-surface-alt: #edf4f0;
  --cbc-line: #cad2cd;
  --cbc-line-strong: #8d9994;
  --cbc-brand: #176b66;
  --cbc-brand-hover: #0e5753;
  --cbc-coral: #cf5948;
  --cbc-yellow: #f2c552;
  --cbc-blue: #397c9a;
  --cbc-danger: #b53b38;
  --cbc-focus: #0f7771;

  --cbc-font-body: "Aptos", "Segoe UI Variable", "Segoe UI", sans-serif;
  --cbc-font-display: "Aptos Display", "Aptos", "Segoe UI Variable Display", "Segoe UI", sans-serif;

  --cbc-space-1: 0.25rem;
  --cbc-space-2: 0.5rem;
  --cbc-space-3: 0.75rem;
  --cbc-space-4: 1rem;
  --cbc-space-5: 1.5rem;
  --cbc-space-6: 2rem;
  --cbc-space-7: 3rem;
  --cbc-space-8: 4rem;

  --cbc-radius-xs: 3px;
  --cbc-radius-sm: 5px;
  --cbc-radius-md: 8px;
  --cbc-shadow-xs: 0 1px 2px rgba(23, 35, 33, 0.08);
  --cbc-shadow-sm: 0 6px 16px rgba(23, 35, 33, 0.09);
  --cbc-shadow-md: 0 18px 42px rgba(23, 35, 33, 0.12);
  --cbc-shadow-focus: 0 0 0 4px rgba(15, 119, 113, 0.2);

  --cbc-ease-out: cubic-bezier(0.23, 1, 0.32, 1);
  --cbc-ease-in-out: cubic-bezier(0.77, 0, 0.175, 1);
  --cbc-duration-fast: 140ms;
  --cbc-duration-base: 210ms;

  --ink: var(--cbc-ink);
  --muted: var(--cbc-muted);
  --paper: var(--cbc-paper);
  --white: var(--cbc-surface);
  --panel: var(--cbc-surface);
  --line: var(--cbc-line);
  --brand-ink: var(--cbc-ink);
  --brand-teal: var(--cbc-brand);
  --brand-red: var(--cbc-coral);
  --brand-yellow: var(--cbc-yellow);
  --shadow: var(--cbc-shadow-md);
  --radius: var(--cbc-radius-md);
  --max: 1240px;
}

html[lang="ja"] {
  --cbc-font-body: "Yu Gothic UI", "Hiragino Kaku Gothic ProN", "Meiryo", sans-serif;
  --cbc-font-display: "Yu Gothic UI", "Hiragino Kaku Gothic ProN", "Meiryo", sans-serif;
  line-break: strict;
}

html[lang="ja"] body {
  word-break: normal;
}

html[lang="ja"] h1,
html[lang="ja"] h2,
html[lang="ja"] h3,
html[lang="ja"] h4 {
  line-height: 1.28;
}

html {
  scroll-padding-top: 1rem;
}

body,
button,
input,
select,
textarea {
  font-family: var(--cbc-font-body);
}

body {
  overflow-x: hidden;
  background-color: var(--cbc-paper);
  color: var(--cbc-ink);
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
}

body::before {
  background-image:
    linear-gradient(rgba(23, 107, 102, 0.035) 1px, transparent 1px),
    linear-gradient(90deg, rgba(23, 107, 102, 0.035) 1px, transparent 1px);
  background-size: 40px 40px;
}

h1,
h2,
h3,
h4,
.cash-route-copy h1,
.cash-board-title h2,
.guide-directory-heading h2,
.country-guide-group-heading h2,
.article-hero h1,
.section h2,
.article-shell h2,
.guide-card h3,
.country-guide-copy strong {
  font-family: var(--cbc-font-display);
  font-weight: 800;
  letter-spacing: 0;
  text-wrap: balance;
}

p,
li,
small {
  text-wrap: pretty;
}

strong,
time,
output,
input,
.passport-rate,
.currency-option-text strong,
.note-denomination,
.banknote-value,
.coin-denomination,
.guide-region-count,
.amount-code {
  font-variant-numeric: tabular-nums;
}

a,
button,
input,
select,
[tabindex] {
  -webkit-tap-highlight-color: rgba(23, 107, 102, 0.16);
}

a,
button {
  touch-action: manipulation;
}

:where(a, button, input, select, textarea, [tabindex]):focus-visible {
  outline: 3px solid var(--cbc-focus);
  outline-offset: 3px;
  box-shadow: var(--cbc-shadow-focus);
}

:where(h1, h2, h3, h4, section[id], [id][tabindex="-1"]) {
  scroll-margin-top: 1.5rem;
}

.skip-link {
  position: fixed;
  top: 10px;
  left: 10px;
  z-index: 1000;
  min-height: 44px;
  padding: 0.7rem 1rem;
  border: 1px solid var(--cbc-brand);
  border-radius: var(--cbc-radius-sm);
  background: var(--cbc-surface);
  box-shadow: var(--cbc-shadow-md);
  color: var(--cbc-ink);
  font-weight: 700;
  text-decoration: none;
  transform: translateY(-160%);
  transition: transform var(--cbc-duration-fast) var(--cbc-ease-out);
}

.skip-link:focus,
.skip-link:focus-visible {
  transform: translateY(0);
}

/* Shared button contract. Existing controls are mapped to the same system. */
:where(
  .cbc-button,
  .primary-button,
  .secondary-button,
  .tool-link,
  .guides-primary-link,
  .guides-secondary-link,
  .guides-tool-link,
  .money-mode-switch,
  .quick-pair-button,
  .cash-teaser-button,
  .passport-refresh,
  .exchange-swap-button
) {
  --cbc-button-bg: var(--cbc-surface);
  --cbc-button-color: var(--cbc-ink);
  --cbc-button-border: var(--cbc-line-strong);
  --cbc-button-hover: #f2f5f1;
  --cbc-button-height: 46px;
  display: inline-flex;
  min-height: var(--cbc-button-height);
  align-items: center;
  justify-content: center;
  gap: 0.55rem;
  padding: 0.65rem 1rem;
  border: 1px solid var(--cbc-button-border);
  border-radius: var(--cbc-radius-sm);
  background: var(--cbc-button-bg);
  box-shadow: var(--cbc-shadow-xs);
  color: var(--cbc-button-color);
  font-family: var(--cbc-font-body);
  font-size: 0.88rem;
  font-weight: 700;
  line-height: 1.1;
  text-decoration: none;
  transition:
    background-color var(--cbc-duration-fast) ease,
    border-color var(--cbc-duration-fast) ease,
    box-shadow var(--cbc-duration-fast) ease,
    color var(--cbc-duration-fast) ease,
    transform var(--cbc-duration-fast) var(--cbc-ease-out);
}

:where(
  .cbc-button,
  .primary-button,
  .secondary-button,
  .tool-link,
  .guides-primary-link,
  .guides-secondary-link,
  .guides-tool-link,
  .money-mode-switch,
  .quick-pair-button,
  .cash-teaser-button,
  .passport-refresh,
  .exchange-swap-button
):hover {
  border-color: var(--cbc-ink-soft);
  background: var(--cbc-button-hover);
  box-shadow: var(--cbc-shadow-sm);
}

:where(
  .cbc-button,
  .primary-button,
  .secondary-button,
  .tool-link,
  .guides-primary-link,
  .guides-secondary-link,
  .guides-tool-link,
  .money-mode-switch,
  .quick-pair-button,
  .cash-teaser-button,
  .passport-refresh,
  .exchange-swap-button
):active {
  box-shadow: var(--cbc-shadow-xs);
  transform: scale(0.97);
}

.cbc-button--primary,
.primary-button,
.guides-primary-link,
.tool-link {
  --cbc-button-bg: var(--cbc-brand);
  --cbc-button-color: #fff;
  --cbc-button-border: var(--cbc-brand);
  --cbc-button-hover: var(--cbc-brand-hover);
}

.cbc-button--secondary,
.secondary-button,
.guides-secondary-link,
.money-mode-switch {
  --cbc-button-bg: var(--cbc-yellow);
  --cbc-button-color: var(--cbc-ink);
  --cbc-button-border: #9a7923;
  --cbc-button-hover: #f7d576;
}

.cbc-button--ghost,
.guides-tool-link,
.quick-pair-button {
  --cbc-button-bg: transparent;
  --cbc-button-color: var(--cbc-ink);
  --cbc-button-border: var(--cbc-line);
  --cbc-button-hover: rgba(23, 107, 102, 0.07);
  box-shadow: none;
}

.cbc-button--destructive {
  --cbc-button-bg: var(--cbc-danger);
  --cbc-button-color: #fff;
  --cbc-button-border: var(--cbc-danger);
  --cbc-button-hover: #922f2d;
}

.cbc-button--link {
  min-height: 0;
  padding: 0.25rem 0;
  border: 0;
  border-radius: 0;
  background: transparent;
  box-shadow: none;
  color: var(--cbc-brand);
  text-decoration: underline;
  text-decoration-thickness: 1px;
  text-underline-offset: 0.24em;
}

.cbc-button--sm {
  --cbc-button-height: 36px;
  padding: 0.45rem 0.75rem;
  font-size: 0.78rem;
}

.cbc-button--lg {
  --cbc-button-height: 52px;
  padding: 0.8rem 1.2rem;
  font-size: 0.96rem;
}

.cbc-icon-button,
.passport-refresh,
.exchange-swap-button {
  width: var(--cbc-button-height);
  min-width: var(--cbc-button-height);
  padding: 0;
}

:where(.cbc-button, button)[disabled],
:where(.cbc-button, button)[aria-disabled="true"] {
  cursor: not-allowed;
  opacity: 0.52;
  box-shadow: none;
  transform: none;
}

:where(.cbc-button, button)[aria-busy="true"] {
  position: relative;
  cursor: wait;
}

:where(.cbc-button, button)[aria-busy="true"]::after {
  width: 0.9rem;
  height: 0.9rem;
  border: 2px solid currentColor;
  border-right-color: transparent;
  border-radius: 50%;
  animation: cbc-button-spin 700ms linear infinite;
  content: "";
}

@keyframes cbc-button-spin {
  to { transform: rotate(360deg); }
}

/* Global navigation */
.main-site-header,
.site-masthead {
  background: rgba(246, 244, 236, 0.96);
  border-color: var(--cbc-line);
  box-shadow: none;
}

.main-site-header {
  min-height: 76px;
  margin-bottom: var(--cbc-space-4);
  border-bottom-width: 1px;
}

.main-site-brand img {
  width: 264px;
  height: auto;
  max-height: 52px;
  object-fit: contain;
}

.main-site-header nav,
.site-nav {
  gap: 0.35rem;
}

.main-site-header nav a,
.site-nav a {
  min-height: 42px;
  padding: 0.65rem 0.85rem;
  border: 1px solid transparent;
  border-radius: var(--cbc-radius-sm);
  color: var(--cbc-ink-soft);
  font-family: var(--cbc-font-body);
  font-size: 0.8rem;
  font-weight: 700;
  line-height: 1;
  text-decoration: none;
  text-transform: none;
  transition:
    background-color var(--cbc-duration-fast) ease,
    border-color var(--cbc-duration-fast) ease,
    color var(--cbc-duration-fast) ease;
}

.main-site-header nav a:hover,
.main-site-header nav a:focus-visible,
.site-nav a:hover,
.site-nav a:focus-visible {
  border-color: var(--cbc-line);
  background: var(--cbc-surface);
  color: var(--cbc-brand-hover);
  text-decoration: none;
}

.main-site-header nav a[href="guides.html"],
.main-site-header nav a[aria-current="page"],
.site-nav a[aria-current="page"] {
  padding: 0.65rem 0.85rem;
  border: 1px solid var(--cbc-brand);
  background: var(--cbc-brand);
  box-shadow: none;
  color: #fff;
}

/* Compact locale control shared by the converter, directory and trust pages. */
.main-site-header .language-switcher,
.policy-header .language-switcher,
.site-masthead .language-switcher {
  display: inline-flex;
  flex: 0 0 auto;
  gap: 2px;
  padding: 3px;
  border: 1px solid var(--cbc-line-strong);
  border-radius: var(--cbc-radius-sm);
  background: var(--cbc-surface-muted);
}

.main-site-header .language-switcher a,
.policy-header .language-switcher a,
.site-masthead .language-switcher a {
  display: inline-grid;
  min-width: 36px;
  min-height: 34px;
  padding: 0 8px;
  place-items: center;
  border: 0;
  border-radius: calc(var(--cbc-radius-sm) - 2px);
  color: var(--cbc-text-muted);
  font-size: 0.72rem;
  font-weight: 900;
  line-height: 1;
  text-decoration: none;
}

.main-site-header .language-switcher a:hover,
.policy-header .language-switcher a:hover,
.site-masthead .language-switcher a:hover {
  border: 0;
  background: var(--cbc-surface);
  color: var(--cbc-ink);
}

.main-site-header .language-switcher a[aria-current="page"],
.policy-header .language-switcher a[aria-current="page"],
.site-masthead .language-switcher a[aria-current="page"] {
  border: 0;
  background: var(--cbc-ink);
  color: var(--cbc-surface);
  box-shadow: none;
}

.main-site-header .language-switcher a:focus-visible,
.policy-header .language-switcher a:focus-visible,
.site-masthead .language-switcher a:focus-visible {
  outline: 3px solid var(--cbc-focus);
  outline-offset: 2px;
}

.site-nav .tool-link {
  border-width: 1px;
  background: var(--cbc-yellow);
  box-shadow: none;
  color: var(--cbc-ink);
}

.site-nav .tool-link:hover,
.site-nav .tool-link:focus-visible {
  border-color: #9a7923;
  background: #f7d576;
  box-shadow: var(--cbc-shadow-xs);
}

.site-masthead {
  border-bottom-width: 1px;
}

.masthead-inner {
  min-height: 80px;
}

.cash-logo {
  width: 230px;
  height: auto;
}

.masthead-brand .country-destination-logo.is-mini {
  padding-left: 1rem;
  border-left: 1px solid var(--cbc-line-strong);
}

.masthead-brand .country-destination-logo.is-mini .country-logo-emblem {
  border-width: 2px;
}

.site-nav a {
  border-bottom: 1px solid transparent;
}

.tool-link {
  box-shadow: none;
}

/* Homepage: the cash stays first, with a quieter work surface. */
.home-redesign {
  background:
    linear-gradient(rgba(23, 107, 102, 0.035) 1px, transparent 1px),
    linear-gradient(90deg, rgba(23, 107, 102, 0.035) 1px, transparent 1px),
    var(--cbc-paper);
  background-size: 40px 40px, 40px 40px, auto;
}

.home-redesign .page-shell,
.guides-shell {
  max-width: 1320px;
  padding-inline: 24px;
}

.cash-board-shell {
  overflow: visible;
  border: 1px solid var(--cbc-line);
  border-radius: var(--cbc-radius-md);
  background: rgba(255, 254, 250, 0.94);
  box-shadow: var(--cbc-shadow-md);
}

.cash-route-bar {
  grid-template-columns: minmax(350px, 0.82fr) minmax(490px, 1.3fr) minmax(210px, 0.55fr);
  gap: var(--cbc-space-5);
  padding: 30px;
  border-bottom: 1px solid var(--cbc-line);
}

.eyebrow,
.passport-kicker,
.cash-route-field > span,
.guide-search,
.guide-group-kicker,
.article-kicker,
.section-kicker {
  color: var(--cbc-brand);
  font-size: 0.7rem;
  font-weight: 700;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}

.cash-route-copy h1 {
  max-width: 360px;
  font-size: 3rem;
  line-height: 0.98;
}

.cash-route-copy .home-brand-claim {
  display: flex;
  max-width: 320px;
  margin: 0 0 16px;
  padding: 0;
  align-items: center;
  gap: 10px;
  color: var(--cbc-brand);
  font-size: 0.8rem;
  font-weight: 700;
  line-height: 1.3;
  text-wrap: balance;
}

.cash-route-copy .home-brand-claim::before {
  width: 28px;
  height: 2px;
  flex: 0 0 auto;
  background: var(--cbc-coral);
  content: "";
}

.cash-route-copy p {
  color: var(--cbc-muted);
  font-weight: 500;
}

.cash-route-field .currency-trigger,
.currency-trigger {
  min-height: 66px;
  border: 1px solid var(--cbc-line-strong);
  border-radius: var(--cbc-radius-sm);
  background: var(--cbc-surface);
  box-shadow: var(--cbc-shadow-xs);
  transition:
    border-color var(--cbc-duration-fast) ease,
    box-shadow var(--cbc-duration-fast) ease,
    transform var(--cbc-duration-fast) var(--cbc-ease-out);
}

.currency-trigger:hover,
.currency-picker.is-open .currency-trigger {
  border-color: var(--cbc-brand);
  box-shadow: var(--cbc-shadow-sm);
}

.currency-picker:focus-within .currency-trigger {
  border-color: var(--cbc-focus);
}

.currency-menu {
  margin-top: 4px;
  overflow: hidden;
  border: 1px solid var(--cbc-line);
  border-radius: var(--cbc-radius-md);
  background: var(--cbc-surface);
  box-shadow: var(--cbc-shadow-md);
  transform-origin: top center;
}

.currency-search {
  padding: var(--cbc-space-3);
  border-bottom-color: var(--cbc-line);
  background: var(--cbc-surface-alt);
}

.currency-search-input,
.guide-search input,
.amount-control input {
  border: 1px solid var(--cbc-line-strong);
  border-radius: var(--cbc-radius-sm);
  background: var(--cbc-surface);
  color: var(--cbc-ink);
}

.currency-search-input:focus,
.guide-search input:focus,
.amount-control input:focus {
  border-color: var(--cbc-focus);
  outline: 3px solid var(--cbc-focus);
  outline-offset: 2px;
  box-shadow: var(--cbc-shadow-focus);
}

.currency-option {
  border-radius: var(--cbc-radius-xs);
  transition: background-color var(--cbc-duration-fast) ease;
}

.currency-option:hover,
.currency-option[aria-selected="true"] {
  background: rgba(23, 107, 102, 0.09);
}

.cash-route-controls .bill-swap-button {
  --cbc-button-height: 66px;
  width: 58px;
  min-width: 58px;
  height: 66px;
  min-height: 66px;
  border: 1px solid var(--cbc-brand);
  background: var(--cbc-brand);
  box-shadow: none;
  color: #fff;
}

.cash-route-controls .bill-swap-button:hover,
.cash-route-controls .bill-swap-button:focus-visible {
  background: var(--cbc-brand-hover);
  box-shadow: var(--cbc-shadow-sm);
  transform: none;
}

.cash-route-controls .bill-swap-button:active {
  transform: scale(0.96);
}

.cash-route-controls .bill-swap-button .swap-icon,
.cash-route-controls .bill-swap-button .swap-icon svg {
  color: #fff;
  stroke: currentColor;
}

.cash-route-bar .rate-passport {
  min-height: 110px;
  padding: 18px 46px 18px 18px;
  border: 1px solid var(--cbc-line);
  border-left: 5px solid var(--cbc-brand);
  border-radius: var(--cbc-radius-sm);
  background: var(--cbc-surface-alt);
  box-shadow: var(--cbc-shadow-xs);
  transform: none;
}

.cash-route-bar .rate-passport,
.cash-route-bar .rate-passport.is-offline,
.cash-route-bar .rate-passport.is-loading {
  opacity: 1;
}

.cash-route-bar .passport-rate {
  color: var(--cbc-ink);
  font-size: 1.02rem;
  font-weight: 700;
}

.passport-refresh {
  --cbc-button-height: 34px;
  border-color: transparent;
  background: transparent;
  box-shadow: none;
  color: var(--cbc-brand);
}

.home-notes-board.notes-section {
  padding: 28px 30px 30px;
  background: transparent;
}

.cash-board-heading {
  align-items: center;
  padding-inline: 0;
}

.cash-board-title h2 {
  font-size: 2.35rem;
  line-height: 1.05;
}

.cash-board-title-line > span,
.cash-board-footer span {
  color: var(--cbc-brand);
  font-weight: 700;
}

.cash-board-title > p,
.cash-board-footer p {
  color: var(--cbc-muted);
  font-size: 0.92rem;
}

.home-notes-board .money-mode-switch {
  min-height: 48px;
  border: 1px solid #9a7923;
  box-shadow: none;
}

.home-notes-board .notes-grid:not(.is-coin-grid) {
  gap: 28px 24px;
}

.banknote-card,
.cbc-coin-card,
.cbc-coin-lineup-item {
  transition:
    filter var(--cbc-duration-base) ease,
    opacity var(--cbc-duration-base) ease,
    transform var(--cbc-duration-base) var(--cbc-ease-out);
}

@media (hover: hover) and (pointer: fine) {
  .banknote-card:hover {
    transform: translateY(-4px) rotate(-0.35deg);
  }

  .banknote-card:nth-child(even):hover {
    transform: translateY(-4px) rotate(0.35deg);
  }

  .cbc-coin-card:hover,
  .cbc-coin-lineup-item:hover {
    transform: translateY(-3px);
  }
}

.cash-board-footer {
  border-top: 1px solid var(--cbc-line);
}

.home-redesign .exact-converter {
  gap: 22px 34px;
  padding: 26px 28px;
  border: 1px solid var(--cbc-line);
  border-radius: var(--cbc-radius-md);
  background: var(--cbc-surface);
  box-shadow: var(--cbc-shadow-sm);
}

.home-redesign .exact-converter .amount-control > span {
  padding: 0;
  background: transparent;
  color: var(--cbc-brand);
  font-size: 0.72rem;
  font-weight: 700;
}

.home-redesign .exact-converter .amount-input-shell {
  overflow: hidden;
  border: 1px solid var(--cbc-line-strong);
  border-radius: var(--cbc-radius-sm);
  box-shadow: none;
}

.home-redesign .exact-converter .amount-control input {
  border: 0;
  border-radius: 0;
}

.home-redesign .exact-converter .amount-code {
  border-left: 1px solid var(--cbc-line);
  background: var(--cbc-surface-alt);
  color: var(--cbc-brand-hover);
}

.home-support-grid .quick-pairs,
.home-support-grid .destination-spotlight {
  border: 1px solid var(--cbc-line);
  border-radius: var(--cbc-radius-md);
  background: var(--cbc-surface);
  box-shadow: var(--cbc-shadow-sm);
}

.home-support-grid .destination-spotlight {
  border-left: 5px solid var(--cbc-blue);
  background: #eef5f6;
}

.quick-pair-button {
  justify-content: flex-start;
  text-align: left;
}

/* Country guide directory */
.guides-hero {
  height: 520px;
  margin-top: var(--cbc-space-4);
  padding: 44px;
  overflow: hidden;
  border: 1px solid var(--cbc-line);
  border-radius: var(--cbc-radius-md);
  box-shadow: var(--cbc-shadow-md);
}

.guides-hero::before {
  width: 59%;
  background: rgba(246, 244, 236, 0.9);
  clip-path: polygon(0 0, 88% 0, 100% 100%, 0 100%);
}

.guides-hero-copy {
  width: 650px;
  max-width: 55%;
}

.guides-hero h1 {
  max-width: 13ch;
  font-size: 4.45rem;
  line-height: 0.95;
}

.guides-hero-copy > .guides-hero-lead {
  color: var(--cbc-coral);
  font-size: 1.25rem;
  font-weight: 700;
}

.guides-hero-copy > .guides-hero-description {
  color: var(--cbc-ink-soft);
  font-size: 1rem;
}

.guides-hero-topics li {
  color: var(--cbc-muted);
  font-weight: 600;
}

.guides-hero-topics li::before {
  border: 0;
  background: var(--cbc-brand);
}

.guides-hero-actions .guides-primary-link,
.guides-hero-actions .guides-secondary-link {
  border-width: 1px;
  box-shadow: var(--cbc-shadow-xs);
}

.guides-hero-actions .guides-primary-link:hover,
.guides-hero-actions .guides-primary-link:focus-visible,
.guides-hero-actions .guides-secondary-link:hover,
.guides-hero-actions .guides-secondary-link:focus-visible {
  box-shadow: var(--cbc-shadow-sm);
  transform: translateY(-1px);
}

.guide-directory {
  gap: var(--cbc-space-6);
  padding-top: var(--cbc-space-7);
}

.guide-finder {
  padding: 24px;
  border: 1px solid var(--cbc-line);
  border-radius: var(--cbc-radius-md);
  background: var(--cbc-surface-alt);
  box-shadow: var(--cbc-shadow-xs);
}

.guide-search input {
  min-height: 52px;
  padding-inline: 14px;
  font-size: 0.94rem;
  font-weight: 500;
}

.guide-region-nav a {
  min-height: 68px;
  padding: 10px;
  border: 1px solid var(--cbc-line);
  border-radius: var(--cbc-radius-sm);
  background: var(--cbc-surface);
  box-shadow: none;
  transition:
    background-color var(--cbc-duration-fast) ease,
    border-color var(--cbc-duration-fast) ease,
    box-shadow var(--cbc-duration-fast) ease,
    transform var(--cbc-duration-fast) var(--cbc-ease-out);
}

.guide-region-nav a:hover,
.guide-region-nav a:focus-visible {
  border-color: var(--directory-accent, var(--cbc-brand));
  background: var(--directory-soft, var(--cbc-surface));
  box-shadow: var(--cbc-shadow-sm);
  transform: translateY(-2px);
}

.guide-region-mark {
  border-width: 1px;
  box-shadow: none;
}

.guide-region-jump {
  background: var(--cbc-brand);
}

.country-guide-directory-groups {
  gap: 64px;
}

.country-guide-group + .country-guide-group {
  padding-top: 56px;
  border-top: 1px solid var(--cbc-line);
}

.country-guide-group-heading h2 {
  color: var(--cbc-ink);
  font-size: 2.75rem;
  line-height: 1;
}

.guide-region-count {
  border: 1px solid var(--cbc-line);
  border-radius: var(--cbc-radius-sm);
  box-shadow: none;
}

.country-guide-card,
.country-guide-grid.is-euro-grid .country-guide-card {
  border: 1px solid var(--cbc-line);
  border-radius: var(--cbc-radius-md);
  background: var(--cbc-surface);
  box-shadow: var(--cbc-shadow-xs);
  transition:
    border-color var(--cbc-duration-base) ease,
    box-shadow var(--cbc-duration-base) ease,
    transform var(--cbc-duration-base) var(--cbc-ease-out);
}

.country-guide-card:hover,
.country-guide-card:focus-visible {
  border-color: var(--directory-accent, var(--cbc-brand));
  box-shadow: var(--cbc-shadow-md);
  transform: translateY(-4px);
}

.country-guide-flag,
.country-guide-code {
  border-width: 1px;
  box-shadow: var(--cbc-shadow-xs);
}

.country-guide-card-body {
  padding: 18px;
}

.guide-availability,
.country-guide-japan .guide-availability {
  border-top-color: var(--cbc-line);
  color: var(--cbc-brand);
  font-weight: 700;
}

.guide-no-results {
  border: 1px solid #c7a33d;
  border-radius: var(--cbc-radius-md);
  background: #fff4c7;
  color: var(--cbc-ink);
}

/* Country landing pages and article pages */
.japan-hero {
  min-height: 520px;
  border-bottom: 1px solid var(--cbc-line);
}

.japan-hero::after {
  position: absolute;
  inset: 0;
  z-index: 1;
  background: linear-gradient(90deg, rgba(246, 244, 236, 0.9) 0%, rgba(246, 244, 236, 0.66) 44%, rgba(246, 244, 236, 0.08) 76%);
  content: "";
  pointer-events: none;
}

.hero-inner {
  z-index: 2;
  padding-block: 44px 52px;
}

.destination-logo {
  max-width: 54%;
}

.japan-hero h1 {
  max-width: 680px;
  font-family: var(--cbc-font-display);
  font-size: 4.35rem;
  font-weight: 800;
  line-height: 0.98;
  text-shadow: none;
}

.hero-dek {
  max-width: 650px;
  color: var(--cbc-ink-soft);
  font-size: 1.08rem;
  font-weight: 500;
  line-height: 1.55;
}

.hero-actions {
  gap: var(--cbc-space-3);
}

.hero-actions .primary-button,
.hero-actions .secondary-button,
.hero-actions .hero-guides-button {
  border-width: 1px;
  box-shadow: var(--cbc-shadow-xs);
}

.hero-actions .primary-button:hover,
.hero-actions .primary-button:focus-visible,
.hero-actions .secondary-button:hover,
.hero-actions .secondary-button:focus-visible,
.hero-actions .hero-guides-button:hover,
.hero-actions .hero-guides-button:focus-visible {
  box-shadow: var(--cbc-shadow-sm);
  transform: translateY(-1px);
}

.hero-note {
  max-width: 650px;
  border-left: 4px solid var(--country-accent, var(--cbc-brand));
  background: rgba(255, 254, 250, 0.86);
  box-shadow: var(--cbc-shadow-xs);
}

.fact-strip,
.on-page-nav {
  border-color: var(--cbc-line);
  background: var(--cbc-surface);
  box-shadow: none;
}

.fact-strip {
  border-block-width: 1px;
}

.fact-strip > div + div {
  border-left-color: var(--cbc-line);
}

.on-page-nav a {
  border-radius: var(--cbc-radius-xs);
  color: var(--cbc-muted);
  font-weight: 600;
}

.on-page-nav a:hover,
.on-page-nav a:focus-visible {
  background: var(--cbc-surface-alt);
  color: var(--cbc-brand-hover);
}

.section,
.article-shell {
  padding-block: 64px;
}

.section h2,
.article-shell h2 {
  font-size: 2.6rem;
  line-height: 1.08;
}

.quick-answer,
.country-quick-answer,
.mexico-quick-answer {
  background: linear-gradient(135deg, var(--cbc-surface) 0%, #fff8db 58%, #e8f3ef 125%);
}

.quick-grid {
  gap: 36px;
}

.trip-wallet,
.country-wallet,
.mexico-wallet {
  border: 1px solid var(--cbc-line);
  border-top: 5px solid var(--country-accent, var(--cbc-brand));
  border-radius: var(--cbc-radius-md);
  background: var(--cbc-surface);
  box-shadow: var(--cbc-shadow-sm);
  transform: none;
}

.notes-showcase,
.money-gallery-section {
  background: var(--cbc-paper-deep);
}

.guide-grid {
  gap: 22px;
}

.guide-card {
  border: 1px solid var(--cbc-line);
  border-radius: var(--cbc-radius-md);
  background: var(--cbc-surface);
  box-shadow: var(--cbc-shadow-xs);
  transition:
    border-color var(--cbc-duration-base) ease,
    box-shadow var(--cbc-duration-base) ease,
    transform var(--cbc-duration-base) var(--cbc-ease-out);
}

.guide-card::before {
  border-left: 1px solid var(--cbc-line);
  box-shadow: none;
}

.guide-card:hover,
.guide-card:focus-visible {
  border-color: var(--guide-accent-dark, var(--cbc-brand));
  box-shadow: var(--cbc-shadow-md);
  transform: translateY(-4px);
}

.guide-card .guide-number {
  border-width: 1px;
  box-shadow: none;
}

.article-hero {
  border-bottom: 1px solid var(--cbc-line);
  background: var(--article-tint, var(--cbc-paper));
}

.article-hero-inner {
  width: min(calc(100% - 48px), 1080px);
  padding-block: 72px 68px;
  gap: 72px;
}

.article-hero h1 {
  max-width: 760px;
  font-family: var(--cbc-font-display);
  font-size: 3.75rem;
  font-weight: 800;
  line-height: 1.02;
}

.article-dek {
  color: var(--cbc-ink-soft);
  font-size: 1.08rem;
}

.article-shell {
  width: min(calc(100% - 48px), 1080px);
  gap: 72px;
}

.article-shell p,
.article-shell li {
  max-width: 68ch;
}

.article-aside,
.article-callout,
.article-summary {
  border: 1px solid var(--cbc-line);
  border-radius: var(--cbc-radius-md);
  box-shadow: var(--cbc-shadow-xs);
}

/* Loading, empty, error and success states share one visual grammar. */
.is-loading .banknote,
[aria-busy="true"] .banknote {
  filter: saturate(0.45);
  opacity: 0.68;
}

.cbc-state,
.guide-no-results,
.currency-empty,
.rate-error {
  padding: 1rem 1.1rem;
  border: 1px solid var(--cbc-line);
  border-radius: var(--cbc-radius-sm);
  background: var(--cbc-surface);
  color: var(--cbc-ink-soft);
}

.cbc-state--success {
  border-color: #77a38f;
  background: #e9f5ee;
}

.cbc-state--error,
.rate-error {
  border-color: #d59a96;
  background: #fff0ef;
  color: #7e2f2c;
}

@media (max-width: 1080px) {
  .cash-route-bar {
    grid-template-columns: minmax(280px, 0.7fr) minmax(440px, 1.3fr);
  }

  .cash-route-bar .rate-passport {
    grid-column: 1 / -1;
    width: min(100%, 390px);
    justify-self: start;
  }

  .guides-hero-copy {
    width: 560px;
    max-width: 62%;
  }

  .guides-hero h1 {
    font-size: 3.85rem;
  }
}

@media (max-width: 780px) {
  :root {
    --cbc-space-7: 2.5rem;
    --cbc-space-8: 3rem;
  }

  .home-redesign .page-shell,
  .guides-shell {
    padding-inline: 12px;
  }

  .main-site-header {
    display: grid;
    min-height: 0;
    align-items: stretch;
    grid-template-columns: minmax(0, 1fr) auto;
    gap: 8px 12px;
    padding-bottom: 10px;
  }

  .main-site-header .main-site-brand {
    grid-column: 1;
    grid-row: 1;
    align-self: center;
  }

  .main-site-brand img {
    width: 220px;
    max-height: 46px;
  }

  .main-site-header nav {
    display: grid;
    width: 100%;
    grid-template-columns: repeat(3, minmax(0, 1fr));
  }

  .main-site-header > nav:not(.language-switcher) {
    grid-column: 1 / -1;
    grid-row: 2;
  }

  .main-site-header nav a {
    min-width: 0;
    padding: 0.65rem 0.35rem;
    font-size: 0.72rem;
    text-align: center;
  }

  .main-site-header .language-switcher {
    display: inline-flex;
    width: auto;
    align-self: center;
    grid-column: 2;
    grid-row: 1;
    grid-template-columns: none;
  }

  .main-site-header .language-switcher a {
    min-width: 40px;
    padding: 0 8px;
    font-size: 0.72rem;
  }

  .policy-header {
    display: grid;
    align-items: center;
    grid-template-columns: minmax(0, 1fr) auto;
    gap: 10px 12px;
  }

  .policy-header .policy-brand {
    grid-column: 1;
    grid-row: 1;
  }

  .policy-header .policy-nav {
    grid-column: 1 / -1;
    grid-row: 2;
    margin-left: 0;
  }

  .policy-header .language-switcher {
    grid-column: 2;
    grid-row: 1;
  }

  .cash-route-bar {
    grid-template-columns: 1fr;
    padding: 24px 18px;
  }

  .cash-route-copy h1 {
    max-width: 340px;
    font-size: 2.8rem;
  }

  .cash-route-controls {
    grid-template-columns: minmax(0, 1fr) 48px minmax(0, 1fr);
  }

  .cash-route-controls .bill-swap-button {
    width: 48px;
    min-width: 48px;
  }

  .cash-route-bar .rate-passport {
    width: 100%;
  }

  .home-notes-board.notes-section {
    padding: 24px 16px;
  }

  .cash-board-heading {
    align-items: stretch;
  }

  .home-notes-board .money-mode-switch {
    width: 100%;
  }

  .home-redesign .exact-converter {
    padding: 22px 18px;
  }

  .guides-hero {
    height: 620px;
    padding: 28px 20px;
    border-radius: var(--cbc-radius-md);
  }

  .guides-hero::before {
    width: 100%;
    background: rgba(246, 244, 236, 0.82);
    clip-path: none;
  }

  .guides-hero-copy {
    width: 100%;
    max-width: none;
  }

  .guides-hero h1 {
    max-width: 11ch;
    font-size: 3.2rem;
  }

  .guide-finder {
    padding: 18px;
  }

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

  .guide-region-nav a {
    min-height: 76px;
  }

  .country-guide-group-heading {
    padding-bottom: 0;
  }

  .guide-region-count {
    position: static;
    width: fit-content;
  }

  .masthead-inner {
    width: min(calc(100% - 24px), var(--max));
    min-height: 0;
    padding-block: 12px;
    align-items: stretch;
    flex-direction: column;
    gap: 10px;
  }

  .masthead-brand {
    justify-content: space-between;
  }

  .cash-logo {
    width: 190px;
  }

  .masthead-brand .country-destination-logo.is-mini {
    width: min(150px, 47vw);
    padding-left: 10px;
  }

  .site-nav {
    display: grid;
    width: 100%;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 4px;
  }

  .site-nav a {
    min-width: 0;
    min-height: 42px;
    padding: 0.65rem 0.35rem;
    font-size: 0.72rem;
    text-align: center;
  }

  .tool-link {
    min-height: 42px;
  }

  .japan-hero {
    min-height: 560px;
  }

  .japan-hero::after {
    background: linear-gradient(180deg, rgba(246, 244, 236, 0.9) 0%, rgba(246, 244, 236, 0.78) 68%, rgba(246, 244, 236, 0.36) 100%);
  }

  .hero-inner {
    width: min(calc(100% - 32px), var(--max));
    padding-block: 28px 38px;
  }

  .destination-logo {
    width: 290px;
    max-width: 90%;
  }

  .japan-hero h1 {
    max-width: 10ch;
    font-size: 3rem;
  }

  .hero-dek {
    font-size: 1rem;
  }

  .hero-actions {
    display: grid;
    grid-template-columns: 1fr;
  }

  .hero-actions :where(a, button) {
    width: 100%;
    justify-content: space-between;
  }

  .fact-strip {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .fact-strip > div + div {
    border-left: 0;
  }

  .fact-strip > div:nth-child(even) {
    border-left: 1px solid var(--cbc-line);
  }

  .fact-strip > div:nth-child(n + 3) {
    border-top: 1px solid var(--cbc-line);
  }

  .on-page-nav {
    overflow-x: auto;
    justify-content: flex-start;
    overscroll-behavior-x: contain;
    scrollbar-width: thin;
  }

  .on-page-nav a {
    flex: 0 0 auto;
  }

  .section,
  .article-shell {
    padding-block: 48px;
  }

  .section h2,
  .article-shell h2 {
    font-size: 2.2rem;
  }

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

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

  .guide-card,
  .guide-card-wide {
    min-height: 0;
    grid-column: auto;
  }

  .article-hero-inner,
  .article-shell {
    width: min(calc(100% - 32px), 1080px);
    grid-template-columns: 1fr;
    gap: 36px;
  }

  .article-hero-inner {
    padding-block: 48px 44px;
  }

  .article-hero h1 {
    font-size: 2.8rem;
  }
}

@media (max-width: 520px) {
  .main-site-header {
    grid-template-columns: minmax(0, 1fr);
    gap: 6px;
  }

  .main-site-header .main-site-brand {
    grid-column: 1;
    grid-row: 1;
    justify-self: center;
  }

  .main-site-brand img {
    width: 205px;
  }

  .main-site-header .language-switcher {
    grid-column: 1;
    grid-row: 2;
    justify-self: center;
  }

  .main-site-header > nav:not(.language-switcher) {
    grid-column: 1;
    grid-row: 3;
  }

  .cash-route-copy h1 {
    font-size: 2.55rem;
  }

  .cash-route-field > span {
    min-height: 2.2em;
    display: flex;
    align-items: flex-end;
  }

  .cash-route-field .currency-trigger,
  .currency-trigger {
    min-height: 62px;
  }

  .cash-board-title h2 {
    font-size: 2rem;
  }

  .guides-hero {
    height: 610px;
  }

  .guides-hero h1 {
    font-size: 2.9rem;
  }

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

  .country-guide-group-heading h2 {
    font-size: 2.35rem;
  }

  .country-guide-card,
  .country-guide-grid.is-euro-grid .country-guide-card {
    grid-template-rows: 132px minmax(0, auto);
  }

  .masthead-brand .country-destination-logo.is-mini .country-logo-copy strong {
    font-size: 0.72rem;
  }

  .japan-hero h1 {
    font-size: 2.65rem;
  }

  .fact-strip {
    grid-template-columns: 1fr;
  }

  .fact-strip > div:nth-child(even) {
    border-left: 0;
  }

  .fact-strip > div:nth-child(n + 2) {
    border-top: 1px solid var(--cbc-line);
  }

  .article-hero h1 {
    font-size: 2.45rem;
  }
}

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

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

@media print {
  .main-site-header,
  .site-masthead,
  .on-page-nav,
  .hero-actions,
  .cash-board-actions {
    box-shadow: none;
  }
}
