:root {
    color-scheme: light;

    --ink: #f6f9fd;
    --surface: #ffffff;
    --surface-2: #f1f5fb;
    --line: rgba(11, 23, 48, .11);
    --line-strong: rgba(11, 23, 48, .22);
    --field-line: #7f8ea8; /* 3:1 against white, so controls stay visible */
    --text: #0b1730;
    --muted: #4d5d78;
    --shadow: 0 1px 2px rgba(11, 23, 48, .04), 0 10px 28px rgba(11, 23, 48, .06);

    /* Sampled from the logo. Fills only: too pale for text or thin lines on a light page */
    --cyan: #00f1fb;
    --azure: #00a2fc;
    --blue: #005dfc;
    --on-brand: #03121f;

    /* Brand blue, deepened for text, icons and lines */
    --accent: #0a5bd8;

    --up: #0a7a4d;
    --down: #c4243c;

    --display: "Saira", "Arial Narrow", system-ui, sans-serif;
    --body: "Instrument Sans", system-ui, -apple-system, "Segoe UI", sans-serif;
    --mono: "JetBrains Mono", ui-monospace, "SF Mono", Menlo, monospace;

    --gutter: clamp(16px, 4vw, 48px);
    --slant: -14deg;
}

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

html {
    scroll-behavior: smooth;
    scroll-padding-top: 96px;
    -webkit-text-size-adjust: 100%;
    /* Phones paint a blue box over anything tapped. Pressed styles below give the feedback instead */
    -webkit-tap-highlight-color: transparent;
}

body {
    margin: 0;
    background: var(--ink);
    color: var(--text);
    font: 400 1.0625rem/1.6 var(--body);
    -webkit-font-smoothing: antialiased;
    overflow-x: clip;
}

img, svg { display: block; max-width: 100%; }
img { height: auto; }
a { color: inherit; }
ul, ol { list-style: none; margin: 0; padding: 0; }
p { margin: 0; }

:focus-visible { outline: 2px solid var(--accent); outline-offset: 3px; border-radius: 4px; }

.wrap { width: 100%; max-width: 1280px; margin-inline: auto; padding-inline: var(--gutter); }

.skip {
    position: absolute; left: 16px; top: -60px; z-index: 100;
    padding: 10px 16px; background: var(--text); color: var(--ink); border-radius: 6px;
}
.skip:focus { top: 12px; }

/* Type */
h1, h2 {
    margin: 0;
    font-family: var(--display);
    font-stretch: 125%;
    font-style: italic;
    font-weight: 800;
    letter-spacing: -.012em;
    line-height: 1.04;
    text-wrap: balance;
}
h1 { font-size: clamp(2.5rem, 5.4vw, 4.75rem); }
h2 { font-size: clamp(1.75rem, 3.4vw, 2.75rem); font-weight: 700; }
h3 { margin: 0 0 6px; font-size: 1.25rem; font-weight: 600; line-height: 1.3; }

.accent {
    display: block;
    background: linear-gradient(100deg, #0090e8, #0b4fe0 85%);
    -webkit-background-clip: text;
    background-clip: text;
    color: transparent;
    padding-right: .1em; /* keeps the italic overhang inside the clip */
}

.eyebrow {
    margin-bottom: 14px;
    color: var(--accent);
    font-size: .875rem;
    font-weight: 600;
    letter-spacing: .02em;
}

.lede { color: var(--muted); font-size: clamp(1.0625rem, 1.5vw, 1.25rem); line-height: 1.55; max-width: 34em; }
.num { font-family: var(--mono); font-weight: 500; font-variant-numeric: tabular-nums; letter-spacing: -.01em; }

/* Buttons: slanted like the logo's Z, drawn on a pseudo-element so the label stays upright */
.btn {
    position: relative;
    isolation: isolate;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-height: 52px;
    padding: 12px 32px;
    background: none;
    border: 0;
    color: var(--text);
    cursor: pointer;
    font: inherit;
    font-weight: 600;
    text-decoration: none;
    white-space: nowrap;
}
.btn--block { width: 100%; }
.btn::before {
    content: "";
    position: absolute;
    inset: 0;
    z-index: -1;
    border-radius: 6px;
    transform: skewX(var(--slant));
    transition: filter .18s ease, background-color .18s ease, border-color .18s ease;
}
.btn:focus-visible { outline: none; }
.btn:focus-visible::before { outline: 2px solid var(--text); outline-offset: 3px; }
.btn--primary { color: var(--on-brand); }
.btn--primary::before { background: linear-gradient(100deg, var(--cyan), var(--azure)); }
.btn--primary:hover::before { filter: brightness(1.12); }
.btn--ghost::before { border: 1px solid var(--field-line); background: transparent; }
.btn--ghost:hover::before { border-color: var(--accent); background: rgba(10, 91, 216, .06); }
.btn--small { min-height: 42px; padding: 8px 22px; font-size: .9375rem; }
.btn:active { transform: translateY(1px); }
.btn--primary:active::before { filter: brightness(.94); }
.btn--ghost:active::before { background: rgba(10, 91, 216, .12); }
/* A long press on a control shouldn't select its label in blue */
.btn, .board__coin, .field__toggle, .faq__list summary, .nav__links a, .nav__login { -webkit-user-select: none; user-select: none; }

/* Nav */
.nav {
    position: sticky; top: 0; z-index: 50;
    background: rgba(255, 255, 255, .86);
    border-bottom: 1px solid var(--line);
    -webkit-backdrop-filter: blur(14px);
    backdrop-filter: blur(14px);
}
.nav__inner { display: flex; align-items: center; gap: 32px; min-height: 76px; }
.nav__logo { flex: none; }
.nav__logo img { width: 92px; }
.nav__links { display: flex; gap: 28px; }
.nav__links a, .nav__login { color: var(--muted); font-size: .9375rem; font-weight: 500; text-decoration: none; transition: color .15s ease; }
.nav__links a:hover, .nav__login:hover { color: var(--text); }
.nav__actions { display: flex; align-items: center; gap: 22px; margin-left: auto; }

/* Hero */
.paint { position: absolute; }
.hero {
    position: relative;
    overflow: hidden;
    padding-block: clamp(40px, 5vw, 72px) clamp(48px, 6vw, 88px);
    background:
        radial-gradient(60% 46% at 50% 74%, rgba(0, 162, 252, .14), transparent 72%),
        linear-gradient(180deg, #ffffff, var(--ink) 60%);
}
/* Quiet orbit lines centred on the heading, wide enough that the copy always sits inside the first one */
.hero__ring { position: absolute; left: 50%; top: -340px; width: 1240px; height: 1240px; max-width: none; translate: -50% 0; pointer-events: none; }
.hero__track { fill: none; stroke: rgba(10, 91, 216, .13); stroke-width: 1; }
.hero__arc { fill: none; stroke: url(#orbit-arc); stroke-width: 2.5; stroke-linecap: round; }
.hero__dot { fill: #005dfc; }
.hero__orbit { transform-origin: 620px 620px; animation: turn 110s linear infinite; }
.hero__orbit--b { animation-duration: 170s; animation-direction: reverse; }
.hero__orbit--c { animation-duration: 80s; }
.hero__inner { position: relative; display: grid; gap: clamp(36px, 5vw, 60px); }
.hero__copy { display: flex; flex-direction: column; align-items: center; text-align: center; }
.hero__eyebrow {
    margin-bottom: 20px;
    padding: 5px 14px;
    background: var(--surface);
    border: 1px solid var(--line-strong);
    border-radius: 99px;
    color: var(--accent);
    font-size: .875rem;
    font-weight: 600;
}
.hero h1 { font-size: clamp(2.125rem, 10.4vw, 5.25rem); font-weight: 700; letter-spacing: -.02em; }
.hero .lede { margin-top: 22px; max-width: 38em; }
.actions { display: flex; flex-wrap: wrap; gap: 18px; margin-top: 32px; }
.hero .actions { justify-content: center; }

/* Market panel: one real product surface, rather than decoration */
.board {
    display: grid;
    grid-template-columns: minmax(0, 1.7fr) minmax(0, 1fr);
    width: 100%;
    max-width: 1120px;
    margin-inline: auto;
    background: var(--surface);
    border: 1px solid var(--line);
    border-radius: 20px;
    box-shadow: 0 2px 6px rgba(11, 23, 48, .04), 0 28px 64px rgba(11, 23, 48, .12);
    overflow: hidden;
}
.board__main { min-width: 0; padding: clamp(20px, 3vw, 32px); }
.board__head { display: flex; align-items: center; gap: 10px; }
.board__price { margin-top: 12px; font-size: clamp(2.25rem, 4.4vw, 3.25rem); font-weight: 600; letter-spacing: -.02em; line-height: 1.1; }
.board__stats { display: flex; flex-wrap: wrap; gap: 10px clamp(20px, 3vw, 36px); margin: 14px 0 0; }
.board__stats dt { color: var(--muted); font-size: .8125rem; }
.board__stats dd { margin: 2px 0 0; font-size: .875rem; }
.board__axis { display: flex; justify-content: space-between; margin-top: 8px; color: var(--muted); font-size: .8125rem; }

.board__side { display: flex; flex-direction: column; min-width: 0; padding: clamp(16px, 2vw, 22px); border-left: 1px solid var(--line); }
.board__side-head { display: flex; flex-wrap: wrap; justify-content: space-between; gap: 2px 12px; padding: 4px 10px 12px; font-size: .8125rem; }
.board__title { font-weight: 600; }
.board__status { color: var(--muted); }
.board__status[data-state="error"] { color: var(--down); }
.board__list { display: grid; flex: 1; align-content: space-between; gap: 2px; }
.board__coin {
    display: grid;
    grid-template-columns: 28px minmax(0, 1fr) auto;
    grid-template-areas: "icon name price" "icon symbol delta";
    column-gap: 10px;
    align-items: center;
    width: 100%;
    padding: 9px 10px;
    background: none;
    border: 0;
    border-radius: 10px;
    color: inherit;
    cursor: pointer;
    font: inherit;
    text-align: left;
    transition: background-color .15s ease;
}
.board__coin:hover { background: rgba(11, 23, 48, .04); }
.board__coin[aria-pressed="true"] { background: var(--surface-2); }
.board__coin[aria-pressed="true"] .board__coin-name { color: var(--accent); }
.board__coin:active { background: rgba(11, 23, 48, .08); }
.board__coin .coin-icon { grid-area: icon; }
.board__coin-name { grid-area: name; font-size: .9375rem; font-weight: 600; line-height: 1.3; }
.board__coin-symbol { grid-area: symbol; color: var(--muted); font-size: .8125rem; line-height: 1.3; }
.board__coin-price { grid-area: price; font-size: .875rem; line-height: 1.3; text-align: right; }
.board__coin-delta { grid-area: delta; justify-content: flex-end; font-size: .8125rem; line-height: 1.3; }

/* Orbit: the logo's broken ring, turning slowly around the Z */
.orbit { position: relative; width: min(100%, 540px); aspect-ratio: 1; margin-inline: auto; }
.orbit__ring { position: absolute; inset: 0; width: 100%; height: 100%; overflow: visible; }
.orbit__track { fill: none; stroke: var(--line); stroke-width: 1; }
.orbit__dash { fill: none; stroke: var(--line); stroke-width: 1; stroke-dasharray: 2 9; }
.orbit__arcs { transform-origin: 300px 300px; animation: turn 70s linear infinite; }
.orbit__mark { position: absolute; left: 50%; top: 50%; width: 36%; translate: -50% -50%; filter: drop-shadow(0 10px 26px rgba(0, 93, 252, .28)); }

@keyframes turn { to { transform: rotate(360deg); } }

.coin-icon--lg { width: 36px; height: 36px; font-size: .9375rem; }
.coin-icon {
    display: inline-grid; place-items: center;
    flex: none;
    width: 28px; height: 28px;
    overflow: hidden;
    border-radius: 50%;
    background: var(--surface-2);
    color: var(--muted);
    font-size: .75rem; font-weight: 600;
}
.coin-icon img { width: 100%; height: 100%; }

.delta { display: inline-flex; align-items: center; gap: 4px; font-family: var(--mono); font-weight: 500; font-size: .875rem; font-variant-numeric: tabular-nums; white-space: nowrap; }
.delta[data-dir="up"] { color: var(--up); }
.delta[data-dir="down"] { color: var(--down); }
.delta[data-dir]::before { content: ""; width: 0; height: 0; border-inline: 4px solid transparent; }
.delta[data-dir="up"]::before { border-bottom: 6px solid currentColor; }
.delta[data-dir="down"]::before { border-top: 6px solid currentColor; }

/* Sections */
.section { padding-block: clamp(56px, 7vw, 100px); border-top: 1px solid var(--line); }
.section__head { display: flex; flex-wrap: wrap; align-items: flex-end; justify-content: space-between; gap: 12px 32px; margin-bottom: clamp(28px, 4vw, 44px); }
.status { color: var(--muted); font-size: .9375rem; }
.status[data-state="error"] { color: var(--down); }
.fineprint { margin-top: 14px; color: var(--muted); font-size: .875rem; }

/* Markets table */
/* Scrolls rather than clips: column widths depend on live numbers, which can't be known in advance */
/* position: relative keeps visually hidden labels inside the scroll box, so they can't widen the page */
.table-card { position: relative; background: var(--surface); border: 1px solid var(--line); border-radius: 16px; box-shadow: var(--shadow); overflow-x: auto; }
.markets { width: 100%; border-collapse: collapse; }
.markets thead th { padding: 14px 22px; color: var(--muted); font-size: .8125rem; font-weight: 500; text-align: left; border-bottom: 1px solid var(--line); }
.markets tbody th, .markets td { padding: 13px 22px; border-bottom: 1px solid var(--line); font-weight: 400; text-align: left; }
.markets tbody tr:last-child th, .markets tbody tr:last-child td { border-bottom: 0; }
.markets tbody tr { transition: background-color .15s ease; }
.markets tbody tr:hover { background: rgba(11, 23, 48, .03); }
.markets .r { text-align: right; }
.asset { display: inline-flex; align-items: center; gap: 12px; }
.asset__name { font-weight: 600; }
.asset__symbol { color: var(--muted); font-size: .875rem; }

/* Sparkline: one 2px line on a recessive plot. Hover gives a crosshair and tooltip */
.spark { position: relative; width: 132px; height: 38px; margin-left: auto; touch-action: pan-y; }
.spark svg { width: 100%; height: 100%; overflow: visible; }
.spark__line { fill: none; stroke: var(--accent); stroke-width: 2px; stroke-linecap: round; stroke-linejoin: round; vector-effect: non-scaling-stroke; }
.spark__cross { position: absolute; top: 0; bottom: 0; width: 1px; background: var(--line-strong); opacity: 0; pointer-events: none; }
.spark__dot { position: absolute; width: 8px; height: 8px; margin: -4px 0 0 -4px; border-radius: 50%; background: var(--accent); box-shadow: 0 0 0 2px var(--surface); opacity: 0; pointer-events: none; }
.spark.is-hover .spark__cross, .spark.is-hover .spark__dot { opacity: 1; }
.spark--wide { width: 100%; height: 72px; margin: 12px 0 0; }
.spark--hero { width: 100%; height: clamp(160px, 19vw, 220px); margin: 16px 0 0; }

.viz-tip {
    position: fixed; z-index: 80;
    padding: 6px 10px;
    background: #0b1730;
    border-radius: 8px;
    box-shadow: 0 8px 22px rgba(11, 23, 48, .25);
    color: #ffffff;
    font-size: .8125rem;
    line-height: 1.35;
    white-space: nowrap;
    pointer-events: none;
}
.viz-tip span { display: block; color: #b9c6dc; font-size: .75rem; }

/* Platform */
.bento { display: grid; grid-template-columns: minmax(0, 1.3fr) minmax(0, 1fr); gap: 20px; }
.card { padding: clamp(22px, 3vw, 32px); background: var(--surface); border: 1px solid var(--line); border-radius: 16px; box-shadow: var(--shadow); }
.card > p { color: var(--muted); }
.card--tall { grid-row: span 2; display: flex; flex-direction: column; }

.sample { display: flex; flex-direction: column; flex: 1; margin-top: 26px; padding: 22px; background: var(--surface-2); border: 1px solid var(--line); border-radius: 12px; }
.sample__top { display: flex; align-items: center; justify-content: space-between; gap: 12px; }
.sample__label { color: var(--muted); font-size: .9375rem; }
.tag { padding: 2px 9px; border: 1px solid var(--line-strong); border-radius: 99px; color: var(--muted); font-size: .75rem; white-space: nowrap; }
.sample__total { margin-top: 8px; font-size: clamp(2.25rem, 4vw, 3rem); font-weight: 600; line-height: 1.1; letter-spacing: -.02em; }

.segbar { display: flex; gap: 2px; height: 8px; margin-top: 22px; }
.segbar span { flex-basis: 0; min-width: 2px; }
.segbar span:first-child { border-radius: 99px 0 0 99px; }
.segbar span:last-child { border-radius: 0 99px 99px 0; }

.legend { display: flex; flex-wrap: wrap; gap: 6px 20px; margin-top: 12px; color: var(--muted); font-size: .875rem; }
.legend li { display: inline-flex; align-items: center; gap: 7px; }
.legend i { width: 8px; height: 8px; border-radius: 50%; }
.legend .num { color: var(--text); font-size: .8125rem; }

.activity { display: flex; flex-direction: column; justify-content: space-between; flex: 1; margin-top: 20px; border-top: 1px solid var(--line); }
.activity li { display: grid; grid-template-columns: 1fr auto 86px; gap: 12px; padding: 11px 0; border-bottom: 1px solid var(--line); font-size: .9375rem; }
.activity li:last-child { border-bottom: 0; padding-bottom: 0; }
.activity .num { font-size: .875rem; }
.activity__when { color: var(--muted); text-align: right; }

.mini { margin-top: 20px; }
.mini__head { display: flex; flex-wrap: wrap; align-items: baseline; gap: 4px 12px; }
.mini__head .delta { margin-left: auto; }
.mini__caption { margin-top: 10px; color: var(--muted); font-size: .8125rem; }

.checks { margin-top: 18px; }
.checks li { position: relative; padding: 10px 0 10px 30px; border-top: 1px solid var(--line); }
.checks li::before {
    content: "";
    position: absolute; left: 3px; top: 16px;
    width: 14px; height: 8px;
    border-left: 2px solid var(--accent);
    border-bottom: 2px solid var(--accent);
    transform: rotate(-45deg);
}

/* Steps */
.steps { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 0 clamp(24px, 4vw, 56px); counter-reset: step; }
.steps li { position: relative; padding-top: 72px; counter-increment: step; }
.steps li::before {
    content: counter(step);
    position: absolute; left: 0; top: 0;
    display: grid; place-items: center;
    width: 48px; height: 48px;
    background: var(--ink);
    border: 1px solid var(--accent);
    border-radius: 50%;
    color: var(--accent);
    font-family: var(--display); font-stretch: 125%; font-style: italic; font-weight: 700; font-size: 1.125rem;
    z-index: 1;
}
.steps li::after {
    content: "";
    position: absolute; left: 48px; right: calc(-1 * clamp(24px, 4vw, 56px)); top: 24px;
    height: 1px;
    background: linear-gradient(90deg, var(--azure), var(--blue));
}
.steps li:last-child::after { right: 0; background: linear-gradient(90deg, var(--blue), transparent); }
.steps p { color: var(--muted); }

/* FAQ */
.faq { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1.7fr); gap: 32px clamp(32px, 6vw, 96px); }
.faq__list details { border-top: 1px solid var(--line); }
.faq__list details:last-child { border-bottom: 1px solid var(--line); }
.faq__list summary {
    display: flex; align-items: center; justify-content: space-between; gap: 20px;
    padding: 20px 0;
    cursor: pointer;
    font-size: 1.125rem; font-weight: 600;
    list-style: none;
}
.faq__list summary:active { color: var(--accent); }
.faq__list summary::-webkit-details-marker { display: none; }
.faq__list summary::after {
    content: "";
    flex: none;
    width: 10px; height: 10px;
    border-right: 2px solid var(--accent);
    border-bottom: 2px solid var(--accent);
    transform: translateY(-2px) rotate(45deg);
    transition: transform .18s ease;
}
.faq__list details[open] summary::after { transform: translateY(2px) rotate(-135deg); }
.faq__list details p { padding-bottom: 22px; color: var(--muted); max-width: 44em; }

/* Closing band */
.closer { position: relative; overflow: hidden; padding-block: clamp(170px, 19vw, 250px); border-top: 1px solid var(--line); text-align: center; }
.closer__ring { position: absolute; left: 50%; top: 50%; width: clamp(420px, 46vw, 640px); translate: -50% -50%; opacity: .5; pointer-events: none; }
.closer__inner { position: relative; display: flex; flex-direction: column; align-items: center; gap: 30px; }

/* Log in and register */
.auth {
    padding-block: clamp(32px, 6vw, 80px);
    background: radial-gradient(44% 70% at 26% 50%, rgba(0, 162, 252, .15), transparent 70%);
}
.auth__grid { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 480px); align-items: center; gap: clamp(32px, 6vw, 96px); }
.auth__aside .orbit { width: min(100%, 460px); }
.auth__card h1 { font-size: clamp(1.75rem, 3vw, 2.25rem); }
.card > .auth__lede { margin-top: 10px; }

/* Register: what joining means beside a short, grouped form */
.join { padding-block: clamp(24px, 5vw, 64px); background: radial-gradient(40% 60% at 22% 40%, rgba(0, 162, 252, .12), transparent 70%); }
.join__grid { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 580px); align-items: stretch; gap: clamp(20px, 3vw, 32px); }
.join__panel {
    position: relative;
    overflow: hidden;
    padding: clamp(28px, 4vw, 52px);
    background:
        radial-gradient(110% 80% at 100% 0%, rgba(0, 162, 252, .34), transparent 60%),
        radial-gradient(90% 70% at 0% 100%, rgba(0, 241, 251, .16), transparent 60%),
        #0b1730;
    border-radius: 20px;
    box-shadow: var(--shadow);
    color: #fff;
}
.join__eyebrow { position: relative; z-index: 1; color: var(--cyan); font-size: .8125rem; font-weight: 700; letter-spacing: .12em; text-transform: uppercase; }
.join__title { position: relative; z-index: 1; max-width: 13em; margin-top: 10px; color: #fff; font-size: clamp(1.75rem, 3vw, 2.5rem); line-height: 1.1; }
.join__steps { position: relative; z-index: 1; display: grid; gap: 26px; max-width: 30em; margin: 34px 0 0; padding: 0; list-style: none; counter-reset: join; }
.join__steps li { position: relative; display: grid; gap: 4px; padding-left: 60px; counter-increment: join; }
.join__steps li::before {
    content: counter(join);
    position: absolute; left: 0; top: -4px;
    display: grid; place-items: center;
    width: 42px; height: 42px;
    background: linear-gradient(135deg, var(--cyan), var(--blue));
    border-radius: 12px;
    color: var(--on-brand);
    font-family: var(--display); font-size: 1.125rem; font-style: italic; font-weight: 800;
}
.join__steps li:not(:last-child)::after { content: ""; position: absolute; left: 20px; top: 46px; bottom: -22px; width: 2px; background: linear-gradient(180deg, rgba(0, 241, 251, .55), rgba(0, 93, 252, .08)); }
.join__steps strong { color: #fff; font-size: 1.0625rem; }
.join__steps span { color: #b9c6dc; font-size: .9375rem; line-height: 1.55; }
/* The landing page's ring, set low in the corner: it needs a square box, like .orbit */
.join__ring { position: absolute; right: -70px; bottom: -80px; width: 340px; aspect-ratio: 1; opacity: .55; pointer-events: none; }
/* Member IDs are capitals; the server reads them that way whatever is typed */
.join [data-sponsor-input] { text-transform: uppercase; }
.join__card { align-self: start; }
.join__card h1 { font-size: clamp(1.75rem, 3vw, 2.25rem); }
.join__card .alert { margin: 18px 0 0; }
.join__form { gap: 26px; }
.join__group { min-width: 0; margin: 0; padding: 0; border: 0; }
/* A floated legend sits in the flow like any heading, so spacing below it works everywhere */
.join__group legend { float: left; width: 100%; margin-bottom: 12px; padding: 0; color: var(--muted); font-size: .75rem; font-weight: 700; letter-spacing: .1em; text-transform: uppercase; }
.join__group legend + * { clear: both; }
.join__group > * + * { margin-top: 14px; }
.join__row { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); align-items: start; gap: 16px; }
.join__sponsor { display: flex; align-items: center; gap: 12px; margin: 0; padding: 10px 14px; background: rgba(10, 91, 216, .06); border: 1px solid rgba(10, 91, 216, .2); border-radius: 12px; color: var(--text); font-size: .9375rem; }
.join__sponsor[hidden] { display: none; }
.join__avatar { display: grid; place-items: center; flex: none; width: 38px; height: 38px; background: linear-gradient(135deg, var(--cyan), var(--blue)); border-radius: 50%; color: var(--on-brand); font-size: .875rem; font-weight: 700; }
.join__sponsor-id { display: block; color: var(--muted); font-size: .8125rem; }
@media (max-width: 1040px) {
    .join__grid { grid-template-columns: minmax(0, 1fr); max-width: 640px; margin-inline: auto; }
    /* The form first on smaller screens; what joining means follows */
    .join__card { order: -1; }
    .join__ring { display: none; }
}
@media (max-width: 560px) {
    .join__row { grid-template-columns: minmax(0, 1fr); }
}
.auth__switch { margin-top: 22px; color: var(--muted); font-size: .9375rem; text-align: center; }
.auth__switch a { color: var(--accent); font-weight: 600; text-underline-offset: 3px; }

.form { display: grid; gap: 20px; margin-top: 26px; }
.field label { display: block; margin-bottom: 7px; font-size: .9375rem; font-weight: 600; }
.field__control { position: relative; }
.field input, .field textarea, .field select {
    width: 100%;
    min-height: 52px;
    padding: 12px 14px;
    background: var(--surface);
    border: 1px solid var(--field-line);
    border-radius: 8px;
    color: var(--text);
    font: inherit;
    font-size: 1rem; /* 16px stops iOS zooming in on focus */
    transition: border-color .15s ease, box-shadow .15s ease;
}
.field input:focus, .field textarea:focus, .field select:focus { outline: none; border-color: var(--accent); box-shadow: 0 0 0 3px rgba(10, 91, 216, .18); }
.field textarea { min-height: 140px; line-height: 1.5; resize: vertical; }
.field select {
    padding-right: 42px;
    background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%234d5d78' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='m6 9 6 6 6-6'/%3E%3C/svg%3E");
    background-position: right 14px center;
    background-repeat: no-repeat;
    background-size: 18px;
    -webkit-appearance: none;
    appearance: none;
}
.field input[type="password"], .field:has(.field__toggle:not([hidden])) input { padding-right: 72px; }
.field__toggle {
    position: absolute; right: 6px; top: 50%;
    translate: 0 -50%;
    min-height: 40px;
    padding: 6px 10px;
    background: none;
    border: 0;
    color: var(--muted);
    cursor: pointer;
    font: inherit;
    font-size: .875rem;
    font-weight: 600;
}
.field__toggle:hover { color: var(--text); }
.field__hint { margin-top: 6px; color: var(--muted); font-size: .875rem; }
.field__error { margin-top: 6px; color: var(--down); font-size: .875rem; font-weight: 500; }
.field--invalid input { border-color: var(--down); }

.alert { margin-top: 20px; padding: 12px 14px; border: 1px solid; border-radius: 8px; font-size: .9375rem; }
.alert--error { background: rgba(196, 36, 60, .07); border-color: rgba(196, 36, 60, .4); }
.alert--page { margin: 0 0 28px; }
.alert--success { margin: 0 0 28px; background: rgba(10, 122, 77, .08); border-color: rgba(10, 122, 77, .4); }

/* Account */
.account h1 { font-size: clamp(2rem, 4vw, 3rem); overflow-wrap: anywhere; }
.account h1 + .lede { margin-top: 10px; }
.account__grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 20px; margin-top: 32px; }
.account__label { margin: 0; color: var(--muted); font-family: var(--body); font-size: .9375rem; font-stretch: normal; font-style: normal; font-weight: 500; letter-spacing: 0; line-height: 1.4; }
.card > .account__value { margin: 8px 0 18px; color: var(--text); font-size: clamp(1.75rem, 3.4vw, 2.5rem); line-height: 1.15; overflow-wrap: anywhere; }
.account__note { margin-top: 24px; color: var(--muted); }

.details { display: grid; margin: 0; }
.details > div { display: flex; flex-wrap: wrap; justify-content: space-between; gap: 4px 16px; padding: 12px 0; border-bottom: 1px solid var(--line); }
.details > div:first-child { padding-top: 0; }
.details > div:last-child { padding-bottom: 0; border-bottom: 0; }
.details dt { color: var(--muted); }
.details dd { margin: 0; }

/* Wallets */
.wallets { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 20px; margin-top: 32px; }
.wallets + .account__grid { margin-top: 20px; }
.wallet { display: flex; flex-direction: column; align-items: flex-start; }
.card > .wallet__amount { margin: 8px 0 18px; color: var(--text); font-size: clamp(1.75rem, 3.4vw, 2.5rem); line-height: 1.15; overflow-wrap: anywhere; }
.wallet__unit { color: var(--muted); font-family: var(--body); font-size: .5em; font-weight: 500; letter-spacing: 0; }
.card > .wallet__hint { margin: 0; font-size: .9375rem; }

/* Deposit */
.deposit h1 { font-size: clamp(2rem, 4vw, 3rem); }
.deposit .lede { margin-top: 12px; }
.deposit__grid { display: grid; grid-template-columns: minmax(0, 1.1fr) minmax(0, 1fr); align-items: start; gap: 20px; margin-top: 32px; }
.deposit__card { display: flex; flex-direction: column; align-items: center; text-align: center; }
.deposit__card > .btn { margin-top: 8px; }
.deposit__heading { font-size: clamp(1.375rem, 2.4vw, 1.75rem); }
.deposit__card > .deposit__heading + p { margin: 10px 0 18px; }
.deposit__qr { width: min(100%, 248px); overflow: hidden; background: #fff; border: 1px solid var(--line); border-radius: 12px; }
.deposit__qr svg { display: block; width: 100%; height: auto; }
.card > .deposit__network { display: inline-flex; align-items: center; gap: 8px; margin: 18px 0 16px; color: var(--text); font-weight: 500; }
.tag { padding: 2px 8px; background: rgba(10, 91, 216, .09); border-radius: 6px; color: var(--accent); font-family: var(--mono); font-size: .8125rem; font-weight: 500; }
.card > .deposit__address {
    width: 100%;
    margin: 6px 0 16px;
    padding: 12px 14px;
    background: var(--surface-2);
    border: 1px solid var(--line);
    border-radius: 10px;
    color: var(--text);
    font-size: clamp(.875rem, 2.4vw, 1rem);
    overflow-wrap: anywhere;
    -webkit-user-select: all;
    user-select: all;
}
.deposit__actions { display: flex; flex-wrap: wrap; align-items: center; justify-content: center; gap: 12px 20px; }
.deposit__explorer { color: var(--accent); font-size: .9375rem; font-weight: 500; }
.card > .deposit__warn { margin: 22px 0 0; padding: 12px 14px; background: rgba(217, 89, 38, .07); border: 1px solid rgba(217, 89, 38, .45); border-radius: 8px; color: var(--text); font-size: .9375rem; text-align: left; }
.deposit__side { display: grid; gap: 20px; }
.card > .deposit__status { margin: 0; }
.card > .deposit__status[data-state="credited"] { color: var(--up); font-weight: 500; }
.card > .deposit__rate { margin: 0; font-size: .9375rem; }
.deposit__steps { display: grid; gap: 8px; margin: 12px 0 0; padding-left: 1.25em; color: var(--muted); list-style: decimal; }
.deposit__steps li { padding-left: 4px; }
.deposit__steps li::marker { color: var(--accent); font-family: var(--mono); font-weight: 600; }
.deposit__steps strong { color: var(--text); font-weight: 600; }
.deposit__history { margin-top: 40px; }
.deposit__history h2 { margin-bottom: 16px; font-size: clamp(1.375rem, 2.4vw, 1.75rem); }

.ledger { width: 100%; border-collapse: collapse; }
.ledger th { padding: 12px 22px; border-bottom: 1px solid var(--line); color: var(--muted); font-size: .8125rem; font-weight: 500; text-align: left; }
.ledger td { padding: 13px 22px; border-bottom: 1px solid var(--line); }
.ledger tbody tr:last-child td { border-bottom: 0; }
.ledger .r { text-align: right; }
.ledger .ledger__in { color: var(--up); }
.ledger .ledger__out { color: var(--down); }
.ledger__empty { margin: 0; padding: 18px 22px; color: var(--muted); }
.ledger__link { color: var(--accent); font-weight: 500; text-decoration: none; overflow-wrap: anywhere; }
.ledger__link:hover { text-decoration: underline; text-underline-offset: 3px; }
.ledger__sub { display: block; margin-top: 2px; color: var(--muted); font-size: .875rem; }
.ledger__sub-inline { color: var(--muted); font-size: .875rem; }
.ledger__details { max-width: 34em; color: var(--muted); font-size: .875rem; overflow-wrap: anywhere; }

.visually-hidden { position: absolute; width: 1px; height: 1px; overflow: hidden; clip-path: inset(50%); white-space: nowrap; }

/* Referral link and income */
.referral { margin-top: 20px; }
.referral__head { display: flex; flex-wrap: wrap; align-items: baseline; justify-content: space-between; gap: 4px 16px; }
.card > .referral__head p { margin: 0; color: var(--muted); font-size: .9375rem; }
.card > .referral__link { margin: 10px 0 8px; padding: 12px 14px; background: var(--surface-2); border: 1px solid var(--line); border-radius: 10px; color: var(--text); font-size: clamp(.875rem, 2.2vw, 1rem); overflow-wrap: anywhere; -webkit-user-select: all; user-select: all; }
.card > .referral__hint { margin: 0 0 16px; font-size: .9375rem; }
.referral__actions { display: flex; flex-wrap: wrap; gap: 12px; }
.income__balance { margin-top: 32px; }
.levels { margin-top: 40px; }
.levels h2 { font-size: clamp(1.375rem, 2.4vw, 1.75rem); }
.levels__intro { margin-top: 8px; color: var(--muted); max-width: 44em; }
.levels .alert { margin: 16px 0 0; }
.levels .alert a { color: var(--accent); font-weight: 600; }
.levels .table-card { margin-top: 16px; }
/* Row headings and totals: the side padding comes from .ledger th / td, so phones still get theirs */
.ledger tbody th, .ledger tfoot th { padding-block: 13px; color: var(--text); font-size: inherit; }
.ledger tbody th { font-weight: 500; }
.ledger tbody tr:last-child th { border-bottom: 0; }
.ledger tfoot th, .ledger tfoot td { border-top: 1px solid var(--line-strong); border-bottom: 0; font-weight: 600; }
.levels__table tbody th, .levels__table tfoot th, .levels__table td { white-space: nowrap; }
/* .ledger.levels__table so these win over the general phone padding for .ledger further down */
@media (max-width: 560px) {
    .ledger.levels__table th, .ledger.levels__table td { padding-inline: 10px; }
    .ledger.levels__table th:first-child { padding-left: 14px; }
    .ledger.levels__table :is(th, td):last-child { padding-right: 14px; }
    /* The column heading already says "Level"; screen readers still hear the full label */
    .levels__word { position: absolute; width: 1px; height: 1px; overflow: hidden; clip-path: inset(50%); white-space: nowrap; }
}
/* The rates are in the sentence above the table */
@media (max-width: 420px) {
    .levels__rate { display: none; }
}
.income__amount { white-space: nowrap; }
.ledger .income__date-under { display: none; }
/* Small phones: the date moves under the details, so the amount keeps its room */
@media (max-width: 480px) {
    .income__ledger .income__date { display: none; }
    .ledger .income__date-under { display: block; }
}
.alert--warn { background: rgba(196, 128, 0, .08); border-color: rgba(176, 110, 0, .45); }

/* Package and top-up */
.package-status { display: flex; flex-wrap: wrap; align-items: center; gap: 6px 10px; margin-top: 14px; color: var(--muted); }
.package-status a { color: var(--accent); font-weight: 600; }
.topup { display: grid; grid-template-columns: repeat(auto-fit, minmax(min(100%, 320px), 1fr)); align-items: start; gap: 20px; margin-top: 28px; }
.card > .topup__inr { margin: 8px 0 18px; color: var(--text); font-size: clamp(2rem, 4vw, 2.75rem); line-height: 1.1; }
.topup__pay { display: flex; flex-direction: column; align-items: flex-start; }
.card > .topup__need { margin: 0 0 18px; }
.card > .topup__need strong { color: var(--text); }
.card > .topup__state { margin: 0 0 10px; }
.topup__done { margin: 20px 0 0; }
.topup__history { margin-top: 24px; }
.account > .alert--error { margin-top: 20px; }

/* Member dashboard */
.dash__activate {
    display: grid;
    grid-template-columns: minmax(0, 1fr) auto;
    align-items: center;
    gap: 20px 40px;
    margin-top: 24px;
    background: linear-gradient(135deg, rgba(0, 241, 251, .09), rgba(0, 93, 252, .07)), var(--surface);
    border-color: rgba(10, 91, 216, .3);
}
.dash__activate p { margin: 0; color: var(--muted); }
.dash__activate .card__title + p { margin-top: 8px; max-width: 46em; }
.dash__activate .dash__missing { margin-top: 12px; color: var(--text); }
.dash__activate-action { display: flex; flex-direction: column; align-items: flex-end; gap: 12px; text-align: right; }
.dash__activate-action strong { color: var(--text); }
.dash__kpis { margin-top: 24px; }
.dash__kpis .stat .btn { margin-top: 16px; }
.dash__grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(min(100%, 440px), 1fr)); align-items: start; gap: 20px; margin-top: 20px; }
.dash__grid + .referral { margin-top: 20px; }
.dash__card-head { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 8px 16px; margin-bottom: 18px; }
.dash__card-head .card__title { margin: 0; }
.card > .dash__card-head p { margin: 0; color: var(--muted); font-size: .9375rem; }
.dash__link { color: var(--accent); font-size: .9375rem; font-weight: 500; }
.card > .dash__empty { margin: 0 0 12px; }
.card > .dash__empty:last-child { margin-bottom: 0; }
.card > .dash__more { margin: 14px 0 0; font-size: .9375rem; }
.dash__more a { color: var(--accent); font-weight: 500; }

/* Activations paying the member, each with its 30-day progress */
.streams { display: grid; margin: 0; padding: 0; list-style: none; }
.stream { display: grid; gap: 8px; padding: 14px 0; border-bottom: 1px solid var(--line); }
.stream:first-child { padding-top: 0; }
.stream:last-child { padding-bottom: 0; border-bottom: 0; }
.stream p { margin: 0; }
.stream__top { display: flex; flex-wrap: wrap; align-items: baseline; justify-content: space-between; gap: 2px 12px; }
.stream__who { min-width: 0; overflow-wrap: anywhere; }
.stream__who .num { font-weight: 600; }
.stream__name { color: var(--muted); font-size: .9375rem; }
.stream__daily { font-weight: 600; white-space: nowrap; }
.stream__daily .wallet__unit { font-size: .8125rem; }
.stream__meta { display: flex; flex-wrap: wrap; justify-content: space-between; gap: 2px 12px; color: var(--muted); font-size: .8125rem; }
/* The track is a lighter step of the fill's own hue */
.meter { height: 6px; overflow: hidden; background: rgba(10, 91, 216, .14); border-radius: 999px; }
.meter > span { display: block; height: 100%; background: var(--accent); border-radius: inherit; }

.team-stats { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 10px; margin: 0 0 16px; }
.team-stats div { padding: 12px 14px; background: var(--surface-2); border-radius: 10px; }
.team-stats dt { color: var(--muted); font-size: .8125rem; }
.team-stats dd { margin: 2px 0 0; color: var(--text); font-size: 1.5rem; font-weight: 600; line-height: 1.2; }
.card .table-card { box-shadow: none; }

.recent { display: grid; margin: 0; padding: 0; list-style: none; }
.recent li { display: flex; align-items: baseline; justify-content: space-between; gap: 12px; padding: 12px 0; border-bottom: 1px solid var(--line); }
.recent li:first-child { padding-top: 0; }
.recent li:last-child { padding-bottom: 0; border-bottom: 0; }
.recent p { margin: 0; min-width: 0; overflow-wrap: anywhere; }
.recent p:last-child { flex: none; }
.recent .ledger__in { color: var(--up); white-space: nowrap; }
.recent .ledger__out { color: var(--down); white-space: nowrap; }
.dash__member-id { display: flex; flex-wrap: wrap; align-items: center; gap: 8px 16px; margin: 4px 0 18px; }
.card .dash__member-id .account__value { margin: 0; color: var(--text); font-size: clamp(1.5rem, 3vw, 2rem); line-height: 1.15; overflow-wrap: anywhere; }
.dash .details dd .badge { margin-right: 4px; }

@media (max-width: 720px) {
    .dash__activate { grid-template-columns: minmax(0, 1fr); }
    .dash__activate-action { align-items: flex-start; text-align: left; }
}
@media (max-width: 380px) {
    .team-stats { gap: 8px; }
    .team-stats div { padding: 10px; }
    .team-stats dd { font-size: 1.25rem; }
}

/* Team */
.tabs { display: flex; flex-wrap: wrap; gap: 8px; margin: 28px 0 16px; }
.tabs a { display: inline-flex; align-items: center; gap: 8px; min-height: 40px; padding: 6px 14px; border: 1px solid var(--line-strong); border-radius: 999px; color: var(--muted); font-size: .9375rem; font-weight: 500; text-decoration: none; }
.tabs a:hover { color: var(--text); background: rgba(11, 23, 48, .04); }
.tabs a[aria-current="page"] { background: var(--accent); border-color: var(--accent); color: #fff; }
.tabs .num { font-size: .8125rem; opacity: .85; }
.team__about { margin: 0 0 14px; color: var(--muted); font-size: .9375rem; }
.team__table .badge + .ledger__sub { margin-top: 4px; }

/* An admin viewing the member panel as a member */
.viewing { margin: 0; padding: 10px clamp(16px, 3vw, 36px); background: #fff4d6; border-bottom: 1px solid rgba(176, 110, 0, .35); color: var(--text); font-size: .9375rem; }
.admin__login-as { display: flex; flex-wrap: wrap; align-items: center; gap: 8px 12px; margin-bottom: 18px; color: var(--muted); font-size: .9375rem; }

/* Withdraw */
.withdraw { display: grid; grid-template-columns: repeat(auto-fit, minmax(min(100%, 340px), 1fr)); align-items: start; gap: 20px; margin-top: 28px; }
.withdraw .details { margin-top: 4px; }
.withdraw__action .form { margin-top: 16px; }
.withdraw__amount { display: flex; gap: 8px; }
.withdraw__amount input { flex: 1; min-width: 0; }
.withdraw__amount .btn { flex: none; align-self: center; }
.withdraw__address { overflow-wrap: anywhere; word-break: break-all; }
.withdraw__confirm { display: flex; align-items: flex-start; gap: 10px; color: var(--muted); font-size: .9375rem; line-height: 1.45; cursor: pointer; }
.withdraw__confirm input { flex: none; width: 20px; height: 20px; margin: 1px 0 0; accent-color: var(--accent); }
.withdraw__cancel { margin-top: 18px; }
.withdraw__reject { margin-top: 18px; padding-top: 18px; border-top: 1px solid var(--line); }
.stat__actions { display: flex; flex-wrap: wrap; gap: 8px; margin-top: 16px; }
.dash__kpis .stat__actions .btn { margin-top: 0; }
.admin__narrow + .admin__narrow { margin-top: 20px; }

/* Admin overview */
.overview__stats { grid-template-columns: repeat(auto-fit, minmax(min(100%, 240px), 1fr)); }
/* Two lists a row at most, so member IDs and dates have room; IDs never break mid-ID */
.overview__lists { grid-template-columns: repeat(auto-fit, minmax(min(100%, 460px), 1fr)); margin-top: 16px; }
.overview__lists td { overflow-wrap: normal; }
.overview__lists .ledger__link, .overview__lists td > .num:first-child { white-space: nowrap; }
.stat--attention { border-color: rgba(10, 91, 216, .45); box-shadow: 0 0 0 3px rgba(10, 91, 216, .08), var(--shadow); }
.flow__controls { display: flex; flex-wrap: wrap; gap: 10px 14px; margin-bottom: 14px; }
.segmented { display: inline-flex; padding: 3px; background: var(--surface); border: 1px solid var(--line-strong); border-radius: 10px; }
.segmented button { min-height: 36px; padding: 4px 14px; background: none; border: 0; border-radius: 7px; color: var(--muted); font: inherit; font-size: .9375rem; font-weight: 500; cursor: pointer; }
.segmented button:hover { color: var(--text); }
.segmented button[aria-pressed="true"] { background: var(--accent); color: #fff; }
.segmented button:focus-visible { outline: 2px solid var(--accent); outline-offset: 2px; }
.card > .flow__caption { margin: 0 0 10px; font-size: .9375rem; }
.flow__legend { display: flex; flex-wrap: wrap; gap: 6px 20px; margin: 0 0 6px; padding: 0; list-style: none; color: var(--text); font-size: .875rem; }
.flow__legend li { display: inline-flex; align-items: center; gap: 8px; }
/* Line keys mirror the marks: a short stroke, never a filled box */
.flow__key { display: inline-block; flex: none; width: 16px; height: 2px; border-radius: 2px; }
.flow__plot { position: relative; min-height: 220px; border-radius: 8px; }
.flow__plot.is-focused { outline: 2px solid var(--accent); outline-offset: 4px; }
.flow__plot svg { display: block; width: 100%; height: auto; overflow: visible; }
.flow__grid { stroke: rgba(11, 23, 48, .08); stroke-width: 1; shape-rendering: crispEdges; }
.flow__tick { fill: var(--muted); font-size: 12px; font-variant-numeric: tabular-nums; }
.flow__line { fill: none; stroke-width: 2; stroke-linecap: round; stroke-linejoin: round; }
.flow__end { stroke: var(--surface); stroke-width: 2; }
.flow__label { fill: var(--text); font-size: 12px; }
.flow__cross { stroke: var(--line-strong); stroke-width: 1; }
.flow__hit { fill: transparent; cursor: crosshair; outline: none; touch-action: pan-y; }
.flow__empty { fill: var(--muted); font-size: 14px; text-anchor: middle; }
.flow__tip { position: absolute; z-index: 5; min-width: 180px; padding: 10px 12px; background: #0b1730; border-radius: 10px; box-shadow: 0 10px 26px rgba(11, 23, 48, .25); color: #fff; font-size: .8125rem; line-height: 1.4; pointer-events: none; }
.flow__tip p { margin: 0; }
.flow__tip-date { margin-bottom: 6px !important; color: #b9c6dc; }
.flow__tip-row { display: flex; align-items: center; gap: 8px; }
.flow__tip-row + .flow__tip-row { margin-top: 3px !important; }
.flow__tip-row strong { font-variant-numeric: tabular-nums; font-weight: 600; }
.flow__tip-name { color: #b9c6dc; }
.flow__table { margin-top: 14px; }
.flow__table summary { width: fit-content; color: var(--accent); font-size: .9375rem; font-weight: 500; cursor: pointer; }
.flow__table .table-card { max-height: 420px; margin-top: 12px; overflow: auto; }

/* Support */
.page-head { display: flex; flex-wrap: wrap; align-items: flex-end; justify-content: space-between; gap: 16px 24px; }
.page-head + .alert, .page-head + .table-card { margin-top: 24px; }
.support__list { margin-top: 28px; }
.back { margin: 0 0 12px; }
.back a { color: var(--accent); font-size: .9375rem; font-weight: 500; }
.back a::before { content: "← "; }
.support__subject { font-size: clamp(1.75rem, 3.4vw, 2.5rem); overflow-wrap: anywhere; }
.support__meta { display: flex; flex-wrap: wrap; align-items: center; gap: 4px 8px; margin-top: 8px; color: var(--muted); font-size: .9375rem; }
.support .alert--success { margin: 20px 0 0; }
.support__form { margin-top: 20px; max-width: 760px; }
.support__layout .support__form { max-width: none; }
.support__form .form { margin-top: 0; }
.support__actions { display: flex; flex-wrap: wrap; gap: 12px; }
.support__close { display: flex; flex-wrap: wrap; align-items: center; gap: 8px 12px; margin-top: 18px; padding-top: 18px; border-top: 1px solid var(--line); color: var(--muted); font-size: .9375rem; }
.support__closed { margin-top: 20px; color: var(--muted); }
.support__closed a { color: var(--accent); font-weight: 500; }
.support__layout { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 340px); align-items: start; gap: 20px; margin-top: 24px; }
.support__layout .thread { margin-top: 0; }
.support__member-id { margin: 0 0 14px; font-size: 1.125rem; }
.support .thread { max-width: 760px; }
.support__layout .thread { max-width: none; }

.thread { display: grid; gap: 14px; margin: 24px 0 0; padding: 0; list-style: none; }
.msg { padding: 16px 18px; background: var(--surface); border: 1px solid var(--line); border-radius: 14px; }
.msg--support { background: rgba(10, 91, 216, .05); border-color: rgba(10, 91, 216, .22); }
.msg__head { display: flex; flex-wrap: wrap; align-items: baseline; justify-content: space-between; gap: 2px 12px; margin: 0 0 8px; font-size: .9375rem; }
.msg__head time { color: var(--muted); font-size: .8125rem; }
.msg--support .msg__head strong { color: var(--accent); }
.msg__body { line-height: 1.6; overflow-wrap: anywhere; }

/* A small count beside a menu item */
.nav-count { display: inline-grid; place-items: center; min-width: 20px; height: 20px; margin-left: auto; padding: 0 6px; background: var(--accent); border-radius: 999px; color: #fff; font-size: .75rem; font-weight: 700; line-height: 1; }
.badge--new { background: rgba(10, 91, 216, .1); color: var(--accent); }

@media (max-width: 900px) {
    .support__layout { grid-template-columns: minmax(0, 1fr); }
}

/* Admin */
.side__badge { width: fit-content; margin: -16px 0 0 8px; padding: 2px 8px; background: var(--text); border-radius: 6px; color: var(--surface); font-size: .75rem; font-weight: 600; letter-spacing: .04em; text-transform: uppercase; }
.admin h1 { font-size: clamp(2rem, 4vw, 3rem); overflow-wrap: anywhere; }
.admin h2:not(.account__label):not(.card__title) { font-size: clamp(1.25rem, 2.2vw, 1.5rem); }
.admin .lede { margin-top: 10px; }
.admin__title { display: flex; flex-wrap: wrap; align-items: center; gap: 8px 14px; }
.admin__back { margin-bottom: 12px; }
.admin__back a { color: var(--accent); font-weight: 500; text-decoration: none; }
.admin__grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(min(100%, 340px), 1fr)); align-items: start; gap: 20px; margin-top: 20px; }
.admin__section { margin-top: 36px; }
.admin__head { display: flex; flex-wrap: wrap; align-items: baseline; justify-content: space-between; gap: 6px 16px; margin-bottom: 14px; }
.admin__head a { color: var(--accent); font-size: .9375rem; font-weight: 500; }
.admin__grid > section .admin__head { margin-top: 16px; }
.admin__count { margin: 18px 0 12px; color: var(--muted); }
.admin__narrow { max-width: 640px; margin-top: 28px; }
.admin__note { margin-top: 20px; color: var(--muted); font-size: .9375rem; }
.admin__heading-count { margin-left: 6px; color: var(--muted); font-size: .8em; }
.admin .table-card { margin-top: 0; }
.admin .wallets { margin-top: 24px; }
.admin .card > .alert--success { margin-bottom: 20px; }
.card__title { margin: 0 0 6px; font-size: clamp(1.25rem, 2vw, 1.5rem); }
.card > .card__title + p { margin-bottom: 16px; }
.details--spaced { margin-top: 26px; }
.details dd { overflow-wrap: anywhere; text-align: right; }

.stats { display: grid; grid-template-columns: repeat(auto-fit, minmax(min(100%, 220px), 1fr)); gap: 20px; margin-top: 28px; }
.stats--two { grid-template-columns: repeat(auto-fit, minmax(min(100%, 300px), 1fr)); margin-bottom: 24px; }
.stat { display: flex; flex-direction: column; align-items: flex-start; }
.card > .stat__value { margin: 8px 0 6px; color: var(--text); font-size: clamp(1.5rem, 2.6vw, 2rem); line-height: 1.15; overflow-wrap: anywhere; }
.card > .stat__value--text { font-family: var(--body); font-size: 1.25rem; font-weight: 600; }
.card > .stat__sub { margin: 0; font-size: .875rem; }
.card > .stat__sub a { color: var(--accent); }
.card > .stat__sub--lead { margin: 8px 0 16px; font-size: .9375rem; }

.badge { display: inline-block; padding: 2px 8px; border-radius: 6px; font-family: var(--body); font-size: .75rem; font-style: normal; font-weight: 600; letter-spacing: .02em; vertical-align: middle; white-space: nowrap; }
.badge--ok { background: rgba(10, 122, 77, .1); color: var(--up); }
.badge--danger { background: rgba(196, 36, 60, .1); color: var(--down); }
.badge--muted { background: rgba(11, 23, 48, .06); color: var(--muted); }
.ledger__link + .badge { margin-left: 6px; }

.search { display: flex; flex-wrap: wrap; align-items: center; gap: 10px 12px; max-width: 640px; margin-top: 24px; }
.search input { flex: 1 1 240px; min-height: 44px; padding: 10px 14px; background: var(--surface); border: 1px solid var(--field-line); border-radius: 10px; color: var(--text); font: inherit; }
.search input:focus { outline: none; border-color: var(--accent); box-shadow: 0 0 0 3px rgba(10, 91, 216, .18); }
.search__clear { color: var(--accent); font-size: .9375rem; font-weight: 500; }

.pager { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 12px 20px; margin-top: 16px; }
.pager__info { color: var(--muted); font-size: .9375rem; }
.pager__links { display: flex; flex-wrap: wrap; align-items: center; gap: 6px; margin-left: auto; }
.pager__page { display: inline-grid; place-items: center; min-width: 40px; height: 40px; padding: 0 10px; background: var(--surface); border: 1px solid var(--line-strong); border-radius: 10px; color: var(--text); font-size: .9375rem; font-weight: 500; text-decoration: none; font-variant-numeric: tabular-nums; }
.pager__page:hover { background: rgba(11, 23, 48, .04); }
.pager__page[aria-current="page"] { background: var(--accent); border-color: var(--accent); color: #fff; font-weight: 600; }
.pager__step { padding: 0 14px; }
.pager__gap { min-width: 20px; color: var(--muted); text-align: center; }
.pager__per { display: flex; align-items: center; gap: 8px; color: var(--muted); font-size: .9375rem; }
.pager__per select { min-height: 40px; padding: 6px 34px 6px 12px; background: var(--surface) url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%234d5d78' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='m6 9 6 6 6-6'/%3E%3C/svg%3E") right 10px center / 16px no-repeat; border: 1px solid var(--field-line); border-radius: 8px; color: var(--text); font: inherit; -webkit-appearance: none; appearance: none; }
.js .pager__go { display: none; }
/* While the next page loads, the current one stays put, dimmed */
.ajax-list { transition: opacity .15s ease; }
.ajax-list.is-loading { opacity: .5; }
.ajax-list:focus { outline: none; }
.ledger .ledger__serial { width: 1%; color: var(--muted); white-space: nowrap; }
.ledger th abbr[title] { text-decoration: none; }
/* Member IDs never break mid-ID; on a phone the table scrolls sideways in its box instead */
.members__table td { overflow-wrap: normal; }
.members__table .ledger__link { white-space: nowrap; }
@media (max-width: 480px) {
    .pager__page--far { display: none; }
    .pager__links { margin-left: 0; }
}

/* An action that asks before it happens */
.confirm { margin-top: 14px; }
.confirm:first-of-type { margin-top: 18px; }
.confirm > summary { list-style: none; width: fit-content; cursor: pointer; }
.confirm > summary::-webkit-details-marker { display: none; }
.confirm__body { margin-top: 12px; padding: 14px 16px; background: var(--surface-2); border: 1px solid var(--line); border-radius: 10px; }
.confirm__body p { margin-bottom: 12px; color: var(--muted); font-size: .9375rem; }
.btn--danger { color: #fff; }
.btn--danger::before { background: var(--down); }
.btn--danger:hover::before { filter: brightness(1.1); }
.btn:disabled { cursor: not-allowed; opacity: .5; }

.card > form:not(.form) { margin-top: 18px; }
.wallet-status { margin: 0; font-size: .9375rem; overflow-wrap: anywhere; }
.wallet-status:empty { display: none; }
form:not(.form) > .wallet-status { margin-top: 12px; }
.wallet-status[data-state="working"] { color: var(--muted); }
.wallet-status[data-state="ok"] { color: var(--up); font-weight: 500; }
.wallet-status[data-state="error"] { color: var(--down); font-weight: 500; }
.wallet-status a { color: var(--accent); font-weight: 500; }
.wallet-note { padding: 12px 14px; background: rgba(217, 89, 38, .07); border: 1px solid rgba(217, 89, 38, .45); border-radius: 8px; color: var(--text); }

.admin-login { display: grid; place-items: center; min-height: 100vh; padding: 24px 16px; }
.admin-login__card { width: min(100%, 420px); }
.admin-login__logo img { display: block; width: 104px; margin-bottom: 20px; }
.admin-login h1 { font-size: clamp(1.75rem, 3vw, 2.25rem); }

/* Member panel */
.panel { display: grid; grid-template-columns: 248px minmax(0, 1fr); min-height: 100vh; }
.side {
    position: sticky;
    top: 0;
    display: flex;
    flex-direction: column;
    gap: 28px;
    height: 100vh;
    padding: 18px 16px;
    overflow-y: auto;
    background: var(--surface);
    border-right: 1px solid var(--line);
}
.side__logo { display: block; width: fit-content; padding-inline: 8px; }
.side__logo img { width: 108px; }
.side__nav { display: grid; gap: 4px; }
.side__nav a {
    display: flex;
    align-items: center;
    gap: 12px;
    min-height: 44px;
    padding: 8px 12px;
    border-radius: 10px;
    color: var(--muted);
    font-size: .9375rem;
    font-weight: 500;
    text-decoration: none;
    transition: background-color .15s ease, color .15s ease;
}
.side__nav a:hover { background: rgba(11, 23, 48, .04); color: var(--text); }
.side__nav a:active { background: rgba(11, 23, 48, .08); }
.side__nav a[aria-current="page"] { background: rgba(10, 91, 216, .09); color: var(--accent); font-weight: 600; }
.side__nav svg, .menu-btn svg { flex: none; width: 20px; height: 20px; fill: none; stroke: currentColor; stroke-width: 1.75; stroke-linecap: round; stroke-linejoin: round; }

.panel__body { display: flex; flex-direction: column; min-width: 0; }
.panel__top {
    position: sticky;
    top: 0;
    z-index: 20;
    display: flex;
    align-items: center;
    gap: 14px;
    min-height: 72px;
    padding: 12px clamp(16px, 3vw, 36px);
    background: rgba(255, 255, 255, .88);
    border-bottom: 1px solid var(--line);
    -webkit-backdrop-filter: blur(14px);
    backdrop-filter: blur(14px);
}
.panel__title { font-weight: 600; }
.panel__logo { display: none; }
.panel__account { display: flex; align-items: center; gap: 18px; min-width: 0; margin-left: auto; }
.panel__who { overflow: hidden; color: var(--muted); font-size: .9375rem; text-overflow: ellipsis; white-space: nowrap; }
.panel__account .btn { flex: none; }
.panel__main { width: 100%; padding: clamp(24px, 4vw, 44px) clamp(16px, 3vw, 36px); }

.menu-btn { display: none; flex: none; place-items: center; width: 44px; height: 44px; background: none; border: 1px solid var(--line-strong); border-radius: 10px; color: var(--text); cursor: pointer; }
.menu-btn:active { background: rgba(11, 23, 48, .06); }

@media (max-width: 900px) {
    .panel { display: block; }
    .panel__title { display: none; }
    .panel__logo { display: block; flex: none; }
    .panel__logo img { width: 72px; }
    /* Without JavaScript the menu just stays open at the top of the page */
    .side { position: static; height: auto; border-right: 0; border-bottom: 1px solid var(--line); }
    .js .menu-btn { display: inline-grid; }
    .js .side {
        position: fixed;
        inset: 0 auto 0 0;
        z-index: 60;
        width: min(280px, 84vw);
        height: auto;
        border-right: 1px solid var(--line);
        border-bottom: 0;
        box-shadow: 0 0 40px rgba(11, 23, 48, .2);
        translate: -100% 0;
        visibility: hidden; /* also keeps its links out of the Tab order while closed */
        transition: translate .2s ease, visibility 0s .2s; /* stays visible until it has slid away */
    }
    /* Visible at once on opening, or focus can't move into the menu */
    .js .side.is-open { translate: 0 0; visibility: visible; transition: translate .2s ease, visibility 0s; }
    .side-scrim { position: fixed; inset: 0; z-index: 55; background: rgba(11, 23, 48, .42); }
    body.side-open { overflow: hidden; }
}

@media (max-width: 560px) {
    .panel__who { display: none; }
}

/* Footer */
.footer { padding-block: 40px; border-top: 1px solid var(--line); }
.footer__inner { display: flex; align-items: flex-start; gap: 40px; }
.footer__brand { flex: none; }
.footer__brand img { width: 88px; }
.footer__notes { display: grid; gap: 8px; max-width: 62em; color: var(--muted); font-size: .9375rem; }
.footer__notes strong { color: var(--text); font-weight: 600; }

@media (max-width: 1040px) {
    .board { grid-template-columns: minmax(0, 1fr); }
    .board__side { border-left: 0; border-top: 1px solid var(--line); }
    .board__list { grid-template-columns: repeat(2, minmax(0, 1fr)); }
    .bento, .faq { grid-template-columns: minmax(0, 1fr); }
    .auth { background: none; }
    .auth__grid { grid-template-columns: minmax(0, 480px); justify-content: center; }
    .auth__aside { display: none; }
    .card--tall { grid-row: auto; }
    .nav__links { display: none; }
    .deposit__grid { grid-template-columns: minmax(0, 1fr); }
}

@media (max-width: 900px) {
    .markets thead th, .markets tbody th, .markets td { padding-inline: 14px; }
    .markets .spark { width: 96px; }
}

@media (max-width: 800px) {
    .markets .asset__symbol { display: none; }
}

@media (max-width: 720px) {
    .hide-sm { display: none; }
    .hero__ring { display: none; }
    .board__list { grid-template-columns: minmax(0, 1fr); }
    .account__grid, .wallets { grid-template-columns: minmax(0, 1fr); }
    .markets thead th, .markets tbody th, .markets td { padding-inline: 14px; }
    .ledger th, .ledger td, .ledger__empty { padding-inline: 14px; }
    .asset { gap: 10px; }
    .steps { grid-template-columns: minmax(0, 1fr); gap: 28px; }
    .steps li { padding: 8px 0 0 68px; min-height: 56px; }
    .steps li::after { left: 24px; right: auto; top: 48px; bottom: -28px; width: 1px; height: auto; background: linear-gradient(180deg, var(--azure), var(--blue)); }
    .steps li:last-child::after { display: none; }
    .footer__inner { flex-direction: column; gap: 20px; }
}

@media (max-width: 560px) {
    .actions .btn { flex: 1 1 auto; }
    .markets .asset__symbol { display: none; }
    .sample { padding: 16px; }
    .activity li { grid-template-columns: 1fr auto; }
    .activity__when { display: none; }
    .nav__login { font-size: .875rem; }
    .nav__actions { gap: 16px; }
}

@media (max-width: 429px) {
    .markets thead th, .markets tbody th, .markets td { padding-inline: 10px; font-size: .875rem; }
    .markets td.num { font-size: .8125rem; }
    .markets .delta { font-size: .75rem; }
    .markets .asset { gap: 8px; }
}

@media (max-width: 389px) {
    .markets .coin-icon { display: none; }
}

@media (prefers-reduced-motion: reduce) {
    html { scroll-behavior: auto; }
    .orbit__arcs, .hero__orbit { animation: none; }
    * { transition: none !important; }
}

@media (forced-colors: active) {
    .btn::before { border: 1px solid ButtonText; }
    .accent { color: CanvasText; background: none; }
}
