/*
 * IronVault network design language.
 * Bright white, near-black ink, hairline rules, one accent per brand.
 * Brand colors come from each site's config (theme) as CSS variables.
 */

:root {
  --ink: #111418;
  --ink-2: #41464D;
  --ink-3: #4D535A;
  --line: #ECEDEF;
  --line-2: #E3E4E7;
  --field: #D5D7DB;
  --paper: #FFFFFF;
  --accent: #0F5132;
  --link: #1F3A5F;
  --danger: #B42318;
  --sans: 'IBM Plex Sans', system-ui, -apple-system, 'Segoe UI', sans-serif;
  --serif: 'IBM Plex Serif', Georgia, serif;
  --mono: 'IBM Plex Mono', ui-monospace, Menlo, monospace;
  --max: 1120px;
  --shadow: 0 1px 2px rgba(17, 20, 24, 0.04), 0 16px 40px rgba(17, 20, 24, 0.07);
}

*, *::before, *::after { box-sizing: border-box; }
[hidden] { display: none !important; }

html { -webkit-text-size-adjust: 100%; }
body {
  margin: 0;
  background: var(--paper);
  color: var(--ink);
  font-family: var(--sans);
  font-size: 18px;
  line-height: 1.55;
  -webkit-font-smoothing: antialiased;
}
a { color: var(--link); }
a:hover { color: var(--ink); }
img { max-width: 100%; height: auto; }
section[id] { scroll-margin-top: 96px; }

.sr-only {
  position: absolute; width: 1px; height: 1px; padding: 0; margin: -1px;
  overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; border: 0;
}
.skip {
  position: absolute; left: 16px; top: -48px; z-index: 100;
  background: var(--ink); color: #fff; padding: 10px 14px; border-radius: 6px; text-decoration: none;
}
.skip:focus { top: 12px; color: #fff; }
:focus-visible { outline: 2px solid var(--accent); outline-offset: 2px; }

/* ---------- Layout ---------- */

.wrap { max-width: var(--max); margin: 0 auto; padding-left: 32px; padding-right: 32px; }
.section { border-top: 1px solid var(--line); }
.section > .wrap { padding-top: 96px; padding-bottom: 96px; }
.hero > .wrap { padding-top: 96px; padding-bottom: 112px; }
.section--last > .wrap { padding-bottom: 112px; }

.split { display: flex; flex-wrap: wrap; gap: 72px; align-items: center; }
.split--top { align-items: flex-start; }
.split__text { flex: 1 1 340px; min-width: 0; max-width: 500px; }
.split__media { flex: 1 1 520px; min-width: 0; }
.narrow { max-width: 640px; }

/* ---------- Type ---------- */

h1, h2, h3 { margin: 0; font-weight: 500; }
h1 { font-size: 40px; line-height: 1.2; letter-spacing: -0.015em; }
h2 { font-size: 30px; line-height: 1.3; letter-spacing: -0.01em; }
h3 { font-size: 20px; line-height: 1.35; }
.lead { margin: 20px 0 0; font-size: 20px; line-height: 1.6; color: var(--ink-2); }
.lead + .lead { margin-top: 12px; }
.lead strong { font-weight: 600; color: var(--ink); }
.sub { margin: 16px 0 0; max-width: 620px; font-size: 20px; line-height: 1.6; color: var(--ink-2); }
.note { margin: 40px 0 0; padding-top: 20px; border-top: 1px solid var(--line); font-size: 16px; line-height: 1.7; color: var(--ink-3); }
.note--ink { color: var(--ink); font-size: 17px; }
.hint { font-size: 16px; color: var(--ink-3); }
.fineprint { margin: 0; font-size: 14px; line-height: 1.5; color: var(--ink-3); font-family: var(--sans); }
.num { font-family: var(--mono); font-size: 15px; color: var(--ink-3); }
.callout { margin-top: 32px; border-left: 2px solid var(--ink); padding: 4px 0 4px 18px; font-size: 17px; line-height: 1.6; }

/* ---------- Buttons ---------- */

.actions { margin-top: 32px; display: flex; align-items: center; gap: 16px; flex-wrap: wrap; }
.btn {
  display: inline-flex; align-items: center; justify-content: center;
  min-height: 54px; padding: 0 24px; border: 0; border-radius: 6px;
  background: var(--accent); color: #fff;
  font-family: var(--sans); font-size: 17px; font-weight: 500; line-height: 1;
  text-decoration: none; cursor: pointer;
}
.btn:hover { color: #fff; filter: brightness(1.12); }
.btn--outline {
  min-height: 48px; padding: 0 16px;
  background: transparent; color: var(--accent); border: 1px solid var(--accent);
}
.btn--outline:hover { color: var(--accent); background: color-mix(in srgb, var(--accent) 6%, transparent); filter: none; }
.btn--block { display: flex; width: 100%; }

/* ---------- Header ---------- */

.site-header { position: sticky; top: 0; z-index: 50; background: var(--paper); border-bottom: 1px solid var(--line); }
.bar { display: flex; align-items: center; justify-content: space-between; gap: 24px; padding-top: 18px; padding-bottom: 18px; }
.logo { color: var(--ink); text-decoration: none; font-size: 20px; font-weight: 600; letter-spacing: -0.01em; white-space: nowrap; }
.logo:hover { color: var(--ink); }
.logo em, .site-footer__brand em { font-style: normal; color: var(--accent); }
.nav { display: flex; align-items: center; gap: 28px; flex-wrap: wrap; font-size: 17px; }
.nav a:not(.btn) { color: var(--ink-2); text-decoration: none; }
.nav a:not(.btn):hover { color: var(--ink); }
.nav a[aria-current="page"] { color: var(--ink); text-decoration: underline; text-underline-offset: 6px; text-decoration-thickness: 1px; }

.menu-toggle {
  display: none; align-items: center; justify-content: center;
  width: 44px; height: 44px; padding: 0;
  border: 1px solid var(--line-2); border-radius: 6px; background: var(--paper); color: var(--ink); cursor: pointer;
}
.menu-toggle__close { display: none; }
.menu-toggle[aria-expanded="true"] .menu-toggle__open { display: none; }
.menu-toggle[aria-expanded="true"] .menu-toggle__close { display: block; }

.mobile-nav { display: flex; flex-direction: column; padding-top: 8px; padding-bottom: 24px; border-top: 1px solid var(--line); }
.mobile-nav a:not(.btn) { padding: 14px 0; border-bottom: 1px solid var(--line); color: var(--ink); text-decoration: none; font-size: 20px; }
.mobile-nav a[aria-current="page"] { font-weight: 600; }
.mobile-nav .btn { margin-top: 20px; }

@media (max-width: 1080px) {
  .js .nav { display: none; }
  .js .menu-toggle { display: inline-flex; }
  .no-js .bar { flex-wrap: wrap; }
}
@media (min-width: 1081px) {
  .mobile-nav { display: none !important; }
}

/* ---------- Footer ---------- */

.site-footer { border-top: 1px solid var(--line); }
.site-footer__inner {
  padding-top: 40px; padding-bottom: 48px;
  display: flex; flex-wrap: wrap; justify-content: space-between; gap: 24px;
  font-size: 15px; line-height: 1.7; color: var(--ink-3);
}
.site-footer__brand { color: var(--ink); font-weight: 600; }
.site-footer__links { display: flex; flex-wrap: wrap; gap: 8px 24px; align-items: flex-start; }
.site-footer__links a { color: var(--ink-2); }
.site-footer__links a[aria-current="page"] { color: var(--ink); }

/* ---------- Paper documents (license, bounty, charter) ---------- */

.doc {
  background: var(--paper); border: 1px solid var(--line-2); border-radius: 4px; box-shadow: var(--shadow);
  padding: 40px 44px; font-family: var(--serif); color: var(--ink);
}
.doc__head {
  display: flex; justify-content: space-between; align-items: baseline; gap: 16px;
  padding-bottom: 14px; border-bottom: 1px solid var(--ink);
}
.doc__title { font-size: 24px; font-weight: 500; }
.tag { font-family: var(--mono); font-size: 14px; color: var(--ink-3); }
.doc__row { margin-top: 24px; padding-top: 16px; border-top: 1px solid var(--line-2); }

.pairs { margin: 20px 0 0; display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 14px 32px; font-size: 17px; }
.doc__row.pairs { margin-top: 24px; }
.pairs dt { font-family: var(--sans); font-size: 14px; color: var(--ink-3); margin-bottom: 2px; }
.pairs dd { margin: 0; }
.pairs .count { font-family: var(--mono); font-size: 24px; font-weight: 500; }

.fill-in {
  width: 100%; margin: 0; padding: 0 0 2px; border: 0; border-bottom: 1px dashed #B8BBC1; border-radius: 0;
  background: transparent; font-family: var(--serif); font-size: 17px; color: var(--ink);
}
.fill-in:focus { outline: none; border-bottom: 1px solid var(--accent); }

.fee {
  margin-top: 16px; padding: 16px 0 6px; border-top: 1px solid var(--line-2);
  display: flex; justify-content: space-between; align-items: baseline; gap: 8px 16px; flex-wrap: wrap;
}
.fee__label { font-size: 17px; }
.fee__amount { font-family: var(--mono); font-size: 32px; font-weight: 500; letter-spacing: -0.01em; color: var(--accent); font-variant-numeric: tabular-nums; }
.fee + .fineprint { padding-bottom: 14px; }

.terms { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); border-top: 1px solid var(--line-2); }
.terms__col { min-width: 0; padding: 20px 24px 4px 0; border-right: 1px solid var(--line-2); }
.terms__col + .terms__col { padding: 20px 0 4px 24px; border-right: 0; }
.terms__head { display: flex; justify-content: space-between; align-items: center; gap: 8px; flex-wrap: wrap; font-size: 18px; font-weight: 500; }
.terms ul { margin: 14px 0 0; padding: 0; list-style: none; font-size: 17px; line-height: 2; }
.terms ul.muted { color: var(--ink-2); }
.terms .fineprint { margin-top: 6px; }

.badge {
  font-family: var(--sans); font-size: 14px; font-weight: 600; color: var(--accent);
  border: 1px solid var(--accent); border-radius: 3px; padding: 2px 8px;
}
.stamp {
  display: inline-block; transform: rotate(-6deg);
  font-family: var(--sans); font-size: 14px; font-weight: 600; letter-spacing: 0.1em; text-transform: uppercase;
  color: var(--danger); border: 2px solid var(--danger); border-radius: 3px; padding: 2px 8px;
}

.sigs { margin-top: 32px; display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 32px; font-family: var(--sans); font-size: 15px; color: var(--ink-3); }
.sigs > div { border-top: 1px solid var(--ink); padding-top: 8px; }
.sig__name { display: block; color: var(--ink); font-family: var(--serif); font-size: 16px; }

.rules { margin: 0; padding: 0; list-style: none; font-size: 18px; line-height: 1.65; }
.rules li { display: grid; grid-template-columns: 36px minmax(0, 1fr); gap: 12px; padding: 18px 0; border-bottom: 1px solid var(--line); }
.rules li:last-child { border-bottom: 0; }
.rules .num { padding-top: 3px; }

.amount-row {
  margin-top: 24px; padding: 18px 0; border-top: 1px solid var(--line-2); border-bottom: 1px solid var(--line-2);
  display: flex; justify-content: space-between; align-items: baseline; gap: 8px 16px; flex-wrap: wrap;
}

/* ---------- Rows and lists ---------- */

.kv-rows { margin: 0; font-size: 18px; }
.kv { display: grid; grid-template-columns: 200px minmax(0, 1fr); gap: 24px; padding: 18px 0; border-top: 1px solid var(--line); }
.kv:first-child { border-top-color: var(--ink); }
.kv:last-child { border-bottom: 1px solid var(--line); }
.kv dt { font-weight: 500; }
.kv dd { margin: 0; color: var(--ink-2); line-height: 1.6; }

.doc .kv { grid-template-columns: 150px minmax(0, 1fr); gap: 16px; padding: 16px 0; border-top: 0; border-bottom: 1px solid var(--line); }
.doc .kv:last-child { border-bottom: 0; }
.doc .kv dt { font-family: var(--sans); font-size: 15px; font-weight: 400; color: var(--ink-3); padding-top: 2px; }
.doc .kv dd { color: var(--ink); }
.kv dd.money { font-family: var(--mono); font-size: 20px; font-weight: 500; }

.status-rows { margin: 0; font-size: 18px; }
.status-row { display: flex; justify-content: space-between; gap: 24px; padding: 18px 0; border-top: 1px solid var(--line); }
.status-row:first-child { border-top-color: var(--ink); }
.status-row:last-child { border-bottom: 1px solid var(--line); }
.status-row dd { margin: 0; text-align: right; font-size: 16px; color: var(--ink-2); }
.status-row dd.flag { font-size: 15px; font-weight: 600; letter-spacing: 0.06em; text-transform: uppercase; color: var(--danger); }

.steps { margin: 40px 0 0; padding: 0; list-style: none; display: flex; flex-wrap: wrap; gap: 32px; }
.step { flex: 1 1 260px; min-width: 0; border-top: 1px solid var(--ink); padding-top: 18px; }
.step__head { display: flex; align-items: baseline; gap: 12px; }
.step__title { font-size: 20px; font-weight: 500; }
.step p { margin: 10px 0 0; font-size: 17px; line-height: 1.6; color: var(--ink-2); }

.card-grid {
  margin: 40px 0 0; padding: 0; list-style: none;
  display: grid; grid-template-columns: repeat(auto-fill, minmax(300px, 1fr));
  border-top: 1px solid var(--line-2); border-left: 1px solid var(--line-2);
}
.card-grid--2 { grid-template-columns: repeat(2, minmax(0, 1fr)); }
@media (max-width: 720px) { .card-grid--2 { grid-template-columns: 1fr; } }
.card { padding: 28px; border-right: 1px solid var(--line-2); border-bottom: 1px solid var(--line-2); }
.card h3 { margin-top: 14px; }
.card p { margin: 8px 0 0; font-size: 17px; line-height: 1.6; color: var(--ink-2); }

.columns { margin-top: 40px; display: flex; flex-wrap: wrap; gap: 48px; }
.columns > div { flex: 1 1 400px; min-width: 0; }
.column-head { display: flex; justify-content: space-between; align-items: baseline; padding-bottom: 12px; border-bottom: 1px solid var(--ink); font-size: 20px; font-weight: 500; }
.line-list { margin: 0; padding: 0; list-style: none; }
.line-list li { padding: 16px 0; border-bottom: 1px solid var(--line); font-size: 18px; line-height: 1.6; }

.duo { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 20px; }
.mini-doc { border: 1px solid var(--line-2); border-radius: 4px; padding: 24px; font-family: var(--serif); font-size: 17px; line-height: 1.7; }
.mini-doc__title { font-weight: 500; margin-bottom: 8px; }
.mini-doc__line { color: var(--ink-2); display: flex; align-items: center; gap: 8px; }
.mini-doc__foot { margin-top: 20px; font-family: var(--sans); font-size: 15px; font-weight: 600; color: var(--accent); }
.mini-doc__foot--out { color: var(--danger); }
.redact { display: inline-block; height: 13px; background: var(--ink); }

/* ---------- Ledger ---------- */

.ledger { border: 1px solid var(--line-2); border-radius: 4px; box-shadow: var(--shadow); font-family: var(--mono); font-size: 16px; }
.ledger__head, .ledger__total { display: flex; justify-content: space-between; gap: 16px; padding: 16px 24px; font-weight: 500; }
.ledger__head { border-bottom: 1px solid var(--line-2); }
.ledger__row { display: flex; flex-wrap: wrap; gap: 4px 20px; padding: 16px 24px; border-bottom: 1px solid var(--line); }
.ledger__time { width: 80px; color: var(--ink-3); }
.ledger__label { flex: 1 1 160px; }
.ledger__note { color: var(--ink-2); }

/* ---------- Tables ---------- */

.table-wrap { margin-top: 40px; overflow-x: auto; }
.table { width: 100%; min-width: 560px; border-collapse: collapse; font-size: 18px; text-align: left; }
.table thead tr { border-bottom: 1px solid var(--ink); }
.table th[scope="col"] { padding: 0 24px 12px 0; font-size: 15px; font-weight: 500; color: var(--ink-3); }
.table tbody tr { border-bottom: 1px solid var(--line); }
.table th[scope="row"] { padding: 18px 24px 18px 0; font-weight: 500; }
.table td { padding: 18px 24px 18px 0; }
.table td.out { color: var(--danger); padding-right: 0; }

/* ---------- Forms ---------- */

.form-card { border: 1px solid var(--line-2); border-radius: 4px; padding: 36px 40px; display: grid; gap: 22px; }
.form-grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 22px 20px; }
.field { display: grid; gap: 8px; margin: 0; padding: 0; border: 0; min-width: 0; }
.field > label, .field legend { font-size: 16px; font-weight: 500; padding: 0; }
.field legend { margin-bottom: 10px; }
.field__optional { font-weight: 400; color: var(--ink-3); }
.field input[type="text"], .field input[type="email"], .field input[type="tel"], .field select, .field textarea {
  width: 100%; min-height: 54px; padding: 0 14px; border: 1px solid var(--field); border-radius: 6px;
  background: var(--paper); font-family: var(--sans); font-size: 17px; color: var(--ink);
}
.field textarea { padding: 12px 14px; line-height: 1.5; resize: vertical; }
.field select { padding: 0 12px; }
.field input:focus, .field select:focus, .field textarea:focus { outline: 2px solid var(--accent); outline-offset: 1px; border-color: var(--accent); }
.field [aria-invalid="true"] { border-color: var(--danger); }
.field__error { margin: 0; font-size: 15px; color: var(--danger); }
.field--check label { display: flex; align-items: center; gap: 10px; min-height: 48px; font-size: 17px; cursor: pointer; }
.field--check input, .choice input { margin: 0; width: 16px; height: 16px; accent-color: var(--ink); }
.form-status { margin: 0; font-size: 17px; }
.form-status--error { color: var(--danger); }
.form-status--ok { color: var(--accent); font-weight: 500; }
.hp { position: absolute; left: -10000px; width: 1px; height: 1px; overflow: hidden; }

.choices { display: flex; flex-wrap: wrap; gap: 10px; }
.choice {
  flex: 1 1 200px; display: flex; align-items: center; gap: 10px; min-height: 54px; padding: 0 14px;
  border: 1px solid var(--line-2); border-radius: 6px; font-size: 17px; cursor: pointer;
}
.choice:has(input:checked) { border-color: var(--ink); }
fieldset.choices-set { margin: 40px 0 0; padding: 0; border: 0; min-width: 0; }
fieldset.choices-set legend { padding: 0; margin-bottom: 14px; font-size: 16px; color: var(--ink-3); }

.result {
  margin-top: 40px; border: 1px solid var(--line-2); border-radius: 4px; box-shadow: var(--shadow);
  padding: 32px 36px; display: flex; flex-wrap: wrap; gap: 48px;
}
.result > div { flex: 1 1 320px; min-width: 0; }
.result__label { font-size: 15px; color: var(--ink-3); }
.result ul { margin: 10px 0 0; padding: 0; list-style: none; font-size: 18px; line-height: 2; }
.result__out { margin-top: 14px; padding-top: 14px; border-top: 1px solid var(--line); font-size: 16px; line-height: 1.6; color: var(--danger); }
.result__range { margin-top: 8px; font-family: var(--mono); font-size: 30px; font-weight: 500; color: var(--accent); }
.result p { margin: 8px 0 0; font-size: 16px; line-height: 1.6; color: var(--ink-2); }
.result .btn { margin-top: 20px; }

/* ---------- Small screens ---------- */

@media (max-width: 640px) {
  h1 { font-size: 33px; }
  h2 { font-size: 26px; }
  .wrap { padding-left: 20px; padding-right: 20px; }
  .section > .wrap { padding-top: 64px; padding-bottom: 64px; }
  .hero > .wrap { padding-top: 48px; padding-bottom: 64px; }
  .split { gap: 40px; }
  .doc { padding: 28px 22px; }
  .pair--wide-sm { grid-column: 1 / -1; }
  .terms { grid-template-columns: 1fr; }
  .terms__col { padding: 20px 0 12px; border-right: 0; }
  .terms__col + .terms__col { padding: 20px 0 4px; border-top: 1px solid var(--line-2); }
  .duo, .form-grid { grid-template-columns: 1fr; }
  .kv { grid-template-columns: 1fr; gap: 4px; }
  .form-card { padding: 28px 22px; }
  .result { padding: 24px 22px; gap: 32px; }
  .status-row { flex-wrap: wrap; gap: 4px 24px; }
}

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

/* ---------- Additions: prices, inline amounts, gate ---------- */

.price { font-family: var(--mono); font-size: 20px; font-weight: 500; color: var(--accent); }
.amt { font-family: var(--mono); font-weight: 500; color: var(--accent); white-space: nowrap; }
.brand-name { font-weight: 600; }
.brand-name em { font-style: normal; color: var(--accent); }
.card a { font-size: 17px; }
.card .paid { margin-top: 14px; font-size: 15px; color: var(--ink-3); }

.gate { min-height: 100vh; display: flex; flex-direction: column; }
.gate__bar { display: flex; justify-content: space-between; align-items: center; padding: 28px 32px; font-family: var(--mono); font-size: 14px; color: var(--ink-3); letter-spacing: 0.04em; }
.gate__bar .logo { font-family: var(--sans); }
.gate__main { flex: 1; display: flex; align-items: center; justify-content: center; padding: 32px 20px 96px; }
.gate__box { text-align: center; }
.gate__title { font-size: 30px; }
.gate__form { margin: 48px auto 0; display: flex; flex-direction: column; align-items: center; }
.gate__field { position: relative; }
.gate__pin {
  display: block; box-sizing: content-box; width: 9em; padding: 0 0 12px 0.3em; margin: 0;
  border: 0; border-radius: 0; outline: none; background: transparent;
  font-family: var(--mono); font-size: clamp(30px, 9vw, 44px); letter-spacing: 0.9em; color: var(--ink);
  caret-color: var(--accent);
  background-image: repeating-linear-gradient(to right, var(--line-2) 0 1.2em, transparent 1.2em 1.5em);
  background-repeat: no-repeat; background-size: 9em 2px; background-position: 0 100%;
}
.gate__pin:focus { background-image: repeating-linear-gradient(to right, var(--ink) 0 1.2em, transparent 1.2em 1.5em); }
.gate__scan { position: absolute; left: 0; bottom: 0; height: 2px; width: 0; background: var(--accent); }
.gate--checking .gate__scan { animation: gate-scan 0.7s ease-in-out forwards; }
.gate--error .gate__scan { width: 100%; background: var(--danger); animation: none; }
@keyframes gate-scan { from { width: 0; } to { width: 100%; } }
.gate__status { margin: 28px 0 0; min-height: 1.5em; font-family: var(--mono); font-size: 15px; color: var(--ink-3); }
.gate--error .gate__status { color: var(--danger); }
.gate__form .btn { margin-top: 28px; min-width: 200px; }
.gate__foot { padding: 0 20px 32px; text-align: center; font-size: 15px; color: var(--ink-3); }
@media (prefers-reduced-motion: reduce) { .gate--checking .gate__scan { animation: none; width: 100%; } }
