/* SilCoin.ai — shared styles. Mobile first. No external fonts, no images: everything is CSS and inline SVG. */

:root {
  color-scheme: light;
  --paper: #f4f0e7;
  --paper-2: #ebe7da;
  --card: #fffdf6;
  --sage: #e7e9dc;
  --sage-2: #dce4d5;
  --ink: #1f3a35;
  --ink-2: #4a5d56;
  --ink-3: #5c6b62;
  --line: #cfd1c3;
  --line-2: #b3bdaf;
  --green: #294f45;
  --green-deep: #173c34;
  --green-soft: #447666;
  --lead: #e6efe1;
  --lead-line: #6f9482;
  --gold: #dfbc6c;
  --gold-hi: #fce8ad;
  --gold-lo: #c79c4c;
  --gold-rim: #a27b36;
  --gold-ink: #6f5226;
  --amber-bg: #f7edd3;
  --amber-ink: #6f4a0b;
  --amber-line: #d9bf85;
  --red-bg: #f4e4d8;
  --red-ink: #8a3829;
  --red-line: #c98f7a;
  --voice: Georgia, "Iowan Old Style", "Palatino Linotype", "Noto Serif", "Times New Roman", serif;
  --ui: system-ui, -apple-system, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
  --radius: 12px;
  --radius-s: 8px;
  --shadow: 0 1px 0 rgba(31, 58, 53, .05), 0 10px 30px -18px rgba(31, 58, 53, .35);
  --wrap: 1080px;
  --pad: clamp(16px, 4.5vw, 32px);
  --p: 1; /* scroll progress of the Silcoin picture, 0..1. Stays 1 without JavaScript or with motion off. */
}

*, *::before, *::after { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; text-size-adjust: 100%; scroll-behavior: smooth; }
body {
  margin: 0;
  background: var(--paper);
  color: var(--ink);
  font: 16px/1.55 var(--ui);
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
  overflow-wrap: break-word;
}
body::before { /* soft paper wash behind the hero */
  content: ""; position: absolute; inset: 0 0 auto 0; height: 620px; z-index: -1; pointer-events: none;
  background: radial-gradient(120% 90% at 85% -10%, #fbf3dc 0, rgba(251, 243, 220, 0) 60%), radial-gradient(90% 80% at 0% 0%, #e9eee0 0, rgba(233, 238, 224, 0) 62%);
}
h1, h2, h3, h4, p, ul, ol, dl, dd, figure { margin: 0; }
ul, ol { padding: 0; list-style: none; }
a { color: inherit; text-underline-offset: 3px; text-decoration-thickness: 1px; }
a:hover { text-decoration-thickness: 2px; }
button, input, select, textarea { font: inherit; color: inherit; }
button { cursor: pointer; }
button:disabled { cursor: default; opacity: .55; }
[hidden] { display: none !important; }
:focus-visible { outline: 3px solid #2b7467; outline-offset: 3px; border-radius: 4px; }
::selection { background: #d9e6cf; }

.contents { display: contents; }
.gap-top { margin-top: 12px; }
.gap-block { margin-block: 20px; }
.gap-big { margin-top: 28px; }
.sr-only { position: absolute; width: 1px; height: 1px; margin: -1px; padding: 0; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; border: 0; }
.skip { position: absolute; left: 12px; top: -60px; z-index: 20; padding: 10px 14px; background: var(--green); color: #fffdf6; border-radius: 8px; text-decoration: none; }
.skip:focus { top: 12px; }
.wrap { width: 100%; max-width: var(--wrap); margin-inline: auto; padding-inline: max(var(--pad), env(safe-area-inset-left)) max(var(--pad), env(safe-area-inset-right)); }
.voice { font-family: var(--voice); }
.eyebrow { font-size: 11px; font-weight: 700; letter-spacing: .16em; text-transform: uppercase; color: var(--ink-2); }
.fine { font-size: 13px; color: var(--ink-2); }
.num { font-variant-numeric: tabular-nums; }

/* ---------- Coins ---------- */
/* One coin face everywhere: gold, with a single-stroke S. */
.coin, .mk-coin, .fc, .roller, .coin-dot, .ribbon i { background: url(/assets/coin.svg) center / contain no-repeat; }
.coin-plain { display: inline-block; border-radius: 50%; background: radial-gradient(circle at 34% 30%, #fff3c9, #e8c678 52%, #b98a3e); box-shadow: inset 0 0 0 .03em rgba(143, 102, 40, .7); }
@keyframes coin-flip { from { transform: rotateY(0); } to { transform: rotateY(360deg); } }

/* ---------- Header and wordmark ---------- */
.top { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 4px 12px; padding-block: 14px 10px; }
.wordmark { display: inline-flex; align-items: center; text-decoration: none; min-height: 44px; color: var(--ink); }
.wm { display: inline-flex; align-items: center; font: 700 23px/1 var(--voice); letter-spacing: -.01em; white-space: nowrap; }
.wm .coin { display: inline-block; width: .6em; height: .6em; margin: .12em .02em 0; }
.wm .coin-plain { width: .2em; height: .2em; margin: .42em .06em 0 .04em; }
.nav { display: flex; gap: 2px; font-size: 14px; margin-left: auto; }
.nav a { padding: 11px 9px; border-radius: 8px; text-decoration: none; color: var(--ink-2); min-height: 44px; display: inline-flex; align-items: center; white-space: nowrap; }
.nav .nav-home { display: none; }
.nav a:hover { color: var(--ink); background: rgba(31, 58, 53, .06); }
.nav a[aria-current="page"] { color: var(--ink); font-weight: 600; box-shadow: inset 0 -2px 0 var(--gold-lo); border-radius: 8px 8px 0 0; }

/* ---------- Home: the band ---------- */
header.top { position: relative; }
.home header.top { position: absolute; inset: 0 0 auto; z-index: 5; }
.home .top .wordmark { visibility: hidden; }
.home .nav a { color: rgba(246, 241, 222, .8); }
.home .nav a:hover { color: #fffdf3; background: rgba(246, 241, 222, .09); }
.home .nav a[aria-current="page"] { color: #fffdf3; box-shadow: inset 0 -2px 0 #e9ce89; }
.home::before { display: none; }
.band {
  position: relative; isolation: isolate; overflow: hidden; color: #f6f1de; text-align: center;
  padding: 88px 0 124px;
  background:
    radial-gradient(46% 40% at 50% 34%, rgba(233, 199, 120, .24), rgba(233, 199, 120, 0) 72%),
    radial-gradient(120% 80% at 50% 125%, rgba(8, 26, 22, .6), rgba(8, 26, 22, 0) 70%),
    linear-gradient(180deg, #10302a 0%, #18413a 55%, #1f4b41 100%);
}
.band::after { /* a soft horizon line where the calculator card rises out of the band */
  content: ""; position: absolute; left: 50%; bottom: 58px; width: min(900px, 92%); height: 1px; transform: translateX(-50%);
  background: linear-gradient(90deg, rgba(233, 206, 137, 0), rgba(233, 206, 137, .45), rgba(233, 206, 137, 0));
}
.hero { position: relative; z-index: 2; display: grid; justify-items: center; gap: 14px; }
.hero h1 { font: 500 clamp(25px, 6.2vw, 44px)/1.1 var(--voice); letter-spacing: -.022em; margin: 0; max-width: 17em; text-wrap: balance; color: #f8f3e2; }
.hero .lede { color: rgba(246, 241, 222, .76); font-size: clamp(15px, 3.9vw, 18px); max-width: 30em; }

/* The mark: "Silicon Valley" becomes "SilCoin.ai" (ui/mark.js). This static word is the end state,
   shown as it is without JavaScript, with motion off, and after the animation. */
.mark { position: relative; width: 100%; margin-bottom: 4px; font: 700 clamp(46px, 13.4vw, 124px)/1.16 var(--voice); letter-spacing: -.018em; color: #fbf6e6; cursor: pointer; user-select: none; -webkit-user-select: none; -webkit-tap-highlight-color: transparent; text-shadow: 0 .03em .1em rgba(0, 0, 0, .28); }
.mk-static { display: inline-block; white-space: nowrap; perspective: 6em; }
.mk-static.is-hidden { visibility: hidden; }
.mk-g { display: inline-block; }
.mk-coin { position: relative; width: .64em; height: .64em; margin: 0 .02em; vertical-align: -.025em; border-radius: 50%; filter: drop-shadow(0 .04em .08em rgba(0, 0, 0, .35)); }
.mk-coin::after { /* a glint that passes now and then */
  content: ""; position: absolute; inset: 6%; border-radius: 50%;
  background: linear-gradient(115deg, rgba(255, 255, 255, 0) 38%, rgba(255, 255, 255, .85) 50%, rgba(255, 255, 255, 0) 62%) 130% 0 / 280% 100% no-repeat;
  mix-blend-mode: screen; opacity: 0; animation: glint 9s ease-in-out 5s infinite;
}
@keyframes glint { 0%, 84% { background-position: 130% 0; opacity: 0; } 86% { opacity: 1; } 95% { background-position: -30% 0; opacity: 1; } 100% { background-position: -30% 0; opacity: 0; } }
.mark:hover .mk-static:not(.is-hidden) .mk-coin { animation: coin-flip 1.1s cubic-bezier(.2, .7, .2, 1); }
.mk-dot { width: .21em; height: .21em; margin: 0 .05em 0 .035em; vertical-align: 0; }
.mk-stage { position: absolute; inset: 0; pointer-events: none; }
.mk-stage .g { position: absolute; display: block; perspective: 6em; }
.mk-stage .l { position: absolute; inset: 0; text-align: center; white-space: pre; }
.mk-stage .c { position: absolute; border-radius: 50%; }
.mk-stage .c.mk-coin { filter: drop-shadow(0 .04em .08em rgba(0, 0, 0, .35)); }
.mk-stage .c.mk-coin::after { animation: none; }
.mk-stage .glint { position: absolute; inset: 6%; border-radius: 50%; background: linear-gradient(115deg, rgba(255, 255, 255, 0) 38%, rgba(255, 255, 255, .9) 50%, rgba(255, 255, 255, 0) 62%) 130% 0 / 280% 100% no-repeat; mix-blend-mode: screen; opacity: 0; }
.mk-measure { position: absolute; left: 0; top: 0; visibility: hidden; white-space: pre; pointer-events: none; }

/* Coins drifting in the band. Decoration only. */
.floaters { position: absolute; inset: 0; z-index: 1; pointer-events: none; }
.fc { position: absolute; border-radius: 50%; filter: drop-shadow(0 10px 14px rgba(0, 0, 0, .35)); animation: drift 10s ease-in-out infinite alternate; }
.fc.far { filter: blur(1.6px) drop-shadow(0 6px 8px rgba(0, 0, 0, .25)); opacity: .55; }
/* Phones: coins at the edges, clear of the words. */
.fc1 { width: 46px; height: 46px; left: -14px; top: 47%; animation-duration: 11s; }
.fc2 { width: 18px; height: 18px; left: 9%; top: 81%; animation-duration: 8s; animation-delay: -3s; }
.fc3 { width: 30px; height: 30px; right: -8px; top: 33%; animation-duration: 12s; animation-delay: -5s; }
.fc4 { width: 26px; height: 26px; right: 10%; top: 78%; animation-duration: 9s; animation-delay: -1s; }
.fc5, .fc6 { display: none; }
@keyframes drift { from { transform: translateY(-10px) rotate(-10deg); } to { transform: translateY(12px) rotate(12deg); } }

/* The calculator card rises out of the band. */
.home .calc { position: relative; z-index: 4; margin-top: -92px; padding-top: 0; }
.defs { position: absolute; width: 0; height: 0; overflow: hidden; }
.chips { display: flex; flex-wrap: wrap; gap: 8px; }
.chips:empty { display: none; }
.chip-btn { min-height: 40px; padding: 7px 14px; border-radius: 999px; border: 1px solid var(--line-2); background: #fffefa; font-size: 14px; font-weight: 600; font-variant-numeric: tabular-nums; color: var(--ink); }
.chip-btn:hover:enabled { border-color: var(--green); background: #f0f2e8; }
.chip-btn[aria-pressed="true"] { background: var(--green); border-color: var(--green); color: #fffdf6; }

/* ---------- Coin stacks: the answer at a glance ---------- */
.stacks { display: flex; justify-content: center; align-items: flex-end; gap: clamp(8px, 3.5vw, 30px); margin: 18px 0 6px; padding: 22px 10px 14px; border-radius: var(--radius); background: radial-gradient(70% 90% at 50% 100%, rgba(233, 199, 120, .18), rgba(233, 199, 120, 0) 70%), linear-gradient(180deg, rgba(255, 253, 246, 0), rgba(226, 230, 214, .75)); overflow-x: auto; scrollbar-width: none; }
.stack { flex: 0 1 104px; min-width: 66px; display: grid; justify-items: center; gap: 4px; cursor: pointer; }
.pile { display: flex; flex-direction: column-reverse; justify-content: flex-start; align-items: center; height: 138px; }
.disc { display: block; flex: none; width: 54px; height: 13px; margin-top: -6px; border-radius: 50%; background: linear-gradient(180deg, #f8e2a3 0%, #dcb05a 42%, #a97a32 100%); box-shadow: inset 0 -2px 0 rgba(80, 55, 15, .3), inset 0 1px 0 rgba(255, 246, 214, .75); }
.disc:first-child { margin-top: 0; }
.disc.face { height: 24px; margin-top: -13px; background: url(/assets/coin.svg) center / 100% 100% no-repeat; box-shadow: none; filter: drop-shadow(0 1px 0 rgba(80, 55, 15, .45)); }
.stack .st-coins { font: 650 15px/1.2 var(--ui); font-variant-numeric: tabular-nums; margin-top: 6px; }
.stack .st-name { font-size: 12.5px; color: var(--ink-2); max-width: 12ch; overflow-wrap: anywhere; line-height: 1.25; }
.stack.is-lead .pile { filter: drop-shadow(0 0 12px rgba(233, 190, 100, .55)); }
.stack.is-lead .st-coins { color: #1f4a3d; }
.stack.is-soft .disc { filter: saturate(.3) brightness(1.06); opacity: .72; }
.stack.is-new .disc { animation: disc-drop .55s cubic-bezier(.3, 1.4, .5, 1) both; animation-delay: calc(var(--k) * 42ms + var(--c) * 150ms); }
.stack.is-new .disc.face { animation-name: disc-drop-top; }
@keyframes disc-drop { from { transform: translateY(-110px); opacity: 0; } 55% { opacity: 1; } }
@keyframes disc-drop-top { from { transform: translateY(-110px) rotateX(70deg); opacity: 0; } 55% { opacity: 1; } }
.quote.is-flash { animation: flash 1.2s ease; }
@keyframes flash { 0%, 100% { box-shadow: var(--shadow); } 30% { box-shadow: 0 0 0 3px #e9ce89, var(--shadow); } }

/* Result cards arrive, the bar fills and a coin rolls to its end. Only for new quotes. */
.quote.is-new { animation: card-in .6s cubic-bezier(.2, .8, .2, 1) both; animation-delay: calc(var(--n, 0) * 80ms); }
@keyframes card-in { from { opacity: 0; transform: translateY(16px); } }
.quote.is-new .rail i { animation: rail-grow 1.05s cubic-bezier(.25, .8, .25, 1) both; animation-delay: calc(var(--n, 0) * 80ms + 180ms); }
@keyframes rail-grow { from { width: 0; } }
.roller { position: absolute; z-index: 2; top: 50%; left: calc(var(--w, 0) * 1% - 10px); width: 20px; height: 20px; margin-top: -10px; border-radius: 50%; filter: drop-shadow(0 1px 1px rgba(0, 0, 0, .3)); }
.quote.is-new .roller { animation: roll 1.05s cubic-bezier(.25, .8, .25, 1) both; animation-delay: calc(var(--n, 0) * 80ms + 180ms); }
@keyframes roll { from { left: -10px; transform: rotate(-1080deg); } }
.quote.is-new .coin-dot, .quote.is-new .ribbon i { animation: coin-flip .9s ease both; animation-delay: calc(var(--n, 0) * 80ms + 1.1s); }

/* ---------- Cards, fields, buttons ---------- */
.card { background: var(--card); border: 1px solid var(--line); border-radius: var(--radius); box-shadow: var(--shadow); }
.btn { display: inline-flex; align-items: center; justify-content: center; gap: 8px; min-height: 46px; padding: 10px 18px; border: 1px solid var(--line-2); border-radius: var(--radius-s); background: var(--card); color: var(--ink); text-decoration: none; font-weight: 600; font-size: 15px; line-height: 1.2; transition: background-color .15s, border-color .15s, transform .15s; }
.btn:hover:enabled, a.btn:hover { border-color: var(--green); background: #f0f2e8; }
.btn:active:enabled { transform: translateY(1px); }
.btn-primary { background: var(--green); border-color: var(--green); color: #fffdf6; }
.btn-primary:hover:enabled, a.btn-primary:hover { background: var(--green-deep); border-color: var(--green-deep); }
.btn-gold { background: #ecd28f; border-color: #d2b266; color: #2c3a2c; }
.btn-gold:hover:enabled, a.btn-gold:hover { background: #f3deaa; border-color: var(--gold-rim); }
.btn-quiet { border-color: transparent; background: transparent; font-weight: 500; text-decoration: underline; text-underline-offset: 4px; padding-inline: 8px; }
.btn-quiet:hover:enabled { background: rgba(31, 58, 53, .06); border-color: transparent; }
.btn-small { min-height: 40px; padding: 7px 12px; font-size: 14px; }
.btn svg { width: 16px; height: 16px; flex: none; }

.field { display: grid; gap: 6px; min-width: 0; }
.field > label, .field > .label { font-size: 13px; font-weight: 600; color: var(--ink-2); }
.field .hint { font-size: 12.5px; color: var(--ink-3); }
.input, .select { width: 100%; min-width: 0; min-height: 48px; padding: 10px 12px; border: 1px solid var(--line-2); border-radius: var(--radius-s); background: #fffefa; font-size: 16px; }
.input::placeholder { color: #66756c; }
.input[aria-invalid="true"] { border-color: var(--red-line); background: #fff8f3; }
.select { appearance: none; -webkit-appearance: none; padding-right: 34px; background-image: linear-gradient(45deg, transparent 50%, var(--ink-2) 50%), linear-gradient(135deg, var(--ink-2) 50%, transparent 50%); background-position: calc(100% - 17px) 55%, calc(100% - 12px) 55%; background-size: 5px 5px, 5px 5px; background-repeat: no-repeat; }
.money { display: grid; grid-template-columns: minmax(0, 1fr) auto; }
.money .input { border-radius: var(--radius-s) 0 0 var(--radius-s); font: 500 22px/1.1 var(--voice); font-variant-numeric: tabular-nums; }
.money .select, .money .unit { border-radius: 0 var(--radius-s) var(--radius-s) 0; border-left: 0; width: auto; min-width: 92px; font-weight: 600; background-color: var(--sage); }
.money .unit { display: inline-flex; align-items: center; justify-content: center; padding: 0 14px; border: 1px solid var(--line-2); border-left: 0; font-size: 15px; }
/* Currency picker inside a money field: shows the code, the real select sits invisibly on top. */
.money .pick { position: relative; padding: 0 32px 0 14px; cursor: pointer; }
.money .pick::after { content: ""; position: absolute; right: 13px; top: 50%; width: 7px; height: 7px; border-right: 2px solid var(--ink-2); border-bottom: 2px solid var(--ink-2); transform: translateY(-70%) rotate(45deg); pointer-events: none; }
.money .pick select { position: absolute; inset: 0; width: 100%; height: 100%; opacity: 0; cursor: pointer; font-size: 16px; }
.money .pick:focus-within { outline: 3px solid #2b7467; outline-offset: 3px; }
.money .pick:has(select:disabled) { cursor: default; opacity: .7; }
.msg { font-size: 13px; color: var(--ink-2); min-height: 1.2em; }
.msg.is-error { color: var(--red-ink); }
.msg.is-warn { color: var(--amber-ink); }

/* Two-way choice (fee on top / taken out) */
.seg { display: grid; grid-template-columns: 1fr 1fr; border: 1px solid var(--line-2); border-radius: var(--radius-s); overflow: hidden; background: #fffefa; }
.seg label { position: relative; display: grid; place-items: center; text-align: center; min-height: 46px; padding: 8px 10px; font-size: 14px; font-weight: 600; cursor: pointer; }
.seg label + label { border-left: 1px solid var(--line-2); }
.seg input { position: absolute; opacity: 0; inset: 0; margin: 0; cursor: pointer; }
.seg label:has(input:checked) { background: var(--green); color: #fffdf6; }
.seg label:has(input:focus-visible) { outline: 3px solid #2b7467; outline-offset: -3px; }
.check { display: grid; grid-template-columns: 22px 1fr; gap: 10px; align-items: start; font-size: 14px; padding-block: 6px; }
.check input { width: 20px; height: 20px; margin: 1px 0 0; accent-color: var(--green); }

/* ---------- Calculator ---------- */
.calc { padding-block: 22px 8px; }
.route { padding: 18px; display: grid; gap: 14px; }
.route-row { display: grid; gap: 12px; align-items: end; }
.route-how { grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); }
.route-how > span { display: none; }
.swap { justify-self: center; width: 44px; height: 44px; margin-block: -6px -14px; border-radius: 50%; border: 1px solid var(--line-2); background: var(--card); display: grid; place-items: center; }
.swap:hover { background: var(--sage); border-color: var(--green); }
.swap svg { width: 20px; height: 20px; transform: rotate(90deg); }
.route-note { display: flex; flex-wrap: wrap; gap: 6px 14px; align-items: baseline; font-size: 13px; color: var(--ink-2); }

.claim { margin-top: 22px; display: grid; gap: 6px; }
.claim h3 { font: 500 clamp(24px, 6.2vw, 34px)/1.12 var(--voice); letter-spacing: -.025em; text-wrap: balance; }
.claim p { color: var(--ink-2); font-size: 15px; max-width: 46em; }
.claim .aside { color: var(--amber-ink); }

.quotes { display: grid; gap: 12px; margin-top: 16px; }
.quote { position: relative; padding: 16px; display: grid; gap: 12px; }
.quote.is-lead { background: var(--lead); border-color: var(--lead-line); }
.quote.is-soft { background: #fbf8ee; }
.quote.is-out { background: transparent; box-shadow: none; border-style: dashed; }
.quote-head { display: flex; flex-wrap: wrap; align-items: center; gap: 6px 10px; }
.quote-name { font-size: 16px; font-weight: 650; margin-right: auto; overflow-wrap: anywhere; }
.chip { display: inline-flex; align-items: center; gap: 6px; padding: 3px 9px; border-radius: 999px; border: 1px solid var(--line-2); background: #fffefa; font-size: 12px; font-weight: 600; line-height: 1.4; white-space: nowrap; }
.chip::before { content: ""; width: 7px; height: 7px; border-radius: 50%; background: var(--ink-3); flex: none; }
.chip-firm { border-color: var(--lead-line); background: #eef4ea; color: #1f4a3d; }
.chip-firm::before { background: #2f7a62; }
.chip-soft { border-color: var(--amber-line); background: var(--amber-bg); color: var(--amber-ink); }
.chip-soft::before { background: #b9861f; }
.chip-out { border-color: var(--line); color: var(--ink-3); border-style: dashed; }
.chip-example { border-color: #b9b3d6; background: #efecf7; color: #3f3a66; }
.chip-example::before { background: #6c63a8; }
.chip-plain::before { display: none; }
.ribbon { display: inline-flex; align-items: center; gap: 7px; font-size: 11px; font-weight: 700; letter-spacing: .12em; text-transform: uppercase; color: #1f4a3d; }
.ribbon i { display: inline-block; width: 16px; height: 16px; border-radius: 50%; }

.quote-main { display: grid; gap: 4px 18px; align-items: end; }
.landed { display: grid; gap: 2px; min-width: 0; }
.landed .label { font-size: 12px; color: var(--ink-2); }
.landed .amount { font: 500 clamp(30px, 8.6vw, 40px)/1.05 var(--voice); letter-spacing: -.02em; font-variant-numeric: tabular-nums; overflow-wrap: anywhere; }
.landed .delta { font-size: 13.5px; color: var(--ink-2); }
.coins { display: grid; gap: 6px; }
.coins .count { display: inline-flex; align-items: baseline; gap: 7px; font-size: 15px; font-weight: 600; font-variant-numeric: tabular-nums; }
.coins .count small { font-size: 12.5px; font-weight: 500; color: var(--ink-2); }
.coin-dot { display: inline-block; width: 16px; height: 16px; border-radius: 50%; transform: translateY(2px); flex: none; filter: drop-shadow(0 1px 0 rgba(80, 55, 15, .35)); }
.rail { position: relative; height: 12px; margin-right: 10px; border-radius: 999px; background: rgba(31, 58, 53, .09); }
.rail i { position: absolute; inset: 0 auto 0 0; width: calc(var(--w, 0) * 1%); min-width: 10px; border-radius: 999px; background: linear-gradient(90deg, var(--gold-lo), var(--gold) 60%, var(--gold-hi)); box-shadow: inset 0 0 0 1px rgba(162, 123, 54, .7); transition: width .5s cubic-bezier(.2, .8, .2, 1); }
.rail::before { content: ""; position: absolute; z-index: 1; left: 9px; top: -2px; bottom: -2px; width: 5px; background: var(--card); transform: skewX(-22deg); box-shadow: 3px 0 0 -1.5px rgba(31, 58, 53, .28), -3px 0 0 -1.5px rgba(31, 58, 53, .28); }
.quote.is-lead .rail::before { background: var(--lead); }
.reasons { display: flex; flex-wrap: wrap; gap: 6px; }
.quote-facts { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 8px 14px; font-size: 13px; }
.quote-facts dt { color: var(--ink-2); font-size: 12px; }
.quote-facts dd { font-weight: 600; font-variant-numeric: tabular-nums; overflow-wrap: anywhere; }
.quote details { border-top: 1px solid var(--line); padding-top: 8px; }
.quote.is-lead details { border-top-color: #bcd0c0; }
summary { cursor: pointer; padding: 8px 0; font-size: 14px; font-weight: 600; min-height: 40px; display: flex; align-items: center; gap: 8px; list-style: none; }
summary::-webkit-details-marker { display: none; }
summary::before { content: ""; width: 7px; height: 7px; border-right: 2px solid var(--ink-2); border-bottom: 2px solid var(--ink-2); transform: rotate(-45deg); transition: transform .15s; margin-right: 2px; flex: none; }
details[open] > summary::before { transform: rotate(45deg); }
.sum { display: grid; gap: 0; margin-top: 4px; font-size: 14px; }
.sum > div { display: flex; justify-content: space-between; gap: 14px; padding: 7px 0; border-top: 1px dashed var(--line); }
.sum > div:first-child { border-top: 0; }
.sum dt { color: var(--ink-2); }
.sum dd { font-weight: 600; text-align: right; font-variant-numeric: tabular-nums; }
.sum .total dt, .sum .total dd { font-weight: 700; color: var(--ink); }
.sum small { display: block; font-weight: 400; font-size: 12px; color: var(--ink-3); }
.quote-actions { display: flex; flex-wrap: wrap; gap: 8px; align-items: center; }
.quote-actions .spacer { flex: 1 1 auto; }
.adders { display: flex; flex-wrap: wrap; gap: 10px; margin-top: 16px; align-items: center; }
.empty { padding: 22px 18px; border: 1px dashed var(--line-2); border-radius: var(--radius); background: rgba(255, 253, 246, .55); display: grid; gap: 8px; }
.empty ol { list-style: decimal; padding-left: 20px; display: grid; gap: 4px; color: var(--ink-2); font-size: 14.5px; }
.banner { margin-top: 14px; padding: 12px 14px; border-radius: var(--radius-s); border: 1px solid var(--line-2); background: var(--sage); font-size: 14px; display: flex; flex-wrap: wrap; gap: 8px 14px; align-items: center; }
.banner.is-example { border-color: #b9b3d6; background: #efecf7; color: #322d57; }
.banner.is-warn { border-color: var(--amber-line); background: var(--amber-bg); color: var(--amber-ink); }
.banner.is-error { border-color: var(--red-line); background: var(--red-bg); color: var(--red-ink); }
.banner .grow { flex: 1 1 220px; }
.section-head { display: flex; flex-wrap: wrap; align-items: baseline; justify-content: space-between; gap: 6px 14px; margin: 30px 0 12px; }
.section-head h2, .section-head h3 { font: 500 clamp(22px, 5.6vw, 28px)/1.15 var(--voice); letter-spacing: -.02em; }
.refline { margin-top: 16px; font-size: 13.5px; color: var(--ink-2); max-width: 62em; }
.refline strong { color: var(--ink); font-variant-numeric: tabular-nums; }
.toolbar { display: flex; flex-wrap: wrap; gap: 8px; margin-top: 18px; padding-top: 14px; border-top: 1px solid var(--line); }
.toast { position: fixed; left: 50%; bottom: max(18px, env(safe-area-inset-bottom)); transform: translate(-50%, 20px); opacity: 0; pointer-events: none; z-index: 40; max-width: min(92vw, 420px); padding: 11px 16px; border-radius: 999px; background: var(--green-deep); color: #fffdf6; font-size: 14px; text-align: center; transition: opacity .2s, transform .2s; }
.toast.is-on { opacity: 1; transform: translate(-50%, 0); }

/* ---------- Quote dialog (bottom sheet on phones) ---------- */
dialog.sheet { width: min(100%, 560px); max-width: 100%; max-height: min(92dvh, 860px); margin: auto auto 0; padding: 0; border: 1px solid var(--line-2); border-bottom: 0; border-radius: 18px 18px 0 0; background: var(--paper); color: var(--ink); box-shadow: 0 -18px 60px -20px rgba(23, 60, 52, .55); overflow: hidden; }
dialog.sheet::backdrop { background: rgba(23, 44, 40, .46); }
dialog.sheet[open] { display: flex; flex-direction: column; animation: sheet-in .22s ease both; }
@keyframes sheet-in { from { transform: translateY(24px); opacity: 0; } to { transform: none; opacity: 1; } }
.sheet-head { display: flex; align-items: center; justify-content: space-between; gap: 10px; padding: 14px 16px 10px 18px; border-bottom: 1px solid var(--line); }
.sheet-head h2 { font: 500 22px/1.2 var(--voice); letter-spacing: -.015em; }
.sheet-body { overflow: auto; -webkit-overflow-scrolling: touch; padding: 16px 18px 6px; display: grid; gap: 16px; }
.sheet-foot { display: flex; gap: 10px; padding: 12px 18px max(14px, env(safe-area-inset-bottom)); border-top: 1px solid var(--line); background: var(--paper); }
.sheet-foot .btn { flex: 1 1 0; }
.icon-btn { width: 44px; height: 44px; display: grid; place-items: center; border: 0; background: transparent; border-radius: 50%; }
.icon-btn:hover { background: rgba(31, 58, 53, .08); }
.icon-btn svg { width: 20px; height: 20px; }
.pair { display: grid; gap: 14px; }
.total-line { padding: 12px 14px; border-radius: var(--radius-s); background: var(--sage); border: 1px solid var(--line); font-size: 14px; display: grid; gap: 4px; }
.total-line strong { font-variant-numeric: tabular-nums; }
.total-line.is-off { background: var(--amber-bg); border-color: var(--amber-line); color: var(--amber-ink); }
.total-line.is-ok strong::after { content: " ✓"; color: #2f7a62; }
fieldset { border: 0; padding: 0; margin: 0; min-width: 0; display: grid; gap: 4px; }
legend { padding: 0; font-size: 13px; font-weight: 600; color: var(--ink-2); margin-bottom: 4px; }
.box-plain { padding: 12px 14px; border-radius: var(--radius-s); background: var(--sage); border: 1px solid var(--line); font-size: 14px; display: grid; gap: 6px; }
.ticks { list-style: disc; padding-left: 20px; display: grid; gap: 4px; }
.more { border: 1px solid var(--line); border-radius: var(--radius-s); background: rgba(255, 253, 246, .6); padding: 0 14px; }
.more[open] { padding-bottom: 14px; }
.more-body { display: grid; gap: 14px; padding-top: 4px; }

/* ---------- The Silcoin picture (scroll-controlled) ---------- */
/* Without JavaScript, or with motion off, this is a still picture: cash by the wallet, the coin
   stack, and the cash that lands, with all three captions showing. With motion on, app.js adds
   .is-scrub: the band pins for a short stretch of scrolling and --p (0..1) runs the sequence
   forwards and backwards with the scroll position. */
.picture-wrap { margin-top: 44px; }
.picture { --na: 1; --nb: 0; --cb: 1; --cc: 0; --bc: 1; --line: 1; padding: 26px 20px 22px; background: var(--green); color: #f6f1de; border-radius: 22px; display: grid; gap: 12px; }
.picture .eyebrow { color: #b9cdb9; }
.picture h2 { font: 500 clamp(24px, 6.4vw, 38px)/1.1 var(--voice); letter-spacing: -.025em; text-wrap: balance; }
.picture-fine { margin-top: 14px; max-width: 62em; }
.picture-note { font-size: 13px; color: #b9cdb9; }
.scrub { display: block; width: 100%; max-width: 560px; height: auto; margin-inline: auto; overflow: visible; }
.k-line { stroke-dasharray: 100; stroke-dashoffset: calc(100 - var(--line) * 100); }
.k-note, .k-coin, .k-bill, .k-coins { transform-box: fill-box; transform-origin: center; }
.k-note { opacity: calc(var(--na) * (1 - var(--nb))); transform: translate(calc(var(--nb) * 104px), calc((1 - var(--na)) * 44px + var(--nb) * 56px)) scale(calc(1 - .5 * var(--nb))); }
.k-note.n2 { transform: translate(calc(var(--nb) * 104px), calc((1 - var(--na)) * 40px + var(--nb) * 56px)) scale(calc(1 - .5 * var(--nb))); }
.k-note.n3 { transform: translate(calc(var(--nb) * 104px), calc((1 - var(--na)) * 36px + var(--nb) * 56px)) scale(calc(1 - .5 * var(--nb))); }
.k-coins { opacity: calc(1 - .5 * var(--cc)); transform: translateY(calc(var(--cc) * 8px)); }
.k-coin { --on: clamp(0, calc(var(--cb) * 7 - var(--i)), 1); opacity: var(--on); transform: translateY(calc((1 - var(--on)) * -18px)); }
.k-coin.c1 { --i: 0; } .k-coin.c2 { --i: 1; } .k-coin.c3 { --i: 2; } .k-coin.c4 { --i: 3; } .k-coin.c5 { --i: 4; } .k-coin.c6 { --i: 5; }
.k-bill { --on: clamp(0, calc(var(--bc) * 4 - var(--j)), 1); opacity: var(--on); transform: translateY(calc((1 - var(--on)) * 26px)); }
.k-bill.b1 { --j: 0; } .k-bill.b2 { --j: 1; } .k-bill.b3 { --j: 2; }
.steps { display: grid; gap: 10px; }
.step { padding: 12px 14px; border-radius: 14px; background: rgba(246, 241, 222, .07); border: 1px solid rgba(246, 241, 222, .16); }
.step .what { font-size: 11px; font-weight: 700; letter-spacing: .14em; text-transform: uppercase; color: #b9cdb9; }
.step .big { font: 500 clamp(22px, 6vw, 28px)/1.15 var(--voice); font-variant-numeric: tabular-nums; overflow-wrap: anywhere; }
.step .other { font-size: 13.5px; color: #cfdccb; font-variant-numeric: tabular-nums; }

/* Motion on: pin the band and scrub. */
.is-scrub .stage-track { height: 230vh; height: 230svh; }
.is-scrub .stage { position: sticky; top: 0; min-height: 100vh; min-height: 100svh; display: grid; align-content: center; padding-block: 8px; }
.is-scrub .picture {
  --a: clamp(0, calc(var(--p) / .28), 1);
  --b: clamp(0, calc((var(--p) - .28) / .34), 1);
  --c: clamp(0, calc((var(--p) - .64) / .3), 1);
  --na: var(--a); --nb: var(--b); --cb: var(--b); --cc: var(--c); --bc: var(--c); --line: var(--p);
}
.is-scrub .steps { gap: 0; }
.is-scrub .step { grid-area: 1 / 1; }
.is-scrub .step.s1 { opacity: clamp(0, calc((.36 - var(--p)) * 18), 1); }
.is-scrub .step.s2 { opacity: min(clamp(0, calc((var(--p) - .36) * 18), 1), clamp(0, calc((.7 - var(--p)) * 18), 1)); }
.is-scrub .step.s3 { opacity: clamp(0, calc((var(--p) - .7) * 18), 1); }

/* ---------- Providers ---------- */
.providers { display: grid; gap: 10px; }
.provider { padding: 14px 16px; display: grid; gap: 8px; }
.provider h3 { font-size: 16px; font-weight: 650; }
.provider p { font-size: 13.5px; color: var(--ink-2); }
.provider .btn { justify-self: start; }
.provider-more { grid-column: 1 / -1; }
.ext::after { content: "↗"; font-size: .9em; margin-left: 2px; }

/* ---------- Saved list ---------- */
.saved { display: grid; gap: 8px; }
.saved li { padding: 12px 14px; display: flex; flex-wrap: wrap; gap: 6px 12px; align-items: center; }
.saved .what { flex: 1 1 200px; font-size: 14.5px; font-weight: 600; }
.saved .when { font-size: 12.5px; color: var(--ink-2); font-weight: 400; display: block; }

/* ---------- Prose pages ---------- */
.prose { max-width: 720px; padding-block: 18px 30px; }
.prose h1 { font: 500 clamp(32px, 8vw, 48px)/1.05 var(--voice); letter-spacing: -.03em; margin-block: 10px 16px; text-wrap: balance; }
.prose h2 { font: 500 clamp(22px, 5.6vw, 28px)/1.15 var(--voice); letter-spacing: -.02em; margin-block: 34px 10px; }
.prose h3 { font-size: 16px; font-weight: 700; margin-block: 20px 6px; }
.prose p, .prose li { color: #2f4741; }
.prose p + p { margin-top: 12px; }
.prose ul, .prose ol { padding-left: 22px; display: grid; gap: 6px; margin-block: 10px; }
.prose ul { list-style: disc; }
.prose ol { list-style: decimal; }
.prose .lede { font-size: 18px; color: var(--ink-2); }
.prose .box { margin-block: 18px; padding: 16px 18px; border-radius: var(--radius); border: 1px solid var(--line); background: var(--card); }
.prose .box.is-warn { border-color: var(--amber-line); background: var(--amber-bg); }
.prose .box h3 { margin-top: 0; }
.prose code { font: 14px/1.4 ui-monospace, "Cascadia Mono", Consolas, Menlo, monospace; background: rgba(31, 58, 53, .07); padding: 1px 5px; border-radius: 4px; }
.table { width: 100%; border-collapse: collapse; font-size: 14.5px; margin-block: 12px; }
.table th, .table td { text-align: left; padding: 9px 10px 9px 0; border-bottom: 1px solid var(--line); vertical-align: top; }
.table th { font-size: 12px; letter-spacing: .08em; text-transform: uppercase; color: var(--ink-2); }
.table-wrap { overflow-x: auto; }
.kv { display: grid; gap: 0; margin-block: 12px; }
.kv > div { display: grid; gap: 2px; padding: 10px 0; border-bottom: 1px solid var(--line); }
.kv dt { font-weight: 700; }
.kv dd { color: #2f4741; }

/* ---------- Footer ---------- */
.foot { margin-top: 54px; border-top: 1px solid var(--line); padding-block: 26px 40px; color: var(--ink-2); font-size: 13.5px; display: grid; gap: 14px; }
.foot nav { display: flex; flex-wrap: wrap; gap: 4px 18px; }
.foot nav a { padding: 6px 0; }
.foot .not { max-width: 62em; }
.foot button.linkish { border: 0; background: none; padding: 6px 0; text-decoration: underline; text-underline-offset: 3px; color: inherit; }

/* ---------- Wider screens ---------- */
@media (min-width: 620px) {
  .nav .nav-home { display: inline-flex; }
  .route-row, .route-how { grid-template-columns: minmax(0, 1.25fr) 44px minmax(0, 1fr); align-items: start; }
  .route-how > span { display: block; }
  .swap { margin-block: 25px 0; }
  .swap svg { transform: none; }
  .quote { padding: 20px 22px; }
  .quote-main { grid-template-columns: minmax(0, 1.15fr) minmax(0, 1fr); }
  .quote-facts { grid-template-columns: repeat(4, minmax(0, 1fr)); }
  .providers { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .pair { grid-template-columns: 1fr 1fr; }
  dialog.sheet { margin: auto; border-bottom: 1px solid var(--line-2); border-radius: 18px; }
  .kv > div { grid-template-columns: 220px 1fr; gap: 18px; }
}
@media (min-width: 860px) {
  .top { padding-block: 22px 12px; }
  .wm { font-size: 26px; }
  .nav a { padding-inline: 14px; }
  .band { padding: 104px 0 140px; }
  .home .calc { margin-top: -104px; }
  .fc5, .fc6 { display: block; }
  .fc1 { width: 64px; height: 64px; left: 7%; top: 30%; }
  .fc2 { width: 24px; height: 24px; left: 17%; top: 72%; }
  .fc3 { width: 40px; height: 40px; right: 9%; top: 20%; }
  .fc4 { width: 72px; height: 72px; right: 6%; top: 58%; }
  .fc5 { width: 18px; height: 18px; left: 31%; top: 13%; }
  .fc6 { width: 28px; height: 28px; right: 27%; top: 74%; }
  .route { padding: 22px 24px; }
  .picture { padding: 40px 44px 34px; gap: 16px; }
  .steps, .is-scrub .steps { grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 14px; }
  .is-scrub .step { grid-area: auto; }
  .is-scrub .step.s1 { opacity: calc(.45 + .55 * clamp(0, calc(var(--p) * 12), 1)); }
  .is-scrub .step.s2 { opacity: calc(.3 + .7 * clamp(0, calc((var(--p) - .36) * 8), 1)); }
  .is-scrub .step.s3 { opacity: calc(.3 + .7 * clamp(0, calc((var(--p) - .7) * 8), 1)); }
  .providers { grid-template-columns: repeat(3, minmax(0, 1fr)); }
}

/* ---------- Motion off: by system setting or by the site's own switch ---------- */
@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  *, *::before, *::after { animation: none !important; transition: none !important; }
}
html[data-motion="reduce"] { scroll-behavior: auto; }
html[data-motion="reduce"] *, html[data-motion="reduce"] *::before, html[data-motion="reduce"] *::after { animation: none !important; transition: none !important; }

@media (forced-colors: active) {
  .chip, .btn, .card, .input, .select, .station { border: 1px solid CanvasText; }
  .rail { border: 1px solid CanvasText; }
  .rail i { background: Highlight; }
  .coin, .coin-plain, .mk-coin, .coin-dot, .ribbon i, .roller, .disc, .fc { forced-color-adjust: none; }
  .seg label:has(input:checked) { background: Highlight; color: HighlightText; }
}
@media print {
  .top .nav, .adders, .toolbar, .quote-actions, .picture, .foot nav, .toast { display: none !important; }
  body { background: #fff; }
  .card { box-shadow: none; }
}

/* ---------- Review fixes: contrast, targets, focus, small screens ---------- */
.input, .select, .money .unit { border-color: #7d887e; }
.seg label:has(input:checked:focus-visible) { outline-color: #fffdf6; outline-offset: -5px; }
.btn-small, .chip-btn, summary { min-height: 44px; }
.foot nav a, .foot button.linkish { min-height: 44px; display: inline-flex; align-items: center; padding-block: 0; }
.check { padding-block: 11px; }
.reasons .chip { white-space: normal; }
.legend { margin-top: 12px; }
.prose .box .box-title { margin: 0 0 6px; font: 700 17px/1.3 var(--ui); letter-spacing: 0; }
.copy-box { display: grid; gap: 8px; width: 100%; }
.copy-area { min-height: 132px; font: 13px/1.45 ui-monospace, "Cascadia Mono", Consolas, Menlo, monospace; resize: vertical; white-space: pre-wrap; }
.home .nav a:focus-visible { outline-color: #e9ce89; }
@media (max-width: 359px) {
  .wm { font-size: 20px; }
  .nav a { padding-inline: 6px; }
  .route-how { grid-template-columns: minmax(0, 1fr); }
}
