/* Configure: exchange worksheet beside a result ledger. */
.currency-tool{max-width:1140px}
.currency-header{max-width:850px;margin:2rem 0}
.currency-header h1{font-size:clamp(2.4rem,4.5vw,4.2rem)}
.currency-header>p:not(.eyebrow){font-family:var(--serif);font-size:1.2rem;max-width:720px}
.currency-header small,.currency-note{font-size:.8rem;color:var(--muted);line-height:1.6}
.currency-instructions{display:grid;grid-template-columns:minmax(0,1.2fr) minmax(0,1fr);gap:3rem;border-block:1px solid var(--line);padding:1.5rem 0;margin-bottom:2rem}
.currency-instructions ol{padding-left:1.4rem;margin:0;font-size:.92rem}
.currency-instructions li{padding-left:.4rem;margin:.4rem 0 .9rem}
.currency-instructions li::marker{font-family:var(--serif);color:var(--accent);font-size:1.15rem}
.currency-direction{margin:0;min-width:0}
.currency-direction figcaption{font-size:.88rem}
.currency-direction>p{display:flex;align-items:center;gap:1.2rem;font-size:1.6rem;font-family:var(--serif);margin:.5rem 0;overflow-wrap:anywhere}
.currency-direction b{font-weight:400}
.currency-direction small{font-size:.76rem;color:var(--muted);display:block}
.currency-workbench{display:grid;grid-template-columns:minmax(0,1.4fr) minmax(0,1fr);gap:3rem;align-items:start}
.currency-tool fieldset{border:0;padding:0;margin:0;min-width:0}
.currency-tool legend{font-size:.78rem;letter-spacing:.08em;text-transform:uppercase;padding:0;margin-bottom:1rem;color:var(--accent)}
.currency-tool label{display:block;font-size:.9rem;margin:1rem 0;font-weight:600}
.currency-tool input,.currency-tool select{display:block;width:100%;max-width:100%;min-height:48px;border:1px solid #80978c;background:var(--surface);color:var(--ink);border-radius:0;padding:.6rem .7rem;margin:.4rem 0;font-size:1rem;font-weight:400}
.currency-tool input[aria-invalid=true]{border:2px solid var(--accent)}
.currency-tool label .currency-note,.currency-error{display:block;font-weight:400}
.currency-pair{display:grid;grid-template-columns:1fr 1fr;gap:1rem}
.currency-pair label{min-width:0}
.currency-tool button:not(.button){background:transparent;border:1px solid var(--line);color:var(--ink);padding:.5rem .8rem;min-height:44px}
.currency-actions{display:flex;flex-wrap:wrap;gap:.8rem;margin:1.5rem 0}
.currency-error,[data-currency-error]{font-size:.83rem;color:#8a3020}
.currency-result{background:var(--sand);padding:1.5rem 1.8rem;min-width:0}
.currency-result dl{margin:1.4rem 0}
.currency-result dl>div{border-top:1px solid #bfb69e;padding:1rem 0}
.currency-result dt{font-size:.85rem}
.currency-result dd{margin:.4rem 0 0;font-size:1.45rem;font-family:var(--serif);font-variant-numeric:tabular-nums;overflow-wrap:anywhere}
.currency-result .currency-net dd{font-size:2rem}
.currency-unit{font-size:.92rem;overflow-wrap:anywhere;font-variant-numeric:tabular-nums}
.currency-source,.currency-reference,.currency-method,.currency-related{border-top:1px solid var(--line);padding-top:2rem;margin-top:3rem}
.currency-tool section>h2,.currency-related h2{font-size:2rem}
.currency-source dl{display:grid;grid-template-columns:1fr 1fr 1.5fr;gap:1rem;font-size:.9rem}
.currency-source dt{font-size:.78rem;color:var(--muted)}
.currency-source dd{margin:.25rem 0;overflow-wrap:anywhere}
.currency-reference>p,.currency-method>p{max-width:850px;font-size:.95rem}
.currency-table-scroll{overflow-x:auto;margin-top:1rem}
.currency-tool table{min-width:100%;width:100%;table-layout:fixed}
.currency-tool th,.currency-tool td{min-width:0;overflow-wrap:anywhere;padding:.75rem;text-align:left;font-size:.85rem}
.currency-tool tbody th{background:transparent;font-weight:400}
.currency-tool thead th:first-child{width:42%}
.currency-formula{background:var(--sea);padding:1.2rem;overflow-wrap:anywhere}
.currency-method .eyebrow{margin-top:2rem}
.currency-nojs{background:var(--sea);padding:1.4rem}
.currency-workbench:has(form[hidden]){display:block}
.currency-workbench:has(form[hidden]) .currency-result{background:transparent;padding:0}
.currency-workbench:has(form[hidden]) .currency-result dl,.currency-workbench:has(form[hidden]) .currency-result>.eyebrow{display:none}
@media(max-width:720px){
.currency-instructions,.currency-workbench{display:block}
.currency-header{margin:1rem 0 1.5rem}
.currency-direction{margin-top:1.5rem}
.currency-pair{display:block}
.currency-result{margin-top:2rem;padding:1.4rem}
.currency-source dl{display:block}
.currency-source dl>div{margin:1rem 0}
.currency-tool section>h2{font-size:1.65rem}
.currency-tool th,.currency-tool td{padding:.6rem .35rem;font-size:.76rem}
}
