:root {
    color-scheme: dark;
    --db-bg: #050607;
    --db-panel: #0c0e11;
    --db-panel-2: #111419;
    --db-border: #242a30;
    --db-text: #eef5f2;
    --db-muted: #8f9a99;
    --db-accent: #64d6b0;
    --db-accent-soft: #aee8d1;
}

:root body,
:root.mobile body {
    --font-size: 14px;
    --deep-bg: var(--db-bg, #050607);
    --deep-panel: var(--db-panel, #0c0e11);
    --deep-panel-2: var(--db-panel-2, #111419);
    --deep-border: var(--db-border, #242a30);
    --deep-ink: var(--db-text, #eef5f2);
    --deep-muted: var(--db-muted, #8f9a99);
    --deep-soft: #151a1f;
    --deep-accent: var(--db-accent, #64d6b0);
    --deep-accent-2: var(--db-accent-soft, #aee8d1);
    background: var(--deep-bg);
    color: var(--deep-ink);
    font: 14px/1.45 Inter, sans-serif;
    margin: 0;
    min-width: 320px;
    overflow-x: hidden;
    overflow-y: auto;
}

:root body.loading {
    opacity: 1;
}

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

:focus {
    outline: 0;
}

:focus-visible {
    outline: 2px solid rgb(100 214 176 / 62%);
    outline-offset: 2px;
}

#panes {
    background:
        radial-gradient(circle at 20% 0%, rgb(100 214 176 / 12%), transparent 28%),
        var(--deep-bg);
    display: block;
    min-height: 100vh;
    padding: 10px;
}

#main {
    background: linear-gradient(180deg, #0c0e11 0%, #070809 100%);
    border: 1px solid #1d2228;
    border-radius: 8px;
    box-shadow: 0 18px 48px rgb(0 0 0 / 42%);
    box-sizing: border-box;
    max-width: 350px;
    min-width: 300px;
    padding: 14px;
    width: min(350px, calc(100vw - 20px));
}

.deep-brand {
    align-items: center;
    display: grid;
    gap: 10px;
    grid-template-columns: 36px 1fr;
    min-width: 0;
}

.deep-brand img {
    display: block;
    height: 36px;
    width: 36px;
}

.deep-brand strong {
    display: block;
    font-size: 16px;
    font-weight: 600;
    overflow-wrap: anywhere;
}

.deep-brand span {
    color: var(--deep-muted);
    display: block;
    font-size: 11px;
    overflow-wrap: anywhere;
}


.deep-protection {
    align-items: center;
    display: grid;
    gap: 12px;
    grid-template-columns: 96px 1fr;
    margin-top: 18px;
    min-width: 0;
}

#switch {
    align-items: center;
    background:
        linear-gradient(180deg, rgb(100 214 176 / 20%), rgb(100 214 176 / 6%)),
        #0b0f11;
    border: 1px solid rgb(100 214 176 / 34%);
    border-radius: 999px;
    box-shadow: inset 0 0 0 1px rgb(255 255 255 / 4%), 0 10px 30px rgb(0 0 0 / 36%);
    box-sizing: border-box;
    cursor: pointer;
    display: flex;
    fill: var(--deep-accent);
    height: 86px;
    justify-content: center;
    transition: background-color 120ms ease, border-color 120ms ease, transform 120ms ease;
    width: 86px;
}

#switch svg {
    display: block;
    height: 44px;
    width: 44px;
}

body.off #switch {
    background: #101114;
    border-color: #30343a;
    fill: #69706f;
}

:root.desktop body:not(.off) #switch:hover {
    transform: translateY(-1px);
}

.deep-state strong {
    display: block;
    font-size: 22px;
    font-weight: 600;
    letter-spacing: 0;
    overflow-wrap: anywhere;
}

.deep-state span {
    color: var(--deep-muted);
    display: block;
    font-size: 13px;
    margin-top: 2px;
    overflow-wrap: anywhere;
}

body.off .state-on,
body:not(.off) .state-off {
    display: none;
}

#hostname {
    color: #c6cfcc;
    font-size: 12px;
    grid-column: 1 / -1;
    min-height: 18px;
    overflow-wrap: anywhere;
    padding: 0 2px;
}

#hostname > span + span {
    color: var(--deep-ink);
    font-weight: 600;
}

.deep-stats {
    display: grid;
    gap: 8px;
    grid-template-columns: 1fr 1fr;
    margin-top: 14px;
}

.deep-stats > div {
    background:
        linear-gradient(180deg, rgb(255 255 255 / 3%), transparent 54%),
        var(--deep-panel-2);
    border: 1px solid var(--deep-border);
    border-radius: 8px;
    box-sizing: border-box;
    min-height: 72px;
    padding: 10px;
    min-width: 0;
    transition: border-color 120ms ease, background-color 120ms ease;
}

.deep-stats > div:hover {
    border-color: rgb(100 214 176 / 24%);
}

.deep-stats .deep-stat-wide {
    grid-column: 1 / -1;
    min-height: 54px;
}

.deep-stats .deep-label,
.deep-stats .deep-sub {
    color: var(--deep-muted);
    display: block;
    font-size: 11px;
    line-height: 1.25;
    overflow-wrap: anywhere;
}

.deep-stats .deep-label {
    color: #cdd8d4;
    font-weight: 600;
}

.deep-stats .deep-sub {
    margin-top: 2px;
}

.deep-stats .deep-value {
    color: var(--deep-ink);
    display: block;
    font-size: 20px;
    font-weight: 700;
    letter-spacing: -0.01em;
    margin-top: 8px;
    overflow-wrap: anywhere;
}

.deep-stats .deep-value:empty::before {
    content: "--";
}

.deep-stat-wide .deep-value {
    margin-top: 6px;
}

.deep-toggles {
    display: grid;
    gap: 8px;
    grid-template-columns: 1fr 1fr;
    margin-top: 12px;
}

.deep-toggle {
    align-items: center;
    background: #0e1115;
    border: 1px solid #232a31;
    border-radius: 8px;
    box-sizing: border-box;
    color: var(--deep-ink);
    display: flex;
    justify-content: space-between;
    min-height: 42px;
    padding: 9px 10px;
    text-decoration: none;
    min-width: 0;
    transition: border-color 120ms ease;
}

.deep-toggle span:first-child {
    font-size: 12px;
    min-width: 0;
    overflow-wrap: anywhere;
    white-space: normal;
}

.deep-toggle strong {
    color: var(--deep-accent-2);
    flex-shrink: 0;
    font-size: 11px;
    font-weight: 600;
    margin-left: 8px;
    overflow-wrap: anywhere;
    text-align: end;
    white-space: normal;
}

.deep-action-card,
#no-popups {
    cursor: pointer;
}

.deep-action-card:hover,
#no-popups:hover {
    border-color: rgb(100 214 176 / 45%);
}

.deep-toggle .fa-icon-badge:not(:empty) {
    align-items: center;
    background: var(--deep-accent);
    border-radius: 999px;
    color: #06100d;
    display: inline-flex;
    flex-shrink: 0;
    font-size: 10px;
    font-weight: 700;
    height: 16px;
    justify-content: center;
    margin-left: 6px;
    min-width: 16px;
    padding: 0 4px;
}

body.off .deep-toggle:not(.deep-action-card) {
    opacity: 0.62;
}


.deep-links {
    display: grid;
    gap: 8px;
    grid-template-columns: repeat(3, 1fr);
    margin-top: 14px;
}

.deep-links a {
    align-items: center;
    background: #11151a;
    border: 1px solid #252c33;
    border-radius: 8px;
    box-sizing: border-box;
    color: #dfe8e5;
    display: flex;
    font-size: 12px;
    justify-content: center;
    min-height: 36px;
    padding: 8px 6px;
    text-align: center;
    overflow-wrap: anywhere;
    transition: border-color 120ms ease, background-color 120ms ease;
}

:root.deep-rtl .deep-toggle strong {
    margin-left: 0;
    margin-right: 8px;
    text-align: start;
}

:root.deep-rtl .deep-brand,
:root.deep-rtl .deep-protection {
    direction: rtl;
}

.deep-links a:hover {
    background: #151b20;
    border-color: rgb(100 214 176 / 35%);
}

#unprocessedRequestWarning {
    align-items: center;
    background: #2d2307;
    border: 1px solid #6c5410;
    border-radius: 8px;
    color: #ffe6a3;
    display: none;
    font-size: 12px;
    gap: 8px;
    margin-top: 12px;
    padding: 8px;
}

:root.warn #unprocessedRequestWarning {
    display: flex;
}

#unprocessedRequestWarning .dismiss {
    cursor: pointer;
    flex-shrink: 0;
    height: 14px;
    stroke: currentColor;
    width: 14px;
}

#unprocessedRequestWarning svg {
    display: block;
    width: 100%;
}

.deep-compat,
#firewall,
#firewall-vspacer {
    display: none !important;
}

/* Respect the user's reduced-motion preference. */
@media (prefers-reduced-motion: reduce) {
    *, *::before, *::after {
        animation-duration: 0.001ms !important;
        animation-iteration-count: 1 !important;
        transition-duration: 0.001ms !important;
        scroll-behavior: auto !important;
    }
}
