/* Patchferry — river-crossing palette: silt paper, launch-hull green, channel-marker red */

@font-face {
  font-family: "Archivo";
  src: url("fonts/archivo-latin.woff2") format("woff2");
  font-weight: 100 900;
  font-stretch: 62% 125%;
  font-display: swap;
}
@font-face {
  font-family: "JetBrains Mono";
  src: url("fonts/jetbrainsmono-latin.woff2") format("woff2");
  font-weight: 400 600;
  font-display: swap;
}

:root {
  --paper: #e8ece4;
  --paper-deep: #dbe2d6;
  --ink: #13231c;
  --hull: #0e3b2c;
  --hull-ink: #f1f4ee;
  --muted: #4c625b;
  --line: #bccabd;
  --water: #9fb8b4;
  --red: #b3302a;
  --ochre: #8a6206;
  --ochre-bg: #f1e3bd;
  --safe: #1d6a44;
  --safe-bg: #cfe5d6;
  --red-bg: #f3d3cf;
  --focus: #1b5fd1;

  --sans: "Archivo", "Helvetica Neue", Arial, sans-serif;
  --mono: "JetBrains Mono", ui-monospace, "SFMono-Regular", Menlo, monospace;

  /* classical scale: 12 14 16 18 21 24 36 48 60 72 */
  --t-xs: 0.75rem;
  --t-sm: 0.875rem;
  --t-base: 1.0625rem;
  --t-md: 1.3125rem;
  --t-lg: 1.5rem;
  --t-xl: 2.25rem;
  --t-2xl: 3rem;
  --t-3xl: clamp(2.75rem, 7vw, 4.5rem);

  --gutter: clamp(1rem, 4vw, 2.5rem);
  --max: 72rem;
  color-scheme: light;
}

@media (prefers-color-scheme: dark) {
  :root:not([data-theme="light"]) {
    --paper: #0f1a16;
    --paper-deep: #16241e;
    --ink: #e2e9e1;
    --hull: #9fd1b5;
    --hull-ink: #0f1a16;
    --muted: #9db0a8;
    --line: #2c3f37;
    --water: #3b5a55;
    --red: #f08a80;
    --ochre: #e8bd57;
    --ochre-bg: #3a2f12;
    --safe: #7fd3a3;
    --safe-bg: #15382a;
    --red-bg: #42201c;
    --focus: #8ab4ff;
    color-scheme: dark;
  }
}
:root[data-theme="dark"] {
  --paper: #0f1a16;
  --paper-deep: #16241e;
  --ink: #e2e9e1;
  --hull: #9fd1b5;
  --hull-ink: #0f1a16;
  --muted: #9db0a8;
  --line: #2c3f37;
  --water: #3b5a55;
  --red: #f08a80;
  --ochre: #e8bd57;
  --ochre-bg: #3a2f12;
  --safe: #7fd3a3;
  --safe-bg: #15382a;
  --red-bg: #42201c;
  --focus: #8ab4ff;
  color-scheme: dark;
}

*, *::before, *::after { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; scroll-behavior: smooth; }
@media (prefers-reduced-motion: reduce) { html { scroll-behavior: auto; } }

body {
  margin: 0;
  background: var(--paper);
  color: var(--ink);
  font-family: var(--sans);
  font-size: var(--t-base);
  line-height: 1.55;
  font-stretch: 100%;
}

a { color: inherit; text-underline-offset: 0.18em; text-decoration-thickness: 1px; }
a:hover { text-decoration-thickness: 2px; }
:focus-visible { outline: 3px solid var(--focus); outline-offset: 3px; border-radius: 2px; }

code, kbd, pre { font-family: var(--mono); font-size: 0.9em; }
code { background: var(--paper-deep); padding: 0.1em 0.35em; border-radius: 4px; }
pre {
  background: var(--paper-deep);
  border-left: 3px solid var(--hull);
  padding: 0.9rem 1rem;
  overflow-x: auto;
  line-height: 1.5;
  border-radius: 0 6px 6px 0;
}
pre code { background: none; padding: 0; }

.skip { position: absolute; left: -999px; }
.skip:focus { left: 1rem; top: 1rem; background: var(--paper); padding: 0.5rem 1rem; z-index: 10; }

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

/* Header */
.site-head { border-bottom: 1px solid var(--line); }
.site-head .wrap { display: flex; align-items: center; gap: 1.5rem; min-height: 4.25rem; flex-wrap: wrap; }
.mark {
  font-stretch: 125%; font-weight: 800; font-size: var(--t-md);
  text-decoration: none; letter-spacing: -0.01em; display: inline-flex; align-items: center; gap: 0.5rem;
}
.mark svg { width: 1.6rem; height: 1.6rem; }
.site-nav { display: flex; gap: 1.25rem; margin-left: auto; flex-wrap: wrap; align-items: center; font-size: var(--t-sm); }
.site-nav a { text-decoration: none; }
.site-nav a:hover { text-decoration: underline; }

/* Buttons */
.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 0.5rem;
  font: 600 var(--t-base)/1.2 var(--sans);
  padding: 0.8rem 1.2rem; border-radius: 6px; border: 2px solid var(--hull);
  background: var(--hull); color: var(--hull-ink); text-decoration: none; cursor: pointer;
}
.btn:hover { filter: brightness(1.12); text-decoration: none; }
.btn.ghost { background: transparent; color: var(--hull); }
.btn.small { padding: 0.45rem 0.8rem; font-size: var(--t-sm); }

/* Hero */
.hero { padding: clamp(2.5rem, 7vw, 5.5rem) 0 clamp(2.5rem, 6vw, 4.5rem); }
.hero .wrap { display: grid; grid-template-columns: minmax(0, 1.05fr) minmax(0, 1fr); gap: clamp(2rem, 5vw, 4.5rem); align-items: start; }
.hero h1 {
  font-stretch: 125%; font-weight: 850; font-size: var(--t-3xl);
  line-height: 0.98; letter-spacing: -0.02em; margin: 0 0 1.5rem;
}
.hero .lede { font-size: var(--t-md); line-height: 1.45; max-width: 34ch; margin: 0 0 1.75rem; }
.hero .lede strong { font-weight: 650; }
.cta-row { display: flex; gap: 0.75rem; flex-wrap: wrap; }
.hero .fine { margin-top: 1.25rem; color: var(--muted); font-size: var(--t-sm); max-width: 44ch; }

/* Checker */
.checker {
  background: var(--paper-deep); border-radius: 10px; padding: clamp(1.25rem, 3vw, 2rem);
  border: 1px solid var(--line);
}
.checker h2 { font-stretch: 112%; font-weight: 750; font-size: var(--t-lg); line-height: 1.15; margin: 0 0 0.4rem; }
.checker p.how { margin: 0 0 1rem; color: var(--muted); font-size: var(--t-sm); }
.checker form { display: flex; gap: 0.5rem; }
.checker input {
  flex: 1; min-width: 0; font: 500 var(--t-md)/1.2 var(--mono);
  padding: 0.7rem 0.85rem; border-radius: 6px; border: 2px solid var(--ink);
  background: var(--paper); color: var(--ink);
}
.checker input::placeholder { color: var(--muted); opacity: 0.7; }

.verdict { margin-top: 1.25rem; border-radius: 8px; padding: 1rem 1.1rem 1.1rem; border: 2px solid currentColor; display: none; }
.verdict.show { display: block; }
.verdict[data-state="vulnerable"] { color: var(--red); background: var(--red-bg); }
.verdict[data-state="warn"] { color: var(--ochre); background: var(--ochre-bg); }
.verdict[data-state="safe"] { color: var(--safe); background: var(--safe-bg); }
.verdict[data-state="unknown"] { color: var(--muted); background: var(--paper); }
.verdict h3 { margin: 0 0 0.35rem; font-stretch: 112%; font-weight: 800; font-size: var(--t-md); line-height: 1.2; }
.verdict p, .verdict li { color: var(--ink); margin: 0.35rem 0 0; font-size: var(--t-sm); }
.verdict .next { margin-top: 0.9rem; display: flex; flex-wrap: wrap; gap: 0.6rem; align-items: center; }

/* The crossing: from your bank to the supported bank */
.crossing { margin: 0.9rem 0 0.2rem; color: var(--ink); }
.crossing svg { width: 100%; height: auto; display: block; overflow: visible; }
.crossing .bank { fill: var(--ink); opacity: 0.85; }
.crossing .river { fill: var(--water); opacity: 0.55; }
.crossing .route { stroke: currentColor; stroke-width: 2.5; stroke-dasharray: 7 6; fill: none; }
.crossing text { font: 600 13px var(--mono); fill: var(--ink); }
.crossing .boat { fill: var(--hull); }
@media (prefers-reduced-motion: no-preference) {
  .verdict.show .route { animation: sail 1.6s ease-out both; }
  .verdict.show .boat { animation: boat 1.6s ease-out both; }
}
@keyframes sail { from { stroke-dashoffset: 260; opacity: 0.2; } to { stroke-dashoffset: 0; opacity: 1; } }
@keyframes boat { from { transform: translateX(-190px); } to { transform: translateX(0); } }

/* Sections */
section.band { padding: clamp(3rem, 7vw, 5.5rem) 0; border-top: 1px solid var(--line); }
.band h2 { font-stretch: 118%; font-weight: 800; font-size: clamp(1.9rem, 4.2vw, var(--t-2xl)); line-height: 1.05; letter-spacing: -0.015em; margin: 0 0 1rem; max-width: 22ch; }
.band .intro { max-width: 62ch; color: var(--ink); margin: 0 0 2rem; }
.band .intro.muted { color: var(--muted); }
.two { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); gap: clamp(1.5rem, 4vw, 3.5rem); }

/* Facts table */
.facts { width: 100%; border-collapse: collapse; font-size: var(--t-base); }
.facts caption { text-align: left; color: var(--muted); font-size: var(--t-sm); padding-bottom: 0.6rem; }
.facts th, .facts td { text-align: left; padding: 0.7rem 0.75rem 0.7rem 0; border-bottom: 1px solid var(--line); vertical-align: top; }
.facts thead th { font-size: var(--t-sm); color: var(--muted); font-weight: 600; }
.facts td.num { font-family: var(--mono); font-size: 0.95em; white-space: nowrap; }
.facts tr.ending td { color: var(--red); font-weight: 600; }
.table-scroll { overflow-x: auto; }

/* Timeline: real sequence */
.timeline { list-style: none; margin: 0; padding: 0; border-left: 3px solid var(--hull); }
.timeline li { position: relative; padding: 0 0 1.4rem 1.4rem; }
.timeline li::before { content: ""; position: absolute; left: -0.55rem; top: 0.4rem; width: 0.8rem; height: 0.8rem; border-radius: 50%; background: var(--paper); border: 3px solid var(--hull); }
.timeline li.now::before { background: var(--red); border-color: var(--red); }
.timeline time { font-weight: 700; display: block; }
.timeline span { color: var(--muted); }

/* Prices: one ledger, not a card grid */
.ledger { border-top: 3px solid var(--ink); }
.ledger h3 { font-stretch: 112%; font-weight: 750; font-size: var(--t-lg); margin: 2.25rem 0 0.25rem; }
.ledger h3:first-child { margin-top: 1.25rem; }
.ledger .group-note { color: var(--muted); margin: 0 0 0.5rem; font-size: var(--t-sm); }
.row {
  display: grid; grid-template-columns: minmax(11rem, 1fr) minmax(0, 2.2fr) minmax(8.5rem, auto);
  gap: 0.5rem 2rem; padding: 1.25rem 0; border-bottom: 1px solid var(--line); align-items: baseline;
}
.row .name { font-weight: 700; font-size: var(--t-md); line-height: 1.25; }
.row .name small { display: block; font-weight: 400; font-size: var(--t-sm); color: var(--muted); margin-top: 0.2rem; }
.row .what { margin: 0; }
.row .what ul { margin: 0.4rem 0 0; padding-left: 1.1rem; }
.row .what li { margin: 0.15rem 0; }
.row .price { text-align: right; font-stretch: 112%; font-weight: 800; font-size: var(--t-lg); white-space: nowrap; }
.row .price small { display: block; font-weight: 500; font-stretch: 100%; font-size: var(--t-sm); color: var(--muted); }
.row.feature { background: var(--paper-deep); margin: 0 calc(-1 * min(1rem, var(--gutter))); padding-left: min(1rem, var(--gutter)); padding-right: min(1rem, var(--gutter)); border-radius: 6px; border-bottom-color: transparent; }
.terms-note { margin-top: 1.75rem; max-width: 70ch; color: var(--muted); font-size: var(--t-sm); }

/* Steps: an actual sequence */
.steps { list-style: none; counter-reset: step; margin: 0; padding: 0; display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 1.5rem; }
.steps li { counter-increment: step; border-top: 3px solid var(--hull); padding-top: 0.9rem; }
.steps li::before { content: counter(step); font-stretch: 125%; font-weight: 850; font-size: var(--t-xl); line-height: 1; display: block; color: var(--hull); margin-bottom: 0.4rem; }
.steps h3 { margin: 0 0 0.35rem; font-size: var(--t-md); line-height: 1.25; }
.steps p { margin: 0; color: var(--muted); }

.plain-list { margin: 0; padding-left: 1.2rem; }
.plain-list li { margin: 0.35rem 0; }

.guarantee {
  align-self: start;
  border: 2px solid var(--hull); border-radius: 10px; padding: 1.5rem;
}
.guarantee h3 { font-stretch: 118%; font-weight: 800; font-size: var(--t-lg); margin: 0 0 0.5rem; line-height: 1.15; }
.guarantee p { margin: 0.5rem 0 0; }

/* FAQ */
.faq details { border-bottom: 1px solid var(--line); padding: 0.9rem 0; max-width: 70ch; }
.faq summary { cursor: pointer; font-weight: 650; font-size: var(--t-md); line-height: 1.3; list-style-position: inside; }
.faq details p { margin: 0.6rem 0 0.2rem; }

/* Contact */
.contact-grid { display: grid; grid-template-columns: minmax(0, 1.4fr) minmax(0, 1fr); gap: clamp(1.5rem, 5vw, 4rem); }
.field { display: grid; gap: 0.3rem; margin-bottom: 1rem; }
.field label { font-weight: 600; font-size: var(--t-sm); }
.field .hint { color: var(--muted); font-size: var(--t-xs); }
.field input, .field select, .field textarea {
  font: 400 var(--t-base)/1.4 var(--sans); padding: 0.65rem 0.75rem; border-radius: 6px;
  border: 1.5px solid var(--muted); background: var(--paper); color: var(--ink); width: 100%;
}
.field textarea { min-height: 7rem; resize: vertical; }
.field-row { display: grid; grid-template-columns: 1fr 1fr; gap: 0 1rem; }
.form-error { color: var(--red); font-weight: 600; min-height: 1.5em; margin: 0 0 0.75rem; }
.direct dt { font-weight: 700; margin-top: 1rem; }
.direct dd { margin: 0.2rem 0 0; }

/* Footer */
.site-foot { border-top: 1px solid var(--line); padding: 2rem 0 3rem; color: var(--muted); font-size: var(--t-sm); }
.site-foot .wrap { display: flex; flex-wrap: wrap; gap: 1rem 2rem; justify-content: space-between; }
.site-foot nav { display: flex; gap: 1.25rem; flex-wrap: wrap; }

/* Prose pages (guide, legal) */
.prose { max-width: 70ch; padding: clamp(2.5rem, 6vw, 4.5rem) 0 4rem; }
.prose h1 { font-stretch: 122%; font-weight: 850; font-size: clamp(2.2rem, 5.5vw, 3.5rem); line-height: 1.02; letter-spacing: -0.02em; margin: 0 0 1rem; }
.prose h2 { font-stretch: 112%; font-weight: 780; font-size: var(--t-lg); margin: 2.5rem 0 0.5rem; line-height: 1.2; }
.prose h3 { font-size: var(--t-md); margin: 1.75rem 0 0.4rem; }
.prose .meta { color: var(--muted); font-size: var(--t-sm); }
.prose .callout { background: var(--paper-deep); border-radius: 8px; padding: 1rem 1.2rem; margin: 1.5rem 0; }
.prose .callout.red { background: var(--red-bg); }
.prose li { margin: 0.3rem 0; }
.prose .table-scroll { margin: 1rem 0; }

@media (max-width: 860px) {
  .hero .wrap, .two, .contact-grid { grid-template-columns: 1fr; }
  .steps { grid-template-columns: 1fr 1fr; }
  .row { grid-template-columns: 1fr auto; }
  .row .what { grid-column: 1 / -1; grid-row: 2; }
  .row .price { grid-column: 2; grid-row: 1; }
}
@media (max-width: 560px) {
  .site-nav { margin-left: 0; gap: 0.9rem; }
  .site-nav .hide-sm { display: none; }
  .steps { grid-template-columns: 1fr; }
  .field-row { grid-template-columns: 1fr; }
  .checker form { flex-direction: column; }
  .row { grid-template-columns: 1fr; }
  .row .price { grid-column: 1; grid-row: auto; text-align: left; }
  .row .what { grid-row: auto; }
}
