/* ============================================================
   Rechange — design system
   ============================================================ */
:root {
    --accent: #ff6b35;
    --accent-soft: rgba(255,107,53,.08);
    --accent-ring: rgba(255,107,53,.12);
    --bg-primary:   #0c0c0c;
    --bg-secondary: #080808;
    --bg-card:      #111111;
    --bg-input:     #141414;
    --bg-hover:     #1c1c1c;
    --bg-elevated:  #131313;

    --frost-primary:   #ff6b35;
    --frost-secondary: #ffb347;
    --frost-gradient:  linear-gradient(135deg, #ff6b35 0%, #ffb347 100%);
    --frost-soft:      rgba(255, 107, 53, .08);
    --frost-ring:      rgba(255, 107, 53, .12);

    --ok: #ffb347;

    --text-primary:   #e8e8e8;
    --text-secondary: #777777;
    --text-muted:     #4a4a4a;

    --border-color: #1a1a1a;
    --border-hi:    #282828;

    --radius:    18px;
    --radius-sm: 14px;
    --radius-xs: 8px;

    --shadow-card: 0 1px 2px rgba(0,0,0,.5), 0 12px 40px -12px rgba(0,0,0,.6);
    --shadow-pop:  0 20px 60px -12px rgba(0,0,0,.8);

    --mono: 'JetBrains Mono', 'SF Mono', 'Cascadia Code', ui-monospace, monospace;
}

[data-theme="light"] {
    --accent: #e85d26;
    --accent-soft: rgba(232,93,38,.07);
    --accent-ring: rgba(232,93,38,.14);
    --bg-primary:   #f7f8fb;
    --bg-secondary: #ffffff;
    --bg-card:      #ffffff;
    --bg-input:     #f4f6fa;
    --bg-hover:     #eceff5;
    --bg-elevated:  #ffffff;

    --frost-primary:   #e85d26;
    --frost-secondary: #e8941e;
    --frost-gradient:  linear-gradient(135deg, #e85d26 0%, #e8941e 100%);
    --frost-soft:      rgba(232, 93, 38, .07);
    --frost-ring:      rgba(232, 93, 38, .14);

    --ok: #d4780e;

    --text-primary:   #0d1526;
    --text-secondary: #5a677d;
    --text-muted:     #96a2b4;

    --border-color: #e4e8f0;
    --border-hi:    #d3dae6;

    --shadow-card: 0 1px 2px rgba(16,24,40,.05), 0 12px 32px -12px rgba(16,24,40,.12);
    --shadow-pop:  0 20px 50px -12px rgba(16,24,40,.22);
}

*, *::before, *::after { margin: 0; padding: 0; box-sizing: border-box; }

html { font-size: 16px; -webkit-text-size-adjust: 100%; }

/* anchor jumps (TOC, footer links) glide instead of teleporting */
@media (prefers-reduced-motion: no-preference) {
    html { scroll-behavior: smooth; }
}

body {
    font-family: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto,
                 'PingFang SC', 'Hiragino Sans GB', 'Microsoft YaHei', 'Noto Sans CJK SC', sans-serif;
    background: var(--bg-primary);
    color: var(--text-primary);
    line-height: 1.55;
    min-height: 100vh;
    -webkit-font-smoothing: antialiased;
    -moz-osx-font-smoothing: grayscale;
    font-feature-settings: 'cv11', 'ss01';
}

a { color: inherit; text-decoration: none; }
button { font: inherit; }

.app { display: flex; flex-direction: column; min-height: 100vh; }

.container {
    width: 100%;
    max-width: 1180px;
    margin: 0 auto;
    padding: 0 28px;
}

/* ── Animated background (home page) ───────────────────── */
.bg-fx {
    position: fixed;
    inset: 0;
    z-index: 0;
    overflow: hidden;
    pointer-events: none;
}
.bg-fx::before {
    content: '';
    position: absolute;
    inset: 0;
    background: url('/static/img/autumn-frame.png') center / cover no-repeat;
    opacity: .85;
}
[data-theme="light"] .bg-fx::before {
    opacity: .8;
    mix-blend-mode: multiply;
    filter: saturate(1.35) contrast(1.08);
}
/* desktop-only slow "breathing" zoom of the background frame */
@keyframes bgBreathe {
    from { transform: scale(1); }
    to { transform: scale(1.045); }
}
@media (min-width: 769px) {
    .bg-fx::before {
        animation: bgBreathe 14s ease-in-out infinite alternate;
        will-change: transform;
    }
}
@media (prefers-reduced-motion: reduce) {
    .bg-fx::before { animation: none; }
}
.app { position: relative; z-index: 1; }
.bg-blob {
    position: absolute;
    border-radius: 50%;
    filter: blur(90px);
    will-change: transform;
}
.bg-blob-1 {
    width: 44vw;
    height: 44vw;
    min-width: 420px;
    min-height: 420px;
    top: -14vw;
    left: -10vw;
    background: radial-gradient(circle, rgba(255,107,53,.20) 0%, rgba(255,107,53,0) 70%);
    animation: blobDrift1 26s ease-in-out infinite alternate;
}
.bg-blob-2 {
    width: 38vw;
    height: 38vw;
    min-width: 360px;
    min-height: 360px;
    top: 8vh;
    right: -12vw;
    background: radial-gradient(circle, rgba(255,179,71,.16) 0%, rgba(255,179,71,0) 70%);
    animation: blobDrift2 32s ease-in-out infinite alternate;
}
.bg-blob-3 {
    width: 30vw;
    height: 30vw;
    min-width: 300px;
    min-height: 300px;
    bottom: -12vw;
    left: 28vw;
    background: radial-gradient(circle, rgba(232,93,38,.14) 0%, rgba(232,93,38,0) 70%);
    animation: blobDrift3 38s ease-in-out infinite alternate;
}
@keyframes blobDrift1 {
    from { transform: translate(0, 0) scale(1); }
    to   { transform: translate(6vw, 9vh) scale(1.15); }
}
@keyframes blobDrift2 {
    from { transform: translate(0, 0) scale(1.1); }
    to   { transform: translate(-7vw, 6vh) scale(.95); }
}
@keyframes blobDrift3 {
    from { transform: translate(0, 0) scale(.95); }
    to   { transform: translate(-5vw, -7vh) scale(1.12); }
}
.bg-grid {
    position: absolute;
    inset: 0;
    background-image:
        linear-gradient(rgba(255,255,255,.045) 1px, transparent 1px),
        linear-gradient(90deg, rgba(255,255,255,.045) 1px, transparent 1px);
    background-size: 44px 44px;
    mask-image: radial-gradient(ellipse 90% 60% at 50% 0%, #000 30%, transparent 75%);
    -webkit-mask-image: radial-gradient(ellipse 90% 60% at 50% 0%, #000 30%, transparent 75%);
}
[data-theme="light"] .bg-blob-1 {
    background: radial-gradient(circle, rgba(232,93,38,.17) 0%, rgba(232,93,38,0) 70%);
}
[data-theme="light"] .bg-blob-2 {
    background: radial-gradient(circle, rgba(232,148,30,.15) 0%, rgba(232,148,30,0) 70%);
}
[data-theme="light"] .bg-blob-3 {
    background: radial-gradient(circle, rgba(232,93,38,.12) 0%, rgba(232,93,38,0) 70%);
}
[data-theme="light"] .bg-grid {
    background-image:
        linear-gradient(rgba(13,21,38,.055) 1px, transparent 1px),
        linear-gradient(90deg, rgba(13,21,38,.055) 1px, transparent 1px);
}
@media (max-width: 768px) {
    .bg-blob { filter: blur(70px); }
    .bg-grid { background-size: 34px 34px; }
}
@media (prefers-reduced-motion: reduce) {
    .bg-blob { animation: none; }
}

/* ============================================================
   HEADER
   ============================================================ */
.header {
    position: sticky;
    top: 0;
    z-index: 200;
    border-bottom: 1px solid var(--border-color);
    background: var(--bg-primary);
    background: color-mix(in srgb, var(--bg-primary) 82%, transparent);
    backdrop-filter: blur(14px) saturate(140%);
    -webkit-backdrop-filter: blur(14px) saturate(140%);
}

.header-inner {
    display: flex;
    align-items: center;
    gap: 36px;
    height: 66px;
}

.header-left { display: flex; align-items: center; gap: 12px; flex-shrink: 0; }

/* hamburger — mobile only */
.burger {
    display: none;
    flex-direction: column;
    justify-content: center;
    gap: 4px;
    width: 36px;
    height: 36px;
    padding: 0 8px;
    border: 1px solid var(--border-color);
    border-radius: 10px;
    background: var(--bg-input);
    cursor: pointer;
    transition: border-color .2s, background .2s;
}
.burger:hover { border-color: var(--border-hi); background: var(--bg-hover); }

.burger span {
    display: block;
    height: 1.8px;
    width: 100%;
    border-radius: 2px;
    background: var(--text-secondary);
    transition: transform .28s cubic-bezier(.4,0,.2,1), opacity .2s;
}

body.menu-open .burger span:nth-child(1) { transform: translateY(5.8px) rotate(45deg); }
body.menu-open .burger span:nth-child(2) { opacity: 0; }
body.menu-open .burger span:nth-child(3) { transform: translateY(-5.8px) rotate(-45deg); }

.logo { display: inline-flex; align-items: center; gap: 0; flex-shrink: 0; }
.logo-icon { width: 0; height: 0; display: none; }
.logo-text {
    font-size: 1.22rem;
    font-weight: 800;
    letter-spacing: -.035em;
    background: var(--frost-gradient);
    -webkit-background-clip: text;
    background-clip: text;
    -webkit-text-fill-color: transparent;
}
/* shimmer sweep across the wordmark on hover */
.logo:hover .logo-text {
    background-image: linear-gradient(110deg,
        #ff6b35 15%, #ffd9a3 38%, #ffb347 50%, #ffd9a3 62%, #ff6b35 85%);
    background-size: 220% 100%;
    animation: logoSheen 1.2s linear infinite;
}
@keyframes logoSheen {
    from { background-position: 210% 0; }
    to { background-position: -110% 0; }
}
@media (prefers-reduced-motion: reduce) {
    .logo:hover .logo-text { animation: none; }
}

.nav { display: flex; gap: 4px; margin-right: auto; position: relative; }

.nav-link {
    position: relative;
    padding: 7px 13px;
    border-radius: 9px;
    font-size: .875rem;
    font-weight: 500;
    color: var(--text-secondary);
    transition: color .18s, background .18s;
}
.nav-link:hover { color: var(--text-primary); background: var(--bg-hover); }
/* single sliding indicator gliding between tabs (positioned by JS) */
.nav-indicator {
    position: absolute;
    bottom: 4px;
    left: 0;
    width: 0;
    height: 2px;
    border-radius: 2px;
    background: var(--frost-gradient);
    box-shadow: 0 0 8px var(--frost-ring);
    opacity: 0;
    pointer-events: none;
    transition: left .3s cubic-bezier(.4,0,.2,1), width .3s cubic-bezier(.4,0,.2,1), opacity .2s;
}
.nav-indicator.show { opacity: 1; }
/* current page keeps its color; the bar position comes from JS */
.nav-link.current { color: var(--text-primary); }
@media (prefers-reduced-motion: reduce) {
    .nav-indicator { transition: none; }
}

.header-actions { display: flex; align-items: center; gap: 10px; }

/* language dropdown */
.lang-dd { flex-shrink: 0; }

.lang-trigger {
    display: flex;
    align-items: center;
    gap: 7px;
    padding: 8px 10px;
    border: 1px solid var(--border-color);
    border-radius: 10px;
    background: var(--bg-input);
    color: var(--text-secondary);
    font-family: inherit;
    cursor: pointer;
    transition: color .2s, border-color .2s, background .2s, box-shadow .2s;
}
.lang-trigger:hover { color: var(--text-primary); border-color: var(--border-hi); background: var(--bg-hover); }

.lang-dd.open .lang-trigger { color: var(--frost-primary); border-color: var(--frost-primary); }

.lang-globe { flex-shrink: 0; }

.lang-code {
    font-family: var(--mono);
    font-size: .72rem;
    font-weight: 500;
    letter-spacing: .02em;
    line-height: 1;
}

.lang-dd .dd-arrow { width: 12px; height: 12px; }

.lang-panel {
    left: auto;
    right: 0;
    width: 214px;
    padding: 5px;
}

.lang-opt {
    position: relative;
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 8px 9px;
    border-radius: 9px;
    cursor: pointer;
    transition: background .15s;
}
.lang-opt:hover { background: var(--bg-hover); }
.lang-opt:focus-visible {
    outline: none;
    background: var(--bg-hover);
    box-shadow: inset 0 0 0 1px var(--frost-primary);
}

/* the active row is marked by the chip and the tick — a filled background on
   top of both was a third signal saying the same thing */
.lang-opt.active { background: transparent; }
.lang-opt.active:hover { background: var(--bg-hover); }

/* 4:3 — the ratio nearly every flag icon set ships in (flag-icons, twemoji),
   so dropping real flag art in here later will not distort it */
.lang-chip {
    display: grid;
    place-items: center;
    width: 32px;
    height: 24px;
    aspect-ratio: 4 / 3;
    flex-shrink: 0;
    overflow: hidden;
    border: 1px solid var(--border-hi);
    border-radius: 6px;
    background: var(--bg-input);
    font-family: var(--mono);
    font-size: .66rem;
    font-weight: 500;
    letter-spacing: .02em;
    color: var(--text-secondary);
    transition: color .15s, border-color .15s, background .15s;
}

/* a future <img>/<svg> flag fills the tile edge to edge instead of sitting
   inside it with the border showing through */
.lang-chip img,
.lang-chip svg {
    display: block;
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.lang-opt:hover .lang-chip { color: var(--text-primary); border-color: var(--border-hi); }
.lang-opt.active .lang-chip {
    border-color: var(--frost-primary);
    color: var(--frost-primary);
    background: var(--frost-soft);
}

.lang-names { display: flex; flex-direction: column; flex: 1; min-width: 0; }
.lang-native {
    font-size: .855rem;
    font-weight: 550;
    line-height: 1.3;
    color: var(--text-secondary);
    transition: color .15s;
}
.lang-opt:hover .lang-native { color: var(--text-primary); }
.lang-opt.active .lang-native { color: var(--text-primary); font-weight: 600; }

.lang-en { font-size: .715rem; line-height: 1.3; color: var(--text-muted); }

/* the shared rule keys off .dd-option, which never matched these rows — the
   tick was permanently invisible here */
.lang-opt.active .dd-check { opacity: 1; }

.theme-toggle {
    display: grid;
    place-items: center;
    width: 36px; height: 36px;
    border-radius: 10px;
    border: 1px solid var(--border-color);
    background: var(--bg-input);
    color: var(--text-secondary);
    cursor: pointer;
    transition: color .2s, border-color .2s, background .2s;
}
.theme-toggle:hover { color: var(--frost-primary); border-color: var(--border-hi); background: var(--bg-hover); }

.icon-sun, .icon-moon { display: none; }
html:not([data-theme="light"]) .icon-sun { display: block; }
html[data-theme="light"] .icon-moon { display: block; }

.btn-ghost {
    padding: 8px 14px;
    border-radius: 10px;
    font-size: .875rem;
    font-weight: 550;
    color: var(--text-secondary);
    transition: color .18s, background .18s;
}
.btn-ghost:hover { color: var(--text-primary); background: var(--bg-hover); }

.btn-mini {
    padding: 9px 17px;
    border-radius: 10px;
    font-size: .875rem;
    font-weight: 600;
    color: #05202b;
    background: var(--frost-gradient);
    box-shadow: 0 1px 2px rgba(0,0,0,.2);
    transition: transform .18s, box-shadow .18s, filter .18s;
}
.btn-mini:hover { transform: translateY(-1px); box-shadow: 0 6px 20px -6px var(--frost-primary); filter: brightness(1.06); }

/* ============================================================
   MAIN / PAGE HEAD
   ============================================================ */
.main { flex: 1; padding-top: 54px; animation: pageIn .28s ease-out; }
@keyframes pageIn { from { opacity: 0; transform: translateY(10px); } to { opacity: 1; transform: none; } }
.main.leaving { opacity: 0; transform: translateY(10px); transition: opacity .16s ease, transform .16s ease; }
@media (prefers-reduced-motion: reduce) {
    .main { animation: none; }
}

.page-head {
    max-width: 620px;
    margin: 0 auto 40px;
    text-align: center;
}

.eyebrow {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    padding: 5px 13px 5px 10px;
    margin-bottom: 18px;
    border: 1px solid var(--border-color);
    border-radius: 100px;
    background: var(--bg-card);
    font-size: .75rem;
    font-weight: 600;
    letter-spacing: .02em;
    color: var(--text-secondary);
}

.pulse {
    position: relative;
    width: 6px; height: 6px;
    border-radius: 50%;
    background: var(--ok);
    flex-shrink: 0;
}
.pulse::after {
    content: '';
    position: absolute;
    inset: -4px;
    border-radius: 50%;
    border: 1.5px solid var(--ok);
    animation: pulseRing 2s ease-out infinite;
}
@keyframes pulseRing {
    0%   { opacity: .7; transform: scale(.5); }
    100% { opacity: 0;  transform: scale(1.4); }
}

.page-title {
    font-size: clamp(1.9rem, 4.4vw, 2.6rem);
    font-weight: 800;
    letter-spacing: -.04em;
    line-height: 1.1;
    margin-bottom: 12px;
}

.page-sub {
    font-size: 1rem;
    color: var(--text-secondary);
    max-width: 500px;
    margin: 0 auto;
}

/* ============================================================
   LAYOUT
   ============================================================ */
.layout {
    display: grid;
    grid-template-columns: minmax(0, 1fr) 336px;
    gap: 26px;
    align-items: start;
    padding-bottom: 28px;
}

/* ============================================================
   INVOICE CARD
   ============================================================ */
.invoice-card {
    background: color-mix(in srgb, var(--bg-card) 20%, transparent);
    -webkit-backdrop-filter: blur(14px) saturate(1.25);
    backdrop-filter: blur(14px) saturate(1.25);
    border: 1px solid var(--border-color);
    border-radius: var(--radius);
    padding: 32px;
    box-shadow: var(--shadow-card);
}

/* steps */
.steps { display: flex; align-items: center; margin-bottom: 30px; }

.step { display: flex; align-items: center; gap: 9px; min-width: 0; }
.step-number {
    display: grid; place-items: center;
    width: 30px; height: 30px;
    flex-shrink: 0;
    border-radius: 50%;
    border: 1px solid var(--border-hi);
    background: var(--bg-input);
    color: var(--text-muted);
    font-size: .8rem;
    font-weight: 700;
    transition: all .3s cubic-bezier(.4,0,.2,1);
}
.step-label {
    font-size: .82rem;
    font-weight: 550;
    color: var(--text-muted);
    white-space: nowrap;
    transition: color .3s;
}

.step.active .step-number {
    background: var(--frost-gradient);
    border-color: transparent;
    color: #05202b;
    box-shadow: 0 0 0 4px var(--frost-soft);
}
.step.active .step-label { color: var(--text-primary); }

.step.completed .step-number {
    background: var(--frost-soft);
    border-color: var(--frost-primary);
    color: var(--frost-primary);
}
.step.completed .step-label { color: var(--text-secondary); }

.step-line {
    flex: 1;
    height: 1px;
    margin: 0 14px;
    background: var(--border-hi);
}
.step.completed + .step-line {
    background: var(--frost-gradient);
    height: 2px;
    border-radius: 2px;
}

/* step content */
.step-content { display: none; }
.step-content.active { display: block; animation: fadeUp .32s cubic-bezier(.4,0,.2,1); }
@keyframes fadeUp { from { opacity: 0; transform: translateY(8px); } to { opacity: 1; transform: none; } }

.step-title {
    font-size: 1.22rem;
    font-weight: 700;
    letter-spacing: -.025em;
    margin-bottom: 5px;
}
.step-description {
    font-size: .9rem;
    color: var(--text-secondary);
    margin-bottom: 26px;
}

/* form */
.form-group { margin-bottom: 20px; }

.form-label {
    display: block;
    font-size: .8rem;
    font-weight: 600;
    color: var(--text-secondary);
    margin-bottom: 9px;
}

.label-row { display: flex; align-items: baseline; justify-content: space-between; }

.link-btn {
    border: none;
    background: none;
    color: var(--frost-primary);
    font-size: .78rem;
    font-weight: 600;
    cursor: pointer;
    padding: 0;
    margin-bottom: 9px;
    transition: opacity .18s;
}
.link-btn:hover { opacity: .72; }

/* ============================================================
   DROPDOWN
   ============================================================ */
.dd { position: relative; }

.dd-trigger {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 12px;
    padding: 13px 15px;
    border: 1px solid var(--border-color);
    border-radius: var(--radius-sm);
    background: var(--bg-input);
    cursor: pointer;
    user-select: none;
    transition: border-color .2s, background .2s, box-shadow .2s;
}
.dd-trigger:hover { border-color: var(--border-hi); background: var(--bg-hover); }
.dd.open .dd-trigger { border-color: var(--frost-primary); }

.dd-trigger-left { display: flex; align-items: center; gap: 13px; min-width: 0; }

.dd-icon {
    display: grid; place-items: center;
    width: 38px; height: 38px;
    flex-shrink: 0;
    border-radius: 11px;
    font-size: 1.05rem;
    font-weight: 700;
    color: #fff;
    line-height: 1;
}
.dd-icon-net {
    background: var(--bg-elevated);
    border: 1px solid var(--border-hi);
    color: var(--frost-secondary);
}

.dd-trigger-text { display: flex; flex-direction: column; min-width: 0; }
.dd-val  { font-size: .94rem; font-weight: 650; letter-spacing: -.01em; line-height: 1.25; }
.dd-sub  { font-size: .76rem; color: var(--text-muted); line-height: 1.35; }

.dd-arrow { color: var(--text-muted); flex-shrink: 0; transition: transform .28s cubic-bezier(.4,0,.2,1); }
.dd.open .dd-arrow { transform: rotate(180deg); }

.dd-panel {
    position: absolute;
    top: calc(100% + 7px);
    left: 0; right: 0;
    z-index: 60;
    padding: 6px;
    border: 1px solid var(--border-hi);
    border-radius: var(--radius-sm);
    background: var(--bg-elevated);
    box-shadow: var(--shadow-pop);
    opacity: 0;
    visibility: hidden;
    transform: translateY(-6px) scale(.98);
    transform-origin: top center;
    transition: opacity .2s, transform .2s, visibility .2s;
    max-height: min(420px, 55vh);
    overflow-y: auto;
    overscroll-behavior: contain;
}
.dd.open .dd-panel { opacity: 1; visibility: visible; transform: none; }

.dd-option {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 9px 10px;
    border-radius: 10px;
    cursor: pointer;
    transition: background .15s;
}
.dd-option:hover { background: var(--bg-hover); }
.dd-option.active { background: var(--frost-soft); }

/* Keep long network names/labels from colliding with each other. */
#networkDD .dd-option { min-height: 54px; align-items: center; }
#networkDD .dd-opt-text { min-width: 0; overflow: hidden; }
#networkDD .dd-opt-code,
#networkDD .dd-opt-name { display: block; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
#networkDD .dd-opt-name { line-height: 1.35; margin-top: 2px; }
#networkDD .dd-icon-net { flex: 0 0 34px; }
#networkDD .dd-check { margin-left: auto; }
#networkDD .dd-trigger { min-height: 66px; }
#networkDD .dd-trigger-text { min-width: 0; overflow: hidden; }
    padding-left: 10px !important;
#networkDD .dd-sub { white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }

.dd-option .dd-icon { width: 34px; height: 34px; font-size: .95rem; border-radius: 10px; }

.dd-opt-text { display: flex; flex-direction: column; flex: 1; min-width: 0; }
.dd-opt-code { font-size: .875rem; font-weight: 650; line-height: 1.25; }
.dd-opt-name { font-size: .74rem; color: var(--text-muted); line-height: 1.35; }

.dd-check { color: var(--frost-primary); opacity: 0; flex-shrink: 0; transition: opacity .15s; }
.dd-option.active .dd-check { opacity: 1; }

/* ============================================================
   AMOUNT
   ============================================================ */
.amount-input-wrapper { position: relative; display: flex; align-items: center; }

.amount-input {
    width: 100%;
    padding: 15px 78px 15px 16px;
    border: 1px solid var(--border-color);
    border-radius: var(--radius-sm);
    background: var(--bg-input);
    color: var(--text-primary);
    font-family: inherit;
    font-size: 1.18rem;
    font-weight: 650;
    letter-spacing: -.02em;
    outline: none;
    transition: border-color .2s, box-shadow .2s;
}
.amount-input:focus { border-color: var(--frost-primary); }
.amount-input::placeholder { color: var(--text-muted); font-weight: 500; }
.amount-input.invalid { border-color: #f2555a; }

.amount-currency {
    position: absolute;
    right: 15px;
    padding: 4px 9px;
    border-radius: 7px;
    background: var(--frost-soft);
    color: var(--frost-primary);
    font-size: .78rem;
    font-weight: 700;
    letter-spacing: .02em;
    pointer-events: none;
}

.field-hint {
    display: flex;
    align-items: center;
    gap: 9px;
    margin-top: 9px;
    font-size: .78rem;
    color: var(--text-muted);
}
.dot-sep { width: 3px; height: 3px; border-radius: 50%; background: currentColor; opacity: .5; }

/* ============================================================
   BUTTONS
   ============================================================ */
.btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    width: 100%;
    padding: 14px 24px;
    border: none;
    border-radius: var(--radius-sm);
    font-family: inherit;
    font-size: .92rem;
    font-weight: 650;
    letter-spacing: -.005em;
    cursor: pointer;
    transition: transform .18s, box-shadow .18s, background .18s, border-color .18s, filter .18s;
}

.btn-primary {
    background: var(--frost-gradient);
    color: #05202b;
    box-shadow: 0 1px 2px rgba(0,0,0,.2), 0 8px 24px -10px var(--frost-primary);
}
.btn-primary:hover { transform: translateY(-1px); box-shadow: 0 12px 32px -10px var(--frost-primary); filter: brightness(1.06); }
.btn-primary:active { transform: none; }

.btn-secondary {
    background: var(--bg-input);
    color: var(--text-primary);
    border: 1px solid var(--border-color);
}
.btn-secondary:hover { background: var(--bg-hover); border-color: var(--border-hi); }

.btn-group { display: flex; gap: 10px; }
.btn-group .btn { flex: 1; }

/* ============================================================
   SUMMARY (step 2)
   ============================================================ */
.summary {
    border: 1px solid var(--border-color);
    border-radius: var(--radius-sm);
    background: var(--bg-input);
    padding: 6px 16px;
    margin-bottom: 22px;
}

.summary-row {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 16px;
    padding: 12px 0;
    border-bottom: 1px solid var(--border-color);
}
.summary-row:last-child { border-bottom: none; }

.summary-label { font-size: .86rem; color: var(--text-secondary); display: inline-flex; align-items: center; gap: 7px; }
.summary-value { font-size: .9rem; font-weight: 650; letter-spacing: -.01em; }

.summary-total { padding: 15px 0; }
.summary-total .summary-label { color: var(--text-primary); font-weight: 600; }
.summary-amount { font-size: 1.14rem; font-weight: 750; color: var(--frost-primary); letter-spacing: -.02em; }

.tag {
    padding: 2px 6px;
    border-radius: 5px;
    background: var(--bg-hover);
    border: 1px solid var(--border-hi);
    font-size: .68rem;
    font-weight: 600;
    color: var(--text-muted);
    letter-spacing: .01em;
}

/* ============================================================
   PAY (step 3)
   ============================================================ */
.pay-head {
    display: flex;
    align-items: center;
    gap: 20px;
    padding: 18px;
    margin-bottom: 20px;
    border: 1px solid var(--border-color);
    border-radius: var(--radius-sm);
    background: var(--bg-input);
}

.qr-box {
    display: grid; place-items: center;
    width: 128px; height: 128px;
    flex-shrink: 0;
    border-radius: 13px;
    background: var(--bg-elevated);
    border: 1px solid var(--border-hi);
}

.pay-meta { display: flex; flex-direction: column; gap: 2px; min-width: 0; }
.pay-meta-label { font-size: .76rem; font-weight: 600; color: var(--text-muted); text-transform: uppercase; letter-spacing: .06em; }
.pay-amount { font-size: 1.55rem; font-weight: 780; letter-spacing: -.035em; line-height: 1.2; }
.pay-net { font-size: .82rem; color: var(--text-secondary); margin-bottom: 8px; }

.timer {
    display: inline-flex;
    align-items: center;
    gap: 7px;
    align-self: flex-start;
    padding: 5px 11px;
    border-radius: 8px;
    background: var(--frost-soft);
    color: var(--frost-secondary);
    font-size: .84rem;
    font-weight: 700;
    font-variant-numeric: tabular-nums;
}
.timer-note { font-weight: 500; opacity: .75; font-size: .78rem; }

.address-display {
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 12px 12px 12px 14px;
    border: 1px solid var(--border-color);
    border-radius: var(--radius-sm);
    background: var(--bg-input);
    transition: border-color .2s;
}
.address-display:hover { border-color: var(--border-hi); }
.address-display code {
    flex: 1;
    min-width: 0;
    font-family: var(--mono);
    font-size: .78rem;
    line-height: 1.6;
    color: var(--frost-primary);
    word-break: break-all;
}

.copy-btn {
    display: grid; place-items: center;
    width: 32px; height: 32px;
    flex-shrink: 0;
    border: 1px solid var(--border-color);
    border-radius: 9px;
    background: var(--bg-elevated);
    color: var(--text-secondary);
    cursor: pointer;
    transition: color .18s, border-color .18s, background .18s;
}
.copy-btn:hover { color: var(--frost-primary); border-color: var(--frost-primary); background: var(--frost-soft); }

.notice {
    display: flex;
    gap: 11px;
    padding: 13px 15px;
    margin-bottom: 16px;
    border: 1px solid rgba(255, 176, 32, .28);
    border-radius: var(--radius-sm);
    background: rgba(255, 176, 32, .07);
    color: #ffb020;
}
.notice svg { flex-shrink: 0; margin-top: 1px; }
.notice p { font-size: .82rem; line-height: 1.5; color: var(--text-secondary); }
.notice b { color: #ffb020; font-weight: 650; }

.status-row {
    display: flex;
    align-items: center;
    gap: 9px;
    padding: 11px 14px;
    margin-bottom: 18px;
    border: 1px solid var(--border-color);
    border-radius: var(--radius-sm);
    background: var(--bg-input);
    font-size: .82rem;
    color: var(--text-secondary);
}

.status-dot {
    position: relative;
    width: 7px; height: 7px;
    flex-shrink: 0;
    border-radius: 50%;
    background: var(--ok);
}
.status-dot::after {
    content: '';
    position: absolute;
    inset: -4px;
    border-radius: 50%;
    border: 1.5px solid var(--ok);
    animation: pulseRing 2s ease-out infinite;
}

/* ============================================================
   SIDEBAR
   ============================================================ */
.side { display: flex; flex-direction: column; gap: 14px; }

.side-card {
    border: 1px solid var(--border-color);
    border-radius: var(--radius-sm);
    background: color-mix(in srgb, var(--bg-card) 20%, transparent);
    -webkit-backdrop-filter: blur(14px) saturate(1.25);
    backdrop-filter: blur(14px) saturate(1.25);
    padding: 17px 18px;
    box-shadow: var(--shadow-card);
}

.side-head {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 10px;
    margin-bottom: 14px;
}
.side-title {
    font-size: .78rem;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: .07em;
    color: var(--text-muted);
}

.live {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    font-size: .72rem;
    font-weight: 650;
    color: var(--ok);
}

/* rate */
.rate-main { display: flex; align-items: baseline; gap: 8px; flex-wrap: wrap; }
.rate-pair  { font-size: .92rem; font-weight: 600; color: var(--text-secondary); }
.rate-eq    { font-size: .92rem; color: var(--text-muted); }
.rate-value { font-size: 1.42rem; font-weight: 780; letter-spacing: -.035em; font-variant-numeric: tabular-nums; }

.rate-foot { display: flex; align-items: center; gap: 10px; margin-top: 7px; }
.chg {
    padding: 2px 7px;
    border-radius: 6px;
    font-size: .74rem;
    font-weight: 700;
    font-variant-numeric: tabular-nums;
}
.chg.up   { background: rgba(255,179,71,.12); color: var(--ok); }
.chg.down { background: rgba(242,85,90,.12);  color: #f2555a; }
.rate-time { font-size: .74rem; color: var(--text-muted); }

.spark { margin: 12px -18px -17px; height: 48px; }
.spark svg { display: block; width: 100%; height: 48px; }

/* key/value lists */
.kv { list-style: none; display: flex; flex-direction: column; }
.kv li {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 14px;
    padding: 9px 0;
    border-bottom: 1px solid var(--border-color);
}
.kv li:last-child { border-bottom: none; padding-bottom: 0; }
.kv li:first-child { padding-top: 0; }

.kv-k { font-size: .82rem; color: var(--text-secondary); display: inline-flex; align-items: center; gap: 7px; }
.kv-v { font-size: .85rem; font-weight: 650; letter-spacing: -.01em; font-variant-numeric: tabular-nums; }
.kv-v.accent { color: var(--frost-primary); font-weight: 750; }
.kv-total { border-top: 1px solid var(--border-hi); margin-top: 3px; padding-top: 11px !important; }

/* chains */
.chains { display: flex; flex-wrap: wrap; gap: 7px; }
.chain {
    display: inline-flex;
    align-items: center;
    gap: 7px;
    padding: 5px 11px;
    border: 1px solid var(--border-hi);
    border-radius: 100px;
    background: var(--bg-input);
    font-size: .76rem;
    font-weight: 600;
    color: var(--text-secondary);
}
.chain-dot {
    width: 9px;
    height: 9px;
    border-radius: 50%;
    flex-shrink: 0;
}
.chain.muted { color: var(--text-muted); border-style: dashed; background: none; }

/* secure note */
.secure-note {
    display: flex;
    gap: 12px;
    padding: 15px 16px;
    border: 1px solid var(--border-color);
    border-radius: var(--radius-sm);
    background: linear-gradient(180deg, var(--frost-soft), transparent);
    color: var(--frost-secondary);
}
.secure-note svg { flex-shrink: 0; margin-top: 2px; }
.secure-note div { display: flex; flex-direction: column; gap: 3px; }
.secure-note b { font-size: .85rem; font-weight: 650; color: var(--text-primary); }
.secure-note span { font-size: .78rem; line-height: 1.5; color: var(--text-secondary); }

/* ============================================================
   STATS
   ============================================================ */
.stats {
    border-top: 1px solid var(--border-color);
    border-bottom: 1px solid var(--border-color);
    background: var(--bg-secondary);
}

.stats-grid {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
}

.stat {
    display: flex;
    flex-direction: column;
    gap: 4px;
    padding: 30px 8px;
    text-align: center;
    border-left: 1px solid var(--border-color);
}
.stat:first-child { border-left: none; }

.stat-value {
    font-size: 1.7rem;
    font-weight: 780;
    letter-spacing: -.04em;
    line-height: 1.1;
    font-variant-numeric: tabular-nums;
}
.stat-plus {
    background: var(--frost-gradient);
    -webkit-background-clip: text;
    background-clip: text;
    -webkit-text-fill-color: transparent;
}
.stat-label { font-size: .8rem; color: var(--text-muted); }

/* ============================================================
   FOOTER
   ============================================================ */
.footer { background: var(--bg-primary); padding: 54px 0 26px; }

.footer-grid {
    display: grid;
    grid-template-columns: 2.2fr 1fr 1fr 1fr 1fr;
    gap: 36px;
    padding-bottom: 40px;
}

.footer-brand .logo { margin-bottom: 14px; }
.footer-tag {
    font-size: .85rem;
    line-height: 1.65;
    color: var(--text-muted);
    max-width: 300px;
}

.footer-col { display: flex; flex-direction: column; gap: 11px; }
.footer-col h4 {
    font-size: .78rem;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: .07em;
    color: var(--text-primary);
    margin-bottom: 3px;
}
.footer-col a {
    font-size: .85rem;
    color: var(--text-muted);
    width: fit-content;
    transition: color .18s;
}
.footer-col a:hover { color: var(--frost-primary); }

.footer-bottom {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 16px;
    flex-wrap: wrap;
    padding-top: 24px;
    border-top: 1px solid var(--border-color);
    font-size: .8rem;
    color: var(--text-muted);
}
.footer-status { display: inline-flex; align-items: center; gap: 8px; }

/* ============================================================
   MOBILE DRAWER
   ============================================================ */
.drawer-backdrop {
    position: fixed;
    inset: 0;
    z-index: 300;
    background: rgba(0, 0, 0, .7);
    backdrop-filter: blur(3px);
    -webkit-backdrop-filter: blur(3px);
    opacity: 0;
    visibility: hidden;
    transition: opacity .28s ease, visibility .28s ease;
}
body.menu-open .drawer-backdrop { opacity: 1; visibility: visible; }

.drawer {
    position: fixed;
    top: 0;
    left: 0;
    bottom: 0;
    z-index: 400;
    display: flex;
    flex-direction: column;
    width: 284px;
    max-width: 84vw;
    padding: 18px 16px 20px;
    border-right: 1px solid var(--border-color);
    background: var(--bg-secondary);
    transform: translateX(-100%);
    transition: transform .3s cubic-bezier(.4,0,.2,1);
    visibility: hidden;
    overflow-y: auto;
    /* we handle horizontal gestures ourselves, browser keeps vertical scroll */
    touch-action: pan-y;
}
body.menu-open .drawer { transform: none; visibility: visible; }

/* while a finger is dragging, transitions must not fight the live transform */
body.drawer-dragging .drawer,
body.drawer-dragging .drawer-backdrop { transition: none; }

.drawer-head {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 12px;
    padding-bottom: 18px;
    margin-bottom: 8px;
    border-bottom: 1px solid var(--border-color);
}

.drawer-close {
    display: grid;
    place-items: center;
    width: 32px; height: 32px;
    flex-shrink: 0;
    border: 1px solid var(--border-color);
    border-radius: 9px;
    background: var(--bg-input);
    color: var(--text-secondary);
    cursor: pointer;
    transition: color .2s, border-color .2s, background .2s;
}
.drawer-close:hover { color: var(--text-primary); border-color: var(--border-hi); background: var(--bg-hover); }

.drawer-nav { display: flex; flex-direction: column; padding: 8px 0; }

/* profile block above the nav — same geometry as nav rows */
.drawer-profile {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 10px;
    margin: 0 0 6px;
    border-radius: 11px;
    border: 1px solid var(--border-color);
    background: var(--bg-input);
    transition: border-color .18s, background .18s;
}
.drawer-profile:hover { border-color: var(--border-hi); background: var(--bg-hover); }

.drawer-avatar {
    display: grid;
    place-items: center;
    width: 32px; height: 32px;
    flex-shrink: 0;
    border-radius: 9px;
    border: 1px solid var(--border-hi);
    background:
        linear-gradient(160deg, rgba(255,107,53,.09), transparent 68%),
        var(--bg-input);
    color: var(--frost-primary);
}

.drawer-profile-text { display: flex; flex-direction: column; min-width: 0; }
.drawer-profile-name {
    font-size: .9rem;
    font-weight: 650;
    letter-spacing: -.01em;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}
.drawer-profile-email {
    font-size: .76rem;
    color: var(--text-muted);
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.drawer-nav a,
.drawer-nav .dn-toggle,
.drawer-nav .dn-row {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 9px 10px;
    border-radius: 11px;
    font-size: .93rem;
    font-weight: 550;
    color: var(--text-secondary);
    transition: color .18s, background .18s;
}
.drawer-nav a:hover,
.drawer-nav a:active,
.drawer-nav .dn-toggle:hover { color: var(--text-primary); background: var(--bg-hover); }

/* the row itself does nothing — the segment on the right is the control, so it
   must not offer a hover affordance for the whole strip */
.drawer-nav .dn-row { cursor: default; }

/* iOS-style switch: pill track, sliding knob, grey when off and accent when on.
   Styled off aria-checked so the visual state is the accessibility state. */
.dn-switch {
    position: relative;
    flex-shrink: 0;
    width: 44px;
    height: 26px;
    padding: 0;
    border: none;
    border-radius: 100px;
    background: #3a3a3a;
    cursor: pointer;
    transition: background .24s cubic-bezier(.4,0,.2,1);
}
.dn-switch[aria-checked="true"] { background: var(--frost-primary); }

.dn-switch-knob {
    position: absolute;
    top: 3px;
    left: 3px;
    width: 20px;
    height: 20px;
    border-radius: 50%;
    background: #fff;
    box-shadow: 0 1px 3px rgba(0,0,0,.35);
    transition: transform .24s cubic-bezier(.4,0,.2,1);
}
/* 44 - 3 - 20 - 3 = 18 */
.dn-switch[aria-checked="true"] .dn-switch-knob { transform: translateX(18px); }

/* the toggle is a button, so it needs the chrome reset the links get for free */
.drawer-nav .dn-toggle {
    width: 100%;
    border: none;
    background: none;
    font-family: inherit;
    text-align: left;
    cursor: pointer;
}

.dn-sep {
    height: 1px;
    margin: 7px 10px;
    background: var(--border-color);
}

/* current language, shown collapsed so the row reads without opening */
.dn-current {
    font-size: .8rem;
    color: var(--text-muted);
    flex-shrink: 0;
}

.dn-chevron {
    color: var(--text-muted);
    flex-shrink: 0;
    transition: transform .28s cubic-bezier(.4,0,.2,1);
}
.dn-toggle.open .dn-chevron { transform: rotate(180deg); }
.dn-toggle.open { color: var(--frost-primary); }
.dn-toggle.open .dn-ico {
    color: var(--frost-primary);
    border-color: var(--frost-primary);
    background: var(--frost-soft);
}

/* 0fr -> 1fr animates to the natural height without measuring it in JS,
   matching how the profile page expands its inline forms */
.drawer-lang-wrap {
    display: grid;
    grid-template-rows: 0fr;
    transition: grid-template-rows .28s cubic-bezier(.4,0,.2,1);
}
.drawer-lang-wrap.open { grid-template-rows: 1fr; }
.drawer-lang-inner { overflow: hidden; min-height: 0; }

.dl-opt {
    display: flex;
    align-items: center;
    gap: 10px;
    width: 100%;
    padding: 8px 10px 8px 16px;
    border: none;
    border-radius: 10px;
    background: none;
    font-family: inherit;
    text-align: left;
    cursor: pointer;
    transition: background .15s;
}
.dl-opt:hover { background: var(--bg-hover); }

.dl-names { display: flex; flex-direction: column; flex: 1; min-width: 0; }
.dl-native {
    font-size: .875rem;
    font-weight: 550;
    line-height: 1.3;
    color: var(--text-secondary);
}
.dl-opt:hover .dl-native { color: var(--text-primary); }
.dl-opt.active .dl-native { color: var(--text-primary); font-weight: 600; }
.dl-en { font-size: .715rem; line-height: 1.3; color: var(--text-muted); }

.dl-opt.active .lang-chip {
    border-color: var(--frost-primary);
    color: var(--frost-primary);
    background: var(--frost-soft);
}
.dl-opt.active .dd-check { opacity: 1; }

.dn-label { flex: 1; min-width: 0; }
.dn-arrow { color: var(--text-muted); flex-shrink: 0; }

.dn-ico {
    display: grid;
    place-items: center;
    width: 32px;
    height: 32px;
    flex-shrink: 0;
    border: 1px solid var(--border-color);
    border-radius: 9px;
    background: var(--bg-input);
    color: var(--text-secondary);
    transition: color .18s, border-color .18s, background .18s;
}
.drawer-nav a:hover .dn-ico,
.drawer-nav a:active .dn-ico,
.drawer-nav .dn-toggle:hover .dn-ico {
    color: var(--frost-primary);
    border-color: var(--frost-primary);
    background: var(--frost-soft);
}

.drawer-foot {
    display: flex;
    flex-direction: column;
    gap: 9px;
    margin-top: auto;
    padding-top: 18px;
    border-top: 1px solid var(--border-color);
}
.drawer-foot .btn { padding: 13px 20px; }

/* ============================================================
   API DOCS
   ============================================================ */
.docs-hero {
    max-width: 720px;
    padding-bottom: 34px;
    border-bottom: 1px solid var(--border-color);
    margin-bottom: 34px;
}
.docs-hero .page-title { margin-bottom: 14px; }
.docs-hero .page-sub { margin: 0 0 22px; max-width: 620px; }

.base-url {
    display: inline-flex;
    align-items: center;
    gap: 12px;
    padding: 9px 10px 9px 14px;
    border: 1px solid var(--border-color);
    border-radius: var(--radius-sm);
    background: var(--bg-input);
    max-width: 100%;
}
.base-url-label {
    font-size: .68rem;
    font-weight: 700;
    letter-spacing: .07em;
    text-transform: uppercase;
    color: var(--text-muted);
    flex-shrink: 0;
}
.base-url code {
    font-family: var(--mono);
    font-size: .84rem;
    color: var(--frost-primary);
    word-break: break-all;
}

.docs-langnote {
    margin-top: 16px;
    font-size: .8rem;
    color: var(--text-muted);
}

.docs-layout {
    display: grid;
    grid-template-columns: 214px minmax(0, 1fr);
    gap: 46px;
    padding-bottom: 90px;
    align-items: start;
}

/* table of contents */
.toc { position: sticky; top: 90px; }
.toc-inner { display: flex; flex-direction: column; gap: 1px; }

.toc-title {
    font-size: .68rem;
    font-weight: 700;
    letter-spacing: .08em;
    text-transform: uppercase;
    color: var(--text-muted);
    margin-bottom: 12px;
}

.toc-group {
    font-size: .68rem;
    font-weight: 700;
    letter-spacing: .08em;
    text-transform: uppercase;
    color: var(--text-muted);
    margin: 18px 0 7px;
}

.toc-link {
    padding: 6px 12px;
    border-left: 1.5px solid var(--border-color);
    font-size: .84rem;
    font-weight: 500;
    color: var(--text-secondary);
    transition: color .16s, border-color .16s;
}
.toc-link.sub { padding-left: 20px; }
.toc-link:hover { color: var(--text-primary); border-color: var(--border-hi); }
.toc-link.current {
    color: var(--frost-primary);
    border-color: var(--frost-primary);
    font-weight: 600;
}

/* content */
.docs-body { min-width: 0; }

.doc-section { padding-bottom: 46px; }
.doc-section:not(:first-child) { padding-top: 10px; }

/* offset so anchors are not swallowed by the sticky header */
.doc-section { scroll-margin-top: 86px; }

.doc-h2 {
    font-size: 1.42rem;
    font-weight: 750;
    letter-spacing: -.03em;
    margin-bottom: 12px;
}

.doc-h3 {
    font-size: 1rem;
    font-weight: 700;
    letter-spacing: -.015em;
    margin: 28px 0 12px;
}

.doc-p {
    font-size: .93rem;
    line-height: 1.72;
    color: var(--text-secondary);
    margin-bottom: 18px;
    max-width: 68ch;
}
.doc-p:last-child { margin-bottom: 0; }

/* inline code */
.doc-p code, .doc-table code, .callout code, .flow code {
    padding: 1.5px 5px;
    border: 1px solid var(--border-color);
    border-radius: 5px;
    background: var(--bg-input);
    font-family: var(--mono);
    font-size: .84em;
    color: var(--frost-primary);
    white-space: nowrap;
}

/* endpoint header */
.endpoint {
    display: flex;
    align-items: center;
    gap: 11px;
    flex-wrap: wrap;
    padding: 11px 14px;
    margin-bottom: 18px;
    border: 1px solid var(--border-color);
    border-radius: var(--radius-sm);
    background: var(--bg-input);
}
.endpoint code {
    font-family: var(--mono);
    font-size: .89rem;
    font-weight: 500;
    color: var(--text-primary);
    word-break: break-all;
}

.method {
    padding: 3px 9px;
    border-radius: 6px;
    font-size: .68rem;
    font-weight: 800;
    letter-spacing: .06em;
    flex-shrink: 0;
}
.method.get  { background: rgba(255,179,71,.14);  color: var(--ok); }
.method.post { background: rgba(255,107,53,.14);   color: var(--frost-primary); }

/* flow list */
.flow { list-style: none; display: flex; flex-direction: column; gap: 2px; margin-bottom: 22px; }
.flow li { display: flex; gap: 14px; padding: 13px 0; border-bottom: 1px solid var(--border-color); }
.flow li:last-child { border-bottom: none; }

.flow-n {
    display: grid;
    place-items: center;
    width: 26px; height: 26px;
    flex-shrink: 0;
    border-radius: 50%;
    background: var(--frost-soft);
    border: 1px solid var(--frost-primary);
    color: var(--frost-primary);
    font-size: .76rem;
    font-weight: 800;
}
.flow li div { display: flex; flex-direction: column; gap: 4px; min-width: 0; }
.flow b { font-size: .92rem; font-weight: 650; color: var(--text-primary); }
.flow span:not(.flow-n) { font-size: .875rem; line-height: 1.65; color: var(--text-secondary); }

/* code blocks */
.code-block {
    border: 1px solid var(--border-color);
    border-radius: var(--radius-sm);
    background: var(--bg-input);
    margin-bottom: 20px;
    overflow: hidden;
}

.code-head {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 12px;
    padding: 8px 10px 8px 14px;
    border-bottom: 1px solid var(--border-color);
    background: var(--bg-elevated);
}
.code-lang {
    font-size: .68rem;
    font-weight: 700;
    letter-spacing: .07em;
    text-transform: uppercase;
    color: var(--text-muted);
}
.code-copy {
    padding: 4px 10px;
    border: 1px solid var(--border-color);
    border-radius: 7px;
    background: var(--bg-input);
    color: var(--text-secondary);
    font-family: inherit;
    font-size: .72rem;
    font-weight: 600;
    cursor: pointer;
    transition: color .18s, border-color .18s, background .18s;
}
.code-copy:hover { color: var(--frost-primary); border-color: var(--frost-primary); background: var(--frost-soft); }
.code-copy.done { color: var(--ok); border-color: var(--ok); background: rgba(255,179,71,.1); }

.code-block pre {
    padding: 15px 16px;
    overflow-x: auto;
    -webkit-overflow-scrolling: touch;
}
.code-block code {
    font-family: var(--mono);
    font-size: .82rem;
    line-height: 1.72;
    color: var(--text-primary);
    white-space: pre;
}

/* tables */
.table-wrap {
    border: 1px solid var(--border-color);
    border-radius: var(--radius-sm);
    overflow-x: auto;
    -webkit-overflow-scrolling: touch;
    margin-bottom: 20px;
}

.doc-table {
    width: 100%;
    border-collapse: collapse;
    font-size: .875rem;
    min-width: 460px;
}
.doc-table th {
    padding: 11px 14px;
    text-align: left;
    font-size: .68rem;
    font-weight: 700;
    letter-spacing: .07em;
    text-transform: uppercase;
    color: var(--text-muted);
    background: var(--bg-elevated);
    border-bottom: 1px solid var(--border-color);
    white-space: nowrap;
}
.doc-table td {
    padding: 12px 14px;
    vertical-align: top;
    line-height: 1.6;
    color: var(--text-secondary);
    border-bottom: 1px solid var(--border-color);
}
.doc-table tr:last-child td { border-bottom: none; }
.doc-table td:first-child { white-space: nowrap; }

.pill {
    display: inline-block;
    padding: 2px 7px;
    border-radius: 5px;
    font-size: .66rem;
    font-weight: 700;
    letter-spacing: .02em;
    white-space: nowrap;
}
.pill.req { background: rgba(242,85,90,.12); color: #f2555a; }
.pill.opt { background: var(--bg-hover); color: var(--text-muted); }
.pill.rec { background: rgba(255,107,53,.12); color: var(--frost-primary); }

/* callouts */
.callout {
    display: flex;
    gap: 12px;
    padding: 14px 16px;
    border-radius: var(--radius-sm);
    margin-bottom: 20px;
}
.callout svg { flex-shrink: 0; margin-top: 2px; }
.callout div { font-size: .875rem; line-height: 1.68; color: var(--text-secondary); }
.callout b { display: block; margin-bottom: 3px; }

.callout.info { border: 1px solid var(--border-hi); background: var(--frost-soft); color: var(--frost-primary); }
.callout.info b { color: var(--text-primary); }

.callout.warn { border: 1px solid rgba(255,176,32,.28); background: rgba(255,176,32,.07); color: #ffb020; }
.callout.warn b { color: #ffb020; }

/* SDK grid */
.sdk-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(232px, 1fr));
    gap: 10px;
    margin-bottom: 20px;
}
.sdk {
    display: flex;
    flex-direction: column;
    gap: 6px;
    padding: 14px 15px;
    border: 1px solid var(--border-color);
    border-radius: var(--radius-sm);
    background: var(--bg-input);
}
.sdk-name { font-size: .875rem; font-weight: 650; color: var(--text-primary); }
.sdk code {
    font-family: var(--mono);
    font-size: .76rem;
    color: var(--frost-primary);
    word-break: break-all;
}

/* ---------- legal pages (terms / privacy / aml) ---------- */

/* version + effective date strip under the title */
.legal-meta {
    display: flex;
    flex-wrap: wrap;
    gap: 8px 10px;
    margin-bottom: 4px;
}
.legal-meta span {
    padding: 5px 11px;
    border: 1px solid var(--border-color);
    border-radius: 100px;
    background: var(--bg-input);
    font-size: .76rem;
    color: var(--text-secondary);
    white-space: nowrap;
}
.legal-meta b {
    font-weight: 700;
    color: var(--text-muted);
    margin-right: 3px;
}

/* clause lists — <ul> gets dashes, <ol> gets its own numbering */
.legal-list {
    list-style: none;
    margin: 0 0 20px;
    padding: 0;
    max-width: 68ch;
    counter-reset: clause;
}
.legal-list li {
    position: relative;
    padding-left: 26px;
    margin-bottom: 10px;
    font-size: .93rem;
    line-height: 1.72;
    color: var(--text-secondary);
}
.legal-list li:last-child { margin-bottom: 0; }

ul.legal-list > li::before {
    content: "";
    position: absolute;
    left: 6px;
    top: .78em;
    width: 8px;
    height: 1.5px;
    background: var(--frost-primary);
    opacity: .75;
}
ol.legal-list > li {
    counter-increment: clause;
    padding-left: 32px;
}
ol.legal-list > li::before {
    content: counter(clause) ".";
    position: absolute;
    left: 0;
    top: 0;
    width: 24px;
    text-align: right;
    font-family: var(--mono);
    font-size: .82rem;
    font-weight: 500;
    color: var(--frost-primary);
}

/* nested lists sit tighter and drop the accent colour */
.legal-list .legal-list { margin: 10px 0 0; }

.legal-list b { color: var(--text-primary); font-weight: 650; }
.legal-list a { color: var(--frost-primary); }
.legal-list a:hover { text-decoration: underline; }

.legal-list code {
    padding: 1.5px 5px;
    border: 1px solid var(--border-color);
    border-radius: 5px;
    background: var(--bg-input);
    font-family: var(--mono);
    font-size: .84em;
    color: var(--frost-primary);
    white-space: nowrap;
}

/* inline links inside body copy and tables */
.doc-p a, .doc-table a {
    color: var(--frost-primary);
    border-bottom: 1px solid transparent;
    transition: border-color .18s;
}
.doc-p a:hover, .doc-table a:hover { border-bottom-color: var(--frost-primary); }

/* legal tables carry sentences, not identifiers — let the first column wrap */
.docs-body.legal .doc-table td:first-child { white-space: normal; min-width: 120px; }
.docs-body.legal .doc-table { min-width: 0; }

/* current nav item */
.nav-link.current { color: var(--text-primary); background: var(--bg-hover); }

/* ---------- account chip (logged-in state) ---------- */
.account {
    display: inline-flex;
    align-items: center;
    gap: 7px;
    max-width: 220px;
    padding: 7px 12px;
    border: 1px solid var(--border-color);
    border-radius: 100px;
    background: var(--bg-input);
    color: var(--text-secondary);
    font-size: .8rem;
    font-weight: 600;
}
.account svg { flex-shrink: 0; color: var(--frost-primary); }
.account-email {
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.logout-form { display: inline-flex; }

/* same family as the lang / theme controls: quiet bordered square-button */
.logout-btn {
    display: inline-flex;
    align-items: center;
    gap: 7px;
    padding: 8px 12px;
    border: 1px solid var(--border-color);
    border-radius: 10px;
    background: var(--bg-input);
    color: var(--text-secondary);
    font-family: inherit;
    font-size: .82rem;
    font-weight: 600;
    cursor: pointer;
    transition: color .18s, border-color .18s, background .18s;
}
.logout-btn:hover { color: var(--frost-primary); border-color: var(--border-hi); background: var(--bg-hover); }

.form-error { margin: 2px 0 10px; }

/* ============================================================
   AUTH (login / register)
   ============================================================ */
.auth-wrap { display: flex; justify-content: center; padding: 26px 0 84px; }

.auth-card {
    display: grid;
    grid-template-columns: 328px minmax(0, 1fr);
    width: 100%;
    max-width: 860px;
    background: color-mix(in srgb, var(--bg-card) 20%, transparent);
    -webkit-backdrop-filter: blur(14px) saturate(1.25);
    backdrop-filter: blur(14px) saturate(1.25);
    border: 1px solid var(--border-color);
    border-radius: var(--radius);
    box-shadow: var(--shadow-card);
    overflow: hidden;
}

/* ---------- frost pane (desktop only) ---------- */
.auth-pane {
    position: relative;
    display: flex;
    flex-direction: column;
    gap: 24px;
    padding: 34px 28px;
    background:
        linear-gradient(165deg, rgba(255,107,53,.10), rgba(255,179,71,.05) 55%, transparent),
        var(--bg-secondary);
    border-right: 1px solid var(--border-color);
    overflow: hidden;
}

/* drifting aurora glow — the one animated element on the page */
.auth-pane::before {
    content: "";
    position: absolute;
    top: -130px;
    left: -90px;
    width: 320px;
    height: 320px;
    background: radial-gradient(circle, rgba(255,107,53,.20), transparent 65%);
    filter: blur(8px);
    animation: authFloat 16s ease-in-out infinite alternate;
    pointer-events: none;
}
@keyframes authFloat {
    from { transform: translate(0, 0) scale(1); }
    to   { transform: translate(46px, 64px) scale(1.12); }
}

.auth-pane > * { position: relative; }

.auth-pane-title {
    font-size: 1.42rem;
    font-weight: 750;
    letter-spacing: -.03em;
    line-height: 1.25;
}

.auth-pane-list { list-style: none; display: flex; flex-direction: column; gap: 14px; }
.auth-pane-list li {
    display: flex;
    align-items: flex-start;
    gap: 11px;
    font-size: .88rem;
    color: var(--text-secondary);
}
.auth-pane-list svg { flex-shrink: 0; margin-top: 2px; color: var(--frost-primary); }

.auth-pane-status {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    margin-top: auto;
    padding-top: 20px;
    border-top: 1px solid var(--border-color);
    font-size: .78rem;
    font-weight: 600;
    color: var(--text-muted);
}

/* ---------- form ---------- */
.auth-form { padding: 34px 34px 30px; }

.auth-title {
    font-size: 1.48rem;
    font-weight: 750;
    letter-spacing: -.03em;
    margin-bottom: 6px;
}
.auth-sub { font-size: .9rem; color: var(--text-secondary); margin-bottom: 26px; }

.auth-input {
    width: 100%;
    padding: 13px 16px;
    border: 1px solid var(--border-color);
    border-radius: var(--radius-sm);
    background: var(--bg-input);
    color: var(--text-primary);
    font-family: inherit;
    font-size: .95rem;
    font-weight: 550;
    outline: none;
    transition: border-color .2s, box-shadow .2s;
}
/* focus = one outline: the border itself. No extra ring around it. */
.auth-input:focus { border-color: var(--frost-primary); }
.auth-input::placeholder { color: var(--text-muted); }
.auth-input.invalid { border-color: #f2555a; }

/* ---------- Google sign-in ---------- */
.auth-google {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 10px;
    margin-bottom: 18px;
    padding: 12px 16px;
    border: 1px solid var(--border-color);
    border-radius: var(--radius-sm);
    background: var(--bg-input);
    color: var(--text-primary);
    font-size: .95rem;
    font-weight: 600;
    transition: border-color .2s, background .2s;
}
.auth-google:hover { border-color: var(--border-hi); background: var(--bg-hover); }

.auth-divider {
    display: flex;
    align-items: center;
    gap: 12px;
    margin-bottom: 20px;
    color: var(--text-muted);
    font-size: .76rem;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: .06em;
}
.auth-divider::before,
.auth-divider::after { content: ''; flex: 1; height: 1px; background: var(--border-color); }

.auth-input-wrap { position: relative; }
.auth-input-wrap .auth-input { padding-right: 46px; }

.auth-eye {
    position: absolute;
    top: 50%;
    right: 6px;
    transform: translateY(-50%);
    display: grid;
    place-items: center;
    width: 34px;
    height: 34px;
    border: none;
    border-radius: 9px;
    background: none;
    color: var(--text-muted);
    cursor: pointer;
    transition: color .18s, background .18s;
}
.auth-eye:hover { color: var(--text-primary); background: var(--bg-hover); }

.field-error {
    display: none;
    margin-top: 7px;
    font-size: .78rem;
    font-weight: 550;
    color: #f2555a;
}
.field-error.show { display: block; }

/* ---------- strength meter ---------- */
.strength {
    display: flex;
    align-items: center;
    gap: 10px;
    margin-top: 10px;
    opacity: .55;
    transition: opacity .25s;
}
.strength.weak, .strength.fair, .strength.good { opacity: 1; }

.strength-bars { display: flex; gap: 4px; flex: 1; }
.strength-bar {
    height: 4px;
    flex: 1;
    border-radius: 100px;
    background: var(--border-hi);
    transition: background .25s;
}
.strength.weak .strength-bar.on { background: #f2555a; }
.strength.fair .strength-bar.on { background: #ffb020; }
.strength.good .strength-bar.on { background: var(--ok); }

.strength-label { font-size: .76rem; font-weight: 600; color: var(--text-muted); white-space: nowrap; }

/* ---------- terms checkbox ---------- */
.auth-check {
    display: flex;
    align-items: flex-start;
    gap: 10px;
    font-size: .82rem;
    color: var(--text-secondary);
    cursor: pointer;
}
.auth-check input {
    width: 16px;
    height: 16px;
    margin-top: 2px;
    flex-shrink: 0;
    accent-color: var(--frost-primary);
    cursor: pointer;
}
.auth-check a { color: var(--frost-primary); font-weight: 600; }
.auth-check a:hover { opacity: .75; }

/* ---------- footer of the form ---------- */
.auth-submit { margin-top: 4px; }

.auth-alt {
    margin-top: 22px;
    text-align: center;
    font-size: .86rem;
    color: var(--text-secondary);
}
.auth-alt a { color: var(--frost-primary); font-weight: 650; margin-left: 6px; }
.auth-alt a:hover { opacity: .75; }

.auth-demo {
    display: flex;
    align-items: flex-start;
    gap: 10px;
    margin-top: 18px;
    padding: 12px 14px;
    border: 1px solid var(--frost-ring);
    border-radius: var(--radius-sm);
    background: var(--frost-soft);
    font-size: .82rem;
    color: var(--text-secondary);
    animation: fadeUp .32s cubic-bezier(.4,0,.2,1);
}
.auth-demo[hidden] { display: none; }
.auth-demo svg { flex-shrink: 0; margin-top: 2px; color: var(--frost-primary); }

@media (max-width: 900px) {
    .auth-card { grid-template-columns: 1fr; max-width: 480px; }
    .auth-pane { display: none; }
}

@media (max-width: 560px) {
    .auth-wrap { padding: 8px 0 60px; }
    .auth-card { border-radius: 15px; }
    .auth-form { padding: 26px 20px 24px; }
}

/* ============================================================
   PROFILE (merchant account) — settings-style stack
   ============================================================ */

.profile-wrap {
    max-width: 720px;
    margin: 0 auto;
    padding-bottom: 90px;
}

.profile-eyebrow { margin-bottom: 18px; }

/* ---------- hero ---------- */
.profile-hero {
    display: flex;
    align-items: center;
    gap: 16px;
    padding: 20px 22px;
    margin-bottom: 14px;
    border: 1px solid var(--border-color);
    border-radius: var(--radius);
    background: var(--bg-card);
    box-shadow: var(--shadow-card);
    animation: fadeUp .32s cubic-bezier(.4,0,.2,1);
}

/* dark theme: a restrained tile — the icon carries the accent, not the whole
   block. A saturated gradient here reads as a glowing rectangle against
   near-black, which is what it looked like before. */
.profile-avatar {
    display: grid;
    place-items: center;
    width: 52px;
    height: 52px;
    flex-shrink: 0;
    border-radius: 16px;
    border: 1px solid var(--border-hi);
    background:
        linear-gradient(160deg, rgba(255,107,53,.09), transparent 68%),
        var(--bg-input);
    color: var(--frost-primary);
}

.profile-hero-text { min-width: 0; flex: 1; }
.profile-name {
    font-size: 1.22rem;
    font-weight: 750;
    letter-spacing: -.02em;
    margin-bottom: 2px;
}
.profile-email {
    display: block;
    font-size: .88rem;
    color: var(--text-secondary);
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.profile-since {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    flex-shrink: 0;
    padding: 6px 12px;
    border: 1px solid var(--border-color);
    border-radius: 100px;
    background: var(--bg-input);
    font-size: .74rem;
    font-weight: 600;
    color: var(--text-muted);
    white-space: nowrap;
}
.profile-since svg { opacity: .7; }

/* ---------- settings cards ---------- */
.set-card {
    margin-bottom: 14px;
    border: 1px solid var(--border-color);
    border-radius: var(--radius);
    background: var(--bg-card);
    box-shadow: var(--shadow-card);
    overflow: hidden;
}

.set-head {
    display: flex;
    align-items: flex-start;
    justify-content: space-between;
    gap: 18px;
    padding: 20px 22px;
}

.set-titles { min-width: 0; }
.set-titles h2 {
    font-size: 1.02rem;
    font-weight: 700;
    letter-spacing: -.015em;
    margin-bottom: 5px;
}
.set-titles p {
    font-size: .84rem;
    line-height: 1.62;
    color: var(--text-secondary);
    max-width: 56ch;
}

.set-docs-link {
    display: inline-flex;
    align-items: center;
    gap: 7px;
    margin-top: 10px;
    font-size: .82rem;
    font-weight: 650;
    color: var(--frost-primary);
}
.set-docs-link svg { flex-shrink: 0; }
.set-docs-link:hover { opacity: .75; }

/* quiet action on the right of a settings row */
.set-action {
    flex-shrink: 0;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 7px;
    padding: 9px 16px;
    border: 1px solid var(--border-color);
    border-radius: 10px;
    background: var(--bg-input);
    color: var(--text-secondary);
    font-family: inherit;
    font-size: .82rem;
    font-weight: 650;
    cursor: pointer;
    white-space: nowrap;
    transition: color .16s, border-color .16s, background .16s, filter .16s;
}
.set-action:hover { color: var(--frost-primary); border-color: var(--frost-primary); background: var(--frost-soft); }
.set-action.primary {
    border-color: transparent;
    background: var(--frost-gradient);
    color: #fff;
}
.set-action.primary:hover { color: #fff; filter: brightness(1.07); }
.set-action.danger:hover { color: #f2555a; border-color: rgba(242,85,90,.45); background: rgba(242,85,90,.07); }

/* ---------- inline forms (progressive disclosure) ----------
   grid-template-rows 0fr → 1fr animates height smoothly with
   padding in play; the inner wrapper clips while collapsing. */
.set-body {
    display: grid;
    grid-template-rows: 0fr;
    transition: grid-template-rows .34s cubic-bezier(.4,0,.2,1);
}
.set-body[hidden] { display: none; }
.set-body.open { grid-template-rows: 1fr; }

.set-inner {
    overflow: hidden;
    min-height: 0;
    padding: 2px 22px 22px;
    opacity: 0;
    transition: opacity .26s ease;
}
.set-body.open .set-inner { opacity: 1; }

.set-note {
    margin-bottom: 14px;
    font-size: .82rem;
    color: var(--text-muted);
}

.set-field {
    display: flex;
    flex-direction: column;
    gap: 7px;
    margin-bottom: 14px;
}
.set-field > span {
    font-size: .78rem;
    font-weight: 650;
    color: var(--text-secondary);
}
.set-field .auth-input { padding: 11px 14px; }

.set-row {
    display: grid;
    grid-template-columns: minmax(0, 2fr) minmax(0, 1fr);
    gap: 0 12px;
}
.set-row .set-field:last-child { margin-bottom: 14px; }

.set-actions { display: flex; gap: 10px; margin-top: 4px; }
.set-actions .btn { padding: 11px 18px; white-space: nowrap; }

/* success line under a card head */
.set-ok {
    display: none;
    margin: 0 22px 18px;
    padding: 10px 14px;
    border: 1px solid rgba(255,179,71,.25);
    border-radius: var(--radius-sm);
    background: rgba(255,179,71,.08);
    font-size: .82rem;
    font-weight: 650;
    color: var(--ok);
}
.set-ok.show {
    display: block;
    animation: fadeUp .25s cubic-bezier(.4,0,.2,1);
}

/* ---------- key reveal (signature moment) ---------- */
.key-reveal {
    margin: 0 22px 18px;
    padding: 20px;
    border: 1px solid transparent;
    border-radius: var(--radius);
    background:
        linear-gradient(var(--bg-card), var(--bg-card)) padding-box,
        var(--frost-gradient) border-box;
    box-shadow: 0 14px 44px -14px rgba(255,107,53,.35);
    animation: fadeUp .3s cubic-bezier(.4,0,.2,1);
}
.key-reveal[hidden] { display: none; }

.key-reveal-head {
    display: flex;
    align-items: center;
    gap: 9px;
    margin-bottom: 14px;
    color: #ffb020;
    font-size: .92rem;
}
.key-reveal-head b { color: var(--text-primary); }

.key-reveal-body {
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 13px 15px;
    border: 1px solid var(--border-hi);
    border-radius: var(--radius-sm);
    background: var(--bg-input);
}
.key-reveal-body .copy-btn { flex-shrink: 0; }

.key-reveal-value {
    flex: 1;
    min-width: 0;
    font-family: var(--mono);
    font-size: .82rem;
    font-weight: 500;
    color: var(--frost-primary);
    word-break: break-all;
}

.key-reveal-warn {
    margin: 12px 0 16px;
    font-size: .8rem;
    color: var(--text-secondary);
}

/* ---------- key list ---------- */
.key-list { border-top: 1px solid var(--border-color); }

.key-row {
    display: flex;
    align-items: center;
    gap: 14px;
    padding: 13px 22px;
    transition: background .15s, opacity .25s;
}
.key-row:hover { background: var(--bg-hover); }
.key-row + .key-row { border-top: 1px solid var(--border-color); }

.key-row-main {
    flex: 1;
    min-width: 0;
    display: flex;
    flex-direction: column;
    gap: 2px;
}
.key-row-name {
    font-size: .9rem;
    font-weight: 650;
    color: var(--text-primary);
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}
.key-row-prefix {
    font-family: var(--mono);
    font-size: .76rem;
    color: var(--text-muted);
}

.key-row-date {
    font-size: .78rem;
    font-weight: 550;
    color: var(--text-muted);
    white-space: nowrap;
}

.key-revoke {
    flex-shrink: 0;
    padding: 7px 13px;
    border: 1px solid var(--border-color);
    border-radius: 9px;
    background: none;
    color: var(--text-secondary);
    font-family: inherit;
    font-size: .78rem;
    font-weight: 650;
    cursor: pointer;
    transition: color .16s, border-color .16s, background .16s;
}
.key-revoke:hover { color: #f2555a; border-color: rgba(242,85,90,.4); background: rgba(242,85,90,.07); }
.key-revoke:disabled { opacity: .55; cursor: wait; }

/* ---------- wallet connected view ---------- */
.wallet-view {
    display: flex;
    align-items: center;
    gap: 14px;
    flex-wrap: wrap;
    padding: 0 22px 20px;
}

.wallet-chip {
    display: inline-flex;
    align-items: center;
    gap: 7px;
    padding: 5px 12px;
    border-radius: 100px;
    background: rgba(255,179,71,.1);
    color: var(--ok);
    font-size: .74rem;
    font-weight: 700;
}

.wallet-address {
    flex: 1;
    min-width: 220px;
    font-family: var(--mono);
    font-size: .88rem;
    font-weight: 500;
    color: var(--text-primary);
    word-break: break-all;
}

.wallet-net {
    padding: 3px 10px;
    border-radius: 6px;
    background: var(--bg-input);
    border: 1px solid var(--border-color);
    font-family: var(--mono);
    font-size: .74rem;
    font-weight: 600;
    color: var(--text-secondary);
}

/* ---------- empty states ---------- */
.set-empty {
    padding: 26px 22px;
    border-top: 1px solid var(--border-color);
    text-align: center;
    font-size: .84rem;
    color: var(--text-muted);
}

/* ---------- transactions ---------- */
.tx-list { border-top: 1px solid var(--border-color); }

.tx-row {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 10px 18px;
    flex-wrap: wrap;
    padding: 13px 22px;
    transition: background .15s;
}
.tx-row:hover { background: var(--bg-hover); }
.tx-row + .tx-row { border-top: 1px solid var(--border-color); }

.tx-left {
    display: flex;
    align-items: baseline;
    gap: 10px;
    min-width: 0;
    flex-wrap: wrap;
}

.tx-id {
    font-family: var(--mono);
    font-size: .8rem;
    font-weight: 500;
    color: var(--text-primary);
}

.tx-asset { font-size: .8rem; color: var(--text-secondary); }

.tx-right {
    display: flex;
    align-items: center;
    gap: 12px;
    flex-wrap: wrap;
}

.tx-amount {
    font-size: .88rem;
    font-weight: 600;
    color: var(--text-primary);
}

.tx-date {
    font-size: .78rem;
    font-weight: 550;
    color: var(--text-muted);
    white-space: nowrap;
}

/* status badges */
.st {
    display: inline-flex;
    align-items: center;
    padding: 4px 11px;
    border-radius: 100px;
    font-size: .74rem;
    font-weight: 700;
}
.st-pending    { background: rgba(255,107,53,.11);  color: var(--frost-primary); }
.st-confirming { background: rgba(255,176,32,.12); color: #ffb020; }
.st-queued     { background: rgba(255,176,32,.12); color: #ffb020; }
.st-sent       { background: rgba(255,179,71,.12); color: var(--ok); }
.st-paid       { background: rgba(255,179,71,.12); color: var(--ok); }
.st-expired    { background: var(--bg-hover);      color: var(--text-muted); }
.st-failed     { background: rgba(255,90,90,.12);  color: #ff5a5a; }

.mono { font-family: var(--mono); }

/* busy buttons */
.btn.loading, .btn:disabled { opacity: .6; cursor: wait; transform: none; }

/* ---------- profile responsive ---------- */
@media (max-width: 640px) {
    .profile-hero { flex-wrap: wrap; padding: 18px; }
    .profile-since { order: 3; }

    .set-head { flex-direction: column; gap: 14px; padding: 18px; align-items: stretch; }
    .set-action { width: 100%; }
    .set-inner { padding: 2px 18px 18px; }
    .set-ok { margin: 0 18px 16px; }

    .set-row { grid-template-columns: 1fr; }

    .set-actions { flex-direction: column-reverse; }
    .set-actions .btn { width: 100%; }

    .key-reveal { margin: 0 18px 16px; padding: 16px; }
    .key-row { padding: 12px 18px; gap: 10px; }
    .key-row-date { display: none; }

    .wallet-view { padding: 0 18px 18px; }

    .tx-row { padding: 12px 18px; }
    .tx-right { flex-basis: 100%; justify-content: space-between; }
}

/* ============================================================
   PRODUCTS
   ============================================================ */

.pr-head { margin-bottom: 26px; }
.pr-head .page-title { margin-bottom: 8px; }
.pr-head .page-sub { max-width: 62ch; }

/* a label with a quiet "optional" marker on the right */
.set-label-row {
    display: flex;
    align-items: baseline;
    justify-content: space-between;
    gap: 10px;
}
.set-label-row i {
    font-style: normal;
    font-size: .72rem;
    font-weight: 500;
    color: var(--text-muted);
}

.pr-inline-addr {
    font-family: var(--mono);
    font-size: .74rem;
    color: var(--text-muted);
    word-break: break-all;
}

/* ---------- product cards ---------- */

.pr-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(258px, 1fr));
    gap: 12px;
    margin-bottom: 12px;
}

.pr-card {
    display: flex;
    flex-direction: column;
    gap: 9px;
    padding: 19px 20px;
    border: 1px solid var(--border-color);
    border-radius: var(--radius-sm);
    background: var(--bg-card);
    text-decoration: none;
    transition: border-color .18s, transform .18s;
}
.pr-card:hover {
    border-color: var(--border-hi);
    transform: translateY(-2px);
}
/* archived products stay reachable but stop competing for attention */
.pr-card.archived { opacity: .55; }
.pr-card.archived:hover { opacity: 1; }

.pr-card-top {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 9px;
}
.pr-card-name {
    font-size: 1.02rem;
    font-weight: 700;
    letter-spacing: -.01em;
    color: var(--text-primary);
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.pr-tag {
    flex-shrink: 0;
    padding: 3px 9px;
    border-radius: 100px;
    background: var(--bg-hover);
    font-size: .66rem;
    font-weight: 700;
    letter-spacing: .04em;
    text-transform: uppercase;
    color: var(--text-muted);
}

.pr-slug {
    align-self: flex-start;
    padding: 3px 9px;
    border-radius: var(--radius-xs);
    background: var(--bg-input);
    border: 1px solid var(--border-color);
    font-family: var(--mono);
    font-size: .74rem;
    color: var(--frost-primary);
}

.pr-card-desc {
    font-size: .82rem;
    line-height: 1.55;
    color: var(--text-secondary);
    /* two lines maximum, so cards in a row stay the same height */
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
}

.pr-card-bal {
    display: flex;
    flex-wrap: wrap;
    gap: 6px 14px;
    margin-top: auto;
    padding-top: 6px;
}
.pr-bal {
    display: inline-flex;
    align-items: baseline;
    gap: 4px;
}
.pr-bal b {
    font-family: var(--mono);
    font-size: 1.04rem;
    font-weight: 600;
    color: var(--text-primary);
}
.pr-bal i {
    font-style: normal;
    font-size: .72rem;
    font-weight: 600;
    color: var(--text-muted);
}
.pr-bal.empty {
    font-size: .78rem;
    color: var(--text-muted);
}

.pr-card-foot {
    display: flex;
    align-items: center;
    gap: 14px;
    padding-top: 11px;
    border-top: 1px solid var(--border-color);
}
.pr-card-foot > span {
    display: inline-flex;
    align-items: baseline;
    gap: 4px;
}
.pr-card-foot b {
    font-size: .84rem;
    font-weight: 700;
    color: var(--text-primary);
}
.pr-card-foot i {
    font-style: normal;
    font-size: .72rem;
    color: var(--text-muted);
}
.pr-card-date {
    margin-left: auto;
    font-family: var(--mono);
    font-size: .68rem;
    color: var(--text-muted);
}

/* ---------- empty state ---------- */

.pr-empty {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 10px;
    padding: 52px 28px;
    border: 1px dashed var(--border-hi);
    border-radius: var(--radius-sm);
    text-align: center;
}
.pr-empty-ico {
    display: grid;
    place-items: center;
    width: 52px;
    height: 52px;
    border-radius: var(--radius-sm);
    background: var(--bg-input);
    color: var(--text-muted);
}
.pr-empty b {
    font-size: 1.02rem;
    font-weight: 700;
    color: var(--text-primary);
}
.pr-empty p {
    max-width: 46ch;
    font-size: .85rem;
    line-height: 1.65;
    color: var(--text-secondary);
}

/* ---------- detail head ---------- */

.pr-back {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    margin-bottom: 18px;
    font-size: .82rem;
    font-weight: 600;
    color: var(--text-secondary);
    text-decoration: none;
    transition: color .15s;
}
.pr-back:hover { color: var(--frost-primary); }

.pr-detail-head { margin-bottom: 24px; }
.pr-detail-head .page-title { margin-bottom: 8px; }
.pr-detail-head .page-sub { max-width: 62ch; margin-bottom: 14px; }

.pr-detail-meta {
    display: flex;
    align-items: center;
    flex-wrap: wrap;
    gap: 10px 16px;
}

.pr-handle {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    font-size: .74rem;
    font-weight: 700;
    letter-spacing: .05em;
    text-transform: uppercase;
    color: var(--text-muted);
}
.pr-handle code {
    padding: 4px 10px;
    border-radius: var(--radius-xs);
    background: var(--bg-input);
    border: 1px solid var(--border-color);
    font-family: var(--mono);
    font-size: .82rem;
    font-weight: 500;
    letter-spacing: 0;
    text-transform: none;
    color: var(--frost-primary);
}

.copy-btn.sm { width: 28px; height: 28px; }

.pr-created {
    display: inline-flex;
    align-items: center;
    gap: 5px;
    font-size: .76rem;
    color: var(--text-muted);
}

/* ---------- balance cards ---------- */

.pr-bal-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(180px, 1fr));
    gap: 10px;
    margin-top: 4px;
}
.pr-bal-card {
    display: flex;
    flex-direction: column;
    gap: 3px;
    padding: 15px 17px;
    border: 1px solid var(--border-color);
    border-radius: var(--radius-xs);
    background: var(--bg-input);
}
.pr-bal-cur {
    font-size: .68rem;
    font-weight: 700;
    letter-spacing: .07em;
    text-transform: uppercase;
    color: var(--text-muted);
}
.pr-bal-avail {
    font-family: var(--mono);
    font-size: 1.5rem;
    font-weight: 600;
    letter-spacing: -.02em;
    color: var(--text-primary);
}
.pr-bal-sub {
    font-size: .72rem;
    color: var(--text-muted);
}
.pr-bal-sub b {
    font-family: var(--mono);
    font-weight: 500;
    color: var(--text-secondary);
}

/* ---------- stat grid ---------- */

.pr-stat-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(196px, 1fr));
    gap: 12px;
    margin-bottom: 12px;
}
.pr-stat {
    display: flex;
    flex-direction: column;
    gap: 5px;
    padding: 18px 20px;
    border: 1px solid var(--border-color);
    border-radius: var(--radius-sm);
    background: var(--bg-card);
}
.pr-stat-label {
    font-size: .68rem;
    font-weight: 700;
    letter-spacing: .07em;
    text-transform: uppercase;
    color: var(--text-muted);
}
.pr-stat-value {
    font-size: 1.72rem;
    font-weight: 750;
    letter-spacing: -.03em;
    line-height: 1.1;
    color: var(--text-primary);
}
.pr-stat-value.sm    { font-size: 1.2rem; }
.pr-stat-value.ok    { color: var(--ok); }
.pr-stat-value.warn  { color: #ffb020; }
.pr-stat-value.bad   { color: #ff5a5a; }
.pr-stat-value.muted { color: var(--text-muted); }

.pr-stat-note {
    font-size: .76rem;
    line-height: 1.5;
    color: var(--text-secondary);
}
.pr-stat-note b {
    font-weight: 700;
    color: var(--text-primary);
}

/* ---------- payments chart ---------- */

.pr-spark {
    display: flex;
    align-items: flex-end;
    gap: 6px;
    height: 152px;
    margin-top: 4px;
}
.pr-spark-col {
    display: flex;
    flex-direction: column;
    justify-content: flex-end;
    align-items: center;
    gap: 6px;
    flex: 1;
    min-width: 0;
    height: 100%;
}
.pr-spark-count {
    font-family: var(--mono);
    font-size: .68rem;
    font-weight: 500;
    color: var(--text-secondary);
    /* reserve the line so bars share one baseline whether labelled or not */
    min-height: 1em;
}
.pr-spark-bar {
    width: 100%;
    max-width: 34px;
    min-height: 3px;
    border-radius: 5px 5px 2px 2px;
    background: var(--frost-gradient);
}
/* a day with no payments is still a day — show the tick, not a gap */
.pr-spark-bar.zero { background: var(--bg-hover); }
.pr-spark-day {
    font-family: var(--mono);
    font-size: .64rem;
    color: var(--text-muted);
    white-space: nowrap;
}

/* ---------- archive row ---------- */

.pr-archive {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 18px;
    flex-wrap: wrap;
    margin-top: 18px;
    padding-top: 18px;
    border-top: 1px solid var(--border-color);
}
.pr-archive b {
    display: block;
    font-size: .88rem;
    font-weight: 700;
    color: var(--text-primary);
}
.pr-archive span {
    display: block;
    max-width: 52ch;
    margin-top: 3px;
    font-size: .78rem;
    line-height: 1.55;
    color: var(--text-secondary);
}

@media (max-width: 620px) {
    .pr-stat-value { font-size: 1.5rem; }
    .pr-spark { height: 124px; gap: 4px; }
    .pr-spark-day { font-size: .58rem; }
    .pr-spark-count { font-size: .62rem; }
    .pr-grid { grid-template-columns: 1fr; }
}

/* ============================================================
   ADMIN PANEL
   ============================================================ */

.adm-head {
    display: flex;
    align-items: flex-end;
    justify-content: space-between;
    gap: 18px;
    flex-wrap: wrap;
    margin-bottom: 26px;
}
.adm-head .page-title { margin-bottom: 0; }

.adm-stamp {
    font-family: var(--mono);
    font-size: .76rem;
    color: var(--text-muted);
    white-space: nowrap;
}

/* headline counters */
.adm-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(210px, 1fr));
    gap: 12px;
    margin-bottom: 12px;
}

.adm-card {
    display: flex;
    flex-direction: column;
    gap: 5px;
    padding: 18px 20px;
    border: 1px solid var(--border-color);
    border-radius: var(--radius-sm);
    background: var(--bg-card);
}
.adm-label {
    font-size: .68rem;
    font-weight: 700;
    letter-spacing: .07em;
    text-transform: uppercase;
    color: var(--text-muted);
}
.adm-value {
    font-size: 1.86rem;
    font-weight: 750;
    letter-spacing: -.03em;
    line-height: 1.1;
    color: var(--text-primary);
}
.adm-note { font-size: .78rem; color: var(--text-secondary); }

/* panels */
.adm-cols {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(320px, 1fr));
    gap: 12px;
    margin-bottom: 12px;
}

.adm-panel {
    padding: 18px 20px;
    border: 1px solid var(--border-color);
    border-radius: var(--radius-sm);
    background: var(--bg-card);
}
.adm-wide { margin-bottom: 80px; }

.adm-h2 {
    font-size: .95rem;
    font-weight: 700;
    letter-spacing: -.01em;
    margin-bottom: 14px;
}

.adm-table { width: 100%; border-collapse: collapse; font-size: .875rem; }
.adm-table td {
    padding: 8px 0;
    color: var(--text-secondary);
    border-bottom: 1px solid var(--border-color);
}
.adm-table tr:last-child td { border-bottom: none; }
.adm-num {
    text-align: right;
    font-family: var(--mono);
    font-size: .84rem;
    color: var(--text-primary);
    white-space: nowrap;
}

/* horizontal distribution bars */
.adm-bar-row {
    display: grid;
    grid-template-columns: 84px 1fr auto;
    align-items: center;
    gap: 11px;
    margin-bottom: 9px;
}
.adm-bar-row:last-of-type { margin-bottom: 0; }

.adm-bar-label {
    font-size: .84rem;
    color: var(--text-secondary);
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}
.adm-bar-track {
    height: 7px;
    border-radius: 100px;
    background: var(--bg-input);
    overflow: hidden;
}
.adm-bar-fill {
    display: block;
    height: 100%;
    border-radius: 100px;
    background: var(--frost-gradient);
}
.adm-bar-num {
    font-family: var(--mono);
    font-size: .78rem;
    color: var(--text-primary);
    white-space: nowrap;
}
.adm-bar-num i { font-style: normal; color: var(--text-muted); }

/* 14-day signup chart */
.adm-spark {
    display: flex;
    align-items: flex-end;
    gap: 6px;
    height: 132px;
    padding-top: 6px;
}
.adm-spark-col {
    display: flex;
    flex-direction: column;
    justify-content: flex-end;
    align-items: center;
    gap: 7px;
    flex: 1;
    min-width: 0;
    height: 100%;
}
.adm-spark-bar {
    width: 100%;
    max-width: 34px;
    /* a zero-count day still needs to be visible as a day */
    min-height: 3px;
    border-radius: 5px 5px 2px 2px;
    background: var(--frost-gradient);
}
.adm-spark-day {
    font-family: var(--mono);
    font-size: .66rem;
    color: var(--text-muted);
    white-space: nowrap;
}

.adm-hint {
    margin-top: 12px;
    font-size: .78rem;
    line-height: 1.6;
    color: var(--text-muted);
}
.adm-empty {
    font-size: .84rem;
    line-height: 1.6;
    color: var(--text-muted);
}

@media (max-width: 560px) {
    .adm-value { font-size: 1.6rem; }
    .adm-bar-row { grid-template-columns: 68px 1fr auto; gap: 9px; }
    .adm-spark { height: 108px; gap: 4px; }
    .adm-spark-day { font-size: .6rem; }
}

/* ============================================================
   RESPONSIVE
   ============================================================ */
@media (max-width: 1080px) {
    .layout { grid-template-columns: 1fr; }
    .side {
        display: grid;
        grid-template-columns: repeat(auto-fit, minmax(255px, 1fr));
        gap: 14px;
    }
    .secure-note { grid-column: 1 / -1; }
    .footer-grid { grid-template-columns: 1fr 1fr 1fr 1fr; }
    .footer-brand { grid-column: 1 / -1; }
    .footer-tag { max-width: 460px; }

    /* TOC becomes a horizontal scroller pinned under the header */
    .docs-layout { grid-template-columns: 1fr; gap: 0; }
    .toc {
        position: sticky;
        top: 66px;
        z-index: 90;
        margin-bottom: 30px;
        padding: 10px 0;
        background: var(--bg-primary);
        border-bottom: 1px solid var(--border-color);
    }
    .toc-inner {
        flex-direction: row;
        gap: 6px;
        overflow-x: auto;
        -webkit-overflow-scrolling: touch;
        scrollbar-width: none;
    }
    .toc-inner::-webkit-scrollbar { display: none; }
    .toc-title, .toc-group { display: none; }
    .toc-link {
        flex-shrink: 0;
        padding: 6px 12px;
        border: 1px solid var(--border-color);
        border-left-width: 1px;
        border-radius: 100px;
        white-space: nowrap;
    }
    .toc-link.sub { padding-left: 12px; }
    .toc-link.current { background: var(--frost-soft); }
}

@media (max-width: 900px) {
    /* nav moves into the drawer */
    .nav { display: none; }
    .burger { display: flex; }

    /* language and theme both live in the drawer now */
    .lang-dd { display: none; }
    .theme-toggle { display: none; }

    /* one auth control survives in the bar: the primary CTA for guests, the
       account link for signed-in users. "Sign in" and "Log out" stay in the
       drawer so the header keeps a single, unambiguous action. */
    .btn-ghost { display: none; }
    .header-actions .logout-form { display: none; }

    /* the email stays — it is what gives the pill weight and tells you which
       account you are in. Capping the pill lets the existing ellipsis on
       .account-email do the trimming.

       min() keeps it safe without another breakpoint: a flat 168px would
       overflow a 320px screen once the burger, logo and gaps are accounted
       for, while 42vw alone would waste space on a tablet. */
    .account { max-width: min(168px, 42vw); }

    .header-actions { margin-left: auto; }
}

/* the drawer language row is mobile-only — the header dropdown owns it above
   the breakpoint */
@media (min-width: 901px) {
    .dn-sep,
    .drawer-nav .dn-toggle,
    .drawer-lang-wrap { display: none; }
}

/* drawer is mobile-only — guard against a resize while it is open */
@media (min-width: 901px) {
    .drawer, .drawer-backdrop { display: none; }
}

@media (max-width: 768px) {
    .container { padding: 0 20px; }
    .main { padding-top: 38px; }
    .page-head { margin-bottom: 30px; }
    .invoice-card {
        padding: 24px 22px;
        background: var(--bg-card);
        -webkit-backdrop-filter: none;
        backdrop-filter: none;
    }
    .side-card {
        background: var(--bg-card);
        -webkit-backdrop-filter: none;
        backdrop-filter: none;
    }
    .auth-card {
        background: var(--bg-card);
        -webkit-backdrop-filter: none;
        backdrop-filter: none;
    }
    .layout { gap: 20px; padding-bottom: 52px; }
    .stats-grid { grid-template-columns: 1fr 1fr; }
    .stat { padding: 24px 8px; }
    .stat:nth-child(odd) { border-left: none; }
    .stat:nth-child(n+3) { border-top: 1px solid var(--border-color); }
    .footer { padding-top: 42px; }
    .footer-grid { grid-template-columns: 1fr 1fr; gap: 28px; }

    .docs-hero { padding-bottom: 26px; margin-bottom: 26px; }
    .doc-section { padding-bottom: 36px; }
    .doc-h2 { font-size: 1.28rem; }
    .toc { top: 60px; }
    .docs-body { overflow-x: hidden; }
    .docs-body .doc-table { min-width: 0; }
    .docs-body .doc-table td:first-child { white-space: normal; }

    .legal-hero { padding: 40px 0 28px; }
    .legal-hero-title { font-size: 1.6rem; }
    .legal-meta { flex-direction: column; gap: 4px; }
}

@media (max-width: 560px) {
    html { font-size: 15px; }
    .container { padding: 0 16px; }
    .header-inner { height: 60px; gap: 14px; }

    /* buys clearance between the centred wordmark and the CTA */
    .btn-mini { padding: 8px 14px; font-size: .84rem; }
    .account { padding: 7px 10px; }
    .invoice-card { padding: 20px 16px; border-radius: 15px; }
    .step-label { display: none; }
    .step-line { margin: 0 10px; }
    .pay-head { flex-direction: column; align-items: flex-start; gap: 16px; }
    .qr-box { width: 100%; height: 148px; }
    .btn-group { flex-direction: column; }
    .btn-group .btn { width: 100%; }
    .side { grid-template-columns: 1fr; }
    .stats-grid { grid-template-columns: 1fr; }
    .stat { border-left: none; padding: 20px 8px; }
    .stat:not(:first-child) { border-top: 1px solid var(--border-color); }
    .footer-grid { grid-template-columns: 1fr 1fr; }
    .footer-bottom { justify-content: center; text-align: center; }

    /* drawer language rows: the endonym and the chip identify the language, the
       English gloss is redundant on a narrow screen */
    .dl-en { display: none; }
    .lang-chip { width: 28px; height: 21px; font-size: .63rem; border-radius: 5px; }
    .dl-opt { padding: 7px 10px 7px 14px; }
    .dl-native { font-size: .855rem; }
    .dn-current { font-size: .775rem; }

    .docs-layout { overflow-x: hidden; }
    .docs-body { overflow-x: hidden; width: 100%; }
    .doc-table { min-width: 0; width: 100%; }
    .doc-table td:first-child { white-space: normal; }

    .legal-hero { padding: 32px 0 24px; }
    .legal-hero-title { font-size: 1.4rem; }
    .legal-card { border-radius: 10px; }
    .legal-card-row { padding: 12px 14px; }
    .legal-notice { padding: 12px 14px; font-size: 13px; }
}

/* ============================================================
   MISC
   ============================================================ */
::-webkit-scrollbar { width: 10px; height: 10px; }
::-webkit-scrollbar-track { background: var(--bg-primary); }
::-webkit-scrollbar-thumb { background: var(--border-hi); border-radius: 100px; border: 3px solid var(--bg-primary); }
::-webkit-scrollbar-thumb:hover { background: var(--text-muted); }

::selection { background: rgba(255,107,53,.25); }

input[type="number"]::-webkit-inner-spin-button,
input[type="number"]::-webkit-outer-spin-button { -webkit-appearance: none; margin: 0; }
input[type="number"] { -moz-appearance: textfield; }

:focus-visible { outline: 2px solid var(--frost-primary); outline-offset: 2px; }

/* inputs already show focus via their border — the global outline
   would paint a second frame around them */
.auth-input:focus-visible,
.amount-input:focus-visible { outline: none; }

@media (prefers-reduced-motion: reduce) {
    *, *::before, *::after { animation-duration: .01ms !important; transition-duration: .01ms !important; }
}

/* light-theme fine tuning */
[data-theme="light"] .btn-primary,
[data-theme="light"] .btn-mini { color: #fff; }
[data-theme="light"] .step.active .step-number { color: #fff; }
[data-theme="light"] .notice { border-color: rgba(180,110,0,.25); background: rgba(255,176,32,.1); color: #a86a00; }
[data-theme="light"] .notice b { color: #a86a00; }
[data-theme="light"] .footer { background: var(--bg-secondary); border-top: 1px solid var(--border-color); }
[data-theme="light"] .stats { background: var(--bg-secondary); }
[data-theme="light"] ::selection { background: rgba(232,93,38,.2); }

/* off-state track has to read as grey against white, not as a dark blob */
[data-theme="light"] .dn-switch { background: var(--border-hi); }
[data-theme="light"] .dn-switch-knob { box-shadow: 0 1px 3px rgba(16,24,40,.22); }

/* on white the gradient tile works — it just does not need a halo around it */
[data-theme="light"] .profile-avatar {
    border-color: transparent;
    background: var(--frost-gradient);
    color: #fff;
    box-shadow: 0 5px 14px -8px rgba(232,93,38,.32);
}
[data-theme="light"] .drawer-avatar {
    border-color: transparent;
    background: var(--frost-gradient);
    color: #fff;
}

/* ── FAQ page ──────────────────────────────────────────── */
.faq-hero {
    text-align: center;
    padding: 64px 0 40px;
}
.faq-hero-title {
    font-size: 52px;
    font-weight: 800;
    letter-spacing: -.03em;
    line-height: 1.1;
    color: var(--text);
    margin: 0 0 16px;
}
.faq-hero-sub {
    font-size: 16px;
    color: var(--text-dim);
    margin: 0;
}

.faq-list {
    max-width: 640px;
    margin: 0 auto 64px;
}
.faq-group {
    margin-bottom: 40px;
}
.faq-group-title {
    font-size: 13px;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: .08em;
    color: var(--accent);
    margin: 0 0 16px;
    padding-left: 4px;
    display: flex;
    align-items: center;
    gap: 10px;
}
.faq-group-icon {
    width: 20px;
    height: 20px;
    color: var(--accent);
    flex-shrink: 0;
}

.faq-item {
    border: 1.5px solid var(--border);
    border-radius: 14px;
    background: var(--bg-card);
    margin-bottom: 10px;
    overflow: hidden;
    transition: border-color .25s, box-shadow .25s, background .25s;
}
.faq-item:hover {
    border-color: var(--accent-ring);
    background: var(--accent-soft);
}
.faq-item.open {
    border-color: var(--accent);
    box-shadow: 0 0 0 2px var(--accent-soft), 0 4px 20px var(--accent-soft);
    background: var(--accent-soft);
}

.faq-q {
    width: 100%;
    padding: 20px 24px;
    font-size: 15px;
    font-weight: 600;
    color: var(--text);
    cursor: pointer;
    display: flex;
    align-items: center;
    gap: 12px;
    border: none;
    background: none;
    text-align: left;
    font-family: inherit;
    transition: color .2s;
}
.faq-q-icon {
    width: 16px;
    height: 16px;
    color: var(--accent);
    flex-shrink: 0;
}
.faq-q:hover {
    color: var(--accent);
}
.faq-item.open .faq-q {
    color: var(--accent);
}

.faq-a-wrap {
    max-height: 0;
    overflow: hidden;
    transition: max-height .4s cubic-bezier(.4,0,.2,1);
}
.faq-a {
    padding: 0 24px 22px;
    font-size: 14px;
    line-height: 1.75;
    color: var(--text-dim);
    margin: 0;
    border-top: 1px solid var(--border);
    padding-top: 16px;
}

[data-theme="light"] .faq-item.open {
    box-shadow: 0 0 0 2px var(--accent-soft), 0 4px 20px var(--accent-soft);
    background: var(--accent-soft);
}
[data-theme="light"] .faq-item:hover {
    border-color: var(--accent-ring);
    background: var(--accent-soft);
}

/* ── Contacts page ─────────────────────────────────────── */
.contacts-hero {
    text-align: center;
    padding: 64px 0 40px;
}
.contacts-hero-title {
    font-size: 52px;
    font-weight: 800;
    letter-spacing: -.03em;
    line-height: 1.1;
    color: var(--text);
    margin: 0 0 16px;
}
.contacts-hero-sub {
    font-size: 16px;
    color: var(--text-dim);
    margin: 0;
}
.ct-link {
    color: var(--accent);
    text-decoration: underline;
    text-underline-offset: 2px;
}
.ct-link:hover {
    opacity: .8;
}

.contacts-grid {
    max-width: 520px;
    margin: 0 auto 64px;
    display: flex;
    flex-direction: column;
    gap: 12px;
}
.contact-card {
    display: flex;
    align-items: center;
    gap: 16px;
    padding: 22px 24px;
    border-radius: 14px;
    border: 1.5px solid var(--border);
    background: var(--bg-card);
    text-decoration: none;
    color: var(--text);
    transition: border-color .25s, box-shadow .25s, transform .2s;
}
.contact-card:hover {
    border-color: var(--accent);
    box-shadow: 0 4px 24px rgba(255,107,53,.08);
    transform: translateY(-2px);
}
.cc-icon {
    width: 48px;
    height: 48px;
    border-radius: 12px;
    background: rgba(255,107,53,.1);
    color: var(--accent);
    display: flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
}
.cc-icon-tg {
    background: linear-gradient(135deg, #2AABEE 0%, #229ED9 100%);
    color: #fff;
}
.cc-icon-mail {
    background: rgba(255,255,255,.06);
    color: var(--text-dim);
}
.cc-body {
    flex: 1;
    display: flex;
    flex-direction: column;
    gap: 2px;
    min-width: 0;
}
.cc-label {
    font-size: 13px;
    color: var(--text-dim);
    font-weight: 500;
}
.cc-value {
    font-size: 15px;
    font-weight: 500;
    color: var(--text);
}
.cc-url {
    font-family: 'JetBrains Mono', monospace;
    color: var(--accent);
}
.cc-handle {
    font-family: 'JetBrains Mono', monospace;
    color: #2AABEE;
}
.cc-email-addr {
    font-family: 'JetBrains Mono', monospace;
    color: var(--text);
}
.cc-hint {
    font-size: 12px;
    color: var(--text-dim);
    opacity: .7;
}
.cc-arrow {
    color: var(--text-dim);
    flex-shrink: 0;
    transition: transform .15s, color .15s;
}
.contact-card:hover .cc-arrow {
    transform: translateX(3px);
    color: var(--accent);
}

[data-theme="light"] .contact-card:hover {
    box-shadow: 0 4px 24px rgba(232,93,38,.06);
}
[data-theme="light"] .cc-icon-mail {
    background: rgba(0,0,0,.04);
}

/* ── Legal pages (Privacy, Terms, AML) ─────────────────── */
.legal-hero {
    padding: 64px 0 40px;
}
.legal-hero-title {
    font-size: clamp(1.9rem, 4.4vw, 2.6rem);
    font-weight: 800;
    letter-spacing: -.04em;
    line-height: 1.1;
    color: var(--text);
    margin: 0 0 12px;
}
.legal-hero-sub {
    font-size: 16px;
    line-height: 1.65;
    color: var(--text-dim);
    margin: 0 0 16px;
    max-width: 600px;
}
.legal-meta {
    display: flex;
    gap: 16px;
    font-size: 13px;
    color: var(--text-muted);
}
.legal-content {
    max-width: 720px;
    padding-bottom: 80px;
}
.legal-section {
    margin-bottom: 40px;
}
.legal-h2 {
    font-size: 1.15rem;
    font-weight: 700;
    color: var(--text);
    margin: 0 0 14px;
    letter-spacing: -.02em;
}
.legal-p {
    font-size: 15px;
    line-height: 1.75;
    color: var(--text-dim);
    margin: 0 0 14px;
}
.legal-p:last-child { margin-bottom: 0; }
.legal-p a {
    color: var(--accent);
    text-decoration: none;
    border-bottom: 1px solid transparent;
    transition: border-color .15s;
}
.legal-p a:hover {
    border-bottom-color: var(--accent);
}
.legal-p code {
    font-family: var(--mono);
    font-size: .88em;
    color: var(--accent);
    background: var(--bg-input);
    padding: 2px 6px;
    border-radius: 4px;
}
.legal-list {
    list-style: none;
    padding: 0;
    margin: 0 0 14px;
}
.legal-list li {
    position: relative;
    padding: 6px 0 6px 20px;
    font-size: 15px;
    line-height: 1.65;
    color: var(--text-dim);
}
.legal-list li::before {
    content: '';
    position: absolute;
    left: 0;
    top: 13px;
    width: 6px;
    height: 6px;
    border-radius: 50%;
    background: var(--accent);
}
.legal-card {
    border: 1px solid var(--border-color);
    border-radius: 14px;
    overflow: hidden;
    margin-bottom: 14px;
    background: var(--bg-card);
}
.legal-card-row {
    display: flex;
    flex-direction: column;
    gap: 4px;
    padding: 14px 18px;
}
.legal-card-row:not(:last-child) {
    border-bottom: 1px solid var(--border-color);
}
.legal-card-label {
    font-size: 14px;
    font-weight: 600;
    color: var(--text);
}
.legal-card-label code {
    font-family: var(--mono);
    font-size: .92em;
    color: var(--accent);
    background: var(--bg-input);
    padding: 2px 6px;
    border-radius: 4px;
}
.legal-card-value {
    font-size: 14px;
    line-height: 1.6;
    color: var(--text-dim);
}
.legal-card-value a {
    color: var(--accent);
    text-decoration: none;
    border-bottom: 1px solid transparent;
    transition: border-color .15s;
}
.legal-card-value a:hover {
    border-bottom-color: var(--accent);
}
.legal-notice {
    display: flex;
    gap: 12px;
    padding: 16px 18px;
    border: 1px solid rgba(255,179,71,.25);
    border-radius: 12px;
    background: rgba(255,179,71,.06);
    font-size: 14px;
    line-height: 1.65;
    color: var(--text-dim);
}
.legal-notice svg {
    color: var(--ok);
    flex-shrink: 0;
    margin-top: 2px;
}

.support-hero {
    text-align: center;
    padding: 64px 0 32px;
    position: relative;
}
.support-glow {
    position: absolute;
    top: -80px;
    left: 50%;
    transform: translateX(-50%);
    width: 400px;
    height: 400px;
    border-radius: 50%;
    background: radial-gradient(circle, rgba(255,107,53,.12) 0%, transparent 70%);
    pointer-events: none;
    z-index: 0;
}
.support-badge {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    padding: 6px 14px;
    border-radius: 20px;
    background: rgba(255,107,53,.1);
    border: 1px solid rgba(255,107,53,.2);
    font-size: 12px;
    font-weight: 600;
    color: var(--accent);
    margin-bottom: 16px;
    position: relative;
    z-index: 1;
}
.support-title {
    font-size: 40px;
    font-weight: 800;
    letter-spacing: -.02em;
    color: var(--text);
    margin: 0 0 12px;
    position: relative;
    z-index: 1;
}
.support-sub {
    font-size: 16px;
    color: var(--text-dim);
    margin: 0;
    position: relative;
    z-index: 1;
}

.support-cards {
    max-width: 520px;
    margin: 0 auto;
    display: flex;
    flex-direction: column;
    gap: 12px;
}
.support-card {
    display: flex;
    align-items: center;
    gap: 16px;
    padding: 20px 24px;
    border-radius: 14px;
    border: 1px solid var(--border);
    background: var(--bg-card);
    text-decoration: none;
    color: var(--text);
    transition: border-color .2s, box-shadow .2s, transform .15s;
}
.support-card:hover {
    border-color: var(--accent);
    box-shadow: 0 4px 24px rgba(255,107,53,.1);
    transform: translateY(-2px);
}
.sc-main {
    background: linear-gradient(135deg, rgba(255,107,53,.06) 0%, rgba(255,107,53,.02) 100%);
    border-color: rgba(255,107,53,.2);
}
.sc-icon {
    width: 48px;
    height: 48px;
    border-radius: 12px;
    display: flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
}
.tg-icon {
    background: linear-gradient(135deg, #2AABEE 0%, #229ED9 100%);
    color: #fff;
}
.chat-icon {
    background: rgba(255,107,53,.12);
    color: var(--accent);
}
.mail-icon {
    background: rgba(255,255,255,.06);
    color: var(--text-dim);
}
[data-theme="light"] .mail-icon {
    background: rgba(0,0,0,.04);
}
.sc-body {
    flex: 1;
    display: flex;
    flex-direction: column;
    gap: 2px;
    min-width: 0;
}
.sc-label {
    font-size: 15px;
    font-weight: 600;
    color: var(--text);
}
.sc-handle {
    font-size: 14px;
    font-family: 'JetBrains Mono', monospace;
    color: var(--accent);
}
.sc-desc {
    font-size: 13px;
    color: var(--text-dim);
}
.sc-arrow {
    color: var(--text-dim);
    flex-shrink: 0;
    transition: transform .15s;
}
.support-card:hover .sc-arrow {
    transform: translateX(3px);
    color: var(--accent);
}

@media (max-width: 600px) {
    .support-title { font-size: 28px; }
    .support-hero { padding: 40px 0 20px; }
    .support-card { padding: 16px 18px; }
    .sc-icon { width: 42px; height: 42px; }
}

/* ============================================================
   HOMEPAGE EXTRAS — swap arrow, chips, receive preview,
   trust pills, how-it-works
   ============================================================ */

/* swap direction button */
.swap-arrow-wrap { display: flex; justify-content: center; margin: 2px 0; }
.swap-arrow-btn {
    display: grid;
    place-items: center;
    width: 42px;
    height: 42px;
    border-radius: 50%;
    background: var(--bg-input);
    border: 1px solid var(--border-hi);
    color: var(--frost-primary);
    cursor: pointer;
    transition: border-color .18s, box-shadow .18s, transform .18s;
}
.swap-arrow-btn:hover {
    border-color: var(--frost-primary);
    box-shadow: 0 0 0 4px var(--frost-soft);
}
.swap-arrow-btn:active { transform: scale(.92); }
.swap-arrow-btn svg { transition: transform .5s cubic-bezier(.34,1.35,.44,1); }
.swap-arrow-btn.flipped svg { transform: rotate(180deg); }

/* quick-amount chips */
.chips { display: flex; flex-wrap: wrap; gap: 8px; margin-top: 10px; }
.chip {
    padding: 6px 15px;
    border-radius: 100px;
    background: var(--bg-input);
    border: 1px solid var(--border-color);
    color: var(--text-secondary);
    font-size: .78rem;
    font-weight: 650;
    font-variant-numeric: tabular-nums;
    cursor: pointer;
    transition: border-color .15s, color .15s, background .15s;
}
.chip:hover {
    border-color: var(--frost-primary);
    color: var(--frost-primary);
    background: var(--frost-soft);
}
.chip:active { transform: scale(.96); }

/* big "you receive" preview inside step 1 */
.recv-preview {
    display: flex;
    align-items: baseline;
    justify-content: space-between;
    gap: 12px;
    margin: 18px 0 20px;
    padding: 14px 18px;
    border-radius: var(--radius-sm);
    border: 1px solid var(--border-color);
    background: linear-gradient(135deg, var(--frost-soft), transparent 70%);
}
.recv-preview-label {
    font-size: .8rem;
    font-weight: 600;
    color: var(--text-secondary);
    flex-shrink: 0;
}
.recv-preview-value {
    font-size: 1.35rem;
    font-weight: 800;
    letter-spacing: -.02em;
    color: var(--frost-primary);
    font-variant-numeric: tabular-nums;
    text-align: right;
    overflow-wrap: anywhere;
}

/* trust pills under the widget */
.trust-pills {
    display: flex;
    flex-wrap: wrap;
    justify-content: center;
    gap: 10px;
    margin: 26px 0 0;
    padding-bottom: 24px;
}
.trust-pill {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    padding: 9px 17px;
    border-radius: 100px;
    background: var(--bg-card);
    border: 1px solid var(--border-color);
    font-size: .82rem;
    font-weight: 600;
    color: var(--text-secondary);
    box-shadow: var(--shadow-card);
}
.trust-pill svg { color: var(--ok); flex-shrink: 0; }

/* how it works */
.how { padding: 34px 0 38px; }
.how-title {
    text-align: center;
    font-size: 1.6rem;
    font-weight: 800;
    letter-spacing: -.03em;
    margin: 0 0 28px;
}
.how-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 14px;
}
.how-card {
    position: relative;
    overflow: hidden;
    padding: 26px 22px;
    background: var(--bg-card);
    border: 1px solid var(--border-color);
    border-radius: var(--radius);
    transition: transform .2s, border-color .2s, box-shadow .2s;
}
.how-card:hover {
    transform: translateY(-3px);
    border-color: var(--border-hi);
    box-shadow: var(--shadow-card);
}
.how-num {
    position: absolute;
    top: 6px;
    right: 16px;
    font-size: 3.6rem;
    font-weight: 800;
    line-height: 1;
    color: var(--text-primary);
    opacity: .07;
    pointer-events: none;
}
.how-ico {
    display: grid;
    place-items: center;
    width: 44px;
    height: 44px;
    border-radius: 13px;
    background: var(--frost-gradient);
    color: #05202b;
    margin-bottom: 16px;
    box-shadow: 0 8px 20px -8px var(--frost-primary);
}
.how-card h3 { font-size: 1rem; font-weight: 700; margin: 0 0 6px; }
.how-card p { font-size: .85rem; line-height: 1.6; color: var(--text-secondary); margin: 0; }
[data-theme="light"] .how-ico { color: #fff; }

.stat-value { font-variant-numeric: tabular-nums; }

/* ---------- native leaf cursor ---------- */
body { cursor: url('/static/img/leaf.cur?v=3'), auto; }
a, button, .dd-trigger, .chip, .faq-q, [role="button"],
input[type="checkbox"], input[type="radio"] { cursor: url('/static/img/leaf.cur?v=3'), pointer !important; }
/* the leaf wins over every component-level cursor (labels, buttons, rows…),
   everywhere except text fields where the I-beam stays */
body *:not(input):not(textarea):not(select) { cursor: url('/static/img/leaf.cur?v=3'), pointer !important; }
input:not([type="checkbox"]):not([type="radio"]), textarea, select { cursor: auto; }
/* busy/disabled controls keep the leaf instead of swapping to an hourglass */
.btn.loading, .btn:disabled,
.key-revoke:disabled { cursor: url('/static/img/leaf.cur?v=3'), wait; }

@media (max-width: 768px) {
    .how { padding: 24px 0 28px; }
    .how-grid { grid-template-columns: 1fr; }
    .how-title { font-size: 1.35rem; margin-bottom: 20px; }
    .trust-pills { padding-bottom: 18px; }
    .recv-preview-value { font-size: 1.15rem; }
}

/* ---------- universal wallet connector ---------- */
.wallet-connect-grid {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 10px;
    margin: 0 0 16px;
}
.wallet-provider {
    display: flex;
    align-items: center;
    gap: 12px;
    min-height: 66px;
    padding: 12px 14px;
    border: 1px solid var(--border-color);
    border-radius: 12px;
    background: var(--bg-input);
    color: var(--text-primary);
    text-align: left;
    cursor: pointer;
    transition: transform .16s, border-color .16s, background .16s;
}
.wallet-provider:hover { transform: translateY(-1px); border-color: var(--accent); }
.wallet-provider:disabled { opacity: .55; cursor: wait; transform: none; }
.wallet-provider-icon {
    display: grid;
    place-items: center;
    width: 38px;
    height: 38px;
    flex: 0 0 38px;
    border-radius: 10px;
    background: var(--bg-card);
    border: 1px solid var(--border-color);
    font-weight: 800;
}
.wallet-provider b { display:block; font-size:.82rem; }
.wallet-provider small { display:block; margin-top:3px; color:var(--text-muted); font-size:.68rem; line-height:1.3; }
.wallet-manual-divider {
    display:flex; align-items:center; gap:12px; margin:8px 0 14px;
    color:var(--text-muted); font-size:.72rem;
}
.wallet-manual-divider:before,.wallet-manual-divider:after { content:""; height:1px; flex:1; background:var(--border-color); }
.wallet-security-note {
    margin: 2px 0 14px;
    padding: 10px 12px;
    border: 1px solid rgba(255,179,71,.18);
    border-radius: 9px;
    background: rgba(255,179,71,.06);
    color: var(--text-secondary);
    font-size: .72rem;
    line-height: 1.45;
}
@media (max-width: 700px) {
    .wallet-connect-grid { grid-template-columns: 1fr; }
}

/* Real crypto artwork with graceful symbol fallback. */
.crypto-dd-icon { display:flex; align-items:center; justify-content:center; overflow:hidden; }
.crypto-icon-wrap { width:100%; height:100%; display:flex; align-items:center; justify-content:center; border-radius:inherit; }
.crypto-icon-img { width:24px; height:24px; display:block; object-fit:contain; }
.crypto-icon-fallback { display:none; color:#fff; font-weight:800; font-size:15px; line-height:1; }
.dd-option .crypto-icon-img { width:30px; height:30px; }

/* Final network selector spacing fix: keep the white network text clear of the arrow. */
#networkDD .dd-trigger { overflow: hidden; }
#networkDD .dd-trigger-left { flex: 1 1 auto; min-width: 0; }
#networkDD .dd-trigger-text { flex: 1 1 auto; min-width: 0; padding-right: 8px; }
    padding-left: 10px !important;
#networkDD .dd-val { display: block; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; padding-right: 2px; }
#networkDD .dd-arrow { flex: 0 0 14px; margin-left: 4px; }
@media (max-width: 600px) {
  #networkDD .dd-trigger { padding-left: 12px; padding-right: 12px; gap: 8px; }
  #networkDD .dd-trigger-left { gap: 18px; }
  #networkDD .dd-trigger-text { padding-right: 6px; }
    padding-left: 10px !important;
}

/* Network selector: prevent the network code and its description from ever overlapping. */
#networkDD .dd-trigger-left {
    display: flex;
    align-items: center;
    gap: 22px;
    min-width: 0;
    flex: 1 1 auto;
}
#networkDD .dd-trigger-text {
    padding-left: 10px !important;
    display: grid;
    grid-template-rows: auto auto;
    row-gap: 3px;
    align-content: center;
    min-width: 0;
    flex: 1 1 auto;
    line-height: normal;
    padding: 0;
}
#networkDD .dd-val,
    color: transparent !important;
#networkDD .dd-sub {
    display: block;
    position: relative;
    width: 100%;
    min-width: 0;
    margin: 0;
    padding: 0;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}
#networkDD .dd-val {
    line-height: 20px;
    height: 20px;
}
#networkDD .dd-sub {
    line-height: 17px;
    height: 17px;
}
#networkDD .dd-arrow {
    flex: 0 0 14px;
    width: 14px;
    height: 14px;
    margin-left: 8px;
}
@media (max-width: 600px) {
    #networkDD .dd-trigger { gap: 8px; padding-left: 12px; padding-right: 12px; }
    #networkDD .dd-trigger-left { gap: 18px; }
    #networkDD .dd-trigger-text { row-gap: 2px; }
    padding-left: 10px !important;
}

/* Network selector final alignment: visually separate the white network name
   from the yellow network code (e.g. TRC-20 / Tron Network). */
#networkDD .dd-trigger-text .dd-sub {
    padding-left: 14px;
    box-sizing: border-box;
}
#networkDD .dd-trigger-text {
    padding-left: 10px !important;
    gap: 1px;
}
@media (max-width: 600px) {
    #networkDD .dd-trigger-text .dd-sub {
        padding-left: 10px;
    }
}


/* ---------- wallet-first registration ---------- */
.wallet-auth-card { margin: 0 0 16px; }
.wallet-auth-btn { width: 100%; justify-content: center; gap: 10px; }
.wallet-auth-icon { width: 22px; height: 22px; display:grid; place-items:center; border-radius:7px; background: rgba(255,255,255,.12); }
.wallet-auth-note { margin: 9px 2px 0; color: var(--text-muted); font-size: .72rem; line-height: 1.45; text-align:center; }


/* ---------- final collision-proof text layout ---------- */
.dd-trigger,
.dd-option,
.summary-row,
.form-group,
.label-row { min-width: 0; }
.dd-trigger-text { flex: 1 1 auto; min-width: 0; gap: 3px; }
.dd-val,
.dd-sub,
.dd-opt-code,
.dd-opt-name { display: block; min-width: 0; overflow: hidden; text-overflow: ellipsis; }
.dd-val, .dd-opt-code { white-space: nowrap; }
.dd-sub, .dd-opt-name { white-space: nowrap; }
.dd-trigger .dd-sub { line-height: 1.35; min-height: 1.03em; }
.dd-option { min-height: 54px; }
.dd-option .dd-opt-text { min-width: 0; overflow: hidden; }
.summary-label, .summary-value { min-width: 0; }
.summary-label { overflow: hidden; text-overflow: ellipsis; }
.summary-value { overflow-wrap: anywhere; text-align: right; }
.wallet-only-card { grid-template-columns: 328px minmax(0, 520px); justify-content: center; }
.wallet-only-form { min-width: 0; }
.wallet-only-box { padding: 4px 0 0; }
.wallet-terms { align-items: flex-start; margin-top: 18px; }
.wallet-auth-btn { min-height: 52px; }
.wallet-auth-btn.loading { opacity: .65; pointer-events: none; }
.wallet-provider-list { display: grid; gap: 8px; margin-top: 10px; }
.wallet-provider-list button { width: 100%; }
@media (max-width: 900px) {
    .wallet-only-card { grid-template-columns: 1fr; }
}
@media (max-width: 560px) {
    .dd-trigger { min-height: 62px; }
    .dd-trigger-left { min-width: 0; flex: 1 1 auto; }
    .dd-trigger-text { min-width: 0; }
    .summary-row { align-items: flex-start; }
    .summary-label { max-width: 48%; }
    .summary-value { max-width: 52%; }
}

/* Hide network selector */
.network-label { color:#fff !important; }

/* Hide network subtitles */
#networkDD .dd-sub { display:none !important; }
