/*
 * «Кто прав?» / Who's Right? — design system: "ironic court".
 * Metaphor: gavel, robe, case folder, stamps ПРАВ / НЕ ПРАВ.
 * Palette: ink navy #14213D, verdict gold #F5A623, stamp crimson #C1121F, paper #F7F3EA, dark #0E1116.
 * Fonts: Literata (headings, percents) + Source Sans 3 (body), self-hosted: assets/styles/fonts.css + assets/fonts/.
 * Mobile-first, content column <= 560px, safe-area insets, light + dark themes via CSS variables,
 * prefers-reduced-motion respected everywhere.
 *
 * Contents: 1 tokens · 2 base · 3 layout · 4 buttons · 5 forms · 6 surfaces · 7 components
 *           8 pages · 9 animations · 10 utilities
 */

/* ============================================================ 1. tokens */
:root {
    --font-display: "Literata", Georgia, "Times New Roman", serif;
    --font-body: "Source Sans 3", system-ui, -apple-system, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;

    /* brand constants */
    --navy: #14213d;
    --gold: #f5a623;
    --crimson: #c1121f;
    --paper: #f7f3ea;

    /* light theme (default) */
    --bg: #f7f3ea;
    --bg-deep: #ece4d0;
    --surface: #ffffff;
    --surface-2: #fbf8f1;
    --line: #d9cfb6;
    --line-strong: #14213d;
    --ink: #14213d;
    --ink-2: #444f69;
    --ink-3: #5b6580;
    --header-bg: #14213d;
    --header-ink: #f7f3ea;
    --btn-primary-bg: #f5a623;
    --btn-primary-ink: #14213d;
    --btn-primary-edge: #14213d;
    --btn-navy-bg: #14213d;
    --btn-navy-ink: #f7f3ea;
    --bar-a: #f5a623;
    --bar-a-ink: #14213d;
    --bar-b: #14213d;
    --bar-b-ink: #f7f3ea;
    --stamp: #c1121f;
    --stamp-win: #14213d;
    --stamp-draw: #5b6580;
    --ok: #17703f;
    --warn-bg: #fff4d9;
    --warn-line: #e6b44c;
    --danger: #b3101c;
    --focus: #1d4ed8;
    --ruled: rgba(20, 33, 61, 0.09);
    --shadow: 0 1px 0 rgba(20, 33, 61, 0.05), 0 14px 28px -18px rgba(20, 33, 61, 0.35);
    --overlay: rgba(14, 17, 22, 0.55);
    --paper-grain: radial-gradient(rgba(20, 33, 61, 0.035) 1px, transparent 1px);

    --radius: 14px;
    --radius-lg: 22px;
    --col: 560px;
    --col-wide: 1040px;
    --tap: 44px;
    --safe-t: env(safe-area-inset-top, 0px);
    --safe-r: env(safe-area-inset-right, 0px);
    --safe-b: env(safe-area-inset-bottom, 0px);
    --safe-l: env(safe-area-inset-left, 0px);

    color-scheme: light;
}

:root[data-theme="dark"] {
    --bg: #0e1116;
    --bg-deep: #0a0d11;
    --surface: #161b24;
    --surface-2: #1b2230;
    --line: #2b3446;
    --line-strong: #f7f3ea;
    --ink: #f2eee3;
    --ink-2: #b6bfd0;
    --ink-3: #939db2;
    --header-bg: #121826;
    --header-ink: #f7f3ea;
    --btn-primary-edge: #f7f3ea;
    --btn-navy-bg: #f2eee3;
    --btn-navy-ink: #0e1116;
    --bar-b: #2c3a5c;
    --bar-b-ink: #f7f3ea;
    --stamp: #ff5a63;
    --stamp-win: #f5a623;
    --stamp-draw: #939db2;
    --ok: #4cc283;
    --warn-bg: #2a2412;
    --warn-line: #7a5d1a;
    --danger: #ff6b73;
    --focus: #f5a623;
    --ruled: rgba(247, 243, 234, 0.07);
    --shadow: 0 1px 0 rgba(0, 0, 0, 0.4), 0 14px 28px -18px rgba(0, 0, 0, 0.8);
    --overlay: rgba(0, 0, 0, 0.7);
    --paper-grain: radial-gradient(rgba(255, 255, 255, 0.025) 1px, transparent 1px);

    color-scheme: dark;
}

@media (prefers-color-scheme: dark) {
    :root:not([data-theme]) {
        --bg: #0e1116;
        --bg-deep: #0a0d11;
        --surface: #161b24;
        --surface-2: #1b2230;
        --line: #2b3446;
        --line-strong: #f7f3ea;
        --ink: #f2eee3;
        --ink-2: #b6bfd0;
        --ink-3: #939db2;
        --header-bg: #121826;
        --btn-primary-edge: #f7f3ea;
        --btn-navy-bg: #f2eee3;
        --btn-navy-ink: #0e1116;
        --bar-b: #2c3a5c;
        --stamp: #ff5a63;
        --stamp-win: #f5a623;
        --stamp-draw: #939db2;
        --ok: #4cc283;
        --warn-bg: #2a2412;
        --warn-line: #7a5d1a;
        --danger: #ff6b73;
        --focus: #f5a623;
        --ruled: rgba(247, 243, 234, 0.07);
        --shadow: 0 1px 0 rgba(0, 0, 0, 0.4), 0 14px 28px -18px rgba(0, 0, 0, 0.8);
        --overlay: rgba(0, 0, 0, 0.7);
        --paper-grain: radial-gradient(rgba(255, 255, 255, 0.025) 1px, transparent 1px);

        color-scheme: dark;
    }
}

/* ============================================================ 2. base */
@font-face {
    /* local metric-compatible fallback keeps the layout stable while webfonts load */
    font-family: "Literata Fallback";
    src: local("Georgia");
    size-adjust: 104%;
    ascent-override: 92%;
}

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

html {
    -webkit-text-size-adjust: 100%;
    text-size-adjust: 100%;
    scroll-behavior: smooth;
    scroll-padding-top: calc(72px + var(--safe-t));
}

html.sheet-open {
    overflow: hidden;
}

body {
    margin: 0;
    min-height: 100vh;
    min-height: 100dvh;
    display: flex;
    flex-direction: column;
    background: var(--bg);
    background-image: var(--paper-grain);
    background-size: 22px 22px;
    color: var(--ink);
    font-family: var(--font-body);
    font-size: 1.0625rem;
    line-height: 1.5;
    -webkit-font-smoothing: antialiased;
    padding-left: var(--safe-l);
    padding-right: var(--safe-r);
}

h1,
h2,
h3,
h4 {
    margin: 0 0 0.5em;
    font-family: var(--font-display);
    font-weight: 700;
    line-height: 1.15;
    letter-spacing: -0.01em;
    text-wrap: balance;
}

h1 {
    font-size: clamp(1.9rem, 7.2vw, 2.75rem);
    font-weight: 800;
}

h2 {
    font-size: clamp(1.4rem, 5vw, 1.9rem);
}

h3 {
    font-size: 1.2rem;
}

p {
    margin: 0 0 1em;
    text-wrap: pretty;
}

a {
    color: inherit;
    text-decoration-thickness: 0.08em;
    text-underline-offset: 0.18em;
}

a:hover {
    text-decoration-color: var(--gold);
}

img,
svg {
    max-width: 100%;
    display: block;
}

ul,
ol {
    margin: 0 0 1em;
    padding-left: 1.2em;
}

hr {
    border: 0;
    border-top: 1px solid var(--line);
    margin: 1.5rem 0;
}

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

::selection {
    background: var(--gold);
    color: var(--navy);
}

button,
input,
select,
textarea {
    font: inherit;
    color: inherit;
}

[hidden] {
    display: none !important;
}

.num {
    font-family: var(--font-display);
    font-variant-numeric: lining-nums tabular-nums;
}

/* ============================================================ 3. layout */
.skip-link {
    position: absolute;
    left: 8px;
    top: -60px;
    z-index: 100;
    background: var(--gold);
    color: var(--navy);
    padding: 0.6rem 1rem;
    border-radius: 8px;
    font-weight: 700;
    transition: top 0.15s;
}

.skip-link:focus {
    top: calc(8px + var(--safe-t));
}

.site-header {
    position: sticky;
    top: 0;
    z-index: 30;
    background: var(--header-bg);
    color: var(--header-ink);
    padding-top: var(--safe-t);
    border-bottom: 3px solid var(--gold);
}

.site-header__inner {
    max-width: var(--col-wide);
    margin: 0 auto;
    min-height: 56px;
    padding: 0 0.75rem;
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 0.5rem;
}

.brand {
    display: inline-flex;
    align-items: center;
    gap: 0.55rem;
    min-height: var(--tap);
    text-decoration: none;
    color: inherit;
}

.brand__mark {
    width: 30px;
    height: 30px;
    flex: none;
    color: var(--gold);
}

.brand__name {
    font-family: var(--font-display);
    font-weight: 800;
    font-size: 1.2rem;
    letter-spacing: -0.01em;
    white-space: nowrap;
}

.header-actions {
    display: flex;
    align-items: center;
    gap: 0.15rem;
}

.header-link {
    display: inline-flex;
    align-items: center;
    min-height: var(--tap);
    padding: 0 0.6rem;
    font-weight: 600;
    font-size: 0.95rem;
    text-decoration: none;
    border-radius: 10px;
    white-space: nowrap;
}

.header-link:hover {
    background: rgba(247, 243, 234, 0.12);
}

.header-link[aria-current="page"] {
    color: var(--gold);
}

.icon-btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-width: var(--tap);
    min-height: var(--tap);
    padding: 0;
    border: 0;
    border-radius: 10px;
    background: transparent;
    color: inherit;
    cursor: pointer;
    font-weight: 700;
    text-decoration: none;
}

.icon-btn:hover {
    background: rgba(247, 243, 234, 0.12);
}

.site-header :focus-visible {
    outline-color: var(--gold);
}

.i {
    width: 1.25em;
    height: 1.25em;
    flex: none;
    fill: none;
    stroke: currentColor;
    stroke-width: 1.8;
    stroke-linecap: round;
    stroke-linejoin: round;
}

.i--fill {
    fill: currentColor;
    stroke: none;
}

/* theme toggle shows the icon of the theme you will switch to */
.theme-icon--moon {
    display: block;
}

.theme-icon--sun {
    display: none;
}

:root[data-theme="dark"] .theme-icon--moon {
    display: none;
}

:root[data-theme="dark"] .theme-icon--sun {
    display: block;
}

@media (prefers-color-scheme: dark) {
    :root:not([data-theme]) .theme-icon--moon {
        display: none;
    }

    :root:not([data-theme]) .theme-icon--sun {
        display: block;
    }
}

.shell {
    width: 100%;
    max-width: var(--col);
    margin: 0 auto;
    padding: 1.25rem 1rem 2.5rem;
}

.shell--wide {
    max-width: var(--col-wide);
}

main {
    flex: 1 0 auto;
}

.site-footer {
    margin-top: auto;
    background: var(--bg-deep);
    border-top: 1px solid var(--line);
    padding: 1.5rem 1rem calc(1.5rem + var(--safe-b));
    font-size: 0.92rem;
    color: var(--ink-2);
}

.site-footer__inner {
    max-width: var(--col-wide);
    margin: 0 auto;
    display: grid;
    gap: 1rem;
}

.footer-links {
    display: flex;
    flex-wrap: wrap;
    gap: 0.25rem 1.1rem;
    list-style: none;
    margin: 0;
    padding: 0;
}

.footer-links a,
.footer-links button {
    display: inline-flex;
    align-items: center;
    min-height: var(--tap);
    padding: 0;
    border: 0;
    background: none;
    color: var(--ink);
    cursor: pointer;
    font-size: inherit;
    text-decoration: underline;
    text-decoration-color: var(--line);
}

.footer-note {
    margin: 0;
    max-width: 62ch;
}

.has-banner .site-footer {
    padding-bottom: calc(15rem + var(--safe-b));
}

/* ============================================================ 4. buttons */
.btn {
    --btn-bg: var(--surface);
    --btn-ink: var(--ink);
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 0.5rem;
    min-height: var(--tap);
    padding: 0.65rem 1.2rem;
    border: 2px solid var(--line-strong);
    border-radius: 12px;
    background: var(--btn-bg);
    color: var(--btn-ink);
    font-weight: 700;
    font-size: 1rem;
    line-height: 1.2;
    text-align: center;
    text-decoration: none;
    cursor: pointer;
    box-shadow: 0 3px 0 var(--line-strong);
    transition: transform 0.08s ease, box-shadow 0.08s ease, background-color 0.15s;
    -webkit-tap-highlight-color: transparent;
}

.btn:hover {
    text-decoration: none;
    transform: translateY(-1px);
    box-shadow: 0 4px 0 var(--line-strong);
}

.btn:active {
    transform: translateY(3px);
    box-shadow: 0 0 0 var(--line-strong);
}

.btn[disabled],
.btn[aria-busy="true"] {
    opacity: 0.6;
    cursor: progress;
    transform: none;
}

.btn--primary {
    --btn-bg: var(--btn-primary-bg);
    --btn-ink: var(--btn-primary-ink);
    border-color: var(--btn-primary-edge);
    box-shadow: 0 3px 0 var(--btn-primary-edge);
}

.btn--primary:hover {
    box-shadow: 0 4px 0 var(--btn-primary-edge);
}

.btn--navy {
    --btn-bg: var(--btn-navy-bg);
    --btn-ink: var(--btn-navy-ink);
}

.btn--ghost {
    --btn-bg: transparent;
    box-shadow: none;
    border-color: var(--line);
}

.btn--ghost:hover {
    border-color: var(--line-strong);
    box-shadow: none;
    transform: none;
}

.btn--ghost:active {
    transform: none;
}

.btn--text {
    --btn-bg: transparent;
    border-color: transparent;
    box-shadow: none;
    text-decoration: underline;
    text-underline-offset: 0.2em;
    padding-left: 0.4rem;
    padding-right: 0.4rem;
}

.btn--text:hover,
.btn--text:active {
    transform: none;
    box-shadow: none;
}

.btn--danger {
    --btn-ink: var(--danger);
    border-color: var(--danger);
    box-shadow: 0 3px 0 var(--danger);
}

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

.btn--xl {
    min-height: 56px;
    font-size: 1.15rem;
    padding: 0.8rem 1.5rem;
    border-radius: 14px;
}

.btn--sm {
    min-height: 40px;
    padding: 0.4rem 0.85rem;
    font-size: 0.95rem;
    box-shadow: 0 2px 0 var(--line-strong);
}

.btn__price {
    margin-left: 0.25rem;
    padding: 0.1rem 0.5rem;
    border-radius: 999px;
    background: var(--navy);
    color: var(--paper);
    font-size: 0.9rem;
    font-variant-numeric: tabular-nums;
}

.btn--highlight {
    animation: nudge 2.6s ease-in-out 1.6s 2;
}

/* ============================================================ 5. forms */
.field {
    display: grid;
    gap: 0.35rem;
    margin-bottom: 1.1rem;
}

.field__label {
    display: flex;
    justify-content: space-between;
    align-items: baseline;
    gap: 0.5rem;
    font-weight: 700;
}

.field__label small,
.field__hint {
    font-weight: 400;
    font-size: 0.9rem;
    color: var(--ink-3);
}

.field__error,
.form-error {
    margin: 0;
    color: var(--danger);
    font-weight: 600;
    font-size: 0.95rem;
}

.input,
.textarea,
.select {
    width: 100%;
    min-height: var(--tap);
    padding: 0.65rem 0.85rem;
    border: 2px solid var(--line);
    border-radius: 12px;
    background: var(--surface);
    color: var(--ink);
}

.input:hover,
.textarea:hover,
.select:hover {
    border-color: var(--ink-3);
}

.input:focus,
.textarea:focus,
.select:focus {
    outline: none;
    border-color: var(--line-strong);
    box-shadow: 0 0 0 4px color-mix(in srgb, var(--gold) 55%, transparent);
}

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

.textarea {
    min-height: 8.5rem;
    resize: vertical;
    line-height: 1.75rem;
    padding-top: 0.45rem;
}

/* legal-pad ruled paper for the dispute text */
.textarea--paper {
    background-color: var(--surface-2);
    background-image: repeating-linear-gradient(to bottom, transparent 0, transparent calc(1.75rem - 1px), var(--ruled) calc(1.75rem - 1px), var(--ruled) 1.75rem);
    background-attachment: local;
    border-left: 6px double var(--stamp);
    border-radius: 6px 12px 12px 6px;
}

.input[aria-invalid="true"],
.textarea[aria-invalid="true"] {
    border-color: var(--danger);
}

.counter {
    font-size: 0.88rem;
    font-weight: 600;
    font-variant-numeric: tabular-nums;
    color: var(--ink-3);
}

.counter.is-short {
    color: var(--ink-2);
}

.counter.is-ok {
    color: var(--ok);
}

.counter.is-over {
    color: var(--danger);
}

.check {
    display: flex;
    align-items: flex-start;
    gap: 0.7rem;
    padding: 0.35rem 0;
    min-height: var(--tap);
    cursor: pointer;
}

.check input {
    flex: none;
    width: 1.4rem;
    height: 1.4rem;
    margin: 0.15rem 0 0;
    accent-color: var(--navy);
    cursor: pointer;
}

:root[data-theme="dark"] .check input {
    accent-color: var(--gold);
}

.check span {
    font-size: 0.98rem;
    line-height: 1.35;
}

/* chips (relation, examples) */
.chips {
    display: flex;
    flex-wrap: wrap;
    gap: 0.5rem;
    margin: 0;
    padding: 0;
    list-style: none;
}

.chip {
    position: relative;
    display: inline-flex;
}

.chip input {
    position: absolute;
    inset: 0;
    opacity: 0;
    cursor: pointer;
    margin: 0;
}

.chip > span,
a.chip {
    display: inline-flex;
    align-items: center;
    min-height: var(--tap);
    padding: 0.35rem 0.95rem;
    border: 2px solid var(--line);
    border-radius: 999px;
    background: var(--surface);
    font-weight: 600;
    font-size: 0.98rem;
    text-decoration: none;
    transition: background-color 0.12s, border-color 0.12s;
}

a.chip:hover,
.chip:hover > span {
    border-color: var(--line-strong);
}

.chip input:checked + span {
    background: var(--navy);
    border-color: var(--navy);
    color: var(--paper);
}

:root[data-theme="dark"] .chip input:checked + span {
    background: var(--gold);
    border-color: var(--gold);
    color: var(--navy);
}

.chip input:focus-visible + span {
    outline: 3px solid var(--focus);
    outline-offset: 2px;
}

/* segmented control (solo / duel, language) */
.seg {
    display: grid;
    grid-auto-flow: column;
    grid-auto-columns: 1fr;
    padding: 4px;
    gap: 4px;
    border: 2px solid var(--line-strong);
    border-radius: 14px;
    background: var(--surface);
}

.seg__item {
    position: relative;
    display: block;
}

.seg__item input {
    position: absolute;
    inset: 0;
    opacity: 0;
    margin: 0;
    cursor: pointer;
}

.seg__item span {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    min-height: 52px;
    padding: 0.35rem 0.5rem;
    border-radius: 10px;
    font-weight: 700;
    text-align: center;
    line-height: 1.15;
}

.seg__item small {
    font-weight: 500;
    font-size: 0.8rem;
    color: var(--ink-3);
}

.seg__item input:checked + span {
    background: var(--navy);
    color: var(--paper);
}

.seg__item input:checked + span small {
    color: color-mix(in srgb, var(--paper) 78%, transparent);
}

:root[data-theme="dark"] .seg__item input:checked + span {
    background: var(--gold);
    color: var(--navy);
}

:root[data-theme="dark"] .seg__item input:checked + span small {
    color: color-mix(in srgb, var(--navy) 80%, transparent);
}

.seg__item input:focus-visible + span {
    outline: 3px solid var(--focus);
    outline-offset: 1px;
}

/* ============================================================ 6. surfaces */
.card {
    background: var(--surface);
    border: 2px solid var(--line);
    border-radius: var(--radius-lg);
    padding: 1.1rem;
    box-shadow: var(--shadow);
}

.card + .card {
    margin-top: 1rem;
}

/* case folder: a tab sticks out of the top-left corner */
.folder {
    position: relative;
    margin-top: 1.6rem;
    background: var(--surface);
    border: 2px solid var(--line-strong);
    border-radius: 6px var(--radius-lg) var(--radius-lg) var(--radius-lg);
    padding: 1.4rem 1.1rem 1.2rem;
    box-shadow: 5px 6px 0 var(--line-strong);
}

.folder__tab {
    position: absolute;
    left: -2px;
    top: -1.7rem;
    height: 1.7rem;
    padding: 0 0.9rem;
    display: inline-flex;
    align-items: center;
    gap: 0.4rem;
    max-width: 85%;
    background: var(--gold);
    color: var(--navy);
    border: 2px solid var(--line-strong);
    border-bottom: 0;
    border-radius: 10px 10px 0 0;
    font-size: 0.82rem;
    font-weight: 800;
    letter-spacing: 0.06em;
    text-transform: uppercase;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.note {
    padding: 0.8rem 1rem;
    border-left: 5px solid var(--gold);
    background: var(--warn-bg);
    border-radius: 4px 12px 12px 4px;
    font-size: 0.98rem;
}

.note p:last-child {
    margin-bottom: 0;
}

.alert {
    display: flex;
    gap: 0.6rem;
    align-items: flex-start;
    padding: 0.8rem 1rem;
    margin-bottom: 1rem;
    border: 2px solid var(--line);
    border-radius: 12px;
    background: var(--surface);
    font-weight: 600;
}

.alert--error {
    border-color: var(--danger);
    color: var(--danger);
}

.alert--success {
    border-color: var(--ok);
    color: var(--ok);
}

.alert--info {
    border-color: var(--ink-3);
}

.alert--warn {
    border-color: var(--warn-line);
    background: var(--warn-bg);
    color: var(--ink);
}

.badge {
    display: inline-flex;
    align-items: center;
    gap: 0.3rem;
    min-height: 1.6rem;
    padding: 0.1rem 0.6rem;
    border: 1.5px solid var(--line-strong);
    border-radius: 999px;
    background: var(--surface);
    font-size: 0.8rem;
    font-weight: 800;
    letter-spacing: 0.04em;
    text-transform: uppercase;
    white-space: nowrap;
}

.badge--vip {
    background: var(--gold);
    color: var(--navy);
    border-color: var(--navy);
}

.badge--wait {
    background: var(--warn-bg);
    border-color: var(--warn-line);
}

.badge--ok {
    color: var(--ok);
    border-color: var(--ok);
}

.badge--bad {
    color: var(--danger);
    border-color: var(--danger);
}

.badge--muted {
    color: var(--ink-3);
    border-color: var(--line);
}

.eyebrow {
    margin: 0 0 0.6rem;
    font-size: 0.82rem;
    font-weight: 800;
    letter-spacing: 0.12em;
    text-transform: uppercase;
    color: var(--ink-3);
}

.lead {
    font-size: 1.2rem;
    color: var(--ink-2);
}

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

.small {
    font-size: 0.9rem;
}

.divider-gavel {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    margin: 1.75rem 0 1rem;
    color: var(--ink-3);
    font-size: 0.82rem;
    font-weight: 800;
    letter-spacing: 0.12em;
    text-transform: uppercase;
}

.divider-gavel::before,
.divider-gavel::after {
    content: "";
    flex: 1;
    border-top: 2px solid var(--line);
}

/* ============================================================ 7. components */

/* --- judge avatar / chip / card --- */
.judge-avatar {
    --accent: var(--gold);
    flex: none;
    width: var(--size, 44px);
    height: var(--size, 44px);
    border-radius: 50%;
    border: 3px solid var(--accent);
    background: var(--surface-2);
    object-fit: cover;
    overflow: hidden;
    display: inline-grid;
    place-items: center;
    font-family: var(--font-display);
    font-weight: 800;
    color: var(--ink);
}

.judge-avatar--lg {
    --size: 72px;
}

.judge-avatar--xl {
    --size: 96px;
}

.judge-avatar--sm {
    --size: 32px;
    border-width: 2px;
}

.judge-chip {
    display: inline-flex;
    align-items: center;
    gap: 0.6rem;
    min-width: 0;
}

.judge-chip__text {
    display: grid;
    line-height: 1.2;
    min-width: 0;
}

.judge-chip__name {
    font-weight: 800;
}

.judge-chip__tag {
    font-size: 0.88rem;
    color: var(--ink-3);
}

/* judge carousel: horizontal scroll-snap, cards with lock + price */
.judges {
    display: flex;
    gap: 0.7rem;
    margin: 0 -1rem;
    padding: 0.4rem 1rem 0.9rem;
    overflow-x: auto;
    scroll-snap-type: x mandatory;
    scroll-padding: 0 1rem;
    -webkit-overflow-scrolling: touch;
    scrollbar-width: thin;
}

.judge-card {
    --accent: var(--gold);
    position: relative;
    flex: 0 0 8.4rem;
    scroll-snap-align: start;
    display: block;
    cursor: pointer;
}

.judge-card input {
    position: absolute;
    inset: 0;
    opacity: 0;
    margin: 0;
    cursor: pointer;
}

.judge-card__body {
    height: 100%;
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 0.35rem;
    padding: 0.8rem 0.5rem 0.7rem;
    border: 2px solid var(--line);
    border-radius: 16px;
    background: var(--surface);
    text-align: center;
    transition: border-color 0.12s, box-shadow 0.12s, transform 0.12s;
}

.judge-card:hover .judge-card__body {
    border-color: var(--ink-3);
}

.judge-card input:checked + .judge-card__body {
    border-color: var(--line-strong);
    box-shadow: 4px 5px 0 var(--accent), 0 0 0 1px var(--line-strong);
    transform: translateY(-2px);
}

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

.judge-card__name {
    font-family: var(--font-display);
    font-weight: 800;
    font-size: 1rem;
    line-height: 1.15;
}

.judge-card__tag {
    font-size: 0.78rem;
    line-height: 1.25;
    color: var(--ink-3);
}

.judge-card__price {
    margin-top: auto;
    display: inline-flex;
    align-items: center;
    gap: 0.25rem;
    padding: 0.1rem 0.55rem;
    border-radius: 999px;
    background: var(--bg-deep);
    font-size: 0.8rem;
    font-weight: 800;
}

.judge-card--free .judge-card__price {
    background: color-mix(in srgb, var(--ok) 16%, transparent);
    color: var(--ok);
}

.judge-card--locked .judge-card__body {
    background: var(--surface-2);
}

.judge-card--locked .judge-avatar {
    filter: grayscale(0.85);
    opacity: 0.8;
}

.judge-card__lock {
    position: absolute;
    top: 0.45rem;
    right: 0.5rem;
    z-index: 1;
    width: 1.55rem;
    height: 1.55rem;
    display: grid;
    place-items: center;
    border-radius: 50%;
    background: var(--navy);
    color: var(--gold);
    pointer-events: none;
}

.judge-card__lock .i {
    width: 0.9rem;
    height: 0.9rem;
}

/* --- token balance --- */
.token-balance {
    display: inline-flex;
    align-items: center;
    gap: 0.4rem;
    min-height: 2rem;
    padding: 0.15rem 0.75rem 0.15rem 0.35rem;
    border: 2px solid var(--line-strong);
    border-radius: 999px;
    background: var(--surface);
    font-weight: 800;
    font-variant-numeric: tabular-nums;
}

.token-balance__coin {
    width: 1.5rem;
    height: 1.5rem;
    display: grid;
    place-items: center;
    border-radius: 50%;
    background: var(--gold);
    color: var(--navy);
    font-family: var(--font-display);
    font-size: 0.85rem;
    font-weight: 800;
    box-shadow: inset 0 0 0 2px color-mix(in srgb, var(--navy) 35%, transparent);
}

.token-balance__label {
    font-weight: 500;
    color: var(--ink-3);
    font-size: 0.88rem;
}

/* --- percent bar --- */
.percent-bar {
    --pa: 50;
    margin: 0.5rem 0 1rem;
}

.percent-bar__nums {
    display: flex;
    justify-content: space-between;
    align-items: flex-end;
    gap: 1rem;
    font-family: var(--font-display);
    font-weight: 900;
    font-variant-numeric: lining-nums tabular-nums;
    line-height: 0.95;
}

.percent-bar__num {
    display: flex;
    align-items: baseline;
    font-size: clamp(3.6rem, 21vw, 5.75rem);
    letter-spacing: -0.04em;
}

.percent-bar__num small {
    font-size: 0.4em;
    margin-left: 0.04em;
    letter-spacing: 0;
}

.percent-bar__num--b {
    color: var(--ink-2);
}

.percent-bar__num[data-win="true"] {
    color: var(--ink);
    text-shadow: 3px 3px 0 var(--gold);
}

.percent-bar__track {
    position: relative;
    display: flex;
    height: 26px;
    margin-top: 0.6rem;
    border: 3px solid var(--line-strong);
    border-radius: 999px;
    overflow: hidden;
    background: var(--bar-b);
}

.percent-bar__fill {
    width: calc(var(--pa) * 1%);
    height: 100%;
    background: var(--bar-a);
    border-right: 3px solid var(--line-strong);
    animation: bar-fill 1.1s cubic-bezier(0.2, 0.8, 0.2, 1) both;
}

.percent-bar__track::after {
    /* quarter ticks, like a ruler on the judge's bench */
    content: "";
    position: absolute;
    inset: 0;
    background: linear-gradient(to right, transparent calc(25% - 1px), rgba(20, 33, 61, 0.35) calc(25% - 1px), rgba(20, 33, 61, 0.35) 25%, transparent 25%, transparent calc(50% - 1px), rgba(20, 33, 61, 0.35) calc(50% - 1px), rgba(20, 33, 61, 0.35) 50%, transparent 50%, transparent calc(75% - 1px), rgba(20, 33, 61, 0.35) calc(75% - 1px), rgba(20, 33, 61, 0.35) 75%, transparent 75%);
    pointer-events: none;
}

.percent-bar__labels {
    display: flex;
    justify-content: space-between;
    gap: 1rem;
    margin-top: 0.45rem;
    font-weight: 700;
    font-size: 0.95rem;
}

.percent-bar__labels > span {
    display: inline-flex;
    flex-direction: column;
    min-width: 0;
}

.percent-bar__labels > span:last-child {
    text-align: right;
    align-items: flex-end;
}

.percent-bar__you {
    align-self: flex-start;
    margin-top: 0.15rem;
    padding: 0 0.5rem;
    border-radius: 999px;
    background: var(--gold);
    color: var(--navy);
    font-size: 0.72rem;
    font-weight: 800;
    letter-spacing: 0.06em;
    text-transform: uppercase;
}

.percent-bar__labels > span:last-child .percent-bar__you {
    align-self: flex-end;
}

.percent-bar--sm .percent-bar__num {
    font-size: 1.8rem;
}

.percent-bar--sm .percent-bar__track {
    height: 14px;
    border-width: 2px;
    margin-top: 0.35rem;
}

.percent-bar--sm .percent-bar__fill {
    border-right-width: 2px;
}

.percent-bar--static .percent-bar__fill {
    animation: none;
}

/* --- stamp --- */
.stamp {
    --c: var(--stamp);
    display: inline-block;
    padding: 0.2em 0.6em 0.14em;
    border: 0.14em double var(--c);
    border-radius: 0.3em;
    color: var(--c);
    font-family: var(--font-display);
    font-weight: 900;
    font-size: var(--stamp-size, 2rem);
    letter-spacing: 0.1em;
    line-height: 1.1;
    text-transform: uppercase;
    text-shadow: 0 0 0.6px var(--c);
    transform: rotate(-7deg);
    opacity: 0.94;
    user-select: none;
    box-shadow: inset 0 0 0 0.05em color-mix(in srgb, var(--c) 35%, transparent);
}

.stamp--right {
    --c: var(--stamp-win);
}

.stamp--wrong {
    --c: var(--stamp);
}

.stamp--draw {
    --c: var(--stamp-draw);
}

.stamp--lg {
    --stamp-size: clamp(2.2rem, 11vw, 3.4rem);
}

.stamp--sm {
    --stamp-size: 1.1rem;
}

.stamp--slam {
    animation: stamp-slam 0.45s cubic-bezier(0.2, 1.2, 0.3, 1) 1.15s both;
}

/* sentence ribbon: "Приговор: ..." */
.sentence {
    position: relative;
    margin: 1.25rem 0 0;
    padding: 0.9rem 1rem 0.9rem 1.1rem;
    border: 2px dashed var(--stamp);
    border-radius: 12px;
    background: color-mix(in srgb, var(--stamp) 7%, var(--surface));
}

.sentence__label {
    display: block;
    margin-bottom: 0.15rem;
    color: var(--stamp);
    font-size: 0.78rem;
    font-weight: 800;
    letter-spacing: 0.14em;
    text-transform: uppercase;
}

.sentence__text {
    font-family: var(--font-display);
    font-weight: 700;
    font-size: 1.15rem;
    line-height: 1.3;
}

/* --- share buttons --- */
.share {
    display: grid;
    gap: 0.6rem;
}

.share__row {
    display: grid;
    grid-template-columns: repeat(5, minmax(0, 1fr));
    gap: 0.4rem;
}

.share__btn {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: 0.2rem;
    min-height: 62px;
    padding: 0.4rem 0.2rem;
    border: 2px solid var(--line);
    border-radius: 12px;
    background: var(--surface);
    font-size: 0.68rem;
    font-weight: 700;
    text-decoration: none;
    cursor: pointer;
}

.share__btn:hover {
    border-color: var(--line-strong);
}

.share__btn .i {
    width: 1.5rem;
    height: 1.5rem;
}

.share__btn--telegram .i {
    color: #229ed9;
}

.share__btn--whatsapp .i {
    color: #1faa53;
}

.share__btn--vk .i {
    color: #0077ff;
}

.share__btn--max .i {
    color: #5c45f5;
}

.share__btn span {
    line-height: 1.1;
    text-align: center;
}

/* --- consent checkboxes (152-ФЗ: separate, never pre-ticked) --- */
.consents {
    display: grid;
    gap: 0.5rem;
    margin: 0.75rem 0;
}

.consents .check {
    align-items: flex-start;
}

/* --- legal pages: requisites and tables --- */
.prose table {
    width: 100%;
    border-collapse: collapse;
    font-size: 0.95em;
    margin: 0.75rem 0;
}

.prose th,
.prose td {
    border: 1px solid var(--line, rgba(127, 127, 127, 0.35));
    padding: 0.4em 0.6em;
    vertical-align: top;
    text-align: left;
}

.table-scroll {
    overflow-x: auto;
}

.requisites {
    font-size: 0.95em;
}

.pd-request-form .field {
    margin-bottom: 0.75rem;
}

/* --- cookie / install banners --- */
.cookie-banner,
.install-banner {
    position: fixed;
    left: 0;
    right: 0;
    bottom: 0;
    z-index: 60;
    margin: 0 auto;
    max-width: var(--col);
    padding: 1rem 1rem calc(1rem + var(--safe-b));
    background: var(--surface);
    border: 2px solid var(--line-strong);
    border-bottom: 0;
    border-radius: 20px 20px 0 0;
    box-shadow: 0 -10px 30px -12px rgba(0, 0, 0, 0.35);
    animation: rise 0.3s ease-out both;
}

.install-banner {
    z-index: 50;
    bottom: 0;
}

.has-banner .install-banner {
    display: none;
}

.cookie-banner h2,
.install-banner h2 {
    font-size: 1.1rem;
    margin-bottom: 0.3rem;
}

.cookie-banner p,
.install-banner p {
    font-size: 0.95rem;
    margin-bottom: 0.75rem;
    color: var(--ink-2);
}

.cookie-banner__actions,
.install-banner__actions {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 0.6rem;
}

.cookie-banner__options {
    margin: 0 0 0.75rem;
    padding: 0.25rem 0.75rem;
    border: 1px solid var(--line);
    border-radius: 12px;
    background: var(--surface-2);
}

.cookie-banner__options summary {
    min-height: var(--tap);
    display: flex;
    align-items: center;
    font-weight: 700;
    cursor: pointer;
}

/* --- toasts --- */
.toasts {
    position: fixed;
    left: 0;
    right: 0;
    top: calc(64px + var(--safe-t));
    z-index: 90;
    display: grid;
    justify-items: center;
    gap: 0.5rem;
    padding: 0 1rem;
    pointer-events: none;
}

.toast {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    max-width: min(100%, 460px);
    padding: 0.7rem 0.5rem 0.7rem 1rem;
    border: 2px solid var(--line-strong);
    border-radius: 14px;
    background: var(--navy);
    color: var(--paper);
    font-weight: 600;
    box-shadow: 4px 5px 0 var(--gold);
    pointer-events: auto;
    animation: toast-in 0.25s ease-out both;
}

.toast--success {
    border-color: var(--ok);
}

.toast--error {
    background: var(--crimson);
    border-color: var(--paper);
    color: #fff;
    box-shadow: 4px 5px 0 var(--navy);
}

.toast--out {
    opacity: 0;
    transform: translateY(-8px);
    transition: opacity 0.25s, transform 0.25s;
}

.toast__close {
    min-width: 36px;
    min-height: 36px;
    border: 0;
    border-radius: 8px;
    background: transparent;
    color: inherit;
    font-size: 1.4rem;
    line-height: 1;
    cursor: pointer;
}

/* --- bottom sheet (<dialog>): paywall, sign-in --- */
dialog.sheet {
    width: 100%;
    max-width: var(--col);
    max-height: 92dvh;
    margin: auto auto 0;
    padding: 0;
    border: 0;
    background: transparent;
    color: var(--ink);
    overflow: visible;
}

dialog.sheet::backdrop,
dialog.dialog::backdrop {
    background: var(--overlay);
    backdrop-filter: blur(2px);
}

dialog.sheet[open] {
    animation: sheet-up 0.28s cubic-bezier(0.2, 0.9, 0.3, 1) both;
}

dialog.sheet[open]::backdrop {
    animation: fade-in 0.2s ease-out both;
}

.sheet__panel {
    position: relative;
    max-height: 92dvh;
    overflow-y: auto;
    overscroll-behavior: contain;
    padding: 0.5rem 1.1rem calc(1.2rem + var(--safe-b));
    background: var(--surface);
    border: 2px solid var(--line-strong);
    border-bottom: 0;
    border-radius: 24px 24px 0 0;
}

.sheet__grab {
    width: 44px;
    height: 5px;
    margin: 0.2rem auto 0.6rem;
    border-radius: 999px;
    background: var(--line);
}

.sheet__close {
    position: absolute;
    top: 0.6rem;
    right: 0.6rem;
    min-width: var(--tap);
    min-height: var(--tap);
    display: grid;
    place-items: center;
    border: 0;
    border-radius: 12px;
    background: transparent;
    cursor: pointer;
}

.sheet__close:hover {
    background: var(--bg-deep);
}

.sheet__loading {
    padding: 2.5rem 0;
    text-align: center;
    color: var(--ink-3);
}

.sheet__loading::before {
    content: "";
    display: block;
    width: 28px;
    height: 28px;
    margin: 0 auto 0.75rem;
    border: 3px solid var(--line);
    border-top-color: var(--gold);
    border-radius: 50%;
    animation: spin 0.8s linear infinite;
}

/* paywall fragment */
.paywall h2 {
    padding-right: 3rem;
    margin-bottom: 0.25rem;
}

.paywall__why {
    margin: 0 0 0.9rem;
    color: var(--ink-2);
}

.paywall__top {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 0.75rem;
    margin-bottom: 0.9rem;
}

.currency-switch {
    display: inline-flex;
    border: 2px solid var(--line);
    border-radius: 999px;
    overflow: hidden;
}

.currency-switch button {
    min-width: 52px;
    min-height: 36px;
    border: 0;
    background: transparent;
    font-weight: 800;
    font-size: 0.85rem;
    cursor: pointer;
}

.currency-switch button[aria-pressed="true"] {
    background: var(--navy);
    color: var(--paper);
}

:root[data-theme="dark"] .currency-switch button[aria-pressed="true"] {
    background: var(--gold);
    color: var(--navy);
}

.packs {
    display: grid;
    gap: 0.7rem;
    margin: 0 0 1rem;
}

.pack {
    position: relative;
    display: grid;
    grid-template-columns: 1fr auto;
    align-items: center;
    gap: 0.5rem 1rem;
    padding: 0.85rem 0.9rem;
    border: 2px solid var(--line);
    border-radius: 16px;
    background: var(--surface);
}

.pack--best {
    border-color: var(--line-strong);
    background: var(--surface-2);
    box-shadow: 4px 5px 0 var(--gold);
}

.pack__badge {
    position: absolute;
    top: -0.75rem;
    left: 0.9rem;
    padding: 0.05rem 0.65rem;
    border: 2px solid var(--navy);
    border-radius: 999px;
    background: var(--gold);
    color: var(--navy);
    font-size: 0.78rem;
    font-weight: 800;
    letter-spacing: 0.06em;
    text-transform: uppercase;
}

.pack__tokens {
    font-family: var(--font-display);
    font-weight: 800;
    font-size: 1.5rem;
    line-height: 1.1;
}

.pack__tokens small {
    font-family: var(--font-body);
    font-weight: 600;
    font-size: 0.9rem;
    color: var(--ink-3);
}

.pack__meta {
    display: block;
    font-size: 0.86rem;
    color: var(--ink-3);
}

.pack__plus {
    color: var(--ok);
    font-weight: 800;
}

.price-eur {
    display: none;
}

[data-currency="EUR"] .price-usd {
    display: none;
}

[data-currency="EUR"] .price-eur {
    display: inline;
}

.vip-card {
    margin: 0 0 1rem;
    padding: 1rem;
    border: 2px solid var(--line-strong);
    border-radius: 18px;
    background: linear-gradient(160deg, var(--navy), #1d2e55);
    color: var(--paper);
}

.vip-card h3 {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    color: var(--gold);
}

.vip-card ul {
    margin: 0 0 1rem;
    padding: 0;
    list-style: none;
    display: grid;
    gap: 0.35rem;
}

.vip-card li {
    display: flex;
    gap: 0.5rem;
    align-items: flex-start;
    font-size: 0.97rem;
}

.vip-card li .i {
    color: var(--gold);
    margin-top: 0.12rem;
}

.vip-card__plans {
    display: grid;
    gap: 0.6rem;
}

.vip-card .btn {
    justify-content: space-between;
    text-align: left;
}

.vip-card .btn small {
    display: block;
    font-weight: 600;
    opacity: 0.8;
}

.vip-card__terms {
    margin: 0.75rem 0 0;
    font-size: 0.85rem;
    opacity: 0.85;
}

.consent {
    margin: 0 0 0.9rem;
    padding: 0.5rem 0.75rem;
    border: 2px solid var(--line);
    border-radius: 14px;
    background: var(--surface-2);
}

.consent .field__error {
    margin: 0 0 0.4rem 2.1rem;
}

.legal-micro {
    margin: 0.5rem 0 0;
    font-size: 0.82rem;
    color: var(--ink-3);
}

/* --- report dialog (centered <dialog>) --- */
dialog.dialog {
    width: min(92vw, 440px);
    padding: 1.1rem;
    border: 2px solid var(--line-strong);
    border-radius: 20px;
    background: var(--surface);
    color: var(--ink);
    box-shadow: 6px 8px 0 var(--gold);
}

dialog.dialog h3 {
    margin-bottom: 0.6rem;
}

.radio-list {
    display: grid;
    gap: 0.15rem;
    margin: 0 0 0.8rem;
    padding: 0;
    border: 0;
}

.radio-row {
    display: flex;
    align-items: center;
    gap: 0.7rem;
    min-height: var(--tap);
    cursor: pointer;
}

.radio-row input {
    width: 1.3rem;
    height: 1.3rem;
    accent-color: var(--navy);
    flex: none;
}

:root[data-theme="dark"] .radio-row input {
    accent-color: var(--gold);
}

/* ============================================================ 8. pages */

/* --- landing --- */
.hero {
    position: relative;
    padding: 1.5rem 0 1rem;
}

.hero__kicker {
    display: inline-flex;
    align-items: center;
    gap: 0.4rem;
    margin-bottom: 1rem;
    padding: 0.25rem 0.8rem;
    border: 2px solid var(--line-strong);
    border-radius: 999px;
    background: var(--gold);
    color: var(--navy);
    font-size: 0.85rem;
    font-weight: 800;
    letter-spacing: 0.04em;
    text-transform: uppercase;
}

.hero h1 {
    margin-bottom: 0.5rem;
}

.hero h1 em {
    font-style: normal;
    background: linear-gradient(transparent 62%, color-mix(in srgb, var(--gold) 75%, transparent) 62%);
}

.hero__form {
    margin-top: 1.25rem;
    padding: 1rem;
    border: 2px solid var(--line-strong);
    border-radius: var(--radius-lg);
    background: var(--surface);
    box-shadow: 6px 7px 0 var(--line-strong);
}

.hero__form .textarea {
    min-height: 7.5rem;
}

.hero__examples {
    margin: 0.9rem 0 1rem;
}

.hero__examples .eyebrow {
    margin-bottom: 0.4rem;
}

.hero__alt {
    margin: 0.9rem 0 0;
    text-align: center;
    font-size: 0.95rem;
}

.trust {
    display: flex;
    flex-wrap: wrap;
    gap: 0.4rem 1rem;
    margin: 1.1rem 0 0;
    padding: 0;
    list-style: none;
    font-size: 0.92rem;
    font-weight: 600;
    color: var(--ink-2);
}

.trust li {
    display: inline-flex;
    align-items: center;
    gap: 0.35rem;
}

.trust .i {
    color: var(--ok);
}

.section {
    padding: 2.25rem 0 0.5rem;
}

.section > h2 {
    margin-bottom: 1rem;
}

.steps {
    display: grid;
    gap: 0.9rem;
    margin: 0;
    padding: 0;
    list-style: none;
    counter-reset: step;
}

.step {
    position: relative;
    padding: 1rem 1rem 1rem 4.2rem;
    border: 2px solid var(--line);
    border-radius: 16px;
    background: var(--surface);
    counter-increment: step;
}

.step::before {
    content: counter(step);
    position: absolute;
    left: 0.9rem;
    top: 0.85rem;
    width: 2.4rem;
    height: 2.4rem;
    display: grid;
    place-items: center;
    border: 2px solid var(--line-strong);
    border-radius: 50%;
    background: var(--gold);
    color: var(--navy);
    font-family: var(--font-display);
    font-weight: 900;
    font-size: 1.2rem;
}

.step h3 {
    margin-bottom: 0.2rem;
}

.step p {
    margin: 0;
    color: var(--ink-2);
}

.modes {
    display: grid;
    gap: 0.9rem;
}

.mode {
    padding: 1.1rem;
    border: 2px solid var(--line-strong);
    border-radius: 18px;
    background: var(--surface);
}

.mode--duel {
    background: var(--navy);
    color: var(--paper);
    box-shadow: 5px 6px 0 var(--gold);
}

.mode--duel p {
    color: color-mix(in srgb, var(--paper) 82%, transparent);
}

.mode--duel .btn {
    --btn-bg: var(--gold);
    --btn-ink: var(--navy);
    border-color: var(--paper);
    box-shadow: 0 3px 0 var(--paper);
}

.mode__tag {
    display: inline-block;
    margin-bottom: 0.4rem;
    font-size: 0.8rem;
    font-weight: 800;
    letter-spacing: 0.1em;
    text-transform: uppercase;
    color: var(--ink-3);
}

.mode--duel .mode__tag {
    color: var(--gold);
}

.judges-grid {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 0.7rem;
    margin: 0;
    padding: 0;
    list-style: none;
}

.judges-grid li {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 0.25rem;
    padding: 0.9rem 0.6rem;
    border: 2px solid var(--line);
    border-radius: 16px;
    background: var(--surface);
    text-align: center;
}

.judges-grid strong {
    font-family: var(--font-display);
}

.judges-grid span {
    font-size: 0.85rem;
    color: var(--ink-3);
    line-height: 1.3;
}

.samples {
    display: grid;
    gap: 1rem;
}

.sample {
    position: relative;
    padding: 1.1rem 1rem 1rem;
    border: 2px solid var(--line-strong);
    border-radius: 18px;
    background: var(--surface);
    box-shadow: 4px 5px 0 var(--line-strong);
}

.sample__tag {
    position: absolute;
    top: -0.8rem;
    right: 1rem;
    padding: 0.05rem 0.7rem;
    border: 2px solid var(--line-strong);
    border-radius: 999px;
    background: var(--bg);
    font-size: 0.74rem;
    font-weight: 800;
    letter-spacing: 0.08em;
    text-transform: uppercase;
}

.sample h3 {
    margin: 0.2rem 0 0.4rem;
}

.sample p {
    margin: 0 0 0.5rem;
    color: var(--ink-2);
    font-size: 0.98rem;
}

.faq {
    display: grid;
    gap: 0.5rem;
}

.faq details {
    border: 2px solid var(--line);
    border-radius: 14px;
    background: var(--surface);
}

.faq details[open] {
    border-color: var(--line-strong);
}

.faq summary {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 1rem;
    min-height: 52px;
    padding: 0.5rem 1rem;
    font-weight: 700;
    cursor: pointer;
    list-style: none;
}

.faq summary::-webkit-details-marker {
    display: none;
}

.faq summary::after {
    content: "+";
    flex: none;
    width: 1.6rem;
    height: 1.6rem;
    display: grid;
    place-items: center;
    border-radius: 50%;
    background: var(--gold);
    color: var(--navy);
    font-weight: 900;
}

.faq details[open] summary::after {
    content: "−";
}

.faq details > div {
    padding: 0 1rem 0.9rem;
    color: var(--ink-2);
}

.faq details > div p:last-child {
    margin-bottom: 0;
}

.cta-band {
    margin: 2.25rem 0 0;
    padding: 1.4rem 1.1rem;
    border: 2px solid var(--line-strong);
    border-radius: var(--radius-lg);
    background: var(--navy);
    color: var(--paper);
    text-align: center;
    box-shadow: 6px 7px 0 var(--gold);
}

.cta-band h2 {
    color: var(--paper);
}

.cta-band .btn {
    border-color: var(--paper);
    box-shadow: 0 3px 0 var(--paper);
}

/* --- case form --- */
.page-title {
    margin-bottom: 0.75rem;
}

.page-title + .page-sub {
    margin-top: -0.4rem;
}

.page-sub {
    margin-bottom: 1.25rem;
    color: var(--ink-2);
}

.case-form fieldset {
    margin: 0 0 1.1rem;
    padding: 0;
    border: 0;
    min-width: 0;
}

.case-form legend {
    padding: 0;
    margin-bottom: 0.4rem;
    font-weight: 700;
}

.case-form .seg {
    margin-bottom: 1.1rem;
}

.case-form.is-busy {
    opacity: 0.85;
}

.form-summary {
    margin-bottom: 1rem;
}

.judge-hint {
    margin: -0.3rem 0 1.1rem;
    font-size: 0.92rem;
    font-weight: 600;
    color: var(--ink-2);
}

.submit-bar {
    position: sticky;
    bottom: 0;
    z-index: 5;
    margin: 1.5rem -1rem 0;
    padding: 0.75rem 1rem calc(0.75rem + var(--safe-b));
    background: linear-gradient(to bottom, transparent, var(--bg) 28%);
}

/* --- hearing --- */
.hearing {
    text-align: center;
    padding-top: 1rem;
}

.bench {
    position: relative;
    margin: 0 auto 1.25rem;
    padding: 1rem 1rem 1.25rem;
    max-width: 380px;
    border: 3px solid var(--line-strong);
    border-radius: 24px;
    background: var(--navy);
    color: var(--paper);
    box-shadow: 6px 7px 0 var(--gold);
}

.gavel {
    width: min(78%, 280px);
    margin: 0 auto;
    overflow: visible;
}

.gavel__arm {
    transform-box: view-box;
    transform-origin: 150px 165px;
    transform: rotate(-40deg);
    animation: gavel-strike 2.4s ease-in-out infinite;
}

.gavel__block {
    transform-box: fill-box;
    transform-origin: 50% 100%;
    animation: block-thump 2.4s ease-in-out infinite;
}

.gavel__shock {
    transform-box: fill-box;
    transform-origin: 50% 100%;
    opacity: 0;
    animation: shock 2.4s ease-out infinite;
}

.hearing__judge {
    display: flex;
    justify-content: center;
    margin-bottom: 0.4rem;
}

.hearing__status {
    min-height: 2.6em;
    margin: 0.5rem 0 0;
    font-family: var(--font-display);
    font-weight: 700;
    font-size: 1.25rem;
    transition: opacity 0.18s;
}

.hearing__status.is-swapping {
    opacity: 0;
}

.dots::after {
    content: "";
    display: inline-block;
    width: 1.2em;
    text-align: left;
    animation: dots 1.4s steps(4, end) infinite;
}

.hearing__delay {
    margin-top: 1.25rem;
    text-align: left;
}

.progress-line {
    position: relative;
    height: 6px;
    margin: 1rem auto 0;
    max-width: 260px;
    border-radius: 999px;
    background: color-mix(in srgb, var(--paper) 20%, transparent);
    overflow: hidden;
}

.progress-line::after {
    content: "";
    position: absolute;
    inset: 0 auto 0 0;
    width: 35%;
    border-radius: 999px;
    background: var(--gold);
    animation: sweep 1.6s ease-in-out infinite;
}

/* --- verdict (case show) --- */
.case-head {
    display: flex;
    align-items: flex-start;
    justify-content: space-between;
    gap: 0.75rem;
    margin-bottom: 0.25rem;
}

.case-head h1 {
    font-size: clamp(1.35rem, 5.2vw, 1.8rem);
    margin-bottom: 0.25rem;
}

.case-meta {
    display: flex;
    flex-wrap: wrap;
    gap: 0.4rem;
    margin-bottom: 0.5rem;
}

.verdict {
    position: relative;
}

.verdict__judge {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 0.75rem;
    margin-bottom: 0.6rem;
}

.verdict__headline {
    margin: 0.75rem 0 0.5rem;
    font-size: clamp(1.45rem, 6vw, 1.95rem);
    line-height: 1.15;
}

.verdict__reasoning {
    margin: 0;
    font-size: 1.08rem;
    color: var(--ink-2);
}

.verdict__stamp {
    position: absolute;
    right: 0.8rem;
    top: 1.1rem;
    z-index: 2;
    pointer-events: none;
}

.verdict--win {
    box-shadow: 5px 6px 0 var(--gold);
}

.verdict--lose {
    box-shadow: 5px 6px 0 var(--stamp);
}

.verdict--draw {
    box-shadow: 5px 6px 0 var(--ink-3);
}

.verdict__ai {
    margin: 1rem 0 0;
    display: flex;
    align-items: center;
    gap: 0.4rem;
    font-size: 0.82rem;
    color: var(--ink-3);
}

.ai-label {
    display: inline-flex;
    align-items: center;
    padding: 0 0.45rem;
    border: 1.5px solid var(--ink-3);
    border-radius: 6px;
    font-size: 0.72rem;
    font-weight: 800;
    letter-spacing: 0.06em;
    text-transform: uppercase;
    white-space: nowrap;
}

.actions {
    display: grid;
    gap: 0.7rem;
    margin-top: 1.25rem;
}

.actions__row {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 0.7rem;
}

.btn small.btn__sub {
    display: block;
    font-weight: 600;
    font-size: 0.78rem;
    opacity: 0.8;
}

.appeal-panel {
    margin: 0;
    padding: 1rem;
    border: 2px solid var(--line-strong);
    border-radius: 16px;
    background: var(--surface);
}

.appeal-panel fieldset {
    margin: 0 0 0.8rem;
    padding: 0;
    border: 0;
}

.appeal-panel legend {
    font-weight: 800;
    margin-bottom: 0.3rem;
}

.mini-judges {
    display: grid;
    gap: 0.1rem;
    margin: 0.3rem 0 0.6rem 0.4rem;
}

.history {
    margin-top: 1.25rem;
}

.history summary {
    min-height: var(--tap);
    display: flex;
    align-items: center;
    font-weight: 700;
    cursor: pointer;
}

.history ul {
    margin: 0;
    padding: 0;
    list-style: none;
    display: grid;
    gap: 0.5rem;
}

.history li {
    padding: 0.7rem 0.9rem;
    border: 1px solid var(--line);
    border-radius: 12px;
    background: var(--surface);
    font-size: 0.95rem;
}

.advice {
    margin-top: 1.5rem;
}

.advice ol {
    margin: 0.75rem 0 0;
    padding: 0;
    list-style: none;
    counter-reset: adv;
    display: grid;
    gap: 0.6rem;
}

.advice li {
    position: relative;
    padding: 0.7rem 0.9rem 0.7rem 3rem;
    border: 2px solid var(--line);
    border-radius: 14px;
    background: var(--surface);
    counter-increment: adv;
}

.advice li::before {
    content: counter(adv);
    position: absolute;
    left: 0.7rem;
    top: 0.65rem;
    width: 1.8rem;
    height: 1.8rem;
    display: grid;
    place-items: center;
    border-radius: 50%;
    background: var(--navy);
    color: var(--paper);
    font-family: var(--font-display);
    font-weight: 800;
}

:root[data-theme="dark"] .advice li::before {
    background: var(--gold);
    color: var(--navy);
}

.advice li strong {
    display: block;
}

.publish {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 0.75rem;
    margin-top: 1.25rem;
    padding: 0.7rem 0.9rem;
    border: 2px solid var(--line);
    border-radius: 14px;
    background: var(--surface);
}

.switch {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    min-height: var(--tap);
    cursor: pointer;
    font-weight: 700;
}

.switch input {
    position: absolute;
    opacity: 0;
}

.switch__track {
    flex: none;
    position: relative;
    width: 3rem;
    height: 1.7rem;
    border: 2px solid var(--line-strong);
    border-radius: 999px;
    background: var(--bg-deep);
    transition: background-color 0.15s;
}

.switch__track::after {
    content: "";
    position: absolute;
    left: 2px;
    top: 2px;
    width: 1.2rem;
    height: 1.2rem;
    border-radius: 50%;
    background: var(--line-strong);
    transition: transform 0.15s;
}

.switch input:checked + .switch__track {
    background: var(--gold);
}

.switch input:checked + .switch__track::after {
    transform: translateX(1.3rem);
    background: var(--navy);
}

.switch input:focus-visible + .switch__track {
    outline: 3px solid var(--focus);
    outline-offset: 2px;
}

.switch input:disabled + .switch__track {
    opacity: 0.5;
}

.links-row {
    display: flex;
    flex-wrap: wrap;
    gap: 0.25rem 1.2rem;
    margin-top: 1rem;
    font-size: 0.95rem;
}

.links-row a,
.links-row button,
.links-row .report > button {
    display: inline-flex;
    align-items: center;
    min-height: var(--tap);
    padding: 0;
    border: 0;
    background: none;
    color: var(--ink-2);
    text-decoration: underline;
    cursor: pointer;
    font-size: inherit;
}

.links-row .danger {
    color: var(--danger);
}

.waiting {
    display: grid;
    gap: 0.75rem;
}

.link-box {
    display: flex;
    gap: 0.5rem;
}

.link-box .input {
    min-width: 0;
    font-size: 0.95rem;
}

.status-pulse {
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
    font-weight: 800;
}

.status-pulse::before {
    content: "";
    width: 0.7rem;
    height: 0.7rem;
    border-radius: 50%;
    background: var(--gold);
    box-shadow: 0 0 0 0 color-mix(in srgb, var(--gold) 60%, transparent);
    animation: pulse 1.8s ease-out infinite;
}

/* --- summons (invite) --- */
.summons {
    position: relative;
    padding: 1.4rem 1.1rem 1.2rem;
    border: 3px double var(--line-strong);
    border-radius: 10px;
    background: var(--surface);
    box-shadow: 6px 7px 0 var(--line-strong);
}

.summons__head {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 0.75rem;
    margin-bottom: 0.9rem;
}

.summons__kicker {
    margin: 0;
    font-size: 0.8rem;
    font-weight: 800;
    letter-spacing: 0.14em;
    text-transform: uppercase;
    color: var(--ink-3);
}

.summons h1 {
    font-size: clamp(1.7rem, 7vw, 2.3rem);
}

.quote {
    margin: 0.75rem 0 1.1rem;
    padding: 0.8rem 1rem;
    border-left: 6px double var(--stamp);
    border-radius: 4px 12px 12px 4px;
    background: var(--surface-2);
    overflow-wrap: anywhere;
}

/* the dispute text keeps the author's line breaks; template whitespace around it does not leak in */
.quote__text {
    display: block;
    white-space: pre-line;
}

.quote cite {
    display: block;
    margin-bottom: 0.3rem;
    font-style: normal;
    font-size: 0.8rem;
    font-weight: 800;
    letter-spacing: 0.1em;
    text-transform: uppercase;
    color: var(--ink-3);
}

/* --- public SEO page --- */
.public-case h1 {
    font-size: clamp(1.6rem, 6.4vw, 2.3rem);
}

.public-sides {
    display: grid;
    gap: 0.8rem;
    margin: 1.25rem 0;
}

.public-sides .quote {
    margin: 0;
}

.public-sides .quote--b {
    border-left-color: var(--navy);
}

.similar {
    display: grid;
    gap: 0.6rem;
    margin: 0;
    padding: 0;
    list-style: none;
}

.similar a {
    display: grid;
    gap: 0.2rem;
    padding: 0.8rem 1rem;
    border: 2px solid var(--line);
    border-radius: 14px;
    background: var(--surface);
    text-decoration: none;
}

.similar a:hover {
    border-color: var(--line-strong);
}

.breadcrumbs {
    margin: 0 0 1rem;
    padding: 0;
    list-style: none;
    display: flex;
    flex-wrap: wrap;
    gap: 0.4rem;
    font-size: 0.9rem;
    color: var(--ink-3);
}

.breadcrumbs li + li::before {
    content: "/";
    margin-right: 0.4rem;
}

/* --- my cases --- */
.wallet-strip {
    display: grid;
    gap: 0.75rem;
    margin-bottom: 1.25rem;
    padding: 1rem;
    border: 2px solid var(--line-strong);
    border-radius: var(--radius-lg);
    background: var(--surface);
    box-shadow: 5px 6px 0 var(--gold);
}

.wallet-strip__row {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 0.75rem;
    flex-wrap: wrap;
}

.case-list {
    display: grid;
    gap: 0.75rem;
    margin: 0;
    padding: 0;
    list-style: none;
}

.case-row a {
    display: grid;
    gap: 0.5rem;
    padding: 0.9rem 1rem;
    border: 2px solid var(--line);
    border-radius: 16px;
    background: var(--surface);
    text-decoration: none;
    transition: border-color 0.12s, transform 0.12s;
}

.case-row a:hover {
    border-color: var(--line-strong);
    transform: translateY(-1px);
}

.case-row h3 {
    margin: 0;
    font-size: 1.1rem;
    overflow-wrap: anywhere;
}

.case-row__meta {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: 0.4rem;
    font-size: 0.88rem;
    color: var(--ink-3);
}

.pager {
    display: flex;
    justify-content: space-between;
    margin-top: 1.25rem;
}

.empty {
    padding: 2rem 1rem;
    text-align: center;
    border: 2px dashed var(--line);
    border-radius: var(--radius-lg);
    background: var(--surface);
}

.empty__art {
    width: 96px;
    margin: 0 auto 0.75rem;
    color: var(--gold);
}

/* --- profile --- */
.profile-section {
    margin-bottom: 1rem;
    padding: 1rem;
    border: 2px solid var(--line);
    border-radius: 18px;
    background: var(--surface);
}

.profile-section h2 {
    font-size: 1.2rem;
    margin-bottom: 0.6rem;
}

.kv {
    display: grid;
    grid-template-columns: auto 1fr;
    gap: 0.35rem 1rem;
    margin: 0;
}

.kv dt {
    color: var(--ink-3);
}

.kv dd {
    margin: 0;
    font-weight: 600;
    text-align: right;
    overflow-wrap: anywhere;
}

.table-list {
    display: grid;
    gap: 0;
    margin: 0;
    padding: 0;
    list-style: none;
}

.table-list li {
    display: flex;
    justify-content: space-between;
    align-items: baseline;
    gap: 0.75rem;
    padding: 0.55rem 0;
    border-top: 1px solid var(--line);
    font-size: 0.95rem;
}

.table-list li:first-child {
    border-top: 0;
}

.danger-zone {
    border-color: color-mix(in srgb, var(--danger) 55%, var(--line));
}

/* --- billing success --- */
.billing-state {
    text-align: center;
    padding: 1rem 0;
}

.billing-state .stamp {
    margin: 0.5rem 0 1rem;
}

.balance-big {
    margin: 0.5rem 0 1rem;
    font-family: var(--font-display);
    font-weight: 900;
    font-size: clamp(3.5rem, 20vw, 5rem);
    line-height: 1;
}

/* --- login sheet --- */
.login h2 {
    padding-right: 3rem;
}

.login__why {
    color: var(--ink-2);
    margin-bottom: 1rem;
}

.login__methods {
    display: grid;
    gap: 0.6rem;
    margin: 0.75rem 0;
}

.btn--provider {
    justify-content: flex-start;
    gap: 0.75rem;
    padding-left: 1rem;
}

.btn--provider .i {
    width: 1.4rem;
    height: 1.4rem;
}

.btn--vk .i {
    color: #0077ff;
}

.btn--yandex .i {
    color: #fc3f1d;
}

.btn--mailru .i {
    color: #005ff9;
}

.login__or {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    margin: 0.75rem 0;
    color: var(--ink-3);
    font-size: 0.85rem;
}

.login__or::before,
.login__or::after {
    content: "";
    flex: 1;
    border-top: 1px solid var(--line);
}

.login__step {
    display: grid;
    gap: 0.6rem;
}

.dev-box {
    margin-top: 1rem;
    padding: 0.75rem;
    border: 2px dashed var(--warn-line);
    border-radius: 12px;
    background: var(--warn-bg);
    font-size: 0.9rem;
}

/* --- calm support screen: no motion, no jokes --- */
.calm {
    --calm-bg: color-mix(in srgb, var(--bg) 70%, var(--surface));
}

.calm .folder {
    box-shadow: none;
    border-color: var(--line);
}

.calm .folder__tab {
    background: var(--bg-deep);
    color: var(--ink-2);
    border-color: var(--line);
}

.calm *,
.calm *::before,
.calm *::after {
    animation: none !important;
    transition: none !important;
}

.help-list {
    display: grid;
    gap: 0.6rem;
    margin: 1rem 0;
    padding: 0;
    list-style: none;
}

.help-list li {
    padding: 0.8rem 1rem;
    border: 2px solid var(--line);
    border-radius: 14px;
    background: var(--surface);
}

.help-list strong {
    display: block;
}

.help-list a {
    font-weight: 700;
}

.help-list .help-phone {
    font-family: var(--font-display);
    font-size: 1.3rem;
    font-weight: 800;
    text-decoration: none;
}

/* --- legal / prose --- */
.prose {
    font-size: 1.02rem;
}

.prose h2 {
    margin-top: 1.75rem;
    font-size: 1.3rem;
}

.prose h3 {
    margin-top: 1.25rem;
    font-size: 1.1rem;
}

.prose ul {
    padding-left: 1.2rem;
}

.prose li {
    margin-bottom: 0.3rem;
}

.prose table {
    width: 100%;
    border-collapse: collapse;
    margin: 0 0 1rem;
    font-size: 0.95rem;
}

.prose th,
.prose td {
    padding: 0.5rem 0.6rem;
    border: 1px solid var(--line);
    text-align: left;
    vertical-align: top;
}

.prose th {
    background: var(--surface-2);
}

.legal-meta {
    margin: 0 0 1.25rem;
    font-size: 0.88rem;
    color: var(--ink-3);
}

/* --- offline / 404 --- */
.center-state {
    padding: 3rem 0;
    text-align: center;
}

.center-state .stamp {
    margin-bottom: 1.25rem;
}

.center-state__art {
    width: 120px;
    margin: 0 auto 1rem;
    color: var(--gold);
}

/* ============================================================ 9. animations */
@keyframes bar-fill {
    from {
        width: 0;
    }
}

@keyframes stamp-slam {
    0% {
        opacity: 0;
        transform: rotate(-7deg) scale(2.6);
    }
    55% {
        opacity: 1;
        transform: rotate(-7deg) scale(0.93);
    }
    75% {
        transform: rotate(-7deg) scale(1.05);
    }
    100% {
        opacity: 0.94;
        transform: rotate(-7deg) scale(1);
    }
}

@keyframes gavel-strike {
    0% {
        transform: rotate(-40deg);
    }
    45% {
        transform: rotate(-16deg);
    }
    58% {
        transform: rotate(-80deg);
    }
    64% {
        transform: rotate(-69deg);
    }
    70% {
        transform: rotate(-80deg);
    }
    82% {
        transform: rotate(-52deg);
    }
    100% {
        transform: rotate(-40deg);
    }
}

@keyframes block-thump {
    0%,
    57%,
    100% {
        transform: scale(1, 1);
    }
    59% {
        transform: scale(1.04, 0.86);
    }
    66% {
        transform: scale(1, 1);
    }
}

@keyframes shock {
    0%,
    57% {
        opacity: 0;
        transform: scale(0.6);
    }
    59% {
        opacity: 0.9;
        transform: scale(0.8);
    }
    80% {
        opacity: 0;
        transform: scale(1.4);
    }
    100% {
        opacity: 0;
    }
}

@keyframes dots {
    0% {
        content: "";
    }
    25% {
        content: ".";
    }
    50% {
        content: "..";
    }
    75%,
    100% {
        content: "...";
    }
}

@keyframes sweep {
    0% {
        transform: translateX(-100%);
    }
    100% {
        transform: translateX(300%);
    }
}

@keyframes pulse {
    0% {
        box-shadow: 0 0 0 0 color-mix(in srgb, var(--gold) 70%, transparent);
    }
    100% {
        box-shadow: 0 0 0 12px transparent;
    }
}

@keyframes nudge {
    0%,
    100% {
        transform: none;
    }
    10%,
    30% {
        transform: translateX(-3px) rotate(-0.6deg);
    }
    20%,
    40% {
        transform: translateX(3px) rotate(0.6deg);
    }
    50% {
        transform: none;
    }
}

@keyframes rise {
    from {
        transform: translateY(100%);
    }
}

@keyframes sheet-up {
    from {
        transform: translateY(100%);
    }
}

@keyframes fade-in {
    from {
        opacity: 0;
    }
}

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

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

/* ============================================================ 10. utilities + larger screens */
.sr-only {
    position: absolute;
    width: 1px;
    height: 1px;
    margin: -1px;
    padding: 0;
    overflow: hidden;
    clip: rect(0, 0, 0, 0);
    white-space: nowrap;
    border: 0;
}

.stack > * + * {
    margin-top: 1rem;
}

.mt-0 {
    margin-top: 0 !important;
}

.mt-1 {
    margin-top: 1rem;
}

.mt-2 {
    margin-top: 1.75rem;
}

.mb-1 {
    margin-bottom: 1rem;
}

.center {
    text-align: center;
}

.nowrap {
    white-space: nowrap;
}

@media (min-width: 640px) {
    body {
        font-size: 1.125rem;
    }

    .shell {
        padding-top: 2rem;
    }

    .judges-grid {
        grid-template-columns: repeat(3, 1fr);
    }

    .judge-card {
        flex-basis: 9rem;
    }

    .judges {
        margin: 0;
        padding-left: 0.25rem;
        padding-right: 0.25rem;
    }

    .submit-bar {
        position: static;
        margin: 1.5rem 0 0;
        padding: 0;
        background: none;
    }

    .cookie-banner,
    .install-banner {
        bottom: 1rem;
        border-bottom: 2px solid var(--line-strong);
        border-radius: 20px;
    }

    dialog.sheet {
        margin: auto;
    }

    .sheet__panel {
        border-bottom: 2px solid var(--line-strong);
        border-radius: 24px;
        padding-bottom: 1.4rem;
    }
}

@media (min-width: 900px) {
    /* landing on desktop: two columns for hero, wider grids below */
    .landing .hero {
        display: grid;
        grid-template-columns: 1.05fr 1fr;
        align-items: start;
        gap: 2.5rem;
        padding-top: 3rem;
    }

    .landing .hero h1 {
        font-size: 3.4rem;
    }

    .landing .hero__form {
        margin-top: 0;
    }

    .landing .steps {
        grid-template-columns: repeat(3, 1fr);
    }

    .landing .step {
        padding: 4.3rem 1rem 1rem;
    }

    .landing .step::before {
        left: 1rem;
        top: 1rem;
    }

    .landing .modes {
        grid-template-columns: 1fr 1fr;
    }

    .landing .judges-grid {
        grid-template-columns: repeat(6, 1fr);
    }

    .landing .samples {
        grid-template-columns: repeat(3, 1fr);
    }

    .landing .faq {
        max-width: 760px;
    }
}

@media (max-width: 380px) {
    .brand__name {
        font-size: 1.05rem;
    }

    .header-link--secondary {
        display: none;
    }

    .actions__row,
    .cookie-banner__actions,
    .install-banner__actions {
        grid-template-columns: 1fr;
    }

    .share__row {
        grid-template-columns: repeat(2, 1fr);
    }
}

@media print {
    .site-header,
    .site-footer,
    .cookie-banner,
    .install-banner,
    .actions,
    .toasts {
        display: none !important;
    }
}

@media (prefers-contrast: more) {
    :root {
        --line: #5b6580;
    }

    .btn,
    .card {
        border-width: 3px;
    }
}

/* ============================================================ ad landings /l/sud /l/shkala /l/chat */
.lp {
    display: grid;
    gap: 0.85rem;
    padding-top: 0.4rem;
}

.lp__stage {
    position: relative;
    height: 232px;
    overflow: hidden;
    border: 2px solid var(--navy);
    border-radius: 22px;
    background:
        radial-gradient(rgba(20, 33, 61, 0.05) 1px, transparent 1px),
        linear-gradient(180deg, #efe6d2 0%, #f7f3ea 70%);
    background-size: 8px 8px, auto;
    box-shadow: var(--shadow);
    color: var(--navy);
}

.lp__kicker {
    display: flex;
    align-items: center;
    gap: 0.4rem;
    margin: 0;
    color: var(--ink-2);
    font-size: 0.82rem;
    font-weight: 800;
    letter-spacing: 0.08em;
    text-transform: uppercase;
}

.lp h1 {
    margin: 0;
    font-family: var(--font-display);
    font-size: clamp(1.7rem, 7vw, 2.35rem);
    line-height: 1.12;
}

.lp__sub {
    margin: 0;
    color: var(--ink-2);
    font-size: 1.05rem;
}

.lp__form {
    display: grid;
    gap: 0.65rem;
}

.lp__chips {
    display: flex;
    flex-wrap: wrap;
    gap: 0.4rem;
    margin: 0;
    padding: 0;
    list-style: none;
}

.lp__chips a {
    display: inline-flex;
    align-items: center;
    min-height: 36px;
    padding: 0.25rem 0.7rem;
    border: 1.5px solid var(--line-strong);
    border-radius: 999px;
    background: var(--surface);
    color: inherit;
    font-weight: 700;
    text-decoration: none;
}

.lp__chips a:hover {
    background: var(--gold);
}

.lp__fine {
    margin: 0;
    color: var(--ink-3);
    font-size: 0.82rem;
    text-align: center;
}

/* gavel */
.lp-bench {
    position: absolute;
    inset: 0;
}

.lp-gavel {
    position: absolute;
    top: 28px;
    left: 50%;
    width: 120px;
    height: 86px;
    margin-left: -78px;
    transform-origin: 92px 70px;
    animation: lp-hit 2.6s cubic-bezier(0.2, 0.7, 0.2, 1) infinite;
}

.lp-gavel__head {
    position: absolute;
    top: 8px;
    left: 18px;
    width: 74px;
    height: 28px;
    border-radius: 8px;
    background:
        linear-gradient(90deg, transparent 30%, rgba(20, 33, 61, 0.28) 30% 36%, transparent 36% 62%, rgba(20, 33, 61, 0.28) 62% 68%, transparent 68%),
        var(--navy);
    transform: rotate(-28deg);
}

.lp-gavel__handle {
    position: absolute;
    top: 28px;
    left: 78px;
    width: 10px;
    height: 58px;
    border-radius: 5px;
    background: var(--navy);
    transform: rotate(-28deg);
    transform-origin: top center;
}

.lp-block {
    position: absolute;
    left: 50%;
    bottom: 42px;
    width: 92px;
    height: 16px;
    margin-left: -8px;
    border-radius: 4px;
    background: var(--navy);
}

.lp-dust {
    position: absolute;
    left: 50%;
    bottom: 52px;
    width: 10px;
    height: 10px;
    margin-left: 70px;
    border-radius: 50%;
    background: var(--gold);
    opacity: 0;
    animation: lp-dust 2.6s ease-out infinite;
}

.lp-stamp {
    position: absolute;
    right: 18px;
    bottom: 28px;
    padding: 0.15rem 0.45rem;
    border: 3px solid var(--crimson);
    border-radius: 6px;
    color: var(--crimson);
    font-family: var(--font-display);
    font-size: 1.7rem;
    font-weight: 800;
    letter-spacing: 0.08em;
    line-height: 1;
    opacity: 0;
    transform: scale(1.35) rotate(-14deg);
    animation: lp-stamp 2.6s ease-in-out infinite;
}

@keyframes lp-hit {
    0%, 16% { transform: rotate(-34deg); }
    30% { transform: rotate(34deg); }
    38% { transform: rotate(22deg); }
    46%, 100% { transform: rotate(28deg); }
}

@keyframes lp-dust {
    0%, 28% { opacity: 0; transform: scale(0.4); }
    36% { opacity: 1; }
    55%, 100% { opacity: 0; transform: translate(16px, -22px) scale(1.4); }
}

@keyframes lp-stamp {
    0%, 34% { opacity: 0; transform: scale(1.4) rotate(-16deg); }
    46%, 88% { opacity: 1; transform: scale(1) rotate(-8deg); }
    100% { opacity: 0; transform: scale(0.96) rotate(-8deg); }
}

/* percent scale */
.lp-scale {
    position: absolute;
    inset: 28px 22px auto;
}

.lp-scale__who,
.lp-scale__track {
    display: flex;
}

.lp-scale__who {
    justify-content: space-between;
    margin-bottom: 0.45rem;
    font-weight: 800;
}

.lp-scale__track {
    height: 28px;
    overflow: hidden;
    border-radius: 999px;
    background: var(--navy);
}

.lp-scale__fill {
    display: block;
    width: 50%;
    height: 100%;
    border-radius: inherit 0 0 inherit;
    background: var(--gold);
    animation: lp-fill 3s ease-in-out infinite;
}

.lp-scale__num {
    margin: 0.7rem 0 0;
    font-family: var(--font-display);
    font-size: 3.2rem;
    font-weight: 700;
    line-height: 1;
    animation: lp-num 3s ease-in-out infinite;
}

.lp-scale__case {
    margin: 0.2rem 0 0;
    color: #444f69;
    font-weight: 700;
}

@keyframes lp-fill {
    0%, 12% { width: 50%; }
    58%, 100% { width: 73%; }
}

@keyframes lp-num {
    0%, 12% { opacity: 0.35; }
    40%, 100% { opacity: 1; }
}

/* chat */
.lp-phone {
    position: absolute;
    top: 16px;
    left: 50%;
    display: grid;
    align-content: end;
    gap: 0.4rem;
    width: min(280px, 86%);
    height: 200px;
    padding: 0.7rem 0.7rem 0.55rem;
    border: 3px solid var(--navy);
    border-radius: 26px;
    background: #fff;
    transform: translateX(-50%);
}

.lp-b {
    max-width: 86%;
    margin: 0;
    padding: 0.35rem 0.6rem;
    border-radius: 14px 14px 14px 4px;
    background: #efe6d2;
    font-size: 0.92rem;
    font-weight: 700;
    opacity: 0;
    animation: lp-b1 4.8s ease infinite;
}

.lp-b--them {
    justify-self: end;
    border-radius: 14px 14px 4px 14px;
    background: #14213d;
    color: #f7f3ea;
}

.lp-b--judge {
    max-width: 100%;
    justify-self: center;
    border-radius: 999px;
    background: var(--gold);
    color: var(--navy);
}

.lp-b--2 { animation-name: lp-b2; }
.lp-b--3 { animation-name: lp-b3; }
.lp-b--4 { animation-name: lp-b4; }

@keyframes lp-b1 {
    0%, 4% { opacity: 0; transform: translateY(8px); }
    12%, 82% { opacity: 1; transform: none; }
    94%, 100% { opacity: 0; transform: none; }
}

@keyframes lp-b2 {
    0%, 16% { opacity: 0; transform: translateY(8px); }
    26%, 82% { opacity: 1; transform: none; }
    94%, 100% { opacity: 0; transform: none; }
}

@keyframes lp-b3 {
    0%, 30% { opacity: 0; transform: translateY(8px); }
    40%, 82% { opacity: 1; transform: none; }
    94%, 100% { opacity: 0; transform: none; }
}

@keyframes lp-b4 {
    0%, 46% { opacity: 0; transform: translateY(8px); }
    56%, 82% { opacity: 1; transform: none; }
    94%, 100% { opacity: 0; transform: none; }
}

/* reduced motion: a static gavel, bar and stamp - the verdict is still readable on a screenshot */
@media (prefers-reduced-motion: reduce) {
    html {
        scroll-behavior: auto;
    }

    *,
    *::before,
    *::after {
        animation-duration: 0.001ms !important;
        animation-iteration-count: 1 !important;
        animation-delay: 0ms !important;
        transition-duration: 0.001ms !important;
    }

    .gavel__arm {
        transform: rotate(-30deg);
    }

    .stamp--slam,
    .lp-stamp {
        opacity: 0.94;
        transform: rotate(-8deg);
    }

    .lp-gavel,
    .lp-dust,
    .lp-scale__fill,
    .lp-scale__num,
    .lp-b {
        animation: none;
        opacity: 1;
        transform: none;
    }

    .lp-gavel {
        transform: rotate(28deg);
    }

    .lp-scale__fill {
        width: 73%;
    }

    .progress-line::after {
        width: 100%;
        opacity: 0.5;
    }

    .dots::after {
        content: "...";
    }
}

/* --- plain lists (profile consents) --- */
.plain-list {
    list-style: none;
    padding: 0;
    margin: 0 0 0.75rem;
    display: grid;
    gap: 0.5rem;
}
