/* CryptoCalc shared styles */

@font-face { font-family: 'Archivo'; font-style: normal; font-display: swap; font-weight: 100 900; font-stretch: 62% 125%; src: url(/fonts/archivo-latin-ext.woff2) format('woff2'); unicode-range: U+0100-02BA,U+02BD-02C5,U+02C7-02CC,U+02CE-02D7,U+02DD-02FF,U+0304,U+0308,U+0329,U+1D00-1DBF,U+1E00-1E9F,U+1EF2-1EFF,U+2020,U+20A0-20AB,U+20AD-20C0,U+2113,U+2C60-2C7F,U+A720-A7FF; }
@font-face { font-family: 'Archivo'; font-style: normal; font-display: swap; font-weight: 100 900; font-stretch: 62% 125%; src: url(/fonts/archivo-latin.woff2) format('woff2'); unicode-range: U+0000-00FF,U+0131,U+0152-0153,U+02BB-02BC,U+02C6,U+02DA,U+02DC,U+0304,U+0308,U+0329,U+2000-206F,U+20AC,U+2122,U+2191,U+2193,U+2212,U+2215,U+FEFF,U+FFFD; }

:root {
  --bg: #F1F3EE;
  --surface: #FFFFFF;
  --sunken: #F1F3EE;
  --ink: #15211C;
  --muted: #5E6B65;
  --line: #D4DAD3;
  --edge: #15211C;
  --green: #0A7F52;
  --red: #C4362C;
  --amber: #9A5B00;
  --mark: #FFE04A;
  --hl: #FFE04A;
  --on-mark: #15211C;
  --gain-tint: #E4F3EB;
  --loss-tint: #FAE7E4;
  --warn-tint: #FFF4D6;
  --bar: #B9C2BB;
  --font: 'Archivo', system-ui, -apple-system, 'Segoe UI', sans-serif;
  --ease: cubic-bezier(.2, .8, .2, 1);
  color-scheme: light;
}
[data-theme="dark"] {
  --bg: #0E1411;
  --surface: #171F1B;
  --sunken: #111815;
  --ink: #ECF1EB;
  --muted: #95A39B;
  --line: #2A3530;
  --edge: #ECF1EB;
  --green: #3DD68C;
  --red: #FF7466;
  --amber: #F0B24A;
  --hl: rgba(255, 224, 74, .30);
  --gain-tint: #12291F;
  --loss-tint: #31191A;
  --warn-tint: #2E2710;
  --bar: #3A4741;
  color-scheme: dark;
}

*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }
html { scroll-behavior: smooth; }
body {
  font-family: var(--font);
  background: var(--bg);
  color: var(--ink);
  font-size: 16px;
  line-height: 1.55;
  min-height: 100vh;
  font-variant-numeric: tabular-nums;
  -webkit-font-smoothing: antialiased;
  transition: background-color .25s, color .25s;
}
input, select, button, textarea { font: inherit; color: inherit; }
button { cursor: pointer; }
a { color: inherit; text-underline-offset: 3px; }
a:hover { text-decoration-thickness: 2px; }
:focus-visible { outline: 3px solid var(--mark); outline-offset: 2px; }
h1, h2, h3 { font-stretch: 112%; letter-spacing: -0.015em; line-height: 1.15; }
img { max-width: 100%; }
[hidden] { display: none !important; }

.wrap { max-width: 1140px; margin: 0 auto; padding: 0 20px; }

/* ---------- Nav ---------- */
.nav {
  position: sticky; top: 0; z-index: 50;
  background: color-mix(in srgb, var(--bg) 88%, transparent);
  backdrop-filter: blur(10px);
  -webkit-backdrop-filter: blur(10px);
  border-bottom: 1px solid var(--line);
}
.nav-in { max-width: 1140px; margin: 0 auto; padding: 0 20px; height: 58px; display: flex; align-items: center; gap: 20px; }
.logo {
  font-size: 19px; font-weight: 800; font-stretch: 118%; letter-spacing: -0.02em;
  text-decoration: none; white-space: nowrap; display: flex; align-items: center; gap: 9px;
}
.logo i { width: 13px; height: 13px; background: var(--mark); border: 2px solid var(--edge); display: block; transition: transform .5s var(--ease); }
.logo:hover i { transform: rotate(90deg); }
.nav-links { display: flex; gap: 2px; margin-left: auto; overflow-x: auto; scrollbar-width: none; }
.nav-links::-webkit-scrollbar { display: none; }
.nav-links a {
  font-size: 15px; font-weight: 500; color: var(--muted); text-decoration: none; white-space: nowrap;
  padding: 7px 11px; border-radius: 4px; transition: color .15s, background-color .15s;
}
.nav-links a:hover { color: var(--ink); background: var(--surface); }
.nav-links a[aria-current="page"] { color: var(--on-mark); background: var(--mark); }
.theme-btn {
  flex: none; width: 36px; height: 36px; border-radius: 50%;
  border: 1px solid var(--line); background: var(--surface);
  display: grid; place-items: center; transition: border-color .15s, transform .4s var(--ease);
}
.theme-btn:hover { border-color: var(--edge); transform: rotate(180deg); }
.theme-btn svg { width: 17px; height: 17px; }

/* ---------- Ticker ---------- */
.ticker { border-bottom: 1px solid var(--line); background: var(--surface); overflow: hidden; height: 38px; position: relative; }
.ticker::before, .ticker::after { content: ''; position: absolute; top: 0; bottom: 0; width: 40px; z-index: 1; pointer-events: none; }
.ticker::before { left: 0; background: linear-gradient(90deg, var(--surface), transparent); }
.ticker::after { right: 0; background: linear-gradient(270deg, var(--surface), transparent); }
.ticker-track { display: flex; width: max-content; height: 100%; align-items: center; animation: ticker 70s linear infinite; }
.ticker:hover .ticker-track { animation-play-state: paused; }
.tick { display: flex; align-items: baseline; gap: 7px; padding: 0 18px; font-size: 14px; white-space: nowrap; text-decoration: none; border-right: 1px solid var(--line); }
.tick b { font-weight: 700; }
.tick .ch { font-size: 13px; font-weight: 600; }
.ticker-msg { padding: 0 20px; font-size: 14px; color: var(--muted); line-height: 38px; }
@keyframes ticker { to { transform: translateX(-50%); } }

.up { color: var(--green); }
.down { color: var(--red); }
.flash-up { animation: flashUp 1.1s ease-out; }
.flash-down { animation: flashDown 1.1s ease-out; }
@keyframes flashUp { 0% { background: var(--gain-tint); } 100% { background: transparent; } }
@keyframes flashDown { 0% { background: var(--loss-tint); } 100% { background: transparent; } }

.live-dot { display: inline-block; width: 8px; height: 8px; border-radius: 50%; background: var(--green); margin-right: 7px; position: relative; top: -1px; }
.live-dot::after { content: ''; position: absolute; inset: 0; border-radius: 50%; background: var(--green); animation: ping 2s ease-out infinite; }
.live-dot.off { background: var(--bar); }
.live-dot.off::after { display: none; }
@keyframes ping { 0% { transform: scale(1); opacity: .7; } 100% { transform: scale(3); opacity: 0; } }

/* ---------- Entrance motion ---------- */
.rise { opacity: 0; transform: translateY(14px); animation: rise .7s var(--ease) forwards; animation-delay: calc(var(--d, 0) * 80ms); }
@keyframes rise { to { opacity: 1; transform: none; } }
.reveal { transition: opacity .6s var(--ease), transform .6s var(--ease); }
.js .reveal { opacity: 0; transform: translateY(18px); transition: opacity .6s var(--ease), transform .6s var(--ease); }
.reveal.in { opacity: 1; transform: none; }

/* ---------- Cards ---------- */
.card { background: var(--surface); border: 1px solid var(--line); border-radius: 6px; }
.card.strong { border: 2px solid var(--edge); border-radius: 4px; box-shadow: 6px 6px 0 var(--edge); }
[data-theme="dark"] .card.strong { box-shadow: 6px 6px 0 #000; }
.card-head { display: flex; justify-content: space-between; align-items: center; gap: 12px; padding: 14px 20px; border-bottom: 1px solid var(--line); }
.card.strong > .card-head { border-bottom: 2px solid var(--edge); }
.card-head h2 { font-size: 18px; font-weight: 750; }
.card-head .meta { font-size: 13px; color: var(--muted); white-space: nowrap; }
.card-body { padding: 20px; }

/* ---------- Tool page ---------- */
.tool-head { padding: 40px 0 26px; }
.tool-head h1 { font-size: clamp(30px, 4.4vw, 46px); font-weight: 800; font-stretch: 118%; letter-spacing: -0.03em; line-height: 1.05; text-wrap: balance; }
.tool-head p { margin-top: 12px; font-size: 18px; color: var(--muted); max-width: 60ch; }
.tool-grid { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); gap: 28px; align-items: start; }
.tool-grid > .result { position: sticky; top: 76px; }
.tool-grid.wide { grid-template-columns: minmax(0, 380px) minmax(0, 1fr); }

.fields { display: grid; grid-template-columns: 1fr 1fr; gap: 16px; }
.fields .full { grid-column: 1 / -1; }
.field label, .field .lbl { display: block; font-size: 14px; color: var(--muted); margin-bottom: 6px; }
.field .hint { font-size: 13px; color: var(--muted); margin-top: 5px; }
.inp { display: flex; align-items: stretch; background: var(--sunken); border: 1px solid var(--line); border-radius: 4px; transition: border-color .15s, box-shadow .15s; }
.inp:focus-within { border-color: var(--edge); box-shadow: 0 0 0 3px var(--mark); }
.inp input, .inp select { flex: 1; min-width: 0; width: 100%; border: 0; background: transparent; padding: 11px 12px; font-size: 17px; font-weight: 600; outline: none; }
.inp select { cursor: pointer; }
.inp select option { background: var(--surface); color: var(--ink); }
.inp .unit { display: flex; align-items: center; padding: 0 12px 0 4px; font-size: 14px; color: var(--muted); white-space: nowrap; }
.live-btn {
  border: 0; border-left: 1px solid var(--line); background: transparent; padding: 0 12px;
  font-size: 13px; font-weight: 700; color: var(--green); white-space: nowrap; transition: background-color .15s;
}
.live-btn:hover:not(:disabled) { background: var(--gain-tint); }
.live-btn:disabled { color: var(--bar); cursor: default; }
input[type=number]::-webkit-inner-spin-button { opacity: 0; }

.seg { display: flex; background: var(--sunken); border: 1px solid var(--line); border-radius: 4px; padding: 3px; gap: 3px; }
.seg label { flex: 1; margin: 0; cursor: pointer; }
.seg input { position: absolute; opacity: 0; pointer-events: none; }
.seg span { display: block; text-align: center; padding: 8px 6px; font-size: 15px; font-weight: 600; color: var(--muted); border-radius: 3px; transition: background-color .18s, color .18s; white-space: nowrap; }
.seg input:checked + span { background: var(--edge); color: var(--bg); }
.seg input:focus-visible + span { outline: 3px solid var(--mark); outline-offset: 1px; }
.seg.long-short label:first-child input:checked + span { background: var(--green); color: #fff; }
.seg.long-short label:last-child input:checked + span { background: var(--red); color: #fff; }
[data-theme="dark"] .seg.long-short input:checked + span { color: #0E1411; }

.chips { display: flex; flex-wrap: wrap; gap: 6px; margin-top: 8px; }
.chip { border: 1px solid var(--line); background: var(--surface); border-radius: 20px; padding: 3px 11px; font-size: 13px; font-weight: 600; color: var(--muted); transition: all .15s; }
.chip:hover { border-color: var(--edge); color: var(--ink); transform: translateY(-1px); }

input[type=range] { width: 100%; accent-color: var(--ink); margin-top: 10px; }

.btn { display: inline-flex; align-items: center; gap: 8px; border: 1px solid var(--line); background: var(--surface); border-radius: 4px; padding: 8px 14px; font-size: 14px; font-weight: 600; text-decoration: none; transition: border-color .15s, transform .15s; }
.btn:hover { border-color: var(--edge); }
.btn:active { transform: scale(.97); }
.btn.solid { background: var(--edge); color: var(--bg); border-color: var(--edge); }
.actions { display: flex; flex-wrap: wrap; gap: 8px; margin-top: 18px; }

/* ---------- Results ---------- */
.verdict { font-size: 15px; font-weight: 700; }
.big {
  display: inline-block; margin: 4px 0 0 -6px; padding: 0 6px;
  font-size: clamp(34px, 6vw, 50px); font-weight: 800; font-stretch: 112%; letter-spacing: -0.03em; line-height: 1.15;
  background: linear-gradient(transparent 54%, var(--hl) 54%);
  overflow-wrap: anywhere;
}
.sub { font-size: 16px; color: var(--muted); margin-top: 6px; }
.rows { margin-top: 16px; }
.rows > div { display: flex; justify-content: space-between; align-items: baseline; gap: 14px; padding: 9px 0; border-top: 1px solid var(--line); font-size: 15px; }
.rows dt { color: var(--muted); }
.rows dd { font-weight: 600; text-align: right; }
.empty { color: var(--muted); padding: 8px 0; }

.note { margin-top: 14px; padding: 11px 14px; border-radius: 4px; font-size: 14px; border-left: 4px solid var(--amber); background: var(--warn-tint); animation: noteIn .35s var(--ease); }
.note.bad { border-color: var(--red); background: var(--loss-tint); }
.note.good { border-color: var(--green); background: var(--gain-tint); }
.note.plain { border-color: var(--bar); background: var(--sunken); animation: none; }
@keyframes noteIn { from { opacity: 0; transform: translateY(-6px); } }

.subhead { font-size: 15px; font-weight: 700; margin: 22px 0 8px; }

/* Price ladder */
.ladder { border: 1px solid var(--line); border-radius: 4px; overflow: hidden; }
.ladder > div { display: grid; grid-template-columns: 1fr auto 70px; gap: 12px; align-items: baseline; padding: 8px 12px; font-size: 14px; border-top: 1px solid var(--line); animation: ladderIn .4s var(--ease) backwards; animation-delay: calc(var(--i) * 45ms); }
.ladder > div:first-child { border-top: 0; }
.ladder .tag { font-weight: 600; display: flex; align-items: center; gap: 8px; }
.ladder .tag::before { content: ''; width: 9px; height: 9px; border-radius: 2px; background: var(--bar); flex: none; }
.ladder .p { font-weight: 600; }
.ladder .d { text-align: right; color: var(--muted); font-size: 13px; }
.ladder .k-entry { background: var(--sunken); }
.ladder .k-entry .tag::before { background: var(--ink); }
.ladder .k-good .tag::before { background: var(--green); }
.ladder .k-bad .tag::before { background: var(--red); }
.ladder .k-live .tag::before { background: var(--mark); border: 1px solid var(--edge); border-radius: 50%; }
.ladder .k-warn .tag::before { background: var(--amber); }
@keyframes ladderIn { from { opacity: 0; transform: translateX(-10px); } }

/* Risk meter */
.meter { position: relative; height: 10px; border-radius: 5px; margin-top: 10px; background: linear-gradient(90deg, var(--green) 0 40%, var(--amber) 40% 60%, var(--red) 60%); }
.meter i { position: absolute; top: -5px; width: 4px; height: 20px; background: var(--ink); border: 1px solid var(--surface); border-radius: 2px; transform: translateX(-50%); transition: left .5s var(--ease); }
.meter-scale { display: flex; justify-content: space-between; font-size: 12px; color: var(--muted); margin-top: 6px; }

/* ---------- Tables ---------- */
.table-wrap { overflow-x: auto; }
table.t { width: 100%; border-collapse: collapse; font-size: 15px; }
.t th { text-align: left; font-size: 13px; font-weight: 600; color: var(--muted); padding: 10px 12px; border-bottom: 1px solid var(--line); white-space: nowrap; }
.t td { padding: 11px 12px; border-bottom: 1px solid var(--line); white-space: nowrap; }
.t tr:last-child td { border-bottom: 0; }
.t .r { text-align: right; }
.t tbody tr { transition: background-color .15s; }
.t tbody tr:hover { background: var(--sunken); }
.t tbody tr.click { cursor: pointer; }
.coin-cell { display: flex; align-items: center; gap: 10px; }
.coin-cell img, .coin-ico { width: 24px; height: 24px; border-radius: 50%; flex: none; }
.coin-ico { display: grid; place-items: center; background: var(--sunken); border: 1px solid var(--line); font-size: 10px; font-weight: 700; }
.coin-cell b { font-weight: 650; }
.coin-cell small { color: var(--muted); font-size: 13px; }
.spark { width: 96px; height: 30px; display: block; margin-left: auto; }
.spark path { fill: none; stroke-width: 1.6; stroke-linejoin: round; stroke-linecap: round; stroke-dasharray: 1; stroke-dashoffset: 1; animation: draw 1.4s var(--ease) forwards; }
.spark.up path { stroke: var(--green); }
.spark.down path { stroke: var(--red); }
@keyframes draw { to { stroke-dashoffset: 0; } }

.barcell { min-width: 120px; }
.hbar { height: 8px; border-radius: 4px; background: var(--bar); width: 0; transition: width .7s var(--ease); }
.hbar.best { background: var(--green); }
.hbar.worst { background: var(--red); }
.tag-best { display: inline-block; margin-left: 8px; padding: 1px 8px; font-size: 12px; font-weight: 700; background: var(--mark); color: var(--on-mark); border-radius: 3px; }
.tnote { display: block; font-size: 12px; color: var(--muted); font-weight: 400; white-space: normal; }

/* ---------- Chart ---------- */
.chart { position: relative; margin-top: 8px; }
.chart svg { display: block; width: 100%; height: auto; overflow: visible; }
.chart .grid line { stroke: var(--line); stroke-width: 1; }
.chart .axis text { fill: var(--muted); font-size: 11px; font-family: var(--font); }
.chart .l-val { fill: none; stroke: var(--green); stroke-width: 2.2; stroke-linejoin: round; stroke-dasharray: 1; stroke-dashoffset: 1; animation: draw 1.6s var(--ease) forwards; }
.chart .l-val.neg { stroke: var(--red); }
.chart .l-inv { fill: none; stroke: var(--ink); stroke-width: 1.6; stroke-dasharray: 4 4; opacity: .7; }
.chart .a-val { fill: var(--green); opacity: 0; animation: fadeArea 1s .8s forwards; }
.chart .a-val.neg { fill: var(--red); }
@keyframes fadeArea { to { opacity: .1; } }
.chart .cross { stroke: var(--muted); stroke-width: 1; stroke-dasharray: 3 3; }
.chart .dot { fill: var(--surface); stroke: var(--ink); stroke-width: 2; }
.chart-tip { position: absolute; top: 0; pointer-events: none; background: var(--edge); color: var(--bg); padding: 7px 10px; border-radius: 4px; font-size: 13px; line-height: 1.4; white-space: nowrap; transform: translateX(-50%); opacity: 0; transition: opacity .15s; z-index: 2; }
.legend { display: flex; gap: 18px; font-size: 13px; color: var(--muted); margin-top: 8px; flex-wrap: wrap; }
.legend i { display: inline-block; width: 16px; height: 0; border-top: 2px solid var(--green); margin-right: 6px; vertical-align: middle; }
.legend i.inv { border-top: 2px dashed var(--ink); }

.skeleton { height: 14px; border-radius: 3px; background: linear-gradient(90deg, var(--sunken), var(--line), var(--sunken)); background-size: 200% 100%; animation: shimmer 1.2s linear infinite; }
@keyframes shimmer { to { background-position: -200% 0; } }

/* ---------- Guide / prose ---------- */
.guide { margin-top: 72px; display: grid; grid-template-columns: minmax(0, 1fr) 300px; gap: 56px; align-items: start; }
.prose h2 { font-size: 28px; font-weight: 800; margin: 44px 0 12px; }
.prose > h2:first-child { margin-top: 0; }
.faq { margin-top: 44px; }
.faq h2 { margin-top: 0; }
.prose h3 { font-size: 19px; font-weight: 700; margin: 26px 0 8px; }
.prose p, .prose li { color: var(--muted); max-width: 68ch; font-size: 17px; }
.prose p + p, .prose ul + p, .prose ol + p { margin-top: 12px; }
.prose ul, .prose ol { margin: 10px 0 0 22px; }
.prose li + li { margin-top: 6px; }
.prose strong { color: var(--ink); font-weight: 650; }
.formula { margin: 14px 0; padding: 14px 16px; background: var(--surface); border: 1px solid var(--line); border-left: 4px solid var(--mark); border-radius: 4px; font-size: 16px; font-weight: 600; overflow-x: auto; white-space: nowrap; color: var(--ink); }
.formula small { display: block; font-weight: 400; color: var(--muted); font-size: 14px; white-space: normal; margin-top: 4px; }
.example { margin: 14px 0; padding: 16px 18px; background: var(--surface); border: 1px solid var(--line); border-radius: 4px; }
.example p { font-size: 16px; }
.example b { color: var(--ink); }

.faq details { border-top: 1px solid var(--line); }
.faq details:last-child { border-bottom: 1px solid var(--line); }
.faq summary { cursor: pointer; list-style: none; padding: 15px 34px 15px 0; font-size: 17px; font-weight: 650; position: relative; color: var(--ink); }
.faq summary::-webkit-details-marker { display: none; }
.faq summary::after { content: '+'; position: absolute; right: 4px; top: 11px; font-size: 24px; font-weight: 400; color: var(--muted); transition: transform .3s var(--ease); }
.faq details[open] summary::after { transform: rotate(45deg); }
.faq details p { padding: 0 0 16px; animation: noteIn .35s var(--ease); }

.aside { position: sticky; top: 76px; }
.aside h2 { font-size: 15px; font-weight: 700; margin-bottom: 4px; }
.linklist { list-style: none; border-top: 2px solid var(--edge); }
.linklist a { display: block; padding: 12px 6px 12px 0; border-bottom: 1px solid var(--line); text-decoration: none; transition: padding-left .2s var(--ease), background-color .2s; }
.linklist a:hover { padding-left: 10px; background: var(--surface); }
.linklist strong { display: block; font-size: 16px; font-weight: 700; }
.linklist span { font-size: 14px; color: var(--muted); }

/* ---------- Home ---------- */
.home { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 450px); gap: 56px; align-items: start; padding-top: 52px; }
.home h1 { font-size: clamp(38px, 5.2vw, 60px); font-weight: 800; font-stretch: 120%; letter-spacing: -0.035em; line-height: 1.02; text-wrap: balance; }
.home .lede { font-size: 18px; color: var(--muted); max-width: 44ch; margin-top: 20px; }
.home .linklist { margin-top: 40px; }
.home .linklist a { display: grid; grid-template-columns: 150px 1fr; gap: 16px; align-items: baseline; padding: 15px 8px 15px 0; }
.home .linklist strong { font-size: 18px; }
.home .linklist span { font-size: 16px; }
.section { margin-top: 80px; }
.section-head { display: flex; justify-content: space-between; align-items: baseline; gap: 16px; margin-bottom: 16px; flex-wrap: wrap; }
.section-head h2 { font-size: 28px; font-weight: 800; }
.section-head p { color: var(--muted); font-size: 15px; }
.facts { display: grid; grid-template-columns: repeat(3, 1fr); gap: 0; border-top: 2px solid var(--edge); }
.facts div { padding: 22px 24px 4px 0; }
.facts div + div { padding-left: 24px; border-left: 1px solid var(--line); }
.facts h3 { font-size: 19px; font-weight: 750; margin-bottom: 6px; }
.facts p { color: var(--muted); font-size: 16px; }

/* ---------- Converter ---------- */
.conv { display: grid; grid-template-columns: 1fr auto 1fr; gap: 12px; align-items: end; }
.conv .inp input { font-size: 22px; padding: 14px; }
.conv .inp select { flex: 0 0 auto; width: auto; max-width: 46%; border-left: 1px solid var(--line); font-size: 16px; }
.swap { width: 44px; height: 44px; border-radius: 50%; border: 2px solid var(--edge); background: var(--mark); color: var(--on-mark); display: grid; place-items: center; margin-bottom: 4px; transition: transform .45s var(--ease); }
.swap:hover { transform: rotate(180deg); }
.swap svg { width: 20px; height: 20px; }

/* ---------- Buy rows / pair links ---------- */
.buy { display: grid; grid-template-columns: 1fr 1fr auto; gap: 8px; margin-bottom: 8px; align-items: center; animation: noteIn .3s var(--ease); }
.buy-head { font-size: 14px; color: var(--muted); margin: 18px 0 6px; animation: none; }
.buy-head span:last-child { width: 68px; }
.buy .inp input { font-size: 16px; padding: 9px 10px; }
.pairs { display: grid; grid-template-columns: repeat(auto-fill, minmax(150px, 1fr)); gap: 8px; }
.pairs a { display: block; padding: 10px 12px; background: var(--surface); border: 1px solid var(--line); border-radius: 4px; font-size: 15px; font-weight: 600; text-decoration: none; transition: border-color .15s, transform .2s var(--ease); }
.pairs a:hover { border-color: var(--edge); transform: translateY(-2px); }
.prose .pairs { margin-top: 12px; }

/* ---------- Stats row, allocation bar, portfolio inputs ---------- */
.stats { display: grid; grid-template-columns: repeat(3, 1fr); margin-top: 18px; border-top: 1px solid var(--line); }
.stats > div { padding: 14px 16px 2px 0; }
.stats > div + div { padding-left: 16px; border-left: 1px solid var(--line); }
.stats span { display: block; font-size: 14px; color: var(--muted); }
.stats b { display: block; font-size: 20px; font-weight: 750; overflow-wrap: anywhere; }
.stats small { font-size: 13px; color: var(--muted); }
.alloc { display: flex; height: 14px; border-radius: 3px; overflow: hidden; margin-top: 18px; background: var(--sunken); gap: 2px; }
.alloc i { display: block; height: 100%; transition: width .8s var(--ease); min-width: 0; }
.pf-in { width: 110px; text-align: right; background: var(--sunken); border: 1px solid var(--line); border-radius: 4px; padding: 6px 8px; font-weight: 600; }
.pf-in:focus { outline: none; border-color: var(--edge); box-shadow: 0 0 0 3px var(--mark); }
@media (max-width: 560px) { .stats { grid-template-columns: 1fr; } .stats > div + div { padding-left: 0; border-left: 0; border-top: 1px solid var(--line); } .pf-in { width: 84px; } }

/* ---------- Forms (contact) ---------- */
.form { display: grid; gap: 16px; max-width: 520px; }
.form textarea { width: 100%; min-height: 150px; border: 0; background: transparent; padding: 11px 12px; outline: none; resize: vertical; font-size: 16px; }
.form .inp input { font-size: 16px; font-weight: 500; }

/* ---------- Footer ---------- */
footer { margin-top: 96px; border-top: 1px solid var(--line); background: var(--surface); }
.foot { max-width: 1140px; margin: 0 auto; padding: 36px 20px; display: grid; grid-template-columns: 1.4fr 1fr 1fr; gap: 32px; font-size: 15px; }
.foot p { color: var(--muted); max-width: 44ch; margin-top: 10px; font-size: 14px; }
.foot h2 { font-size: 14px; font-weight: 700; margin-bottom: 8px; }
.foot ul { list-style: none; }
.foot li a { color: var(--muted); text-decoration: none; line-height: 1.9; }
.foot li a:hover { color: var(--ink); text-decoration: underline; }

.toast { position: fixed; left: 50%; bottom: 28px; transform: translate(-50%, 30px); background: var(--edge); color: var(--bg); padding: 10px 18px; border-radius: 4px; font-size: 15px; font-weight: 600; opacity: 0; transition: opacity .25s, transform .35s var(--ease); z-index: 100; pointer-events: none; }
.toast.show { opacity: 1; transform: translate(-50%, 0); }

.ccy { flex: none; height: 36px; padding: 0 8px; border: 1px solid var(--line); border-radius: 18px; background: var(--surface); color: var(--ink); font: inherit; font-size: 14px; font-weight: 650; cursor: pointer; }
.ccy:disabled { opacity: .55; cursor: default; }
.fine { margin-top: 14px; font-size: 14px; color: var(--muted); }
.crumb { font-size: 15px; font-weight: 650; margin-bottom: 10px; }
.crumb a { color: var(--muted); }
.cta { margin-top: 32px; }
.guide-index { max-width: 860px; }
.guide-index a { padding: 16px 8px 16px 0; }
.guide-index strong { font-size: 19px; }
.guide-index span { display: block; font-size: 16px; margin-top: 2px; }
.prose table { border-collapse: collapse; margin: 14px 0; font-size: 16px; width: 100%; max-width: 68ch; }
.prose th, .prose td { text-align: left; padding: 9px 12px 9px 0; border-bottom: 1px solid var(--line); color: var(--muted); }
.prose th { color: var(--ink); font-weight: 700; border-bottom: 2px solid var(--edge); }
.prose td b { color: var(--ink); }
.menu-btn { display: none; }
.pick { list-style: none; border-top: 2px solid var(--edge); }
.pick li { display: grid; grid-template-columns: 1fr auto; gap: 8px 24px; align-items: baseline; padding: 14px 0; border-bottom: 1px solid var(--line); }
.pick p { font-size: 17px; }
.pick a { font-weight: 700; white-space: nowrap; }
@media (max-width: 560px) { .pick li { grid-template-columns: 1fr; } }

/* ---------- Responsive ---------- */
@media (max-width: 1100px) {
  .ccy { margin-left: auto; }
  .menu-btn { display: inline-flex; align-items: center; height: 36px; padding: 0 14px; border: 1px solid var(--line); border-radius: 18px; background: var(--surface); font: inherit; font-size: 14px; font-weight: 650; color: var(--ink); cursor: pointer; }
  .nav.open .menu-btn { background: var(--mark); color: var(--on-mark); border-color: var(--edge); }
  .nav-links { display: none; position: absolute; left: 0; right: 0; top: 100%; margin: 0; padding: 10px 14px 16px; background: var(--bg); border-bottom: 2px solid var(--edge); grid-template-columns: 1fr 1fr; gap: 4px; overflow: visible; }
  .nav.open .nav-links { display: grid; }
  .nav-links a { padding: 12px 10px; font-size: 16px; color: var(--ink); }
}
@media (max-width: 900px) {
  .tool-grid, .tool-grid.wide { grid-template-columns: minmax(0, 1fr); }
  .tool-grid > .result { position: static; }
  .guide { grid-template-columns: minmax(0, 1fr); gap: 40px; margin-top: 56px; }
  .aside { position: static; }
  .home { grid-template-columns: minmax(0, 1fr); gap: 36px; padding-top: 32px; }
  .home .intro { display: contents; }
  .home h1 { order: 0; }
  .home .lede { order: 1; margin-top: -18px; }
  .home .ticket { order: 2; }
  .home .linklist { order: 3; margin-top: 4px; }
  .facts { grid-template-columns: 1fr; }
  .facts div + div { padding-left: 0; border-left: 0; border-top: 1px solid var(--line); }
  .foot { grid-template-columns: 1fr 1fr; }
  .foot > div:first-child { grid-column: 1 / -1; }
  .hide-m { display: none; }
}
@media (max-width: 560px) {
  .nav-in { gap: 10px; padding: 0 14px; }
  .logo { font-size: 17px; }
  .fields { grid-template-columns: 1fr; }
  .home .linklist a { grid-template-columns: 1fr; gap: 2px; }
  .card.strong { box-shadow: 4px 4px 0 var(--edge); }
  .conv { grid-template-columns: 1fr; }
  .swap { margin: 0 auto; transform: rotate(90deg); }
  .swap:hover { transform: rotate(270deg); }
  .hide-s { display: none; }
  .t th, .t td { padding: 10px 8px; }
  .coin-cell small { display: none; }
  .coin-cell { gap: 8px; }
  .prose p, .prose li { font-size: 16px; }
  .ladder > div { grid-template-columns: 1fr auto; }
  .ladder .d { display: none; }
}

@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { animation-duration: .01ms !important; animation-delay: 0s !important; transition-duration: .01ms !important; scroll-behavior: auto !important; }
  .ticker-track { animation: none; }
  .ticker { overflow-x: auto; }
  .rise, .reveal { opacity: 1; transform: none; }
}
