/* Silent.Exchange: the one stylesheet (works without JS, loads nothing from outside).
   Order: 1 tokens (light + dark colours) · 2 base · 3 page frame (header, phone menu, footer) · 4 home ·
   5 shared components (cards, forms, buttons, coin picker) · 6 trade flow · 7 other pages · 8 tap feedback.
   Each component keeps all its sizes in one place, its media queries right below it (wide to narrow).
   No fixed minimum widths: anything that could be wider than a 260 px phone uses min(Xpx, 100%).
   Check after any change: node site/tools/layout-check.js (see WHAT-AND-WHERE.md). */

/* ========== 1. Tokens ========== */
:root {
    --bg: #eef0f3;          /* page background: light gray */
    --card: #ffffff;
    --soft: #f5f6f8;        /* boxes inside cards */
    --line: #dde1e7;
    --text: #1d2330;
    --muted: #5f6877;
    --dark: #000000;        /* black accents that stay black in both modes (home info cards, Popular pairs, reviewer seals); header / footer use --frame-* */
    --gap: 20px;            /* one spacing for card padding and the gaps between boxes */
    --accent: #FF6B00;
    --accent-dark: #E05E00;
    --ok: #1c9d5c;
    --err: #d64545;
    --warn: #a86a12;
    --radius: 12px;
    --shadow: 0 1px 2px rgba(16, 24, 40, .06), 0 8px 24px rgba(16, 24, 40, .06);
    --mincho: "Yu Mincho", "YuMincho", "Hiragino Mincho ProN", "Noto Serif JP", "MS Mincho", serif;   /* kanji accents: system fonts only */
    --accent-hover: #E05E00;   /* button hover background (same in both modes) */
    --field: #ffffff;          /* inputs and white boxes inside cards */
    --tint: #fff1e6;           /* orange tints: chosen options, estimates, badges */
    --tint-strong: #ffe5d2;
    --tint-soft: #fff6ef;      /* top of the orange-tinted boxes (Good to know, reviews) */
    --tint-line: #ffe1cc;
    --tint-line-strong: #ffc8a3;
    --warn-bg: #fff6e0; --warn-line: #f2dca6; --warn-text: #6b4a0e;
    --err-bg: #fdecec;  --err-line: #f3c2c2;  --err-text: #8a2424;
    --ok-bg: #e3f5ec;   --ok-line: #bfe7d2;   --ok-text: #145c38;
    --chip: #e9ecf0;           /* small grey pills, secondary-button hover */
    --track: #ece9e6;          /* empty part of rating bars */
    --star-off: #c4cad3;
    --faint: #a3abb6;          /* upcoming steps, radio rings */
    --dots: #c9ced6;           /* dotted lines between steps */
    --ink: #2a2d33;            /* line drawings (rate cards) */
    --text-base: #222;         /* inputs, buttons, page base */
    /* frame = header, footer, phone menu, outage banner (white in light mode, black in dark mode) */
    --frame-bg: #ffffff; --frame-text: #1d2330; --frame-muted: #4a5260; --frame-link: #4a5260; --frame-faint: #4a5260;   /* one even grey, 7.9:1 on white */
    --frame-icon: #4a5260; --frame-chip: #eef0f3; --frame-hover: rgba(16, 24, 40, .06); --frame-line: #dde1e7; --frame-sep: #c4cad3;
    --frame-edge: #dde1e7;     /* thin line under the header / over the footer (none in dark) */
    --menu-bg: #ffffff; --menu-line: #dde1e7; --menu-sep: #dde1e7; --menu-shadow: 0 18px 40px rgba(16, 24, 40, .18);
    --round-bg: #ffffff; --round-icon: #5f6877;   /* lock / swap buttons on the home form */
    color-scheme: light;
}

/* ---------- Dark mode (the default) ----------
   Every page says <html data-theme="dark"> unless the visitor picked light with the sun / moon switch
   (cookie "theme", set by /theme or app.js). */
:root[data-theme="dark"] {
    --bg: #101215; --card: #181b20; --soft: #1f2329; --line: #2e343d; --text: #e6e9ee; --muted: #9ba4b0;
    --accent-dark: #ff8a3d; --ok: #3cc47f; --err: #f06a6a; --warn: #e5b34d;
    --shadow: 0 1px 2px rgba(0, 0, 0, .5), 0 8px 24px rgba(0, 0, 0, .35);
    --field: #14171b; --tint: #2d1e12; --tint-strong: #3d2614; --tint-soft: #221a13; --tint-line: #4b3020; --tint-line-strong: #6e4222;
    --warn-bg: #2a2312; --warn-line: #5a4a20; --warn-text: #f0d58a;
    --err-bg: #2d1717;  --err-line: #5e2b2b;  --err-text: #f5a5a5;
    --ok-bg: #12271c;   --ok-line: #24563a;   --ok-text: #8fe3b7;
    --chip: #2a3038; --track: #2c3139; --star-off: #4a515c; --faint: #6b7480; --dots: #3b414b; --ink: #c9ced6; --text-base: #e6e9ee;
    --frame-bg: #000000; --frame-text: #ffffff; --frame-muted: #aab1bc; --frame-link: #b5bbc2; --frame-faint: #8a929e;
    --frame-icon: #c3c9d2; --frame-chip: rgba(255, 255, 255, .06); --frame-hover: rgba(255, 255, 255, .08); --frame-line: rgba(255, 255, 255, .08); --frame-sep: rgba(255, 255, 255, .35);
    --frame-edge: transparent;
    --menu-bg: #0d0f12; --menu-line: rgba(255, 255, 255, .12); --menu-sep: rgba(255, 255, 255, .25); --menu-shadow: 0 18px 40px rgba(0, 0, 0, .55);
    --round-bg: #2a2f37; --round-icon: #c9ced6;
    color-scheme: dark;
}

/* ========== 2. Base ========== */
/* Reset (from Eric Meyer's public-domain reset v2.0) */
html, body, div, span, applet, object, iframe,
h1, h2, h3, h4, h5, h6, p, blockquote, pre,
a, abbr, acronym, address, big, cite, code,
del, dfn, em, img, ins, kbd, q, s, samp,
small, strike, strong, sub, sup, tt, var,
b, u, i, center,
dl, dt, dd, ol, ul, li,
fieldset, form, label, legend,
table, caption, tbody, tfoot, thead, tr, th, td,
article, aside, canvas, details, embed,
figure, figcaption, footer, header, hgroup,
menu, nav, output, ruby, section, summary,
time, mark, audio, video {
    margin: 0; padding: 0; border: 0; font: inherit; vertical-align: baseline;
}
* { box-sizing: border-box; }
html, body { width: 100%; height: 100%; }
html { -webkit-text-size-adjust: 100%; }   /* no iOS text zoom after turning the phone */
html, button, input, select, textarea { color: var(--text-base); }
:focus { outline: 0; }
:focus-visible { outline: 2px solid var(--accent); outline-offset: 2px; }
a { text-decoration: none; transition: color .15s; }
a:focus { outline: thin dotted; }
a:active, a:hover { outline: 0; }
ol, ul { list-style: none; }
table { border-collapse: collapse; border-spacing: 0; }
img { vertical-align: middle; }
[hidden] { display: none; }
button, input, select, textarea { font-size: 100%; margin: 0; vertical-align: baseline; }
button, input { line-height: normal; }
button, select { text-transform: none; }
button, input[type="button"], input[type="reset"], input[type="submit"] { -webkit-appearance: button; cursor: pointer; }
button[disabled], input[disabled] { cursor: default; }
input[type="checkbox"], input[type="radio"] { padding: 0; }
input[type="search"]::-webkit-search-cancel-button, input[type="search"]::-webkit-search-decoration,
input[type="search"]::-webkit-search-results-button, input[type="search"]::-webkit-search-results-decoration { -webkit-appearance: none; }
button::-moz-focus-inner, input::-moz-focus-inner { border: 0; padding: 0; }
textarea { overflow: auto; vertical-align: top; resize: vertical; }
::selection { background: #b3d4fc; text-shadow: none; }

/* Fonts (local Inter files) */
@font-face { font-family: "Inter"; src: url("../fonts/Inter-Regular.woff2"); }
@font-face { font-family: "Inter"; src: url("../fonts/Inter-SemiBold.woff2"); font-weight: 600; }
@font-face { font-family: "Inter"; src: url("../fonts/Inter-Bold.woff2"); font-weight: 900; }
@font-face { font-family: "Inter"; src: url("../fonts/Inter-Medium.woff2"); font-weight: 500; }
/* Backup fonts: if Inter is slow or blocked, use the system sans-serif instead of the browser's serif default. */
.app, .app input, .app button { font-family: 'Inter', system-ui, -apple-system, "Segoe UI", Roboto, Arial, sans-serif; }
html[lang="zh"] .app { font-family: 'Inter', "PingFang SC", "Microsoft YaHei", "Noto Sans CJK SC", sans-serif; }

.visually-hidden { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }
.hp { position: absolute; left: -9999px; width: 1px; height: 1px; overflow: hidden; }   /* honeypot field */
/* The outage triangle has its own yellow fill attribute; it has always shown white (a white fill on every svg path,
   removed 2026-11-22, beat it). Kept so the banner looks the same. */
.outage-icon path { fill: #fff; }

/* ========== 3. Page frame ========== */
.app { min-height: 100vh; display: flex; flex-direction: column; background: var(--bg) url("../images/washi.svg"); }   /* washi paper texture */
.background { display: none; }   /* old theme's background picture holder (still in layout.php) */
.main-container { flex: 1; width: 100%; z-index: 2; }

/* ---------- Header ---------- */
.app-header { position: relative; z-index: 3; width: 100%; height: 80px; padding: 0 30px; background: var(--frame-bg); box-shadow: inset 0 -1px 0 var(--frame-edge); }
.header-wrapper { height: 100%; max-width: 1140px; margin: 0 auto; display: flex; justify-content: space-between; align-items: center; text-transform: uppercase; }
.app-logo { font-family: 'Inter'; color: var(--frame-text); font-size: 26px; font-weight: 900; }
.app-logo > a { color: var(--frame-text); }
.app-logo-img { max-height: 56px; width: auto; display: block; object-fit: contain; }
/* logo.svg (vector, 2026-11-22) has its own perfect black ring around the white disc, so light mode needs no extra ring. */
.header-wrapper .main-menu { display: flex; align-items: center; }   /* menu, languages and switch on one centre line */
.header-wrapper .main-menu > li { margin: 0 24px; color: var(--frame-text); font-family: 'Inter'; font-size: 16px; font-weight: 600; letter-spacing: 0.05em; }
.header-wrapper .main-menu > li a.nav-link { color: var(--frame-text); }
.header-wrapper .main-menu > li a.nav-link:hover { color: var(--accent); }
.header-wrapper .main-menu > li a.nav-link.active { position: relative; }
.header-wrapper .main-menu > li a.nav-link.active:after { content: ""; display: block; position: absolute; width: 100%; height: 2px; bottom: -4.5px; background-color: var(--accent); }
.lang-links a { color: var(--frame-muted); margin: 0 6px; font-weight: 600; }
.lang-links a:hover { color: var(--frame-text); }
.lang-links a.current { color: var(--accent); }
/* A thin "|" divider before the languages and before the light / dark switch */
.header-wrapper .main-menu > li.lang-links { margin-right: 0; display: flex; align-items: center; }
.header-wrapper .main-menu > li.lang-links::before { content: ""; width: 1px; height: 16px; background: var(--frame-sep); margin-right: 18px; }
.header-wrapper .main-menu > li.theme-li { margin: 0 0 0 12px; display: flex; align-items: center; }
.header-wrapper .main-menu > li.theme-li::before { content: ""; width: 1px; height: 16px; background: var(--frame-sep); margin-right: 12px; }
@media screen and (max-width: 1280px) { .app-logo { font-size: 20px; } }
@media screen and (max-width: 900px) {   /* tablets (681–900px): header menu must fit the width */
    .header-wrapper .main-menu > li { margin: 0 10px; font-size: 14px; }
    .header-wrapper .main-menu > li.lang-links::before { margin-right: 12px; }
    .lang-links a { margin: 0 4px; }
}
@media screen and (max-width: 768px) {
    .app-logo { font-size: 16px; }
    .app-header { padding: 0 20px; }
}
@media screen and (max-width: 680px) { .header-wrapper .main-menu { display: none; } }

/* ---------- Light / dark switch ----------
   Moon in light mode, sun in dark mode. Desktop: last item of the menu; phones: next to the ☰; footer: social row. */
.theme-switch a { display: inline-flex; align-items: center; justify-content: center; width: 32px; height: 32px; border-radius: 50%; color: var(--frame-muted); position: relative; }
.theme-switch a::after { content: ""; position: absolute; inset: -6px; }   /* ~44px tap area */
.theme-switch a:hover, .theme-switch a:focus-visible { color: var(--frame-text); background: var(--frame-hover); }
.theme-switch svg { fill: none; stroke: currentColor; stroke-width: 1.8; stroke-linecap: round; stroke-linejoin: round; }
.theme-to-light { display: none !important; }
:root[data-theme="dark"] .theme-to-dark { display: none !important; }
:root[data-theme="dark"] .theme-to-light { display: inline-flex !important; }
.theme-mobile { display: none; }
@media screen and (max-width: 680px) { .theme-mobile { display: flex; align-items: center; margin-left: auto; margin-right: 6px; } }

/* ---------- Phone menu (no JS: a <details>), same look as the desktop header ---------- */
.mobile-nav { display: none; position: relative; }
.mobile-nav summary { list-style: none; cursor: pointer; padding: 8px; }
.mobile-nav summary::-webkit-details-marker { display: none; }
.burger-button { display: flex; width: 20px; height: 20px; z-index: 3; justify-content: center; align-items: center; }
.burger-icon { width: 16px; position: relative; display: block; height: 2px; background-color: #FF6B00; transition: background .2s; }
.burger-icon::before, .burger-icon::after {
    content: ""; position: absolute; display: block; height: 2px; width: 16px; background-color: #FF6B00; transition: transform .2s, top .2s, bottom .2s;
}
.burger-icon::before { top: 6px; }
.burger-icon::after { bottom: 6px; }
/* ☰ turns into ✕ while the menu is open */
.mobile-nav[open] .burger-icon { background: transparent; }
.mobile-nav[open] .burger-icon::before { top: 0; transform: rotate(45deg); }
.mobile-nav[open] .burger-icon::after { bottom: 0; transform: rotate(-45deg); }
.mobile-nav nav {
    position: absolute; z-index: 10; right: 0; top: calc(100% + 30px);   /* starts just below the header (button sits 22px above its bottom edge) */
    min-width: min(210px, calc(100vw - 40px)); padding: 14px 20px; display: flex; flex-direction: column;
    background: var(--menu-bg); border: 1px solid var(--menu-line); border-radius: 12px; box-shadow: var(--menu-shadow);
}
/* pointer up to the ✕: centred on the button (button centre = 18px from the menu's right edge) */
.mobile-nav nav::before {
    content: ""; position: absolute; top: -6px; right: 13px; width: 10px; height: 10px; transform: rotate(45deg);
    background: var(--menu-bg); border-left: 1px solid var(--menu-line); border-top: 1px solid var(--menu-line);
}
.mobile-nav nav a { color: var(--frame-text); font-weight: 600; text-transform: uppercase; letter-spacing: .05em; }
.mobile-nav .m-link { display: block; padding: 11px 0; font-size: 14px; }   /* ~44px tap rows */
.mobile-nav .m-link:hover, .mobile-nav .m-link.current { color: var(--accent); }
/* the one divider, like the desktop "|"; EN · RU · 中文 spread across the full menu width */
.mobile-nav .m-langs { display: flex; justify-content: space-between; margin-top: 8px; padding-top: 14px; border-top: 1px solid var(--menu-sep); }
.mobile-nav .m-langs a { margin: 0; padding: 4px 0; color: var(--frame-muted); font-size: 13px; }
.mobile-nav .m-langs a.current { color: var(--accent); }
@media screen and (max-width: 680px) { .mobile-nav { display: block; } }
@media (prefers-reduced-motion: reduce) { .burger-icon::before, .burger-icon::after { transition: none; } }

/* ---------- Outage banner (partner down): one quiet line under the header ---------- */
.outage-banner { position: relative; z-index: 2; margin: 0; padding: 12px 20px; background: var(--frame-bg); border-top: 2px solid var(--accent); border-bottom: 2px solid var(--accent); color: var(--frame-text); font-weight: 600; text-align: center; line-height: 1.45; }
.outage-icon { display: inline-block; vertical-align: -4px; margin-right: 8px; flex: none; }

/* ---------- Footer ---------- */
.app-footer { flex-basis: 160px; padding: 28px 30px; width: 100%; display: flex; align-items: center; justify-content: center; background: var(--frame-bg); box-shadow: inset 0 1px 0 var(--frame-edge); }
.footer-wrapper { width: 100%; max-width: 1140px; display: grid; grid-template-columns: 1fr 1fr 2fr; grid-template-areas: "logo social menu" "copy copy copy"; gap: 16px; align-items: center; }
/* everything in the top row centred on one line */
.footer-wrapper .app-logo { grid-area: logo; color: #B5BBC2; text-transform: uppercase; display: flex; align-items: center; margin: 0; line-height: 1; }
.social-links { grid-area: social; display: flex; gap: 10px; align-items: center; }
.social-links a {
    color: var(--frame-icon); display: inline-flex; width: 38px; height: 38px; border-radius: 50%;
    align-items: center; justify-content: center; background: var(--frame-chip); transition: background .15s, color .15s;
}
.social-links a:hover, .social-links a:focus { color: #fff; background: var(--accent); }
.social-links svg path { fill: currentColor; }
.social-links .theme-switch svg path { fill: none; }   /* outline sun / moon */
.social-links .theme-switch { display: contents; }   /* the switch sits in the social row as the same round button */
.social-links .theme-switch a { width: 38px; height: 38px; color: var(--frame-icon); background: var(--frame-chip); }
.social-links .theme-switch a:hover, .social-links .theme-switch a:focus-visible { color: #fff; background: var(--accent); }
/* PGP key button (same round look as X); shows a tick for a moment after copying. */
.social-links .pgp-copy svg { fill: none; stroke: currentColor; stroke-width: 2; stroke-linecap: round; stroke-linejoin: round; }
.social-links .pgp-copy svg path, .social-links .pgp-copy svg circle, .social-links .pgp-copy svg polyline { fill: none; }
.pgp-copy .icon-done, .pgp-copy.copied .icon-key { display: none; }
.pgp-copy.copied .icon-done { display: block; }
.social-links .pgp-copy.copied { color: #fff; background: var(--ok); }
.footer-menu { grid-area: menu; display: flex; justify-content: space-between; align-items: center; }
/* Footer links: a real 2-column grid, so row 2 (AML Policy, FAQ) lines up under row 1 at every width. */
.footer-menu .main-links { display: grid; grid-template-columns: repeat(2, max-content); gap: 12px 32px; align-items: start; }
.footer-menu .footer-link { letter-spacing: 0.05em; text-transform: uppercase; font-weight: 600; font-size: 12px; }
.footer-menu .footer-link .nav-link { color: var(--frame-link); white-space: nowrap; }
.footer-menu .footer-link .nav-link:hover { color: var(--frame-text); }
.footer-menu .secondary-links { padding-left: 26px; display: flex; flex-direction: row; flex-wrap: nowrap; gap: 14px; white-space: nowrap; flex: none; align-items: flex-start; }
.footer-menu .secondary-links.lang-links a { margin: 0; }
.footer-wrapper .lang-links a { font-size: 12px; text-transform: uppercase; white-space: nowrap; }
.copyright { grid-area: copy; margin-bottom: 0; color: var(--frame-faint); font-size: 12px; text-align: center; border-top: 1px solid var(--frame-line); padding-top: 16px; }
.tor-address { grid-column: 1 / -1; margin: -8px 0 0; color: var(--frame-faint); font-size: 12px; text-align: center; overflow-wrap: anywhere; }   /* under the copyright; the 62-letter address may break on phones */
.tor-address a { color: inherit; }
.tor-address a:hover { color: var(--frame-text); }
.find-us { grid-column: 1 / -1; margin: -8px 0 0; color: var(--frame-faint); font-size: 12px; text-align: center; }   /* "Find us on: Monerica · …" */
.find-us a { color: inherit; text-decoration: underline; text-underline-offset: 2px; }
.find-us a:hover { color: var(--frame-text); }
@media screen and (max-width: 1100px) {   /* footer stacked: the RU footer links need ~1010 px side by side */
    .footer-wrapper { grid-template-columns: 1fr; grid-template-areas: "logo" "social" "menu" "copy"; justify-items: center; text-align: center; }
    .footer-menu { flex-wrap: wrap; justify-content: center; gap: 16px 32px; }
    .footer-menu .secondary-links { padding-left: 0; }
    .social-links { justify-content: center; }
}
@media screen and (max-width: 768px) {   /* languages stacked top-down (EN / RU / 中文), matching the link columns beside them */
    .footer-menu .secondary-links { flex-direction: column; gap: 12px; }
}
/* Phones (RU "Политика конфиденциальности" is one long word): columns shrink from 540 px down, and the word may break
   (with a hyphen where the browser can) instead of pushing the page sideways at 320 px. */
@media screen and (max-width: 540px) {
    .app-footer { flex-basis: 210px; padding: 28px 20px; }
    .footer-wrapper .app-logo { justify-content: center; }   /* name centred like the icons */
    .footer-menu .main-links { grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 12px 20px; min-width: 0; }
    .footer-menu .footer-link .nav-link { white-space: normal; overflow-wrap: anywhere; hyphens: auto; }
}

/* ========== 4. Home ========== */
/* Hero (dark mode): lit stone lanterns at night in mist, hand-drawn twin of the light-mode dawn scene
   (hero-night.svg replaced the street-lamp photo bg-photo.jpg). Fits the hero height, anchored right; the same sky
   gradient fills the rest. */
.main-form-block {
    position: relative; overflow: hidden; width: 100%; padding: 32px 30px 56px;
    /* clip, not just hidden: a hidden box can still be scrolled by the browser (opening the coin list did that,
       pushing the heading out of view for good). clip cuts the 静 watermark the same way but never scrolls. */
    overflow: clip;
    background: url("../images/hero-night.svg") 88% 100% / auto 100% no-repeat,
                linear-gradient(180deg, #07080a 0%, #0c0d10 62%, #121418 100%);
}
.main-form-block.picker-open { overflow: visible; }   /* app.js: an open coin list may hang below the hero */
/* Light mode: an ink drawing of stone lanterns at dawn (hero-dawn.svg), same fit. */
:root[data-theme="light"] .main-form-block {
    background: url("../images/hero-dawn.svg") 88% 100% / auto 100% no-repeat,
                linear-gradient(180deg, #fbf8f2 0%, #f6f2ea 62%, #eeedea 100%);
}
/* A large, faint 静 ("silence") behind the headline */
.main-form-block::before {
    content: "静"; position: absolute; z-index: 0; pointer-events: none;
    left: -2%; bottom: -18%; font-family: var(--mincho); font-size: clamp(195px, 25.5vw, 390px); line-height: 1;   /* 25 % smaller than before (2026-11-22) */
    color: rgba(255, 255, 255, .045);
}
:root[data-theme="light"] .main-form-block::before { color: rgba(29, 35, 48, .028); }   /* 静 watermark in faint ink */
@media screen and (max-width: 768px) {   /* stacked hero is tall and narrow: smaller, lower, lanterns in view */
    .main-form-block { padding-left: 0; padding-right: 0; }
    .main-form-block, :root[data-theme="light"] .main-form-block { background-position: 78% 100%, 0 0; background-size: auto 62%, auto; }
}

/* Hero grid. Two columns from 769 px: text left of the widget, the widget sets the height, the text rows share it.
   Stacked below: rows fit their content. Columns may shrink below their content (minmax 0), so long RU/ZH labels
   never push the form off the screen. */
.form-block-container {
    position: relative; z-index: 1; margin: 0 auto; width: 100%; max-width: 1140px; display: grid;
    grid-template-areas: "tagline form" "promise form"; grid-template-columns: 1fr 1fr; grid-template-rows: auto 1fr;
}
@media screen and (max-width: 1000px) { .form-block-container { grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); } }
@media screen and (max-width: 768px) { .form-block-container { padding: 0 30px; grid-template-areas: "tagline" "form" "promise"; grid-template-columns: minmax(0, 1fr); grid-template-rows: auto auto auto; } }
@media screen and (max-width: 540px) { .form-block-container { padding: 0 13px; } }

/* ---------- Hero headline ("shh": inspired by the logo) ---------- */
.hero { grid-area: tagline; padding-right: 24px; }
.hero-eyebrow {
    display: flex; align-items: center; gap: 12px; margin: 0 0 14px;
    font-size: 12px; line-height: 18px; font-weight: 600; letter-spacing: .28em; text-transform: uppercase; color: var(--accent);
}
.hero-eyebrow::before { content: ""; width: 34px; height: 6px; background: url("../images/brush.svg") no-repeat center / 100% 100%; flex: none; }   /* ink-brush stroke */
.hero-title { margin: 0; font-weight: 900; line-height: .98; letter-spacing: -.02em; color: #fff; }
:root[data-theme="light"] .hero-title { color: var(--text); }
html[lang="zh"] .hero-title { letter-spacing: .02em; }
.hero-line { display: block; }
.hero-fade { color: var(--accent); }   /* "in silence.": solid brand orange */
/* ---------- Home hero, two-column layout (769 px and up): text block matched to the form ----------
   Form column: rate row 40 px, 27 px gap, "I will send" box, rate line, "and receive" box = 202 px from the top of
   the send box to the bottom of the receive box (measured in EN / RU / ZH).
   - "SHH · NO SIGN-UP …" is centred on the 40 px rate row (18 px line, 11 px down).
   - Headline: as large as the column allows for that language (widest line: EN 4.91 em, RU 6.46 em, ZH 5.1 em),
     max 75 px; line spacing fills the rest, so the top of the "C" sits on the top of the send box and the baseline
     of "in silence." on the bottom of the receive box. Inter: cap height .736 em, ascent .972 em, descent .236 em,
     so the cap top sits (line-height / 2 - .368 em) below the line top.
   - "Simple & Smooth Trades." stays centred on the Start Exchange button (.promises-text). */
@media screen and (min-width: 769px) {
    .hero { margin-top: 11px; }
    .hero-eyebrow { margin-bottom: 0; }
    .hero-title {
        --hero-text-w: calc(min(50vw, 570px) - 61px);   /* width of the text column */
        font-size: min(75px, calc(var(--hero-text-w) / 4.95));
        line-height: calc((202px - .736em) / 2);
        margin-top: calc(.552em - 12.5px);   /* = 67 px (send box) - 29 px (eyebrow bottom) - cap offset */
        margin-left: -.035em;   /* optical: big letters carry ~2.5 px of side space; their ink now starts on the column edge */
    }
    html[lang="ru"] .hero-title { font-size: min(75px, calc(var(--hero-text-w) / 6.5)); margin-left: -.06em; }   /* Cyrillic capitals carry a little more side space */
    html[lang="zh"] .hero-title {   /* Chinese characters reach ~.11 em higher than a Latin capital: same span, own numbers */
        font-size: min(75px, calc(var(--hero-text-w) / 5.15));
        line-height: calc((202px - .846em) / 2);
        margin-top: calc(.70em - 12.5px);
        margin-left: 0;   /* Chinese characters have no side space to correct */
    }
}
/* Eyebrow stays on one line in the two-column layout, so "Crypto" lines up with the "I will send" box; tighter
   letter spacing on narrower screens. Up to 1240: the container only reaches its full 1140 px width there. */
@media screen and (min-width: 769px) and (max-width: 1240px) { .hero-eyebrow { letter-spacing: .14em; white-space: nowrap; } }
/* The brush stroke before it (46 px with its gap) shows wherever the line still fits: text column = 50vw - 61 px;
   line at .14em: EN 309 px, RU 392 px, ZH 207 px (+ a few px to spare). */
@media screen and (min-width: 769px) and (max-width: 845px) { .hero-eyebrow::before { display: none; } }
@media screen and (min-width: 846px) and (max-width: 1010px) { html[lang="ru"] .hero-eyebrow::before { display: none; } }
@media screen and (max-width: 768px) {   /* stacked: centred; gap eyebrow → headline equals headline → rate options */
    .hero { padding: 0; text-align: center; margin-bottom: 28px; }
    .hero-eyebrow { justify-content: center; margin-bottom: 20px; letter-spacing: .16em; }
    .hero-eyebrow::before { display: none; }   /* the dash would strand on its own line when the label wraps */
    .hero-title { font-size: clamp(40px, 11vw, 64px); }
}

/* "Simple & Smooth Trades." */
.promises-text { grid-area: promise; display: flex; align-items: center; }
.promises-text .success-icon { margin-right: 16px; }
.promises-text > span { color: white; font-size: 16px; }
:root[data-theme="light"] .promises-text > span { color: var(--text); }
@media screen and (min-width: 769px) { .promises-text { align-self: end; height: 63px; } }   /* = Start Exchange button */
@media screen and (max-width: 768px) { .promises-text { padding: 60px 30px; justify-content: center; } }
@media screen and (max-width: 540px) {
    .promises-text .success-icon { margin-right: 12px; width: 24px; }
    .promises-text .success-icon > img { width: 100%; height: auto; }
    .promises-text > span { font-size: 12px; }
}

/* Coin-pair pages (/swap/…): the home form block, with a plain heading and short lines instead of the "shh" hero. */
.pair-tagline { grid-area: tagline; padding-right: 48px; }
.pair-title { margin: 0 0 24px; font-size: clamp(30px, 3.4vw, 46px); font-weight: 900; line-height: 1.1; letter-spacing: -.01em; color: #fff; }
:root[data-theme="light"] .pair-title { color: var(--text); }
.pair-points { list-style: none; margin: 0; padding: 0; display: grid; gap: 12px; }
.pair-points li { position: relative; padding-left: 30px; color: #e4e4e4; font-size: 17px; line-height: 1.4; }
:root[data-theme="light"] .pair-points li { color: var(--text); }
.pair-points li::before { content: "✓"; position: absolute; left: 2px; top: 0; color: var(--accent); font-weight: 900; }
@media screen and (max-width: 768px) {
    .pair-tagline { padding: 0 0 28px; }
    .pair-title { text-align: center; font-size: clamp(26px, 7vw, 36px); }
    .pair-points { width: fit-content; max-width: 100%; margin: 0 auto; }
    .pair-points li { font-size: 15px; }
}
.pair-faq { margin-top: 40px; }

/* ---------- Exchange widget: rate cards, amount and coin boxes, rate line, button ---------- */
.main-from { grid-area: form; }
/* Floating / Fixed: compact versions of the Details-step picture cards (picture + name), with the green "i" on the right.
   The row is 40 px tall with a 27 px gap to the send box: the two-column hero below is measured on those numbers.
   (Chosen by the owner 2026-11-22 over the old radio buttons.) */
.page-home .home-rate-cards { display: flex; align-items: center; gap: 10px; margin: 0 0 27px; padding: 0; border: 0; }
.page-home .home-rate-cards label.rate-opt { flex: 0 1 auto; min-width: 0; min-height: 40px; box-sizing: border-box; flex-direction: row; align-items: center; gap: 8px; padding: 6px 12px 6px 8px; border-radius: 10px; }
.page-home .home-rate-cards .rate-art { width: 34px; height: 21px; }
.page-home .home-rate-cards .rate-text strong { font-size: 15px; white-space: nowrap; }
.page-home .home-rate-cards .rate-info { margin-left: auto; margin-right: 20px; position: relative; }
@media screen and (min-width: 769px) and (max-width: 1240px) { .page-home .home-rate-cards { flex-wrap: nowrap; } }   /* two cards + "i" on one row (long Russian names need it up to ~1240) */
/* Phones (480 px and less): the two cards stack, the "i" sits on the right between them.
   (One row needed 390 px in English, 540 in Russian: it ran off the screen on small phones.) */
@media screen and (max-width: 480px) {
    .page-home .home-rate-cards { display: grid; grid-template-columns: minmax(0, 1fr) auto; gap: 8px 12px; align-items: center; }
    .page-home .home-rate-cards label.rate-opt { grid-column: 1; justify-self: start; max-width: 100%; }
    .page-home .home-rate-cards .rate-info { grid-column: 2; grid-row: 1 / span 2; margin: 0 4px 0 0; }
}
.rate-choice input, .agree input { accent-color: var(--accent); }

/* ---------- Home: "i" (how rates work + all fees included) ---------- */
.rate-info { position: relative; display: inline-block; margin-left: auto; margin-right: 20px; }
.fees-chip {
    list-style: none; cursor: pointer; display: inline-flex; align-items: center; gap: 6px;
    justify-content: center; width: 26px; height: 26px; padding: 0; border-radius: 999px; font-size: 12px; font-weight: 600; color: #8fe3b7;
    background: var(--ok); border: 1px solid var(--ok);   /* icon-only green "i" */
}
.fees-chip::-webkit-details-marker { display: none; }
.fees-chip:hover, .rate-info[open] .fees-chip { background: #178a50; }
.chip-i { width: auto; height: auto; border-radius: 50%; background: transparent; color: #fff; font: 700 13px/26px Georgia, serif; text-align: center; }
@media screen and (max-width: 680px) {
    .fees-chip { position: relative; }
    .fees-chip::after { content: ""; position: absolute; inset: -9px; }   /* 44px tap area, same 26px look */
}

/* The popup. Tablets and up: compact 360px, right-aligned under the "i"; phones: spans the form width. */
.rate-info-pop {
    position: absolute; z-index: 15; top: calc(100% + 10px); right: 0; width: 360px; max-width: calc(100vw - 40px);
    background: #0d0f12; color: #fff; border: 1px solid rgba(255, 255, 255, .12); border-radius: 14px;
    box-shadow: 0 18px 40px rgba(0, 0, 0, .55); padding: 16px; text-align: left; font-size: 13px; line-height: 19px;
}
details.rate-info:not([open]) > .rate-info-pop { display: none; }   /* takes no room while closed (~265 px screens scrolled sideways) */
.pop-title { margin: 0 0 12px; font-size: 15px; font-weight: 700; color: #fff; display: grid; grid-template-columns: 1fr 1fr; align-items: center; gap: 10px; }   /* "How rates work" | "✓ All fees included", over the two cards */
.pop-title svg { fill: none; stroke: currentColor; stroke-width: 3; stroke-linecap: round; stroke-linejoin: round; }
.pop-rates { display: inline-flex; align-items: center; gap: 6px; }
.pop-rates svg { fill: none; stroke: var(--accent); stroke-width: 2.5; stroke-linecap: round; stroke-linejoin: round; }
.pop-fees { display: inline-flex; align-items: center; gap: 5px; color: #8fe3b7; }
.rate-cards { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; }
.rate-card { padding: 12px; border-radius: 10px; background: rgba(255, 255, 255, .05); border: 1px solid rgba(255, 255, 255, .08); }
.rate-card svg { display: block; margin-bottom: 8px; fill: none; stroke: var(--accent); stroke-width: 2; stroke-linecap: round; stroke-linejoin: round; }
.rate-card strong { display: block; margin-bottom: 4px; font-size: 13px; }
.rate-card .rate-sign { white-space: nowrap; }   /* same sign as the receive field: ≈ floating, = fixed */
.rate-card p { margin: 0; color: #aab1bc; font-size: 12px; line-height: 17px; }
/* With JS (app.js adds .fit): the popup covers the Send + Receive boxes exactly, cards fill the height,
   and a triangle points up to the "i". --tip-x / --tip-h are set by app.js. Tap anywhere on it to close. */
.rate-info-pop.fit { box-sizing: border-box; max-width: none; display: flex; flex-direction: column; border-radius: 4px; padding: 12px; cursor: pointer; }   /* same corners as the boxes, so none peek out */
.rate-info-pop.fit .pop-title { margin-bottom: 10px; }
.rate-info-pop.fit .rate-cards { flex: 1; }
.rate-info-pop.fit::before, .rate-info-pop.fit::after { content: ""; position: absolute; clip-path: polygon(50% 0, 100% 100%, 0 100%); }
.rate-info-pop.fit::before { left: calc(var(--tip-x) - 11px); bottom: 100%; width: 22px; height: var(--tip-h); background: rgba(255, 255, 255, .22); }   /* outline */
.rate-info-pop.fit::after { left: calc(var(--tip-x) - 10px); bottom: calc(100% - 1px); width: 20px; height: calc(var(--tip-h) - 1px); background: #0d0f12; }   /* fill, covers the popup's top border */
@media screen and (max-width: 480px) { .rate-info-pop { left: 0; width: auto; max-width: none; } }
@media screen and (max-width: 420px) {
    .pop-title, .rate-cards { grid-template-columns: 1fr; }
    /* Phones with JS: keep the two cards side by side, so the popup stays close to the boxes' height. */
    .rate-info-pop.fit .pop-title, .rate-info-pop.fit .rate-cards { grid-template-columns: 1fr 1fr; gap: 8px; }
    .rate-info-pop.fit .pop-title { font-size: 13px; }
    .rate-info-pop.fit .rate-card { padding: 10px; }
}

/* ---------- Amount + coin boxes ---------- */
.exchange-form { margin-bottom: 24px; }
/* The right padding clears the coin box (its width + 6 px inset + a small gap), so long amounts never hide behind "BTC". */
.exchange-input { position: relative; padding: 35px 176px 10px 24px; background-color: var(--field); border-radius: 4px; }
:root[data-theme="light"] .exchange-input { box-shadow: 0 0 0 1px var(--line), 0 4px 14px rgba(16, 24, 40, .06); }   /* white fields on a light background keep their shape */
.main-from .exchange-input > input[type="text"] { width: 100%; font-size: 20px; border: none; font-family: 'Inter'; background-color: var(--field); color: var(--text); }
.exchange-input-title { position: absolute; top: 16px; left: 24px; font-size: 12px; text-transform: uppercase; letter-spacing: 0.05em; font-weight: 600; color: #929EAA; }
/* Focus: ring around the whole white field. The text box itself runs under the coin box,
   which hid the right side of its own ring (only 3 sides showed). Only while typing the amount, not after a coin click. */
.exchange-input > input:focus, .exchange-input > input:focus-visible { outline: none; }
.exchange-input:has(> input:focus) { outline: 2px solid var(--accent); outline-offset: 0; }
/* Coin box: logo + ticker framed as one box, dropdown arrow on the right (two classes: must beat .picker-box's position) */
.exchange-input .exchange-input-search {
    position: absolute; top: 6px; right: 6px; bottom: 6px; width: 160px; padding-left: 10px; display: flex; justify-content: flex-start; align-items: center;
    border: 1px solid var(--line); border-radius: 4px; background-color: var(--soft); font-weight: 500; font-size: 20px; cursor: pointer;
}
.exchange-input-search::after { content: ""; position: absolute; right: 12px; top: calc(50% - 10px); display: block; width: 10px; height: 10px; border-right: 2px solid var(--text); border-bottom: 2px solid var(--text); transform: rotate(45deg); }
.exchange-input-search .currency-coin { flex: none; margin: 0 6px; height: 22px; width: 22px; opacity: 0; transition: opacity 0.1s linear; }   /* room from the box's left edge */
.exchange-input-search .currency-coin.visible { opacity: 1; }
/* Long tickers (USDTBSC, ETHARB…) must not run into the dropdown arrow. */
.exchange-input-search .coin-input {
    width: 100%; height: 100%; border: 0; background: transparent; padding-right: 26px;
    font-size: 15px; font-weight: 600; text-transform: uppercase; text-align: center; text-overflow: ellipsis; cursor: pointer;
}
.exchange-input-search .coin-input::placeholder { text-transform: none; font-weight: 400; font-size: 12px; }
.exchange-input-search .currency-coin + .coin-input { flex: 1; min-width: 0; text-align: left; }   /* logo + ticker side by side */
/* Coin box: no ring after a mouse click; a ring only when reached with the keyboard (app.js adds .kbd). */
.picker-input:focus, .picker-input:focus-visible { outline: none; }
.picker-input::selection { background: transparent; }   /* tabbing in selects the ticker; the box ring is enough */
.picker-box.kbd:focus-within { outline: 2px solid var(--accent); outline-offset: -1px; }   /* covers the whole box: logo + ticker + arrow */
@media screen and (max-width: 680px) { .exchange-input-search .coin-input { font-size: 16px; } }   /* iPhone zooms into fields under 16px */
@media screen and (max-width: 540px) {
    /* Same look, but the field itself is taller (22 → 38 px) so it is easy to tap. */
    .exchange-input { padding: 17px 139px 2px 12px; }
    .main-from .exchange-input > input[type="text"] { font-size: 16px; padding: 8px 0; }
    .exchange-input-title { left: 12px; top: 7px; }
    .exchange-input .exchange-input-search { padding-left: 8px; font-size: 16px; width: 125px; }
    .exchange-input-search::after { right: 14px; top: calc(50% - 8px); width: 8px; height: 8px; }
    .exchange-input-search .currency-coin { display: none; }
}
@media screen and (max-width: 360px) {   /* very narrow phones: a smaller coin box leaves room for the amount */
    .exchange-input { padding-right: 118px; }
    .exchange-input .exchange-input-search { width: 104px; }
}
/* Touch screens wider than phones (tablets show the desktop form): the amount fields swap box padding for field padding. */
@media (pointer: coarse) and (min-width: 541px) {
    .exchange-input { padding-top: 29px; padding-bottom: 4px; }
    .main-from .exchange-input > input[type="text"] { padding: 6px 0; }
}

/* ---------- Rate line between the boxes ----------
   Holds the rate OR a message. Grows with its message (the long "service can't be reached" text needs up to
   4 lines on small laptops); the dotted connector lines stretch to meet the dot. */
.exchange-sequence { margin-left: 50px; }
.sequence-item { position: relative; display: flex; align-items: center; justify-content: flex-start; min-height: 60px; padding: 8px 40px 8px 0; font-size: 14px; color: white; }
:root[data-theme="light"] .sequence-item { color: var(--muted); }
.sequence-item::before, .sequence-item::after { content: ""; position: absolute; display: block; width: 1px; height: calc(50% - 4px); left: -22px; background-color: #627080; }
.sequence-item::before { bottom: 0; }
.sequence-item::after { top: 0; }
.sequence-circule { width: 8px; height: 8px; border-radius: 50%; background-color: #627080; position: absolute; left: -25px; top: calc(50% - 4px); }
.coin-sequence { display: flex; align-items: center; min-height: 34px; margin-right: 20px; padding-right: 92px; line-height: 16px; }
.coin-sequence.is-error { color: #ffd27a; font-weight: 600; }
:root[data-theme="light"] .coin-sequence.is-error { color: var(--warn); }
/* Swap/lock group: the swap button's centre lines up exactly under the green "i" (both 33px from the box edge):
   right offset = 33 - half the button width. */
.seq-buttons { position: absolute; right: 15px; top: 50%; transform: translateY(-50%); display: flex; gap: 8px; }
.round-btn {
    position: relative; width: 36px; height: 36px; border-radius: 50%; border: 0; cursor: pointer; padding: 0;
    background: var(--round-bg); box-shadow: var(--shadow); display: inline-flex; align-items: center; justify-content: center; color: var(--round-icon);
}
/* Lock / swap on phones stay small (so the rate line keeps its room) but each gets an invisible ~42 px tap area. */
.round-btn::after { content: ""; position: absolute; inset: -7px; border-radius: 50%; }
.round-btn[hidden] { display: none; }
.round-btn img { width: 18px; }
.swap-btn:hover { transform: rotate(180deg); }
.lock-btn svg { fill: none; stroke: currentColor; stroke-width: 2; stroke-linecap: round; }
.lock-btn .icon-locked, .lock-btn.locked .icon-unlocked { display: none; }
.lock-btn.locked .icon-locked { display: block; }
.lock-btn.locked { background: var(--accent); color: #fff; }
.lock-btn:hover { color: var(--accent-dark); }
.lock-btn.locked:hover { color: #fff; background: var(--accent-hover); }
@media (prefers-reduced-motion: reduce) { .swap-btn:hover { transform: none; } }
@media screen and (max-width: 768px) {   /* buttons scale with the screen (36px crowded the 40px phone rate line) */
    .sequence-item { min-height: 40px; padding-top: 4px; padding-bottom: 4px; }
    .seq-buttons { right: 17px; }
    .round-btn { width: 32px; height: 32px; }
    .round-btn img { width: 16px; }
    .lock-btn svg { width: 15px; height: 15px; }
}
@media screen and (max-width: 540px) {
    .sequence-item { padding-right: 30px; font-size: 13px; }   /* was 8px: the rate / minimum-amount line was unreadable on phones */
    .coin-sequence { margin-right: 12px; }
}
@media screen and (max-width: 480px) {   /* the rate / minimum line may take two lines instead of spilling */
    .coin-sequence { padding-right: 84px; line-height: 15px; }
    .seq-buttons { right: 19px; gap: 12px; }
    .round-btn { width: 28px; height: 28px; }
    .round-btn img { width: 14px; }
    .lock-btn svg { width: 13px; height: 13px; }
}

/* Coin warning: small note above the exchange button (on the dark hero, same colour as the rate-line messages). */
.coin-warn { white-space: pre-line; margin: 4px 0 18px; padding-left: 2px; color: var(--warn); font-size: 14px; font-weight: 600; line-height: 1.4; }
.main-from .coin-warn { color: #ffd27a; }
:root[data-theme="light"] .main-from .coin-warn { color: var(--warn); }
.coin-warn[hidden] { display: none; }
/* No JavaScript only (inside <noscript>): "Receive exactly" field, since the receive box can't be typed in then. */
.nojs-exact { margin: 0 0 18px; }
.main-from .nojs-exact label { display: block; margin-bottom: 6px; font-size: 12px; font-weight: 600; letter-spacing: .05em; text-transform: uppercase; color: #929EAA; }
.main-from .nojs-exact input { display: block; width: 100%; height: 48px; padding: 0 16px; font: inherit; font-size: 16px; color: var(--text);
    border: 1px solid var(--line); border-radius: 4px; background: var(--field); }
.main-from .nojs-exact input:focus { outline: 2px solid var(--accent); outline-offset: -1px; }
.nojs-exact-hint { margin: 6px 0 0; font-size: 13px; line-height: 1.45; color: #b9c0c8; }
:root[data-theme="light"] .nojs-exact-hint { color: var(--muted); }
.trade-form .nojs-exact { margin: 14px 0 0; }

/* Start Exchange */
.exchange-form-btn-wrap { position: relative; }
.exchange-form-btn-wrap > * { z-index: 1; }
.exchange-form-btn { border: 0; cursor: pointer; font-family: inherit; }
.main-from .tabs-content .exchange-form-btn { display: block; width: 100%; padding: 17px; border: none; border-radius: 4px; color: white; font-weight: 600; font-size: 24px; position: relative; text-align: center; cursor: pointer; }
.main-from .tabs-content .exchange-form-btn.button-orange { background-color: #FF6B00; }
.exchange-form-btn .btn-arrow-icon { position: absolute; right: 14px; top: calc(50% - 14px); width: 24px; height: 28px; display: flex; align-items: center; }   /* arrow centred on the text, not sitting on the baseline */
.exchange-form-btn .btn-arrow-icon > img { width: 100%; height: auto; }
button[disabled].exchange-form-btn, button[disabled].btn { opacity: .5; cursor: not-allowed; }
@media screen and (max-width: 540px) {
    .main-from .tabs-content .exchange-form-btn { font-size: 16px; padding: 16px; }
    .exchange-form-btn .btn-arrow-icon { display: none; }
}

/* ---------- Home: 4 info cards ----------
   4 in a row on wide screens, 2 × 2 on tablets (never 3 + a lonely 4th), 1 column on phones. */
.info-section { width: 100%; max-width: 1140px; margin: 0 auto; padding: 40px var(--gap) 0; display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: var(--gap); }
.info-block { text-align: center; background: var(--dark) url("../images/seigaiha.svg") repeat bottom / 48px 24px; border-radius: 16px; box-shadow: var(--shadow); }
:root[data-theme="light"] .info-block { background: var(--card) url("../images/seigaiha-light.svg") repeat bottom / 48px 24px; }
.info-block .block-content { height: 100%; }
.info-block .block-image { padding: 24px 20px 4px; }
/* Icons are inline SVG: the light lines follow the theme. */
.info-block .block-image .image { color: #F7F7F7; }
:root[data-theme="light"] .info-block .block-image .image { color: var(--text); }
.info-block .block-image .image svg { display: block; width: 100%; height: 96px; }
.info-block .block-image svg path { fill: none; }
.info-block .block-image svg path[fill="#FF6B00"] { fill: #FF6B00; }
:root[data-theme="light"] .info-block .block-image .ic-hole { fill: var(--card); }
.info-block .block-text { padding: 12px 22px 24px; color: #F7F7F7; }
.info-block .block-text .primary-text { font-weight: 600; font-size: 18px; line-height: 26px; margin-bottom: 8px; }
.info-block .block-text .secondary-text { color: #B5BBC2; font-size: 14px; line-height: 22px; }
:root[data-theme="light"] .info-block .block-text { color: var(--text); }
:root[data-theme="light"] .info-block .block-text .secondary-text { color: var(--muted); }
@media screen and (max-width: 1000px) { .info-section { grid-template-columns: repeat(2, minmax(0, 1fr)); } }
@media screen and (max-width: 540px) { .info-section { grid-template-columns: 1fr; } }

/* ---------- Home: Recent trades + Popular pairs (black boxes in dark mode, white in light) ---------- */
.popular { max-width: 1100px; margin: 40px auto 0; padding: 20px; background: var(--dark) url("../images/seigaiha.svg") repeat bottom / 48px 24px; border-radius: 16px; box-shadow: var(--shadow); }
:root[data-theme="light"] .popular { background: var(--card) url("../images/seigaiha-light.svg") repeat bottom / 48px 24px; }
.popular:last-child { margin-bottom: 40px; }
.popular-title { font-size: 20px; font-weight: 700; color: #f4f5f7; margin: 0 0 12px; }
:root[data-theme="light"] .popular-title { color: var(--text); }
.pair-list, .recent-list { display: grid; grid-template-columns: repeat(auto-fill, minmax(min(250px, 100%), 1fr)); gap: 12px; }
.pair, .recent-list li { display: flex; align-items: center; min-width: 0; padding: 12px 14px; border-radius: var(--radius); border: 1px solid #2a2e35; background: #15171b; color: #eef0f3; font-weight: 600; font-size: 14px; }
.pair { gap: 8px; white-space: nowrap; }
.pair-others .pair-list { grid-template-columns: repeat(auto-fill, minmax(min(330px, 100%), 1fr)); }   /* "USDT (TRC20) → USDT (ERC20)" fits on one line */
.pair:hover, .pair:focus-visible { border-color: var(--accent); background: #1b1d22; }
.pair > span:not(.pair-arrow) { overflow: hidden; text-overflow: ellipsis; }
.pair img, .recent-list img { border-radius: 50%; background: #fff; }
.pair-arrow { color: var(--accent); margin: 0 2px; }
.recent-list li { gap: 6px; padding: 10px 14px; }
.recent-list li span { white-space: nowrap; }   /* keep "0.0003 BTC" on one line */
:root[data-theme="light"] .pair, :root[data-theme="light"] .recent-list li { background: var(--soft); border-color: var(--line); color: var(--text); }
:root[data-theme="light"] .pair:hover, :root[data-theme="light"] .pair:focus-visible { background: var(--card); border-color: var(--accent); }
@media screen and (max-width: 1140px) { .popular { margin-left: var(--gap); margin-right: var(--gap); } }

/* ========== 5. Shared components ========== */
/* ---------- Cards (content + trade pages) ---------- */
.content-page {
    max-width: 900px; margin: var(--gap) auto; padding: var(--gap);
    background: var(--card); border-radius: 16px; color: var(--text);
    line-height: 1.6; box-shadow: var(--shadow);
}
.content-title { font-size: 32px; font-weight: 900; margin-bottom: 20px; overflow-wrap: break-word; hyphens: auto; }   /* RU "конфиденциальности" is wider than a 260 px screen: break only then */
/* Ink-brush strokes under titles */
.content-title::after, .popular-title::after {
    content: ""; display: block; width: 84px; height: 9px; margin-top: 8px;
    background: url("../images/brush.svg") no-repeat left center / 100% 100%;
}
.popular-title::after { width: 64px; height: 7px; margin-top: 6px; }
.content-body h2 { font-size: 22px; font-weight: 700; margin: 28px 0 10px; }   /* legal pages (Terms, Privacy, AML) */
.content-body h3 { font-size: 20px; font-weight: 600; margin: 24px 0 8px; }
.content-body p { margin: 0 0 12px; }
.content-body a, .trade-page a, .coins-page a { color: var(--accent-dark); }
.content-body a.btn { text-decoration: none; }               /* buttons inside page text keep button colours */
.content-body a.btn-primary { color: #fff; }
.content-body a.btn-secondary { color: var(--text); }
.gtk-list strong, .content-body strong { font-weight: 600; color: var(--text); }   /* the reset makes <strong> normal weight */
/* FAQ-style questions only (content pages + trade page), never the phone menu, which is also a <details>. */
.content-page details { border-bottom: 1px solid var(--line); padding: 14px 0; }
.content-page summary { cursor: pointer; font-weight: 600; list-style: none; position: relative; padding-right: 28px; }
.content-page summary::-webkit-details-marker { display: none; }
.content-page summary::after { content: "+"; position: absolute; right: 4px; top: -2px; font-size: 20px; color: var(--accent); }
.content-page details[open] summary::after { content: "−"; }
.content-page details p { margin: 10px 0 0; color: var(--muted); }
.page-inner .content-page { margin-top: var(--gap); }
@media screen and (max-width: 540px) {
    .content-page { margin: 12px; padding: 16px; }
    .content-title { font-size: 24px; }
}
/* Small phones: three layers of padding (screen 12 + page 16 + box 20) left text only ~58% of the width. */
@media (max-width: 480px) { .content-page { padding-left: 12px; padding-right: 12px; } }

/* 404: ensō brush circle behind the number */
.not-found { text-align: center; }
.not-found .content-title {
    display: inline-flex; align-items: center; justify-content: center; width: 180px; height: 180px; margin: 0 auto 8px;
    background: url("../images/enso.svg") no-repeat center / contain; font-family: var(--mincho); font-size: 44px;
}
.not-found .content-title::after { display: none; }
.not-found .exchange-form-btn { display: inline-flex; padding: 12px 24px; color: #fff; border-radius: 8px; background: var(--accent); }

/* ---------- Buttons ---------- */
.btn { display: inline-block; padding: 12px 22px; border-radius: 8px; border: 0; cursor: pointer; font-family: inherit; font-size: 15px; font-weight: 600; text-decoration: none; }
.btn-primary { background: var(--accent); color: #fff; }
.btn-primary:hover, .btn-primary:focus { background: var(--accent-hover); }
.btn-secondary { background: var(--soft); color: var(--text); border: 1px solid var(--line); }
.btn-secondary:hover { background: var(--chip); }
.btn-arrow { display: inline-flex; align-items: center; gap: 10px; }   /* "Next →", same arrow as Start Exchange */
.btn-arrow img { flex: none; }
.form-actions { display: flex; gap: 12px; margin-top: 22px; }
.form-actions.reverse { flex-direction: row-reverse; justify-content: flex-end; }

/* ---------- Notices ---------- */
.notice { padding: 12px 16px; border-radius: 8px; margin-bottom: 20px; font-size: 14px; }
.notice-error { background: var(--err-bg); border: 1px solid var(--err-line); color: var(--err-text); }
.notice-warn { background: var(--warn-bg); border: 1px solid var(--warn-line); color: var(--warn-text); }
.notice-ok { background: var(--ok-bg); border: 1px solid var(--ok-line); color: var(--ok-text); }
.notice-sample { background: #ffcf6b; color: #172a3f; font-weight: 600; }
.sample-links a { color: #172a3f !important; margin-right: 6px; }
.sample-links a.current { text-decoration: underline; }

/* ---------- Coin picker (app.js) ---------- */
.picker-box { position: relative; cursor: pointer; scroll-margin-top: 12px; }   /* coin list opened on a phone: a little room above the field */
.picker-input { caret-color: transparent; }
.coin-panel {
    position: absolute; top: calc(100% + 6px); right: 0; z-index: 20; width: 340px; max-width: 86vw;
    background: var(--card); color: var(--text); border: 1px solid var(--line); border-radius: var(--radius); box-shadow: 0 12px 32px rgba(16, 24, 40, .18);
    padding: 10px; text-align: left; text-transform: none;
}
.coin-search {
    width: 100%; max-width: 100%; padding: 10px 12px; border: 1px solid var(--line); border-radius: 8px;
    font: inherit; font-size: 16px; color: var(--text); background: var(--soft); -webkit-appearance: none;   /* 16px: iPhone zooms into fields under 16px */
}
.coin-search:focus { outline: none; border-color: var(--accent); }
.coin-options { margin: 8px 0 0; max-height: 280px; overflow-y: auto; scrollbar-width: thin; }
.coin-options li { display: flex; gap: 10px; align-items: center; padding: 8px 10px; border-radius: 6px; cursor: pointer; font-size: 14px; }
.coin-options li img { flex: none; width: 20px; height: 20px; border-radius: 50%; background: var(--line); }   /* grey dot until the logo arrives */
.coin-options li img.ok { border-radius: 0; background: none; }
.coin-options li b { flex: none; min-width: min(84px, 100%); font-weight: 600; }   /* long tickers (HOODXSOL) widen it instead of running into the name */
.coin-options li span { flex: 1; min-width: 0; color: var(--muted); font-size: 13px; line-height: 1.3; }
.coin-options li:hover, .coin-options li:focus { background: var(--tint); outline: none; }
.coin-options li.selected { background: var(--tint-strong); }
.coin-options li.none { color: var(--muted); cursor: default; }
/* Small screens: the list spans the whole field instead of hanging off a small button near the edge
   (home form: app.js sizes the panel to the whole field when it opens). */
@media screen and (max-width: 480px) { .field .coin-panel { left: 0; right: 0; width: auto; max-width: none; } }

/* ---------- Copy fields + buttons (trade page, support) ---------- */
.mono, .copy-value { font-family: ui-monospace, SFMono-Regular, Consolas, monospace; }
.copy-field { margin-bottom: 14px; }
.copy-row { display: flex; gap: 8px; align-items: stretch; }
/* Addresses, hashes and IDs wrap at every width (two narrow columns on tablets / small laptops showed only half),
   so people can check every character; every field keeps the same look. */
.copy-value {
    flex: 1; min-width: 0; display: block; padding: 10px 12px; border-radius: 8px; background: var(--card);
    border: 1px solid var(--line); color: var(--text); font-size: 13px; line-height: 20px;
    white-space: normal; overflow-wrap: anywhere; word-break: break-all; scrollbar-width: none; user-select: all; -webkit-user-select: all; cursor: text;
}
.copy-value.inline { display: inline; padding: 2px 6px; white-space: nowrap; overflow-wrap: normal; word-break: normal; overflow-x: auto; }
.copy-value:focus { border-color: var(--accent); outline: none; }
.copy-value::-webkit-scrollbar { display: none; }
.btn-copy {
    flex: none; width: 42px; border-radius: 8px; border: 1px solid var(--line); background: var(--card); color: var(--muted);
    cursor: pointer; display: inline-flex; align-items: center; justify-content: center;
}
.btn-copy[hidden] { display: none; }
.btn-copy:hover { color: #fff; background: var(--accent); border-color: var(--accent); }
.btn-copy svg { fill: none; stroke: currentColor; stroke-width: 2; stroke-linecap: round; stroke-linejoin: round; }
.btn-copy .icon-done, .btn-copy.copied .icon-copy { display: none; }
.btn-copy.copied .icon-done { display: block; }
.btn-copy.copied { color: #fff; background: var(--ok); border-color: var(--ok); }
/* Trade link row: [link] [bookmark] [copy]; bookmark is the same 42px icon button as Copy.
   Copy is the last button in every row, so all Copy buttons line up on the right. */
.btn-bookmark { color: var(--muted); text-decoration: none; }
.bookmark-hint { margin: -6px 0 10px; }

/* ---------- Form fields ---------- */
.field-error { color: var(--err); font-size: 13px; margin: 6px 0 0; }
.field-hint { color: var(--muted); font-size: 13px; margin: 6px 0 0; }
.field-hint.warn { color: var(--warn); background: var(--warn-bg); padding: 8px 10px; border-radius: 6px; }
.req-mark { color: var(--accent-dark); font-weight: 600; }   /* "· required" next to a field label (refund address for privacy coins) */
.onion-address { display: inline-block; margin-top: 4px; padding: 4px 8px; border-radius: 6px; background: var(--soft); color: var(--text); font-size: 13px; overflow-wrap: anywhere; user-select: all; }   /* FAQ: whole address selects with one click */

/* ---------- Good to know (confirm step, trade page, FAQ) ---------- */
.content-page .gtk {
    margin-top: 32px; padding: 20px; border-radius: 16px;
    background: linear-gradient(180deg, var(--tint-soft) 0%, var(--soft) 120px); border: 1px solid var(--tint-line);
}
.gtk-head { display: flex; align-items: center; gap: 14px; margin-bottom: 16px; }
.gtk-icon {
    flex: none; width: 44px; height: 44px; border-radius: 12px; display: inline-flex; align-items: center; justify-content: center;
    background: var(--accent); box-shadow: 0 6px 16px rgba(255, 107, 0, .3);
}
.gtk-icon svg { fill: none; stroke: #fff; stroke-width: 2; stroke-linecap: round; stroke-linejoin: round; }
.gtk-icon.gtk-icon-fill svg, .gtk-icon.gtk-icon-fill svg path { fill: #fff; stroke: none; }
/* Quiet outline version (thin orange frame, black line bulb), so it doesn't compete with the orange Next button. */
.gtk-icon.gtk-icon-line { background: var(--field); border: 1.5px solid var(--accent); box-shadow: none; }
.gtk-icon.gtk-icon-line svg { stroke: var(--text); stroke-width: 1.6; }
.content-page .gtk h3 { margin: 0; font-size: 20px; font-weight: 700; }
.gtk-sub { margin: 2px 0 0; font-size: 13px; color: var(--muted); }
/* Each question: a white card with a number badge and a chevron */
.gtk-list { counter-reset: gtk; display: flex; flex-direction: column; gap: 8px; }
.content-page .gtk details {
    counter-increment: gtk; padding: 0; border: 1px solid var(--line); border-radius: 12px; background: var(--card);
    transition: border-color .15s, box-shadow .15s;
}
.content-page .gtk details:hover { border-color: var(--tint-line-strong); }
.content-page .gtk details[open] { border-color: var(--accent); box-shadow: 0 6px 18px rgba(255, 107, 0, .10); }
.content-page .gtk summary { display: flex; align-items: center; gap: 12px; padding: 14px 44px 14px 14px; font-size: 15px; line-height: 21px; }
.content-page .gtk summary::before {
    content: counter(gtk); flex: none; width: 26px; height: 26px; border-radius: 50%;
    display: inline-flex; align-items: center; justify-content: center;
    background: var(--tint); color: var(--accent-dark); font-size: 13px; font-weight: 700;
}
.content-page .gtk details[open] summary::before { background: var(--accent); color: #fff; }
.content-page .gtk summary::after {   /* chevron instead of + / − */
    content: ""; position: absolute; right: 18px; top: 50%; width: 8px; height: 8px; margin-top: -6px;
    border-right: 2px solid var(--muted); border-bottom: 2px solid var(--muted); transform: rotate(45deg); transition: transform .2s;
}
.content-page .gtk details[open] summary::after { transform: rotate(-135deg); margin-top: -2px; border-color: var(--accent); }
.content-page .gtk details[open] summary { color: var(--accent-dark); }
.content-page .gtk details > :not(summary) { margin: 0 16px 0 52px; }
.content-page .gtk details > :not(summary):last-child { padding-bottom: 16px; }
.content-page .gtk details p { margin-top: 0; margin-bottom: 8px; color: var(--muted); font-size: 14px; line-height: 21px; }
.content-page .gtk details[open] > :not(summary) { animation: gtk-in .2s ease-out; }
@keyframes gtk-in { from { opacity: 0; transform: translateY(-4px); } }
.content-page .gtk .tips-list { margin: 4px 16px 10px 52px; }
.content-page .gtk .tips-list li { font-size: 14px; line-height: 21px; color: var(--muted); margin: 4px 0; }
/* FAQ page: the accordion with no panel around it */
.content-page .gtk.gtk-plain { margin-top: 0; padding: 0; background: none; border: 0; }
.content-page .gtk-plain h3 { margin: 22px 0 4px; font-size: 13px; font-weight: 700; letter-spacing: .08em; text-transform: uppercase; color: var(--muted); }
.content-page .gtk-plain h3:first-child { margin-top: 0; }
.content-page .gtk-plain details strong { color: var(--text, #111); }
@media (prefers-reduced-motion: reduce) { .content-page .gtk details[open] > :not(summary) { animation: none; } .content-page .gtk summary::after { transition: none; } }
@media screen and (max-width: 540px) {
    .content-page .gtk { padding: 14px; }
    .content-page .gtk details > :not(summary), .content-page .gtk .tips-list { margin-left: 16px; }
}

/* Tick / warning / cross lists */
.tips-list { list-style: none; padding: 0; margin: 0; }
.tips-list li { position: relative; padding-left: 24px; margin: 6px 0; font-size: 14px; line-height: 20px; color: var(--text); }
.tips-list li::before { position: absolute; left: 0; top: 0; font-weight: 700; }
.tips-list.ok li::before { content: "✓"; color: var(--ok); }
.tips-list.warn li::before { content: "!"; color: var(--warn); left: 5px; }
.tips-list.cancel li::before { content: "✕"; color: var(--err); }

/* ---------- Write-a-review / mailing-list panel (Reviews page, finished trade, Support) ---------- */
.review-box {
    margin-top: 32px; padding: 20px; border-radius: 16px;
    background: linear-gradient(180deg, var(--tint-soft) 0%, var(--soft) 120px); border: 1px solid var(--tint-line);
}
.content-page .review-box h3 { margin: 0 0 14px; font-size: 20px; font-weight: 700; }
.content-page .review-box .gtk-head h3 { margin: 0; }
.review-form .field { margin-bottom: 14px; }
.review-form label:not(.stars-row label) { display: block; margin-bottom: 6px; font-weight: 600; font-size: 14px; }
.review-form input:not([type=radio]):not([type=hidden]) {
    display: block; width: 100%; height: 46px; padding: 0 12px; font: inherit;
    border: 1px solid var(--line); border-radius: 8px; background: var(--field);
}
.review-form textarea { width: 100%; resize: vertical; font: inherit; padding: 12px; border: 1px solid var(--line); border-radius: 8px; background: var(--field); color: var(--text); }
.review-form input:focus, .review-form textarea:focus { outline: 2px solid var(--accent); outline-offset: -1px; }
.review-form-row { display: grid; grid-template-columns: repeat(auto-fit, minmax(min(220px, 100%), 1fr)); gap: 0 16px; }
.review-form .form-actions { display: flex; align-items: center; gap: 14px; flex-wrap: wrap; margin: 4px 0 0; }
.review-form .form-actions .field-hint { margin: 0; }
.stars-input { border: 0; padding: 0; margin: 0 0 12px; }
.stars-input legend { padding: 0; margin-bottom: 4px; font-weight: 600; font-size: 14px; }
.stars-row { display: inline-flex; flex-direction: row-reverse; gap: 2px; }   /* HTML is 5..1, shown 1..5 */
.stars-row input { position: absolute; opacity: 0; width: 1px; height: 1px; }
.stars-row label { cursor: pointer; padding: 2px; line-height: 0; }
.stars-row label svg { fill: var(--star-off); transition: fill .15s, transform .15s; }
.stars-row:hover label svg { fill: var(--star-off); }
.stars-row input:checked ~ label svg, .stars-row label:hover svg, .stars-row label:hover ~ label svg { fill: var(--accent); }
.stars-row label:hover svg { transform: scale(1.12); }
.stars-row input:focus-visible + label { outline: 2px solid var(--accent); border-radius: 6px; }
@media (prefers-reduced-motion: reduce) { .stars-row label svg { transition: none; } }
@media (max-width: 480px) {
    .review-box { padding: 14px; }
    .review-box .gtk-head { gap: 10px; }
}
/* Finished trade: optional mailing-list box under the review box */
.news-box { margin-top: 18px; }
.news-optional { display: inline-block; margin-left: 6px; padding: 1px 8px; border-radius: 99px; background: var(--soft); border: 1px solid var(--line); color: var(--muted); font-size: 12px; font-weight: 600; vertical-align: 2px; }
.news-form { display: flex; gap: 8px; }
.news-form input[type=email] { flex: 1; min-width: 0; height: 44px; padding: 0 12px; font: inherit; border: 1px solid var(--line); border-radius: 8px; background: var(--field); color: var(--text); }
.news-form input[type=email]:focus { outline: 2px solid var(--accent); outline-offset: -1px; }
.news-form .btn { white-space: nowrap; }
.news-promise { margin-top: 10px; }
/* Phones: field above the button (it kept "flex: 1" and shrank to 22px high when stacked). */
@media (max-width: 480px) { .news-form { flex-direction: column; } .news-form input[type=email] { flex: none; } }

/* ---------- Pager (coins + reviews): quiet pill buttons, not bare blue links ---------- */
.pager { display: flex; align-items: center; justify-content: center; gap: 18px; margin: 22px 0 0; font-size: 14px; }
.pager span { color: var(--muted); font-variant-numeric: tabular-nums; }
.pager a {
    display: inline-flex; align-items: center; gap: 6px; padding: 8px 16px; border: 1px solid var(--line); border-radius: 999px;
    background: var(--card); color: var(--text) !important; font-weight: 600; text-decoration: none; transition: border-color .15s, color .15s, background .15s;
}
.pager a:hover, .pager a:focus-visible { border-color: var(--accent); color: var(--accent-dark) !important; background: var(--tint-soft); }

/* ---------- Stars (5 from one local svg mask; --rating fills them, half stars work) ---------- */
.stars {
    display: inline-block; width: 90px; height: 18px; vertical-align: -3px;
    background: linear-gradient(90deg, var(--accent) calc(var(--rating) * 20%), var(--line) 0);
    -webkit-mask: url("../images/star.svg") repeat-x left center / 18px 18px;
            mask: url("../images/star.svg") repeat-x left center / 18px 18px;
}

/* ========== 6. Trade flow ========== */
.trade-page { max-width: 980px; }
.trade-form .field { margin-bottom: 18px; }
.trade-form label, .copy-label { display: block; font-size: 13px; color: var(--muted); margin-bottom: 6px; font-weight: 500; }
.trade-form input[type=text], .trade-form input:not([type]), .trade-form input[inputmode] {
    width: 100%; padding: 12px 14px; border-radius: 8px; border: 1px solid var(--line);
    background: var(--card); color: var(--text); font-family: inherit; font-size: 15px; transition: border-color .15s, box-shadow .15s;
}
.trade-form input:focus { border-color: var(--accent); box-shadow: 0 0 0 3px rgba(255, 107, 0, .2); outline: none; }
.trade-form input[readonly]:not(.picker-input) { background: var(--soft); color: var(--muted); cursor: not-allowed; }   /* locked by a payment link (the JS coin picker is also readonly, but looks normal) */
.coin-field { text-transform: uppercase; font-weight: 600; cursor: pointer; }
.coin-field::placeholder { text-transform: none; font-weight: 400; }
/* Coin logo inside the Details / payment-link coin fields (app.js places it). */
.field-coin { position: absolute; left: 12px; width: 22px; height: 22px; pointer-events: none; }
.field-coin:not(.visible) { opacity: 0; }
.trade-form .field-coin + .picker-input { padding-left: 44px; }
.pair-grid { display: grid; grid-template-columns: 2fr 1fr; gap: 0 16px; }
.pair-grid.coin-first { grid-template-columns: 1fr 2fr; }   /* Details step: coin, then amount */
.estimate { display: block; padding: 12px 14px; border-radius: 8px; background: var(--tint); color: var(--text); font-size: 18px; font-weight: 600; min-height: 46px; }
/* Details step: receive amount as a field (editable with JS) with the refresh icon inside, on the right. */
.estimate-row { position: relative; }
.trade-form input.estimate { border: 1px solid transparent; background: var(--tint); font-size: 18px; font-weight: 600; padding-right: 52px; cursor: text; }
.trade-form input.estimate[readonly] { cursor: default; color: var(--text); }
.trade-form input.estimate:focus { border-color: var(--accent); }
.refresh-btn {
    position: absolute; top: 50%; right: 8px; transform: translateY(-50%); width: 34px; height: 34px; padding: 0;
    display: flex; align-items: center; justify-content: center; border: 0; border-radius: 50%;
    background: var(--field); color: var(--accent); cursor: pointer; box-shadow: 0 1px 3px rgba(16, 24, 40, .12);
}
.refresh-btn svg { fill: none; stroke: currentColor; stroke-width: 2.2; stroke-linecap: round; stroke-linejoin: round; }
.refresh-btn:hover { background: var(--accent); color: #fff; }
.refresh-btn:hover svg { transform: rotate(90deg); transition: transform .3s; }
@media screen and (max-width: 640px) { .pair-grid, .pair-grid.coin-first { grid-template-columns: 1fr; } }

/* ---------- Details step: Floating / Fixed as two picture cards ----------
   Floating = water seen from above: banks and fast streaks (moving while chosen); Fixed = an outline rock with wind
   lines arching over and under it. The radio stays (keyboard, screen readers, no JS) but is hidden; the card shows the choice. */
.rate-choice { position: relative; border: 0; padding: 0; margin: 0 0 18px; display: grid; grid-template-columns: 1fr 1fr; gap: 12px; flex-wrap: wrap; }
.rate-choice legend { grid-column: 1 / -1; font-size: 13px; color: var(--muted); margin-bottom: 8px; }
.rate-choice label.rate-opt {
    position: relative; display: flex; align-items: center; gap: 16px; padding: 14px 16px; border-radius: 14px; cursor: pointer;
    color: var(--text); font-size: 14px; border: 1.5px solid var(--line); background: var(--soft); transition: border-color .2s, background .2s, box-shadow .2s;
}
.rate-opt input[type=radio] { position: absolute; opacity: 0; width: 1px; height: 1px; pointer-events: none; }
.rate-choice label.rate-opt:hover { border-color: var(--tint-line-strong); }
.rate-choice label.rate-opt:has(input:checked) { border-color: var(--accent); background: var(--tint); box-shadow: 0 6px 18px rgba(255, 107, 0, .12); }
.rate-opt:has(input:focus-visible) { outline: 2px solid var(--accent); outline-offset: 2px; }
.rate-opt:has(input:disabled) { cursor: default; opacity: .6; }
.rate-art { flex: none; width: 64px; height: 40px; fill: none; stroke: var(--ink); stroke-linecap: round; stroke-linejoin: round; color: var(--ink); transition: stroke .2s; }
.rate-opt:has(input:checked) .rate-art { stroke: var(--accent); }
.rate-art .f1 { stroke-width: 2.6; }
.rate-art .f2 { stroke-width: 2; opacity: .75; }
.rate-art .f3 { stroke-width: 1.4; opacity: .5; }
.rate-art .flow { stroke-dasharray: 22 6; }
.rate-opt:has(input:checked) .flow { animation: rate-flow 3.2s linear infinite; }
.rate-opt:has(input:checked) .f2 { animation-duration: 4.2s; }
.rate-opt:has(input:checked) .f3 { animation-duration: 5.4s; }
@keyframes rate-flow { to { stroke-dashoffset: -56; } }
.rate-art .rock { stroke-width: 2.2; fill: var(--field); }   /* light: white as before; dark: card-dark */
.rate-art .crack { stroke-width: 1.5; opacity: .8; }
.rate-text { display: flex; flex-direction: column; gap: 2px; min-width: 0; }
.rate-text strong { font-size: 15px; font-weight: 700; color: var(--text); }
.rate-text small { font-size: 12.5px; color: var(--muted); }
@media (max-width: 480px) { .rate-choice label.rate-opt { flex-direction: column; align-items: flex-start; gap: 8px; padding: 12px; } }
@media (prefers-reduced-motion: reduce) { .rate-opt .flow { animation: none !important; } }
/* The home "How rates work" popup appears while hovering (or tabbing to) Floating / Fixed.
   Hover devices only, so a tap on a phone just picks the option. */
.rate-choice > .rate-info-pop { display: none; top: calc(100% + 10px); left: 0; right: auto; width: 440px; max-width: 100%; }
.rate-choice > .rate-info-pop::before {   /* small pointer up to the options */
    content: ""; position: absolute; top: -7px; left: 40px; width: 12px; height: 12px; background: #0d0f12;
    border-left: 1px solid rgba(255, 255, 255, .12); border-top: 1px solid rgba(255, 255, 255, .12); transform: rotate(45deg);
}
.rate-choice:has(input:focus-visible) > .rate-info-pop { display: block; }
/* Hovering / tabbing to Fixed: the popup opens under Fixed (right side), pointer on the right. */
.rate-choice:has(.rate-opt-fixed:hover) > .rate-info-pop, .rate-choice:has(.rate-opt-fixed input:focus-visible) > .rate-info-pop { left: auto; right: 0; }
.rate-choice:has(.rate-opt-fixed:hover) > .rate-info-pop::before, .rate-choice:has(.rate-opt-fixed input:focus-visible) > .rate-info-pop::before { left: auto; right: 40px; }
@media (hover: hover) { .rate-choice:has(label:hover) > .rate-info-pop { display: block; } }

/* ---------- Form steps (Details → Confirm → Send & Track) + trade progress ----------
   upcoming: kanji numeral 一…五 · done: orange circle with the icon · current: icon in a turning ensō
   links: ink-brush stroke when reached, ink dots when not · finished: ends on the logo */
.progress-wrap { --steps: 5; margin: 6px 0 24px; }
.progress { display: flex; }
.step { flex: 1; position: relative; display: flex; flex-direction: column; align-items: center; text-align: center; gap: 10px; min-width: 0; }
.step + .step::before {   /* link from the previous step to this one */
    content: ""; position: absolute; top: 20px; right: calc(50% + 28px); width: calc(100% - 56px); height: 4px;
    background: radial-gradient(circle, var(--dots) 1.2px, transparent 1.6px) left center / 9px 4px repeat-x;
}
.step.done::before, .step.current::before { height: 8px; top: 18px; background: url("../images/brush.svg") no-repeat center / 100% 100%; }
/* Same small gap (6px) between every line and the circle or turning ring at both of its ends. */
.step + .step.current::before { right: calc(50% + 36px); width: calc(100% - 64px); }
.step.current + .step::before { width: calc(100% - 64px); }
.step-dot {
    position: relative; z-index: 1; width: 44px; height: 44px; display: inline-flex; align-items: center; justify-content: center;
    border-radius: 50%; background: var(--card); border: 1.5px solid var(--line); color: var(--faint);
}
.step-dot svg { fill: none; stroke: currentColor; stroke-width: 2; stroke-linecap: round; stroke-linejoin: round; }
.step-kanji { font-family: var(--mincho); font-size: 18px; line-height: 1; color: var(--faint); }
.step.done .step-dot { background: var(--accent); border-color: var(--accent); color: #fff; }   /* done: same icon, white in an orange circle */
.step.done .step-kanji { color: #fff; font-weight: 700; }
.step.current .step-dot { background: var(--card); border-color: transparent; color: var(--accent); }
.step.current .step-dot::after {   /* turning ring: perfectly round, fading into an open gap like an ensō */
    content: ""; position: absolute; inset: -9px; border-radius: 50%;
    background: conic-gradient(from 30deg, transparent 0 6%, var(--ring, var(--accent)) 45%, var(--ring, var(--accent)));
    -webkit-mask: radial-gradient(farthest-side, transparent calc(100% - 3.5px), #000 calc(100% - 3px));
            mask: radial-gradient(farthest-side, transparent calc(100% - 3.5px), #000 calc(100% - 3px));
    animation: enso-turn 6s linear infinite;
}
@keyframes enso-turn { to { transform: rotate(360deg); } }
/* Arrowhead on the leading end of the turning ring (at 30°, where the conic gradient ends), turning with it.
   --rr = centre of the circle to the middle of the ring (padding box / 2 + ring inset - 1.75px); set again where the ring size changes. */
.step.current .step-dot::before {   /* open arrowhead (">") riding the ring */
    --rr: 27.8px;
    content: ""; position: absolute; z-index: 1; left: 50%; top: 50%; width: 8px; height: 8px; margin: -4px 0 0 -4px; box-sizing: border-box;   /* pseudo-elements don't get * { box-sizing } */
    border-top: 3px solid var(--ring, var(--accent)); border-right: 3px solid var(--ring, var(--accent)); border-radius: 0 2px 0 0;
    transform: rotate(30deg) translateY(calc(var(--rr) * -1)) translateX(-2px) rotate(45deg); animation: enso-arrow 6s linear infinite;
}
@keyframes enso-arrow {
    from { transform: rotate(30deg) translateY(calc(var(--rr) * -1)) translateX(-2px) rotate(45deg); }
    to { transform: rotate(390deg) translateY(calc(var(--rr) * -1)) translateX(-2px) rotate(45deg); }
}
/* Over and no longer updating (finished, failed, refunded, expired): the ensō closes into a full, still ring, no arrow. */
.step.still .step-dot::after, .step.current.final .step-dot::after { animation: none; background: var(--ring, var(--accent)); }
.step.current.final .step-dot::before, .step.still .step-dot::before { content: none; }
.step.current.final .step-dot { background: #fff; padding: 0; overflow: visible; }   /* finished: the site logo */
.step-logo { width: 100%; height: 100%; border-radius: 50%; object-fit: cover; }
.step-label { font-size: 12px; line-height: 16px; color: var(--muted); }
.step.done .step-label { color: var(--text); }
.step.current .step-label { color: var(--accent-dark); font-weight: 700; }
/* One caption under the bar, with a small pointer at the current step */
.progress-caption {
    position: relative; margin: 22px 0 0; padding: 12px 16px; border-radius: 12px;
    background: var(--soft); border: 1px solid var(--line); font-size: 15px; line-height: 22px;
}
.progress-caption::before {
    content: ""; position: absolute; top: -7px; width: 12px; height: 12px; transform: rotate(45deg);
    left: calc((var(--cur) + .5) * 100% / var(--steps) - 6px);
    background: var(--soft); border-left: 1px solid var(--line); border-top: 1px solid var(--line);
}
.progress-caption .live-dot { display: inline-block; margin-left: 6px; }
.progress-caption .live-dot::before { margin-right: 0; }
/* Failed / refunded / expired / verifying: one centred status box, same caption as the progress bar */
.progress-wrap.single .progress { justify-content: center; }
.progress-wrap.single .step { flex: 0 0 auto; }
.progress-wrap.single .step-dot svg { width: 22px; height: 22px; }
.progress-wrap.single .step-label { font-size: 14px; }
.progress-wrap.single .progress-caption { text-align: center; }
.progress-wrap.single .progress-caption::before { left: calc(50% - 6px); }
.outcome-failed, .outcome-expired { --ring: var(--err); }
.outcome-refunded { --ring: var(--warn); }
.outcome-failed .step-label, .outcome-expired .step-label { color: var(--err) !important; }
.outcome-refunded .step-label { color: var(--warn) !important; }
.progress-wrap[class*="outcome-"] .step.current .step-dot { color: var(--ring, var(--accent)); }
/* Form steps: the trade progress bar, a size smaller */
.form-steps { margin: 4px 0 30px; }
.form-steps .step-dot { width: 38px; height: 38px; }
.form-steps .step + .step::before { top: 17px; right: calc(50% + 25px); width: calc(100% - 50px); }
.form-steps .step.done::before, .form-steps .step.current::before { top: 15px; }
.form-steps .step + .step.current::before { right: calc(50% + 31px); width: calc(100% - 56px); }
.form-steps .step.current + .step::before { width: calc(100% - 56px); }
.form-steps .step.current .step-dot::after { inset: -7px; }
.form-steps .step.current .step-dot::before { --rr: 22.8px; }
.form-steps .step.current .step-kanji { color: var(--accent); font-weight: 700; }
.form-steps .step-label { font-size: 13px; }
@media (prefers-reduced-motion: reduce) { .step.current .step-dot::after, .step.current .step-dot::before { animation: none; } }
@media (max-width: 680px) { .progress-wrap .step-label { font-size: 12px; } }
@media screen and (max-width: 540px) {   /* circles shrink on small screens (the single status circle too) */
    .step-dot, .progress-wrap.single .step-dot { width: 34px; height: 34px; }
    .step-dot svg, .progress-wrap.single .step-dot svg { width: 16px; height: 16px; }
    .step-kanji { font-size: 14px; }
    .step + .step::before { top: 15px; right: calc(50% + 22px); width: calc(100% - 44px); }
    .step.done::before, .step.current::before { top: 13px; }
    .step + .step.current::before { right: calc(50% + 28px); width: calc(100% - 50px); }
    .step.current + .step::before { width: calc(100% - 50px); }
    .step.current .step-dot::after { inset: -7px; }
    .step.current .step-dot::before { --rr: 20.8px; }
    .step-label { font-size: 10px; line-height: 13px; }
    .progress-caption { font-size: 14px; }
}
/* Narrow screens: five labels can't fit side by side. Only the current step keeps its label (wider, may wrap);
   the first and last ones hug the edge so they aren't cut off. The caption below says what is happening. */
@media screen and (max-width: 480px) {
    .progress-wrap:not(.single) .step:not(.current) .step-label { visibility: hidden; }
    .progress-wrap:not(.single) .step.current .step-label { width: 90px; font-size: 11px; }
    .progress-wrap:not(.single) .step.current:first-child .step-label { align-self: flex-start; text-align: left; }
    .progress-wrap:not(.single) .step.current:last-child .step-label { align-self: flex-end; text-align: right; }
}

/* ---------- Confirm step ---------- */
.summary { display: grid; grid-template-columns: max-content 1fr; gap: 12px 24px; margin-bottom: 24px; padding: 20px; background: var(--soft); border-radius: var(--radius); }
.summary dt { color: var(--muted); font-size: 14px; }
.summary dd { margin: 0; word-break: break-all; }
.summary dd.big { font-size: 20px; font-weight: 600; }
.summary dd.addr { font-size: 18px; font-weight: 600; line-height: 1.5; letter-spacing: .02em; color: var(--text); }   /* addresses: big enough to check character by character */
.agree { display: flex; gap: 8px; align-items: flex-start; color: var(--text) !important; font-size: 14px !important; }
.trade-form label.agree { display: flex; align-items: center; gap: 10px; }   /* beats the generic ".trade-form label { display: block }" */
.trade-form label.agree input { flex: none; width: 18px; height: 18px; margin: 0; cursor: pointer; }
.trade-page > .exact-note, .trade-page > .rate-hold { margin: 0 0 20px; }   /* space between the fixed-amount / rate-hold note and "I agree" */
@media screen and (max-width: 640px) {
    .summary { grid-template-columns: 1fr; gap: 4px; }
    .summary dd { margin-bottom: 10px; }
}

/* ---------- Trade page ---------- */
.live-dot::before {
    content: ""; display: inline-block; width: 8px; height: 8px; border-radius: 50%; background: var(--ok);
    margin-right: 8px; vertical-align: middle; animation: pulse 1.6s ease-in-out infinite;
}
@keyframes pulse { 50% { opacity: .25; } }
.live-dot.dot-still::before { animation: none; }               /* trade over: steady dot */
.live-dot.dot-warn::before { background: #e0a800; }            /* verifying (blinks), refunded (steady) */
.live-dot.dot-bad::before { background: #d93a3a; }             /* failed, expired */
@media (prefers-reduced-motion: reduce) { .live-dot::before { animation: none; } }
.trade-grid { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); /* minmax: columns may shrink below the one-line fields */ gap: var(--gap); margin-bottom: var(--gap); }
.trade-box { min-width: 0; background: var(--soft); border: 1px solid var(--line); border-radius: var(--radius); padding: var(--gap); }
.trade-box h3 { margin: 0 0 14px; font-size: 18px; font-weight: 600; display: flex; align-items: center; gap: 8px; }
.box-icon { width: 28px; height: 28px; border-radius: 50%; background: var(--accent); color: #fff; display: inline-flex; align-items: center; justify-content: center; font-size: 15px; }
.box-coin { margin-left: auto; display: inline-flex; align-items: center; gap: 6px; font-size: 15px; color: var(--muted); }
.box-coin img { border-radius: 50%; background: #fff; }
.explorer { display: inline-block; margin-top: 6px; font-size: 13px; }
.qr { display: block; background: #fff; border-radius: 10px; margin: 4px 0 14px; border: 1px solid var(--line); padding: 6px; }
.trade-meta { margin-bottom: var(--gap); }
.trade-faq { margin-top: 32px; }   /* breathing room below the confirm buttons / trade details */
.trade-faq h3 { font-size: 20px; font-weight: 600; margin: 8px 0 4px; }
/* Good to know: list items read like the paragraphs around them (same size and colour). */
.trade-faq .tips-list { margin: 8px 0; }
.trade-faq .tips-list li { font-size: inherit; line-height: inherit; color: var(--muted); }
@media screen and (max-width: 640px) { .trade-grid { grid-template-columns: 1fr; } }
@media screen and (max-width: 540px) {   /* small text links get a taller tap area, same look */
    .explorer { margin-top: 0; padding: 8px 0; }
    .agree a { display: inline-block; padding: 4px 0; }
}
/* Fixed-rate countdown */
.rate-timer {
    display: flex; flex-wrap: wrap; align-items: center; gap: 8px 12px; margin-bottom: var(--gap);
    padding: 12px 16px; border-radius: var(--radius); background: var(--tint); border: 1px solid var(--tint-line); color: var(--text);
}
.rate-timer strong { font-size: 20px; font-variant-numeric: tabular-nums; color: var(--accent-dark); }
.timer-lock { fill: none; stroke: var(--accent-dark); stroke-width: 2; flex: none; }
.timer-at { color: var(--muted); font-size: 13px; }
.timer-expired-text { display: none; }
.rate-timer.expired { background: var(--err-bg); border-color: var(--err-line); }
.rate-timer.expired .timer-text { display: none; }
.rate-timer.expired .timer-expired-text { display: inline; color: var(--err-text); }
.rate-timer.expired .timer-lock { stroke: var(--err); }
.renew-form { margin: 0 0 0 auto; }   /* right end of the timer box */
.renew-form[hidden] { display: none; }
.renew-btn { padding: 8px 14px; font-size: 14px; white-space: nowrap; }
.renew-expired { display: flex; justify-content: center; margin-top: 12px; }
.renew-expired .renew-form { margin: 0; }
/* Expired trade: Recreate is the next step, so it gets the orange primary look. */
.renew-expired .renew-btn { background: var(--accent); color: #fff; border-color: var(--accent); }
.renew-expired .renew-btn:hover, .renew-expired .renew-btn:focus { background: var(--accent-hover); border-color: var(--accent-hover); }

/* ---------- Track, payment links, payer page (/pay/send) ---------- */
.track-page { max-width: 640px; }
.pay-page { max-width: 760px; }
.pay-result { margin-top: var(--gap); }
.recipient-card { margin-bottom: var(--gap); padding: 16px; border-radius: var(--radius); background: var(--soft); border: 1px solid var(--line); display: flex; flex-direction: column; gap: 6px; }
.recipient-coin { display: flex; align-items: center; gap: 8px; font-weight: 700; font-size: 16px; }
.recipient-coin img { border-radius: 50%; background: #fff; }
.recipient-address { font-family: ui-monospace, SFMono-Regular, Consolas, monospace; font-size: 14px; word-break: break-all; padding: 10px 12px; background: var(--card); border: 1px solid var(--line); border-radius: 8px; }

/* ========== 7. Other pages ========== */
/* ---------- Coins ---------- */
.coins-page { max-width: 1100px; }
.coins-intro { color: var(--muted); margin-bottom: 16px; }
.coins-search { display: flex; gap: 10px; }
.coins-search input {
    flex: 1; min-width: 0; max-width: 100%; padding: 12px 14px; border: 1px solid var(--line); border-radius: 8px;
    font: inherit; font-size: 15px; color: var(--text); background: var(--card); -webkit-appearance: none;
}
.coins-search input:focus { outline: none; border-color: var(--accent); box-shadow: 0 0 0 3px rgba(255, 107, 0, .2); }
.coin-grid { padding: 0; margin: var(--gap) 0; display: grid; grid-template-columns: repeat(auto-fill, minmax(min(250px, 100%), 1fr)); gap: 12px; }
.coin-card {
    display: flex; align-items: center; gap: 12px; padding: 12px 14px; min-width: 0;
    background: var(--soft); border: 1px solid var(--line); border-radius: var(--radius); transition: border-color .15s, box-shadow .15s;
}
.coin-card:hover { border-color: var(--accent); box-shadow: var(--shadow); }
.coin-card img { flex: none; border-radius: 50%; background: #fff; }
.coin-text { flex: 1; min-width: 0; display: flex; flex-direction: column; gap: 4px; }
.coin-text strong { font-weight: 600; overflow: hidden; text-overflow: ellipsis; overflow-wrap: break-word; }   /* names wrap between words; mid-word only if one word is wider than the card */
.coin-meta { display: flex; flex-wrap: wrap; gap: 4px; align-items: center; font-size: 12px; }
.coin-meta .ticker { font-weight: 600; color: var(--muted); }
.badge { padding: 1px 7px; border-radius: 999px; background: var(--chip); color: var(--muted); font-size: 11px; }
.coin-go { flex: none; font-size: 13px; font-weight: 600; color: var(--accent-dark) !important; white-space: nowrap; }
/* Room between the search box, the count line and the results / "No coin found" box. */
.coin-results > .field-hint { margin: 12px 0 0; }
.coin-results > .notice { margin: 16px 0 0; }
.coin-results > .coin-grid { margin-top: 16px; }
@media screen and (max-width: 540px) { .coin-go { padding: 10px 0 10px 8px; } }
/* Very narrow screens (≤ 340 px): "Exchange →" moves under the name, so names keep whole words ("Litecoin", not "Lite / coin"). */
@media screen and (max-width: 340px) {
    .coin-card { flex-wrap: wrap; }
    .coin-card .coin-text { flex-basis: calc(100% - 44px); }
    .coin-go { flex-basis: 100%; padding: 10px 0 6px 44px; margin: -4px 0 -6px; }   /* ~37px tap height, same spacing */
}

/* ---------- Reviews ---------- */
/* Rating box: 4.59 (big) next to the stars, the caption under both, bars on the right; narrower than 820px the bars
   go underneath. Empty rows above/below keep 4.59 + caption together, centred. */
.reviews-summary {
    display: grid; grid-template-columns: auto 1fr minmax(220px, 340px); grid-template-rows: 1fr auto auto 1fr;
    grid-template-areas: ". . bars" "avg stars bars" "text text bars" ". . bars"; align-items: center; column-gap: 16px; row-gap: 4px;
    padding: 18px 20px; margin-bottom: 24px;
    border: 1px solid var(--tint-line); border-radius: 16px; background: linear-gradient(180deg, var(--tint-soft) 0%, var(--soft) 120px);
}
.reviews-summary > div { display: contents; }   /* stars and caption become their own grid items */
.reviews-summary .reviews-avg { grid-area: avg; font-family: var(--mincho); font-size: 56px; font-weight: 700; line-height: 1; color: var(--text); }
.reviews-summary .stars { grid-area: stars; justify-self: start; width: 120px; height: 24px; -webkit-mask-size: 24px 24px; mask-size: 24px 24px; }
.reviews-summary > div > p { grid-area: text; margin: 0; color: var(--muted); font-size: 14px; }
.rating-bars { grid-area: bars; margin: 0 0 0 20px; display: flex; flex-direction: column; gap: 4px; }
/* 5★ … 1★ with a bar each (share of the most common rating); every row filters the list */
.rating-bars a { display: grid; grid-template-columns: 34px 1fr 34px; align-items: center; gap: 10px; padding: 2px 6px; border-radius: 6px; color: var(--text); text-decoration: none; font-size: 13px; }
.rating-bars a:hover, .rating-bars a[aria-current] { background: var(--tint); }
.rb-label { font-weight: 600; white-space: nowrap; }
.rb-label [aria-hidden] { color: var(--accent); }
.rb-bar { height: 8px; border-radius: 99px; background: var(--track); overflow: hidden; }
.rb-bar > span { display: block; height: 100%; border-radius: 99px; background: var(--accent); }
.rb-count { color: var(--muted); text-align: right; font-variant-numeric: tabular-nums; }
/* "Also reviewed on Trustpilot" on its own line under the count */
.reviews-elsewhere { display: block; width: fit-content; margin-top: 4px; padding: 4px 0; font-size: 13px; color: var(--accent-dark) !important; font-weight: 600; text-decoration: none; }
.reviews-elsewhere:hover { text-decoration: underline; }
@media (max-width: 820px) {
    .reviews-summary { grid-template-columns: auto 1fr; grid-template-rows: none; grid-template-areas: "avg stars" "text text" "bars bars"; }
    .rating-bars { margin: 6px 0 0; }
}
@media (max-width: 680px) { .rating-bars a { min-height: 34px; } }
/* Narrow phones (≤ 340 px): the 98 px score + 120 px stars didn't fit the box (everything in it, bars included, ran
   11 px off the screen). Smaller score and stars, flexible columns, less padding. */
@media screen and (max-width: 340px) {
    .reviews-summary { grid-template-columns: auto minmax(0, 1fr); column-gap: 10px; padding: 16px 14px; }
    .reviews-summary .reviews-avg { font-size: 44px; }
    .reviews-summary .stars { width: 95px; height: 19px; -webkit-mask-size: 19px 19px; mask-size: 19px 19px; }
    .rating-bars a { grid-template-columns: 30px minmax(0, 1fr) 26px; gap: 8px; }
}
@media screen and (max-width: 300px) { .reviews-summary .reviews-avg { font-size: 40px; } .reviews-summary .stars { width: 80px; height: 16px; -webkit-mask-size: 16px 16px; mask-size: 16px 16px; } }   /* tiniest screens */
/* Filter buttons above the list */
.review-filters { display: flex; flex-wrap: wrap; gap: 8px; margin: 0 0 16px; }
.review-filters a { display: inline-flex; align-items: center; gap: 6px; padding: 6px 12px; border: 1px solid var(--line); border-radius: 99px; background: var(--card); color: var(--text); font-size: 14px; font-weight: 600; text-decoration: none; }
.review-filters a span { color: var(--muted); font-weight: 500; font-size: 12px; }
.review-filters a:hover { border-color: var(--accent); }
.review-filters a.current { background: var(--accent); border-color: var(--accent); color: #fff; }
.review-filters a.current span { color: rgba(255, 255, 255, .85); }
/* Slim "Write a review" bar between the rating and the reviews; opens into the form. */
.content-page details.review-write { margin: -12px 0 24px; padding: 0; border: 1px solid var(--tint-line); border-radius: 12px; }
.content-page details.review-write > summary { display: flex; align-items: center; gap: 10px; padding: 12px 44px 12px 16px; color: var(--accent-dark); font-size: 15px; }
.content-page details.review-write > summary::after { right: 16px; top: 50%; transform: translateY(-50%); }
.content-page details.review-write[open] > summary { border-bottom: 1px solid var(--tint-line); }
.review-write summary svg { flex: none; fill: none; stroke: currentColor; stroke-width: 2; stroke-linecap: round; stroke-linejoin: round; }
.review-write-body { padding: 16px; }
/* The list */
.review-list { display: flex; flex-direction: column; gap: 10px; }
.review { position: relative; padding: 16px 18px; border: 1px solid var(--line); border-radius: 12px; background: var(--card); }
.review.pinned { border-color: var(--tint-line-strong); box-shadow: 0 6px 18px rgba(255, 107, 0, .08); }   /* pinned: quietly highlighted, no label */
.review-head { display: flex; align-items: center; gap: 12px; }
.review.pinned .review-head { padding-right: 36px; }
.review-avatar {   /* quiet ink seal with the first letter */
    flex: none; width: 38px; height: 38px; border-radius: 50%; display: grid; place-items: center;
    background: var(--dark); color: #fff; box-shadow: 0 0 0 1px var(--line); font-family: var(--mincho); font-size: 17px; font-weight: 700;
}
.review-name { font-size: 15px; overflow-wrap: anywhere; }
.review-verified { margin-left: 8px; padding: 2px 8px; border-radius: 99px; background: var(--ok-bg); color: var(--ok); font-size: 12px; font-weight: 600; white-space: nowrap; }
.review-pinned { margin-left: 8px; padding: 2px 8px; border-radius: 99px; background: var(--tint); color: var(--accent-dark); font-size: 12px; font-weight: 600; }
.review-pin { position: absolute; top: 14px; right: 14px; display: grid; place-items: center; width: 28px; height: 28px; border-radius: 50%; background: var(--tint); }   /* pinned review: top-right corner */
.review-pin svg { width: 16px; height: 16px; }
.review-pin svg path { fill: var(--accent); }
.review-meta { display: flex; flex-wrap: wrap; align-items: center; gap: 2px 10px; margin-top: 3px; color: var(--muted); font-size: 13px; }
.review-meta .stars { width: 75px; height: 15px; -webkit-mask-size: 15px 15px; mask-size: 15px 15px; }
.review time { white-space: nowrap; }   /* dates never break ("2026-" / "06-06") on narrow phones */
.content-page .review-title { margin: 12px 0 0; font-weight: 700; }
.content-page .review-text { margin: 6px 0 0; color: var(--muted); line-height: 1.55; overflow-wrap: anywhere; }
/* Our public reply under a review */
.review-reply { margin: 12px 0 0; padding: 10px 14px; border-left: 3px solid var(--accent); border-radius: 0 10px 10px 0; background: var(--tint-soft); }
.review-reply-head { display: flex; gap: 10px; align-items: baseline; flex-wrap: wrap; font-size: 13px; }
.review-reply-head strong { color: var(--accent-dark); }
.review-reply-head time { color: var(--muted); font-size: 12px; }
.review-reply p { margin: 4px 0 0; font-size: 14px; line-height: 1.5; }

/* ---------- Support ---------- */
/* "Find your exchange": first, full width, bold. "How it works →" card under it (the whole card is the link).
   "Notice:" caution box under that (warning colours, both modes). Then the contact cards. */
.support-card { display: flex; gap: 14px; align-items: flex-start; padding: 16px 18px; border: 1px solid var(--line); border-radius: 12px; background: var(--card); }
.support-card > div { flex: 1; min-width: 0; }
.content-page .support-card h3 { margin: 2px 0 6px; font-size: 16px; }
.support-card p { margin: 0; overflow-wrap: anywhere; }
.support-card a { color: var(--accent-dark); font-weight: 600; text-decoration: none; }
.support-card a:hover { text-decoration: underline; }
.support-card-track { margin: 8px 0 20px; align-items: center; border-color: var(--accent); }
.content-page .support-card-track h3 { font-size: 18px; font-weight: 800; }
.support-track { display: flex; gap: 8px; }
.support-track input { flex: 1; min-width: 0; height: 42px; padding: 0 12px; font: inherit; border: 1px solid var(--line); border-radius: 8px; background: var(--field); color: var(--text); }
.support-track input:focus { outline: 2px solid var(--accent); outline-offset: -1px; }
.support-track .btn { padding: 0 16px; height: 42px; }
.support-card-track .support-track input, .support-card-track .support-track .btn { font-weight: 700; }
.support-card-how { margin: 0 0 20px; align-items: center; color: var(--text) !important; text-decoration: none; transition: border-color .15s, box-shadow .15s; }
.support-card-how:hover { border-color: var(--accent); box-shadow: var(--shadow); }
.content-page .support-card-how h3 { margin: 0 0 2px; }
.support-card-how p { margin: 0; color: var(--muted); font-size: 14px; }
.support-notice { margin: 0 0 20px; align-items: center; background: var(--warn-bg); border-color: var(--warn-line); }
.content-page .support-notice h3 { margin: 0 0 2px; color: var(--warn-text); }
.support-notice p { margin: 0; color: var(--warn-text); font-size: 14px; line-height: 1.5; }
.support-card-warn p { font-size: 14px; line-height: 1.5; }   /* Telegram card: like the other contacts, amber caution icon */
.support-card-warn .gtk-icon, .support-notice .gtk-icon { background: #d9901a; }
.support-page .review-box .gtk-head { margin-bottom: 16px; }
/* Contact cards: copy button in the top-right corner (shown only with a working clipboard). */
.support-cards { display: grid; grid-template-columns: repeat(auto-fit, minmax(min(260px, 100%), 1fr)); gap: 12px; margin-top: 24px; }
.support-cards .support-card { position: relative; }
.support-cards .support-card:has(.support-copy:not([hidden])) { padding-right: 52px; }
.support-cards .support-card p { overflow-wrap: break-word; }   /* contacts break at the <wbr> points; mid-word only if one part is wider than the card */
.support-copy { position: absolute; top: 12px; right: 12px; width: 32px; height: 32px; }
.support-copy::after { content: ""; position: absolute; inset: -6px; }   /* ~44px tap area */
.support-card .pgp-fp code { font-size: 12px; letter-spacing: 0; word-spacing: .1em; white-space: nowrap; }   /* each half on one line */
.support-card .pgp-fp + p { margin-top: 6px; }
.support-card .tox-id code { display: block; font-size: 12px; line-height: 1.5; overflow-wrap: anywhere; word-break: break-all; user-select: all; }   /* long ID: wraps anywhere, one click selects it all */
/* Narrow phones (≤ 360 px): smaller icons; contact cards put the icon (and the copy button) on their own row so the
   address gets the full card width; the "Find your exchange" field gets a full line, Track below it. */
@media screen and (max-width: 360px) {
    .support-card { gap: 10px; padding: 14px; }
    .support-card .gtk-icon { width: 34px; height: 34px; }
    .support-card .gtk-icon svg { width: 18px; height: 18px; }
    .support-cards .support-card { flex-direction: column; }
    .support-cards .support-card:has(.support-copy:not([hidden])) { padding-right: 14px; }
    .support-copy { top: 14px; right: 14px; }
    .support-track { flex-wrap: wrap; }
    .support-track input { flex: 1 1 100%; }
}

/* ---------- How it works (/how-it-works) ---------- */
.how-page { max-width: 1000px; }
/* .how-steps is also the payer page's (/pay/send) list; both get this look. */
.how-steps { margin: 28px 0 0; padding: 0; display: grid; gap: 16px; color: var(--muted); font-size: 14px; line-height: 22px; }
.how-step {
    display: grid; grid-template-columns: 200px 1fr; gap: 32px; align-items: center;
    padding: 20px 24px; background: var(--soft); border: 1px solid var(--line); border-radius: var(--radius);
}
.how-step:nth-child(even) { grid-template-columns: 1fr 200px; }   /* pictures alternate sides, like a scroll being read */
.how-step:nth-child(even) .how-art { order: 2; }
.how-art { display: block; width: 100%; max-width: 200px; height: auto; margin: 0 auto; }
.how-art svg { display: block; width: 100%; height: auto; }
.how-art svg path { fill: none; }
.how-art .enso { stroke: var(--text); }   /* brush ring: dark ink on light cards, light ink on dark cards */
.how-num { display: flex; align-items: center; gap: 10px; margin: 0 0 6px; color: var(--muted); font-size: 13px; font-weight: 600; text-transform: uppercase; letter-spacing: .06em; }
.how-kanji {
    display: inline-flex; align-items: center; justify-content: center; width: 32px; height: 32px; border-radius: 50%;
    background: var(--accent); color: #fff; font-family: var(--mincho); font-size: 17px; font-weight: 700; letter-spacing: 0;
}
.how-text h2 { margin: 0 0 8px; font-size: 22px; line-height: 1.3; }
.how-text p:last-child { margin: 0; color: var(--muted); line-height: 1.6; }
.how-actions { display: flex; flex-wrap: wrap; gap: 12px; margin-top: 24px; }
.how-more { margin: 22px 0 4px; }   /* clear of the buttons, a little off the card edge */
.how-more a { color: var(--accent-dark); font-weight: 600; }
@media screen and (max-width: 640px) {
    .how-step, .how-step:nth-child(even) { grid-template-columns: 1fr; gap: 12px; padding: 16px; }
    .how-step:nth-child(even) .how-art { order: 0; }
    .how-art { max-width: 170px; }
    .how-text h2 { font-size: 19px; }
    .how-actions .btn { flex: 1 1 100%; text-align: center; }
}

/* ---------- Legal pages (Terms, Privacy, AML): readable structure for long texts ---------- */
.legal ul { list-style: disc; margin: 4px 0 16px; padding-left: 22px; }
.legal li { margin: 0 0 8px; padding-left: 4px; }
.legal li::marker { color: var(--accent); }
.legal h2 { scroll-margin-top: 16px; padding-top: 6px; border-top: 1px solid var(--line); }
.legal h2:first-of-type { border-top: 0; }
.legal-meta { color: var(--muted); font-size: 14px; }
.legal-lead { padding: 14px 16px; border-left: 3px solid var(--accent); border-radius: 8px; background: var(--tint-soft); }
.legal-toc { margin: 0 0 28px; padding: 16px 20px; border: 1px solid var(--line); border-radius: 12px; background: var(--soft); }
.legal-toc-title { margin: 0 0 8px !important; font-weight: 700; }
.legal-toc ol { margin: 0; padding: 0; columns: 2; column-gap: 28px; }
.legal-toc li { margin: 0 0 6px; break-inside: avoid; font-size: 14px; }
.legal-toc a { text-decoration: none; }
.legal-toc a:hover { text-decoration: underline; }
@media screen and (max-width: 480px) { .legal-toc ol { columns: 1; } }

/* ---------- Admin (not public; English only) ---------- */
.admin-page h3 { margin: 28px 0 12px; }
.admin-actions { display: flex; gap: 8px; margin-top: 12px; }
.admin-actions .btn { padding: 8px 14px; font-size: 14px; }
.admin-rating { margin-left: 8px; color: var(--accent); letter-spacing: 1px; }
.admin-logout { float: right; }
.admin-login { max-width: 360px; margin-top: 8px; }
.admin-login label { display: block; margin-bottom: 6px; font-weight: 600; font-size: 14px; }
.admin-login input { display: block; width: 100%; height: 46px; padding: 0 12px; font: inherit; color: var(--text);
    border: 1px solid var(--line); border-radius: 8px; background: var(--field); }
.admin-login input:focus { outline: 2px solid var(--accent); outline-offset: -1px; }
.admin-login .form-actions { margin: 18px 0 0; }
.admin-login .btn { width: 100%; }
.admin-tabs { display: flex; gap: 6px; margin: 8px 0 18px; border-bottom: 1px solid var(--line); }
.admin-tabs a { padding: 10px 14px; margin-bottom: -1px; color: var(--muted); font-weight: 600; text-decoration: none; border-bottom: 2px solid transparent; }
.admin-tabs a.current { color: var(--text); border-bottom-color: var(--accent); }
.admin-count { display: inline-block; min-width: 20px; margin-left: 6px; padding: 1px 7px; border-radius: 99px; background: var(--accent); color: #fff; font-size: 12px; font-weight: 700; text-align: center; }
.admin-reply { margin-top: 10px; }
.admin-reply summary { cursor: pointer; color: var(--accent-dark); font-weight: 600; font-size: 14px; }
.admin-reply textarea { width: 100%; margin-top: 8px; padding: 10px 12px; font: inherit; border: 1px solid var(--line); border-radius: 8px; }
.admin-table { width: 100%; font-size: 14px; }
.admin-table td { padding: 8px 10px; border-bottom: 1px solid var(--line); overflow-wrap: anywhere; }
.admin-table form { margin: 0; text-align: right; }
.admin-table .btn { padding: 6px 12px; font-size: 13px; }
.review.message { border-left: 3px solid var(--accent); }
.review.message.is-read { border-left-color: var(--line); opacity: .8; }

/* ========== 8. Tap / click feedback on every button-like control (phones and desktop) ========== */
.btn, .exchange-form-btn, .round-btn, .pair, .review-filters a, .rating-bars a, .rate-opt, .refresh-btn, .btn-copy,
.fees-chip { -webkit-tap-highlight-color: transparent; transition: transform .12s ease, background .15s, border-color .15s, box-shadow .15s, opacity .15s; }
.btn:active, .exchange-form-btn:active, .round-btn:active, .pair:active, .review-filters a:active, .rating-bars a:active,
.rate-opt:active, .refresh-btn:active, .btn-copy:active, .fees-chip:active { transform: scale(.97); }
@media (prefers-reduced-motion: reduce) { .btn:active, .exchange-form-btn:active, .round-btn:active, .pair:active, .rate-opt:active { transform: none; } }
/* Sent: the button dims and shows it is working, so nobody taps again. */
.is-sending { opacity: .6; pointer-events: none; cursor: progress; }
/* Touch screens of any width (tablets show the desktop menu): bigger tap areas, same look.
   Invisible ::before / ::after areas don't move anything. */
@media (pointer: coarse) {
    .nav-link, .lang-links a, .coin-go, .explorer { position: relative; }
    .nav-link::before, .lang-links a::after { content: ""; position: absolute; inset: -12px 0; }   /* nav: ::after is the active underline */
    .coin-go::after, .explorer::after { content: ""; position: absolute; inset: -10px 0; }
    .rating-bars a { min-height: 34px; }
}
