/* Bunker.tools — neo-retro theme.
   Old-school window chrome (title bars, hard offset shadows, mono labels)
   on a calm, readable modern base. Plain CSS, no build step and no CDN. */

:root {
    --bg: #f2efe7;
    --grid: rgba(27, 27, 31, 0.07);
    --surface: #fffdf8;
    --surface-2: #f7f4ec;
    --ink: #1b1b1f;
    --ink-soft: #5f5d58;
    --line: #1b1b1f;
    --line-soft: rgba(27, 27, 31, 0.14);
    --accent: #3651f5;
    --accent-hover: #2a43d9;
    --accent-soft: #e5e9ff;
    --on-accent: #ffffff;
    --green: #17985a;
    --green-soft: #def3e6;
    --yellow: #ffd23f;
    --yellow-soft: #fff3c4;
    --red: #d93d42;
    --red-soft: #fde3e3;
    --on-status: #ffffff;
    --shadow-color: #1b1b1f;
    --shadow: 6px 6px 0 var(--shadow-color);
    --shadow-sm: 3px 3px 0 var(--shadow-color);

    --radius: 12px;
    --radius-sm: 8px;
    --sans: -apple-system, BlinkMacSystemFont, "Segoe UI", Inter, Roboto, "Helvetica Neue", Arial, sans-serif;
    --mono: ui-monospace, "SF Mono", SFMono-Regular, Menlo, Consolas, "DejaVu Sans Mono", "Liberation Mono", monospace;
    color-scheme: light;
}

@media (prefers-color-scheme: dark) {
    :root {
        --bg: #111216;
        --grid: rgba(236, 235, 228, 0.05);
        --surface: #1b1c21;
        --surface-2: #23242a;
        --ink: #ecebe4;
        --ink-soft: #a3a29b;
        --line: #4a4b53;
        --line-soft: rgba(236, 235, 228, 0.12);
        --accent: #7088ff;
        --accent-hover: #889cff;
        --accent-soft: #262c4d;
        --on-accent: #0d0f1a;
        --green: #3ccf7f;
        --green-soft: #183527;
        --yellow: #ffd23f;
        --yellow-soft: #3a3217;
        --red: #ff6b6f;
        --red-soft: #3d1d20;
        --on-status: #101114;
        --shadow-color: #000000;
        color-scheme: dark;
    }
}

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

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

body {
    margin: 0;
    min-height: 100vh;
    display: flex;
    flex-direction: column;
    font-family: var(--sans);
    font-size: 16px;
    line-height: 1.55;
    color: var(--ink);
    background-color: var(--bg);
    background-image:
        linear-gradient(var(--grid) 1px, transparent 1px),
        linear-gradient(90deg, var(--grid) 1px, transparent 1px);
    background-size: 24px 24px;
    -webkit-font-smoothing: antialiased;
    /* Shows the page the inline style in base.html keeps hidden until this file loads. */
    visibility: visible;
    animation: none;
}

a {
    color: var(--accent);
    text-underline-offset: 3px;
}

a:hover {
    color: var(--accent-hover);
}

::selection {
    background: var(--yellow);
    color: #1b1b1f;
}

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

code,
pre {
    font-family: var(--mono);
    font-size: 0.92em;
}

/* ---------- Menu bar & status bar ---------- */

.menubar {
    position: sticky;
    top: 0;
    z-index: 20;
    display: flex;
    align-items: center;
    gap: 2px;
    padding: 8px 16px;
    background: var(--surface);
    border-bottom: 2px solid var(--line);
    font-family: var(--mono);
    font-size: 14px;
    overflow-x: auto;
    white-space: nowrap;
}

.menubar a {
    padding: 6px 10px;
    border-radius: var(--radius-sm);
    color: var(--ink);
    text-decoration: none;
}

.menubar a:hover {
    background: var(--surface-2);
    color: var(--ink);
}

.menubar a[aria-current="page"] {
    background: var(--accent);
    color: var(--on-accent);
}

.menubar a[aria-current="page"] .hk {
    color: inherit;
}

.lang-switch {
    display: inline-flex;
    align-items: center;
    gap: 2px;
    margin-left: 6px;
    font-size: 12px;
}

.lang-switch b,
.menubar .lang-switch a {
    padding: 4px 6px;
}

.lang-switch b {
    border: 1.5px solid var(--line);
    border-radius: var(--radius-sm);
}

.menubar .brand {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    margin-right: 10px;
    padding-left: 0;
    font-weight: 700;
    color: var(--ink);
}

/* The mascot avatar is the logo. */
.menubar .brand::before {
    content: "";
    width: 24px;
    height: 24px;
    margin: -4px 0;
    background: url("mascot/avatar.svg") center / contain no-repeat;
}

.menubar .brand:hover {
    background: none;
}

.menubar .spacer {
    flex: 1;
}

.hk {
    text-decoration: underline;
    text-decoration-thickness: 2px;
    text-decoration-color: var(--accent);
    text-underline-offset: 3px;
}

.statusbar {
    display: flex;
    flex-wrap: wrap;
    gap: 6px 20px;
    padding: 12px 16px;
    border-top: 2px solid var(--line);
    background: var(--surface);
    font-family: var(--mono);
    font-size: 13px;
    color: var(--ink-soft);
}

.statusbar a {
    color: var(--ink-soft);
    text-decoration: none;
}

.statusbar a:hover {
    color: var(--ink);
}

.statusbar .key {
    display: inline-block;
    margin-right: 6px;
    padding: 0 6px;
    border: 1.5px solid var(--line);
    border-radius: 5px;
    background: var(--surface-2);
    box-shadow: 0 2px 0 var(--shadow-color);
    color: var(--ink);
    font-size: 11px;
    font-weight: 700;
    line-height: 18px;
}

/* ---------- Layout ---------- */

.desktop {
    flex: 1;
    width: 100%;
    padding: 40px 16px 56px;
}

.desktop--center {
    display: flex;
    align-items: flex-start;
    justify-content: center;
}

.col {
    width: 100%;
    max-width: 560px;
    margin: 0 auto;
}

.col--wide {
    max-width: 1180px;
}

.col--home {
    max-width: 720px;
}

.stack > * + * {
    margin-top: 16px;
}

.stack-lg > * + * {
    margin-top: 32px;
}

.stack-sm > * + * {
    margin-top: 8px;
}

.mt {
    margin-top: 8px;
}

.row {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: 10px;
}

.row--between {
    justify-content: space-between;
}

.grid-2 {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 12px;
}

.center {
    text-align: center;
}

.muted {
    color: var(--ink-soft);
}

.small {
    font-size: 14px;
}

.nowrap {
    white-space: nowrap;
}

.break {
    word-break: break-all;
}

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

.error-text {
    color: var(--red);
}

/* ---------- Windows ---------- */

.window {
    position: relative;
    padding: 0 24px 24px;
    background: var(--surface);
    border: 2px solid var(--line);
    border-radius: var(--radius);
    box-shadow: var(--shadow);
}

/* Title bar like an old-school OS window, flat and calm */
.window-title {
    display: flex;
    align-items: center;
    gap: 10px;
    margin: 0 -24px 20px;
    padding: 10px 16px;
    border-bottom: 2px solid var(--line);
    border-radius: calc(var(--radius) - 2px) calc(var(--radius) - 2px) 0 0;
    background: var(--accent-soft);
    font-family: var(--mono);
    font-size: 14px;
    font-weight: 700;
    letter-spacing: 0.02em;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.stack > .window-title + *,
.stack-lg > .window-title + * {
    margin-top: 0;
}

.window--alert {
    background: var(--yellow-soft);
}

.window--alert .window-title {
    background: var(--yellow);
    color: #1b1b1f;
}

h1,
h2,
h3 {
    margin: 0;
    line-height: 1.2;
}

.display {
    font-family: var(--mono);
    font-size: 28px;
    font-weight: 700;
    letter-spacing: -0.02em;
}

.kicker {
    font-family: var(--mono);
    font-size: 12px;
    letter-spacing: 0.16em;
    text-transform: uppercase;
    color: var(--ink-soft);
}

p {
    margin: 0;
}

/* Dotted key/value rows: "Цена ........ $30" */
.kv {
    display: flex;
    align-items: baseline;
    gap: 8px;
}

.kv > span:first-child {
    color: var(--ink-soft);
}

.kv .dots {
    flex: 1;
    min-width: 16px;
    border-bottom: 2px dotted var(--line-soft);
    transform: translateY(-4px);
}

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

/* ---------- Form controls ---------- */

.label {
    display: block;
    margin-bottom: 6px;
    font-weight: 600;
}

legend.label {
    padding: 0;
}

.input,
.select,
.textarea {
    display: block;
    width: 100%;
    padding: 10px 12px;
    border: 2px solid var(--line);
    border-radius: var(--radius-sm);
    background: var(--surface);
    color: var(--ink);
    font: inherit;
    transition: box-shadow 0.12s ease, border-color 0.12s ease;
}

.input::placeholder,
.textarea::placeholder {
    color: var(--ink-soft);
    opacity: 0.7;
}

.input:focus,
.select:focus,
.textarea:focus {
    outline: none;
    border-color: var(--accent);
    box-shadow: 0 0 0 4px var(--accent-soft);
}

.input[readonly] {
    background: var(--surface-2);
    color: var(--ink-soft);
    font-family: var(--mono);
}

.textarea {
    min-height: 84px;
    resize: vertical;
}

.input--sm {
    padding: 6px 10px;
    font-size: 13px;
}

/* Tariff tiles: equal size, side by side, with a round radio.
   The card follows its input as a sibling (input:checked + .choice-card):
   :has() is not re-evaluated reliably when another radio gets checked. */
.choices {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(140px, 1fr));
    gap: 12px;
    border: 0;
    margin: 0;
    padding: 0;
}

.choices > legend {
    padding: 0;
    margin-bottom: 6px;
}

.choice {
    position: relative;
    display: flex;
    cursor: pointer;
}

.choice input {
    position: absolute;
    opacity: 0;
    pointer-events: none;
}

.choice-card {
    flex: 1;
    display: flex;
    flex-direction: column;
    gap: 2px;
    padding: 12px 14px 14px;
    border: 2px solid var(--line);
    border-radius: var(--radius-sm);
    background: var(--surface);
    transition: transform 0.12s ease, box-shadow 0.12s ease, background-color 0.12s ease, border-color 0.12s ease;
}

.choice:hover .choice-card {
    background: var(--surface-2);
}

.choice-top {
    display: flex;
    align-items: center;
    justify-content: space-between;
    min-height: 22px;
    margin-bottom: 8px;
}

.choice .mark {
    flex: none;
    width: 22px;
    height: 22px;
    border: 2px solid var(--line);
    border-radius: 50%;
    background: var(--surface);
    transition: background-color 0.12s ease, box-shadow 0.12s ease, border-color 0.12s ease;
}

.choice input:checked + .choice-card {
    background: var(--accent-soft);
    border-color: var(--accent);
    box-shadow: var(--shadow-sm);
    transform: translate(-2px, -2px);
}

.choice input:checked + .choice-card .mark {
    border-color: var(--accent);
    background: var(--accent);
    box-shadow: inset 0 0 0 4px var(--accent-soft);
}

.choice input:focus-visible + .choice-card {
    outline: 3px solid var(--accent);
    outline-offset: 2px;
}

/* What is being chosen (term, data amount) leads; the total stays plainly visible under it. */
.choice-title {
    font-size: 22px;
    font-weight: 700;
    line-height: 1.2;
}

.choice-price {
    font-family: var(--mono);
    font-size: 18px;
    font-weight: 700;
    line-height: 1.2;
}

.choice-hint {
    font-size: 13px;
    color: var(--ink-soft);
}

/* ---------- Home page perks ---------- */
.perks {
    display: grid;
    gap: 12px;
}

.perk {
    display: flex;
    flex-direction: column;
    gap: 10px;
    min-width: 0;
    padding: 16px;
    border: 2px solid var(--line);
    border-radius: var(--radius-sm);
    background: var(--surface);
}

.perk-head {
    display: flex;
    align-items: center;
    gap: 10px;
}

.perk-icon {
    flex: none;
    box-sizing: border-box;
    width: 36px;
    height: 36px;
    padding: 7px;
    border-radius: var(--radius-sm);
    background: var(--accent-soft);
    fill: none;
    stroke: var(--accent);
    stroke-width: 1.8;
    stroke-linecap: round;
    stroke-linejoin: round;
}

.perk-title {
    margin-bottom: 4px;
    font-family: var(--mono);
    font-weight: 700;
}

.perk-head .perk-title {
    margin-bottom: 0;
    line-height: 1.25;
}

.perk p {
    margin: 0;
    font-size: 14px;
    color: var(--ink-soft);
    text-wrap: pretty;
}

/* ---------- Home page reviews ---------- */
.review-form {
    scroll-margin-top: 80px;
}

.review-agent-note {
    margin: 0 0 10px;
    color: var(--ink-soft);
    font-size: 12px;
    line-height: 1.4;
}

.review-field-note {
    margin: 6px 0 0;
}

.review-form-foot {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 16px;
}

.review-form-foot p {
    margin: 0;
}

.review-form-foot .btn {
    flex: none;
}

.review-captcha {
    display: grid;
    grid-template-columns: minmax(0, 220px) minmax(0, 1fr);
    gap: 20px;
    align-items: start;
}

.review-captcha-image {
    display: block;
    width: 100%;
    max-width: 320px;
    height: auto;
    margin-inline: auto;
    border: 2px solid var(--line);
    border-radius: var(--radius-sm);
}

@media (max-width: 560px) {
    .review-form-foot {
        flex-direction: column;
        align-items: stretch;
    }

    .review-captcha {
        grid-template-columns: minmax(0, 1fr);
    }
}

.reviews {
    align-items: stretch;
}

.review {
    display: flex;
    flex-direction: column;
    gap: 18px;
    min-width: 0;
    margin: 0;
    padding: 18px;
    border: 2px solid var(--line);
    border-radius: var(--radius-sm);
    background: var(--surface-2);
}

.review-rating {
    color: var(--accent);
    font-size: 20px;
    letter-spacing: 2px;
    line-height: 1;
}

.review blockquote {
    margin: 0;
    font-size: 14px;
    overflow-wrap: anywhere;
}

.review figcaption {
    display: flex;
    flex-wrap: wrap;
    align-items: baseline;
    gap: 4px 10px;
    margin-top: auto;
    padding-top: 12px;
    border-top: 1px dashed var(--line-soft);
    font-size: 13px;
}

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

.review figcaption span {
    color: var(--ink-soft);
}

.review figcaption time {
    flex-basis: 100%;
    color: var(--ink-soft);
    font-size: 12px;
}

/* ---------- Mascot ---------- */
/* Illustrations are 320 px tall files shown at 160 px for sharp retina screens. */
.mascot {
    display: block;
    width: auto;
    height: 160px;
    margin: 0 auto;
}

.mascot--md {
    height: 120px;
}

/* A page headline with the mascot to its right; 240 px files shown at 120 px. */
.hero {
    display: flex;
    align-items: center;
    gap: 20px;
}

.hero-text {
    flex: 1;
    min-width: 0;
}

.hero-mascot {
    flex: none;
    width: auto;
    height: 120px;
}

/* The robot hangs over the top edge of a window, its fingers on the title bar, or sits on that edge;
   the window keeps room above. Positions count from inside the 2px border, hence the +2px.
   In hanging.png the edge line starts 14/180 of the height above the bottom, so it covers the border. */
.window--peek,
.window--sit {
    margin-top: 92px;
}

.window--peek > .peek,
.window--sit > .peek {
    --peek-h: 96px;
    position: absolute;
    right: 32px;
    bottom: calc(100% + 2px - var(--peek-h) * 14 / 180);
    width: auto;
    height: var(--peek-h);
    margin: 0;
    pointer-events: none;
}

.window--sit {
    margin-top: 104px;
}

.window--sit > .peek {
    --peek-h: 110px;
    bottom: calc(100% + 1px);
}

/* ---------- Home page products ---------- */
.products {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(min(240px, 100%), 1fr));
    gap: 14px;
}

.product {
    display: flex;
    flex-direction: column;
    gap: 8px;
    padding: 16px;
    border: 2px solid var(--line);
    border-radius: var(--radius-sm);
    background: var(--surface);
    box-shadow: var(--shadow-sm);
    color: var(--ink);
    text-decoration: none;
    transition: transform 0.08s, box-shadow 0.08s;
}

.product:hover {
    color: var(--ink);
    transform: translate(-1px, -1px);
    box-shadow: 4px 4px 0 var(--shadow-color);
}

.product-title {
    font-family: var(--mono);
    font-size: 18px;
    font-weight: 700;
}

.product-text {
    flex: 1;
    font-size: 14px;
    color: var(--ink-soft);
}

.product-price {
    font-family: var(--mono);
    font-weight: 700;
}

.product-cta {
    padding: 8px 12px;
    border-radius: var(--radius-sm);
    background: var(--accent);
    color: var(--on-accent);
    font-weight: 600;
    text-align: center;
}

.product:hover .product-cta {
    background: var(--accent-hover);
}

/* ---------- eSIM ---------- */
/* A small flag with a thin frame, like the rest of the UI. */
.flag {
    display: inline-block;
    width: 21px;
    height: 14px;
    margin-right: 7px;
    vertical-align: -1px;
    border: 1px solid var(--line-soft);
    border-radius: 2px;
    object-fit: cover;
}

.flag--lg {
    width: 30px;
    height: 20px;
    margin-right: 10px;
    vertical-align: 0;
}

/* Country list on /esim: small cards in a grid, the search box hides the rest. */
.esim-countries {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(min(130px, 40%), 1fr));
    /* Every card as tall as the tallest, so a two-line name doesn't break the grid. */
    grid-auto-rows: 1fr;
    gap: 8px;
}

.esim-country {
    display: flex;
    flex-direction: column;
    gap: 0;
    min-width: 0;
    padding: 7px 10px;
    font-size: 14px;
    line-height: 1.3;
    border: 2px solid var(--line);
    border-radius: var(--radius-sm);
    background: var(--surface);
    color: var(--ink);
    text-decoration: none;
}

.esim-country:hover {
    background: var(--surface-2);
    color: var(--ink);
}

.esim-country[hidden] {
    display: none;
}

.esim-country-name {
    display: flex;
    align-items: flex-start;
    font-weight: 600;
    /* A long single word (Великобритания) breaks inside the card on a narrow phone. */
    hyphens: auto;
    overflow-wrap: anywhere;
}

.esim-country-price {
    margin-top: auto;
}

.esim-country-name .flag {
    flex: none;
    margin-top: 3px;
}

/* The QR code stays black on white in dark mode too: phone cameras need the contrast. */
.esim-qr {
    display: flex;
    justify-content: center;
}

.esim-qr svg {
    width: min(260px, 100%);
    height: auto;
    border: 2px solid var(--line);
    border-radius: var(--radius-sm);
    background: #ffffff;
}

.esim-usage {
    height: 12px;
    border: 2px solid var(--line);
    border-radius: 999px;
    background: var(--surface);
    overflow: hidden;
}

.esim-usage-bar {
    display: block;
    height: 100%;
    background: var(--accent);
}

.esim-usage-bar--low {
    background: var(--red);
}

/* ---------- My numbers ---------- */
.number-link {
    display: flex;
    align-items: center;
    gap: 10px;
    color: var(--ink);
    text-decoration: none;
}

.number-link:hover {
    background: var(--surface-2);
    color: var(--ink);
}

.number-link > span:first-child {
    flex: 1;
    min-width: 0;
}

.number-link .perk-title {
    display: block;
}

.number-link-arrow {
    font-family: var(--mono);
    font-weight: 700;
}

/* ---------- Buttons ---------- */

.btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    min-height: 46px;
    padding: 10px 20px;
    border: 2px solid var(--line);
    border-radius: var(--radius-sm);
    background: var(--accent);
    color: var(--on-accent);
    font-family: var(--mono);
    font-size: 15px;
    font-weight: 700;
    text-decoration: none;
    text-align: center;
    cursor: pointer;
    box-shadow: var(--shadow-sm);
    transition: transform 0.1s ease, box-shadow 0.1s ease, background-color 0.12s ease;
}

.btn:hover {
    background: var(--accent-hover);
    color: var(--on-accent);
    transform: translate(-1px, -1px);
    box-shadow: 4px 4px 0 var(--shadow-color);
}

.btn:active {
    transform: translate(3px, 3px);
    box-shadow: none;
}

.btn[disabled] {
    background: var(--surface-2);
    color: var(--ink-soft);
    cursor: not-allowed;
    transform: none;
    box-shadow: none;
}

.btn--block {
    display: flex;
    width: 100%;
}

.btn--gray {
    background: var(--surface);
    color: var(--ink);
}

.btn--gray:hover {
    background: var(--surface-2);
    color: var(--ink);
}

.btn--danger {
    background: var(--red);
    color: var(--on-status);
}

.btn--danger:hover {
    background: var(--red);
    color: var(--on-status);
    filter: brightness(1.08);
}

.btn--sm {
    min-height: 34px;
    padding: 4px 12px;
    font-size: 13px;
}

.linkbtn {
    padding: 0;
    border: 0;
    background: none;
    color: var(--accent);
    font: inherit;
    text-decoration: underline;
    text-underline-offset: 3px;
    cursor: pointer;
}

/* ---------- Notes, badges ---------- */

.note {
    padding: 12px 14px;
    border: 2px solid var(--line);
    border-radius: var(--radius-sm);
    background: var(--accent-soft);
}

.note--ok {
    background: var(--green-soft);
}

.note--warn {
    background: var(--yellow-soft);
}

.note--error {
    background: var(--red-soft);
}

.badge {
    display: inline-block;
    padding: 1px 8px;
    border: 1.5px solid var(--line);
    border-radius: 999px;
    font-family: var(--mono);
    font-size: 12px;
    font-weight: 700;
    line-height: 18px;
    background: var(--yellow);
    color: #1b1b1f;
    white-space: nowrap;
    vertical-align: middle;
}

.badge--green {
    background: var(--green);
    color: var(--on-status);
}

.badge--red {
    background: var(--red);
    color: var(--on-status);
}

.badge--gray {
    background: var(--surface-2);
    color: var(--ink-soft);
}

.badge--cyan {
    background: var(--accent-soft);
    color: var(--accent);
}

/* Progress steps: [x] [>] [ ] */
.steps {
    display: grid;
    gap: 8px;
    margin: 0;
    padding: 0;
    list-style: none;
}

.steps li {
    display: flex;
    gap: 12px;
    color: var(--ink-soft);
}

.steps li::before {
    content: "[ ]";
    flex: none;
    font-family: var(--mono);
    font-weight: 700;
}

.steps li.done {
    color: var(--ink);
}

.steps li.done::before {
    content: "[x]";
    color: var(--green);
}

.steps li.current {
    color: var(--ink);
    font-weight: 600;
}

.steps li.current::before {
    content: "[>]";
    color: var(--accent);
    animation: blink 1s steps(2, start) infinite;
}

/* Numbered steps under a dashed rule, after a few facts ("Перед покупкой"). */
.stack > .steps--split {
    margin-top: 22px;
    padding-top: 18px;
    border-top: 1.5px dashed var(--line-soft);
}

.step-hint {
    display: block;
    margin-top: 4px;
    font-size: 14px;
    color: var(--ink-soft);
}

/* Plain numbered list variant ("Как это работает") */
.steps--numbered {
    counter-reset: step;
}

.steps--numbered li {
    color: var(--ink);
}

.steps--numbered li::before {
    counter-increment: step;
    content: counter(step);
    display: inline-grid;
    place-items: center;
    width: 26px;
    height: 26px;
    border: 2px solid var(--line);
    border-radius: 50%;
    background: var(--yellow);
    color: #1b1b1f;
    font-size: 13px;
}

@keyframes blink {
    to {
        visibility: hidden;
    }
}

/* ---------- SMS cabinet ---------- */

.phone {
    font-family: var(--mono);
    font-size: clamp(28px, 7vw, 40px);
    font-weight: 700;
    letter-spacing: 0.01em;
    color: var(--ink);
    word-break: break-all;
}

.stat {
    padding: 12px 14px;
    border: 2px solid var(--line);
    border-radius: var(--radius-sm);
    background: var(--surface-2);
}

.stat-label {
    font-family: var(--mono);
    font-size: 11px;
    letter-spacing: 0.14em;
    text-transform: uppercase;
    color: var(--ink-soft);
}

.stat-value {
    margin-top: 4px;
    font-family: var(--mono);
    font-size: 22px;
    font-weight: 700;
}

.stat-value.is-ok {
    color: var(--green);
}

.stat-value.is-bad {
    color: var(--red);
}

.sms-list {
    margin: 0 -8px;
}

.sms {
    padding: 14px 8px;
    border-top: 1px solid var(--line-soft);
    animation: sms-in 0.25s ease-out;
}

.sms:first-child {
    border-top: 0;
}

.sms-head {
    display: flex;
    justify-content: space-between;
    gap: 12px;
    font-family: var(--mono);
    font-size: 13px;
    color: var(--ink-soft);
}

.sms-sender {
    font-weight: 700;
    color: var(--ink);
    word-break: break-all;
}

.sms-body {
    margin-top: 6px;
    white-space: pre-wrap;
    overflow-wrap: anywhere;
}

.otp {
    display: inline-flex;
    align-items: center;
    gap: 10px;
    margin-top: 10px;
    padding: 6px 14px;
    border: 2px solid var(--line);
    border-radius: var(--radius-sm);
    background: var(--yellow);
    color: #1b1b1f;
    font-family: var(--mono);
    font-size: 22px;
    font-weight: 700;
    letter-spacing: 0.12em;
    cursor: pointer;
    box-shadow: var(--shadow-sm);
    transition: transform 0.1s ease, box-shadow 0.1s ease;
}

.otp small {
    font-size: 12px;
    font-weight: 400;
    letter-spacing: 0;
}

.otp:active {
    transform: translate(3px, 3px);
    box-shadow: none;
}

.empty {
    padding: 28px 8px;
    text-align: center;
    font-family: var(--mono);
    color: var(--ink-soft);
}

@keyframes sms-in {
    from {
        opacity: 0;
        transform: translateY(4px);
    }
}

/* ---------- Tables (admin) ---------- */

.table-wrap {
    overflow-x: auto;
    margin: 0 -8px;
}

.table {
    width: 100%;
    border-collapse: collapse;
    font-size: 14px;
}

.table th {
    padding: 8px;
    text-align: left;
    font-family: var(--mono);
    font-size: 12px;
    font-weight: 700;
    letter-spacing: 0.06em;
    text-transform: uppercase;
    color: var(--ink-soft);
    border-bottom: 2px solid var(--line);
    white-space: nowrap;
}

.table td {
    padding: 12px 8px;
    vertical-align: top;
    border-bottom: 1px solid var(--line-soft);
}

.table tr:hover td {
    background: var(--surface-2);
}

.table .num {
    text-align: right;
}

.actions {
    display: flex;
    flex-direction: column;
    align-items: flex-end;
    gap: 8px;
}

details > summary {
    cursor: pointer;
    list-style: none;
}

details > summary::-webkit-details-marker {
    display: none;
}

details > summary .toggle::before {
    content: "[+]";
    font-family: var(--mono);
    font-weight: 700;
    color: var(--accent);
}

details[open] > summary .toggle::before {
    content: "[−]";
}

/* ---------- FAQ and legal pages ---------- */

.faq-item {
    border-top: 1.5px dashed var(--line);
}

.faq-item:first-of-type {
    border-top: 0;
}

/* The padding belongs to the question, so the whole row opens it: a finger-sized target. */
.faq-item > summary {
    padding: 12px 0;
    font-weight: 700;
}

.faq-answer {
    margin-top: -4px;
    padding-bottom: 12px;
    color: var(--ink-soft);
}

.faq-nav {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
}

.faq-nav a {
    padding: 6px 12px;
    border: 2px solid var(--line);
    border-radius: var(--radius-sm);
    background: var(--surface);
    color: var(--ink);
    font-family: var(--mono);
    font-weight: 700;
    text-decoration: none;
}

.faq-nav a:hover {
    background: var(--surface-2);
    color: var(--ink);
}

/* Anchored sections stop below the sticky menu bar. */
.window[id] {
    scroll-margin-top: 64px;
}

/* Terms and privacy: a reading-width column, sections split by a dashed rule like the FAQ. */
.col--legal {
    max-width: 760px;
}

.prose {
    font-size: 15px;
    line-height: 1.65;
}

.prose p,
.prose ul {
    margin: 0;
}

.prose > * + * {
    margin-top: 12px;
}

.prose > h2 {
    margin-top: 26px;
    padding-top: 22px;
    border-top: 1.5px dashed var(--line-soft);
    font-family: var(--mono);
    font-size: 15px;
    letter-spacing: 0.01em;
}

.prose > h2 + * {
    margin-top: 10px;
}

.prose ul {
    padding-left: 20px;
}

.prose li::marker {
    color: var(--accent);
}

.prose li + li {
    margin-top: 6px;
}

.prose b {
    font-weight: 600;
}

.qr {
    display: block;
    margin: 0 auto;
    padding: 8px;
    border: 2px solid var(--line);
    border-radius: var(--radius-sm);
    background: #fff;
}

/* ---------- Admin ---------- */

.section-title {
    display: flex;
    align-items: center;
    gap: 8px;
    font-family: var(--mono);
    font-size: 15px;
}

.right {
    text-align: right;
}

.grid-2--wide {
    gap: 32px 24px;
    align-items: start;
}

.search-row {
    display: flex;
    gap: 10px;
}

.search-row .input {
    flex: 1;
    min-width: 0;
}

.chips {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
}

.chip {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    padding: 4px 12px;
    border: 2px solid var(--line);
    border-radius: 999px;
    background: var(--surface);
    color: var(--ink);
    font-family: var(--mono);
    font-size: 13px;
    font-weight: 700;
    text-decoration: none;
}

.chip:hover {
    background: var(--surface-2);
    color: var(--ink);
}

.chip.active {
    background: var(--ink);
    color: var(--surface);
}

.chip-count {
    font-weight: 400;
    opacity: 0.7;
}

.action-bar {
    display: flex;
    flex-wrap: wrap;
    gap: 12px;
}

.stats-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(240px, 1fr));
    gap: 16px;
}

.stat-card {
    padding: 14px 16px;
    border: 2px solid var(--line);
    border-radius: var(--radius-sm);
    background: var(--surface-2);
}

.stat-big {
    font-family: var(--mono);
    font-size: 30px;
    font-weight: 700;
    line-height: 1.1;
}

.timeline {
    display: grid;
    gap: 8px;
    margin: 0;
    padding: 0;
    list-style: none;
    font-size: 14px;
}

.timeline li {
    display: grid;
    grid-template-columns: 150px 1fr;
    gap: 12px;
    padding-bottom: 8px;
    border-bottom: 1px solid var(--line-soft);
}

.timeline li:last-child {
    border-bottom: 0;
}

.row-link {
    cursor: pointer;
}

.row-main {
    color: var(--ink);
    text-decoration: none;
}

.row-main:hover {
    color: var(--accent);
}

.advanced {
    margin-top: 6px;
    padding-top: 10px;
    border-top: 1px dashed var(--line-soft);
}

/* Support tickets */
.ticket-layout {
    display: grid;
    grid-template-columns: minmax(0, 1fr) 320px;
    gap: 32px 24px;
    align-items: start;
}

.chat {
    display: flex;
    flex-direction: column;
    gap: 10px;
    max-height: 60vh;
    overflow-y: auto;
    padding: 12px;
    border: 2px solid var(--line);
    border-radius: var(--radius-sm);
    background: var(--surface-2);
}

.bubble {
    max-width: 80%;
    padding: 8px 12px;
    border: 2px solid var(--line);
    border-radius: var(--radius-sm);
    background: var(--surface);
}

.bubble--in {
    align-self: flex-start;
    border-bottom-left-radius: 2px;
}

.bubble--out {
    align-self: flex-end;
    border-bottom-right-radius: 2px;
    background: var(--accent-soft);
}

.bubble-meta {
    font-family: var(--mono);
    font-size: 11px;
    color: var(--ink-soft);
}

.bubble-text {
    margin-top: 4px;
    white-space: pre-wrap;
    overflow-wrap: anywhere;
}

.bubble-img {
    display: block;
    max-width: 100%;
    max-height: 320px;
    margin-top: 6px;
    border-radius: 4px;
}

.bubble-file {
    display: inline-block;
    margin-top: 6px;
}

.bubble-media {
    display: block;
    max-width: 100%;
    margin-top: 6px;
}

video.bubble-media {
    max-height: 320px;
    border-radius: 4px;
}

.chat-system {
    align-self: center;
    font-family: var(--mono);
    font-size: 11px;
    color: var(--ink-soft);
}

@media (max-width: 900px) {
    .ticket-layout {
        grid-template-columns: 1fr;
    }

    .bubble {
        max-width: 92%;
    }
}

/* Tables turn into cards on phones */
@media (max-width: 720px) {
    .table--cards thead {
        display: none;
    }

    .table--cards,
    .table--cards tbody,
    .table--cards tr,
    .table--cards td {
        display: block;
        width: 100%;
    }

    .table--cards tr {
        margin-bottom: 12px;
        padding: 10px 12px;
        border: 2px solid var(--line);
        border-radius: var(--radius-sm);
        background: var(--surface);
    }

    .table--cards tr:hover td {
        background: none;
    }

    .table--cards td {
        display: flex;
        justify-content: space-between;
        align-items: baseline;
        gap: 12px;
        padding: 4px 0;
        border: 0;
        text-align: right;
    }

    .table--cards td::before {
        content: attr(data-label);
        flex: none;
        color: var(--ink-soft);
        font-family: var(--mono);
        font-size: 12px;
        text-align: left;
    }

    .table--cards td:first-child {
        padding-bottom: 8px;
        margin-bottom: 4px;
        border-bottom: 1px solid var(--line-soft);
        font-size: 16px;
    }

    .table--cards td:first-child::before {
        content: none;
    }

    .table--cards td[colspan] {
        display: block;
        text-align: left;
    }

    .table--cards td[colspan]::before {
        content: none;
    }

    .table-wrap {
        margin: 0;
        overflow: visible;
    }

    .timeline li {
        grid-template-columns: 1fr;
        gap: 2px;
    }

    .action-bar .btn,
    .action-bar form {
        width: 100%;
    }

    .right {
        text-align: left;
    }
}

.sr-only {
    position: absolute;
    width: 1px;
    height: 1px;
    padding: 0;
    margin: -1px;
    overflow: hidden;
    clip: rect(0, 0, 0, 0);
    border: 0;
}

/* ---------- Small screens ---------- */

@media (max-width: 560px) {
    body {
        font-size: 15px;
    }

    .desktop {
        padding: 24px 12px 40px;
    }

    .window {
        padding: 0 16px 18px;
        box-shadow: 4px 4px 0 var(--shadow-color);
    }

    .window-title {
        margin: 0 -16px 16px;
    }

    .display {
        font-size: 24px;
    }

    .prose {
        font-size: 14px;
    }

    .hero {
        gap: 12px;
    }

    .hero-mascot {
        height: 84px;
    }

    .window--peek {
        margin-top: 70px;
    }

    .window--peek > .peek {
        --peek-h: 72px;
        right: 16px;
    }

    .window--sit {
        margin-top: 84px;
    }

    .window--sit > .peek {
        --peek-h: 88px;
        right: 16px;
    }

    .grid-2 {
        grid-template-columns: 1fr;
    }

    .menubar {
        gap: 0;
        padding: 6px 4px;
        font-size: 12px;
    }

    .menubar a {
        padding: 6px 5px;
    }

    .lang-switch {
        margin-left: 2px;
    }

    /* On phones the brand is just its logo: the menu needs the room. */
    .menubar .brand {
        margin-right: 2px;
        gap: 0;
    }

    .menubar .brand-name {
        position: absolute;
        width: 1px;
        height: 1px;
        overflow: hidden;
        clip: rect(0 0 0 0);
        white-space: nowrap;
    }
}

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

/* Admin: site statistics */
.stats-periods {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
}

.stats-periods a[aria-current="page"] {
    font-weight: 700;
    color: var(--ink);
    text-decoration: none;
}

.stats-range {
    display: flex;
    flex-wrap: wrap;
    align-items: flex-end;
    gap: 8px 12px;
}

.stats-range .input {
    width: auto;
}

.stats-pages {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: 8px 16px;
}

.stats-tiles {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(130px, 1fr));
    gap: 12px;
}

.stats-tile b {
    display: block;
    font-size: 1.6rem;
    line-height: 1.2;
    font-variant-numeric: tabular-nums;
}

.stats-chart {
    display: block;
    width: 100%;
    height: auto;
}

.stats-chart .bar {
    fill: var(--accent);
}

.stats-chart .hit {
    fill: transparent;
}

.stats-chart .hit:hover + .bar {
    fill: var(--accent-hover);
}

.stats-chart .axis {
    stroke: var(--line-soft);
}

.stats-chart text {
    fill: var(--ink-soft);
    font-size: 11px;
}

.stats-steps {
    display: flex;
    flex-wrap: wrap;
    gap: 2px 6px;
    width: 100%;
    text-align: left;
}

@media (max-width: 600px) {
    .stats-chart text {
        font-size: 22px;
    }
}

.stats-steps span + span::before {
    content: "→ ";
    color: var(--ink-soft);
}

/* ---------- Support chat on the site ---------- */

.chatw-launcher {
    position: fixed;
    right: max(20px, env(safe-area-inset-right));
    bottom: max(20px, env(safe-area-inset-bottom));
    z-index: 30;
    display: inline-flex;
    align-items: center;
    gap: 8px;
    min-height: 46px;
    padding: 8px 16px;
    border: 2px solid var(--line);
    border-radius: var(--radius-sm);
    background: var(--accent);
    color: var(--on-accent);
    font-family: var(--mono);
    font-size: 15px;
    font-weight: 700;
    cursor: pointer;
    box-shadow: var(--shadow-sm);
}

.chatw-launcher::before {
    content: "";
    width: 18px;
    height: 18px;
    background: currentColor;
    -webkit-mask: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24'%3E%3Cpath d='M2 3h20v15H10l-6 4v-4H2z'/%3E%3C/svg%3E") center / contain no-repeat;
    mask: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24'%3E%3Cpath d='M2 3h20v15H10l-6 4v-4H2z'/%3E%3C/svg%3E") center / contain no-repeat;
}

.chatw-launcher:hover {
    background: var(--accent-hover);
}

.chatw-launcher[hidden] {
    display: none;
}

.chatw-badge {
    min-width: 20px;
    padding: 0 5px;
    border-radius: 10px;
    background: var(--red);
    color: var(--on-status);
    font-size: 12px;
    line-height: 20px;
    text-align: center;
}

.chatw-badge[hidden] {
    display: none;
}

.chatw-panel {
    position: fixed;
    right: max(20px, env(safe-area-inset-right));
    bottom: max(20px, env(safe-area-inset-bottom));
    z-index: 30;
    display: flex;
    flex-direction: column;
    width: 380px;
    max-width: calc(100vw - 40px);
    height: 600px;
    max-height: calc(100vh - 88px);
    background: var(--surface);
    border: 2px solid var(--line);
    border-radius: var(--radius);
    box-shadow: var(--shadow);
}

.chatw-panel[hidden] {
    display: none;
}

.chatw-head {
    display: flex;
    flex: none;
    align-items: center;
    justify-content: space-between;
    gap: 10px;
    padding: 6px 8px 6px 16px;
    border-bottom: 2px solid var(--line);
    border-radius: calc(var(--radius) - 2px) calc(var(--radius) - 2px) 0 0;
    background: var(--accent-soft);
    font-family: var(--mono);
    font-size: 14px;
    font-weight: 700;
}

.chatw-close {
    width: 34px;
    height: 34px;
    padding: 0;
    border: 0;
    background: none;
    color: var(--ink);
    font-size: 22px;
    line-height: 1;
    cursor: pointer;
}

.chatw-log {
    display: flex;
    flex: 1 1 auto;
    flex-direction: column;
    gap: 10px;
    min-height: 0;
    overflow-y: auto;
    overscroll-behavior: contain;
    padding: 12px;
    background: var(--surface-2);
    font-size: 15px;
}

.chatw-log .bubble {
    max-width: 88%;
    flex: none;
}

.chatw-log .chat-system {
    max-width: 92%;
    flex: none;
    text-align: center;
}

.chatw-greeting {
    flex: none;
    margin: 0;
    color: var(--ink-soft);
    font-size: 14px;
}

.chatw-status,
.chatw-error {
    flex: none;
    margin: 0;
    padding: 6px 12px;
    border-top: 2px solid var(--line-soft);
    font-size: 13px;
}

.chatw-status {
    color: var(--ink-soft);
}

.chatw-error {
    background: var(--red-soft);
    color: var(--ink);
}

.chatw-status[hidden],
.chatw-error[hidden],
.chatw-tools[hidden],
.chatw-tools [hidden] {
    display: none;
}

.chatw-tools {
    flex: none;
    max-height: 40%;
    overflow-y: auto;
    border-top: 2px solid var(--line-soft);
    font-size: 13px;
}

.chatw-tools summary {
    padding: 6px 12px;
    color: var(--ink-soft);
    font-family: var(--mono);
    font-size: 12px;
    cursor: pointer;
}

.chatw-tools summary::before {
    content: "[+] ";
    color: var(--accent);
}

.chatw-tools[open] summary::before {
    content: "[−] ";
}

.chatw-tools-body {
    display: flex;
    flex-direction: column;
    gap: 8px;
    padding: 0 12px 10px;
}

.chatw-tools-body p {
    margin: 0;
}

.chatw-code-row,
.chatw-restore {
    display: flex;
    align-items: center;
    gap: 8px;
}

.chatw-code {
    flex: 1 1 auto;
    min-width: 0;
    font-family: var(--mono);
    font-size: 13px;
    font-weight: 700;
    overflow-wrap: anywhere;
    user-select: all;
}

.chatw-restore .input {
    flex: 1 1 auto;
    min-width: 0;
}

.chatw-form {
    display: flex;
    flex: none;
    align-items: flex-end;
    gap: 8px;
    padding: 10px 12px;
    border-top: 2px solid var(--line);
}

.chatw-input {
    flex: 1 1 auto;
    min-width: 0;
    min-height: 46px;
    max-height: 132px;
    resize: none;
}

.chatw-send {
    flex: none;
    padding-inline: 12px;
}

.chatw-foot {
    flex: none;
    padding: 0 12px 8px;
    font-size: 12px;
    text-align: right;
}

.chatw-trap {
    position: absolute;
    left: -9999px;
    width: 1px;
    height: 1px;
    overflow: hidden;
}

@media (max-width: 600px) {
    .chatw-launcher {
        right: 12px;
        bottom: max(12px, env(safe-area-inset-bottom));
    }

    /* The whole screen, following the on-screen keyboard (chat.js sets the two variables). */
    .chatw-panel {
        top: var(--chatw-top, 0);
        right: 0;
        bottom: auto;
        left: 0;
        width: 100%;
        max-width: none;
        height: var(--chatw-height, 100dvh);
        max-height: none;
        border-width: 0;
        border-radius: 0;
        box-shadow: none;
    }

    .chatw-head {
        padding-top: max(6px, env(safe-area-inset-top));
        border-radius: 0;
    }

    .chatw-foot {
        padding-bottom: max(8px, env(safe-area-inset-bottom));
    }

    /* 16px keeps iOS from zooming the page when a field gets focus. */
    .chatw-input,
    .chatw-restore .input {
        font-size: 16px;
    }

    html.chatw-open,
    html.chatw-open body {
        overflow: hidden;
    }
}

/* The button stays in the corner: the footer text must not run under it. */
body:has(#chatw) .statusbar {
    padding-right: 120px;
}

/* ---------- Phones: site menu with finger-sized targets ----------
   Row one (logo, language) scrolls away with the page: the sticky top equals
   its height. Row two, the sections, stays on top as a row of wide tabs. */
@media (max-width: 560px) {
    .menubar--site {
        top: -48px;
        flex-wrap: wrap;
        gap: 0;
        padding: 0 8px;
        overflow: visible;
        font-size: 14px;
    }

    .menubar--site .brand {
        order: 1;
        min-height: 48px;
        margin-right: 8px;
        padding: 0 4px 0 0;
        gap: 8px;
        font-size: 15px;
    }

    .menubar--site .brand::before {
        width: 28px;
        height: 28px;
    }

    .menubar--site .brand-name {
        position: static;
        width: auto;
        height: auto;
        overflow: visible;
        clip: auto;
    }

    .menubar--site .spacer {
        order: 2;
    }

    .menubar--site .lang-switch {
        order: 3;
        gap: 4px;
        margin-left: 0;
        font-size: 14px;
    }

    .menubar--site .lang-switch b,
    .menubar--site .lang-switch a {
        display: inline-flex;
        align-items: center;
        justify-content: center;
        min-width: 44px;
        min-height: 40px;
        padding: 0 8px;
    }

    /* The line break between the rows. */
    .menubar--site::after {
        content: "";
        order: 4;
        flex-basis: calc(100% + 16px);
        margin: 0 -8px;
        border-top: 1px solid var(--line-soft);
    }

    .menubar--site > a:not(.brand):not(.menu-login) {
        order: 5;
        flex: 1 0 auto;
        display: flex;
        align-items: center;
        justify-content: center;
        min-height: 40px;
        margin: 4px 0;
        padding: 0 6px;
    }

    .statusbar {
        flex-direction: column;
        gap: 0;
        padding-top: 6px;
        padding-bottom: 10px;
    }

    .statusbar a {
        padding: 10px 0;
    }
}

/* ---------- Public windows: centred title bars ---------- */
.desktop--center .window-title {
    justify-content: center;
}

/* Article titles are whole sentences: they wrap instead of losing their ends. */
.window-title--wrap {
    white-space: normal;
    text-align: center;
}

/* ---------- Home page ----------
   Full-width bands instead of one narrow window: hero with a sample of what a
   buyer gets, a trust strip, products, steps, perks, a question block and a
   fuller footer. Same window chrome, tokens and dark theme as the rest. */
.desktop--home {
    padding: 0;
}

.home-wrap {
    width: 100%;
    max-width: 1160px;
    margin: 0 auto;
    padding: 0 32px;
}

.home-section {
    padding: 88px 0 0;
}

.home-section--last {
    padding-bottom: 88px;
}

.home-band {
    background: var(--surface);
    border-top: 2px solid var(--line);
    border-bottom: 2px solid var(--line);
}

.home-section.home-band {
    margin-top: 88px;
    padding-bottom: 72px;
    padding-top: 72px;
}

.home-head {
    display: flex;
    flex-direction: column;
    gap: 8px;
    margin-bottom: 36px;
}

.home-kicker {
    font-family: var(--mono);
    font-size: 13px;
    font-weight: 700;
    letter-spacing: 0.06em;
    text-transform: uppercase;
    color: var(--accent);
}

.home-h2 {
    font-family: var(--mono);
    font-size: clamp(26px, 3vw, 36px);
    line-height: 1.15;
    letter-spacing: -0.01em;
}

.home-actions {
    display: flex;
    flex-wrap: wrap;
    gap: 14px;
}

/* Hero */
.home-hero {
    padding: 64px 0 80px;
}

.home-hero-grid {
    display: grid;
    grid-template-columns: minmax(0, 1.05fr) minmax(0, 0.95fr);
    gap: 56px;
    align-items: center;
}

.home-hero-text {
    display: flex;
    flex-direction: column;
    align-items: flex-start;
    gap: 24px;
}

.home-title {
    font-family: var(--mono);
    font-size: clamp(30px, 3.4vw, 44px);
    line-height: 1.1;
    letter-spacing: -0.02em;
    text-wrap: balance;
}

.home-lead {
    max-width: 540px;
    font-size: 19px;
    color: var(--ink-soft);
}

.home-coins {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: 10px;
    font-size: 14px;
    color: var(--ink-soft);
}

.home-coin {
    padding: 2px 9px;
    border: 1.5px solid var(--line);
    border-radius: 6px;
    background: var(--surface);
    color: var(--ink);
    font-family: var(--mono);
    font-size: 13px;
    font-weight: 700;
}

/* Hero: a sample SMS inbox as a terminal window. The mascot hangs on the
   window's top edge: in hanging.webp the cut under its head sits 0.1256 of
   the image height above the bottom; only the paw reaches below it. */
.home-term-wrap {
    --peek-h: 135px;
    position: relative;
    margin-top: calc(var(--peek-h) * (1 - 0.1256));
}

.home-peek {
    position: absolute;
    right: 36px;
    bottom: calc(100% - var(--peek-h) * 0.1256);
    z-index: 2;
    width: auto;
    height: var(--peek-h);
    pointer-events: none;
}

.home-term {
    position: relative;
    z-index: 1;
    background: var(--surface);
    border: 3px solid var(--line);
    box-shadow: var(--shadow);
}

.home-term-bar {
    padding: 8px 14px;
    border-bottom: 3px solid var(--line);
    background: var(--yellow);
    color: #0d0d10;
    font-family: var(--mono);
    font-size: 13px;
    font-weight: 700;
}

.home-sms {
    display: flex;
    flex-direction: column;
    gap: 14px;
    margin: 0;
    padding: 20px 18px 22px;
    list-style: none;
    font-family: var(--mono);
    font-size: 15px;
}

.home-sms li {
    display: flex;
    align-items: baseline;
    gap: 14px;
}

.home-sms time {
    flex: none;
    width: 46px;
    font-size: 13px;
    color: var(--ink-soft);
}

.home-sms code {
    padding: 0 4px;
    background: var(--green-soft);
    color: var(--green);
    font-weight: 700;
}

.home-cursor::after {
    content: "";
    display: inline-block;
    width: 10px;
    height: 18px;
    vertical-align: -3px;
    background: var(--green);
    animation: home-blink 1s steps(1) infinite;
}

@keyframes home-blink {
    50% { opacity: 0; }
}

/* Divider under the hero */
.home-divider {
    height: 22px;
    border-top: 2px solid var(--line);
    border-bottom: 2px solid var(--line);
    background: repeating-linear-gradient(-45deg, var(--yellow) 0 12px, var(--surface) 12px 24px);
}

/* Products */
.home-products {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(min(420px, 100%), 1fr));
    gap: 28px;
}

.home-product {
    display: flex;
    flex-direction: column;
    gap: 18px;
    min-width: 0;
    padding: 30px;
    background: var(--surface);
    border: 2px solid var(--line);
    border-radius: var(--radius);
    box-shadow: var(--shadow);
}

.home-product h3 {
    font-family: var(--mono);
    font-size: 24px;
}

.home-tag {
    align-self: flex-start;
    padding: 4px 10px;
    background: var(--yellow);
    color: #0d0d10;
    font-family: var(--mono);
    font-size: 13px;
    font-weight: 700;
}

.home-fact {
    font-size: 15px;
}

.home-fact::before {
    content: "■" / "";
    margin-right: 10px;
    color: var(--accent);
}

.home-tag--red {
    background: var(--red);
    color: #fff;
}

.home-pills {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
}

.home-pill {
    display: inline-flex;
    align-items: center;
    min-height: 36px;
    padding: 4px 12px;
    border: 1.5px solid var(--line-soft);
    border-radius: 999px;
    background: var(--surface-2);
    color: var(--ink);
    font-size: 14px;
    text-decoration: none;
}

.home-pill:hover {
    border-color: var(--line);
    color: var(--ink);
}

.home-plans {
    display: grid;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 8px;
}

.home-plan {
    display: flex;
    flex-direction: column;
    padding: 10px 12px;
    border: 1.5px solid var(--line-soft);
    border-radius: var(--radius-sm);
    background: var(--surface-2);
    color: var(--ink);
    text-decoration: none;
}

.home-plan:hover {
    border-color: var(--line);
    color: var(--ink);
}

.home-plan--best {
    border: 2px solid var(--accent);
    background: var(--accent-soft);
}

.home-plan small {
    font-size: 12px;
    color: var(--ink-soft);
}

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

.home-product-foot {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    justify-content: space-between;
    gap: 16px;
    margin-top: auto;
    padding-top: 18px;
    border-top: 2px dashed var(--line-soft);
}

.home-price {
    display: flex;
    align-items: baseline;
    gap: 6px;
}

.home-price small {
    font-size: 14px;
    color: var(--ink-soft);
}

.home-price b {
    font-family: var(--mono);
    font-size: 30px;
    line-height: 1;
}

/* Steps */
.home-steps {
    display: grid;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 28px;
    margin: 0;
    padding: 0;
    list-style: none;
}

.home-steps li {
    display: flex;
    flex-direction: column;
    gap: 12px;
}

.home-steps h3,
.home-perk h3 {
    font-family: var(--mono);
    font-size: 18px;
}

.home-step-num {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 44px;
    height: 44px;
    border: 2px solid var(--line);
    border-radius: 50%;
    background: var(--yellow);
    color: #1b1b1f;
    font-family: var(--mono);
    font-size: 18px;
    font-weight: 700;
}

/* Perks: flat, no box inside a box */
.home-perks {
    display: grid;
    grid-template-columns: repeat(4, minmax(0, 1fr));
    gap: 40px 28px;
}

.home-perk {
    display: flex;
    flex-direction: column;
    gap: 10px;
}

.home-perk .px-icon {
    fill: var(--accent);
    shape-rendering: crispEdges;
}

.home-perk p {
    font-size: 15px;
    text-wrap: pretty;
}

/* Question block */
.home-cta {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    justify-content: space-between;
    gap: 28px;
    padding: 36px 40px;
    background: var(--accent);
    color: var(--on-accent);
    border: 2px solid var(--line);
    border-radius: var(--radius);
    box-shadow: var(--shadow);
}

.home-cta-text {
    display: flex;
    flex-direction: column;
    gap: 8px;
    max-width: 560px;
}

.home-cta .home-h2 {
    font-size: clamp(22px, 2.6vw, 30px);
}

/* Footer */
.home-foot {
    padding: 48px 0 24px;
    background: var(--surface);
    border-top: 2px solid var(--line);
    font-size: 14px;
}

.home-foot-grid {
    display: grid;
    grid-template-columns: 1.4fr 1fr 1fr 1fr;
    gap: 32px;
}

.home-foot nav,
.home-foot-brand {
    display: flex;
    flex-direction: column;
    align-items: flex-start;
    gap: 10px;
}

.home-foot a {
    color: var(--ink-soft);
    text-decoration: none;
}

.home-foot a:hover {
    color: var(--ink);
}

.home-foot .home-foot-channel {
    color: var(--accent);
    font-family: var(--mono);
}

.home-foot-logo {
    display: inline-flex;
    align-items: center;
    gap: 10px;
    font-family: var(--mono);
    font-weight: 700;
}

.home-foot-logo::before {
    content: "";
    width: 28px;
    height: 28px;
    background: url("mascot/avatar.svg") center / contain no-repeat;
}

.home-foot-brand p {
    max-width: 300px;
    color: var(--ink-soft);
}

.home-foot-title {
    font-family: var(--mono);
    font-size: 13px;
    font-weight: 700;
    text-transform: uppercase;
}

.home-foot-copy {
    margin-top: 36px;
    padding-top: 18px;
    border-top: 1.5px solid var(--line-soft);
    font-family: var(--mono);
    font-size: 13px;
    color: var(--ink-soft);
}

/* Who sells, under the copyright in the text font: an address in the pixel font wraps badly. */
.home-foot-seller {
    display: block;
    margin-top: 6px;
    font-family: var(--sans);
    font-size: 12px;
}

/* The chat button stays in the corner: the copyright line must not run under it. */
body:has(#chatw) .home-foot-copy {
    padding-right: 120px;
}

@media (max-width: 960px) {
    .home-hero-grid {
        grid-template-columns: minmax(0, 1fr);
        gap: 40px;
    }

    .home-term-wrap {
        max-width: 560px;
    }

    .home-perks {
        grid-template-columns: repeat(2, minmax(0, 1fr));
    }

    .home-foot-grid {
        grid-template-columns: repeat(2, minmax(0, 1fr));
    }
}

@media (max-width: 640px) {
    .home-wrap {
        padding: 0 16px;
    }

    .home-hero {
        padding: 32px 0 56px;
    }

    .home-lead {
        font-size: 17px;
    }

    .home-actions .btn {
        flex: 1 1 100%;
    }

    .home-term-wrap {
        --peek-h: 100px;
    }

    .home-peek {
        right: 16px;
    }

    .home-section {
        padding-top: 64px;
    }

    .home-section.home-band {
        margin-top: 64px;
        padding: 56px 0;
    }

    .home-section--last {
        padding-bottom: 64px;
    }

    .home-product {
        padding: 20px;
        box-shadow: 4px 4px 0 var(--shadow-color);
    }

    .home-steps,
    .home-perks {
        grid-template-columns: minmax(0, 1fr);
    }

    .home-cta {
        padding: 24px 20px;
    }

    .home-foot-copy {
        padding-right: 0;
    }

    body:has(#chatw) .home-foot {
        padding-bottom: 80px;
    }
}

/* ---------- Anonymous accounts ----------
   "Buy anonymously" under the Telegram button and the one-time popup with the
   account number: the warning has to be impossible to miss. */
.anon-or {
    display: flex;
    align-items: center;
    gap: 12px;
    color: var(--ink-soft);
    font-size: 13px;
}

.anon-or::before,
.anon-or::after {
    content: "";
    flex: 1;
    border-top: 2px dashed var(--line-soft);
}

.anon-dialog {
    width: min(460px, calc(100vw - 32px));
    max-height: calc(100dvh - 32px);
    padding: 0 24px 24px;
    overflow: auto;
    background: var(--surface);
    color: var(--ink);
    border: 3px solid var(--line);
    border-radius: var(--radius);
    box-shadow: 8px 8px 0 var(--red);
}

.anon-dialog::backdrop {
    background: rgba(0, 0, 0, 0.75);
}

.anon-dialog .window-title {
    margin: 0 -24px 20px;
}

.anon-number {
    padding: 14px 8px;
    border: 3px dashed var(--yellow);
    color: var(--yellow);
    font-family: var(--pixel, var(--mono));
    font-size: 18px;
    line-height: 1.5;
    text-align: center;
    word-spacing: 0.3em;
    user-select: all;
}

.anon-warn {
    padding: 14px 16px;
    border: 3px solid var(--red);
    background: var(--red-soft);
    font-size: 15px;
    line-height: 1.5;
}

.anon-warn b {
    display: block;
    margin-bottom: 6px;
    color: var(--red);
    font-family: var(--pixel, var(--mono));
    font-size: 12px;
    font-weight: 400;
    line-height: 1.6;
    text-transform: uppercase;
}

.anon-check {
    display: flex;
    align-items: center;
    gap: 10px;
    font-weight: 600;
    cursor: pointer;
}

.anon-check input {
    width: 20px;
    height: 20px;
    accent-color: var(--yellow);
}

.anon-bar {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    justify-content: space-between;
    gap: 8px 16px;
    margin-bottom: 24px;
}

.anon-input {
    font-family: var(--mono);
    font-size: 18px;
    letter-spacing: 0.08em;
}

@media (max-width: 560px) {
    .anon-dialog {
        padding: 0 16px 18px;
    }

    .anon-dialog .window-title {
        margin: 0 -16px 16px;
    }

    .anon-number {
        font-size: 14px;
    }
}

/* Sign-in link in the menu bar, next to the language switch. */
.menubar .menu-login {
    margin-right: 6px;
    padding: 5px 10px;
    border: 2px solid var(--accent);
    color: var(--accent);
}

.menubar .menu-login:hover {
    background: var(--accent);
    color: var(--on-accent);
}

.login-way {
    margin-top: 8px;
    font-size: 14px;
}

@media (max-width: 560px) {
    .menubar--site .menu-login {
        order: 3;
        display: inline-flex;
        align-items: center;
        min-height: 40px;
        margin-right: 4px;
        padding: 0 10px;
    }
}

/* ---------- 8-bit theme ----------
   Customer pages carry <html class="pixel"> (base.html); admin, partner and
   admin login pages switch it off and keep the theme above. Always dark,
   square corners, a pixel font for headings, buttons and labels, hard red
   offset shadows: dark burgundy, cream, red and yellow like the ninja mascot. The pixel font is
   crisp at sizes that are multiples of 4px, so its sizes are set by hand;
   its @font-face is in base.html. */
:root.pixel {
    /* Dark burgundy (hsl 352° 30% 12/16/20%), chosen 2026-11-13: pure black read as a hole. */
    --bg: #281518;
    --grid: rgba(243, 239, 226, 0.055);
    --surface: #351d20;
    --surface-2: #422428;
    --ink: #f3efe2;
    /* Lighter than before (was #a9a597, 2026-11-13): running text read as dim on the burgundy. */
    --ink-soft: #cdc7b6;
    --line: #f3efe2;
    --line-soft: rgba(243, 239, 226, 0.24);
    --accent: #ffd23f;
    --accent-hover: #ffe170;
    --accent-soft: #2d2914;
    --on-accent: #0d0d10;
    --green: #3df58a;
    --green-soft: #10301e;
    --yellow: #ffd23f;
    --yellow-soft: #2d2914;
    --red: #ff2e2e;
    --red-soft: #3b1415;
    --on-status: #0d0d10;
    --shadow-color: #e3191c;
    --shadow: 6px 6px 0 var(--shadow-color);
    --shadow-sm: 4px 4px 0 var(--shadow-color);
    --radius: 0;
    --radius-sm: 0;
    --pixel: "Press Start 2P", ui-monospace, Menlo, monospace;
    /* Text in JetBrains Mono (self-hosted, OFL), headings, buttons, prices and codes in the
       pixel font; chosen 2026-11-13. Sizes of the pixel parts: the block at the end. */
    --sans: "JetBrains Mono", ui-monospace, Menlo, Consolas, monospace;
    --mono: var(--pixel);
    color-scheme: dark;
}

.pixel body {
    font-size: 15px;
    line-height: 1.6;
    background-image:
        linear-gradient(var(--grid) 2px, transparent 2px),
        linear-gradient(90deg, var(--grid) 2px, transparent 2px);
    background-size: 32px 32px;
}

/* Square pixels everywhere: pills, dots and bubbles included. */
.pixel *,
.pixel *::before,
.pixel *::after {
    border-radius: 0 !important;
}

.pixel ::selection {
    background: var(--red);
    color: #ffffff;
}

.pixel h1,
.pixel h2,
.pixel .display,
.pixel .btn,
.pixel .window-title,
.pixel .menubar,
.pixel .kicker,
.pixel .home-kicker,
.pixel .home-foot-title,
.pixel .home-foot-logo,
.pixel .home-tag,
.pixel .home-coin,
.pixel .home-step-num,
.pixel .home-product h3,
.pixel .home-steps h3,
.pixel .home-perk h3,
.pixel .home-price b,
.pixel .home-plan b {
    font-family: var(--pixel);
    font-weight: 400;
    letter-spacing: 0;
    -webkit-font-smoothing: none;
}

.pixel h1,
.pixel .display {
    font-size: 24px;
    line-height: 1.5;
}

.pixel h2 {
    font-size: 20px;
    line-height: 1.5;
}

.pixel .kicker,
.pixel .home-kicker {
    font-size: 12px;
    letter-spacing: 0;
    color: var(--red);
}

/* Menu bar */
.pixel .menubar {
    padding: 10px 16px;
    background: var(--bg);
    border-bottom: 3px solid var(--line);
    font-size: 12px;
}

.pixel .menubar a {
    padding: 8px 10px;
}

.pixel .menubar a:hover {
    background: var(--surface-2);
}

.pixel .menubar a[aria-current="page"] {
    background: var(--surface-2);
    color: var(--ink);
    box-shadow: inset 0 -3px 0 var(--red);
}

/* Yellow is kept for the main action only, so the sign-in link is cream. */
.pixel .menubar .menu-login {
    border-color: var(--line);
    color: var(--ink);
}

.pixel .menubar .menu-login:hover {
    background: var(--surface-2);
    color: var(--ink);
}

.pixel .menubar .brand {
    font-weight: 400;
}

.pixel .menubar .brand::before,
.pixel .home-foot-logo::before {
    background-image: url("mascot/avatar.svg");
}

/* Hotkey letters stay plain: an underline under every item read as "this section is open". */
.pixel .hk {
    text-decoration: none;
}

.pixel .lang-switch {
    font-size: 12px;
}

.pixel .lang-switch b {
    border-width: 2px;
}

/* Buttons: yellow, hard red shadow, they sink on press. No easing in 8-bit. */
.pixel .btn {
    min-height: 50px;
    padding: 12px 18px;
    border: 3px solid var(--line);
    font-size: 12px;
    line-height: 1.6;
    box-shadow: 4px 4px 0 var(--red);
    transition: none;
}

.pixel .btn:hover {
    transform: translate(-2px, -2px);
    box-shadow: 6px 6px 0 var(--red);
}

.pixel .btn:active {
    transform: translate(4px, 4px);
    box-shadow: none;
}

.pixel .btn--sm {
    min-height: 38px;
    padding: 6px 12px;
    font-size: 12px;
}

.pixel .btn--gray {
    background: var(--surface);
    color: var(--ink);
}

.pixel .btn--gray:hover {
    background: var(--surface-2);
    color: var(--ink);
}

.pixel .btn--danger {
    background: var(--red);
    color: #ffffff;
    box-shadow: 4px 4px 0 var(--yellow);
}

.pixel .btn[disabled] {
    box-shadow: none;
    transform: none;
}

/* Windows: cream frame, blue title bar like an old game dialog. */
.pixel .window {
    border-width: 3px;
}

.pixel .window-title {
    padding: 12px 16px;
    border-bottom-width: 3px;
    background: var(--red);
    color: #ffffff;
    font-size: 12px;
    line-height: 1.5;
}

.pixel .window--alert .window-title {
    background: var(--yellow);
    color: #0d0d10;
}

/* Home page */
.pixel .home-hero {
    padding: 56px 0 64px;
}

@media (min-width: 961px) {
    .pixel .home-hero-grid {
        grid-template-columns: minmax(0, 1.15fr) minmax(0, 0.85fr);
    }
}

.pixel .home-title {
    font-size: 24px;
    line-height: 1.6;
}

.pixel .home-lead {
    font-size: 12px;
}

.pixel .home-coin {
    padding: 4px 8px;
    border: 2px solid var(--line-soft);
    background: transparent;
    font-size: 12px;
}

.pixel .home-section {
    padding-top: 64px;
}

.pixel .home-section--last {
    padding-bottom: 64px;
}

.pixel .home-h2 {
    margin-bottom: 24px;
    font-size: 20px;
    line-height: 1.4;
}

.pixel .home-h2::before {
    content: ">" / "";
    margin-right: 0.6em;
    color: var(--red);
}

.pixel .home-cta .home-h2 {
    margin-bottom: 0;
    font-size: 20px;
}

.pixel .home-cta .home-h2::before {
    content: none;
}

/* One divider style everywhere: the dashed line of the product cards. */
.pixel .home-divider {
    height: 0;
    border-top: 3px dashed var(--line-soft);
}

.pixel .home-product {
    gap: 16px;
    padding: 28px;
    border-width: 3px;
    box-shadow: 8px 8px 0 var(--shadow-color);
}

.pixel .home-product h3 {
    font-size: 16px;
    line-height: 1.5;
}

.pixel .home-tag {
    padding: 6px 10px;
    background: var(--ink);
    font-size: 12px;
}

.pixel .home-tag--red {
    background: var(--red);
    color: #ffffff;
}

.pixel .home-pill {
    border: 2px solid var(--line-soft);
    background: transparent;
}

.pixel .home-pill:hover,
.pixel .home-plan:hover {
    border-color: var(--line);
}

.pixel .home-plan {
    border: 2px solid var(--line-soft);
    background: transparent;
}

.pixel .home-plan--best {
    border-color: var(--line);
    background: var(--surface-2);
}

.pixel .home-plan b {
    margin-top: 4px;
    font-size: 12px;
}

.pixel .home-product-foot {
    border-top: 3px dashed var(--line-soft);
}

.pixel .home-price b {
    font-size: 24px;
    color: var(--ink);
}

.pixel .home-steps h3,
.pixel .home-perk h3 {
    font-size: 12px;
    line-height: 1.6;
}

/* Steps: three cards in a row joined by red arrows (stacked with down arrows on phones). */
.pixel .home-steps {
    gap: 40px;
}

.pixel .home-steps li {
    position: relative;
    display: grid;
    grid-template-columns: auto minmax(0, 1fr);
    align-items: start;
    gap: 6px 14px;
    padding: 16px;
    background: var(--surface);
    border: 3px solid var(--line);
}

.pixel .home-steps li .home-step-num {
    grid-row: 1 / 3;
}

.pixel .home-steps li p {
    grid-column: 2;
    font-size: 14px;
    line-height: 1.5;
}

.pixel .home-steps li:not(:last-child)::after {
    content: ">" / "";
    position: absolute;
    top: 50%;
    right: -32px;
    transform: translateY(-50%);
    font-family: var(--pixel);
    font-size: 20px;
    color: var(--red);
}

.pixel .home-step-num {
    width: 36px;
    height: 36px;
    border: 3px solid var(--line);
    background: var(--surface-2);
    color: var(--ink);
    font-size: 12px;
    box-shadow: 3px 3px 0 var(--red);
}

/* Perks: the same cards as the steps, the icon in a framed square. */
.pixel .home-perks {
    grid-template-columns: repeat(4, minmax(0, 1fr));
    gap: 20px;
}

.pixel .home-perk {
    display: grid;
    grid-template-columns: auto minmax(0, 1fr);
    align-items: center;
    align-content: start;
    gap: 10px 12px;
    padding: 16px;
    background: var(--surface);
    border: 3px solid var(--line);
}

.pixel .home-perk p {
    grid-column: 1 / -1;
    font-size: 14px;
    line-height: 1.5;
}

.pixel .home-perk-icon {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 36px;
    height: 36px;
    border: 3px solid var(--line);
    background: var(--bg);
    box-shadow: 3px 3px 0 var(--red);
}

.pixel .home-perk-icon .px-icon {
    width: 20px;
    height: auto;
    fill: var(--ink);
}

@media (max-width: 1100px) {
    .pixel .home-perks {
        grid-template-columns: repeat(2, minmax(0, 1fr));
    }
}

.pixel .home-cta {
    padding: 32px 36px;
    background: var(--surface);
    color: var(--ink);
    border: 3px solid var(--line);
    box-shadow: 8px 8px 0 var(--red);
}

/* Footer */
.pixel .home-foot {
    background: var(--bg);
    border-top: 3px dashed var(--line-soft);
}

.pixel .home-foot-title {
    font-size: 12px;
    color: var(--ink-soft);
}

.pixel .home-foot-logo {
    font-size: 12px;
}

@media (max-width: 640px) {
    .pixel .home-hero {
        padding: 36px 0 56px;
    }

    .pixel .home-title {
        font-size: 16px;
    }

    .pixel .home-h2 {
        margin-bottom: 24px;
        font-size: 16px;
    }

    .pixel .home-perks {
        grid-template-columns: minmax(0, 1fr);
    }

    .pixel .home-steps li:not(:last-child)::after {
        top: auto;
        right: auto;
        bottom: -40px;
        left: 50%;
        transform: translateX(-50%) rotate(90deg);
    }

    .pixel .home-cta .home-h2 {
        font-size: 16px;
    }

    .pixel .home-product {
        padding: 20px;
        box-shadow: 6px 6px 0 var(--shadow-color);
    }

    .pixel .home-price b {
        font-size: 20px;
    }

    .pixel .home-cta {
        padding: 24px 20px;
    }

    .pixel h1,
    .pixel .display {
        font-size: 20px;
    }

    .pixel h2 {
        font-size: 16px;
    }
}

@media (prefers-reduced-motion: reduce) {
    .home-cursor::after {
        animation: none;
    }
}

.pixel .login-way {
    margin-top: 8px;
    font-size: 12px;
    line-height: 1.6;
    color: var(--ink);
}

/* Phones: logo, "Войти" and the language switch share the first menu row. */
@media (max-width: 560px) {
    .pixel .menubar--site {
        padding: 0 8px;
    }

    .pixel .menubar--site .brand {
        gap: 6px;
        margin-right: 4px;
        font-size: 12px;
    }

    .pixel .menubar--site .brand::before {
        width: 24px;
        height: 24px;
    }

    .pixel .menubar--site .menu-login {
        padding: 0 6px;
        min-height: 36px;
    }

    .pixel .menubar--site .lang-switch b,
    .pixel .menubar--site .lang-switch a {
        min-width: 36px;
        padding: 0 6px;
    }
}

/* 8-bit text everywhere (2026-11-13): customer pages set all text in the pixel font,
   which stays crisp on a 4px grid, so every px size above moves to 12/16/20/24/28.
   Built from the rules above; a new rule with another px size needs its line here. */
.pixel .statusbar {
    font-size: 12px;
}

.pixel .statusbar .key {
    font-size: 12px;
}

.pixel .small {
    font-size: 12px;
}

.pixel .input--sm {
    font-size: 12px;
}

.pixel .choice-title {
    font-size: 16px;
}

.pixel .choice-price {
    font-size: 16px;
}

.pixel .choice-hint {
    font-size: 12px;
}

.pixel .perk p {
    font-size: 12px;
}

.pixel .review blockquote {
    font-size: 12px;
}

.pixel .review figcaption {
    font-size: 12px;
}

.pixel .product-title {
    font-size: 16px;
}

.pixel .product-text {
    font-size: 12px;
}

.pixel .esim-country {
    font-size: 12px;
}

.pixel .step-hint {
    font-size: 12px;
}

.pixel .steps--numbered li::before {
    background: var(--surface-2);
    color: var(--ink);
    font-size: 12px;
}

.pixel .stat-label {
    font-size: 12px;
}

.pixel .stat-value {
    font-size: 20px;
}

.pixel .sms-head {
    font-size: 12px;
}

.pixel .otp {
    font-size: 20px;
}

.pixel .table {
    font-size: 12px;
}

.pixel .prose {
    font-size: 12px;
}

.pixel .prose > h2 {
    font-size: 12px;
}

.pixel .section-title {
    font-size: 12px;
}

.pixel .chip {
    font-size: 12px;
}

.pixel .stat-big {
    font-size: 28px;
}

.pixel .timeline {
    font-size: 12px;
}

.pixel .bubble-meta {
    font-size: 12px;
}

.pixel .chat-system {
    font-size: 12px;
}

.pixel .stats-chart text {
    font-size: 12px;
}

.pixel .chatw-launcher {
    font-size: 12px;
}

.pixel .chatw-head {
    font-size: 12px;
}

.pixel .chatw-close {
    font-size: 20px;
}

.pixel .chatw-log {
    font-size: 12px;
}

.pixel .chatw-greeting {
    font-size: 12px;
}

.pixel .chatw-status,
.pixel .chatw-error {
    font-size: 12px;
}

.pixel .chatw-tools {
    font-size: 12px;
}

.pixel .chatw-code {
    font-size: 12px;
}

.pixel .home-coins {
    font-size: 12px;
}

.pixel .home-term-bar {
    font-size: 12px;
}

.pixel .home-sms {
    font-size: 12px;
}

.pixel .home-sms time {
    width: 5ch;
    font-size: 12px;
    white-space: nowrap;
}

.pixel .home-fact {
    font-size: 12px;
}

.pixel .home-pill {
    font-size: 12px;
}

.pixel .home-price small {
    font-size: 12px;
}

.pixel .home-foot {
    font-size: 12px;
}

.pixel .home-foot-copy {
    font-size: 12px;
}

.pixel .anon-or {
    font-size: 12px;
}

.pixel .anon-number {
    font-size: 16px;
}

.pixel .anon-warn {
    font-size: 12px;
}

.pixel .anon-input {
    font-size: 16px;
}

.pixel .home-steps li p {
    font-size: 12px;
}

.pixel .home-perk p {
    font-size: 12px;
}

@media (max-width: 560px) {
    .pixel .prose {
        font-size: 12px;
    }

    .pixel .menubar--site {
        font-size: 12px;
    }

    .pixel .menubar--site .lang-switch {
        font-size: 12px;
    }

    .pixel .anon-number {
        font-size: 12px;
    }
}

@media (max-width: 600px) {
    .pixel .stats-chart text {
        font-size: 20px;
    }
}

/* On a phone: the tariff term drops to the text size, and the footer goes to one
   column, since a long word like «Конфиденциальность» in the wide pixel font is
   wider than half the screen. */
@media (max-width: 640px) {
    .pixel .choice-title {
        font-size: 12px;
    }

    .pixel .home-foot-grid {
        grid-template-columns: minmax(0, 1fr);
    }
}

/* Running text at 15px in JetBrains Mono: paragraphs, lists, muted notes and footer links,
   over the 12px of the pixel size block above. */
.pixel main p,
.pixel main li,
.pixel main .muted,
.pixel .choice-hint,
.pixel .home-foot a,
.pixel .home-foot p {
    font-size: 15px !important;
    letter-spacing: -0.02em;
    word-spacing: -0.25em;
}

/* SMS cabinet: the pixel font is one em per character, so the number is sized to fit
   its window on one line (--len is the number's length, set in the template). */
.pixel .phone-box {
    container-type: inline-size;
}

.pixel .phone {
    font-size: clamp(14px, 5.5vw, 32px);
    font-size: clamp(14px, calc(100cqi / (var(--len, 13) + 1)), 32px);
    /* Whole 4px steps keep the pixel font sharp where round() is supported. */
    font-size: clamp(12px, round(down, 100cqi / (var(--len, 13) + 1), 4px), 32px);
    letter-spacing: 0;
    white-space: nowrap;
    word-break: normal;
}

/* ---------- Design pass, 2026-11-13 ----------
   Yellow for the main action only; prices bright; the chat a small neutral icon;
   tariffs as radio rows; the eSIM price table on the home page; two equal ways to buy. */

.pixel .home-lead {
    max-width: 600px;
}

/* SMS sample: three messages, no empty waiting line. */
.pixel .home-sms {
    gap: 10px;
    padding: 14px 16px;
}

/* Chat: a 48px neutral square with the bubble icon, so it covers less; chat.js hides it
   while the page scrolls down and brings it back on the way up. */
.pixel .chatw-launcher {
    justify-content: center;
    width: 48px;
    min-height: 48px;
    height: 48px;
    padding: 0;
    border: 3px solid var(--line);
    background: var(--surface);
    color: var(--ink);
    box-shadow: 3px 3px 0 var(--red);
    transition: transform 0.15s steps(3), opacity 0.15s steps(3);
}

.pixel .chatw-launcher::before {
    width: 22px;
    height: 22px;
}

.pixel .chatw-launcher:hover {
    background: var(--surface-2);
}

.pixel .chatw-launcher .chatw-badge {
    position: absolute;
    top: -10px;
    right: -10px;
}

.chatw-launcher.is-away {
    transform: translateY(calc(100% + 32px));
    opacity: 0;
    pointer-events: none;
}

@media (prefers-reduced-motion: reduce) {
    .pixel .chatw-launcher {
        transition: none;
    }
}

/* Radio marks: a stepped pixel circle (border-radius is off in this theme). */
.pixel .choice .mark {
    width: 20px;
    height: 20px;
    border: 0;
    background: var(--line);
    clip-path: polygon(30% 0, 70% 0, 70% 10%, 90% 10%, 90% 30%, 100% 30%, 100% 70%, 90% 70%, 90% 90%, 70% 90%, 70% 100%, 30% 100%, 30% 90%, 10% 90%, 10% 70%, 0 70%, 0 30%, 10% 30%, 10% 10%, 30% 10%);
    box-shadow: none;
    position: relative;
}

.pixel .choice .mark::after {
    content: "";
    position: absolute;
    inset: 3px;
    background: var(--surface);
    clip-path: inherit;
}

.pixel .choice input:checked + .choice-card .mark {
    background: var(--yellow);
    box-shadow: none;
}

.pixel .choice input:checked + .choice-card .mark::after {
    inset: 3px;
    background: radial-gradient(var(--yellow) 0 0) center / 8px 8px no-repeat, var(--surface);
}

/* Number tariffs: one row each, term on the left and price on the right. */
.pixel .choices--rows {
    grid-template-columns: minmax(0, 1fr);
    gap: 10px;
}

.choices--rows .choice-card {
    display: grid;
    grid-template-columns: auto minmax(0, 1fr) auto;
    grid-template-areas: "mark title price" "mark hint price";
    align-items: center;
    gap: 2px 14px;
    padding: 12px 16px;
}

.choices--rows .choice-top {
    display: contents;
}

.choices--rows .mark {
    grid-area: mark;
}

.choices--rows .choice-top .badge {
    grid-area: title;
    justify-self: end;
    align-self: center;
}

.choices--rows .choice-title {
    grid-area: title;
}

.choices--rows .choice-hint {
    grid-area: hint;
}

.choices--rows .choice-price {
    grid-area: price;
    text-align: right;
}

/* Discount badges in red rather than yellow. */
.pixel .badge {
    border-width: 2px;
    background: var(--red);
    color: #ffffff;
    font-family: var(--pixel);
    font-size: 12px;
    font-weight: 400;
    line-height: 20px;
}

.pixel .badge--green {
    background: var(--green);
    color: var(--on-status);
}

/* Prices in cream and the pixel font: the main thing on a country card. */
.pixel .esim-country-price {
    color: var(--ink);
    font-family: var(--pixel);
    font-size: 12px !important;
    letter-spacing: 0;
    word-spacing: 0;
}

.pixel .choice-price {
    color: var(--ink);
}

/* Two equal ways to buy, each with one line on what it means. */
.buy-ways {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    grid-template-rows: auto auto;
    gap: 8px 16px;
}

/* Subgrid: both buttons share one row height when one label wraps. */
.buy-way {
    display: grid;
    grid-row: span 2;
    grid-template-rows: subgrid;
    row-gap: 8px;
}

.buy-way .btn {
    width: 100%;
}

.buy-way p {
    margin: 0;
    text-align: center;
}

@media (max-width: 560px) {
    .buy-ways {
        grid-template-columns: minmax(0, 1fr);
        grid-template-rows: none;
        row-gap: 16px;
    }

    .buy-way {
        grid-row: auto;
        grid-template-rows: none;
    }
}

/* /esim: search first, popular countries as a row of chips, then the full list. */
.esim-search-row {
    display: flex;
    flex-direction: column;
    gap: 12px;
}

.esim-popular {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
}

.esim-popular[hidden] {
    display: none;
}

.esim-chip {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    min-height: 40px;
    padding: 6px 12px;
    border: 2px solid var(--line-soft);
    background: var(--surface);
    color: var(--ink);
    font-size: 14px;
    text-decoration: none;
}

.esim-chip:hover {
    border-color: var(--line);
    background: var(--surface-2);
    color: var(--ink);
}

.esim-chip b {
    font-family: var(--mono);
    font-size: 12px;
    font-weight: 400;
}

.esim-list-label {
    margin: 4px 0 0;
}

/* Home: eSIM prices by country, a tab per popular country. */
.home-rates {
    display: flex;
    flex-direction: column;
    gap: 12px;
}

.home-rate-tabs {
    display: flex;
    flex-wrap: wrap;
    gap: 6px;
}

.home-rate-tab {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    min-height: 36px;
    padding: 4px 10px;
    border: 2px solid var(--line-soft);
    background: transparent;
    color: var(--ink);
    font-size: 14px;
    text-decoration: none;
}

.home-rate-tab:hover {
    border-color: var(--line);
    color: var(--ink);
}

.home-rate-tab[aria-selected="true"] {
    border-color: var(--line);
    background: var(--surface-2);
    box-shadow: inset 0 -3px 0 var(--red);
}

.home-rate-table {
    width: 100%;
    border-collapse: collapse;
    font-size: 14px;
}

.home-rate-table[hidden] {
    display: none;
}

.home-rate-table caption {
    position: absolute;
    width: 1px;
    height: 1px;
    overflow: hidden;
    clip: rect(0 0 0 0);
}

.home-rate-table th,
.home-rate-table td {
    padding: 7px 10px;
    border-bottom: 2px dashed var(--line-soft);
    text-align: left;
}

.home-rate-table thead th {
    color: var(--ink-soft);
    font-weight: 400;
    font-size: 13px;
}

.home-rate-table .num {
    text-align: right;
}

.home-rate-table tbody tr {
    cursor: pointer;
}

.home-rate-table tbody tr:hover {
    background: var(--surface-2);
}

.home-rate-table td a {
    color: inherit;
    text-decoration: none;
}

.pixel .home-rate-table .price {
    font-family: var(--pixel);
    font-size: 12px;
    color: var(--ink);
}

.home-plans-table td.num small {
    color: var(--ink-soft);
}

/* Services a number was checked with, and when: chips with the date. */
.checked {
    display: flex;
    flex-direction: column;
    gap: 8px;
}

.checked-list {
    display: flex;
    flex-wrap: wrap;
    gap: 6px;
    margin: 0;
    padding: 0;
    list-style: none;
}

.pixel main .checked-list li {
    display: inline-flex;
    align-items: baseline;
    gap: 8px;
    padding: 4px 10px;
    border: 2px solid var(--line-soft);
    font-size: 14px !important;
}

.checked-list b::before {
    content: "✓ " / "";
    color: var(--green);
}

.checked-list time {
    color: var(--ink-soft);
    font-size: 12px;
}

.home-perk-link {
    grid-column: 1 / -1;
    font-size: 14px;
}

.checked-list a {
    color: var(--ink);
    text-decoration: none;
}

.checked-list a:hover {
    text-decoration: underline;
}

/* /numbers/<service>: one-off code vs +888 vs our rental, then tip lists. */
.number-compare {
    display: grid;
    gap: 10px;
}

.number-compare-row {
    padding: 10px 12px;
    border: 1.5px solid var(--line-soft);
    border-radius: var(--radius-sm);
    background: var(--surface-2);
}

.number-compare-row--ours {
    border-color: var(--line);
}

.number-compare-row dl {
    display: grid;
    grid-template-columns: max-content 1fr;
    gap: 4px 12px;
    margin: 6px 0 0;
}

.number-compare-row dt {
    color: var(--ink-soft);
}

.number-compare-row dd {
    margin: 0;
}

.number-tips {
    display: grid;
    gap: 8px;
    margin: 0;
    padding-left: 20px;
}

@media (max-width: 480px) {
    .number-compare-row dl {
        grid-template-columns: 1fr;
        gap: 0;
    }

    .number-compare-row dd + dt {
        margin-top: 6px;
    }
}
