/* Design tokens from the mockups. */
:root{--bg:#F6F6F4;--card:#fff;--text:#16181D;--text2:#52514E;--muted:#6E6D68;--line:#E4E3DF;--line2:#EFEEEA;
--link:#1c5cab;--link-h:#0d366b;--bar:#2a78d6;--orange:#eb6834;--down:#B4441A;
--k0:#0d366b;--k1:#256abf;--k2:#5598e7;--k3:#9ec5f4;--k4:#E3E2DD}
*{box-sizing:border-box}
body{margin:0;background:var(--bg);color:var(--text);font:15px/1.45 Inter,system-ui,sans-serif}
a{color:var(--link);text-decoration:none}a:hover{color:var(--link-h)}
h1,h2,h3,p{margin:0}
h1,h2,.brand a,.kpi b,.place,.w{font-family:Manrope,Inter,sans-serif;font-weight:800}
.wrap{max-width:1232px;margin:0 auto;padding:0 16px 48px;display:flex;flex-direction:column;gap:28px}
.muted{font-size:13px;color:var(--muted)}
.card{background:var(--card);border:1px solid var(--line);border-radius:14px}

/* header, footer */
.top{display:flex;flex-wrap:wrap;align-items:center;justify-content:space-between;gap:12px 16px;padding:20px 0;border-bottom:1px solid var(--line)}
.brand{display:flex;align-items:center;gap:14px;flex-wrap:wrap}
.brand a{display:inline-flex;align-items:center;gap:9px;font-size:22px;letter-spacing:-.02em;color:var(--text)}
.brand a b{color:var(--link);font-weight:800}
.brand .logo{width:28px;height:28px;display:block}
.brand .tag{font-size:13px;color:var(--muted);padding-left:14px;border-left:1px solid var(--line)}
.top nav{display:flex;gap:6px 20px;flex-wrap:wrap;font-size:14px}
.top nav{align-items:center}
.top nav a{color:var(--text2);padding:6px 0}
.langs{display:inline-flex;gap:2px;padding:3px;background:#ECEBE7;border-radius:8px;font-size:12px;font-weight:600}
.langs a,.langs b{padding:3px 8px!important;border-radius:6px}
.langs b{background:#fff;color:var(--text);box-shadow:0 1px 2px rgba(20,20,19,.12)}
.cta{display:flex;flex-direction:column;align-items:flex-end;gap:6px;max-width:340px;text-align:right}
.cta span{font-size:12px;color:var(--muted)}
footer .wide{flex-basis:100%}
.beta{margin:-12px 0 0;padding:8px 12px;border-radius:10px;background:#FFF4EC;border:1px solid #F6D2BD;font-size:13px;color:var(--text2)}
.beta b{color:var(--orange);margin-right:4px}
.disclaimer{line-height:1.5}
.stale{margin:-16px 0 0;padding:10px 14px;border-radius:10px;background:#FDECEA;border:1px solid #F1B8B0;color:#8A2A1C;font-size:14px;font-weight:600}.top nav a.on{color:var(--text);font-weight:600}
footer{border-top:1px solid var(--line);padding-top:20px;display:flex;flex-wrap:wrap;gap:8px 24px;justify-content:space-between;font-size:13px;color:var(--muted)}

/* hero */
.hero{display:flex;flex-direction:column;gap:10px}
.hero h1{font-size:40px;line-height:1.1;letter-spacing:-.02em}
.hero p{font-size:17px;color:var(--text2);max-width:760px}
.hero.small p{font-size:16px}
.hero-row{display:flex;flex-wrap:wrap;align-items:flex-end;justify-content:space-between;gap:12px 24px}
.crumbs{font-size:13px;color:var(--muted);display:flex;gap:6px;flex-wrap:wrap}
.btn{white-space:nowrap;display:inline-flex;align-items:center;min-height:44px;padding:0 18px;border-radius:10px;background:var(--text);color:#fff;font-weight:600;font-size:14px}
.btn:hover{color:#fff;background:#000}
.chips{display:flex;flex-wrap:wrap;gap:8px}
.chip{display:inline-flex;align-items:center;min-height:44px;padding:0 16px;border-radius:999px;border:1px solid #D9D8D3;background:#fff;color:var(--text);font-weight:600;font-size:14px}
.chip:hover{border-color:var(--text);color:var(--text)}
.chip.on{background:var(--text);border-color:var(--text);color:#fff}

/* period switcher: radio buttons drive the panels, no JavaScript needed */
.periods{display:flex;flex-direction:column;gap:20px}
.periods>input{position:absolute;opacity:0;pointer-events:none}
.bar{display:flex;flex-wrap:wrap;gap:12px;align-items:center;justify-content:space-between}
.seg{display:inline-flex;padding:4px;gap:4px;background:#ECEBE7;border-radius:12px}
.seg label{display:inline-flex;align-items:center;min-height:44px;padding:0 18px;border-radius:9px;color:var(--text2);font-weight:600;font-size:14px;cursor:pointer}
.panel{display:none;flex-direction:column;gap:20px}
#p-24h:checked~.panel-24h,#p-7d:checked~.panel-7d,#p-30d:checked~.panel-30d{display:flex}
#p-24h:checked~.bar label[for=p-24h],#p-7d:checked~.bar label[for=p-7d],#p-30d:checked~.bar label[for=p-30d]{background:#fff;color:var(--text);box-shadow:0 1px 2px rgba(20,20,19,.12)}
.periods>input:focus-visible~.bar .seg{outline:2px solid var(--bar);outline-offset:2px}

/* KPI cards */
.kpis{display:grid;grid-template-columns:repeat(auto-fit,minmax(220px,1fr));gap:12px}
.kpi{padding:18px 20px;display:flex;flex-direction:column;gap:6px;min-width:0}
.kpi span{font-size:13px;color:var(--muted)}.kpi .sub{color:var(--text2)}
.kpi b{font-size:26px;line-height:1.15;overflow:hidden;text-overflow:ellipsis;white-space:nowrap}

/* ranking table */
.table-card{border-radius:16px;padding:24px 0 8px}
.table-head{display:flex;flex-wrap:wrap;gap:12px 24px;align-items:flex-end;justify-content:space-between;padding:0 24px 16px}
.table-head h2,.chart-card h2,.dir-card h2{font-size:22px}
.table-head p,.chart-card p{font-size:14px;color:var(--text2);margin-top:4px;max-width:760px}
.legend{display:flex;flex-wrap:wrap;gap:6px 14px;align-items:center;font-size:12px;color:var(--text2)}
.legend .lg-t{color:var(--muted)}
.legend span{display:inline-flex;align-items:center;gap:6px}
.legend i{width:14px;height:14px;border-radius:3px}
.k0{background:var(--k0)}.k1{background:var(--k1)}.k2{background:var(--k2)}.k3{background:var(--k3)}.k4{background:var(--k4)}
.k5{background:#fff;box-shadow:inset 0 0 0 1px #BDBCB6}
.k6{background:repeating-linear-gradient(45deg,#fff,#fff 2px,#E3E2DD 2px,#E3E2DD 3px)}
.scroll{overflow-x:auto}
.table{min-width:1180px;padding:0 24px}
.row{display:grid;grid-template-columns:170px minmax(170px,1.4fr) 76px 84px 100px 112px 240px 64px;gap:16px;padding:12px 0;border-bottom:1px solid var(--line2);align-items:center;font-variant-numeric:tabular-nums}
.row:last-child{border-bottom:0}
.row:not(.hdr):hover{background:#FAFAF8}
.hdr{padding:10px 0;border-bottom:1px solid var(--line);font-size:12px;color:var(--muted);font-weight:500;align-items:end}
.r{text-align:right}.b{font-weight:600}
.place{font-size:18px}
.name{display:flex;flex-direction:column;min-width:0}
.name a{color:var(--text);font-weight:600;white-space:nowrap;overflow:hidden;text-overflow:ellipsis}
.name a:hover{color:var(--link)}
.sub{font-size:12px;color:var(--muted)}
.score{display:flex;align-items:center;gap:10px}
.score b{min-width:36px;font-weight:700}
.score i{flex:1;height:6px;background:#ECEBE7;border-radius:3px;overflow:hidden}
.score u{display:block;height:100%;background:var(--bar);border-radius:3px}
.strip-h{display:flex;justify-content:space-between}.strip-h.wk{display:grid;grid-template-columns:repeat(7,1fr);text-align:center}
.strip{display:grid;grid-auto-flow:column;grid-auto-columns:minmax(0,1fr);gap:1px;height:22px}
.strip i{border-radius:2px}
.strip{position:relative}.strip i.old{opacity:.4}
.strip .now{position:absolute;top:-3px;bottom:-3px;width:2px;margin-left:-1px;background:var(--orange);border-radius:1px}
.tzsel{display:inline-flex;align-items:center;gap:6px;color:var(--muted)}.tzsel select{font:inherit;color:var(--text2)}
.table>.hdr{position:relative;z-index:2;background:var(--card)}
.table>.hdr.stuck{box-shadow:0 6px 8px -6px rgba(0,0,0,.18)}
.tr{font-weight:600;color:var(--muted);white-space:nowrap}.tr.up{color:var(--link)}.tr.down{color:var(--down)}
.more{padding:14px 24px 10px;font-weight:600}
.empty{padding:0 24px 16px;color:var(--text2)}
.m-only{display:none}
.ps{display:flex;align-items:center;gap:12px;min-width:0}.ps .place{min-width:30px}.ps .score{flex:1;min-width:0}
.rk{display:flex;align-items:center;justify-content:flex-end;gap:4px;margin-top:2px;font-size:11px;font-weight:500;color:var(--muted)}
.rk i{width:8px;height:8px;border-radius:2px}
.rate-m .rk{display:inline-flex;margin:0 0 0 4px;vertical-align:middle}
.hdr [data-sort]{cursor:pointer;user-select:none}
.hdr [data-sort]:hover,.hdr [aria-sort]{color:var(--text)}
.hdr [aria-sort=ascending]::after{content:" ↑"}.hdr [aria-sort=descending]::after{content:" ↓"}
.m-sort{display:none;align-items:center;gap:8px;font-size:14px;color:var(--text2);margin-bottom:10px}
.m-sort select{font:inherit;color:var(--text);padding:6px 10px;border:1px solid var(--line);border-radius:10px;background:#fff}
.ex-table{min-width:760px}.ex-table .row{grid-template-columns:minmax(180px,2fr) 110px 100px 110px 110px 130px}
.dir-table{min-width:620px}.dir-table .row{grid-template-columns:minmax(220px,2fr) 140px 120px 160px}

/* charts on the exchanger page */
.charts{display:flex;flex-direction:column;gap:28px}
.chart-card{border-radius:16px;padding:24px;display:flex;flex-direction:column;gap:18px}
.chart-card .table-head{padding:0}
.chart{display:grid;grid-template-columns:40px minmax(0,1fr);gap:8px}
.yaxis,.plot{position:relative}
.yaxis span{position:absolute;right:0;transform:translateY(-50%);font-size:12px;color:var(--muted);font-variant-numeric:tabular-nums}
.plot svg{position:absolute;inset:0;width:100%;height:100%;overflow:visible}
.plot path{fill:none;stroke-width:2px;vector-effect:non-scaling-stroke;stroke-linejoin:round;stroke-linecap:round}
.grid{position:absolute;left:0;right:0;border-top:1px solid var(--line2)}
.band{position:absolute;left:0;right:0;top:0;background:#EEF4FC;border-radius:4px}
.band-l{position:absolute;left:8px;top:6px;font-size:11px;font-weight:600;color:var(--link)}
.xaxis{display:flex;justify-content:space-between;margin-left:48px;font-size:12px;color:var(--muted);font-variant-numeric:tabular-nums}
.cursor{position:absolute;top:0;bottom:0;border-left:1px solid #8C8B85;pointer-events:none}
.dot{position:absolute;width:10px;height:10px;margin:-5px 0 0 -5px;border-radius:50%;box-shadow:0 0 0 2px #fff;pointer-events:none}
.tip{position:absolute;top:8px;padding:10px 12px;background:var(--text);color:#fff;border-radius:10px;font-size:13px;line-height:1.4;white-space:nowrap;pointer-events:none;z-index:2}
.tip b{display:block;font-weight:600}
.heat{min-width:640px;display:flex;flex-direction:column;gap:3px}
.heat-row{display:grid;grid-template-columns:84px minmax(0,1fr);gap:10px;align-items:center;font-size:12px;color:var(--text2);white-space:nowrap}
.heat-x{display:grid;grid-template-columns:repeat(8,minmax(0,1fr));color:var(--muted);margin-top:4px}

/* home sections, catalog */
.block{display:flex;flex-direction:column;gap:16px}
.block>h2{font-size:26px}
.lead{max-width:760px;color:var(--text2)}
.method-grid,.coin-grid{display:grid;grid-template-columns:repeat(auto-fit,minmax(240px,1fr));gap:12px}
.method-grid .card{padding:20px;display:flex;flex-direction:column;gap:8px}
.method-grid span{font-size:14px;color:var(--text2)}
.w{font-size:30px;color:var(--link)}
.coin{padding:18px 20px;display:flex;flex-direction:column;gap:10px}
.coin>b{font-family:Manrope,Inter,sans-serif;font-weight:800;font-size:18px}
.links{display:flex;flex-wrap:wrap;gap:6px 8px}
.links a{display:inline-flex;align-items:center;min-height:32px;padding:0 10px;border:1px solid var(--line);border-radius:8px;background:#fff;color:var(--text);font-size:13px}
.links a:hover{border-color:var(--text)}
.links a span{color:var(--muted);margin-left:4px}
.all{font-size:13px;font-weight:600}
.dir-card{border-radius:16px;padding:24px;display:flex;flex-direction:column;gap:12px}
.dir-card h3.fiat{font-size:13px;font-weight:700;color:var(--muted);letter-spacing:.06em;margin-top:8px;padding-top:12px;border-top:1px solid var(--line2)}
.dir-card h4{font-size:14px;color:var(--text2);font-weight:600;margin:6px 0 0}
.fiat-group{display:flex;flex-direction:column;gap:10px}
.fiat-group:first-of-type h3.fiat{border-top:0;padding-top:0}
details summary{cursor:pointer;font-size:14px;font-weight:600;color:var(--link);padding:8px 0}

/* exchange calculator (home page) */
[hidden]{display:none!important}
.calc{padding:20px 24px;display:flex;flex-direction:column;gap:14px;min-width:0}
.calc-row{display:grid;grid-template-columns:minmax(0,1fr) auto minmax(0,1fr);gap:12px;align-items:end}
.fld{display:flex;flex-direction:column;gap:6px;min-width:0}
.fld label{font-size:13px;color:var(--muted);font-weight:500}
.fld.city{grid-column:1/-1}
.ctl{display:flex;border:1px solid #D9D8D3;border-radius:12px;background:#fff;overflow:hidden}
.ctl:focus-within{border-color:var(--text)}
.ctl input{flex:1 1 40%;min-width:0;border:0;padding:0 14px;height:54px;font:700 20px Manrope,Inter,sans-serif;color:var(--text);background:none;outline:none;font-variant-numeric:tabular-nums}
.ctl select{flex:1 1 60%;min-width:0;border:0;border-left:1px solid var(--line);padding:0 10px;font:600 14px Inter,system-ui,sans-serif;color:var(--text);background:#FAFAF8;outline:none;cursor:pointer}
.fld.city select{height:44px;max-width:340px;border:1px solid #D9D8D3;border-radius:12px;padding:0 10px;font:600 14px Inter,system-ui,sans-serif;background:#fff;color:var(--text)}
.swap{height:54px;width:46px;border:1px solid #D9D8D3;border-radius:12px;background:#fff;font-size:20px;cursor:pointer;color:var(--text)}
.swap:hover{border-color:var(--text)}
.calc-head{display:flex;flex-wrap:wrap;gap:4px 14px;align-items:baseline;padding-bottom:4px}
.calc-head b{font-family:Manrope,Inter,sans-serif;font-size:17px}
.calc-head a{margin-left:auto;font-weight:600;font-size:14px}
.offer{min-width:0;display:grid;grid-template-columns:28px minmax(0,1fr) auto;gap:12px;align-items:center;padding:10px 0;border-top:1px solid var(--line2);font-variant-numeric:tabular-nums}
.offer .place{font-size:15px;color:var(--muted)}
.offer .name a,.offer .name b{color:var(--text);font-weight:600;white-space:nowrap;overflow:hidden;text-overflow:ellipsis}
.offer .name a:hover{color:var(--link)}
.offer .amt{display:flex;flex-direction:column;align-items:flex-end;gap:2px;text-align:right;max-width:50vw}
.offer .amt b{font:700 17px Manrope,Inter,sans-serif;white-space:nowrap}
.offer.off{opacity:.5}
.offers:not(.all) .offer.extra{display:none}
.pl{display:inline-block;font-size:11px;font-weight:600;padding:1px 6px;border-radius:5px;color:#fff;white-space:nowrap}
.pl.k3,.pl.k4{color:var(--text)}
.why{font-size:12px;color:var(--down)}
.more-btn{margin-top:8px;min-height:40px;padding:0 16px;border-radius:999px;border:1px solid #D9D8D3;background:#fff;font:600 14px Inter,system-ui,sans-serif;color:var(--text);cursor:pointer}
.more-btn:hover{border-color:var(--text)}

/* score breakdown: a hidden checkbox per row, the score is its label (no JavaScript) */
.bx{position:absolute;opacity:0;pointer-events:none}
label.score{cursor:pointer}
label.score b{text-decoration:underline dotted #A9A8A2;text-underline-offset:3px}
label.score:hover b{color:var(--link)}
.bx:focus-visible~.ps .score{outline:2px solid var(--bar);outline-offset:2px;border-radius:4px}
.row>.bd{display:none;grid-column:1/-1}
.bx:checked~.bd{display:grid}
.bd{grid-template-columns:repeat(4,minmax(0,1fr)) auto;gap:8px 20px;padding:12px 14px;background:#F4F7FC;border-radius:10px;font-size:13px;color:var(--text2)}
.bd p{display:flex;flex-direction:column;gap:2px;min-width:0}
.bd span{font-size:12px;color:var(--muted)}
.bd em{font-style:normal}.bd b{color:var(--text);font-weight:700}
.bd small{font-size:12px;color:var(--muted)}
.bd .bd-t b{font-size:16px}
.bd .bd-t a{font-weight:600}
.bd.full{display:grid;font-size:15px;padding:16px 18px}
.bd.full b{font-size:18px}
.bd-card{gap:14px}

/* favorites */
.fav{align-self:flex-start;margin-top:4px;min-height:36px;padding:0 14px;border-radius:999px;border:1px solid #D9D8D3;background:#fff;font:600 14px Inter,system-ui,sans-serif;color:var(--text);cursor:pointer}
.fav:hover{border-color:var(--text)}
.fav.on{border-color:#E8B93A;background:#FFF8E5}
.hero-row>div:first-child{display:flex;flex-direction:column;gap:8px}
.favs{padding:20px 24px;display:flex;flex-direction:column;gap:6px}
.link-btn{margin-left:auto;border:0;background:none;padding:0;font:600 14px Inter,system-ui,sans-serif;color:var(--link);cursor:pointer}
.link-btn:hover{color:var(--link-h)}
.fav-i{display:grid;grid-template-columns:minmax(0,1fr) auto 32px;gap:12px;align-items:center;padding:10px 0;border-top:1px solid var(--line2);font-variant-numeric:tabular-nums}
.fav-i .name a,.fav-i .name b{color:var(--text);font-weight:600;white-space:nowrap;overflow:hidden;text-overflow:ellipsis}
.fav-i .amt{display:flex;flex-direction:column;align-items:flex-end;gap:2px;text-align:right}
.fav-i .amt b{font:700 16px Manrope,Inter,sans-serif;white-space:nowrap}
.fav-x{width:32px;height:32px;border:0;border-radius:8px;background:none;font-size:20px;line-height:1;color:var(--muted);cursor:pointer}
.fav-x:hover{background:#ECEBE7;color:var(--text)}

/* phone: table rows become cards */
@media (max-width:760px){
  .hero h1{font-size:30px}
  .brand .tag{display:none}
  .cta{align-items:flex-start;text-align:left}
  .table-card{background:none;border:0;padding:0}
  .table-head{padding:0 0 12px}
  .table{min-width:0;padding:0;display:flex;flex-direction:column;gap:10px}
  .ranking-table .hdr,.table:not(.ex-table):not(.dir-table) .hdr{display:none}
  .table:not(.ex-table):not(.dir-table) .row{grid-template-columns:32px minmax(0,1fr) auto;grid-template-areas:"place name score" "strip strip strip";gap:10px 12px;padding:14px;background:#fff;border:1px solid var(--line);border-radius:14px}
  .table:not(.ex-table):not(.dir-table) .place{grid-area:place;font-size:22px}
  .table:not(.ex-table):not(.dir-table) .name{grid-area:name}
  .table:not(.ex-table):not(.dir-table) .score{grid-area:score;flex-direction:column;align-items:flex-end;gap:0}
  .score b{font-size:17px;font-weight:800;min-width:0}.score i{display:none}
  .table:not(.ex-table):not(.dir-table) .strip{grid-area:strip;height:14px}
  .d-only{display:none}.m-only{display:inline}
  .ps{display:contents}
  .m-sort{display:flex}
  .calc{padding:16px}.calc-row{grid-template-columns:minmax(0,1fr)}.swap{justify-self:center;height:40px;transform:rotate(90deg)}
  .ctl input{font-size:18px}
  .name .m-only{display:block}
  .bd,.bd.full{grid-template-columns:repeat(2,minmax(0,1fr))}
  .bd .bd-t{grid-column:1/-1;flex-direction:row;flex-wrap:wrap;align-items:baseline;gap:4px 8px}
  .bd .bd-t a{margin-left:auto}
  .favs{padding:16px}
  .fav-i{grid-template-columns:minmax(0,1fr) 32px;gap:4px 8px}
  .fav-i .amt{grid-row:2;align-items:flex-start;text-align:left}
  .ex-table,.dir-table{padding:0 16px;background:#fff;border:1px solid var(--line);border-radius:14px}
  .more{padding:14px 0 0}
  .kpi b{font-size:22px}
  .chart-card{padding:16px}
  .seg{display:grid;grid-template-columns:repeat(3,1fr);width:100%}.seg label{justify-content:center;padding:0}
}

/* Site root: language chooser */
.lang-choice{padding:64px 16px;text-align:center}

/* strip headers drawn by app.js: dates, local hours, UTC hours */
.strip-h.js{display:block;position:relative;font-size:11px;line-height:14px}
.sh-row{position:relative;height:14px;white-space:nowrap}
.sh-row>span{position:absolute;top:0}
.sh-row .sg{overflow:hidden;text-overflow:ellipsis;padding:0 3px;box-sizing:border-box}
.sh-row .sg.c{text-align:center}.sh-row .cur{color:var(--text);font-weight:600}.sh-row .old{opacity:.6}
.sh-row.u{opacity:.7}
.sh-row .z{max-width:22%;overflow:hidden;text-overflow:ellipsis;font-weight:600}
.strip-h .now{position:absolute;top:0;bottom:-10px;width:2px;margin-left:-1px;background:var(--orange);opacity:.5}
.kx{background:transparent}
.heat-row.u{opacity:.7}
.xaxis small{display:block;opacity:.7}
.top .tzsel select{font:inherit;font-size:13px;color:var(--text2);background:transparent;border:1px solid var(--line);border-radius:8px;padding:4px 6px}

/* Directions page: finder with currency selects */
.finder select{height:44px;width:100%;border:1px solid #D9D8D3;border-radius:12px;padding:0 10px;font:600 14px Inter,system-ui,sans-serif;background:#fff;color:var(--text)}
.finder .swap{height:44px}
.find-out{display:grid;grid-template-columns:repeat(auto-fill,minmax(240px,1fr));gap:6px 16px}
.find-out .n{grid-column:1/-1;font-size:13px;color:var(--muted)}
.find-out a,.find-out button{display:flex;justify-content:space-between;gap:8px;padding:8px 10px;border-radius:10px;border:1px solid var(--line);background:#fff;color:var(--text);font:inherit;font-size:14px;text-align:left;cursor:pointer;text-decoration:none}
.find-out a:hover,.find-out button:hover{border-color:var(--link)}
.find-out span{color:var(--muted);white-space:nowrap}
.all-dirs>summary{cursor:pointer;margin:8px 0 16px;color:var(--link);font-weight:600}
.finder.compact{padding:14px 20px;gap:10px}
.finder.compact .find-out:empty{display:none}
