@import url('/assets/type.css');

:root {
  --ink: var(--p38-bg); --ink-2: var(--p38-raised);
  --paper: var(--p38-paper); --paper-2: var(--p38-field); --paper-line: var(--p38-border);
  --signal: var(--p38-accent); --muted: var(--p38-muted); --line: var(--p38-line);
}
body { color: var(--paper); background: var(--ink); }
.app-shell { max-width: 580px; padding-inline: 18px; overflow: visible; }
.brandbar { margin-bottom: 30px; min-height: 44px; }
.brand { gap: 14px; min-height: 44px; }
.brand-mark { position: relative; flex: 0 0 22px; width: 22px; height: 22px; overflow: visible; margin: 4px; border: 2px solid var(--paper); transform: rotate(45deg); }
.brand-mark::before { content: ''; position: absolute; inset: 5px -5px -5px 5px; background: var(--signal); }
.brand-name { font-size: 19px; letter-spacing: -.025em; }
.brand-name span { color: var(--signal); margin-left: 6px; }
.live { font-size: 10px; letter-spacing: 0; }
.intro { margin-bottom: 26px; }
h1 { font-size: clamp(32px, 8vw, 44px); font-weight: 750; line-height: 1.12; letter-spacing: -.035em; text-wrap: balance; }
.intro h1 span { color: var(--signal); }
.intro > p:last-child { font-size: 15px; line-height: 1.65; margin-top: 16px; }
.desk { padding: 20px; box-shadow: none; }
.desk-head h2 { font-size: 21px; }
.desk-live { font-size: 11px; }
.calculator-tabs, .asset-picker-tabs, .market-tabs { grid-template-columns: 1fr 1fr; }
.calculator-tabs button, .asset-picker-tabs button, .market-tab { min-height: 46px; font-size: 13px; text-transform: none; letter-spacing: 0; }
.amount-box { display: grid; grid-template-columns: minmax(0, 1fr) auto; gap: 14px 8px; padding: 16px; }
.amount-box:focus-within { border-color: var(--p38-focus); }
.amount-box > span:first-child, .amount-box > label { grid-column: 1; grid-row: 1; align-self: center; font-size: 13px; line-height: 1.4; color: var(--p38-secondary); text-transform: none; letter-spacing: 0; font-weight: 500; }
.amount-row { display: contents; }
.amount-row .currency-trigger { grid-column: 2; grid-row: 1; }
.amount-row input, .amount-row > strong { grid-column: 1 / -1; width: 100%; font-family: var(--font-ui); font-size: clamp(26px, 7.5vw, 38px); font-weight: 750; line-height: 1.25; letter-spacing: -.025em; font-variant-numeric: tabular-nums; }
.amount-row > strong { overflow: visible; text-overflow: clip; white-space: normal; overflow-wrap: anywhere; }
.amount-row > strong[data-long='true'] { font-size: 24px; }
.amount-row input:focus-visible { outline: 2px solid var(--p38-focus); outline-offset: 3px; }
#limit-hint, .output-box #result-note { grid-column: 1 / -1; color: var(--p38-secondary); font-size: 12px; line-height: 1.45; }
.currency-trigger { min-width: 100px; min-height: 44px; }
.currency-trigger b { font-size: 13px; }
.pair-swap { width: 44px; height: 44px; margin: 10px auto; box-shadow: none; transform: rotate(90deg); }
.pair-swap:hover { transform: rotate(90deg); color: var(--ink); }
.pair-swap svg { width: 24px; height: 24px; }
.output-box { background: var(--p38-field); }
.rate-summary { border-width: 0 0 1px; }
.rate-summary > div { padding: 16px 8px 16px 0; }
.rate-summary > div + div { padding-left: 12px; }
.rate-summary span, .field-title span, .settlement-row span { font-size: 12px; font-weight: 500; text-transform: none; letter-spacing: 0; color: var(--p38-secondary); }
.rate-summary strong { font-size: 13px; line-height: 1.5; }
.field-title small { display: none; }
.network { min-height: 64px; padding: 12px 10px; }
.network b { font-size: 13px; }
.network small { font-size: 10px; color: var(--p38-secondary); }
.settlement-row { gap: 10px; margin-top: 20px; }
.settlement-row .check { font-size: 11px; color: var(--p38-accent-ink); }
.rate-refresh { min-height: 44px; align-items: center; margin-top: 8px; font-size: 12px; color: var(--p38-secondary); }
.form-error { font-size: 13px; line-height: 1.5; color: var(--p38-error-ink); }
.form-error:empty { min-height: 0; margin: 0; }
.primary-button { min-height: 54px; margin-top: 12px; border-radius: 4px; color: var(--p38-text); font-size: 15px; font-weight: 750; text-transform: none; letter-spacing: 0; }
.primary-button:hover:not(:disabled), .support-card a:hover { background: var(--p38-accent-hover); }
.desk-foot { font-size: 12px; line-height: 1.55; color: var(--p38-secondary); }
.asset-picker { display: flex; flex-direction: column; width: min(340px,calc(100vw - 28px)); max-height: calc(100dvh - 28px); border-radius: 8px; }
.asset-picker[hidden] { display: none; }
.asset-picker-head, .asset-picker-tabs { flex-shrink: 0; }
.asset-picker-head button { width: 44px; height: 44px; }
.asset-picker-head strong { text-transform: none; font-size: 14px; }
.asset-picker-list { min-height: 0; overflow-y: auto; overscroll-behavior: contain; }
.asset-picker-option small { color: var(--p38-secondary); font-size: 12px; line-height: 1.4; }
.asset-picker-option > small { font-size: 11px; }
.content-section { margin-top: 44px; }
h2 { font-size: 28px; line-height: 1.15; letter-spacing: -.03em; }
.section-code { display: none; }
.market-status { font-size: 11px; }
.calculator-ticker { margin: 0 0 16px; padding: 0 0 8px; gap: 10px; }
.ticker-currency { flex-basis: 132px; padding: 12px; min-height: 80px; background: transparent; }
.ticker-currency span { font-size: 12px; }
.ticker-currency b { font-size: 16px; }
.ticker-currency small { font-size: 11px; }
.market-columns { font-size: 11px; letter-spacing: 0; color: var(--muted); padding-inline: 0; }
.market-row { min-height: 72px; padding-inline: 0; }
.market-columns, .market-row { grid-template-columns: minmax(0, 1fr) 98px 60px; gap: 8px; }
.market-asset { grid-template-columns: 30px minmax(0, 1fr); gap: 8px; }
.market-flag, .crypto-mark { width: 30px; height: 30px; border: 0; background: transparent; }
.market-asset small { display: block; font-size: 11px; white-space: normal; line-height: 1.4; }
.market-price { font-size: 12px; }
.market-change { font-size: 11px; }
.market-note { font-size: 12px; }
.market-note small { font-size: 12px; line-height: 1.5; }
.office-code { color: var(--p38-text); }
.office-card { grid-template-columns: 44px 1fr auto; padding: 16px; }
.office-code { width: 44px; height: 44px; }
.office-card span, .office-card small, .office-note { font-size: 12px; line-height: 1.5; }
.steps li { padding-block: 20px; }
.steps span { font-size: 12px; }
.steps p, .faq-list p { font-size: 14px; line-height: 1.65; }
.steps b, .faq-list summary { font-size: 16px; line-height: 1.5; }
.support-card div > span { font-size: 12px; }
.support-card a { min-height: 44px; align-items: center; color: var(--p38-text); font-size: 12px; text-transform: none; border-radius: 4px; }
.back-button, .text-button { min-height: 44px; padding: 10px 0; font-size: 14px; }
.hero-copy.compact h1, .success-screen h1 { font-size: 34px; line-height: 1.12; text-transform: none; }
.hero-copy.compact .eyebrow { display: none; }
.receipt > header { font-size: 11px; }
.receipt-main span, .receipt dt, .receipt dd, .receipt footer { font-size: 12px; line-height: 1.5; color: var(--p38-secondary); }
.receipt dd { color: var(--ink); }
.receipt-main strong { font-size: 28px; line-height: 1.3; font-variant-numeric: tabular-nums; overflow-wrap: anywhere; }
.demo-notice { font-size: 13px; line-height: 1.5; }
.legal { color: var(--muted); font: 12px/1.6 var(--font-ui); text-transform: none; }

/* Palette matches the website, including overlays and confirmation screens. */
.desk, .receipt { color: var(--p38-text); }
.calculator-tabs, .asset-picker-tabs { background: var(--p38-field); }
.calculator-tabs button, .asset-picker-tabs button, .desk-live { color: var(--p38-secondary); }
.calculator-tabs button.active, .asset-picker-tabs button.active { color: var(--paper); }
.currency-trigger, .asset-picker { background: var(--p38-card); color: var(--p38-text); }
.currency-trigger, .amount-box, .network { border-color: var(--p38-control-border); }
.currency-trigger.selected, .network.active { border-color: var(--p38-accent-ink); }
.currency-trigger.selected .currency-icon { color: var(--p38-text); }
.currency-trigger .currency-icon { color: var(--paper); }
.currency-trigger i { color: var(--p38-secondary); }
.asset-picker, .asset-picker-head button, .asset-picker-option, .option-icon { border-color: var(--p38-border); }
.option-icon { background: var(--paper); }
.asset-picker-option:hover, .asset-picker-option:focus-visible, .asset-picker-option.active,
.market-row:hover, .market-row:focus-visible, .market-row.selected { background: var(--p38-accent-wash); }
.refresh-icon, .receipt-arrow { color: var(--p38-accent-ink); }
.live i, .market-status i { background: var(--p38-positive); box-shadow: none; }
.desk-live i { background: #557b67; box-shadow: none; }
.market-change.up { color: var(--p38-positive); }
.market-change.down, .market-loading.error { color: var(--p38-negative); }
.market-status.stale { color: var(--signal); }
.market-status.stale i { background: var(--signal); }
.receipt > header { color: var(--p38-secondary); }
.receipt > header, .receipt-main, .receipt dl div { border-color: var(--p38-border); }
.demo-notice { border-color: var(--p38-focus); }
#review-screen .form-error { color: var(--p38-negative); }
@media (max-width: 380px) {
  .app-shell { padding-inline: 14px; }
  .desk { padding: 14px; }
  .amount-box { padding: 12px; }
  .amount-row input, .amount-row > strong { font-size: 28px; }
  .live { font-size: 10px; max-width: 110px; text-align: right; line-height: 1.4; }
  .rate-summary > div + div { padding-left: 0; }
  .market-columns, .market-row { grid-template-columns: minmax(0, 1fr) 88px 54px; gap: 6px; }
  .market-price { font-size: 11px; }
  .market-change { font-size: 10px; }
  .network { padding-inline: 8px; }
  .section-head { align-items: start; }
  .section-head h2 { font-size: 25px; }
}
