/* DYOR design kit — CSS @layers порядок.
   tokens < components < (page CSS вне layer'а — выше всех)
   Page-стили автоматически перекрывают kit без необходимости в !important. */
@layer tokens, components;

@layer tokens {
:root {
    /* Color System */
    --bg-dark: #181A20;
    --bg-darker: #12151A;
    --bg-table: #1E2026;
    --bg-forest: #011B0F;        /* dashboard sub-theme: card bg (16 use) */
    --bg-forest-light: #013520;  /* dashboard sub-theme: hover/lighter forest (7 use) */
    --text-primary: #ECF5FF;
    --text-secondary: #B0BEC5;
    --text-tertiary: #8A9BAE;
    --text-inverse: #020302; /* тёмный текст на ярких/светлых фонах (9 use) */
    --accent-primary: #3AFFA3;
    --accent-primary-pressed: #29ba6d;
    --accent-secondary: #00C8FF;
    --border-color: #2B3139;
    --negative: #FF5E5E;
    --negative-pressed: #b34242;

    /* Accent-primary с прозрачностью (числа справа — частота в проекте) */
    --accent-primary-bg-faint: rgba(58, 255, 163, 0.05);  /* 29 */
    --accent-primary-bg: rgba(58, 255, 163, 0.1);         /* 63 */
    --accent-primary-bg-strong: rgba(58, 255, 163, 0.15); /* 37 */
    --accent-primary-bg-heavy: rgba(58, 255, 163, 0.3);   /* 34 */

    /* Negative с прозрачностью */
    --negative-bg: rgba(255, 94, 94, 0.1);                /* 17 */
    --negative-bg-strong: rgba(255, 94, 94, 0.15);        /* 12 */
    --negative-bg-heavy: rgba(255, 94, 94, 0.3);          /* 9 */

    /* Semantic aliases — отдельное имя для семантики, value делится с другим токеном */
    --positive: var(--accent-primary);     /* price-gain — то же что accent, но семантически другой */
    --highlight: var(--accent-primary-bg); /* alias для accent-primary-bg */

    /* Семантические цвета (Material-style, используются хардкодом в dialog/admin) */
    --warning: #FFC107;  /* 14 */
    --error: #F44336;    /* 15 */
    --success: #4CAF50;  /* 11 */
    --alert: #FF6723;    /* 5, оранжевый для "expiring"/"about to fail" между warning и error */

    /* Brand цвета бирж/партнёров */
    --brand-binance: #F0B90B; /* 17 */

    /* Typography System */
    /* Font Families */
    --font-body: 'Onest', 'Inter', sans-serif;
    --font-heading: 'Onest', sans-serif;

    /* Font Sizes - Desktop */
    --font-h1-desktop: 48px;
    --font-h2-desktop: 32px;
    --font-h3-desktop: 24px;
    --font-h4-desktop: 20px;
    --font-lg-desktop: 18px;
    --font-body-desktop: 16px;
    --font-small-desktop: 14px;
    --font-xs-desktop: 13px;
    --font-2xs-desktop: 12px;
    --font-3xs-desktop: 11px;
    --font-button-desktop: 16px;

    /* Font Sizes - Mobile */
    --font-h1-mobile: 32px;
    --font-h2-mobile: 28px;
    --font-h3-mobile: 24px;
    --font-body-mobile: 14px;
    --font-small-mobile: 12px;
    --font-button-mobile: 14px;

    /* Font Weights */
    --font-weight-bold: 700;
    --font-weight-semibold: 600;
    --font-weight-medium: 500;
    --font-weight-regular: 400;
    --font-weight-light: 300;

    /* Line Heights */
    --line-height-tight: 1.2;
    --line-height-normal: 1.5;
    --line-height-relaxed: 1.6;

    /* Letter Spacing */
    --letter-spacing-normal: 0;
    --letter-spacing-wide: 0.5px;
    --letter-spacing-button: 0.5px;
}}

@layer tokens {
:root {
    /* Spacing scale — 4px grid.
       Используется для padding, margin, gap.
       Числа в имени = шаг × 4px. */
    --space-0: 0;
    --space-px: 1px;
    --space-0-5: 2px;
    --space-1: 4px;
    --space-1-5: 6px;
    --space-2: 8px;
    --space-2-5: 10px;
    --space-3: 12px;
    --space-3-5: 14px;
    --space-4: 16px;
    --space-5: 20px;
    --space-6: 24px;
    --space-7: 28px;
    --space-8: 32px;
    --space-10: 40px;
    --space-12: 48px;
    --space-15: 60px;
    --space-20: 80px;
}
}

@layer tokens {
:root {
    /* Border radius scale. */
    --radius-xs: 2px;
    --radius-sm: 4px;
    --radius-sm-plus: 6px;
    --radius-md: 8px;
    --radius-md-plus: 10px;
    --radius-lg: 12px;
    --radius-xl: 16px;
    --radius-2xl: 20px;
    --radius-full: 9999px;
    --radius-circle: 50%;
}
}

@layer tokens {
:root {
    /* Нейтральные тени для elevation на тёмном фоне.
       Числа справа — частота встречаемости в проекте. */
    --shadow-sm: 0 2px 8px rgba(0, 0, 0, 0.2);              /* 3 */
    --shadow-md: 0 4px 12px rgba(0, 0, 0, 0.15);            /* 5 */
    --shadow-md-strong: 0 4px 12px rgba(0, 0, 0, 0.3);      /* 5 */
    --shadow-lg: 0 8px 32px rgba(0, 0, 0, 0.4);             /* 5 */
    --shadow-xl: 0 20px 60px rgba(0, 0, 0, 0.5);            /* 9, modal */

    /* Accent-glow: подсветка в фирменный зелёный. */
    --shadow-accent-sm: 0 4px 12px rgba(58, 255, 163, 0.1); /* 12, subtle */
    --shadow-accent-md: 0 4px 12px rgba(58, 255, 163, 0.3); /* 5, button hover */
    --shadow-accent-lg: 0 8px 24px rgba(58, 255, 163, 0.3); /* 4, card hover */

    /* Focus rings — для :focus-visible. */
    --shadow-focus: 0 0 0 3px rgba(58, 255, 163, 0.1);      /* 9, input focus */
    --shadow-focus-thin: 0 0 0 2px rgba(58, 255, 163, 0.1); /* 5 */
    --shadow-focus-strong: 0 0 0 2px rgba(58, 255, 163, 0.3); /* 4 */

    /* Danger glow для красных кнопок. */
    --shadow-danger: 0 4px 12px rgba(255, 94, 94, 0.3);     /* 4 */
}
}

@layer tokens {
:root {
    /* Длительности transition. */
    --duration-fast: 0.15s;
    --duration-base: 0.2s;
    --duration-slow: 0.3s;
    --duration-slower: 0.35s;

    /* Easing. */
    --ease-default: ease;
    --ease-in-out: ease-in-out;
}
}

@layer tokens {
:root {
    /* Семантическая шкала z-index — чтобы избежать гонки слоёв.
       Между значениями оставлен запас на промежуточные элементы. */
    --z-base: 0;
    --z-raised: 1;
    --z-dropdown: 100;
    --z-sticky: 800;
    --z-fixed: 1000;
    --z-modal-backdrop: 9000;
    --z-modal: 9999;
    --z-toast: 10000;
    --z-tooltip: 10001;
}
}

@layer tokens {
:root {
    /* Icon font sizes — для FontAwesome <i> и .icon-классов.
       Меньшие иконки используют типографические токены (--font-* desktop). */
    --icon-md: 32px;  /* 6 use — средние иконки в карточках */
    --icon-lg: 48px;  /* ~14 use — empty-state, error-icon, upload-icon */
    --icon-xl: 64px;  /* ~5 use — empty-state крупные */
}
}

@layer components {
/* Typography utility classes.
   Используют токены из colors.css, чтобы страницам не нужно было
   хардкодить размеры/семейство/вес. */

.h1 {
    font-family: var(--font-heading);
    font-size: var(--font-h1-desktop);
    font-weight: var(--font-weight-bold);
    line-height: var(--line-height-tight);
    letter-spacing: var(--letter-spacing-normal);
    margin: 0;
}

.h2 {
    font-family: var(--font-heading);
    font-size: var(--font-h2-desktop);
    font-weight: var(--font-weight-bold);
    line-height: var(--line-height-tight);
    letter-spacing: var(--letter-spacing-normal);
    margin: 0;
}

.h3 {
    font-family: var(--font-heading);
    font-size: var(--font-h3-desktop);
    font-weight: var(--font-weight-semibold);
    line-height: var(--line-height-tight);
    letter-spacing: var(--letter-spacing-normal);
    margin: 0;
}

.body {
    font-family: var(--font-body);
    font-size: var(--font-body-desktop);
    font-weight: var(--font-weight-regular);
    line-height: var(--line-height-normal);
    letter-spacing: var(--letter-spacing-normal);
}

.body-sm {
    font-family: var(--font-body);
    font-size: var(--font-small-desktop);
    font-weight: var(--font-weight-regular);
    line-height: var(--line-height-normal);
    letter-spacing: var(--letter-spacing-normal);
}

.button-text {
    font-family: var(--font-body);
    font-size: var(--font-button-desktop);
    font-weight: var(--font-weight-semibold);
    line-height: var(--line-height-tight);
    letter-spacing: var(--letter-spacing-button);
}

/* Табличные (моноширинные) цифры — для цен, таймеров, счётчиков. */
.mono-num {
    font-variant-numeric: tabular-nums;
    font-feature-settings: "tnum" on, "lnum" on;
}

@media (max-width: 768px) {
    .h1 {
        font-size: var(--font-h1-mobile);
    }

    .h2 {
        font-size: var(--font-h2-mobile);
    }

    .h3 {
        font-size: var(--font-h3-mobile);
    }

    .body {
        font-size: var(--font-body-mobile);
    }

    .body-sm {
        font-size: var(--font-small-mobile);
    }

    .button-text {
        font-size: var(--font-button-mobile);
    }
}
}

@layer components {
/* DYOR button kit.
   API: одиночные классы (.button-primary, .button-error, ...). Размер
   маркируется суффиксом (-small). Все размеры/радиусы/переходы/цвета
   приходят из tokens. */

.button-primary {
    font-family: var(--font-body);
    font-size: var(--font-button-desktop);
    font-weight: var(--font-weight-semibold);
    letter-spacing: var(--letter-spacing-button);
    background-color: var(--accent-primary);
    color: var(--bg-darker);
    border: none;
    border-radius: var(--radius-md);
    padding: var(--space-2-5) var(--space-4);
    cursor: pointer;
    transition: all var(--duration-slow) var(--ease-default);
}

@media (hover: hover) and (pointer: fine) {
    .button-primary:hover {
        background-color: var(--accent-primary-pressed);
        color: var(--bg-darker);
    }
}

.button-primary-small {
    font-family: var(--font-body);
    font-size: var(--font-button-mobile);
    font-weight: var(--font-weight-semibold);
    letter-spacing: var(--letter-spacing-button);
    background-color: var(--accent-primary);
    color: var(--bg-darker);
    border: none;
    border-radius: var(--radius-md);
    padding: var(--space-1-5) var(--space-3);
    cursor: pointer;
    transition: all var(--duration-slow) var(--ease-default);
}

@media (hover: hover) and (pointer: fine) {
    .button-primary-small:hover {
        background-color: var(--accent-primary-pressed);
        color: var(--bg-darker);
    }
}

.button-error {
    font-family: var(--font-body);
    font-size: var(--font-button-desktop);
    font-weight: var(--font-weight-semibold);
    letter-spacing: var(--letter-spacing-button);
    background-color: var(--negative);
    color: var(--bg-darker);
    border: none;
    border-radius: var(--radius-md);
    padding: var(--space-2-5) var(--space-4);
    cursor: pointer;
    transition: all var(--duration-slow) var(--ease-default);
}

@media (hover: hover) and (pointer: fine) {
    .button-error:hover {
        background-color: var(--negative-pressed);
        color: var(--bg-darker);
    }
}

.button-error-small {
    font-family: var(--font-body);
    font-size: var(--font-button-mobile);
    font-weight: var(--font-weight-semibold);
    letter-spacing: var(--letter-spacing-button);
    background-color: var(--negative);
    color: var(--bg-darker);
    border: none;
    border-radius: var(--radius-md);
    padding: var(--space-1-5) var(--space-3);
    cursor: pointer;
    transition: all var(--duration-slow) var(--ease-default);
}

@media (hover: hover) and (pointer: fine) {
    .button-error-small:hover {
        background-color: var(--negative-pressed);
        color: var(--bg-darker);
    }
}

.button-warning-small {
    font-family: var(--font-body);
    font-size: var(--font-button-mobile);
    font-weight: var(--font-weight-semibold);
    letter-spacing: var(--letter-spacing-button);
    background-color: var(--warning);
    color: var(--bg-darker);
    border: none;
    border-radius: var(--radius-md);
    padding: var(--space-1-5) var(--space-3);
    cursor: pointer;
    transition: all var(--duration-slow) var(--ease-default);
    display: inline-flex;
    align-items: center;
    gap: var(--space-1-5);
}

@media (hover: hover) and (pointer: fine) {
    .button-warning-small:hover {
        background-color: #FF8C00;
        color: var(--bg-darker);
    }
}

.button-close {
    background-color: transparent;
    color: var(--text-secondary);
    border: none;
    border-radius: var(--radius-circle);
    width: 40px;
    height: 40px;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    transition: all var(--duration-slow) var(--ease-default);
}

@media (hover: hover) and (pointer: fine) {
    .button-close:hover {
        background-color: var(--highlight);
        color: var(--accent-primary);
    }
}

.button-back {
    font-family: var(--font-body);
    font-size: var(--font-button-desktop);
    font-weight: var(--font-weight-semibold);
    letter-spacing: var(--letter-spacing-button);
    position: absolute;
    background-color: transparent;
    border: 1px solid var(--border-color);
    border-radius: var(--radius-md);
    top: var(--space-5);
    left: var(--space-5);
    padding: var(--space-2-5) var(--space-4);
    color: var(--text-primary);
    z-index: var(--z-raised);
    cursor: pointer;
    transition: all var(--duration-slow) var(--ease-default);
    align-items: center;
    gap: var(--space-2);
}

@media (hover: hover) and (pointer: fine) {
    .button-back:hover {
        background-color: var(--highlight);
        color: var(--accent-primary);
        border-color: var(--accent-primary);
    }

    .button-back:hover svg path {
        stroke: var(--accent-primary);
    }
}

.button-icon {
    background-color: transparent;
    color: var(--text-secondary);
    border: none;
    border-radius: var(--radius-circle);
    width: 40px;
    height: 40px;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    transition: all var(--duration-slow) var(--ease-default);
}

@media (hover: hover) and (pointer: fine) {
    .button-icon:hover {
        background-color: var(--highlight);
        color: var(--accent-primary);
    }
}

.button-link {
    font-family: var(--font-body);
    font-size: var(--font-button-desktop);
    font-weight: var(--font-weight-semibold);
    letter-spacing: var(--letter-spacing-button);
    background-color: transparent;
    color: var(--accent-primary-pressed);
    border: none;
    padding: 0;
    text-decoration: none;
    cursor: pointer;
    transition: all var(--duration-slow) var(--ease-default);
}

@media (hover: hover) and (pointer: fine) {
    .button-link:hover {
        color: var(--accent-primary);
        text-decoration: underline;
    }
}

/* SVG icon button (fill) */
.button-svg-icon {
    background: transparent;
    border: none;
    padding: var(--space-1-5);
    display: inline-flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
}

.button-svg-icon svg {
    width: 20px;
    height: 20px;
    fill: var(--text-secondary);
    transition: fill var(--duration-slow) var(--ease-default);
}

@media (hover: hover) and (pointer: fine) {
    .button-svg-icon:hover svg {
        fill: var(--accent-primary);
    }
}

.sidebar .button-svg-icon.active svg {
    fill: var(--accent-primary);
}

/* SVG icon button (stroke) */
.button-svg-icon-stroke {
    background: transparent;
    border: none;
    padding: var(--space-1-5);
    display: inline-flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    transition: fill var(--duration-slow) var(--ease-default);
}

.button-svg-icon-stroke svg {
    width: 20px;
    height: 20px;
    stroke: var(--text-secondary);
}

@media (hover: hover) and (pointer: fine) {
    .button-svg-icon-stroke:hover svg {
        stroke: var(--accent-primary);
    }
}

.sidebar .button-svg-icon-stroke.active svg {
    stroke: var(--accent-primary);
}

.button-secondary {
    font-family: var(--font-body);
    font-size: var(--font-button-desktop);
    font-weight: var(--font-weight-semibold);
    letter-spacing: var(--letter-spacing-button);
    background-color: transparent;
    color: var(--text-secondary);
    border: 1px solid var(--border-color);
    border-radius: var(--radius-md);
    padding: var(--space-2-5) var(--space-4);
    cursor: pointer;
    transition: all var(--duration-slow) var(--ease-default);
    display: inline-flex;
    align-items: center;
    gap: var(--space-2);
}

@media (hover: hover) and (pointer: fine) {
    .button-secondary:hover {
        background-color: var(--highlight);
        border-color: var(--accent-primary);
        color: var(--accent-primary);
    }
}

.button-secondary-small {
    font-family: var(--font-body);
    font-size: var(--font-button-mobile);
    font-weight: var(--font-weight-semibold);
    letter-spacing: var(--letter-spacing-button);
    background-color: var(--border-color);
    color: var(--text-secondary);
    border: none;
    border-radius: var(--radius-md);
    padding: var(--space-1-5) var(--space-3);
    cursor: pointer;
    transition: all var(--duration-slow) var(--ease-default);
}

@media (hover: hover) and (pointer: fine) {
    .button-secondary-small:hover {
        background-color: var(--accent-primary-pressed);
        color: var(--bg-darker);
    }
}

.button-text-small {
    font-family: var(--font-body);
    font-size: var(--font-button-mobile);
    font-weight: var(--font-weight-semibold);
    letter-spacing: var(--letter-spacing-button);
    background-color: transparent;
    color: var(--text-secondary);
    border: none;
    border-radius: var(--radius-sm);
    padding: var(--space-1) var(--space-2);
    cursor: pointer;
    transition: color var(--duration-base) var(--ease-default);
}

@media (hover: hover) and (pointer: fine) {
    .button-text-small:hover {
        color: var(--accent-primary-pressed);
    }
}

/* === Global states ===
   Применяются ко всем .button-* классам сразу. */

.button-primary,
.button-primary-small,
.button-secondary,
.button-secondary-small,
.button-error,
.button-error-small,
.button-warning-small,
.button-close,
.button-back,
.button-icon,
.button-link,
.button-svg-icon,
.button-svg-icon-stroke,
.button-text-small {
    /* hook for shared states (focus-visible / disabled). Empty by design. */
}

.button-primary:focus,
.button-primary-small:focus,
.button-secondary:focus,
.button-secondary-small:focus,
.button-error:focus,
.button-error-small:focus,
.button-warning-small:focus,
.button-close:focus,
.button-back:focus,
.button-icon:focus,
.button-link:focus,
.button-svg-icon:focus,
.button-svg-icon-stroke:focus,
.button-text-small:focus {
    outline: none;
}

/* Keyboard-only focus ring (не показывается при click). */
.button-primary:focus-visible,
.button-primary-small:focus-visible,
.button-secondary:focus-visible,
.button-secondary-small:focus-visible,
.button-error:focus-visible,
.button-error-small:focus-visible,
.button-warning-small:focus-visible,
.button-close:focus-visible,
.button-back:focus-visible,
.button-icon:focus-visible,
.button-link:focus-visible,
.button-svg-icon:focus-visible,
.button-svg-icon-stroke:focus-visible,
.button-text-small:focus-visible {
    outline: none;
    box-shadow: var(--shadow-focus);
}

/* Disabled state — единый для всех кнопок kit'а. */
.button-primary:disabled,
.button-primary-small:disabled,
.button-secondary:disabled,
.button-secondary-small:disabled,
.button-error:disabled,
.button-error-small:disabled,
.button-warning-small:disabled,
.button-close:disabled,
.button-back:disabled,
.button-icon:disabled,
.button-link:disabled,
.button-svg-icon:disabled,
.button-svg-icon-stroke:disabled,
.button-text-small:disabled {
    opacity: 0.5;
    cursor: not-allowed;
    pointer-events: none;
}
}

@layer components {
.modal-content {
    color: white;
    background-color: #181A20;
    -webkit-user-select: none;
    -moz-user-select: none;
    -ms-user-select: none;
    user-select: none;
}

.modal-header,
.modal-footer {
    border-color: #6c757d;
}

/* Dark‐mode form controls inside any .modal-content */
.modal-content .form-control {
    background-color: #181A20;
    border-color: #495057;
    color: #cdcdcd;
}

/* Placeholder text */
.modal-content .form-control::placeholder {
    color: #393939; /* lighter gray */
    opacity: 1; /* ensure full visibility */
}

/* For older WebKit browsers */
.modal-content .form-control::-webkit-input-placeholder {
    color: #393939;
}

.modal-content .form-control:-ms-input-placeholder {
    color: #393939;
}

.modal-content .form-control::-ms-input-placeholder {
    color: #393939;
}}

@layer components {
.dyor-switch {
    /* —— CONFIGURABLE VARS —— */
    --switch-width: 30px;
    --switch-height: 15px;
    --knob-size: 13px;
    --knob-offset: 1px;
    /* ———————————————— */

    position: relative;
    display: inline-block;
    width: var(--switch-width);
    height: var(--switch-height);
}

.dyor-switch-container {
    display: inline-flex;
    align-items: center;
}

.dyor-switch-text {
    margin-right: 0.5em; /* space between text and switch */
    user-select: none;
    font-size: 0.9em;
    color: var(--text-primary);
}

.dyor-switch .dyor-switch-input {
    /* hide the native checkbox */
    position: absolute;
    width: 0;
    height: 0;
    opacity: 0;
}

.dyor-switch .dyor-switch-label {
    /* the track */
    display: block;
    width: 100%;
    height: 100%;
    background-color: #6c757d;
    border-radius: calc(var(--switch-height) / 2);
    cursor: pointer;
    transition: background-color 0.3s ease;
}

.dyor-switch .dyor-switch-label::before {
    /* the knob */
    content: "";
    position: absolute;
    width: var(--knob-size);
    height: var(--knob-size);
    left: var(--knob-offset);
    top: var(--knob-offset);
    background-color: #fff;
    border-radius: 50%;
    transition: transform 0.3s ease;
}

/* checked = active state */
.dyor-switch .dyor-switch-input:checked ~ .dyor-switch-label {
    background-color: var(--accent-primary);
    border-color: var(--accent-primary);
}

.dyor-switch .dyor-switch-input:checked ~ .dyor-switch-label::before {
    transform: translateX(calc(var(--switch-width) - var(--knob-size) - 2 * var(--knob-offset)));
}}

@layer components {
/* Адаптивная сетка-примитив.
   Кол-во колонок задаётся через --dyor-grid-cols (по умолчанию одна колонка),
   gap — через --dyor-grid-gap. На узких экранах сворачивается в одну колонку. */

.dyor-grid {
    display: grid;
    grid-template-columns: var(--dyor-grid-cols, 1fr);
    gap: var(--dyor-grid-gap, var(--space-5));
    align-items: start;
}

/* Грид-элементы по умолчанию имеют min-width:auto и не сжимаются ниже
   min-content потомков — это раздувает fr-треки. Разрешаем сжатие. */
.dyor-grid > * {
    min-width: 0;
}

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

/* Вертикальный стек одинаковых отступов — частый случай внутри колонок. */
.dyor-stack {
    display: flex;
    flex-direction: column;
    gap: var(--dyor-stack-gap, var(--space-5));
}
}

@layer components {
/* Карточка-поверхность. Нейтральный фон по умолчанию, forest-вариант — для
   дашборд-саб-темы. Паддинг можно переопределить через --dyor-card-pad. */

.dyor-card {
    background: var(--bg-table);
    border-radius: var(--radius-2xl);
    padding: var(--dyor-card-pad, var(--space-5));
    box-shadow: var(--shadow-md);
}

.dyor-card--forest {
    background: var(--bg-forest);
}

.dyor-card--glow {
    box-shadow: var(--shadow-accent-sm);
}
}

@layer components {
/* Бейдж/пилюля. По умолчанию — акцентный приглушённый. Для произвольного цвета
   страница задаёт background/color инлайном. Solid-вариант — заливка. */

.dyor-tag {
    display: inline-flex;
    align-items: center;
    gap: var(--space-1);
    padding: 3px var(--space-2);
    border-radius: var(--radius-sm);
    font-family: var(--font-body);
    font-size: var(--font-3xs-desktop);
    font-weight: var(--font-weight-bold);
    letter-spacing: var(--letter-spacing-wide);
    text-transform: uppercase;
    background: var(--accent-primary-bg-strong);
    color: var(--accent-primary);
}

.dyor-tag--solid {
    background: var(--accent-primary);
    color: var(--bg-darker);
}
}

@layer components {
/* Полоса прогресса. Высота — через --dyor-progress-h. Ширину заполнения
   (__bar) выставляет страница инлайном. */

.dyor-progress {
    position: relative;
    height: var(--dyor-progress-h, var(--space-4));
    background: var(--bg-forest-light);
    border-radius: var(--radius-full);
    overflow: hidden;
}

.dyor-progress__bar {
    position: absolute;
    inset: 0;
    width: 0;
    background: var(--accent-primary);
    border-radius: var(--radius-full);
    transition: width var(--duration-slow) cubic-bezier(.2, .8, .2, 1);
}
}

@layer components {
/* Skeleton-плейсхолдер с shimmer. Размеры/радиус выставляет страница инлайном. */

.dyor-skeleton {
    background: linear-gradient(
        100deg,
        rgba(255, 255, 255, 0.04) 30%,
        rgba(255, 255, 255, 0.10) 50%,
        rgba(255, 255, 255, 0.04) 70%
    );
    background-size: 200% 100%;
    border-radius: var(--radius-sm-plus);
    animation: dyorShimmer 1.3s var(--ease-in-out) infinite;
}

@keyframes dyorShimmer {
    0% { background-position: 200% 0; }
    100% { background-position: -200% 0; }
}

@media (prefers-reduced-motion: reduce) {
    .dyor-skeleton { animation: none; }
}
}

@layer components {
/* Пустое состояние блока: иконка-кружок + заголовок + описание + действие. */

.dyor-empty {
    display: flex;
    flex-direction: column;
    align-items: center;
    text-align: center;
    gap: var(--space-2-5);
    padding: var(--space-3-5) var(--space-4) var(--space-1-5);
}

.dyor-empty__icon {
    width: var(--space-12);
    height: var(--space-12);
    display: grid;
    place-items: center;
    border-radius: var(--radius-circle);
    background: var(--accent-primary-bg);
    color: var(--accent-primary);
    font-size: var(--font-h3-desktop);
}

.dyor-empty__title {
    font-family: var(--font-body);
    font-size: var(--font-body-desktop);
    font-weight: var(--font-weight-semibold);
    color: var(--text-primary);
}

.dyor-empty__desc {
    font-family: var(--font-body);
    font-size: var(--font-xs-desktop);
    line-height: var(--line-height-normal);
    color: var(--text-tertiary);
    max-width: 320px;
}
}

@layer components {
.auth-error-overlay {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background-color: rgba(24, 26, 32, 0.95);
    display: flex;
    justify-content: center;
    align-items: center;
    z-index: 10000;
    animation: fadeIn 0.3s ease-out;
}

@keyframes fadeIn {
    from {
        opacity: 0;
    }
    to {
        opacity: 1;
    }
}

.auth-error-dialog {
    background-color: var(--bg-darker, #12151A);
    border: 1px solid var(--border-color, #2B3139);
    border-radius: 12px;
    padding: 32px;
    max-width: 600px;
    width: 90%;
    max-height: 80vh;
    overflow-y: auto;
    box-shadow: 0 8px 32px rgba(0, 0, 0, 0.5);
    animation: slideIn 0.3s ease-out;
}

@keyframes slideIn {
    from {
        transform: translateY(-20px);
        opacity: 0;
    }
    to {
        transform: translateY(0);
        opacity: 1;
    }
}

.auth-error-title {
    color: var(--negative, #FF5E5E);
    font-size: 24px;
    font-weight: 600;
    margin-bottom: 20px;
    display: flex;
    align-items: center;
    gap: 12px;
}

.auth-error-message {
    color: var(--text-primary, #ECF5FF);
    font-size: 16px;
    line-height: 1.6;
    margin-bottom: 24px;
}

.auth-error-warning {
    background-color: rgba(255, 165, 0, 0.1);
    border: 1px solid rgba(255, 165, 0, 0.3);
    border-radius: 8px;
    padding: 16px;
    margin-bottom: 24px;
    display: flex;
    align-items: flex-start;
    gap: 12px;
}

.auth-error-warning > div {
    color: var(--text-primary, #ECF5FF);
    font-size: 14px;
    line-height: 1.5;
    flex: 1;
}

.auth-error-warning-link {
    color: var(--accent-primary, #3AFFA3);
    text-decoration: none;
    font-weight: 600;
    transition: opacity 0.2s;
}

.auth-error-warning-link:hover {
    opacity: 0.8;
    text-decoration: underline;
}

.auth-error-details {
    margin-bottom: 24px;
}

.auth-error-details summary {
    color: var(--text-secondary, #B0BEC5);
    font-size: 14px;
    cursor: pointer;
    padding: 12px;
    background-color: rgba(255, 255, 255, 0.05);
    border-radius: 6px;
    user-select: none;
    transition: background-color 0.2s;
}

.auth-error-details summary:hover {
    background-color: rgba(255, 255, 255, 0.08);
}

.auth-error-details-content {
    color: var(--text-secondary, #B0BEC5);
    font-size: 13px;
    font-family: 'Courier New', monospace;
    background-color: rgba(0, 0, 0, 0.3);
    border: 1px solid var(--border-color, #2B3139);
    border-radius: 6px;
    padding: 16px;
    margin-top: 12px;
    white-space: pre-wrap;
    word-break: break-word;
    max-height: 200px;
    overflow-y: auto;
}

.auth-error-copy-button {
    margin-top: 12px;
    padding: 8px 16px;
    background-color: rgba(255, 255, 255, 0.1);
    color: var(--text-primary, #ECF5FF);
    border: 1px solid var(--border-color, #2B3139);
    border-radius: 6px;
    cursor: pointer;
    font-size: 13px;
    transition: all 0.2s;
}

.auth-error-copy-button:hover {
    background-color: rgba(255, 255, 255, 0.15);
}

.auth-error-copy-button.copied {
    background-color: rgba(58, 255, 163, 0.2);
    border-color: var(--accent-primary, #3AFFA3);
    color: var(--accent-primary, #3AFFA3);
}

.auth-error-actions {
    display: flex;
    gap: 12px;
    justify-content: flex-end;
}

.auth-error-actions button {
    padding: 12px 24px;
    font-size: 15px;
    border-radius: 8px;
    cursor: pointer;
    border: none;
    transition: all 0.2s;
    font-weight: 500;
}

@media (max-width: 600px) {
    .auth-error-dialog {
        padding: 24px;
        width: 95%;
    }

    .auth-error-title {
        font-size: 20px;
    }

    .auth-error-message {
        font-size: 14px;
    }

    .auth-error-actions {
        flex-direction: column;
    }

    .auth-error-actions button {
        width: 100%;
    }
}
}

/* Global focus-ring policy.
   No focus ring on pointer interaction (click / press-and-hold) — the keyboard
   ring is kept via :focus-visible (see buttons.css).

   This lives OUTSIDE @layer on purpose: the design-kit focus rules are layered
   (@layer components) and lose to Bootstrap's unlayered reboot + UA defaults,
   which is why a browser outline leaked onto every button across the app. An
   unlayered !important rule wins everywhere, on every page that loads the kit. */
button:focus:not(:focus-visible),
a:focus:not(:focus-visible),
[role="button"]:focus:not(:focus-visible),
summary:focus:not(:focus-visible),
input:focus:not(:focus-visible),
select:focus:not(:focus-visible),
textarea:focus:not(:focus-visible),
[tabindex]:focus:not(:focus-visible) {
    outline: none !important;
    box-shadow: none !important;
}

/* Keyboard focus ring — brand accent (mint), never the ugly UA blue. Unlayered +
   !important so it wins over Bootstrap's reboot and the UA default on every element
   that doesn't already define its own focus style. */
button:focus-visible,
a:focus-visible,
[role="button"]:focus-visible,
summary:focus-visible,
input:focus-visible,
select:focus-visible,
textarea:focus-visible,
[tabindex]:focus-visible {
    outline: 2px solid var(--accent-primary) !important;
    outline-offset: 2px;
}

/* Only the content area scrolls (not the whole document), so the page scrollbar
   sits below the sticky header instead of running over its right edge. */
html,
body {
    height: 100%;
}

body {
    margin: 0;
    display: flex;
    flex-direction: column;
    overflow: hidden;
}

.dyor-settings-header {
    flex: 0 0 auto;
}

.screeners-page {
    flex: 1 1 auto;
    min-height: 0;
    overflow-y: auto;
    background: var(--bg-dark);
    padding: var(--space-7);
}

/* ── Custom scrollbars (page + all inner scroll containers) ──── */
/* Standard properties — inherited, and the only ones that tint macOS overlay
   scrollbars. A visible mid-grey thumb instead of the faint default. */
html {
    scrollbar-width: thin;
    scrollbar-color: var(--text-tertiary) transparent;
}

/* WebKit / Chromium (classic scrollbars: Windows/Linux, or "always show" on macOS) */
::-webkit-scrollbar {
    width: 10px;
    height: 10px;
}

::-webkit-scrollbar-track {
    background: transparent;
}

::-webkit-scrollbar-thumb {
    background: var(--text-tertiary);
    border: 2px solid transparent;
    border-radius: var(--radius-full);
    background-clip: padding-box;
    transition: background var(--duration-base) var(--ease-default);
}

::-webkit-scrollbar-thumb:hover {
    background: var(--accent-primary);
    background-clip: padding-box;
}

::-webkit-scrollbar-corner {
    background: transparent;
}

/* ── Desktop tab bar ───────────────────────────────────────── */
.screeners-tabs {
    display: flex;
    gap: var(--space-1);
    border-bottom: 1px solid var(--border-color);
    margin-bottom: var(--space-5);
    overflow-x: auto;
}

.screeners-tab {
    display: inline-flex;
    align-items: center;
    gap: var(--space-2);
    padding: 0 var(--space-5);
    height: 48px;
    white-space: nowrap;
    font-family: var(--font-body);
    font-size: var(--font-small-desktop);
    font-weight: 600;
    cursor: pointer;
    color: var(--text-secondary);
    background: transparent;
    border: none;
    border-bottom: 2px solid transparent;
    /* stylelint-disable-next-line scale-unlimited/declaration-strict-value */
    margin-bottom: -1px;
    transition: color var(--duration-base) var(--ease-default),
        background var(--duration-base) var(--ease-default);
}

.screeners-tab i {
    font-size: var(--font-xs-desktop);
}

.screeners-tab:hover {
    color: var(--text-primary);
}

.screeners-tab.active {
    color: var(--accent-primary);
    border-bottom-color: var(--accent-primary);
    background: var(--accent-primary-bg-faint);
}

/* ── Mobile dropdown nav ───────────────────────────────────── */
.screeners-mnav {
    display: none;
    position: relative;
    margin-bottom: var(--space-4);
}

.screeners-mnav-trigger,
.screeners-mnav-item {
    display: flex;
    align-items: center;
    gap: var(--space-3);
    width: 100%;
    padding: 0 var(--space-3-5);
    height: 52px;
    background: var(--bg-table);
    border: 1px solid var(--border-color);
    border-radius: var(--radius-md);
    cursor: pointer;
    text-align: left;
}

.screeners-mnav-trigger.open {
    border-color: var(--accent-primary);
}

.screeners-mnav-icon {
    width: 32px;
    height: 32px;
    flex-shrink: 0;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    border-radius: var(--radius-md);
    background: var(--bg-darker);
    color: var(--text-secondary);
    font-size: var(--font-small-desktop);
}

.screeners-mnav-trigger .screeners-mnav-icon,
.screeners-mnav-item.active .screeners-mnav-icon {
    background: var(--accent-primary);
    color: var(--bg-darker);
}

.screeners-mnav-label {
    display: flex;
    flex-direction: column;
    flex: 1;
    min-width: 0;
}

.screeners-mnav-name {
    font-family: var(--font-body);
    font-size: var(--font-small-desktop);
    font-weight: 600;
    color: var(--text-primary);
}

.screeners-mnav-item.active .screeners-mnav-name {
    color: var(--accent-primary);
}

.screeners-mnav-desc {
    font-family: var(--font-body);
    font-size: var(--font-2xs-desktop);
    color: var(--text-tertiary);
}

.screeners-mnav-caret {
    font-size: var(--font-xs-desktop);
    color: var(--text-tertiary);
}

.screeners-mnav-check {
    font-size: var(--font-xs-desktop);
    color: var(--accent-primary);
}

.screeners-mnav-menu {
    display: none;
    position: absolute;
    left: 0;
    right: 0;
    top: 60px;
    z-index: 30;
    flex-direction: column;
    gap: var(--space-1);
    padding: var(--space-1-5);
    background: var(--bg-table);
    border: 1px solid var(--border-color);
    border-radius: var(--radius-md);
    box-shadow: var(--shadow-lg);
}

.screeners-mnav-menu.open {
    display: flex;
}

.screeners-mnav-menu .screeners-mnav-item {
    height: auto;
    padding: var(--space-2-5);
    border: none;
    border-radius: var(--radius-sm-plus);
    background: transparent;
}

.screeners-mnav-menu .screeners-mnav-item.active {
    background: var(--accent-primary-bg);
}

/* ── Content host ──────────────────────────────────────────── */
.screeners-content {
    min-width: 0;
}

/* ── Lock badge on gated tabs (V3 / Minerva for trial users) ─── */
.screeners-tab .screeners-tab-lock {
    font-size: var(--font-2xs-desktop);
    color: var(--text-tertiary);
}

.screeners-tab.active .screeners-tab-lock {
    color: var(--accent-primary);
}

.screeners-mnav-lock {
    font-size: var(--font-xs-desktop);
    color: var(--text-tertiary);
}

/* ── Paywall plate (gated screener for a trial user) ──────────── */
.scr-paywall .scr-paywall-icon {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 72px;
    height: 72px;
    border-radius: var(--radius-full);
    background: var(--accent-primary-bg);
    color: var(--accent-primary);
    font-size: var(--font-h3-desktop);
    margin-bottom: var(--space-5);
}

.scr-paywall .scr-paywall-benefits {
    list-style: none;
    padding: 0;
    margin: 0 0 var(--space-6);
    text-align: left;
}

.scr-paywall .scr-paywall-benefits li {
    display: flex;
    align-items: center;
    gap: var(--space-2-5);
    margin-bottom: var(--space-2-5);
    font-size: var(--font-small-desktop);
    color: var(--text-secondary);
}

.scr-paywall .scr-paywall-benefits li i {
    color: var(--accent-primary);
}

.scr-paywall .scr-paywall-cta {
    min-width: 240px;
    justify-content: center;
}

.scr-paywall .scr-paywall-note {
    margin: var(--space-5) 0 0;
    font-size: var(--font-2xs-desktop);
    color: var(--text-tertiary);
}

@media (max-width: 768px) {
    .screeners-page {
        padding: var(--space-4);
    }

    .screeners-tabs {
        display: none;
    }

    .screeners-mnav {
        display: block;
    }
}

.dyor-settings-header {
    background: var(--bg-dark, var(--bg-table));
    border-bottom: 1px solid var(--border-color, var(--border-color));
    position: sticky;
    top: 0;
    z-index: 1000;
    width: 100%;
}

.dyor-settings-header .header-content {
    position: relative;
    margin: 0 auto;
    padding: var(--space-4) 0;
}

.dyor-settings-header .back-button-container {
    position: absolute;
    left: 16px;
    top: 50%;
    transform: translateY(-50%);
    z-index: 2;
}

.dyor-settings-header .back-button {
    background: transparent;
    border: 1px solid var(--border-color, var(--border-color));
    border-radius: var(--radius-md);
    color: var(--text-primary, var(--text-primary));
    padding: var(--space-2-5) var(--space-3);
    cursor: pointer;
    transition: all var(--duration-slow) var(--ease-default);
    display: flex;
    align-items: center;
    gap: var(--space-2);
    font-family: var(--font-body);
    font-size: var(--font-small-desktop);
    font-weight: var(--font-weight-medium);
    min-width: 44px;
    min-height: 44px;
    justify-content: center;
}

@media (hover: hover) and (pointer: fine) {
    .dyor-settings-header .back-button:hover {
        background-color: var(--highlight, var(--border-color));
        color: var(--accent-primary, var(--accent-primary));
        border-color: var(--accent-primary, var(--accent-primary));
    }
}

.dyor-settings-header .back-button:focus {
    outline: none;
    box-shadow: 0 0 0 2px var(--accent-primary-bg-heavy);
}

.dyor-settings-header .back-button:active {
    transform: translateY(1px);
}

.dyor-settings-header .header-center {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: var(--space-3);
    position: relative;
}

.dyor-settings-header .header-logo {
    height: 32px;
    width: auto;
    flex-shrink: 0;
}

.dyor-settings-header .header-title {
    font-size: 1.5rem;
    font-weight: var(--font-weight-bold);
    background: linear-gradient(135deg, var(--text-primary) 0%, var(--accent-primary) 100%);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
    margin: 0;
    white-space: nowrap;
    font-family: var(--font-body);
}

.dyor-settings-header .header-actions {
    position: absolute;
    right: 16px;
    top: 50%;
    transform: translateY(-50%);
    z-index: 2;
}

.dyor-settings-header .user-menu {
    position: relative;
    display: flex;
    align-items: center;
    gap: var(--space-3);
    padding: var(--space-2) var(--space-4);
    border: 1px solid var(--border-color, var(--border-color));
    border-radius: var(--radius-md);
    cursor: pointer;
    transition: all var(--duration-slow) var(--ease-default);
    background: transparent;
    min-height: 44px;
}

@media (hover: hover) and (pointer: fine) {
    .dyor-settings-header .user-menu:hover {
        border-color: var(--accent-primary, var(--accent-primary));
        background: var(--highlight, var(--border-color));
    }
}

.dyor-settings-header .user-menu:focus-within {
    outline: none;
    box-shadow: 0 0 0 2px var(--accent-primary-bg-heavy);
}

.dyor-settings-header .user-icon {
    width: 28px;
    height: 28px;
    background: var(--accent-primary, var(--accent-primary));
    border-radius: var(--radius-circle);
    display: flex;
    align-items: center;
    justify-content: center;
    color: var(--bg-darker, var(--bg-dark));
    font-size: var(--font-small-desktop);
    flex-shrink: 0;
}

.dyor-settings-header .username {
    color: var(--text-primary, var(--text-primary));
    font-weight: var(--font-weight-medium);
    font-size: var(--font-small-desktop);
    font-family: var(--font-body);
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
    max-width: 120px;
}

.dyor-settings-header .dropdown-arrow {
    color: var(--text-secondary, var(--text-secondary));
    font-size: var(--font-2xs-desktop);
    transition: transform var(--duration-slow) var(--ease-default);
    flex-shrink: 0;
}

.dyor-settings-header .login-button {
    padding: var(--space-2) var(--space-4);
    background: var(--accent-primary, var(--accent-primary));
    color: var(--bg-dark);
    border-radius: var(--radius-sm-plus);
    text-decoration: none;
    font-weight: var(--font-weight-medium);
    transition: background var(--duration-base);
}

.dyor-settings-header .user-dropdown {
    position: absolute;
    top: calc(100% + 8px);
    right: 0;
    background: var(--bg-dark, var(--bg-table));
    border: 1px solid var(--border-color, var(--border-color));
    border-radius: var(--radius-lg);
    min-width: 200px;
    box-shadow: 0 8px 32px rgba(0, 0, 0, 0.4);
    z-index: 1100;
    overflow: hidden;
    transform: translateY(-8px);
    opacity: 0;
    pointer-events: none;
    transition: all var(--duration-slow) var(--ease-default);
}

.dyor-settings-header .user-dropdown:not(.hidden) {
    transform: translateY(0);
    opacity: 1;
    pointer-events: all;
}

.dyor-settings-header .user-dropdown ul {
    list-style: none;
    padding: var(--space-2) 0;
    margin: 0;
}

.dyor-settings-header .dropdown-item {
    display: flex;
    align-items: center;
    gap: var(--space-3);
    padding: var(--space-3) var(--space-4);
    color: var(--text-primary, var(--text-primary));
    cursor: pointer;
    transition: all var(--duration-base) var(--ease-default);
    font-size: var(--font-small-desktop);
    font-family: var(--font-body);
}

@media (hover: hover) and (pointer: fine) {
    .dyor-settings-header .dropdown-item:hover {
        background: var(--highlight, var(--border-color));
        color: var(--accent-primary, var(--accent-primary));
    }
}

.dyor-settings-header .dropdown-item:active {
    /* stylelint-disable-next-line color-no-hex, scale-unlimited/declaration-strict-value */
    background: var(--secondary-bg-color, #242730);
}

.dyor-settings-header .dropdown-item i {
    width: 16px;
    text-align: center;
    font-size: var(--font-small-desktop);
    flex-shrink: 0;
}

.dyor-settings-header .dropdown-separator {
    height: 1px;
    background: var(--border-color, var(--border-color));
    margin: var(--space-2) 0;
    padding: 0;
    cursor: default;
}

.dyor-settings-header .dropdown-separator:hover {
    background: var(--border-color, var(--border-color));
}

.dyor-settings-header .logout-btn {
    color: var(--negative, var(--negative));
}

@media (hover: hover) and (pointer: fine) {
    .dyor-settings-header .logout-btn:hover {
        background: var(--negative-bg);
        color: var(--negative, var(--negative));
    }
}

.dyor-settings-header .hidden {
    display: none !important;
}

@media (max-width: 768px) {
    .dyor-settings-header .header-content {
        padding: var(--space-5) var(--space-3);
        gap: var(--space-2-5);
        min-height: 64px;
        display: flex;
        align-items: center;
    }

    .dyor-settings-header .back-button-container {
        left: 8px;
    }

    .dyor-settings-header .back-button {
        padding: var(--space-2) var(--space-2-5);
        min-width: 40px;
        min-height: 40px;
    }

    .dyor-settings-header .back-button span {
        display: none;
    }

    .dyor-settings-header .header-center {
        position: absolute;
        left: 50%;
        top: 50%;
        transform: translate(-50%, -50%);
    }

    .dyor-settings-header .header-logo {
        height: 24px;
    }

    .dyor-settings-header .header-title {
        font-size: 1.25rem;
    }

    .dyor-settings-header .header-actions {
        right: 8px;
    }

    .dyor-settings-header .user-menu {
        padding: var(--space-1-5) var(--space-3);
        gap: var(--space-2);
        min-height: 40px;
    }

    .dyor-settings-header .user-icon {
        width: 24px;
        height: 24px;
        font-size: var(--font-2xs-desktop);
    }

    .dyor-settings-header .username {
        font-size: var(--font-xs-desktop);
        max-width: 80px;
    }

    .dyor-settings-header .user-dropdown {
        right: -8px;
        min-width: 180px;
        max-width: calc(100vw - 32px);
    }
}

@media (max-width: 480px) {
    .dyor-settings-header .header-content {
        padding: var(--space-3);
        gap: var(--space-2-5);
        min-height: 56px;
        display: flex;
        align-items: center;
    }

    .dyor-settings-header .header-center {
        position: absolute;
        left: 50%;
        top: 50%;
        transform: translate(-50%, -50%);
    }

    .dyor-settings-header .header-logo {
        height: 20px;
    }

    .dyor-settings-header .header-title {
        font-size: 1.1rem;
    }

    .dyor-settings-header .username {
        display: none;
    }

    .dyor-settings-header .user-menu {
        padding: var(--space-1-5) var(--space-2-5);
        gap: var(--space-1-5);
    }

    .dyor-settings-header .user-dropdown {
        right: 0;
        left: auto;
        width: 220px;
        max-width: calc(100vw - 24px);
        transform-origin: top right;
    }

    .dyor-settings-header .back-button {
        padding: var(--space-2);
        min-width: 40px;
        min-height: 40px;
    }

    .dyor-settings-header .back-button span {
        display: none;
    }
}

@media (prefers-contrast: high) {
    .dyor-settings-header .back-button,
    .dyor-settings-header .user-menu {
        border-width: 2px;
    }

    .dyor-settings-header .user-dropdown {
        border-width: 2px;
        box-shadow: 0 8px 32px rgba(0, 0, 0, 0.8);
    }
}

@media (prefers-reduced-motion: reduce) {
    .dyor-settings-header .back-button,
    .dyor-settings-header .user-menu,
    .dyor-settings-header .dropdown-arrow,
    .dyor-settings-header .user-dropdown,
    .dyor-settings-header .dropdown-item {
        transition: none;
    }
}

.dyor-settings-header .header-snowflakes {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    pointer-events: none;
    z-index: 0;
    overflow: hidden;
}

.dyor-settings-header .header-snowflake {
    position: absolute;
    top: -10px;
    color: var(--text-primary);
    font-size: 0.8em;
    opacity: 0.4;
    animation: header-snow-fall 8s linear infinite;
}

.dyor-settings-header .header-snowflake:nth-child(1) { left: 5%; animation-duration: 10s; animation-delay: -1s; }
.dyor-settings-header .header-snowflake:nth-child(2) { left: 15%; animation-duration: 12s; animation-delay: -4s; font-size: 0.6em; }
.dyor-settings-header .header-snowflake:nth-child(3) { left: 30%; animation-duration: 9s; animation-delay: -2s; }
.dyor-settings-header .header-snowflake:nth-child(4) { left: 45%; animation-duration: 11s; animation-delay: -6s; font-size: 0.7em; }
.dyor-settings-header .header-snowflake:nth-child(5) { left: 60%; animation-duration: 10s; animation-delay: -3s; }
.dyor-settings-header .header-snowflake:nth-child(6) { left: 75%; animation-duration: 13s; animation-delay: -7s; font-size: 0.6em; }
.dyor-settings-header .header-snowflake:nth-child(7) { left: 85%; animation-duration: 9s; animation-delay: -5s; }
.dyor-settings-header .header-snowflake:nth-child(8) { left: 95%; animation-duration: 11s; animation-delay: -8s; font-size: 0.7em; }

@keyframes header-snow-fall {
    0% { top: -10px; opacity: 0; }
    10% { opacity: 0.4; }
    90% { opacity: 0.4; }
    100% { top: calc(100% + 10px); opacity: 0; }
}

.dyor-settings-header .reindeer-container {
    position: absolute;
    top: 50%;
    transform: translateY(-50%);
    left: -120px;
    pointer-events: none;
    z-index: 1;
    animation: reindeer-run 20s linear forwards;
    font-size: var(--font-h3-desktop);
    white-space: nowrap;
}

.dyor-settings-header .reindeer-sleigh {
    display: flex;
    flex-direction: row;
    align-items: center;
    gap: var(--space-0-5);
    filter: drop-shadow(0 2px 4px rgba(0, 0, 0, 0.3));
}

.dyor-settings-header .reindeer {
    transform: scaleX(-1);
    animation: reindeer-bounce 0.4s ease-in-out infinite;
}

.dyor-settings-header .sleigh {
    animation: sleigh-bounce 0.4s ease-in-out infinite;
    animation-delay: 0.1s;
}

.dyor-settings-header .sparkle-trail {
    display: flex;
    gap: var(--space-1);
    margin-right: var(--space-1);
}

.dyor-settings-header .sparkle {
    font-size: var(--font-3xs-desktop);
    opacity: 0;
    animation: sparkle-fade 0.9s ease-out infinite;
}

.dyor-settings-header .sparkle:nth-child(1) { animation-delay: 0.45s; }
.dyor-settings-header .sparkle:nth-child(2) { animation-delay: 0.22s; }
.dyor-settings-header .sparkle:nth-child(3) { animation-delay: 0s; }

@keyframes reindeer-run {
    0% {
        left: -120px;
    }
    100% {
        left: calc(100% + 120px);
    }
}

@keyframes reindeer-bounce {
    0%, 100% {
        transform: scaleX(-1) translateY(0);
    }
    50% {
        transform: scaleX(-1) translateY(-3px);
    }
}

@keyframes sleigh-bounce {
    0%, 100% {
        transform: translateY(0);
    }
    50% {
        transform: translateY(-2px);
    }
}

@keyframes sparkle-fade {
    0% {
        opacity: 0.8;
        transform: scale(1);
    }
    100% {
        opacity: 0;
        transform: scale(0.5);
    }
}

@media (max-width: 768px) {
    .dyor-settings-header .reindeer-container {
        font-size: var(--font-lg-desktop);
        animation-duration: 15s;
    }

    .dyor-settings-header .header-snowflake:nth-child(even) {
        display: none;
    }
}

@media (max-width: 480px) {
    .dyor-settings-header .reindeer-container {
        font-size: var(--font-body-desktop);
        animation-duration: 12s;
    }

    .dyor-settings-header .sparkle-trail {
        display: none;
    }
}

@media (prefers-reduced-motion: reduce) {
    .dyor-settings-header .reindeer-container,
    .dyor-settings-header .header-snowflakes {
        display: none;
    }
}

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

html {
    overflow-y: scroll;
    overscroll-behavior: none;
}

body {
    font-family: var(--font-body);
    background-color: var(--bg-darker);
    color: var(--text-primary);
    line-height: var(--line-height-relaxed);
    min-height: 100vh;
    padding: 0;
    margin: 0;
    overscroll-behavior: none;
    visibility: visible;
}

body.modal-open {
    overflow: hidden;
}

.notes-container {
    max-width: 1400px;
    margin: 0 auto;
    /* stylelint-disable-next-line color-no-hex, scale-unlimited/declaration-strict-value */
    padding: var(--space-5) 30px var(--space-10);
}

.page-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    gap: var(--space-4);
    margin-bottom: var(--space-5);
}

.search-container {
    position: relative;
    flex: 1;
    max-width: 400px;
}

.search-container i {
    position: absolute;
    left: var(--space-4);
    top: 50%;
    transform: translateY(-50%);
    color: var(--text-secondary);
    font-size: var(--font-small-desktop);
}

.search-container input {
    width: 100%;
    background: var(--bg-table);
    border: 1px solid var(--border-color);
    color: var(--text-primary);
    /* stylelint-disable-next-line color-no-hex, scale-unlimited/declaration-strict-value */
    padding: var(--space-3) var(--space-4) var(--space-3) 44px;
    border-radius: var(--radius-md-plus);
    font-size: var(--font-small-desktop);
    font-family: var(--font-body);
    transition: all var(--duration-base) var(--ease-default);
}

.search-container input:focus {
    outline: none;
    border-color: var(--accent-primary);
    box-shadow: var(--shadow-focus);
}

.search-container input::placeholder {
    color: var(--text-secondary);
}

.button-primary {
    display: inline-flex;
    align-items: center;
    gap: var(--space-2);
    background: var(--accent-primary);
    color: var(--bg-darker);
    border: none;
    padding: var(--space-3) var(--space-5);
    border-radius: var(--radius-md-plus);
    font-size: var(--font-small-desktop);
    font-weight: var(--font-weight-semibold);
    cursor: pointer;
    transition: all var(--duration-base) var(--ease-default);
    font-family: var(--font-body);
    white-space: nowrap;
}

@media (hover: hover) and (pointer: fine) {
    .button-primary:hover {
        background: var(--accent-primary-pressed);
        transform: translateY(-1px);
        box-shadow: var(--shadow-accent-md);
    }
}

.tags-filter {
    display: flex;
    flex-wrap: wrap;
    gap: var(--space-2-5);
    margin-bottom: var(--space-5);
}

.tags-filter .tag {
    padding: var(--space-1-5) var(--space-3-5);
    border-radius: var(--radius-2xl);
    color: var(--text-primary);
    cursor: pointer;
    display: inline-flex;
    align-items: center;
    white-space: nowrap;
    font-size: var(--font-xs-desktop);
    font-weight: var(--font-weight-medium);
    transition: all var(--duration-base) var(--ease-default);
    border: 2px solid transparent;
}

@media (hover: hover) and (pointer: fine) {
    .tags-filter .tag:hover {
        transform: translateY(-1px);
        box-shadow: var(--shadow-accent-sm);
    }
}

.tags-filter .tag.selected {
    border-color: var(--accent-primary);
    box-shadow: var(--shadow-focus-strong);
}

.loading-container {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    padding: var(--space-20) var(--space-5);
    color: var(--text-secondary);
    gap: var(--space-4);
}

.spinner {
    width: 48px;
    height: 48px;
    border: 4px solid var(--border-color);
    border-top-color: var(--accent-primary);
    border-radius: var(--radius-circle);
    animation: spin 1s linear infinite;
}

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

.error-container {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    padding: var(--space-20) var(--space-5);
    gap: var(--space-4);
    color: var(--negative);
}

.error-container i {
    font-size: var(--icon-lg);
}

.retry-btn {
    background: var(--accent-primary);
    color: var(--bg-darker);
    border: none;
    padding: var(--space-3) var(--space-6);
    border-radius: var(--radius-lg);
    font-size: var(--font-small-desktop);
    font-weight: var(--font-weight-medium);
    cursor: pointer;
    transition: all var(--duration-slow) var(--ease-default);
    font-family: var(--font-body);
}

@media (hover: hover) and (pointer: fine) {
    .retry-btn:hover {
        background: var(--accent-primary-pressed);
        transform: translateY(-2px);
    }
}

.empty-state {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    padding: var(--space-20) var(--space-5);
    gap: var(--space-4);
    color: var(--text-secondary);
}

.empty-state i {
    font-size: var(--icon-xl);
    opacity: 0.5;
}

.empty-state h3 {
    font-size: var(--font-h3-desktop);
    font-weight: var(--font-weight-semibold);
    color: var(--text-primary);
    margin: 0;
}

.empty-state p {
    font-size: var(--font-small-desktop);
    color: var(--text-secondary);
    max-width: 400px;
    text-align: center;
}

.notes-table-container {
    background: var(--bg-table);
    border-radius: var(--radius-xl);
    border: 1px solid var(--border-color);
    overflow: hidden;
    box-shadow: var(--shadow-md);
}

.notes-table {
    width: 100%;
    border-collapse: collapse;
    table-layout: auto;
}

.notes-table thead {
    background: var(--bg-dark);
}

.notes-table thead th {
    padding: var(--space-4) var(--space-5);
    text-align: left;
    font-size: var(--font-xs-desktop);
    font-weight: var(--font-weight-semibold);
    color: var(--text-secondary);
    text-transform: uppercase;
    letter-spacing: var(--letter-spacing-wide);
    white-space: nowrap;
    border-bottom: 1px solid var(--border-color);
}

.notes-table thead th a {
    color: var(--text-secondary);
    text-decoration: none;
    cursor: pointer;
    display: inline-flex;
    align-items: center;
    gap: var(--space-2);
    transition: color var(--duration-base) var(--ease-default);
}

.notes-table thead th a::after {
    content: '';
    display: inline-block;
    width: 0;
    height: 0;
    border: 5px solid transparent;
    transition: border-color var(--duration-base) var(--ease-default);
}

.notes-table thead th a.sort-asc::after {
    border-bottom-color: var(--accent-primary);
}

.notes-table thead th a.sort-desc::after {
    border-top-color: var(--accent-primary);
}

@media (hover: hover) and (pointer: fine) {
    .notes-table thead th a:hover {
        color: var(--accent-primary);
    }
}

.notes-table tbody tr {
    border-bottom: 1px solid var(--border-color);
    transition: background var(--duration-base) var(--ease-default);
}

.notes-table tbody tr:last-child {
    border-bottom: none;
}

@media (hover: hover) and (pointer: fine) {
    .notes-table tbody tr:hover {
        background: var(--accent-primary-bg-faint);
        box-shadow: inset 3px 0 0 var(--accent-primary);
    }
}

.notes-table tbody td {
    padding: var(--space-4) var(--space-5);
    font-size: var(--font-small-desktop);
    color: var(--text-primary);
    vertical-align: top;
}

.notes-table tbody td a {
    color: var(--accent-primary);
    text-decoration: none;
    font-weight: var(--font-weight-medium);
    transition: color var(--duration-base) var(--ease-default);
}

@media (hover: hover) and (pointer: fine) {
    .notes-table tbody td a:hover {
        color: var(--accent-primary-pressed);
        text-decoration: underline;
    }
}

.notes-table .note-column {
    max-width: 400px;
    width: 35%;
    overflow-wrap: break-word;
    white-space: pre-wrap;
}

.note-cell {
    display: flex;
    align-items: flex-start;
    gap: var(--space-3);
}

.note-text {
    flex: 1;
    white-space: pre-wrap;
    word-break: break-word;
}

.btn-edit {
    background: transparent;
    border: 1px solid var(--border-color);
    color: var(--text-secondary);
    padding: var(--space-1-5) var(--space-3);
    border-radius: var(--radius-sm-plus);
    font-size: var(--font-2xs-desktop);
    font-weight: var(--font-weight-medium);
    cursor: pointer;
    transition: all var(--duration-base) var(--ease-default);
    font-family: var(--font-body);
    white-space: nowrap;
    flex-shrink: 0;
}

@media (hover: hover) and (pointer: fine) {
    .btn-edit:hover {
        background: var(--bg-dark);
        color: var(--accent-primary);
        border-color: var(--accent-primary);
    }
}

.price-positive {
    color: var(--positive);
}

.price-negative {
    color: var(--negative);
}

.price-neutral {
    color: var(--text-secondary);
}

.tags-container {
    display: flex;
    flex-wrap: wrap;
    gap: var(--space-1-5);
}

.tags-container .tag {
    padding: var(--space-1) var(--space-2-5);
    border-radius: var(--radius-lg);
    color: var(--text-primary);
    font-size: var(--font-3xs-desktop);
    font-weight: var(--font-weight-medium);
    white-space: nowrap;
}

.tags-container .no-tags {
    color: var(--text-secondary);
    font-size: var(--font-2xs-desktop);
    font-style: italic;
}

.modal-overlay {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: rgba(0, 0, 0, 0.8);
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: var(--z-modal);
    padding: var(--space-5);
    backdrop-filter: blur(4px);
}

.modal-overlay.hidden {
    display: none;
}

.modal-overlay .modal {
    display: block;
    position: relative;
    top: auto;
    left: auto;
    right: auto;
    bottom: auto;
    background: var(--bg-table);
    border-radius: var(--radius-xl);
    max-width: 600px;
    width: 100%;
    height: auto;
    max-height: 90vh;
    overflow-y: auto;
    box-shadow: var(--shadow-xl);
    border: 1px solid var(--border-color);
}

.modal-overlay .modal.modal-small {
    max-width: 400px;
}

.modal-overlay .modal.modal-large {
    max-width: 700px;
}

.modal-overlay .modal-header {
    padding: var(--space-6) var(--space-7);
    border-bottom: 1px solid var(--border-color);
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.modal-overlay .modal-header h3 {
    font-size: var(--font-h4-desktop);
    font-weight: var(--font-weight-bold);
    color: var(--text-primary);
    margin: 0;
}

.modal-overlay .modal-close {
    background: transparent;
    border: none;
    color: var(--text-secondary);
    width: 32px;
    height: 32px;
    border-radius: var(--radius-md);
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    transition: all var(--duration-base) var(--ease-default);
}

@media (hover: hover) and (pointer: fine) {
    .modal-overlay .modal-close:hover {
        background: var(--bg-dark);
        color: var(--text-primary);
    }
}

.modal-overlay .modal-body {
    padding: var(--space-6) var(--space-7);
}

.modal-overlay .modal-body p {
    color: var(--text-secondary);
    font-size: var(--font-small-desktop);
    line-height: var(--line-height-relaxed);
}

.modal-overlay .modal-footer {
    padding: var(--space-5) var(--space-7);
    border-top: 1px solid var(--border-color);
    display: flex;
    justify-content: flex-end;
    gap: var(--space-3);
}

.form-group {
    margin-bottom: var(--space-5);
}

.form-group:last-child {
    margin-bottom: 0;
}

.modal-overlay .form-group label {
    display: block;
    font-size: var(--font-small-desktop);
    font-weight: var(--font-weight-semibold);
    color: var(--text-primary) !important;
    margin-bottom: var(--space-2);
}

.modal-overlay .form-group input[type="text"],
.modal-overlay .form-group textarea {
    width: 100%;
    background: var(--bg-dark) !important;
    border: 1px solid var(--border-color) !important;
    color: var(--text-primary) !important;
    padding: var(--space-3) var(--space-4);
    border-radius: var(--radius-md-plus);
    font-size: var(--font-small-desktop);
    font-family: var(--font-body);
    transition: all var(--duration-base) var(--ease-default);
}

.modal-overlay .form-group input:focus,
.modal-overlay .form-group textarea:focus {
    outline: none;
    border-color: var(--accent-primary) !important;
    box-shadow: var(--shadow-focus) !important;
}

.modal-overlay .form-group textarea {
    resize: vertical;
    min-height: 120px;
}

.modal-overlay .tags-input {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: var(--space-2);
    padding: var(--space-2-5) var(--space-3);
    background: var(--bg-dark) !important;
    border: 1px solid var(--border-color) !important;
    border-radius: var(--radius-md-plus);
}

.tags-input .tag {
    padding: var(--space-1-5) var(--space-3);
    border-radius: var(--radius-xl);
    color: var(--text-primary);
    cursor: pointer;
    font-size: var(--font-xs-desktop);
    font-weight: var(--font-weight-medium);
    transition: all var(--duration-base) var(--ease-default);
    border: 2px solid transparent;
}

@media (hover: hover) and (pointer: fine) {
    .tags-input .tag:hover {
        transform: translateY(-1px);
    }
}

.tags-input .tag.selected {
    border-color: var(--accent-primary);
    box-shadow: var(--shadow-focus-strong);
}

.tags-input .no-tags-message {
    color: var(--text-secondary);
    font-size: var(--font-xs-desktop);
}

.button-link {
    background: transparent;
    border: none;
    color: var(--accent-primary);
    font-size: var(--font-xs-desktop);
    font-weight: var(--font-weight-medium);
    cursor: pointer;
    padding: var(--space-2) 0;
    transition: color var(--duration-base) var(--ease-default);
    font-family: var(--font-body);
}

@media (hover: hover) and (pointer: fine) {
    .button-link:hover {
        color: var(--accent-primary-pressed);
        text-decoration: underline;
    }
}

.tags-actions {
    display: flex;
    align-items: center;
    gap: var(--space-4);
    margin-top: var(--space-2);
}

.tag-creator {
    display: flex;
    flex-direction: column;
    gap: var(--space-3);
    margin-top: var(--space-3);
    padding: var(--space-4);
    border: 1px solid var(--border-color);
    border-radius: var(--radius-md-plus);
}

.tag-creator-footer {
    display: flex;
    justify-content: flex-end;
    gap: var(--space-3);
}

.color-swatches {
    display: flex;
    flex-wrap: wrap;
    gap: var(--space-2);
}

.color-swatch {
    width: 32px;
    height: 32px;
    padding: 0;
    border: 2px solid var(--border-color);
    border-radius: var(--radius-circle);
    cursor: pointer;
    transition: transform var(--duration-fast) var(--ease-default), border-color var(--duration-fast) var(--ease-default), box-shadow var(--duration-fast) var(--ease-default);
}

@media (hover: hover) and (pointer: fine) {
    .color-swatch:hover {
        transform: scale(1.1);
    }
}

.color-swatch.selected {
    border-color: var(--accent-primary);
    box-shadow: var(--shadow-focus-strong);
}

.cancel-btn {
    background: transparent;
    border: 1px solid var(--border-color);
    color: var(--text-secondary);
    padding: var(--space-3) var(--space-6);
    border-radius: var(--radius-md-plus);
    font-size: var(--font-small-desktop);
    font-weight: var(--font-weight-medium);
    cursor: pointer;
    transition: all var(--duration-base) var(--ease-default);
    font-family: var(--font-body);
}

@media (hover: hover) and (pointer: fine) {
    .cancel-btn:hover {
        background: var(--bg-dark);
        color: var(--text-primary);
        border-color: var(--text-secondary);
    }
}

.save-btn {
    background: var(--accent-primary);
    color: var(--bg-darker);
    border: none;
    padding: var(--space-3) var(--space-6);
    border-radius: var(--radius-md-plus);
    font-size: var(--font-small-desktop);
    font-weight: var(--font-weight-medium);
    cursor: pointer;
    transition: all var(--duration-base) var(--ease-default);
    font-family: var(--font-body);
}

@media (hover: hover) and (pointer: fine) {
    .save-btn:hover {
        background: var(--accent-primary-pressed);
        transform: translateY(-1px);
        box-shadow: var(--shadow-accent-md);
    }
}

.danger-btn {
    background: var(--negative);
    color: white;
    border: none;
    padding: var(--space-3) var(--space-6);
    border-radius: var(--radius-md-plus);
    font-size: var(--font-small-desktop);
    font-weight: var(--font-weight-medium);
    cursor: pointer;
    transition: all var(--duration-base) var(--ease-default);
    font-family: var(--font-body);
}

@media (hover: hover) and (pointer: fine) {
    .danger-btn:hover {
        background: var(--negative-pressed);
        transform: translateY(-1px);
        box-shadow: var(--shadow-danger);
    }
}

.hidden {
    display: none !important;
}

.modal-overlay .autocomplete-container {
    position: relative;
}

.modal-overlay .autocomplete-container input {
    width: 100%;
    background: var(--bg-dark) !important;
    border: 1px solid var(--border-color) !important;
    color: var(--text-primary) !important;
    padding: var(--space-3) var(--space-4);
    border-radius: var(--radius-md-plus);
    font-size: var(--font-small-desktop);
    font-family: var(--font-body);
    transition: all var(--duration-base) var(--ease-default);
}

.modal-overlay .autocomplete-container input:focus {
    outline: none;
    border-color: var(--accent-primary) !important;
    box-shadow: var(--shadow-focus) !important;
}

.modal-overlay .autocomplete-items {
    position: absolute;
    top: 100%;
    left: 0;
    right: 0;
    background: var(--bg-table) !important;
    border: 1px solid var(--border-color) !important;
    border-radius: var(--radius-md-plus);
    margin-top: var(--space-1);
    max-height: 200px;
    overflow-y: auto;
    z-index: var(--z-fixed);
    box-shadow: 0 8px 24px rgba(0, 0, 0, 0.4);
}

.modal-overlay .autocomplete-items div {
    padding: var(--space-3) var(--space-4);
    cursor: pointer;
    color: var(--text-primary) !important;
    font-size: var(--font-small-desktop);
    transition: background var(--duration-base) var(--ease-default);
    border-bottom: 1px solid var(--border-color);
}

.modal-overlay .autocomplete-items div:last-child {
    border-bottom: none;
}

@media (hover: hover) and (pointer: fine) {
    .modal-overlay .autocomplete-items div:hover {
        background: var(--bg-dark) !important;
        color: var(--accent-primary) !important;
    }
}

.modal-overlay .autocomplete-items div strong {
    color: var(--accent-primary) !important;
}

@media (max-width: 768px) {
    .notes-container {
        padding: var(--space-4);
    }

    .page-header {
        flex-direction: column;
        align-items: stretch;
    }

    .search-container {
        max-width: none;
    }

    .notes-table-container {
        overflow-x: auto;
    }

    .notes-table {
        min-width: 800px;
    }

    .notes-table thead th,
    .notes-table tbody td {
        padding: var(--space-3) var(--space-4);
    }

    .notes-table .note-column {
        max-width: 250px;
        width: auto;
    }

    .modal-overlay .modal {
        max-width: 100%;
        margin: 0;
        border-radius: var(--radius-xl) var(--radius-xl) 0 0;
        max-height: 95vh;
    }

    .modal-overlay .modal-footer {
        flex-direction: column-reverse;
    }

    .modal-overlay .modal-footer button {
        width: 100%;
    }
}

@media (max-width: 480px) {
    .notes-container {
        padding: var(--space-3);
    }

    .button-primary span {
        display: none;
    }

    .button-primary {
        padding: var(--space-3) var(--space-4);
    }

    .tags-filter .tag {
        padding: var(--space-1) var(--space-2-5);
        font-size: var(--font-2xs-desktop);
    }
}

/* Shared depth-screener design (Market Depths V1 + Screener V2), matching the
   DYOR Screeners design mock. Scoped under .scr-screener — both controllers add
   that class to their root so styles don't leak when bundled on /screeners. */

.scr-screener .scr-hidden {
    display: none !important;
}

/* ── State containers (loading / error / empty) — shared by all 4 screeners ── */
.scr-screener .state-container {
    min-height: 360px;
}

.scr-screener .skeleton-table {
    background-color: var(--bg-table);
    border: 1px solid var(--border-color);
    border-radius: var(--radius-lg);
    padding: var(--space-5);
}

.scr-screener .skeleton-row {
    height: 44px;
    margin-bottom: var(--space-3);
    border-radius: var(--radius-md);
    background: linear-gradient(90deg, var(--bg-darker) 25%, var(--bg-table) 50%, var(--bg-darker) 75%);
    background-size: 200% 100%;
    animation: scrStateShimmer 1.5s infinite;
}

.scr-screener .skeleton-row.skeleton-header {
    height: 52px;
    background: linear-gradient(90deg, var(--border-color) 25%, var(--bg-table) 50%, var(--border-color) 75%);
    background-size: 200% 100%;
}

@keyframes scrStateShimmer {
    0% {
        background-position: 200% 0;
    }

    100% {
        background-position: -200% 0;
    }
}

.scr-screener .state-content {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    text-align: center;
    min-height: 360px;
    padding: var(--space-10) var(--space-5);
    background-color: var(--bg-table);
    border: 1px solid var(--border-color);
    border-radius: var(--radius-lg);
}

.scr-screener .state-content svg {
    color: var(--text-tertiary);
    margin-bottom: var(--space-5);
    opacity: 0.7;
}

.scr-screener .state-error .state-content svg {
    color: var(--negative);
    opacity: 1;
}

.scr-screener .state-title {
    font-family: var(--font-heading);
    font-size: var(--font-h4-desktop);
    font-weight: var(--font-weight-semibold);
    color: var(--text-primary);
    margin: 0 0 var(--space-2-5) 0;
}

.scr-screener .state-message {
    font-size: var(--font-small-desktop);
    color: var(--text-secondary);
    max-width: 440px;
    margin: 0 0 var(--space-6) 0;
}

/* ── Collapsible sections ───────────────────────────────────── */
.scr-screener .scr-section {
    background-color: var(--bg-table);
    border: 1px solid var(--border-color);
    border-radius: var(--radius-lg);
    overflow: hidden;
    margin-bottom: var(--space-4);
}

.scr-screener .scr-section-head {
    display: flex;
    align-items: center;
    gap: var(--space-2);
    width: 100%;
    padding: var(--space-3-5) var(--space-5);
    background-color: transparent;
    border: none;
    cursor: pointer;
    color: var(--text-primary);
    font-family: var(--font-body);
    font-size: var(--font-small-desktop);
    font-weight: var(--font-weight-semibold);
}

.scr-screener .scr-section-chevron {
    color: var(--text-tertiary);
    font-size: var(--font-xs-desktop);
    transition: transform var(--duration-base) var(--ease-default);
}

.scr-screener .scr-section-head[aria-expanded="false"] .scr-section-chevron {
    transform: rotate(-90deg);
}

.scr-screener .scr-section-meta {
    color: var(--text-tertiary);
    font-size: var(--font-xs-desktop);
    font-weight: var(--font-weight-regular);
}

.scr-screener .scr-section-meta::before {
    content: "· ";
}

.scr-screener .scr-section-body {
    padding: var(--space-5);
    border-top: 1px solid var(--border-color);
}

/* The section header is a low-stakes collapse toggle (the chevron is the affordance);
   drop the focus ring entirely so it never shows the ugly default outline. */
.scr-screener .scr-section-head:focus {
    outline: none;
}

.scr-screener .scr-btn:focus:not(:focus-visible),
.scr-screener .scr-colpill:focus:not(:focus-visible) {
    outline: none;
}

/* Live indicator sits at the right edge of a section header (stays visible when collapsed). */
.scr-screener .scr-section-live {
    margin-left: auto;
}

/* ── Filter builder ─────────────────────────────────────────── */
.scr-screener .scr-filter-row {
    display: flex;
    align-items: flex-end;
    flex-wrap: wrap;
    gap: var(--space-3);
}

/* Fields carry a bottom margin; mirror it on the standalone Add Filter button
   so flex-end aligns their visible edges (button has no field wrapper). */
.scr-screener .scr-filter-row .scr-add-filter {
    margin-bottom: var(--space-2);
}

.scr-screener .scr-field {
    display: flex;
    flex-direction: column;
    gap: var(--space-2);
}

.scr-screener .scr-field-label {
    font-size: var(--font-3xs-desktop);
    font-weight: var(--font-weight-bold);
    letter-spacing: 0.6px;
    text-transform: uppercase;
    color: var(--text-tertiary);
}

.scr-screener .scr-select {
    position: relative;
    display: inline-flex;
}

.scr-screener .scr-select-el {
    appearance: none;
    -webkit-appearance: none;
    height: 40px;
    min-width: 130px;
    width: 100%;
    padding: 0 var(--space-8) 0 var(--space-3);
    background-color: var(--bg-dark);
    border: 1px solid var(--border-color);
    border-radius: var(--radius-md);
    color: var(--text-primary);
    font-family: var(--font-body);
    font-size: var(--font-small-desktop);
    font-weight: var(--font-weight-medium);
    cursor: pointer;
    transition: border-color var(--duration-base) var(--ease-default);
}

.scr-screener .scr-select-el:focus {
    outline: none;
    border-color: var(--accent-primary);
}

.scr-screener .scr-select::after {
    content: '';
    position: absolute;
    right: 14px;
    top: 50%;
    transform: translateY(-50%);
    width: 0;
    height: 0;
    border-left: 4px solid transparent;
    border-right: 4px solid transparent;
    border-top: 5px solid var(--text-tertiary);
    pointer-events: none;
}

.scr-screener .scr-input {
    height: 40px;
    min-width: 130px;
    padding: 0 var(--space-3);
    background-color: var(--bg-dark);
    border: 1px solid var(--border-color);
    border-radius: var(--radius-md);
    color: var(--text-primary);
    font-family: var(--font-body);
    font-size: var(--font-small-desktop);
    font-variant-numeric: tabular-nums;
}

.scr-screener .scr-input:focus {
    outline: none;
    border-color: var(--accent-primary);
}

/* ── Buttons ────────────────────────────────────────────────── */
.scr-screener .scr-btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: var(--space-2);
    height: 40px;
    padding: 0 var(--space-4);
    border-radius: var(--radius-md);
    border: 1px solid transparent;
    font-family: var(--font-body);
    font-size: var(--font-small-desktop);
    font-weight: var(--font-weight-semibold);
    letter-spacing: 0.3px;
    white-space: nowrap;
    cursor: pointer;
    transition: all var(--duration-base) var(--ease-default);
}

.scr-screener .scr-btn-icon {
    width: 40px;
    padding: 0;
}

.scr-screener .scr-btn-primary {
    background-color: var(--accent-primary);
    color: var(--bg-darker);
}

.scr-screener .scr-btn-primary:hover {
    background-color: var(--accent-primary-pressed);
}

.scr-screener .scr-btn-secondary {
    background-color: transparent;
    border-color: var(--border-color);
    color: var(--text-secondary);
}

.scr-screener .scr-btn-secondary:hover {
    border-color: var(--accent-primary);
    color: var(--accent-primary);
}

.scr-screener .scr-btn-danger {
    background-color: transparent;
    border-color: var(--negative);
    color: var(--negative);
}

.scr-screener .scr-btn-danger:hover {
    background-color: var(--negative-bg);
}

/* ── Segmented control (shared: V1 spot/futures, Minerva source/signal) ─── */
.scr-screener .scr-toolbar {
    display: flex;
    align-items: center;
    gap: var(--space-3);
    margin-bottom: var(--space-4);
}

.scr-screener .scr-seg {
    display: inline-flex;
    gap: var(--space-1);
    padding: var(--space-1);
    background-color: var(--bg-darker);
    border: 1px solid var(--border-color);
    border-radius: var(--radius-md);
}

.scr-screener .scr-seg input[type="radio"] {
    display: none;
}

.scr-screener .scr-seg label {
    margin: 0;
    padding: var(--space-1-5) var(--space-4);
    border-radius: var(--radius-sm-plus);
    font-family: var(--font-body);
    font-size: var(--font-small-desktop);
    font-weight: var(--font-weight-semibold);
    color: var(--text-secondary);
    cursor: pointer;
    user-select: none;
    white-space: nowrap;
    transition: all var(--duration-base) var(--ease-default);
}

.scr-screener .scr-seg label:hover {
    color: var(--accent-primary);
}

.scr-screener .scr-seg input[type="radio"]:checked + label {
    background-color: var(--accent-primary);
    color: var(--bg-darker);
}

.scr-screener .scr-seg input[type="radio"]:checked + label:hover {
    color: var(--bg-darker);
}

.scr-screener .scr-seg input[type="radio"]:disabled + label {
    opacity: 0.5;
    cursor: not-allowed;
    pointer-events: none;
}

/* ── Live indicator (shared, all four screeners) ────────────── */
.scr-screener .scr-live {
    display: inline-flex;
    align-items: center;
    gap: var(--space-2);
    font-family: var(--font-body);
    font-size: var(--font-2xs-desktop);
    letter-spacing: 0.3px;
    color: var(--text-tertiary);
    white-space: nowrap;
}

.scr-screener .scr-live-clock {
    font-size: var(--font-3xs-desktop);
    opacity: 0.7;
}

.scr-screener .scr-live-dot {
    position: relative;
    width: 7px;
    height: 7px;
    border-radius: var(--radius-circle);
    background-color: var(--accent-primary);
    box-shadow: 0 0 6px var(--accent-primary);
    animation: scrLivePulse 2s ease-in-out infinite;
}

.scr-screener .scr-live-dot::after {
    content: '';
    position: absolute;
    inset: 0;
    border-radius: var(--radius-circle);
    background-color: var(--accent-primary);
    opacity: 0;
}

.scr-screener .scr-live.flash .scr-live-dot::after {
    animation: scrLivePing 0.7s ease-out;
}

@keyframes scrLivePulse {
    0%,
    100% {
        opacity: 1;
    }

    50% {
        opacity: 0.35;
    }
}

@keyframes scrLivePing {
    0% {
        transform: scale(1);
        opacity: 0.7;
    }

    100% {
        transform: scale(3.6);
        opacity: 0;
    }
}

/* ── Active filters row ─────────────────────────────────────── */
.scr-screener .scr-filter-active {
    display: flex;
    align-items: center;
    flex-wrap: wrap;
    gap: var(--space-2);
    margin-top: var(--space-4);
}

.scr-screener .scr-chips {
    display: inline-flex;
    flex-wrap: wrap;
    gap: var(--space-2);
}

.scr-screener .scr-chip {
    display: inline-flex;
    align-items: center;
    gap: var(--space-2);
    height: 34px;
    padding: 0 var(--space-2-5) 0 var(--space-3);
    background-color: var(--accent-primary-bg);
    border: 1px solid var(--accent-primary);
    border-radius: var(--radius-full);
    color: var(--accent-primary);
    font-size: var(--font-xs-desktop);
    font-weight: var(--font-weight-semibold);
    cursor: pointer;
}

.scr-screener .scr-chip i {
    opacity: 0.8;
}

.scr-screener .scr-flex-spacer {
    flex: 1;
}

/* ── Preset bar ─────────────────────────────────────────────── */
.scr-screener .scr-preset-bar {
    display: flex;
    align-items: center;
    flex-wrap: wrap;
    gap: var(--space-2);
    margin-top: var(--space-4);
}

.scr-screener .scr-preset-select {
    min-width: 200px;
}

.scr-screener .scr-preset-modified {
    display: inline-flex;
    align-items: center;
    height: 24px;
    padding: 0 var(--space-2);
    border-radius: var(--radius-sm);
    background-color: var(--negative-bg);
    color: var(--alert);
    font-size: var(--font-3xs-desktop);
    font-weight: var(--font-weight-bold);
    letter-spacing: 0.5px;
    text-transform: uppercase;
}

/* ── Column selection pills ─────────────────────────────────── */
.scr-screener .scr-columns {
    display: flex;
    flex-wrap: wrap;
    gap: var(--space-2-5);
    justify-content: center;
}

.scr-screener .scr-colpill {
    display: inline-flex;
    align-items: center;
    gap: var(--space-2);
    height: 36px;
    padding: 0 var(--space-3-5);
    border-radius: var(--radius-md);
    border: 1px solid var(--border-color);
    background-color: transparent;
    color: var(--text-secondary);
    font-family: var(--font-body);
    font-size: var(--font-xs-desktop);
    font-weight: var(--font-weight-medium);
    cursor: pointer;
    transition: all var(--duration-base) var(--ease-default);
}

.scr-screener .scr-colpill.on {
    border-color: var(--accent-primary);
    background-color: var(--accent-primary-bg);
    color: var(--accent-primary);
}

.scr-screener .scr-colpill-box {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 16px;
    height: 16px;
    border-radius: var(--radius-sm);
    border: 1.5px solid var(--text-tertiary);
}

.scr-screener .scr-colpill.on .scr-colpill-box {
    border-color: var(--accent-primary);
    background-color: var(--accent-primary);
    color: var(--bg-darker);
    font-size: var(--font-3xs-desktop);
}

/* ── Table ──────────────────────────────────────────────────── */
.scr-screener .scr-table-card {
    background-color: var(--bg-table);
    border: 1px solid var(--border-color);
    border-radius: var(--radius-lg);
    overflow: hidden;
}

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

.scr-screener .scr-table {
    width: 100%;
    border-collapse: collapse;
    min-width: 760px;
}

.scr-screener .scr-table thead {
    background-color: var(--bg-darker);
}

.scr-screener .scr-table th {
    padding: var(--space-3) var(--space-3-5);
    font-size: var(--font-3xs-desktop);
    font-weight: var(--font-weight-semibold);
    text-transform: uppercase;
    letter-spacing: 0.5px;
    color: var(--text-tertiary);
    white-space: nowrap;
    border-bottom: 2px solid var(--border-color);
    cursor: pointer;
    user-select: none;
}

.scr-screener .scr-table th.th-left {
    text-align: left;
}

.scr-screener .scr-table th.th-num {
    text-align: right;
}

.scr-screener .scr-table th:hover {
    color: var(--text-secondary);
}

.scr-screener .scr-caret {
    color: var(--accent-primary);
    font-size: var(--font-3xs-desktop);
}

.scr-screener .scr-table tbody tr {
    transition: background-color var(--duration-base) var(--ease-default);
}

.scr-screener .scr-table tbody tr:hover {
    background-color: var(--accent-primary-bg-faint);
}

.scr-screener .scr-table td {
    padding: var(--space-3) var(--space-3-5);
    font-size: var(--font-xs-desktop);
    color: var(--text-primary);
    white-space: nowrap;
    border-bottom: 1px solid var(--border-color);
}

.scr-screener .scr-table tbody tr:last-child td {
    border-bottom: none;
}

.scr-screener .scr-table .td-coin {
    font-weight: var(--font-weight-semibold);
}

.scr-screener .scr-table .td-num {
    text-align: right;
    font-variant-numeric: tabular-nums;
}

.scr-screener .scr-table .td-peak {
    color: var(--accent-primary);
    font-weight: var(--font-weight-semibold);
}

.scr-screener .scr-ticker {
    color: var(--accent-primary);
    font-weight: var(--font-weight-semibold);
    text-decoration: none;
}

.scr-screener .scr-ticker:hover {
    text-decoration: underline;
}

/* ── Custom modals ──────────────────────────────────────────── */
.scr-screener .scr-modal {
    position: fixed;
    inset: 0;
    z-index: 1000;
    display: flex;
    align-items: center;
    justify-content: center;
    background-color: rgba(0, 0, 0, 0.6);
}

.scr-screener .scr-modal-box {
    display: flex;
    flex-direction: column;
    gap: var(--space-4);
    width: 360px;
    max-width: 90vw;
    padding: var(--space-6);
    background-color: var(--bg-table);
    border: 1px solid var(--border-color);
    border-radius: var(--radius-lg);
}

.scr-screener .scr-modal-title {
    font-size: var(--font-lg-desktop);
    font-weight: var(--font-weight-semibold);
    color: var(--text-primary);
}

.scr-screener .scr-modal-input {
    width: 100%;
}

.scr-screener .scr-modal-actions {
    display: flex;
    justify-content: flex-end;
    gap: var(--space-2);
}

/* ── Responsive ─────────────────────────────────────────────── */
@media (max-width: 768px) {
    .scr-screener .scr-field,
    .scr-screener .scr-select,
    .scr-screener .scr-select-el,
    .scr-screener .scr-input {
        width: 100%;
    }

    .scr-screener .scr-filter-row > * {
        width: 100%;
    }
}

/* Toast Container */
.toast-container {
    position: fixed;
    top: 20px;
    right: 20px;
    z-index: 9999;
}

/* Toast Message */
.toast {
    background-color: var(--text-tertiary);
    color: white;
    padding: var(--space-4);
    margin-top: var(--space-2-5);
    border-radius: var(--radius-sm);
    opacity: 0;
    transition: opacity 0.5s;
}

/* Success Toast */
.toast-success {
    background-color: var(--success);
}

/* Error Toast */
.toast-error {
    background-color: var(--error);
}

/* Screener V2 — extras on top of the shared depth-screener design
   (screener/styles.css, scoped .scr-screener). Scoped under .scr-v2. */

.scr-v2 .scr-select-sm .scr-select-el {
    min-width: 84px;
}

.scr-v2 .coin-row {
    cursor: pointer;
}

.scr-v2 .scr-note-icon {
    margin-left: var(--space-2-5);
    color: var(--text-tertiary);
    cursor: pointer;
    transition: color var(--duration-base) var(--ease-default);
}

.scr-v2 .scr-note-icon:hover {
    color: var(--accent-primary);
}

/* Expandable row */
.scr-v2 .expanded-row td {
    padding: 0;
    border-bottom: 1px solid var(--border-color);
    background-color: var(--bg-darker);
}

.scr-v2 .expanded-content {
    max-height: 220px;
    overflow-y: auto;
    padding: var(--space-4) var(--space-5);
}

.scr-v2 .scr-expand-title {
    font-size: var(--font-xs-desktop);
    font-weight: var(--font-weight-semibold);
    color: var(--text-secondary);
    margin-bottom: var(--space-2-5);
}

.scr-v2 .scr-expand-list {
    margin: 0;
    padding-left: var(--space-5);
    display: flex;
    flex-direction: column;
    gap: var(--space-1);
}

.scr-v2 .scr-expand-list li {
    font-size: var(--font-xs-desktop);
    color: var(--text-primary);
    font-variant-numeric: tabular-nums;
}

/* Loader spinner inside an expanding row */
.scr-v2 .scr-loader {
    width: 20px;
    height: 20px;
    border: 2px solid var(--border-color);
    border-top-color: var(--accent-primary);
    border-radius: var(--radius-circle);
    animation: scrV2Spin 0.7s linear infinite;
}

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

/* Signal-screener design (Screener V3 + Minerva) matching the DYOR Screeners
   mock. Scoped under .scr-signal — sits on top of the shared depth-screener
   chrome (screener/styles.css, .scr-screener) which both controllers also add. */

/* ── Table: sort indicator + cell variants ──────────────────── */
.scr-signal .scr-table th {
    position: relative;
}

.scr-signal .scr-table th.sort-asc,
.scr-signal .scr-table th.sort-desc {
    color: var(--accent-primary);
}

.scr-signal .scr-table th.sort-asc::after,
.scr-signal .scr-table th.sort-desc::after {
    content: '';
    position: absolute;
    right: 4px;
    top: 50%;
    transform: translateY(-50%);
    width: 0;
    height: 0;
    border-left: 4px solid transparent;
    border-right: 4px solid transparent;
}

.scr-signal .scr-table th.sort-asc::after {
    border-bottom: 5px solid var(--accent-primary);
}

.scr-signal .scr-table th.sort-desc::after {
    border-top: 5px solid var(--accent-primary);
}

.scr-signal .td-muted {
    color: var(--text-tertiary);
}

.scr-signal .td-filter {
    font-family: 'Courier New', monospace;
    font-size: var(--font-2xs-desktop);
    color: var(--text-secondary);
}

.scr-signal .scr-ticker-down {
    color: var(--negative);
}

.scr-signal .price-positive {
    color: var(--positive);
    font-weight: var(--font-weight-semibold);
}

.scr-signal .price-negative {
    color: var(--negative);
    font-weight: var(--font-weight-semibold);
}

.scr-signal .price-neutral {
    color: var(--text-secondary);
}

.scr-signal .scr-note-icon {
    margin-left: var(--space-2-5);
    color: var(--text-tertiary);
    cursor: pointer;
    transition: color var(--duration-base) var(--ease-default);
}

.scr-signal .scr-note-icon:hover {
    color: var(--accent-primary);
}

/* ── FRESH / TREND tags ─────────────────────────────────────── */
.scr-signal .scr-tag {
    display: inline-flex;
    align-items: center;
    padding: var(--space-0-5) var(--space-2);
    border-radius: var(--radius-sm);
    font-size: var(--font-3xs-desktop);
    font-weight: var(--font-weight-bold);
    letter-spacing: 0.6px;
    text-transform: uppercase;
}

.scr-signal .scr-tag-fresh {
    background-color: var(--accent-primary-bg-strong);
    color: var(--accent-primary);
}

.scr-signal .scr-tag-trend {
    background-color: rgba(0, 200, 255, 0.15);
    color: var(--accent-secondary);
}

/* ── Expanded row ───────────────────────────────────────────── */
.scr-signal .expanded-row td {
    padding: 0;
    background-color: var(--bg-darker);
    border-bottom: 1px solid var(--border-color);
}

.scr-signal .expanded-content {
    padding: var(--space-5);
}

.scr-signal .expanded-content > div:first-child {
    margin-bottom: var(--space-4);
    padding: var(--space-3) var(--space-4);
    background-color: rgba(42, 45, 54, 0.5);
    border-left: 2px solid var(--accent-primary);
    border-radius: var(--radius-sm-plus);
    font-size: var(--font-xs-desktop);
    line-height: 1.7;
    color: var(--text-secondary);
}

.scr-signal .expanded-content table {
    width: 100%;
    border-collapse: collapse;
    font-size: var(--font-xs-desktop);
    background-color: transparent;
}

.scr-signal .expanded-content table th {
    padding: var(--space-2-5) var(--space-3-5);
    text-align: left;
    font-size: var(--font-3xs-desktop);
    font-weight: var(--font-weight-semibold);
    text-transform: uppercase;
    letter-spacing: 0.5px;
    color: var(--text-tertiary);
    border-bottom: 1px solid var(--border-color);
    background-color: transparent;
}

.scr-signal .expanded-content table th:nth-child(n+2),
.scr-signal .expanded-content table td:nth-child(n+2) {
    text-align: right;
    font-variant-numeric: tabular-nums;
}

.scr-signal .expanded-content table td {
    padding: var(--space-2-5) var(--space-3-5);
    color: var(--text-primary);
    border-bottom: 1px solid var(--border-color);
}

.scr-signal .expanded-content table tbody tr:last-child td {
    border-bottom: none;
}

/* State containers (loading / error / empty) are shared — see screener/styles.css
   under .scr-screener (all four screener roots carry that class). */

/* Container: stacked column */
.toast-container-v2 {
    position: fixed;
    top: 20px;
    right: 20px;
    left: 20px;
    z-index: 9999;
    display: flex;
    flex-direction: column;
    align-items: flex-end;
    overflow-y: auto;
    gap: 10px;
    pointer-events: none;
}

/* Base toast */
.toast-v2 {
    position: relative;
    pointer-events: auto;
    background-color: #333;
    color: #fff;
    padding: 16px;
    height: auto;
    border-radius: 4px;
    opacity: 0;
    transition: opacity 0.5s;
    overflow: hidden; /* for progress bar */
}

/* Types */
.toast-success-v2 {
    background-color: #4CAF50;
}

.toast-error-v2 {
    background-color: #f44336;
}

.toast-warning-v2 {
    background-color: #ff9800;
}

.toast-info-v2 {
    background-color: #2196f3;
}

/* Inner message */
.toast-message-v2 {
    display: block;
}

/* Progress bar */
.toast-progress-v2 {
    position: absolute;
    bottom: 0;
    left: 0;
    height: 4px;
    background: rgba(255, 255, 255, 0.7);
    width: 100%;
    transition: width linear;
    /* transition-duration will be inherited from inline style duration */
}
/* Minerva — extras on top of the shared depth-screener chrome (.scr-screener)
   and signal-screener design (.scr-signal). Scoped under .scr-minerva.

   The .modal / #tagsInput / .autocomplete-items rules stay UNSCOPED on purpose:
   they theme the shared page-level notes modal, which lives outside .scr-minerva. */

/* Bootstrap Modal Dark Theme Override (shared notes modal) */
.modal-content {
    background-color: var(--bg-table) !important;
    border: 1px solid var(--border-color);
    color: var(--text-primary) !important;
}

.modal-header {
    border-bottom: 1px solid var(--border-color);
}

.modal-footer {
    border-top: 1px solid var(--border-color);
}

.modal-title {
    color: var(--text-primary) !important;
}

.close {
    color: var(--text-primary) !important;
    opacity: 0.8;
}

.close:hover {
    color: var(--accent-primary) !important;
    opacity: 1;
}

.modal .form-control {
    background-color: var(--bg-dark) !important;
    border: 1px solid var(--border-color);
    color: var(--text-primary) !important;
}

.modal .form-control:focus {
    background-color: var(--bg-dark) !important;
    border-color: var(--accent-primary);
    color: var(--text-primary) !important;
    box-shadow: var(--shadow-focus-strong);
}

.modal .form-control::placeholder {
    color: var(--text-secondary);
    opacity: 0.6;
}

.modal label {
    color: var(--text-primary);
    font-weight: var(--font-weight-medium);
    margin-bottom: var(--space-2);
}

#tagsInput {
    display: flex;
    flex-wrap: wrap;
    gap: var(--space-2);
    padding: var(--space-2-5);
    min-height: 80px;
    background-color: var(--bg-dark) !important;
}

#tagsInput .tag {
    padding: var(--space-1-5) var(--space-3);
    border-radius: var(--radius-sm-plus);
    cursor: pointer;
    font-size: var(--font-small-desktop);
    font-weight: var(--font-weight-medium);
    transition: all var(--duration-base) var(--ease-default);
    border: 2px solid transparent;
}

#tagsInput .tag:hover {
    transform: translateY(-2px);
    box-shadow: var(--shadow-sm);
}

#tagsInput .tag.selected {
    border-color: var(--accent-primary);
    box-shadow: var(--shadow-focus-strong);
}

.modal .btn-link {
    color: var(--accent-primary);
    text-decoration: none;
}

.modal .btn-link:hover {
    color: var(--accent-primary-pressed);
    text-decoration: underline;
}

.autocomplete-items {
    background-color: var(--bg-darker);
    border: 1px solid var(--border-color);
    max-height: 200px;
    overflow-y: auto;
}

.autocomplete-items div {
    padding: var(--space-2-5);
    cursor: pointer;
    color: var(--text-primary);
    border-bottom: 1px solid var(--border-color);
}

.autocomplete-items div:hover,
.autocomplete-active {
    background-color: var(--highlight);
    color: var(--accent-primary);
}


/* ── Minerva-specific: segmented controls panel ─────────────── */
.scr-minerva .scr-seg-panel {
    display: flex;
    flex-wrap: wrap;
    gap: var(--space-12);
    justify-content: center;
    padding: var(--space-5);
    margin-bottom: var(--space-4);
    background-color: var(--bg-table);
    border: 1px solid var(--border-color);
    border-radius: var(--radius-lg);
}

.scr-minerva .scr-seg-group {
    display: flex;
    flex-direction: column;
    gap: var(--space-2);
    align-items: center;
}

/* (.scr-seg control styling is shared — see screener/styles.css under .scr-screener) */

/* ── Infinite-scroll indicator ──────────────────────────────── */
.scr-minerva .scr-scroll-indicator {
    text-align: center;
    padding: var(--space-4);
    color: var(--text-tertiary);
    font-size: var(--font-small-desktop);
    border-top: 1px solid var(--border-color);
}

.scr-minerva .scr-scroll-indicator .all-loaded {
    color: var(--accent-primary);
}

@media (max-width: 768px) {
    .scr-minerva .scr-seg-panel {
        gap: var(--space-6);
    }
}


/*# sourceMappingURL=screeners.c609a3f0.css.map*/