.tool-page { background: #f7f5f0; color: #262626; }
.tool-hero { background: #0a1f44; color: #fff; max-width: none !important; padding: 104px max(24px, calc((100% - 960px) / 2)) 72px; }
.tool-hero h1 { color: #fff; font-family: "Instrument Serif", serif; font-size: clamp(40px, 5vw, 64px); font-weight: 500; letter-spacing: 0; line-height: 1; margin: 0 0 24px; }
.tool-page--treaties .tool-hero h1 { font-size: clamp(32px, 5vw, 56px); font-weight: 400; }
.tool-page--treaties .tool-hero p { font-size: 14px; }
.tool-hero p { color: rgba(255,255,255,.72); margin-left: 0; margin-right: auto; max-width: 640px; }
.visa-comparison, .visa-quiz { margin: 0 auto; max-width: 1080px; padding: 48px 24px 96px; }
.tool-panel { background: #fff; border: 1px solid #e0ddd8; padding: 32px; }
.comparison-selector { border: 0; margin: 0 0 32px; padding: 0; }
.comparison-selector legend, .quiz-kicker { color: #777; font-family: Inter, sans-serif; font-size: 11px; font-weight: 600; letter-spacing: .12em; margin-bottom: 16px; text-transform: uppercase; }
.quiz-progress span { color: #777; font-family: Inter, sans-serif; font-size: 10px; font-weight: 400; letter-spacing: .2em; text-transform: uppercase; }
.comparison-options { display: flex; flex-wrap: wrap; gap: 8px; }
.comparison-options button { background: #fff; border: 1px solid #d6d2cb; color: #444; cursor: pointer; font-family: Inter, sans-serif; font-size: 12px; letter-spacing: .1em; min-height: 44px; padding: 10px 14px; text-transform: uppercase; }
.comparison-options button[aria-pressed="true"] { background: #0a1f44; border-color: #0a1f44; color: #fff; }
.comparison-options button span { display: block; font-size: 11px; }
.tool-status { min-height: 24px; }
.comparison-table-wrap { contain: inline-size paint; max-width: 100%; overflow-x: auto; overscroll-behavior-inline: contain; scrollbar-gutter: stable; width: 100%; }
.comparison-table { border-collapse: collapse; min-width: 720px; width: 100%; }
.comparison-table th, .comparison-table td { border-bottom: 1px solid #e8e4de; font-family: Inter, sans-serif; font-size: 16px; font-weight: 400; padding: 14px; text-align: center; }
.comparison-table thead th:first-child { font-size: 10px; font-weight: 700; letter-spacing: .2em; text-transform: uppercase; }
.comparison-table tbody th { font-size: 12px; font-weight: 500; }
.comparison-table th:first-child { text-align: left; width: 180px; }
.comparison-table thead a, .comparison-more { color: #0a1f44; display: block; text-decoration: none; }
.comparison-table thead strong { display: block; font-family: Inter, sans-serif; font-size: 16px; font-weight: 700; }
.comparison-table thead span { display: block; font-size: 12px; font-weight: 400; }
.comparison-mark { font-weight: 700; }
.comparison-mark.is-yes { color: #1f6d3a; }
.comparison-mark.is-no { color: #888; }
.comparison-more { font-size: 11px; font-weight: 700; margin-top: 12px; text-transform: uppercase; }
.tool-cta { background: #0a1f44; color: #fff; max-width: none !important; padding: 56px 24px; text-align: center; }
.tool-cta h2, .tool-cta p { color: #fff; }
.tool-cta h2 { font-family: "Instrument Serif", serif; font-size: clamp(28px, 3.5vw, 40px); font-weight: 400; }
.tool-cta p { font-family: Inter, sans-serif; font-size: 16px; }
.tool-cta .wp-block-buttons { justify-content: center; }
.quiz-panel { margin: 0 auto; max-width: 680px; }
.quiz-intro { text-align: center; }
.tool-rule { background: #c5a55a; display: block; height: 1px; margin: 0 auto 32px; width: 40px; }
.tool-disclaimer { color: #777; font-family: Inter, sans-serif; font-size: 10px; }
.quiz-intro p:not(.tool-disclaimer) { font-family: Inter, sans-serif; font-size: 14px; }
.tool-primary, .tool-secondary { align-items: center; border: 1px solid #0a1f44; display: inline-flex; font-family: Inter, sans-serif; font-size: 12px; justify-content: center; letter-spacing: .15em; min-height: 48px; padding: 10px 24px; text-decoration: none; text-transform: uppercase; }
.tool-primary { background: #0a1f44; color: #fff; }
.tool-secondary { color: #0a1f44; }
.quiz-progress { align-items: center; display: flex; gap: 20px; justify-content: space-between; }
.quiz-progress progress { accent-color: #0a1f44; max-width: 220px; width: 45%; }
.quiz-panel h2 { color: #0a1f44; font-family: "Instrument Serif", serif; font-size: 24px; font-weight: 400; letter-spacing: 0; }
.quiz-options { display: grid; gap: 12px; }
.quiz-options button { align-items: center; background: #fff; border: 1px solid #d6d2cb; color: #333; cursor: pointer; display: flex; font-family: Inter, sans-serif; font-size: 14px; justify-content: space-between; min-height: 54px; padding: 14px 16px; text-align: left; }
.quiz-options button:hover, .quiz-options button:focus-visible { background: #f7f5f0; border-color: #0a1f44; }
.tool-back, .quiz-footer button { background: transparent; border: 0; color: #555; cursor: pointer; margin-top: 20px; min-height: 44px; }
.quiz-kicker { color: #9a7d37; }
.quiz-code { color: #e8e4de; display: block; font-family: "Instrument Serif", serif; font-size: 72px; font-weight: 400; line-height: .9; }
.quiz-result ul { padding-left: 20px; }
.quiz-result li::marker { color: #c5a55a; }
.quiz-actions { display: flex; flex-wrap: wrap; gap: 12px; margin-top: 28px; }
.quiz-footer { align-items: center; border-top: 1px solid #e8e4de; display: flex; gap: 20px; justify-content: space-between; margin: 28px -32px -32px; padding: 16px 32px; }
.tool-error { background: #fff; border-left: 4px solid #b80000; padding: 20px; }
.tool-page--treaties .tool-hero { text-align: center; }
.tool-page--treaties .tool-hero .treaty-stats { margin: 30px 0 0; }
.tool-page--treaties .tool-hero .treaty-stats span { color: rgba(255,255,255,.55); }
.tool-page--treaties .tool-hero .treaty-stats strong { color: #c5a55a; }
.treaty-tool { margin: 0 auto; max-width: 1160px; padding: 16px 24px 80px; }
.treaty-stats { display: flex; gap: 48px; justify-content: center; margin: 0 0 32px; }
.treaty-stats span { color: #666; font-family: Inter, sans-serif; font-size: 10px; font-weight: 400; letter-spacing: .1em; text-align: center; text-transform: uppercase; }
.treaty-stats strong { color: #c5a55a; display: block; font-family: "Instrument Serif", serif; font-size: 30px; font-weight: 400; letter-spacing: 0; }
.treaty-map-wrap { background: #edf0ef; border: 1px solid #d6d2cb; isolation: isolate; overflow: hidden; position: relative; }
.treaty-map { display: block; height: 498px; width: 100%; }
.treaty-map.leaflet-container { font-family: Inter, sans-serif; }
.treaty-tip { background: #fff; border: 1px solid #d6d2cb; border-radius: 0; box-shadow: 0 8px 24px rgba(10, 31, 68, .14); color: #0a1f44; font-family: Inter, sans-serif; font-size: 12px; line-height: 1.5; padding: 8px 12px; }
.treaty-tip.leaflet-tooltip-top::before { border-top-color: #d6d2cb; }
.treaty-tip.leaflet-tooltip-bottom::before { border-bottom-color: #d6d2cb; }
.treaty-legend { display: flex; flex-wrap: wrap; gap: 20px; margin: 16px 0 24px; }
.treaty-legend span { align-items: center; display: flex; font-size: 12px; gap: 8px; }
.treaty-legend i { background: #dededb; display: inline-block; height: 12px; width: 18px; }
.treaty-legend i.is-e2 { background: #b80000; }
.treaty-legend i.is-e1 { background: #c5a55a; }
.treaty-controls { display: flex; gap: 16px; justify-content: space-between; margin: 36px 0 18px; }
.treaty-controls input { border: 1px solid #d6d2cb; font-family: Inter, sans-serif; font-size: 14px; min-height: 46px; padding: 10px 14px; width: min(360px, 75vw); }
.treaty-filters { display: flex; gap: 6px; }
.treaty-filters button { background: #fff; border: 1px solid #d6d2cb; font-family: Inter, sans-serif; font-size: 12px; letter-spacing: .12em; min-height: 46px; min-width: 56px; text-transform: uppercase; }
.treaty-filters button[aria-pressed="true"] { background: #0a1f44; border-color: #0a1f44; color: #fff; }
.treaty-count { color: #777; font-size: 12px; }
.treaty-grid { background: #d6d2cb; display: grid; gap: 1px; grid-template-columns: repeat(4, 1fr); }
.treaty-card { align-items: center; background: #fff; border: 0; display: flex; font-family: Inter, sans-serif; font-size: 14px; gap: 12px; justify-content: space-between; min-height: 62px; padding: 12px 14px; text-align: left; }
.treaty-card.is-selected { box-shadow: inset 0 0 0 3px #c5a55a; }
.treaty-card i { border: 1px solid currentColor; font-family: Inter, sans-serif; font-size: 9px; font-style: normal; font-weight: 600; letter-spacing: .1em; margin-left: 3px; padding: 2px 4px; text-transform: uppercase; }
.treaty-card i.e-2 { color: #a10000; }
.treaty-card i.e-1 { color: #80671f; }
.treaty-card i.e-3 { color: #0a1f44; }
.treaty-source { color: #666; font-size: 12px; margin-top: 24px; }
.treaty-empty { background: #fff; grid-column: 1 / -1; margin: 0; padding: 24px; }
.tool-page button:focus-visible, .tool-page a:focus-visible, .comparison-table-wrap:focus-visible { outline: 3px solid #c5a55a; outline-offset: 3px; }
@media (max-width: 640px) {
  .tool-hero { padding-top: 148px; }
  .tool-panel { padding: 22px 16px; }
  .comparison-options { display: grid; grid-template-columns: 1fr 1fr; }
  .comparison-table-wrap { border-inline: 1px solid #e0ddd8; }
  .comparison-table th:first-child,
  .comparison-table tbody th {
    background: #fff;
    box-shadow: 1px 0 #e0ddd8;
    left: 0;
    min-width: 132px;
    position: sticky;
    text-align: left;
    z-index: 1;
  }
  .quiz-progress { align-items: flex-start; flex-direction: column; }
  .quiz-progress progress { max-width: none; width: 100%; }
  .quiz-actions { flex-direction: column; }
  .quiz-footer { align-items: flex-start; flex-direction: column; margin: 28px -16px -22px; padding: 16px; }
  .treaty-map { height: 340px; }
  .treaty-controls { flex-direction: column; }
  .treaty-controls input { width: 100%; }
  .treaty-grid { grid-template-columns: 1fr; }
}
@media (prefers-reduced-motion: reduce) { .tool-page *, .tool-page *::before, .tool-page *::after { scroll-behavior: auto !important; transition-duration: .01ms !important; } }