html[data-theme="light"] {
    color-scheme: light;
    --theme-page: #f8fafc;
    --theme-surface: #ffffff;
    --theme-raised: #f1f5f9;
    --theme-border: #d7e0eb;
    --theme-text: #0f172a;
    --theme-muted: #475569;
}

html[data-theme="dark"] {
    color-scheme: dark;
}

.home-travel-border {
    position: relative;
    isolation: isolate;
    border-color: transparent !important;
}

@property --home-border-angle {
    syntax: "<angle>";
    inherits: false;
    initial-value: 0deg;
}

.home-travel-border::before {
    content: "";
    position: absolute;
    inset: 0;
    z-index: 0;
    padding: 1px;
    border-radius: inherit;
    background: conic-gradient(
        from var(--home-border-angle),
        transparent 0deg 205deg,
        #6366f1 232deg,
        #22d3ee 270deg,
        #ec4899 308deg,
        #f59e0b 340deg,
        transparent 360deg
    );
    -webkit-mask: linear-gradient(#fff 0 0) content-box, linear-gradient(#fff 0 0);
    -webkit-mask-composite: xor;
    mask: linear-gradient(#fff 0 0) content-box, linear-gradient(#fff 0 0);
    mask-composite: exclude;
    opacity: 0.72;
    pointer-events: none;
    animation: home-card-border-travel 8s linear infinite;
}

.home-travel-border > * {
    position: relative;
    z-index: 1;
}

.home-travel-border:hover::before {
    opacity: 1;
}

@keyframes home-card-border-travel {
    to { --home-border-angle: 360deg; }
}

@media (prefers-reduced-motion: reduce) {
    .home-travel-border::before,
    .portal-content :is(.portal-hero-card, .portal-panel-card, .portal-stat-card, .portal-empty-card, .glass-panel)::after {
        animation: none;
        background: conic-gradient(from 35deg, #6366f1, #22d3ee, #ec4899, #f59e0b, #6366f1);
    }
}

.page-rich-content {
    color: #cbd5e1;
    font-size: 1rem;
    line-height: 1.8;
    overflow-wrap: anywhere;
}

.page-rich-content > * + * {
    margin-top: 1rem;
}

.page-rich-content h2,
.page-rich-content h3,
.page-rich-content h4 {
    color: #f8fafc;
    font-weight: 750;
    line-height: 1.3;
    margin-top: 2rem;
}

.page-rich-content h2 { font-size: 1.7rem; }
.page-rich-content h3 { font-size: 1.35rem; }
.page-rich-content h4 { font-size: 1.1rem; }
.page-rich-content a { color: #a5b4fc; text-decoration: underline; text-underline-offset: 3px; }
.page-rich-content ul,
.page-rich-content ol { padding-left: 1.5rem; }
.page-rich-content ul { list-style: disc; }
.page-rich-content ol { list-style: decimal; }
.page-rich-content li + li { margin-top: 0.35rem; }
.home-guide-section {
    position: relative;
    max-width: 80rem;
    margin: 2rem auto 3rem;
    padding: clamp(1rem, 3vw, 2rem);
    overflow: hidden;
    border: 1px solid rgba(129, 140, 248, 0.28);
    border-radius: 1.4rem;
    background: linear-gradient(145deg, rgba(15, 23, 42, 0.96), rgba(17, 24, 39, 0.92));
    box-shadow: 0 24px 70px rgba(2, 6, 23, 0.24);
}
.home-guide-heading {
    display: flex;
    align-items: flex-end;
    justify-content: space-between;
    gap: 1rem;
    margin-bottom: 1rem;
}
.home-guide-heading h2 {
    margin-top: 0.35rem;
    color: #f8fafc;
    font-size: clamp(1.3rem, 2vw, 1.8rem);
    font-weight: 800;
    letter-spacing: -0.03em;
}
.home-guide-kicker {
    margin: 0;
    color: #a5b4fc;
    font-size: 0.68rem;
    font-weight: 800;
    letter-spacing: 0.16em;
    text-transform: uppercase;
}
.home-guide-scroll {
    max-width: none;
    max-height: min(34rem, 68vh);
    overflow: auto;
    overscroll-behavior: contain;
    padding: clamp(1rem, 2vw, 1.5rem);
    border: 1px solid rgba(148, 163, 184, 0.18);
    border-radius: 1rem;
    background: rgba(2, 6, 23, 0.28);
    scrollbar-width: thin;
    scrollbar-color: rgba(129, 140, 248, 0.65) rgba(15, 23, 42, 0.45);
}
.home-guide-scroll::-webkit-scrollbar { width: 8px; height: 8px; }
.home-guide-scroll::-webkit-scrollbar-thumb { border-radius: 999px; background: rgba(129, 140, 248, 0.65); }
.home-guide-scroll::-webkit-scrollbar-track { background: rgba(15, 23, 42, 0.45); }
.home-guide-scroll-hint {
    color: #a5b4fc;
    font-size: 0.7rem;
    font-weight: 700;
    white-space: nowrap;
}
html[data-theme="light"] .home-guide-section {
    border-color: #c7d2fe;
    background: linear-gradient(145deg, #ffffff, #f3f6ff);
    box-shadow: 0 20px 55px rgba(15, 23, 42, 0.09);
}
html[data-theme="light"] .home-guide-heading h2 { color: #0f172a; }
html[data-theme="light"] .home-guide-kicker { color: #4338ca; }
html[data-theme="light"] .home-guide-scroll {
    border-color: #dbe3f0;
    background: rgba(255, 255, 255, 0.84);
    scrollbar-color: #818cf8 #e2e8f0;
}
html[data-theme="light"] .home-guide-scroll::-webkit-scrollbar-thumb { background: #818cf8; }
html[data-theme="light"] .home-guide-scroll::-webkit-scrollbar-track { background: #e2e8f0; }
html[data-theme="light"] .home-guide-scroll-hint { color: #4338ca; }
.page-rich-content blockquote {
    border-left: 3px solid #6366f1;
    color: #a5b4fc;
    padding: 0.5rem 0 0.5rem 1rem;
}
.page-rich-content pre,
.page-rich-content code {
    border-radius: 0.45rem;
    background: rgba(15, 23, 42, 0.8);
    font-family: "JetBrains Mono", monospace;
    font-size: 0.9em;
}
.page-rich-content pre { overflow-x: auto; padding: 1rem; }
.page-rich-content code { padding: 0.12rem 0.3rem; }
.page-rich-content img { height: auto; max-width: 100%; border-radius: 0.75rem; }
.page-youtube-embed {
    position: relative;
    width: 100%;
    max-width: 56rem;
    aspect-ratio: 16 / 9;
    margin: 1.25rem auto;
    overflow: hidden;
    border: 1px solid rgba(148, 163, 184, 0.24);
    border-radius: 0.9rem;
    background: #020617;
    box-shadow: 0 16px 38px rgba(2, 6, 23, 0.18);
}
.page-youtube-embed iframe {
    position: absolute;
    inset: 0;
    width: 100%;
    height: 100%;
    border: 0;
}
.page-rich-table-wrap {
    width: 100%;
    max-width: 100%;
    margin: 1.25rem 0;
    overflow-x: auto;
    border: 1px solid rgba(148, 163, 184, 0.22);
    border-radius: 0.75rem;
}
.page-rich-content table {
    width: max-content;
    min-width: 100%;
    border-collapse: collapse;
    table-layout: auto;
}
.page-rich-content th,
.page-rich-content td {
    min-width: 7rem;
    border: 1px solid rgba(148, 163, 184, 0.25);
    padding: 0.65rem 0.8rem;
    text-align: left;
    vertical-align: top;
}
.page-rich-content th { color: #f8fafc; background: rgba(30, 41, 59, 0.7); }

html[data-theme="light"] .page-rich-content { color: #334155; }
html[data-theme="light"] .page-rich-content h2,
html[data-theme="light"] .page-rich-content h3,
html[data-theme="light"] .page-rich-content h4 { color: #0f172a; }
html[data-theme="light"] .page-rich-content a { color: #4338ca; }
html[data-theme="light"] .page-rich-content pre,
html[data-theme="light"] .page-rich-content code { background: #eef2ff; }
html[data-theme="light"] .page-youtube-embed {
    border-color: #cbd5e1;
    background: #0f172a;
    box-shadow: 0 14px 32px rgba(15, 23, 42, 0.12);
}
html[data-theme="light"] .page-rich-table-wrap { border-color: #cbd5e1; }
html[data-theme="light"] .page-rich-content th {
    color: #0f172a;
    background: #e2e8f0;
}
html[data-theme="light"] .page-rich-content th,
html[data-theme="light"] .page-rich-content td { border-color: #cbd5e1; }

.contact-form-panel {
    border-color: rgba(100, 116, 139, 0.45);
    background: rgba(15, 23, 42, 0.94);
    color: #e2e8f0;
}
.contact-form-heading { color: #f8fafc; }
.contact-form-copy { color: #94a3b8; }
.contact-form-eyebrow {
    color: #a5b4fc;
    font-size: 0.72rem;
    font-weight: 800;
    letter-spacing: 0.18em;
    text-transform: uppercase;
}
.contact-form-label { color: #e2e8f0; }
.contact-form-setup-notice { color: #fef3c7; }
.contact-submit:disabled {
    cursor: not-allowed;
    filter: saturate(0.55);
    opacity: 0.58;
}
html[data-theme="light"] .contact-form-panel {
    border-color: #d5deeb;
    background: #fff;
    color: #334155;
    box-shadow: 0 18px 44px rgba(15, 23, 42, 0.08);
}
html[data-theme="light"] .contact-form-heading { color: #0f172a; }
html[data-theme="light"] .contact-form-copy { color: #475569; }
html[data-theme="light"] .contact-form-eyebrow { color: #4f46e5; }
html[data-theme="light"] .contact-form-label { color: #334155; }
html[data-theme="light"] .contact-form-setup-notice {
    border-color: #fcd34d;
    background: #fffbeb;
    color: #92400e;
}

.google-auth-panel {
    display: grid;
    justify-items: center;
    gap: 0.5rem;
    width: 100%;
    padding: 0.9rem;
    border: 1px solid rgba(148, 163, 184, 0.22);
    border-radius: 1rem;
    background: rgba(15, 23, 42, 0.44);
}
.google-auth-button {
    display: flex;
    min-height: 42px;
    width: min(100%, 400px);
    justify-content: center;
}
.google-auth-feedback {
    min-height: 1rem;
    margin: 0;
    color: #94a3b8;
    font-size: 0.75rem;
    line-height: 1.25rem;
    text-align: center;
}
.google-auth-feedback.is-error { color: #fda4af; }
.google-auth-feedback.is-success { color: #6ee7b7; }
.google-auth-divider {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    margin: 1rem 0;
    color: #94a3b8;
    font-size: 0.7rem;
}
.google-auth-divider::before,
.google-auth-divider::after {
    height: 1px;
    flex: 1;
    background: rgba(148, 163, 184, 0.24);
    content: "";
}
html[data-theme="light"] .google-auth-panel {
    border-color: #dbe3ef;
    background: #f8fafc;
}
html[data-theme="light"] .google-auth-feedback { color: #475569; }
html[data-theme="light"] .google-auth-feedback.is-error { color: #be123c; }
html[data-theme="light"] .google-auth-feedback.is-success { color: #047857; }
html[data-theme="light"] .google-auth-divider { color: #64748b; }

html[data-theme="dark"] [data-theme-icon="light"],
html[data-theme="light"] [data-theme-icon="dark"] {
    display: none;
}

html[data-theme="light"] body {
    background-color: var(--theme-page) !important;
    color: var(--theme-text) !important;
}

html[data-theme="light"] [class~="bg-[#070a12]"],
html[data-theme="light"] [class~="bg-[#070b13]"],
html[data-theme="light"] [class~="bg-[#090d16]/85"],
html[data-theme="light"] [class~="bg-[#0a0e19]"],
html[data-theme="light"] [class~="bg-[#0b101b]"],
html[data-theme="light"] [class~="bg-slate-950"],
html[data-theme="light"] [class~="bg-slate-950/50"],
html[data-theme="light"] [class~="bg-slate-950/60"],
html[data-theme="light"] [class~="bg-slate-950/90"] {
    background-color: var(--theme-surface) !important;
}

html[data-theme="light"] [class~="bg-slate-900"],
html[data-theme="light"] [class~="bg-slate-900/40"],
html[data-theme="light"] [class~="bg-slate-900/50"],
html[data-theme="light"] [class~="bg-slate-900/60"],
html[data-theme="light"] [class~="bg-slate-900/80"],
html[data-theme="light"] [class~="bg-slate-900/90"],
html[data-theme="light"] [class~="bg-slate-800/90"] {
    background-color: var(--theme-raised) !important;
}

html[data-theme="light"] [class~="bg-slate-800"],
html[data-theme="light"] [class~="bg-slate-800/70"],
html[data-theme="light"] [class~="bg-slate-700"] {
    background-color: #e2e8f0 !important;
}

html[data-theme="light"] [class~="bg-indigo-950/50"],
html[data-theme="light"] [class~="bg-indigo-950/90"] {
    background-color: #eef2ff !important;
}

html[data-theme="light"] [class~="bg-emerald-950/20"],
html[data-theme="light"] [class~="bg-emerald-950/30"] {
    background-color: #ecfdf5 !important;
}

html[data-theme="light"] [class~="bg-rose-950/40"] {
    background-color: #fff1f2 !important;
}

html[data-theme="light"] [class~="border-slate-800"],
html[data-theme="light"] [class~="border-slate-800/60"],
html[data-theme="light"] [class~="border-slate-800/80"],
html[data-theme="light"] [class~="border-slate-800/90"],
html[data-theme="light"] [class~="border-slate-700"],
html[data-theme="light"] [class~="border-slate-700/70"] {
    border-color: var(--theme-border) !important;
}

html[data-theme="light"] [class~="divide-slate-800/70"] > :not([hidden]) ~ :not([hidden]),
html[data-theme="light"] [class~="divide-slate-800/80"] > :not([hidden]) ~ :not([hidden]) {
    border-color: var(--theme-border) !important;
}

html[data-theme="light"] [class~="text-white"],
html[data-theme="light"] [class~="text-slate-200"],
html[data-theme="light"] [class~="text-slate-300"] {
    color: #1e293b !important;
}

html[data-theme="light"] [class~="text-slate-400"] {
    color: #475569 !important;
}

html[data-theme="light"] [class~="text-slate-500"] {
    color: #64748b !important;
}

html[data-theme="light"] [class~="text-indigo-100"],
html[data-theme="light"] [class~="text-indigo-200"],
html[data-theme="light"] [class~="text-indigo-300"],
html[data-theme="light"] [class~="text-indigo-400"] {
    color: #4338ca !important;
}

html[data-theme="light"] [class~="text-amber-300"],
html[data-theme="light"] [class~="text-amber-300/80"],
html[data-theme="light"] [class~="text-amber-400"] {
    color: #92400e !important;
}

html[data-theme="light"] [class~="text-emerald-200"],
html[data-theme="light"] [class~="text-emerald-300"],
html[data-theme="light"] [class~="text-emerald-400"] {
    color: #047857 !important;
}

html[data-theme="light"] [class~="text-rose-300"],
html[data-theme="light"] [class~="text-rose-400"] {
    color: #be123c !important;
}

html[data-theme="light"] [class~="text-pink-300"],
html[data-theme="light"] [class~="text-pink-400"],
html[data-theme="light"] [class~="text-purple-400"] {
    color: #a21caf !important;
}

html[data-theme="light"] .accent-btn.text-white,
html[data-theme="light"] .accent-gradient.text-white,
html[data-theme="light"] [class~="bg-indigo-500"].text-white,
html[data-theme="light"] [class~="bg-indigo-600"].text-white,
html[data-theme="light"] [class~="bg-emerald-500"].text-white,
html[data-theme="light"] [class~="bg-emerald-600"].text-white,
html[data-theme="light"] [class~="bg-rose-500"].text-white,
html[data-theme="light"] [class~="bg-rose-600"].text-white,
html[data-theme="light"] [class~="bg-amber-500"].text-white {
    color: #ffffff !important;
}

html[data-theme="light"] [class~="hover:bg-slate-800"]:hover,
html[data-theme="light"] [class~="hover:bg-slate-800/70"]:hover,
html[data-theme="light"] [class~="hover:bg-slate-700"]:hover {
    background-color: #dbe4ef !important;
}

html[data-theme="light"] [class~="hover:text-white"]:hover {
    color: #0f172a !important;
}

html[data-theme="light"] .glass-card,
html[data-theme="light"] .glass-panel {
    background-color: rgba(255, 255, 255, 0.88) !important;
    border-color: var(--theme-border) !important;
}

.admin-hero-card,
.portal-hero-card {
    position: relative;
    overflow: hidden;
    padding: 1.2rem 1.35rem;
    border: 1px solid rgba(129, 140, 248, 0.22);
    border-radius: 1.25rem;
    background: linear-gradient(135deg, rgba(15, 23, 42, 0.96), rgba(30, 41, 59, 0.72));
    box-shadow: 0 14px 34px rgba(15, 23, 42, 0.14);
}

.admin-hero-card::before,
.portal-hero-card::before {
    position: absolute;
    inset: 1rem auto 1rem 0;
    width: 3px;
    border-radius: 999px;
    background: linear-gradient(180deg, #818cf8, #c4b5fd);
    content: "";
}

.admin-hero-card > *,
.portal-hero-card > * {
    position: relative;
    z-index: 1;
}

html[data-theme="light"] .admin-hero-card,
html[data-theme="light"] .portal-hero-card {
    border-color: #cbd5e1 !important;
    background: linear-gradient(135deg, #ffffff 0%, #f8fafc 72%, #eef2ff 100%) !important;
    box-shadow: 0 12px 28px rgba(15, 23, 42, 0.06);
}

.admin-page-title,
.portal-page-title {
    font-size: clamp(1.25rem, 1.8vw, 1.5rem);
    line-height: 1.2;
    letter-spacing: -0.035em;
}

.admin-page-eyebrow,
.portal-page-eyebrow {
    display: inline-flex;
    align-items: center;
    gap: 0.45rem;
    margin-bottom: 0.35rem;
    color: #818cf8;
    font-size: 0.625rem;
    font-weight: 800;
    letter-spacing: 0.15em;
    line-height: 1.2;
    text-transform: uppercase;
}

.admin-page-eyebrow::before,
.portal-page-eyebrow::before {
    width: 1rem;
    height: 2px;
    border-radius: 999px;
    background-color: currentColor;
    content: "";
}

.admin-page-description,
.portal-page-description {
    max-width: 72ch;
    line-height: 1.6;
}

.admin-page-hero {
    position: relative;
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 1.5rem;
    overflow: hidden;
    border: 1px solid rgba(129, 140, 248, 0.28);
    border-radius: 1.5rem;
    padding: clamp(1.25rem, 2.4vw, 2rem);
    background:
        radial-gradient(ellipse at 92% 5%, rgba(99, 102, 241, 0.2), transparent 38%),
        linear-gradient(135deg, #111827 0%, #0f172a 58%, #1e1b4b 100%);
    box-shadow: 0 18px 42px rgba(2, 6, 23, 0.2);
}

.admin-page-hero::after {
    position: absolute;
    right: -2.5rem;
    bottom: -5.5rem;
    width: 15rem;
    height: 15rem;
    border: 1px solid rgba(165, 180, 252, 0.13);
    border-radius: 50%;
    content: "";
    pointer-events: none;
}

.admin-page-hero > * {
    position: relative;
    z-index: 1;
}

.admin-page-hero-copy {
    min-width: 0;
}

.admin-page-title {
    color: #f8fafc;
    font-size: clamp(1.6rem, 2.5vw, 2rem);
    font-weight: 850;
}

.admin-page-subtitle {
    max-width: 68ch;
    margin-top: 0.45rem;
    color: #cbd5e1;
    font-size: 0.8rem;
    line-height: 1.55;
}

.admin-page-hero-actions {
    display: flex;
    flex: 0 0 auto;
    align-items: center;
    gap: 0.75rem;
}

.admin-page-hero-stat {
    display: flex;
    min-width: 7.5rem;
    align-items: center;
    gap: 0.7rem;
    border: 1px solid rgba(148, 163, 184, 0.24);
    border-radius: 0.9rem;
    padding: 0.7rem 0.85rem;
    background: rgba(15, 23, 42, 0.56);
    color: #cbd5e1;
}

.admin-page-hero-stat strong {
    color: #ffffff;
    font-size: 1.35rem;
    line-height: 1;
}

.admin-page-hero-stat span {
    max-width: 5.5rem;
    font-size: 0.58rem;
    font-weight: 800;
    letter-spacing: 0.08em;
    line-height: 1.35;
    text-transform: uppercase;
}

.admin-action-button-secondary {
    border-color: rgba(148, 163, 184, 0.24);
    background: rgba(15, 23, 42, 0.75);
    color: #e2e8f0;
}

.admin-action-button-secondary:hover {
    border-color: rgba(129, 140, 248, 0.52);
    background: rgba(30, 41, 59, 0.95);
}

.admin-action-button-success {
    border-color: rgba(16, 185, 129, 0.35);
    background: rgba(16, 185, 129, 0.12);
    color: #6ee7b7;
}

.admin-action-button-warning {
    border-color: rgba(245, 158, 11, 0.34);
    background: rgba(245, 158, 11, 0.12);
    color: #fcd34d;
}

.admin-action-button-danger {
    border-color: rgba(244, 63, 94, 0.35);
    background: rgba(244, 63, 94, 0.1);
    color: #fda4af;
}

.cms-filter-tabs {
    display: flex;
    gap: 0.45rem;
    overflow-x: auto;
    padding: 0.1rem 0.1rem 0.35rem;
    scrollbar-width: thin;
}

.cms-filter-tab {
    display: inline-flex;
    min-height: 2.4rem;
    flex: 0 0 auto;
    align-items: center;
    gap: 0.55rem;
    border: 1px solid rgba(100, 116, 139, 0.25);
    border-radius: 0.8rem;
    padding: 0.5rem 0.8rem;
    background: rgba(15, 23, 42, 0.5);
    color: #94a3b8;
    font-size: 0.68rem;
    font-weight: 750;
    text-decoration: none;
    transition: border-color 150ms ease, background-color 150ms ease, color 150ms ease;
}

.cms-filter-tab:hover {
    border-color: rgba(129, 140, 248, 0.4);
    color: #e2e8f0;
}

.cms-filter-tab span {
    display: inline-grid;
    min-width: 1.35rem;
    height: 1.35rem;
    place-items: center;
    border-radius: 999px;
    background: rgba(100, 116, 139, 0.18);
    color: #cbd5e1;
    font-size: 0.58rem;
}

.cms-filter-tab.is-selected {
    border-color: rgba(129, 140, 248, 0.48);
    background: rgba(99, 102, 241, 0.17);
    color: #c7d2fe;
}

.cms-filter-tab.is-selected span {
    background: rgba(99, 102, 241, 0.3);
    color: #eef2ff;
}

.cms-bulk-toolbar {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    justify-content: space-between;
    gap: 0.8rem;
    border: 1px solid rgba(100, 116, 139, 0.2);
    border-radius: 1rem;
    padding: 0.75rem;
    background: rgba(15, 23, 42, 0.48);
}

.cms-toolbar-link,
.cms-toolbar-note {
    color: #a5b4fc;
    font-size: 0.68rem;
    font-weight: 750;
}

.cms-toolbar-link {
    border: 0;
    background: transparent;
    cursor: pointer;
    text-decoration: none;
}

.cms-toolbar-link:hover {
    color: #e0e7ff;
}

.cms-list-scroll {
    max-height: min(72vh, 760px);
    overflow: auto;
    border: 1px solid rgba(100, 116, 139, 0.22);
    border-radius: 1rem;
    padding: 0.45rem;
    scrollbar-color: rgba(99, 102, 241, 0.6) rgba(15, 23, 42, 0.6);
    scrollbar-width: thin;
}

.cms-list-heading,
.cms-list-row {
    display: grid;
    grid-template-columns: minmax(15rem, 1fr) 6.5rem 9rem minmax(18rem, auto);
    align-items: center;
    gap: 0.8rem;
}

.cms-list-heading {
    position: sticky;
    z-index: 2;
    top: 0;
    border: 1px solid rgba(100, 116, 139, 0.18);
    border-radius: 0.75rem;
    padding: 0.65rem 0.8rem;
    background: #121a2a;
    color: #94a3b8;
    font-size: 0.58rem;
    font-weight: 850;
    letter-spacing: 0.11em;
    text-transform: uppercase;
}

.cms-list-row {
    min-height: 5.2rem;
    border: 1px solid rgba(100, 116, 139, 0.15);
    border-radius: 0.8rem;
    padding: 0.7rem 0.8rem;
    background: rgba(15, 23, 42, 0.42);
}

.cms-list-row:hover {
    border-color: rgba(129, 140, 248, 0.28);
    background: rgba(30, 41, 59, 0.62);
}

.cms-list-main {
    display: flex;
    min-width: 0;
    align-items: flex-start;
    gap: 0.75rem;
}

.cms-row-checkbox {
    flex: 0 0 auto;
    margin-top: 0.2rem;
    accent-color: #6366f1;
}

.cms-list-date {
    color: #94a3b8;
    font-size: 0.62rem;
    line-height: 1.4;
}

.cms-row-actions {
    display: flex;
    flex-wrap: wrap;
    justify-content: flex-end;
    gap: 0.35rem;
}

.cms-row-actions .admin-action-button {
    min-height: 2.1rem;
    padding: 0.42rem 0.58rem;
    font-size: 0.6rem;
}

.cms-row-actions form {
    display: none;
}

.cms-status-pill {
    display: inline-flex;
    align-items: center;
    border-radius: 999px;
    padding: 0.32rem 0.55rem;
    font-size: 0.58rem;
    font-weight: 850;
    letter-spacing: 0.04em;
}

.cms-status-pill.is-active {
    background: rgba(16, 185, 129, 0.13);
    color: #6ee7b7;
}

.cms-status-pill.is-inactive {
    background: rgba(148, 163, 184, 0.13);
    color: #cbd5e1;
}

.cms-status-pill.is-trashed {
    background: rgba(244, 63, 94, 0.12);
    color: #fda4af;
}

.cms-empty-state {
    display: flex;
    min-height: 17rem;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    border: 1px dashed rgba(100, 116, 139, 0.35);
    border-radius: 1.25rem;
    padding: 2rem;
    text-align: center;
}

.cms-empty-icon {
    display: grid;
    width: 2.75rem;
    height: 2.75rem;
    place-items: center;
    border: 1px solid rgba(129, 140, 248, 0.3);
    border-radius: 0.9rem;
    background: rgba(99, 102, 241, 0.12);
    color: #c7d2fe;
    font-size: 1rem;
    font-weight: 850;
}

.cms-empty-state h3 {
    margin-top: 0.85rem;
    color: #f1f5f9;
    font-size: 0.95rem;
    font-weight: 800;
}

.cms-empty-state p {
    max-width: 36rem;
    margin: 0.35rem 0 1rem;
    color: #94a3b8;
    font-size: 0.72rem;
    line-height: 1.55;
}

.cms-editor-dialog {
    width: min(1120px, 96vw);
    max-width: 96vw;
    max-height: 94vh;
    overflow: hidden;
    border: 1px solid rgba(129, 140, 248, 0.3);
    border-radius: 1.4rem;
    padding: 0;
    background: #0b1220;
    color: #e2e8f0;
    box-shadow: 0 28px 90px rgba(2, 6, 23, 0.62);
}

.cms-editor-dialog::backdrop {
    background: rgba(2, 6, 23, 0.78);
    backdrop-filter: blur(5px);
}

.cms-editor-dialog-inner {
    max-height: 94vh;
    overflow: auto;
    scrollbar-width: thin;
}

.cms-editor-dialog-header {
    position: sticky;
    z-index: 4;
    top: 0;
    display: flex;
    align-items: flex-start;
    justify-content: space-between;
    gap: 1rem;
    border-bottom: 1px solid rgba(100, 116, 139, 0.2);
    padding: 1.2rem 1.4rem;
    background: rgba(11, 18, 32, 0.96);
    backdrop-filter: blur(12px);
}

.cms-dialog-close {
    display: grid;
    width: 2.25rem;
    height: 2.25rem;
    flex: 0 0 auto;
    place-items: center;
    border: 1px solid rgba(148, 163, 184, 0.25);
    border-radius: 0.7rem;
    background: rgba(30, 41, 59, 0.7);
    color: #cbd5e1;
    cursor: pointer;
    font-size: 1.35rem;
}

.cms-dialog-close:hover {
    border-color: rgba(129, 140, 248, 0.55);
    color: #fff;
}

html[data-theme="light"] .admin-page-hero {
    border-color: #cbd5e1;
    background:
        radial-gradient(ellipse at 92% 5%, rgba(99, 102, 241, 0.1), transparent 38%),
        linear-gradient(135deg, #ffffff 0%, #f8fafc 58%, #eef2ff 100%);
    box-shadow: 0 14px 32px rgba(15, 23, 42, 0.07);
}

html[data-theme="light"] .admin-page-title {
    color: #172033;
}

html[data-theme="light"] .admin-page-subtitle {
    color: #526078;
}

html[data-theme="light"] .admin-page-hero-stat {
    border-color: #dbe2ee;
    background: rgba(255, 255, 255, 0.82);
    color: #64748b;
}

html[data-theme="light"] .admin-page-hero-stat strong {
    color: #172033;
}

html[data-theme="light"] .admin-action-button-secondary {
    border-color: #d4dbe7;
    background: #ffffff;
    color: #334155;
}

html[data-theme="light"] .admin-action-button-secondary:hover {
    border-color: #a5b4fc;
    background: #f8faff;
    color: #3730a3;
}

html[data-theme="light"] .admin-action-button-success {
    border-color: #a7f3d0;
    background: #ecfdf5;
    color: #047857;
}

html[data-theme="light"] .admin-action-button-warning {
    border-color: #fde68a;
    background: #fffbeb;
    color: #a16207;
}

html[data-theme="light"] .admin-action-button-danger {
    border-color: #fecdd3;
    background: #fff1f2;
    color: #be123c;
}

html[data-theme="light"] .cms-filter-tab,
html[data-theme="light"] .cms-bulk-toolbar,
html[data-theme="light"] .cms-list-row {
    border-color: #dbe2ee;
    background: #ffffff;
    color: #475569;
}

html[data-theme="light"] .cms-filter-tab:hover {
    border-color: #a5b4fc;
    color: #312e81;
}

html[data-theme="light"] .cms-filter-tab.is-selected {
    border-color: #a5b4fc;
    background: #eef2ff;
    color: #3730a3;
}

html[data-theme="light"] .cms-filter-tab span {
    background: #eef2f7;
    color: #475569;
}

html[data-theme="light"] .cms-filter-tab.is-selected span {
    background: #e0e7ff;
    color: #3730a3;
}

html[data-theme="light"] .cms-toolbar-link,
html[data-theme="light"] .cms-toolbar-note {
    color: #4338ca;
}

html[data-theme="light"] .cms-toolbar-link:hover {
    color: #312e81;
}

html[data-theme="light"] .cms-list-heading {
    border-color: #dbe2ee;
    background: #f1f5f9;
    color: #64748b;
}

html[data-theme="light"] .cms-list-row:hover {
    border-color: #c7d2fe;
    background: #f8faff;
}

html[data-theme="light"] .cms-list-date {
    color: #64748b;
}

html[data-theme="light"] .cms-status-pill.is-active {
    background: #ecfdf5;
    color: #047857;
}

html[data-theme="light"] .cms-status-pill.is-inactive {
    background: #f1f5f9;
    color: #475569;
}

html[data-theme="light"] .cms-status-pill.is-trashed {
    background: #fff1f2;
    color: #be123c;
}

html[data-theme="light"] .cms-empty-state {
    border-color: #cbd5e1;
    background: #ffffff;
}

html[data-theme="light"] .cms-empty-icon {
    border-color: #c7d2fe;
    background: #eef2ff;
    color: #4338ca;
}

html[data-theme="light"] .cms-empty-state h3 {
    color: #172033;
}

html[data-theme="light"] .cms-empty-state p {
    color: #64748b;
}

html[data-theme="light"] .cms-editor-dialog {
    border-color: #cbd5e1;
    background: #ffffff;
    color: #1e293b;
    box-shadow: 0 28px 90px rgba(15, 23, 42, 0.24);
}

html[data-theme="light"] .cms-editor-dialog::backdrop {
    background: rgba(15, 23, 42, 0.4);
}

html[data-theme="light"] .cms-editor-dialog-header {
    border-bottom-color: #e2e8f0;
    background: rgba(255, 255, 255, 0.96);
}

html[data-theme="light"] .cms-dialog-close {
    border-color: #dbe2ee;
    background: #f8fafc;
    color: #475569;
}

html[data-theme="light"] .cms-dialog-close:hover {
    border-color: #a5b4fc;
    color: #312e81;
}

.cms-preview-dialog {
    width: min(960px, 96vw);
}

.cms-preview-description,
.cms-preview-meta {
    max-width: 80ch;
    margin: 1rem auto 0;
    padding: 0 1.4rem;
    color: #cbd5e1;
    font-size: 0.8rem;
    line-height: 1.65;
}

.cms-preview-meta {
    margin-top: 0.35rem;
    color: #94a3b8;
    font-size: 0.72rem;
}

.cms-preview-content {
    max-width: 80ch;
    margin: 0 auto;
    padding: 1.5rem 1.4rem 2rem;
    color: #e2e8f0;
    font-size: 0.92rem;
    line-height: 1.8;
    overflow-wrap: anywhere;
}

.cms-preview-content h1,
.cms-preview-content h2,
.cms-preview-content h3,
.cms-preview-content h4 {
    margin: 1.5em 0 0.55em;
    color: #f8fafc;
    font-weight: 800;
    line-height: 1.3;
}

.cms-preview-content h2 { font-size: 1.35rem; }
.cms-preview-content h3 { font-size: 1.12rem; }
.cms-preview-content h4 { font-size: 0.98rem; }
.cms-preview-content p,
.cms-preview-content ul,
.cms-preview-content ol,
.cms-preview-content blockquote,
.cms-preview-content pre,
.cms-preview-content table { margin: 0.8em 0; }
.cms-preview-content ul,
.cms-preview-content ol { padding-left: 1.4rem; }
.cms-preview-content ul { list-style: disc; }
.cms-preview-content ol { list-style: decimal; }
.cms-preview-content a { color: #a5b4fc; text-decoration: underline; text-underline-offset: 0.2em; }
.cms-preview-content blockquote {
    border-left: 3px solid #818cf8;
    padding-left: 1rem;
    color: #cbd5e1;
}
.cms-preview-content pre {
    overflow-x: auto;
    border: 1px solid rgba(148, 163, 184, 0.2);
    border-radius: 0.75rem;
    padding: 1rem;
    background: rgba(15, 23, 42, 0.8);
}
.cms-preview-content table {
    width: 100%;
    border-collapse: collapse;
}
.cms-preview-content th,
.cms-preview-content td {
    border: 1px solid rgba(148, 163, 184, 0.24);
    padding: 0.5rem 0.65rem;
    text-align: left;
}
.cms-preview-content img {
    max-width: 100%;
    height: auto;
    border-radius: 0.75rem;
}

html[data-theme="light"] .cms-preview-description,
html[data-theme="light"] .cms-preview-content {
    color: #334155;
}

html[data-theme="light"] .cms-preview-meta {
    color: #64748b;
}

html[data-theme="light"] .cms-preview-content h1,
html[data-theme="light"] .cms-preview-content h2,
html[data-theme="light"] .cms-preview-content h3,
html[data-theme="light"] .cms-preview-content h4 {
    color: #172033;
}

html[data-theme="light"] .cms-preview-content a {
    color: #4338ca;
}

html[data-theme="light"] .cms-preview-content blockquote {
    color: #475569;
}

html[data-theme="light"] .cms-preview-content pre {
    border-color: #dbe2ee;
    background: #f1f5f9;
}

html[data-theme="light"] .cms-preview-content th,
html[data-theme="light"] .cms-preview-content td {
    border-color: #dbe2ee;
}

/* The pricing and docs-only rules stay here; profile and blog styling is
   consolidated with the existing public-page sections below. */
.pricing-page,
.api-docs-page {
    --public-line: rgba(148, 163, 184, 0.19);
    --public-panel: rgba(13, 19, 32, 0.88);
    --public-raised: rgba(25, 34, 52, 0.78);
}

.pricing-page {
    min-height: 60vh;
    padding-block: clamp(3rem, 7vw, 5.5rem);
    background:
        radial-gradient(ellipse at 50% -5%, rgba(99, 102, 241, 0.14), transparent 36rem),
        transparent;
}
.pricing-shell { max-width: 82rem; }
.pricing-heading { margin-bottom: clamp(2rem, 4vw, 3.25rem); }
.pricing-heading > .pricing-eyebrow { display: inline-block; border: 1px solid rgba(129, 140, 248, 0.28); border-radius: 999px; padding: 0.45rem 0.75rem; background: rgba(99, 102, 241, 0.09); }
.pricing-heading h1 { margin-top: 1rem; color: #f1f5f9; font-size: clamp(2rem, 4.5vw, 3.4rem); font-weight: 830; letter-spacing: -0.055em; line-height: 1.06; }
.pricing-heading > p:last-child { max-width: 47rem; margin: 0.9rem auto 0; color: #a9b4c6; font-size: 0.86rem; line-height: 1.75; }
.pricing-heading code { color: #7ce4c5 !important; }
.pricing-grid { align-items: stretch; gap: 1rem; }
.pricing-card { min-height: 25rem; border: 1px solid var(--public-line); border-radius: 1.15rem; padding: 1.45rem; background: linear-gradient(155deg, rgba(22, 31, 49, 0.97), rgba(13, 19, 32, 0.97)); box-shadow: 0 18px 50px rgba(0, 0, 0, 0.16); }
.pricing-card.is-popular { border-color: rgba(129, 140, 248, 0.55); background: radial-gradient(ellipse at 80% 0, rgba(99, 102, 241, 0.14), transparent 45%), linear-gradient(155deg, rgba(25, 31, 58, 0.98), rgba(13, 19, 32, 0.98)); }
.pricing-plan-index { color: #95a2b9; font-size: 0.58rem; font-weight: 800; letter-spacing: 0.13em; }
.pricing-card h2 { margin-top: 0.55rem; color: #edf1f8; font-size: 1.15rem; letter-spacing: -0.02em; }
.pricing-card .text-4xl { color: #f7f8fc; font-size: 2.55rem; letter-spacing: -0.06em; }
.pricing-card .mt-4 + span,
.pricing-card .text-slate-400 { color: #9ca8bb; }
.pricing-allowance { margin-top: 0.55rem; color: #b9c4fa !important; font-size: 0.67rem; }
.pricing-features { margin-top: 1.5rem; color: #c0c9d8; font-size: 0.72rem; line-height: 1.55; }
.pricing-features li { align-items: flex-start; gap: 0.6rem; }
.pricing-check { position: relative; width: 0.95rem; height: 0.95rem; flex: 0 0 auto; margin-top: 0.08rem; border: 1px solid rgba(94, 224, 178, 0.55); border-radius: 50%; background: rgba(94, 224, 178, 0.1); }
.pricing-check::after { position: absolute; top: 0.15rem; left: 0.28rem; width: 0.22rem; height: 0.4rem; transform: rotate(45deg); border-right: 1.5px solid #5ee0b2; border-bottom: 1.5px solid #5ee0b2; content: ""; }
.pricing-card-action { border-color: var(--public-line); }
.pricing-cta { min-height: 2.8rem; display: grid; place-items: center; border: 1px solid var(--public-line); border-radius: 0.75rem; color: #e9edf5; text-decoration: none; }
.pricing-cta:not(.accent-btn) { background: rgba(34, 44, 63, 0.85); }
.pricing-cta:not(.accent-btn):hover { border-color: rgba(165, 180, 252, 0.4); background: rgba(49, 60, 83, 0.95); }
.pricing-cta.accent-btn { border-color: rgba(165, 180, 252, 0.3); background: linear-gradient(125deg, #6366f1, #4f46e5); }
.pricing-popular { right: 1.15rem; border: 1px solid rgba(165, 180, 252, 0.3); padding: 0.4rem 0.7rem; font-size: 0.56rem; letter-spacing: 0.11em; }
.pricing-payments { justify-content: space-between; gap: 1.5rem; margin-top: 1.35rem; border: 1px solid var(--public-line); padding: clamp(1.2rem, 3vw, 1.7rem); background: var(--public-panel); }
.pricing-payments h2 { margin-top: 0.45rem; color: #eef2fa; font-size: 1rem; }
.pricing-payments > div:first-child > p:last-child { max-width: 49rem; color: #a5b0c1; font-size: 0.7rem; line-height: 1.65; }
.pricing-payment-tag { border: 1px solid var(--public-line); border-radius: 0.65rem; padding: 0.55rem 0.7rem; background: var(--public-raised); color: #ccd4e2; font-size: 0.62rem; white-space: nowrap; }

.api-docs-page { padding-block: clamp(2.5rem, 6vw, 4rem); }
.api-docs-shell { max-width: 68rem; }
.api-docs-hero { overflow: hidden; border-color: var(--public-line); border-radius: 1.3rem; padding: clamp(1.4rem, 4vw, 2.4rem); background: radial-gradient(ellipse at 90% 0, rgba(34, 211, 238, 0.09), transparent 40%), linear-gradient(135deg, #141e30, #101827 68%, #171a36); }
.api-docs-hero .admin-page-eyebrow { color: #a5b4fc; }
.api-docs-hero .admin-page-title { margin-top: 0.35rem; color: #f1f5f9; font-size: clamp(1.8rem, 4vw, 2.65rem); letter-spacing: -0.05em; }
.api-docs-hero .admin-page-description { max-width: 44rem; margin-top: 0.75rem; color: #b0bbcc; font-size: 0.86rem; line-height: 1.7; }
.api-docs-steps { gap: 0.85rem; }
.api-docs-step,
.api-docs-example { border: 1px solid var(--public-line); border-radius: 1rem; background: var(--public-panel); }
.api-docs-step { min-width: 0; padding: 1.25rem; }
.api-docs-step .admin-page-eyebrow { color: #a5b4fc; }
.api-docs-step h2 { margin-top: 0.55rem; color: #eef2fa; font-size: 0.95rem; font-weight: 760; }
.api-docs-step code { display: block; margin-top: 0.9rem; overflow-wrap: anywhere; border: 1px solid var(--public-line); border-radius: 0.65rem; padding: 0.7rem; background: rgba(5, 10, 19, 0.65); color: #c7d2fe; font-family: "JetBrains Mono", monospace; font-size: 0.68rem; line-height: 1.6; }
.api-docs-step p.mt-3 { color: #a7b2c4; font-size: 0.7rem; line-height: 1.7; }
.api-docs-example { padding: clamp(1.15rem, 3vw, 1.6rem); }
.api-docs-example h2 { color: #eef2fa; font-size: 1.1rem; font-weight: 760; }
.api-docs-example p.mt-1 { color: #a5b0c1; font-size: 0.73rem; line-height: 1.6; }
.api-docs-example pre { border-color: rgba(148, 163, 184, 0.2); border-radius: 0.9rem; background: rgba(5, 10, 19, 0.85); color: #c7d2fe; font-family: "JetBrains Mono", monospace; font-size: 0.72rem; line-height: 1.8; }
.api-docs-playground { min-height: 2.5rem; border: 1px solid rgba(165, 180, 252, 0.26); background: linear-gradient(125deg, #6366f1, #4f46e5); text-decoration: none; }
.api-docs-notice { border-color: rgba(129, 140, 248, 0.28); border-radius: 1rem; background: rgba(99, 102, 241, 0.09); color: #c5ccda; line-height: 1.6; }
.api-docs-notice strong { color: #edf1f8; }
.api-docs-notice span { color: #aab5c7; }
.api-docs-shell > .flex a { min-height: 2.7rem; border-radius: 0.7rem; font-size: 0.74rem; font-weight: 750; text-decoration: none; }
.api-docs-shell > .flex a:first-child { border: 1px solid rgba(165, 180, 252, 0.26); background: linear-gradient(125deg, #6366f1, #4f46e5); }
.api-docs-shell > .flex a:last-child { border: 1px solid var(--public-line); background: var(--public-raised); color: #d5dce8; }

html[data-theme="light"] .pricing-page,
html[data-theme="light"] .api-docs-page {
    --public-line: rgba(80, 99, 127, 0.2);
    --public-panel: rgba(255, 255, 255, 0.92);
    --public-raised: #f0f3f9;
}

html[data-theme="light"] .pricing-heading h1,
html[data-theme="light"] .pricing-card h2,
html[data-theme="light"] .pricing-card .text-4xl,
html[data-theme="light"] .pricing-payments h2 { color: #172033; }
html[data-theme="light"] .pricing-heading > p:last-child,
html[data-theme="light"] .pricing-features,
html[data-theme="light"] .pricing-payments > div:first-child > p:last-child { color: #536177; }
html[data-theme="light"] .pricing-card,
html[data-theme="light"] .pricing-payments { border-color: #d7dfeb; background: linear-gradient(155deg, rgba(255,255,255,.98), rgba(246,248,252,.98)); box-shadow: 0 12px 34px rgba(35, 48, 70, 0.07); }
html[data-theme="light"] .pricing-card.is-popular { border-color: #aebcf7; background: radial-gradient(ellipse at 80% 0, rgba(99, 102, 241, 0.08), transparent 45%), #fff; }
html[data-theme="light"] .pricing-plan-index,
html[data-theme="light"] .pricing-card .text-slate-400 { color: #64728a; }
html[data-theme="light"] .pricing-allowance { color: #4338ca !important; }
html[data-theme="light"] .pricing-card-action { border-color: #d7dfeb; }
html[data-theme="light"] .pricing-cta:not(.accent-btn) { border-color: #d7dfeb; background: #edf1f7; color: #27364f; }
html[data-theme="light"] .pricing-cta:not(.accent-btn):hover { border-color: #b8c4d8; background: #e5eaf3; }
html[data-theme="light"] .pricing-payment-tag { border-color: #d7dfeb; background: #f3f6fa; color: #40506a; }

html[data-theme="light"] .api-docs-hero { border-color: #d7dfeb; background: radial-gradient(ellipse at 90% 0, rgba(34, 211, 238, 0.07), transparent 40%), linear-gradient(135deg, #fff, #f3f6fb 68%, #eeeffa); }
html[data-theme="light"] .api-docs-hero .admin-page-title,
html[data-theme="light"] .api-docs-example h2,
html[data-theme="light"] .api-docs-step h2 { color: #172033; }
html[data-theme="light"] .api-docs-hero .admin-page-description,
html[data-theme="light"] .api-docs-example p.mt-1,
html[data-theme="light"] .api-docs-step p.mt-3 { color: #536177; }
html[data-theme="light"] .api-docs-step,
html[data-theme="light"] .api-docs-example { border-color: #d7dfeb; background: rgba(255,255,255,.93); }
html[data-theme="light"] .api-docs-step code { border-color: #dce3ef; background: #f2f5fa; color: #3730a3; }
html[data-theme="light"] .api-docs-example pre { border-color: #d7dfeb; background: #f1f4f9; color: #3730a3; }
html[data-theme="light"] .api-docs-notice { border-color: #c7d2fe; background: #eef2ff; color: #334155; }
html[data-theme="light"] .api-docs-notice strong { color: #1e293b; }
html[data-theme="light"] .api-docs-notice span { color: #536177; }
html[data-theme="light"] .api-docs-shell > .flex a:last-child { border-color: #d7dfeb; background: #f2f5fa; color: #334155; }

.profile-viewer-page :focus-visible,
.blog-archive-page :focus-visible,
.pricing-page :focus-visible,
.api-docs-page :focus-visible {
    outline: 2px solid #818cf8;
    outline-offset: 3px;
}

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

@media (max-width: 640px) {
    .pricing-grid { grid-template-columns: minmax(0, 1fr); }
    .pricing-card { min-height: 0; }
    .pricing-payments { align-items: flex-start; }
    .pricing-payment-tag { white-space: normal; }
    .api-docs-example > div:first-child { align-items: stretch; }
    .api-docs-playground { width: 100%; }
}

@media (prefers-reduced-motion: reduce) {
    .pricing-cta { transition: none !important; }
}

/* Pages & blog CMS: clearer hierarchy and durable contrast in either theme. */
.admin-page-hero {
    min-width: 0;
    gap: clamp(1rem, 3vw, 2.5rem);
}

.admin-page-hero-copy {
    max-width: 58rem;
}

.admin-page-eyebrow {
    color: #a5b4fc;
}

.admin-page-hero-stat {
    min-height: 3.5rem;
}

.admin-page-hero-stat strong {
    font-variant-numeric: tabular-nums;
}

.cms-filter-tabs {
    border-bottom: 1px solid rgba(100, 116, 139, 0.18);
    padding-bottom: 0.55rem;
    overscroll-behavior-x: contain;
}

.cms-filter-tab:focus-visible,
.cms-toolbar-link:focus-visible,
.cms-dialog-close:focus-visible {
    outline: 2px solid #a5b4fc;
    outline-offset: 2px;
}

.cms-bulk-toolbar {
    min-width: 0;
}

.cms-list-scroll {
    overscroll-behavior: contain;
    scrollbar-gutter: stable;
}

.cms-list-heading,
.cms-list-row {
    grid-template-columns: minmax(12rem, 1fr) minmax(5.5rem, 7rem) minmax(7rem, 9rem) minmax(17rem, auto);
}

.cms-list-heading {
    box-shadow: 0 1px 0 rgba(2, 6, 23, 0.12);
}

.cms-list-row {
    transition: border-color 150ms ease, background-color 150ms ease;
}

.cms-list-main h3 {
    line-height: 1.45;
}

.cms-list-main p {
    overflow-wrap: anywhere;
}

.cms-row-actions .admin-action-button {
    white-space: nowrap;
}

.admin-action-button-secondary,
.admin-action-button-success,
.admin-action-button-warning,
.admin-action-button-danger {
    border: 1px solid;
    border-radius: 0.7rem;
    font-weight: 750;
    transition: transform 150ms ease, background-color 150ms ease, border-color 150ms ease, color 150ms ease;
}

.admin-action-button-secondary:focus-visible,
.admin-action-button-success:focus-visible,
.admin-action-button-warning:focus-visible,
.admin-action-button-danger:focus-visible {
    outline: 2px solid #a5b4fc;
    outline-offset: 2px;
}

.cms-editor-dialog {
    overscroll-behavior: contain;
}

.cms-editor-dialog-inner {
    overscroll-behavior: contain;
}

.cms-editor-dialog form {
    min-width: 0;
}

.cms-editor-dialog label > span {
    display: inline-block;
}

.cms-editor-dialog .portal-form-field {
    min-width: 0;
    border-color: rgba(148, 163, 184, 0.3);
    border-radius: 0.7rem;
    background-color: #111b2c;
    color: #e2e8f0;
    line-height: 1.5;
}

.cms-editor-dialog .portal-form-field::placeholder {
    color: #8492a8;
    opacity: 1;
}

.cms-editor-dialog .portal-form-field:focus {
    border-color: #818cf8;
    outline: 2px solid rgba(129, 140, 248, 0.2);
    outline-offset: 1px;
}

.cms-editor-dialog textarea.portal-form-field {
    resize: vertical;
}

.cms-editor-dialog input[type="checkbox"],
.cms-bulk-toolbar input[type="checkbox"],
.cms-row-checkbox {
    accent-color: #6366f1;
}

.cms-editor-dialog form > .flex.flex-col {
    border-color: rgba(100, 116, 139, 0.28);
}

.cms-editor-dialog [data-close-page-editor],
.cms-editor-dialog [data-close-blog-editor] {
    flex: 0 0 auto;
}

html[data-theme="light"] .admin-page-eyebrow {
    color: #4f46a5;
}

html[data-theme="light"] .cms-filter-tabs {
    border-bottom-color: #dbe2ee;
}

html[data-theme="light"] .cms-filter-tab:focus-visible,
html[data-theme="light"] .cms-toolbar-link:focus-visible,
html[data-theme="light"] .cms-dialog-close:focus-visible,
html[data-theme="light"] .admin-action-button-secondary:focus-visible,
html[data-theme="light"] .admin-action-button-success:focus-visible,
html[data-theme="light"] .admin-action-button-warning:focus-visible,
html[data-theme="light"] .admin-action-button-danger:focus-visible {
    outline-color: #4f46a5;
}

html[data-theme="light"] .cms-list-heading,
html[data-theme="light"] .cms-list-row {
    color: #273449;
}

html[data-theme="light"] .cms-editor-dialog .portal-form-field {
    border-color: #cbd5e1;
    background-color: #f8fafc;
    color: #172033;
}

html[data-theme="light"] .cms-editor-dialog .portal-form-field::placeholder {
    color: #718096;
}

html[data-theme="light"] .cms-editor-dialog .portal-form-field:focus {
    border-color: #6366f1;
    outline-color: rgba(99, 102, 241, 0.16);
}

html[data-theme="light"] .cms-editor-dialog form > .flex.flex-col {
    border-color: #dbe2ee;
}

@media (max-width: 860px) {
    .cms-list-scroll {
        max-height: min(68vh, 680px);
        padding: 0.35rem;
    }

    .cms-list-row {
        grid-template-columns: minmax(0, 1fr) auto;
        align-items: start;
        padding: 0.8rem;
    }

    .cms-list-row > :nth-child(2) {
        padding-top: 0.1rem;
    }

    .cms-row-actions {
        gap: 0.4rem;
    }

    .cms-row-actions .admin-action-button {
        min-height: 2.25rem;
        padding: 0.48rem 0.65rem;
    }

    .cms-editor-dialog {
        width: min(100% - 1rem, 48rem);
        max-width: calc(100vw - 1rem);
        max-height: calc(100dvh - 1rem);
        border-radius: 1.1rem;
    }

    .cms-editor-dialog-inner {
        max-height: calc(100dvh - 1rem);
    }
}

@media (max-width: 560px) {
    .admin-page-hero {
        border-radius: 1.15rem;
        padding: 1.15rem;
    }

    .admin-page-hero-actions {
        align-items: stretch;
        justify-content: flex-start;
    }

    .admin-page-hero-stat {
        flex: 1 1 8rem;
        min-width: 0;
    }

    .admin-page-hero-actions > .admin-action-button,
    .admin-page-hero-actions > a {
        flex: 1 1 auto;
    }

    .cms-bulk-toolbar {
        align-items: stretch;
    }

    .cms-bulk-toolbar > div {
        width: 100%;
    }

    .cms-bulk-toolbar select {
        flex: 1 1 10rem;
        min-width: 0 !important;
    }

    .cms-toolbar-link,
    .cms-toolbar-note {
        text-align: left;
    }

    .cms-list-row {
        column-gap: 0.45rem;
    }

    .cms-list-main {
        gap: 0.55rem;
    }

    .cms-row-actions {
        display: grid;
        grid-template-columns: repeat(2, minmax(0, 1fr));
    }

    .cms-row-actions .admin-action-button {
        width: 100%;
    }

    .cms-editor-dialog-header {
        padding: 1rem;
    }

    .cms-editor-dialog form {
        padding: 1rem !important;
    }

    .cms-editor-dialog form > .grid {
        grid-template-columns: minmax(0, 1fr);
    }
}

/* Blog library thumbnails and scheduled-state labels */
.cms-blog-thumbnail {
    display: block;
    width: 3.5rem;
    height: 2.75rem;
    flex: 0 0 3.5rem;
    border: 1px solid rgba(148, 163, 184, 0.22);
    border-radius: 0.65rem;
    background: rgba(15, 23, 42, 0.75);
    object-fit: cover;
}

.cms-status-pill.is-scheduled {
    color: #fcd34d;
    background: rgba(245, 158, 11, 0.12);
    border-color: rgba(245, 158, 11, 0.24);
}

html[data-theme="light"] .cms-status-pill.is-scheduled,
html[data-theme="light"] .cms-list-date small {
    color: #92400e;
}

.cms-list-date small {
    display: block;
    margin-top: 0.3rem;
    color: #fbbf24;
    font-size: 0.65rem;
    line-height: 1.35;
}

/* Public ad placements: snippets are rendered in isolated, sandboxed iframes. */
.public-ad-slot {
    position: relative;
    width: min(100% - 2rem, 72rem);
    margin: 1.35rem auto;
    padding: 1rem;
    overflow: hidden;
    border: 1px solid rgba(148, 163, 184, 0.2);
    border-radius: 1rem;
    background: rgba(15, 23, 42, 0.48);
}

.public-ad-label {
    display: block;
    margin: 0 0 0.55rem;
    color: #94a3b8;
    font-size: 0.62rem;
    font-weight: 700;
    letter-spacing: 0.12em;
    text-transform: uppercase;
}

.public-ad-frame {
    display: block;
    width: 100%;
    min-height: 60px;
    border: 0;
    border-radius: 0.7rem;
    background: #fff;
}

html[data-theme="light"] .public-ad-slot {
    border-color: rgba(100, 116, 139, 0.2);
    background: rgba(255, 255, 255, 0.8);
}

html[data-theme="light"] .public-ad-label {
    color: #64748b;
}

.ads-placement-list {
    display: flex;
    max-height: min(76vh, 58rem);
    flex-direction: column;
    gap: 1rem;
    overflow-y: auto;
    overscroll-behavior: contain;
    padding: 0.15rem 0.65rem 0.25rem 0.1rem;
    scrollbar-width: thin;
    scrollbar-color: rgba(129, 140, 248, 0.55) rgba(15, 23, 42, 0.4);
}

.ads-placement-list::-webkit-scrollbar {
    width: 8px;
}

.ads-placement-list::-webkit-scrollbar-thumb {
    border: 2px solid transparent;
    border-radius: 999px;
    background: rgba(129, 140, 248, 0.55);
    background-clip: padding-box;
}

.ad-slot-status-actions {
    display: inline-flex;
    gap: 0.4rem;
    padding: 0.25rem;
    border: 1px solid rgba(100, 116, 139, 0.25);
    border-radius: 0.8rem;
    background: rgba(2, 6, 23, 0.48);
}

.ad-slot-status-button {
    min-width: 5.25rem;
    padding: 0.45rem 0.7rem;
    border: 1px solid transparent;
    border-radius: 0.55rem;
    color: #94a3b8;
    font-size: 0.7rem;
    font-weight: 700;
    transition: background-color 160ms ease, color 160ms ease, border-color 160ms ease;
}

.ad-slot-status-button.is-active.is-selected {
    color: #a7f3d0;
    border-color: rgba(16, 185, 129, 0.28);
    background: rgba(16, 185, 129, 0.14);
}

.ad-slot-status-button.is-inactive.is-selected {
    color: #cbd5e1;
    border-color: rgba(148, 163, 184, 0.22);
    background: rgba(148, 163, 184, 0.12);
}

.ad-slot-status-button:not(:disabled):hover {
    color: #fff;
    background: rgba(99, 102, 241, 0.2);
}

.ad-slot-status-button:disabled {
    cursor: default;
}

html[data-theme="light"] .ad-slot-status-actions {
    border-color: rgba(100, 116, 139, 0.24);
    background: #f8fafc;
}

html[data-theme="light"] .ad-slot-status-button {
    color: #475569;
}

html[data-theme="light"] .ad-slot-status-button.is-active.is-selected {
    color: #047857;
    border-color: rgba(5, 150, 105, 0.2);
    background: #d1fae5;
}

html[data-theme="light"] .ad-slot-status-button.is-inactive.is-selected {
    color: #334155;
    border-color: rgba(100, 116, 139, 0.2);
    background: #e2e8f0;
}

.public-sticky-ad {
    position: fixed;
    z-index: 90;
    right: 1rem;
    bottom: 1rem;
    left: 1rem;
    width: min(calc(100% - 2rem), 72rem);
    margin: 0 auto;
    padding: 0.65rem;
    border-color: rgba(99, 102, 241, 0.35);
    background: rgba(8, 12, 22, 0.96);
    box-shadow: 0 18px 60px rgba(2, 6, 23, 0.48);
    backdrop-filter: blur(18px);
}

.public-sticky-ad-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 1rem;
    padding: 0 0.2rem 0.45rem;
}

.public-sticky-ad-header .public-ad-label {
    margin: 0;
    color: #cbd5e1;
}

.public-sticky-ad-minimize,
.public-sticky-ad-restore {
    padding: 0.4rem 0.7rem;
    border: 1px solid rgba(148, 163, 184, 0.26);
    border-radius: 0.65rem;
    background: rgba(30, 41, 59, 0.8);
    color: #e2e8f0;
    font-size: 0.72rem;
    font-weight: 700;
}

.public-sticky-ad-restore {
    display: block;
    margin-left: auto;
}

.public-sticky-ad-restore[hidden],
.public-sticky-ad-header[hidden],
.public-sticky-ad-content[hidden] {
    display: none;
}

.public-sticky-ad .public-ad-frame {
    max-height: min(600px, 34vh);
}

.public-sticky-ad.is-minimized {
    right: 1rem;
    left: auto;
    width: auto;
    max-width: calc(100% - 2rem);
    padding: 0.45rem;
}

body.has-sticky-footer-ad {
    padding-bottom: 18rem;
}

html[data-theme="light"] .public-sticky-ad {
    border-color: rgba(99, 102, 241, 0.28);
    background: rgba(255, 255, 255, 0.97);
}

html[data-theme="light"] .public-sticky-ad-header .public-ad-label {
    color: #475569;
}

html[data-theme="light"] .public-sticky-ad-minimize,
html[data-theme="light"] .public-sticky-ad-restore {
    border-color: rgba(100, 116, 139, 0.22);
    background: #f1f5f9;
    color: #334155;
}

@media (max-width: 640px) {
    .public-ad-slot {
        width: calc(100% - 1.25rem);
        margin: 1rem auto;
        padding: 0.65rem;
        border-radius: 0.8rem;
    }

    .public-sticky-ad {
        right: 0.45rem;
        bottom: 0.45rem;
        left: 0.45rem;
        width: calc(100% - 0.9rem);
    }

    .public-sticky-ad .public-ad-frame {
        max-height: 28vh;
    }

    body.has-sticky-footer-ad {
        padding-bottom: 13rem;
    }
}

@media (prefers-reduced-motion: reduce) {
    .cms-list-row,
    .admin-action-button-secondary,
    .admin-action-button-success,
    .admin-action-button-warning,
    .admin-action-button-danger {
        transition: none;
    }
}

@media (max-width: 860px) {
    .admin-page-hero {
        align-items: flex-start;
        flex-direction: column;
    }

    .admin-page-hero-actions {
        width: 100%;
        flex-wrap: wrap;
        justify-content: space-between;
    }

    .cms-list-heading {
        display: none;
    }

    .cms-list-row {
        grid-template-columns: minmax(0, 1fr) auto;
        gap: 0.65rem;
    }

    .cms-list-row > :nth-child(2) {
        justify-self: end;
    }

    .cms-list-date {
        grid-column: 1 / 2;
        padding-left: 1.75rem;
    }

    .cms-row-actions {
        grid-column: 1 / -1;
        justify-content: flex-start;
        padding-top: 0.2rem;
    }
}

.admin-action-button {
    display: inline-flex;
    min-height: 2.4rem;
    align-items: center;
    justify-content: center;
    gap: 0.45rem;
    border: 1px solid transparent;
    border-radius: 0.75rem;
    padding: 0.55rem 0.8rem;
    font-family: "Plus Jakarta Sans", "Inter", sans-serif;
    font-size: 0.68rem;
    font-weight: 800;
    line-height: 1.2;
    text-decoration: none;
    transition: transform 150ms ease, background-color 150ms ease, border-color 150ms ease, box-shadow 150ms ease;
}

.admin-action-button:hover {
    transform: translateY(-1px);
}

.admin-action-button:focus-visible {
    outline: 2px solid #818cf8;
    outline-offset: 2px;
}

.admin-action-button.is-primary {
    border-color: rgba(245, 158, 11, 0.45);
    background: linear-gradient(135deg, #fbbf24, #f59e0b);
    color: #422006;
    box-shadow: 0 8px 18px rgba(245, 158, 11, 0.16);
}

.admin-action-button.is-danger {
    border-color: rgba(244, 63, 94, 0.42);
    background: linear-gradient(135deg, #e11d48, #be123c);
    color: #ffffff;
    box-shadow: 0 8px 18px rgba(225, 29, 72, 0.16);
}

.admin-action-button.is-secondary {
    border-color: rgba(148, 163, 184, 0.22);
    background: rgba(15, 23, 42, 0.72);
    color: #e2e8f0;
}

.admin-action-button.is-secondary:hover {
    border-color: rgba(129, 140, 248, 0.42);
    background: rgba(30, 41, 59, 0.88);
}

.admin-settings-tablist {
    display: flex;
    gap: 0.4rem;
    overflow-x: auto;
    border-bottom: 1px solid rgba(51, 65, 85, 0.75);
    padding-bottom: 0.7rem;
    scrollbar-width: thin;
}

.admin-settings-tab {
    display: inline-flex;
    min-height: 2.35rem;
    flex: 0 0 auto;
    align-items: center;
    justify-content: center;
    border: 1px solid transparent;
    border-radius: 0.7rem;
    padding: 0.55rem 0.75rem;
    background: transparent;
    color: #94a3b8;
    font-family: "Plus Jakarta Sans", "Inter", sans-serif;
    font-size: 0.68rem;
    font-weight: 700;
    white-space: nowrap;
    transition: color 140ms ease, border-color 140ms ease, background-color 140ms ease;
}

.admin-settings-tab:hover {
    background: rgba(30, 41, 59, 0.7);
    color: #e2e8f0;
}

.admin-settings-tab.is-active {
    border-color: rgba(129, 140, 248, 0.32);
    background: rgba(99, 102, 241, 0.16);
    color: #c7d2fe;
}

.admin-settings-tab:focus-visible {
    outline: 2px solid #818cf8;
    outline-offset: 2px;
}

.admin-settings-panel:focus {
    outline: none;
}

.admin-settings-asset-card {
    min-width: 0;
    border: 1px solid rgba(148, 163, 184, 0.16);
    border-radius: 0.9rem;
    background: rgba(15, 23, 42, 0.42);
    padding: 1rem;
}

.admin-settings-asset-preview {
    display: flex;
    min-height: 6.5rem;
    align-items: center;
    justify-content: center;
    overflow: hidden;
    border: 1px dashed rgba(148, 163, 184, 0.24);
    border-radius: 0.75rem;
    background: rgba(2, 6, 23, 0.35);
    padding: 0.75rem;
    margin-bottom: 1rem;
}

.admin-settings-asset-preview.is-icon {
    min-height: 5.25rem;
}

.admin-settings-color-picker {
    width: 3.25rem;
    min-width: 3.25rem;
    height: 2.55rem;
    border: 1px solid rgba(148, 163, 184, 0.22);
    border-radius: 0.7rem;
    background: rgba(2, 6, 23, 0.45);
    padding: 0.25rem;
    cursor: pointer;
}

.admin-settings-file-input {
    display: block;
    width: 100%;
    border: 1px solid rgba(148, 163, 184, 0.2);
    border-radius: 0.7rem;
    background: rgba(2, 6, 23, 0.42);
    padding: 0.55rem;
    color: #cbd5e1;
    font-size: 0.68rem;
}

.admin-settings-file-input::file-selector-button {
    margin-right: 0.65rem;
    border: 1px solid rgba(129, 140, 248, 0.25);
    border-radius: 0.5rem;
    background: rgba(99, 102, 241, 0.16);
    padding: 0.4rem 0.55rem;
    color: #c7d2fe;
    font-size: 0.65rem;
    font-weight: 700;
    cursor: pointer;
}

.admin-payment-action {
    display: inline-flex;
    min-height: 2rem;
    align-items: center;
    justify-content: center;
    gap: 0.35rem;
    border: 1px solid transparent;
    border-radius: 0.65rem;
    padding: 0.4rem 0.6rem;
    font-family: "Plus Jakarta Sans", "Inter", sans-serif;
    font-size: 0.65rem;
    font-weight: 800;
    line-height: 1.1;
    white-space: nowrap;
    transition: transform 140ms ease, background-color 140ms ease, border-color 140ms ease;
}

.admin-payment-action:hover {
    transform: translateY(-1px);
}

.admin-payment-action:focus-visible {
    outline: 2px solid #818cf8;
    outline-offset: 2px;
}

.admin-payment-action.is-approve {
    border-color: rgba(16, 185, 129, 0.32);
    background: rgba(16, 185, 129, 0.16);
    color: #6ee7b7;
}

.admin-payment-action.is-approve:hover {
    background: rgba(16, 185, 129, 0.26);
}

.admin-payment-action.is-reject {
    border-color: rgba(244, 63, 94, 0.28);
    background: rgba(244, 63, 94, 0.1);
    color: #fda4af;
}

.admin-payment-action.is-reject:hover {
    background: rgba(244, 63, 94, 0.2);
}

.admin-payment-status {
    display: inline-flex;
    align-items: center;
    border: 1px solid transparent;
    border-radius: 999px;
    padding: 0.28rem 0.55rem;
    font-size: 0.62rem;
    font-weight: 800;
    line-height: 1.15;
    text-transform: uppercase;
    letter-spacing: 0.04em;
    white-space: nowrap;
}

.admin-payment-status.is-pending {
    border-color: rgba(245, 158, 11, 0.32);
    background: rgba(245, 158, 11, 0.12);
    color: #fcd34d;
}

.admin-payment-status.is-approved {
    border-color: rgba(16, 185, 129, 0.25);
    background: rgba(16, 185, 129, 0.1);
    color: #6ee7b7;
}

.admin-payment-status.is-rejected {
    border-color: rgba(244, 63, 94, 0.25);
    background: rgba(244, 63, 94, 0.1);
    color: #fda4af;
}

.admin-proxy-status {
    display: inline-flex;
    align-items: center;
    border: 1px solid transparent;
    border-radius: 999px;
    padding: 0.28rem 0.55rem;
    font-size: 0.62rem;
    font-weight: 800;
    line-height: 1.15;
    white-space: nowrap;
}

.admin-proxy-status.is-working {
    border-color: rgba(16, 185, 129, 0.28);
    background: rgba(16, 185, 129, 0.12);
    color: #6ee7b7;
}

.admin-proxy-status.is-not-working {
    border-color: rgba(244, 63, 94, 0.28);
    background: rgba(244, 63, 94, 0.12);
    color: #fda4af;
}

.admin-proxy-status.is-untested {
    border-color: rgba(245, 158, 11, 0.28);
    background: rgba(245, 158, 11, 0.12);
    color: #fcd34d;
}

.admin-proxy-status.is-selected {
    border-color: rgba(129, 140, 248, 0.3);
    background: rgba(99, 102, 241, 0.14);
    color: #c7d2fe;
}

.admin-payment-row.is-pending {
    background: rgba(245, 158, 11, 0.045);
}

.admin-payment-row.is-pending:hover {
    background: rgba(245, 158, 11, 0.09);
}

.admin-firewall-action {
    display: inline-flex;
    min-height: 1.9rem;
    align-items: center;
    justify-content: center;
    border: 1px solid rgba(244, 63, 94, 0.3);
    border-radius: 0.65rem;
    background: rgba(244, 63, 94, 0.12);
    padding: 0.38rem 0.58rem;
    color: #fda4af;
    font-family: "Plus Jakarta Sans", "Inter", sans-serif;
    font-size: 0.63rem;
    font-weight: 800;
    white-space: nowrap;
    transition: transform 140ms ease, background-color 140ms ease, border-color 140ms ease;
}

.admin-firewall-action:hover {
    transform: translateY(-1px);
    border-color: rgba(244, 63, 94, 0.5);
    background: rgba(244, 63, 94, 0.22);
}

.admin-firewall-action:focus-visible {
    outline: 2px solid #fb7185;
    outline-offset: 2px;
}

.admin-http-status {
    display: inline-flex;
    min-width: 2.5rem;
    justify-content: center;
    border: 1px solid transparent;
    border-radius: 0.5rem;
    padding: 0.25rem 0.45rem;
    font-size: 0.63rem;
    font-weight: 800;
    line-height: 1.1;
}

.admin-http-status.is-success {
    border-color: rgba(16, 185, 129, 0.22);
    background: rgba(16, 185, 129, 0.12);
    color: #6ee7b7;
}

.admin-http-status.is-error {
    border-color: rgba(244, 63, 94, 0.24);
    background: rgba(244, 63, 94, 0.12);
    color: #fda4af;
}

.admin-metric-card {
    position: relative;
    display: flex;
    min-height: 6.35rem;
    min-width: 0;
    flex-direction: column;
    justify-content: space-between;
    overflow: hidden;
    border: 1px solid rgba(148, 163, 184, 0.16);
    border-radius: 1rem;
    background: linear-gradient(145deg, rgba(15, 23, 42, 0.94), rgba(15, 23, 42, 0.68));
    padding: 0.8rem;
    box-shadow: 0 10px 24px rgba(2, 6, 23, 0.1);
    transition: transform 150ms ease, border-color 150ms ease, box-shadow 150ms ease;
}

.admin-metric-card::before {
    display: none;
}

.admin-metric-card:hover {
    transform: translateY(-1px);
    border-color: color-mix(in srgb, var(--metric-accent, #818cf8) 34%, transparent);
    box-shadow: 0 14px 28px rgba(2, 6, 23, 0.16);
}

.admin-metric-icon {
    display: inline-flex;
    width: 1.85rem;
    height: 1.85rem;
    flex: none;
    align-items: center;
    justify-content: center;
    border-radius: 0.65rem;
}

.admin-metric-icon.tone-emerald {
    background: rgba(16, 185, 129, 0.14);
    color: #6ee7b7;
}

.admin-metric-icon.tone-purple {
    background: rgba(168, 85, 247, 0.15);
    color: #d8b4fe;
}

.admin-metric-icon.tone-blue {
    background: rgba(59, 130, 246, 0.15);
    color: #93c5fd;
}

.admin-metric-icon.tone-amber {
    background: rgba(245, 158, 11, 0.14);
    color: #fcd34d;
}

.admin-metric-icon.tone-pink {
    background: rgba(236, 72, 153, 0.14);
    color: #f9a8d4;
}

.admin-metric-label {
    color: #94a3b8;
    font-size: 0.66rem;
    font-weight: 700;
    line-height: 1.4;
}

.admin-metric-value {
    margin-top: 0.35rem;
    color: #f8fafc;
    font-size: clamp(1.05rem, 1.35vw, 1.3rem);
    font-weight: 800;
    letter-spacing: -0.045em;
    line-height: 1.1;
}

.admin-metric-note {
    margin-top: 0.3rem;
    color: #94a3b8;
    font-size: 0.6rem;
    line-height: 1.45;
}

.admin-dashboard-panel {
    min-width: 0;
    border: 1px solid rgba(148, 163, 184, 0.16);
    border-radius: 1.2rem;
    background: linear-gradient(145deg, rgba(15, 23, 42, 0.92), rgba(15, 23, 42, 0.68));
    padding: 1.25rem;
    box-shadow: 0 12px 28px rgba(2, 6, 23, 0.12);
}

.admin-dashboard-panel-title {
    color: #f8fafc;
    font-size: 0.95rem;
    font-weight: 800;
    letter-spacing: -0.025em;
    line-height: 1.35;
}

.admin-dashboard-panel-description {
    margin-top: 0.35rem;
    color: #94a3b8;
    font-size: 0.7rem;
    line-height: 1.6;
}

.admin-indexing-notice {
    border-color: rgba(245, 158, 11, 0.25);
    background: rgba(245, 158, 11, 0.06);
    color: #fef3c7;
}

html[data-theme="light"] .admin-indexing-notice {
    border-color: #fcd34d !important;
    background: #fffbeb !important;
    color: #78350f !important;
}

.admin-dashboard-metric-row {
    border: 1px solid rgba(148, 163, 184, 0.13);
    border-radius: 0.85rem;
    background: rgba(2, 6, 23, 0.38);
    padding: 0.8rem 0.9rem;
}

.admin-dashboard-metric-row.is-positive {
    border-color: rgba(16, 185, 129, 0.25);
    background: rgba(16, 185, 129, 0.08);
}

.admin-dashboard-chart-panel {
    padding: 0.95rem 1rem;
    border-radius: 1.05rem;
    background:
        radial-gradient(75% 100% at 100% 0%, rgba(99, 102, 241, 0.08), transparent 72%),
        linear-gradient(145deg, rgba(15, 23, 42, 0.94), rgba(15, 23, 42, 0.72));
}

.admin-chart-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 1rem;
}

.admin-chart-kicker {
    margin-bottom: 0.15rem;
    color: #a5b4fc;
    font-size: 0.57rem;
    font-weight: 800;
    letter-spacing: 0.16em;
    line-height: 1.3;
    text-transform: uppercase;
}

.admin-chart-title {
    color: #f8fafc;
    font-size: 0.88rem;
    font-weight: 800;
    letter-spacing: -0.03em;
    line-height: 1.35;
}

.admin-chart-description {
    margin-top: 0.15rem;
    color: #94a3b8;
    font-size: 0.66rem;
    line-height: 1.4;
}

.admin-chart-range-form {
    flex: none;
}

.admin-chart-control-label {
    display: block;
    margin-bottom: 0.3rem;
    color: #94a3b8;
    font-size: 0.58rem;
    font-weight: 700;
}

.admin-chart-control-row {
    display: flex;
    align-items: center;
    gap: 0.4rem;
}

.admin-chart-select-wrap {
    position: relative;
}

.admin-chart-range-select {
    width: 9.5rem;
    min-height: 2.15rem;
    appearance: none;
    border: 1px solid rgba(148, 163, 184, 0.2);
    border-radius: 0.7rem;
    background: rgba(2, 6, 23, 0.62);
    padding: 0.45rem 2rem 0.45rem 0.7rem;
    color: #e2e8f0;
    font-family: inherit;
    font-size: 0.67rem;
    font-weight: 700;
    outline: none;
    transition: border-color 150ms ease, box-shadow 150ms ease, background-color 150ms ease;
}

.admin-chart-range-select:hover {
    border-color: rgba(129, 140, 248, 0.5);
}

.admin-chart-range-select:focus-visible {
    border-color: #818cf8;
    box-shadow: 0 0 0 3px rgba(99, 102, 241, 0.18);
}

.admin-chart-range-select option {
    background: #0f172a;
    color: #f8fafc;
}

.admin-chart-select-icon {
    position: absolute;
    top: 50%;
    right: 0.55rem;
    color: #94a3b8;
    pointer-events: none;
    transform: translateY(-50%);
}

.admin-chart-range-submit {
    display: inline-flex;
    width: 2.15rem;
    height: 2.15rem;
    align-items: center;
    justify-content: center;
    border: 1px solid rgba(129, 140, 248, 0.32);
    border-radius: 0.7rem;
    background: rgba(99, 102, 241, 0.16);
    color: #c7d2fe;
    transition: background-color 150ms ease, border-color 150ms ease, transform 150ms ease;
}

.admin-chart-range-submit:hover {
    border-color: rgba(129, 140, 248, 0.65);
    background: rgba(99, 102, 241, 0.28);
    transform: translateX(1px);
}

.admin-chart-range-submit:focus-visible {
    outline: 2px solid #818cf8;
    outline-offset: 2px;
}

.admin-chart-meta {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 0.75rem;
    border-top: 1px solid rgba(148, 163, 184, 0.12);
    padding-top: 0.55rem;
}

.admin-chart-period,
.admin-chart-meta-stats {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: 0.35rem;
    color: #94a3b8;
    font-size: 0.61rem;
}

.admin-chart-period-badge {
    flex: none;
    border: 1px solid rgba(129, 140, 248, 0.24);
    border-radius: 999px;
    background: rgba(99, 102, 241, 0.13);
    padding: 0.33rem 0.58rem;
    color: #c7d2fe;
    font-size: 0.59rem;
    font-weight: 750;
    white-space: nowrap;
}

.admin-chart-meta-stats {
    gap: 0.8rem;
}

.admin-chart-meta-stats strong {
    color: #e2e8f0;
    font-family: "IBM Plex Mono", ui-monospace, monospace;
    font-size: 0.68rem;
}

.admin-chart-scroll {
    width: 100%;
    min-width: 0;
    overflow-x: auto;
}

.admin-chart-viewport {
    position: relative;
    min-width: 640px;
}

.admin-chart-svg {
    display: block;
    width: 100%;
    height: auto;
    overflow: visible;
}

.admin-chart-hit-area {
    cursor: crosshair;
}

.admin-chart-tooltip {
    position: absolute;
    z-index: 20;
    display: grid;
    min-width: 10.5rem;
    max-width: min(16rem, calc(100% - 1rem));
    gap: 0.42rem;
    border: 1px solid rgba(148, 163, 184, 0.25);
    border-radius: 0.8rem;
    background: rgba(9, 15, 29, 0.96);
    padding: 0.6rem 0.7rem;
    box-shadow: 0 12px 32px rgba(2, 6, 23, 0.38);
    color: #e2e8f0;
    pointer-events: none;
    backdrop-filter: blur(12px);
}

.admin-chart-tooltip[hidden] {
    display: none;
}

.admin-chart-tooltip-title {
    padding-bottom: 0.3rem;
    border-bottom: 1px solid rgba(148, 163, 184, 0.16);
    color: #f8fafc;
    font-size: 0.65rem;
    font-weight: 800;
}

.admin-chart-tooltip-row {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 0.8rem;
    color: #cbd5e1;
    font-size: 0.61rem;
}

.admin-chart-tooltip-label {
    display: inline-flex;
    min-width: 0;
    align-items: center;
    gap: 0.4rem;
}

.admin-chart-tooltip-label i,
.admin-chart-legend i {
    display: inline-block;
    width: 0.45rem;
    height: 0.45rem;
    flex: none;
    border-radius: 999px;
    background: var(--chart-color);
}

.admin-chart-tooltip-value {
    color: #f8fafc;
    font-family: "IBM Plex Mono", ui-monospace, monospace;
    font-weight: 700;
    white-space: nowrap;
}

.admin-chart-stat-strip {
    display: grid;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 0.5rem;
}

.admin-chart-stat {
    min-width: 0;
    border: 1px solid rgba(148, 163, 184, 0.13);
    border-radius: 0.72rem;
    background: rgba(2, 6, 23, 0.32);
    padding: 0.48rem 0.65rem;
}

.admin-chart-stat-label {
    overflow: hidden;
    color: #94a3b8;
    font-size: 0.57rem;
    font-weight: 650;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.admin-chart-stat-value {
    margin-top: 0.12rem;
    color: #e2e8f0;
    font-family: "IBM Plex Mono", ui-monospace, monospace;
    font-size: 0.82rem;
    font-weight: 800;
    letter-spacing: -0.03em;
}

.admin-chart-stat-value small {
    margin-left: 0.28rem;
    color: #94a3b8;
    font-family: inherit;
    font-size: 0.56rem;
    font-weight: 650;
}

.admin-chart-stat-value.is-provider {
    color: #f9a8d4;
}

.admin-chart-stat-value.is-positive {
    color: #6ee7b7;
}

.admin-chart-stat-value.is-negative {
    color: #fda4af;
}

.admin-chart-footer {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    justify-content: space-between;
    gap: 0.45rem 1rem;
    border-top: 1px solid rgba(148, 163, 184, 0.12);
    padding-top: 0.55rem;
}

.admin-chart-legend {
    display: flex;
    flex-wrap: wrap;
    gap: 0.35rem 0.9rem;
}

.admin-chart-legend span {
    display: inline-flex;
    align-items: center;
    gap: 0.35rem;
    color: #aab6c6;
    font-size: 0.59rem;
    font-weight: 650;
}

.admin-chart-footnote {
    margin: 0;
    color: #8491a5;
    font-size: 0.57rem;
    line-height: 1.45;
}

.admin-chart-grid-line {
    stroke: rgba(148, 163, 184, 0.14);
}

.admin-chart-axis-line {
    stroke: rgba(148, 163, 184, 0.26);
}

.admin-chart-axis-label {
    fill: #94a3b8;
}

.admin-chart-crosshair {
    stroke: #cbd5e1;
}

@media (max-width: 640px) {
    .admin-chart-header,
    .admin-chart-meta {
        align-items: flex-start;
        flex-direction: column;
    }

    .admin-chart-range-form {
        align-self: stretch;
    }

    .admin-chart-control-row {
        max-width: 100%;
    }

    .admin-chart-select-wrap,
    .admin-chart-range-select {
        width: 100%;
    }

    .admin-chart-stat-strip {
        gap: 0.35rem;
    }

    .admin-chart-stat {
        padding: 0.42rem;
    }
}

.admin-dashboard-table-head {
    background: rgba(15, 23, 42, 0.78);
    color: #94a3b8;
}

html[data-theme="light"] .admin-page-eyebrow,
html[data-theme="light"] .portal-page-eyebrow {
    color: #4f46e5;
}

html[data-theme="light"] .admin-action-button.is-secondary {
    border-color: #d7e0eb;
    background: #ffffff;
    color: #334155;
}

html[data-theme="light"] .admin-action-button.is-secondary:hover {
    border-color: #a5b4fc;
    background: #eef2ff;
    color: #312e81;
}

html[data-theme="light"] .admin-settings-tablist {
    border-color: #e2e8f0;
}

html[data-theme="light"] .admin-settings-tab {
    color: #475569;
}

html[data-theme="light"] .admin-settings-tab:hover {
    background: #f1f5f9;
    color: #0f172a;
}

html[data-theme="light"] .admin-settings-tab.is-active {
    border-color: #c7d2fe;
    background: #eef2ff;
    color: #3730a3;
}

html[data-theme="light"] .admin-settings-asset-card {
    border-color: #e2e8f0;
    background: #f8fafc;
}

html[data-theme="light"] .admin-settings-asset-preview {
    border-color: #cbd5e1;
    background: #ffffff;
}

html[data-theme="light"] .admin-settings-color-picker {
    border-color: #cbd5e1;
    background: #ffffff;
}

html[data-theme="light"] .admin-settings-file-input {
    border-color: #cbd5e1;
    background: #ffffff;
    color: #334155;
}

html[data-theme="light"] .admin-settings-file-input::file-selector-button {
    border-color: #c7d2fe;
    background: #eef2ff;
    color: #3730a3;
}

html[data-theme="light"] .admin-firewall-action {
    border-color: #fecdd3;
    background: #fff1f2;
    color: #be123c;
}

html[data-theme="light"] .admin-firewall-action:hover {
    border-color: #fda4af;
    background: #ffe4e6;
}

html[data-theme="light"] .admin-http-status.is-success {
    border-color: #a7f3d0;
    background: #ecfdf5;
    color: #047857;
}

html[data-theme="light"] .admin-http-status.is-error {
    border-color: #fecdd3;
    background: #fff1f2;
    color: #be123c;
}

html[data-theme="light"] .admin-payment-action.is-approve {
    border-color: #a7f3d0;
    background: #ecfdf5;
    color: #047857;
}

html[data-theme="light"] .admin-payment-action.is-reject {
    border-color: #fecdd3;
    background: #fff1f2;
    color: #be123c;
}

html[data-theme="light"] .admin-payment-action.is-approve:hover {
    background: #d1fae5;
}

html[data-theme="light"] .admin-payment-action.is-reject:hover {
    background: #ffe4e6;
}

html[data-theme="light"] .admin-payment-status.is-pending {
    border-color: #fcd34d;
    background: #fffbeb;
    color: #92400e;
}

html[data-theme="light"] .admin-payment-status.is-approved {
    border-color: #a7f3d0;
    background: #ecfdf5;
    color: #047857;
}

html[data-theme="light"] .admin-payment-status.is-rejected {
    border-color: #fecdd3;
    background: #fff1f2;
    color: #be123c;
}

html[data-theme="light"] .admin-proxy-status.is-working {
    border-color: #a7f3d0;
    background: #ecfdf5;
    color: #047857;
}

html[data-theme="light"] .admin-proxy-status.is-not-working {
    border-color: #fecdd3;
    background: #fff1f2;
    color: #be123c;
}

html[data-theme="light"] .admin-proxy-status.is-untested {
    border-color: #fcd34d;
    background: #fffbeb;
    color: #92400e;
}

html[data-theme="light"] .admin-proxy-status.is-selected {
    border-color: #c7d2fe;
    background: #eef2ff;
    color: #3730a3;
}

html[data-theme="light"] .admin-payment-row.is-pending {
    background: rgba(245, 158, 11, 0.055);
}

html[data-theme="light"] .admin-payment-row.is-pending:hover {
    background: #fffbeb;
}

html[data-theme="light"] .admin-metric-card,
html[data-theme="light"] .admin-dashboard-panel {
    border-color: #d7e0eb;
    background: linear-gradient(145deg, #ffffff, #f8fafc);
    box-shadow: 0 10px 24px rgba(15, 23, 42, 0.05);
}

html[data-theme="light"] .admin-metric-card:hover {
    box-shadow: 0 14px 28px rgba(15, 23, 42, 0.09);
}

html[data-theme="light"] .admin-metric-label,
html[data-theme="light"] .admin-metric-note,
html[data-theme="light"] .admin-dashboard-panel-description {
    color: #475569;
}

html[data-theme="light"] .admin-metric-value,
html[data-theme="light"] .admin-dashboard-panel-title {
    color: #0f172a;
}

html[data-theme="light"] .admin-metric-icon.tone-emerald {
    background: #ecfdf5;
    color: #047857;
}

html[data-theme="light"] .admin-metric-icon.tone-purple {
    background: #faf5ff;
    color: #7e22ce;
}

html[data-theme="light"] .admin-metric-icon.tone-blue {
    background: #eff6ff;
    color: #1d4ed8;
}

html[data-theme="light"] .admin-metric-icon.tone-amber {
    background: #fffbeb;
    color: #b45309;
}

html[data-theme="light"] .admin-metric-icon.tone-pink {
    background: #fdf2f8;
    color: #be185d;
}

html[data-theme="light"] .admin-dashboard-metric-row {
    border-color: #e2e8f0;
    background: #f8fafc;
}

html[data-theme="light"] .admin-dashboard-metric-row.is-positive {
    border-color: #a7f3d0;
    background: #ecfdf5;
}

html[data-theme="light"] .admin-dashboard-chart-panel {
    border-color: #d6deea;
    background:
        radial-gradient(75% 100% at 100% 0%, rgba(99, 102, 241, 0.07), transparent 72%),
        linear-gradient(145deg, #ffffff, #f8fafc);
    box-shadow: 0 12px 28px rgba(15, 23, 42, 0.06);
}

html[data-theme="light"] .admin-chart-kicker {
    color: #4f46e5;
}

html[data-theme="light"] .admin-chart-title,
html[data-theme="light"] .admin-chart-meta-stats strong,
html[data-theme="light"] .admin-chart-tooltip-title {
    color: #0f172a;
}

html[data-theme="light"] .admin-chart-description,
html[data-theme="light"] .admin-chart-control-label,
html[data-theme="light"] .admin-chart-period,
html[data-theme="light"] .admin-chart-meta-stats,
html[data-theme="light"] .admin-chart-stat-label,
html[data-theme="light"] .admin-chart-legend span,
html[data-theme="light"] .admin-chart-footnote {
    color: #64748b;
}

html[data-theme="light"] .admin-chart-range-select {
    border-color: #cbd5e1;
    background: #ffffff;
    color: #0f172a;
}

html[data-theme="light"] .admin-chart-range-select option {
    background: #ffffff;
    color: #0f172a;
}

html[data-theme="light"] .admin-chart-range-submit {
    border-color: #c7d2fe;
    background: #eef2ff;
    color: #4338ca;
}

html[data-theme="light"] .admin-chart-stat {
    border-color: #e2e8f0;
    background: rgba(248, 250, 252, 0.9);
}

html[data-theme="light"] .admin-chart-stat-value,
html[data-theme="light"] .admin-chart-tooltip-value {
    color: #0f172a;
}

html[data-theme="light"] .admin-chart-stat-value.is-provider {
    color: #be185d;
}

html[data-theme="light"] .admin-chart-stat-value.is-positive {
    color: #047857;
}

html[data-theme="light"] .admin-chart-stat-value.is-negative {
    color: #be123c;
}

html[data-theme="light"] .admin-chart-stat-value small {
    color: #64748b;
}

html[data-theme="light"] .admin-chart-period-badge {
    border-color: #c7d2fe;
    background: #eef2ff;
    color: #4338ca;
}

html[data-theme="light"] .admin-chart-tooltip {
    border-color: #cbd5e1;
    background: rgba(255, 255, 255, 0.97);
    box-shadow: 0 12px 32px rgba(15, 23, 42, 0.16);
    color: #334155;
}

html[data-theme="light"] .admin-chart-tooltip-row {
    color: #475569;
}

html[data-theme="light"] .admin-chart-tooltip-title {
    border-color: #e2e8f0;
}

html[data-theme="light"] .admin-chart-grid-line {
    stroke: rgba(100, 116, 139, 0.18);
}

html[data-theme="light"] .admin-chart-axis-line {
    stroke: rgba(100, 116, 139, 0.34);
}

html[data-theme="light"] .admin-chart-axis-label {
    fill: #64748b;
}

html[data-theme="light"] .admin-chart-crosshair {
    stroke: #475569;
}

html[data-theme="light"] .admin-dashboard-table-head {
    background: #e2e8f0;
    color: #334155;
}

.admin-scroll-region {
    scrollbar-gutter: stable;
    scrollbar-width: thin;
    scrollbar-color: #64748b #e2e8f0;
}

.admin-table-row {
    transition: background-color 140ms ease;
}

.admin-table-row:hover {
    background-color: rgba(99, 102, 241, 0.12);
}

html[data-theme="light"] .admin-table-head {
    background-color: #e2e8f0 !important;
    color: #334155 !important;
}

html[data-theme="light"] .admin-table-row:hover {
    background-color: #eef2ff !important;
}

.portal-scroll-region {
    scrollbar-gutter: stable;
    scrollbar-width: thin;
    scrollbar-color: #64748b #e2e8f0;
}

html[data-theme="dark"] .portal-scroll-region {
    scrollbar-color: #475569 #0f172a;
}

.portal-table-row {
    transition: background-color 140ms ease;
}

.portal-table-row:hover {
    background-color: rgba(99, 102, 241, 0.12);
}

html[data-theme="light"] .portal-table-head {
    background-color: #e2e8f0 !important;
    color: #334155 !important;
}

html[data-theme="light"] .portal-table-row:hover {
    background-color: #eef2ff !important;
}

.endpoint-layout {
    display: flex;
    flex-direction: column;
    gap: 1.25rem;
}

.admin-endpoint-input {
    width: 5rem;
    min-height: 2.35rem;
    border: 1px solid rgba(148, 163, 184, 0.2);
    border-radius: 0.7rem;
    background: rgba(2, 6, 23, 0.48);
    padding: 0.5rem 0.6rem;
    color: #f1f5f9;
    color-scheme: dark;
    font-family: "JetBrains Mono", monospace;
    font-size: 0.7rem;
    line-height: 1.25;
    transition: border-color 150ms ease, box-shadow 150ms ease, background-color 150ms ease;
}

.admin-endpoint-input.is-wide {
    width: 6rem;
}

.admin-endpoint-input.is-cost {
    color: #fcd34d;
}

.admin-endpoint-input.is-negative {
    color: #f9a8d4;
}

.admin-endpoint-input:focus-visible {
    border-color: #818cf8;
    outline: none;
    box-shadow: 0 0 0 3px rgba(99, 102, 241, 0.16);
}

.endpoint-row {
    transition: background-color 140ms ease;
}

.endpoint-row:hover {
    background-color: rgba(99, 102, 241, 0.12);
}

html[data-theme="light"] .endpoint-row:hover {
    background-color: #eef2ff !important;
}

html[data-theme="light"] .endpoint-hero {
    background: linear-gradient(135deg, #eef2ff 0%, #f8fafc 62%, #ffffff 100%) !important;
    border-color: #c7d2fe !important;
}

html[data-theme="light"] .endpoint-table-head {
    background-color: #e2e8f0 !important;
    color: #334155 !important;
}

.endpoint-scroll-region {
    scrollbar-gutter: stable;
    scrollbar-width: thin;
    scrollbar-color: #64748b #e2e8f0;
}

html[data-theme="dark"] .endpoint-scroll-region {
    scrollbar-color: #475569 #0f172a;
}

html[data-theme="light"] input,
html[data-theme="light"] select,
html[data-theme="light"] textarea {
    color-scheme: light;
}

html[data-theme="light"] input:not([type="checkbox"]):not([type="radio"]),
html[data-theme="light"] select,
html[data-theme="light"] textarea {
    background-color: #ffffff !important;
    border-color: #cbd5e1 !important;
    color: #0f172a !important;
}

html[data-theme="light"] input::placeholder,
html[data-theme="light"] textarea::placeholder {
    color: #64748b !important;
}

html[data-theme="light"] .admin-endpoint-input {
    border-color: #cbd5e1 !important;
    background: #ffffff !important;
    color: #0f172a !important;
    color-scheme: light;
}

html[data-theme="light"] .admin-endpoint-input.is-cost {
    color: #92400e !important;
}

html[data-theme="light"] .admin-endpoint-input.is-negative {
    color: #be185d !important;
}

html[data-theme="light"] [class~="theme-toggle"] {
    color: #334155 !important;
}

.admin-sidebar {
    font-family: "Plus Jakarta Sans", "Inter", sans-serif;
}

.admin-nav-heading {
    margin: 0.2rem 0.65rem 0.55rem;
    color: #64748b;
    font-size: 0.58rem;
    font-weight: 800;
    letter-spacing: 0.16em;
    text-transform: uppercase;
}

.admin-nav {
    display: flex;
    flex-direction: column;
    gap: 0.3rem;
}

.admin-nav-link {
    display: flex;
    min-height: 2.35rem;
    align-items: center;
    justify-content: space-between;
    gap: 0.5rem;
    padding: 0.48rem 0.65rem;
    border: 1px solid transparent;
    border-radius: 0.75rem;
    color: #b6c2d2;
    font-size: 0.76rem;
    font-weight: 600;
    letter-spacing: -0.015em;
    line-height: 1.25;
    text-decoration: none;
    transition: background-color 150ms ease, border-color 150ms ease, color 150ms ease, transform 150ms ease;
}

.admin-nav-link:hover {
    border-color: rgba(148, 163, 184, 0.12);
    background-color: rgba(148, 163, 184, 0.08);
    color: #f8fafc;
}

.admin-nav-link.is-active {
    border-color: rgba(129, 140, 248, 0.24);
    background-color: rgba(99, 102, 241, 0.14);
    box-shadow: inset 3px 0 #818cf8;
    color: #eef2ff;
}

.admin-nav-link-main {
    display: flex;
    min-width: 0;
    align-items: center;
    gap: 0.7rem;
}

.admin-nav-icon {
    width: 1rem;
    height: 1rem;
    flex: none;
    color: #8491a5;
}

.admin-nav-link.is-active .admin-nav-icon {
    color: #a5b4fc;
}

.admin-nav-label {
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

html[data-theme="light"] .admin-sidebar {
    border-color: var(--theme-border) !important;
    background-color: #ffffff !important;
}

html[data-theme="light"] .admin-nav-heading {
    color: #64748b;
}

html[data-theme="light"] .admin-nav-link {
    color: #475569;
}

html[data-theme="light"] .admin-nav-link:hover {
    border-color: #e2e8f0;
    background-color: #f1f5f9;
    color: #0f172a;
}

html[data-theme="light"] .admin-nav-link.is-active {
    border-color: #c7d2fe;
    background-color: #eef2ff;
    box-shadow: inset 3px 0 #6366f1;
    color: #3730a3;
}

html[data-theme="light"] .admin-nav-link.is-active .admin-nav-icon {
    color: #4f46e5;
}

.portal-sidebar {
    font-family: "Plus Jakarta Sans", "Inter", sans-serif;
    overflow: hidden;
}

.portal-sidebar > div:first-child {
    min-height: 0;
    flex: 1 1 auto;
    overflow-y: auto;
    overscroll-behavior: contain;
    scrollbar-color: rgba(129, 140, 248, 0.45) transparent;
    scrollbar-width: thin;
}

.portal-sidebar > div:first-child::-webkit-scrollbar {
    width: 5px;
}

.portal-sidebar > div:first-child::-webkit-scrollbar-thumb {
    border-radius: 999px;
    background: rgba(129, 140, 248, 0.45);
}

.portal-sidebar > div:last-child {
    flex: 0 0 auto;
}

.portal-nav-heading {
    margin: 0.2rem 0.55rem 0.55rem;
    color: #64748b;
    font-size: 0.58rem;
    font-weight: 800;
    letter-spacing: 0.16em;
    text-transform: uppercase;
}

.portal-nav {
    display: flex;
    flex-direction: column;
    gap: 0.3rem;
}

.portal-nav-link {
    display: flex;
    min-height: 2.35rem;
    align-items: center;
    padding: 0.48rem 0.65rem;
    border: 1px solid transparent;
    border-radius: 0.75rem;
    color: #b6c2d2;
    font-size: 0.76rem;
    font-weight: 600;
    letter-spacing: -0.015em;
    line-height: 1.25;
    text-decoration: none;
    transition: background-color 150ms ease, border-color 150ms ease, color 150ms ease;
}

.portal-nav-link:hover {
    border-color: rgba(148, 163, 184, 0.12);
    background-color: rgba(148, 163, 184, 0.08);
    color: #f8fafc;
}

.portal-nav-link.is-active {
    border-color: rgba(129, 140, 248, 0.24);
    background-color: rgba(99, 102, 241, 0.14);
    background-color: color-mix(in srgb, var(--accent) 14%, transparent);
    box-shadow: inset 3px 0 var(--accent);
    color: #eef2ff;
}

.portal-filter-heading {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 1rem;
}

.portal-filter-title {
    color: #f8fafc;
    font-size: 0.9rem;
    font-weight: 700;
    letter-spacing: -0.02em;
    line-height: 1.35;
}

.portal-filter-description {
    margin-top: 0.2rem;
    color: #94a3b8;
    font-size: 0.7rem;
    line-height: 1.5;
}

.portal-filter-count {
    display: inline-flex;
    flex: none;
    align-items: center;
    border: 1px solid rgba(129, 140, 248, 0.22);
    border-radius: 999px;
    background: rgba(99, 102, 241, 0.12);
    padding: 0.35rem 0.65rem;
    color: #c7d2fe;
    font-size: 0.65rem;
    font-weight: 700;
}

.portal-json-toggle {
    display: inline-flex;
    min-width: 6.25rem;
    align-items: center;
    justify-content: center;
    gap: 0.4rem;
    border: 1px solid rgba(129, 140, 248, 0.28);
    border-radius: 0.6rem;
    background: rgba(99, 102, 241, 0.13);
    padding: 0.42rem 0.55rem;
    color: #c7d2fe;
    font-family: "Plus Jakarta Sans", "Inter", sans-serif;
    font-size: 0.67rem;
    font-weight: 700;
    line-height: 1;
    white-space: nowrap;
    transition: background-color 150ms ease, border-color 150ms ease, color 150ms ease, transform 150ms ease;
}

.portal-json-toggle:hover,
.portal-json-toggle[aria-expanded="true"] {
    border-color: rgba(129, 140, 248, 0.5);
    background: rgba(99, 102, 241, 0.24);
    color: #eef2ff;
}

.portal-json-toggle:focus-visible {
    outline: 2px solid #818cf8;
    outline-offset: 2px;
}

.portal-nav-link-main {
    display: flex;
    min-width: 0;
    align-items: center;
    gap: 0.7rem;
}

.portal-nav-icon {
    width: 1rem;
    height: 1rem;
    flex: none;
    color: #8491a5;
}

.portal-nav-link.is-active .portal-nav-icon {
    color: var(--accent);
}

.portal-nav-label {
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.portal-nav-link:focus-visible {
    outline: 2px solid var(--accent);
    outline-offset: 2px;
}

html[data-theme="light"] .portal-sidebar {
    border-color: var(--theme-border) !important;
    background-color: #ffffff !important;
}

html[data-theme="light"] .portal-nav-link {
    color: #475569;
}

html[data-theme="light"] .portal-nav-link:hover {
    border-color: #e2e8f0;
    background-color: #f1f5f9;
    color: #0f172a;
}

html[data-theme="light"] .portal-nav-link.is-active {
    border-color: color-mix(in srgb, var(--accent) 28%, #ffffff);
    background-color: color-mix(in srgb, var(--accent) 10%, #ffffff);
    color: #1e293b;
}

html[data-theme="light"] .portal-nav-link.is-active .portal-nav-icon {
    color: var(--accent);
}

html[data-theme="light"] .portal-filter-title {
    color: #0f172a;
}

html[data-theme="light"] .portal-filter-description {
    color: #475569;
}

html[data-theme="light"] .portal-filter-count {
    border-color: #c7d2fe;
    background: #eef2ff;
    color: #4338ca;
}

html[data-theme="light"] .portal-json-toggle {
    border-color: #c7d2fe;
    background: #eef2ff;
    color: #4338ca;
}

html[data-theme="light"] .portal-json-toggle:hover,
html[data-theme="light"] .portal-json-toggle[aria-expanded="true"] {
    border-color: #a5b4fc;
    background: #e0e7ff;
    color: #312e81;
}

html[data-theme="light"] .portal-admin-link {
    border-color: #fde68a;
    background-color: #fffbeb;
    color: #92400e;
}

.portal-panel-card {
    border: 1px solid rgba(148, 163, 184, 0.16);
    border-radius: 1.25rem;
    background: linear-gradient(145deg, rgba(15, 23, 42, 0.92), rgba(15, 23, 42, 0.68));
    padding: 1.25rem;
    box-shadow: 0 12px 28px rgba(2, 6, 23, 0.12);
}

.portal-panel-heading {
    display: flex;
    align-items: flex-start;
    justify-content: space-between;
    gap: 1rem;
    margin-bottom: 1.25rem;
}

.portal-panel-title {
    color: #f8fafc;
    font-size: 0.95rem;
    font-weight: 700;
    letter-spacing: -0.02em;
    line-height: 1.35;
}

.portal-panel-description {
    margin-top: 0.22rem;
    color: #94a3b8;
    font-size: 0.72rem;
    line-height: 1.55;
}

.portal-stat-card {
    min-width: 0;
    border: 1px solid rgba(148, 163, 184, 0.16);
    border-radius: 1rem;
    background: linear-gradient(145deg, rgba(15, 23, 42, 0.94), rgba(15, 23, 42, 0.68));
    padding: 1rem;
    box-shadow: 0 10px 24px rgba(2, 6, 23, 0.1);
    transition: transform 150ms ease, border-color 150ms ease, box-shadow 150ms ease;
}

.portal-stat-card:hover {
    transform: translateY(-1px);
    border-color: rgba(129, 140, 248, 0.3);
    box-shadow: 0 14px 26px rgba(2, 6, 23, 0.16);
}

.portal-content :is(.portal-hero-card, .portal-panel-card, .portal-stat-card, .portal-empty-card, .glass-panel) {
    position: relative;
    isolation: isolate;
    border-color: transparent !important;
}

.portal-content :is(.portal-hero-card, .portal-panel-card, .portal-stat-card, .portal-empty-card, .glass-panel)::after {
    position: absolute;
    z-index: 0;
    inset: 0;
    padding: 1px;
    border-radius: inherit;
    background: conic-gradient(
        from var(--home-border-angle),
        transparent 0deg 205deg,
        #6366f1 232deg,
        #22d3ee 270deg,
        #ec4899 308deg,
        #f59e0b 340deg,
        transparent 360deg
    );
    content: "";
    pointer-events: none;
    -webkit-mask: linear-gradient(#fff 0 0) content-box, linear-gradient(#fff 0 0);
    -webkit-mask-composite: xor;
    mask: linear-gradient(#fff 0 0) content-box, linear-gradient(#fff 0 0);
    mask-composite: exclude;
    opacity: 0.74;
    animation: home-card-border-travel 8s linear infinite;
}

.portal-content :is(.portal-hero-card, .portal-panel-card, .portal-stat-card, .portal-empty-card, .glass-panel) > * {
    position: relative;
    z-index: 1;
}

.portal-content .portal-hero-card::before {
    z-index: 2;
}

.portal-content .portal-hero-card > * {
    z-index: 3;
}

.portal-stat-top {
    display: flex;
    align-items: flex-start;
    justify-content: space-between;
    gap: 0.75rem;
}

.portal-stat-label {
    color: #94a3b8;
    font-size: 0.68rem;
    font-weight: 600;
    line-height: 1.35;
}

.portal-stat-value {
    margin-top: 0.45rem;
    color: #f8fafc;
    font-size: 1.45rem;
    font-weight: 800;
    letter-spacing: -0.04em;
    line-height: 1.15;
}

.portal-stat-value-sm {
    font-size: 1.1rem;
}

.portal-stat-note {
    margin-top: 0.8rem;
    color: #94a3b8;
    font-size: 0.65rem;
    line-height: 1.45;
}

.portal-stat-note strong {
    color: #c7d2fe;
    font-weight: 700;
}

.portal-stat-icon {
    display: inline-flex;
    width: 2.15rem;
    height: 2.15rem;
    flex: none;
    align-items: center;
    justify-content: center;
    border-radius: 0.75rem;
}

.portal-stat-icon.tone-indigo {
    background: rgba(99, 102, 241, 0.16);
    color: #a5b4fc;
}

.portal-stat-icon.tone-purple {
    background: rgba(168, 85, 247, 0.15);
    color: #d8b4fe;
}

.portal-stat-icon.tone-emerald,
.portal-stat-icon.tone-green {
    background: rgba(16, 185, 129, 0.14);
    color: #6ee7b7;
}

.portal-stat-icon.tone-blue {
    background: rgba(59, 130, 246, 0.15);
    color: #93c5fd;
}

.portal-chart-summary {
    border-top: 1px solid rgba(148, 163, 184, 0.15);
    padding-top: 0.85rem;
    color: #94a3b8;
    font-size: 0.7rem;
}

.portal-chart-summary strong {
    color: #c7d2fe;
    font-size: 0.8rem;
}

.portal-key-display {
    min-width: 0;
    border: 1px solid rgba(148, 163, 184, 0.18);
    border-radius: 0.85rem;
    background: rgba(2, 6, 23, 0.42);
    padding: 0.8rem;
}

.portal-copy-button,
.portal-table-action {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 0.4rem;
    border: 1px solid rgba(129, 140, 248, 0.28);
    border-radius: 0.65rem;
    background: rgba(99, 102, 241, 0.13);
    padding: 0.45rem 0.65rem;
    color: #c7d2fe;
    font-family: "Plus Jakarta Sans", "Inter", sans-serif;
    font-size: 0.68rem;
    font-weight: 700;
    white-space: nowrap;
    transition: background-color 150ms ease, border-color 150ms ease, color 150ms ease;
}

.portal-copy-button:hover,
.portal-table-action:hover {
    border-color: rgba(129, 140, 248, 0.5);
    background: rgba(99, 102, 241, 0.24);
    color: #eef2ff;
}

.portal-copy-button:focus-visible,
.portal-table-action:focus-visible {
    outline: 2px solid #818cf8;
    outline-offset: 2px;
}

.portal-code-caption {
    margin-bottom: 0.4rem;
    color: #94a3b8;
    font-size: 0.68rem;
    font-weight: 700;
}

.portal-code-block {
    border: 1px solid rgba(148, 163, 184, 0.16);
    border-radius: 0.85rem;
    background: rgba(2, 6, 23, 0.55);
    padding: 0.85rem;
    color: #c7d2fe;
    line-height: 1.7;
}

.portal-panel-footer {
    border-top: 1px solid rgba(148, 163, 184, 0.16);
}

html[data-theme="light"] .portal-panel-card,
html[data-theme="light"] .portal-stat-card {
    border-color: #d7e0eb;
    background: linear-gradient(145deg, #ffffff, #f8fafc);
    box-shadow: 0 10px 24px rgba(15, 23, 42, 0.05);
}

html[data-theme="light"] .portal-stat-card:hover {
    border-color: #c7d2fe;
    box-shadow: 0 14px 26px rgba(15, 23, 42, 0.08);
}

html[data-theme="light"] .portal-panel-title,
html[data-theme="light"] .portal-stat-value {
    color: #0f172a;
}

html[data-theme="light"] .portal-panel-description,
html[data-theme="light"] .portal-stat-label,
html[data-theme="light"] .portal-stat-note,
html[data-theme="light"] .portal-chart-summary {
    color: #475569;
}

html[data-theme="light"] .portal-stat-note strong,
html[data-theme="light"] .portal-chart-summary strong {
    color: #4338ca;
}

html[data-theme="light"] .portal-key-display,
html[data-theme="light"] .portal-code-block {
    border-color: #d7e0eb;
    background: #f8fafc;
}

html[data-theme="light"] .portal-code-block {
    color: #3730a3;
}

html[data-theme="light"] .portal-copy-button,
html[data-theme="light"] .portal-table-action {
    border-color: #c7d2fe;
    background: #eef2ff;
    color: #4338ca;
}

html[data-theme="light"] .portal-copy-button:hover,
html[data-theme="light"] .portal-table-action:hover {
    border-color: #a5b4fc;
    background: #e0e7ff;
    color: #312e81;
}

.portal-form-label {
    display: block;
    margin-bottom: 0.4rem;
    color: #cbd5e1;
    font-size: 0.7rem;
    font-weight: 650;
    line-height: 1.4;
}

.portal-form-field {
    display: block;
    width: 100%;
    min-height: 2.55rem;
    border: 1px solid rgba(148, 163, 184, 0.2);
    border-radius: 0.75rem;
    background: rgba(2, 6, 23, 0.42);
    padding: 0.62rem 0.75rem;
    color: #f1f5f9;
    font-size: 0.72rem;
    line-height: 1.45;
    transition: border-color 150ms ease, box-shadow 150ms ease, background-color 150ms ease;
    color-scheme: dark;
}

.portal-form-field::placeholder {
    color: #64748b;
}

.portal-form-field:focus {
    border-color: #818cf8;
    outline: none;
    box-shadow: 0 0 0 3px rgba(99, 102, 241, 0.16);
}

.portal-form-field:disabled {
    cursor: not-allowed;
    opacity: 0.58;
}

.portal-payload-field {
    min-height: 8.5rem;
    resize: vertical;
}

.portal-form-hint {
    margin-top: 0.4rem;
    color: #94a3b8;
    font-size: 0.66rem;
    line-height: 1.5;
}

.portal-inline-link {
    color: #a5b4fc;
    font-weight: 700;
    text-decoration: none;
}

.portal-inline-link:hover {
    color: #c7d2fe;
    text-decoration: underline;
}

.portal-required-badge {
    margin-left: 0.25rem;
    color: #fbbf24;
    font-family: "IBM Plex Mono", monospace;
    font-size: 0.66rem;
    font-weight: 500;
}

.portal-primary-button,
.portal-execute-button {
    display: inline-flex;
    min-height: 2.6rem;
    align-items: center;
    justify-content: center;
    gap: 0.5rem;
    border: 1px solid rgba(129, 140, 248, 0.4);
    border-radius: 0.8rem;
    background: linear-gradient(135deg, #4f46e5, #6366f1);
    padding: 0.65rem 1rem;
    color: #ffffff;
    font-family: "Plus Jakarta Sans", "Inter", sans-serif;
    font-size: 0.72rem;
    font-weight: 750;
    box-shadow: 0 8px 18px rgba(79, 70, 229, 0.2);
    transition: transform 150ms ease, filter 150ms ease, box-shadow 150ms ease;
}

.portal-primary-button:hover,
.portal-execute-button:hover:not(:disabled) {
    transform: translateY(-1px);
    filter: brightness(1.08);
    box-shadow: 0 11px 22px rgba(79, 70, 229, 0.28);
}

.portal-primary-button:focus-visible,
.portal-execute-button:focus-visible,
.portal-key-action:focus-visible {
    outline: 2px solid #a5b4fc;
    outline-offset: 2px;
}

.portal-secondary-button {
    display: inline-flex;
    min-height: 2.55rem;
    align-items: center;
    justify-content: center;
    border: 1px solid rgba(148, 163, 184, 0.2);
    border-radius: 0.75rem;
    background: rgba(30, 41, 59, 0.72);
    padding: 0.62rem 0.85rem;
    color: #e2e8f0;
    font-family: "Plus Jakarta Sans", "Inter", sans-serif;
    font-size: 0.7rem;
    font-weight: 700;
    transition: border-color 150ms ease, background-color 150ms ease, color 150ms ease;
}

.portal-secondary-button:hover {
    border-color: rgba(129, 140, 248, 0.4);
    background: rgba(79, 70, 229, 0.2);
    color: #eef2ff;
}

.portal-key-status {
    display: inline-flex;
    align-items: center;
    border: 1px solid rgba(16, 185, 129, 0.25);
    border-radius: 999px;
    background: rgba(16, 185, 129, 0.12);
    padding: 0.18rem 0.5rem;
    color: #6ee7b7;
    font-size: 0.58rem;
    font-weight: 800;
    letter-spacing: 0.06em;
    text-transform: uppercase;
}

.portal-key-meta {
    color: #94a3b8;
    font-size: 0.65rem;
    line-height: 1.5;
}

.portal-key-meta strong {
    color: #e2e8f0;
    font-weight: 650;
}

.portal-key-value {
    min-width: 0;
    flex: 1;
    overflow: hidden;
    color: #6ee7b7;
    font-size: 0.65rem;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.portal-key-action {
    display: inline-flex;
    min-height: 2.35rem;
    align-items: center;
    justify-content: center;
    gap: 0.4rem;
    border: 1px solid transparent;
    border-radius: 0.7rem;
    padding: 0.5rem 0.65rem;
    font-family: "Plus Jakarta Sans", "Inter", sans-serif;
    font-size: 0.66rem;
    font-weight: 700;
    white-space: nowrap;
    transition: background-color 150ms ease, border-color 150ms ease, color 150ms ease;
}

.portal-key-action.is-warning {
    border-color: rgba(245, 158, 11, 0.24);
    background: rgba(245, 158, 11, 0.1);
    color: #fcd34d;
}

.portal-key-action.is-warning:hover {
    border-color: rgba(245, 158, 11, 0.42);
    background: rgba(245, 158, 11, 0.18);
}

.portal-key-action.is-danger {
    border-color: rgba(244, 63, 94, 0.22);
    background: rgba(244, 63, 94, 0.1);
    color: #fda4af;
}

.portal-key-action.is-danger:hover {
    border-color: rgba(244, 63, 94, 0.4);
    background: rgba(244, 63, 94, 0.18);
}

.portal-empty-card {
    display: flex;
    align-items: center;
    gap: 1rem;
    border: 1px dashed rgba(129, 140, 248, 0.3);
    border-radius: 1rem;
    background: rgba(99, 102, 241, 0.06);
    padding: 1.2rem;
}

.portal-alert-success,
.portal-alert-error {
    border-radius: 0.85rem;
    padding: 0.8rem 1rem;
    font-size: 0.72rem;
    line-height: 1.5;
}

.portal-alert-success {
    border: 1px solid rgba(16, 185, 129, 0.28);
    background: rgba(16, 185, 129, 0.1);
    color: #6ee7b7;
}

.portal-alert-error {
    border: 1px solid rgba(244, 63, 94, 0.28);
    background: rgba(244, 63, 94, 0.1);
    color: #fda4af;
}

.portal-execute-button {
    width: 100%;
    min-height: 2.9rem;
    font-size: 0.75rem;
}

.portal-execute-button:disabled,
.portal-primary-button:disabled {
    cursor: not-allowed;
    opacity: 0.5;
    filter: grayscale(0.2);
    box-shadow: none;
}

.portal-code-tabs {
    border: 1px solid rgba(148, 163, 184, 0.12);
    border-radius: 0.9rem;
    background: rgba(2, 6, 23, 0.22);
    padding: 0.35rem;
}

.lang-tab {
    display: inline-flex;
    min-height: 2rem;
    align-items: center;
    justify-content: center;
    border: 1px solid transparent;
    border-radius: 0.62rem;
    padding: 0.4rem 0.7rem;
    color: #94a3b8;
    font-family: "IBM Plex Mono", monospace;
    font-size: 0.66rem;
    font-weight: 600;
    transition: background-color 150ms ease, border-color 150ms ease, color 150ms ease;
}

.lang-tab:hover {
    color: #e2e8f0;
}

.lang-tab[aria-pressed="true"] {
    border-color: rgba(129, 140, 248, 0.3);
    background: rgba(99, 102, 241, 0.22);
    color: #e0e7ff;
}

.lang-tab:focus-visible {
    outline: 2px solid #818cf8;
    outline-offset: 2px;
}

.portal-status-pill {
    display: inline-flex;
    align-items: center;
    border: 1px solid rgba(148, 163, 184, 0.16);
    border-radius: 999px;
    background: rgba(30, 41, 59, 0.65);
    padding: 0.25rem 0.55rem;
    color: #cbd5e1;
    font-size: 0.65rem;
    font-weight: 700;
}

.portal-response-block {
    min-height: 12rem;
    overflow-wrap: anywhere;
    white-space: pre-wrap;
}

html[data-theme="light"] .portal-form-label,
html[data-theme="light"] .portal-key-meta strong {
    color: #334155;
}

html[data-theme="light"] .portal-form-field {
    border-color: #cbd5e1;
    background: #ffffff;
    color: #0f172a;
    color-scheme: light;
}

html[data-theme="light"] .portal-form-field::placeholder,
html[data-theme="light"] .portal-form-hint,
html[data-theme="light"] .portal-key-meta {
    color: #64748b;
}

html[data-theme="light"] .portal-inline-link {
    color: #4338ca;
}

html[data-theme="light"] .portal-inline-link:hover {
    color: #312e81;
}

html[data-theme="light"] .portal-secondary-button {
    border-color: #d1d9e6;
    background: #f1f5f9;
    color: #334155;
}

html[data-theme="light"] .portal-secondary-button:hover {
    border-color: #a5b4fc;
    background: #eef2ff;
    color: #3730a3;
}

html[data-theme="light"] .portal-key-status {
    border-color: #a7f3d0;
    background: #ecfdf5;
    color: #047857;
}

html[data-theme="light"] .portal-key-value {
    color: #047857;
}

html[data-theme="light"] .portal-key-action.is-warning {
    border-color: #fde68a;
    background: #fffbeb;
    color: #92400e;
}

html[data-theme="light"] .portal-key-action.is-warning:hover {
    background: #fef3c7;
}

html[data-theme="light"] .portal-key-action.is-danger {
    border-color: #fecdd3;
    background: #fff1f2;
    color: #be123c;
}

html[data-theme="light"] .portal-key-action.is-danger:hover {
    background: #ffe4e6;
}

html[data-theme="light"] .portal-empty-card {
    border-color: #c7d2fe;
    background: #f8faff;
}

html[data-theme="light"] .portal-alert-success {
    border-color: #a7f3d0;
    background: #ecfdf5;
    color: #047857;
}

html[data-theme="light"] .portal-alert-error {
    border-color: #fecdd3;
    background: #fff1f2;
    color: #be123c;
}

html[data-theme="light"] .portal-code-tabs {
    border-color: #e2e8f0;
    background: #f1f5f9;
}

html[data-theme="light"] .lang-tab {
    color: #475569;
}

html[data-theme="light"] .lang-tab:hover {
    color: #1e293b;
}

html[data-theme="light"] .lang-tab[aria-pressed="true"] {
    border-color: #c7d2fe;
    background: #e0e7ff;
    color: #312e81;
}

html[data-theme="light"] .portal-status-pill {
    border-color: #dbe3ee;
    background: #f1f5f9;
    color: #475569;
}

.portal-checkbox-card {
    display: flex;
    min-height: 4.8rem;
    align-items: center;
    border: 1px solid rgba(148, 163, 184, 0.16);
    border-radius: 0.9rem;
    background: rgba(15, 23, 42, 0.48);
    padding: 0.85rem 1rem;
}

.portal-checkbox {
    width: 1rem;
    height: 1rem;
    flex: none;
    margin-top: 0.15rem;
    accent-color: #6366f1;
}

.portal-checkbox-title,
.portal-checkbox-description {
    display: block;
}

.portal-checkbox-title {
    color: #e2e8f0;
    font-size: 0.72rem;
    font-weight: 700;
}

.portal-checkbox-description {
    margin-top: 0.2rem;
    color: #94a3b8;
    font-size: 0.65rem;
    line-height: 1.45;
}

.portal-table-head {
    background: rgba(30, 41, 59, 0.78);
    color: #94a3b8;
    letter-spacing: 0.04em;
}

.portal-table-row {
    background: transparent;
    transition: background-color 140ms ease;
}

.portal-table-row:hover {
    background: rgba(99, 102, 241, 0.07);
}

.portal-ticket-number {
    color: #a5b4fc;
    font-family: "IBM Plex Mono", monospace;
    font-size: 0.68rem;
    font-weight: 700;
}

.portal-ticket-meta {
    display: inline-flex;
    align-items: center;
    border: 1px solid rgba(148, 163, 184, 0.15);
    border-radius: 999px;
    background: rgba(30, 41, 59, 0.55);
    padding: 0.18rem 0.5rem;
    color: #94a3b8;
    font-size: 0.6rem;
    line-height: 1.3;
}

.portal-ticket-status {
    display: inline-flex;
    flex: none;
    align-items: center;
    border: 1px solid transparent;
    border-radius: 999px;
    padding: 0.28rem 0.55rem;
    font-size: 0.58rem;
    font-weight: 800;
    letter-spacing: 0.04em;
}

.portal-ticket-status.is-answered {
    border-color: rgba(16, 185, 129, 0.25);
    background: rgba(16, 185, 129, 0.12);
    color: #6ee7b7;
}

.portal-ticket-status.is-open {
    border-color: rgba(245, 158, 11, 0.25);
    background: rgba(245, 158, 11, 0.12);
    color: #fcd34d;
}

.portal-reply-bubble {
    border: 1px solid rgba(148, 163, 184, 0.15);
    border-radius: 0.85rem;
    padding: 0.8rem;
    font-size: 0.7rem;
    line-height: 1.6;
}

.portal-reply-bubble.is-staff {
    border-color: rgba(99, 102, 241, 0.28);
    background: rgba(79, 70, 229, 0.12);
    color: #e0e7ff;
}

.portal-reply-bubble.is-user {
    border-color: rgba(148, 163, 184, 0.14);
    background: rgba(15, 23, 42, 0.62);
    color: #e2e8f0;
}

.portal-security-note {
    display: flex;
    align-items: flex-start;
    gap: 0.55rem;
    border: 1px solid rgba(99, 102, 241, 0.18);
    border-radius: 0.8rem;
    background: rgba(99, 102, 241, 0.08);
    padding: 0.75rem;
    color: #c7d2fe;
    font-size: 0.65rem;
    line-height: 1.5;
}

.portal-security-note svg {
    flex: none;
    color: #a5b4fc;
}

html[data-theme="light"] .portal-checkbox-card {
    border-color: #d7e0eb;
    background: #f8fafc;
}

html[data-theme="light"] .portal-checkbox-title {
    color: #1e293b;
}

html[data-theme="light"] .portal-checkbox-description {
    color: #64748b;
}

html[data-theme="light"] .portal-table-head {
    background: #eef2f7;
    color: #64748b;
}

html[data-theme="light"] .portal-table-row:hover {
    background: #f5f7ff;
}

html[data-theme="light"] .portal-ticket-number {
    color: #4338ca;
}

html[data-theme="light"] .portal-ticket-meta {
    border-color: #dbe3ee;
    background: #f8fafc;
    color: #475569;
}

html[data-theme="light"] .portal-ticket-status.is-answered {
    border-color: #a7f3d0;
    background: #ecfdf5;
    color: #047857;
}

html[data-theme="light"] .portal-ticket-status.is-open {
    border-color: #fde68a;
    background: #fffbeb;
    color: #92400e;
}

html[data-theme="light"] .portal-reply-bubble.is-staff {
    border-color: #c7d2fe;
    background: #eef2ff;
    color: #312e81;
}

html[data-theme="light"] .portal-reply-bubble.is-user {
    border-color: #dbe3ee;
    background: #f8fafc;
    color: #334155;
}

html[data-theme="light"] .portal-security-note {
    border-color: #c7d2fe;
    background: #f5f7ff;
    color: #4338ca;
}

html[data-theme="light"] .portal-security-note svg {
    color: #4f46e5;
}

.portal-password-input-wrap {
    position: relative;
}

.portal-password-input-wrap .portal-form-field {
    padding-right: 2.9rem;
}

.portal-password-toggle {
    position: absolute;
    top: 50%;
    right: 0.45rem;
    display: inline-flex;
    width: 2.1rem;
    height: 2.1rem;
    align-items: center;
    justify-content: center;
    transform: translateY(-50%);
    border: 1px solid transparent;
    border-radius: 0.65rem;
    background: transparent;
    color: #94a3b8;
    transition: background-color 150ms ease, border-color 150ms ease, color 150ms ease;
}

.portal-password-toggle:hover {
    border-color: rgba(129, 140, 248, 0.25);
    background: rgba(99, 102, 241, 0.12);
    color: #c7d2fe;
}

.portal-password-toggle:focus-visible {
    outline: 2px solid #818cf8;
    outline-offset: 2px;
}

.portal-payment-instructions {
    border: 1px solid rgba(129, 140, 248, 0.25);
    border-radius: 0.95rem;
    background: linear-gradient(145deg, rgba(79, 70, 229, 0.12), rgba(2, 6, 23, 0.32));
    padding: 1rem;
}

.portal-payment-label {
    margin-bottom: 0.45rem;
    color: #a5b4fc;
    font-size: 0.68rem;
    font-weight: 750;
}

.portal-payment-destination {
    color: #e2e8f0;
    font-size: 0.72rem;
    line-height: 1.6;
}

.portal-billing-status {
    display: inline-flex;
    align-items: center;
    border: 1px solid transparent;
    border-radius: 999px;
    padding: 0.26rem 0.55rem;
    font-size: 0.62rem;
    font-weight: 750;
    white-space: nowrap;
}

.portal-billing-status.is-completed {
    border-color: rgba(16, 185, 129, 0.24);
    background: rgba(16, 185, 129, 0.12);
    color: #6ee7b7;
}

.portal-billing-status.is-pending {
    border-color: rgba(245, 158, 11, 0.24);
    background: rgba(245, 158, 11, 0.12);
    color: #fcd34d;
}

.portal-billing-status.is-rejected {
    border-color: rgba(244, 63, 94, 0.24);
    background: rgba(244, 63, 94, 0.12);
    color: #fda4af;
}

html[data-theme="light"] .portal-password-toggle {
    color: #64748b;
}

html[data-theme="light"] .portal-password-toggle:hover {
    border-color: #c7d2fe;
    background: #eef2ff;
    color: #4338ca;
}

html[data-theme="light"] .portal-payment-instructions {
    border-color: #c7d2fe;
    background: linear-gradient(145deg, #f5f7ff, #ffffff);
}

html[data-theme="light"] .portal-payment-label {
    color: #4338ca;
}

html[data-theme="light"] .portal-payment-destination {
    color: #334155;
}

html[data-theme="light"] .portal-billing-status.is-completed {
    border-color: #a7f3d0;
    background: #ecfdf5;
    color: #047857;
}

html[data-theme="light"] .portal-billing-status.is-pending {
    border-color: #fde68a;
    background: #fffbeb;
    color: #92400e;
}

html[data-theme="light"] .portal-billing-status.is-rejected {
    border-color: #fecdd3;
    background: #fff1f2;
    color: #be123c;
}

.meta-api-notice {
    border: 1px solid #bae6fd;
    background: #f0f9ff;
    color: #0c4a6e;
}

html[data-theme="dark"] .meta-api-notice {
    border-color: rgba(56, 189, 248, 0.28);
    background: rgba(14, 165, 233, 0.1);
    color: #e0f2fe;
}

/* Keep the homepage's animated gradient border consistent throughout admin. */
.admin-sidebar,
.admin-nav-link,
.admin-dashboard-panel,
.admin-metric-card,
.admin-dashboard-metric-row,
.admin-settings-asset-card,
.admin-hero-card,
aside.admin-sidebar a[href^="/dashboard/"] {
    position: relative;
    isolation: isolate;
    border-color: transparent !important;
}

aside.admin-sidebar a[href^="/dashboard/"] {
    border: 1px solid transparent;
}

.admin-sidebar::before,
.admin-nav-link::before,
.admin-dashboard-panel::before,
.admin-metric-card::before,
.admin-dashboard-metric-row::before,
.admin-settings-asset-card::before,
aside.admin-sidebar a[href^="/dashboard/"]::before,
.admin-hero-card::after {
    content: "";
    position: absolute;
    inset: 0;
    z-index: 0;
    padding: 1px;
    border-radius: inherit;
    background: conic-gradient(
        from var(--home-border-angle),
        transparent 0deg 205deg,
        #6366f1 232deg,
        #22d3ee 270deg,
        #ec4899 308deg,
        #f59e0b 340deg,
        transparent 360deg
    );
    -webkit-mask: linear-gradient(#fff 0 0) content-box, linear-gradient(#fff 0 0);
    -webkit-mask-composite: xor;
    mask: linear-gradient(#fff 0 0) content-box, linear-gradient(#fff 0 0);
    mask-composite: exclude;
    opacity: 0.46;
    pointer-events: none;
    animation: home-card-border-travel 8s linear infinite;
    transition: opacity 180ms ease;
}

.admin-sidebar::before {
    opacity: 0.3;
}

.admin-nav-link::before {
    opacity: 0.28;
}

.admin-nav-link:hover::before,
.admin-nav-link:focus-visible::before,
.admin-nav-link.is-active::before,
aside.admin-sidebar a[href^="/dashboard/"]:hover::before,
aside.admin-sidebar a[href^="/dashboard/"]:focus-visible::before {
    opacity: 0.9;
}

.admin-dashboard-panel:hover::before,
.admin-metric-card:hover::before,
.admin-dashboard-metric-row:hover::before,
.admin-settings-asset-card:hover::before,
.admin-hero-card:hover::after {
    opacity: 0.88;
}

.admin-metric-card::before {
    display: block;
}

html[data-theme="light"] .admin-sidebar,
html[data-theme="light"] .admin-nav-link,
html[data-theme="light"] .admin-dashboard-panel,
html[data-theme="light"] .admin-metric-card,
html[data-theme="light"] .admin-dashboard-metric-row,
html[data-theme="light"] .admin-settings-asset-card,
html[data-theme="light"] .admin-hero-card,
html[data-theme="light"] aside.admin-sidebar a[href^="/dashboard/"] {
    border-color: transparent !important;
}

@media (prefers-reduced-motion: reduce) {
    .admin-sidebar::before,
    .admin-nav-link::before,
    .admin-dashboard-panel::before,
    .admin-metric-card::before,
    .admin-dashboard-metric-row::before,
    .admin-settings-asset-card::before,
    aside.admin-sidebar a[href^="/dashboard/"]::before,
    .admin-hero-card::after {
        animation: none;
        background: conic-gradient(from 35deg, #6366f1, #22d3ee, #ec4899, #f59e0b, #6366f1);
    }
}

.public-footer {
    position: relative;
    isolation: isolate;
    overflow: hidden;
    margin-top: 5rem;
    padding: 2.75rem 0 1.25rem;
    color: #e2e8f0;
    border-top: 1px solid rgba(148, 163, 184, 0.16);
    background:
        radial-gradient(ellipse at 14% 0%, rgba(99, 102, 241, 0.13), transparent 34rem),
        radial-gradient(ellipse at 88% 6%, rgba(34, 211, 238, 0.07), transparent 30rem),
        #080c16;
}

.public-footer::before {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 1px;
    content: "";
    background: linear-gradient(90deg, transparent, #6366f1 25%, #22d3ee 52%, #ec4899 76%, transparent);
    opacity: 0.8;
}

.public-footer-inner {
    position: relative;
    z-index: 1;
    width: min(100% - 2rem, 1280px);
    margin: 0 auto;
}

.public-footer-cta {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 1.5rem;
    margin-bottom: 3rem;
    padding: 1.5rem 1.75rem;
    border: 1px solid transparent;
    border-radius: 1.1rem;
    background:
        radial-gradient(ellipse at 90% 50%, rgba(99, 102, 241, 0.17), transparent 36rem),
        linear-gradient(120deg, rgba(17, 24, 39, 0.96), rgba(12, 18, 32, 0.96));
    box-shadow: 0 20px 55px rgba(0, 0, 0, 0.2);
}

.public-footer-eyebrow,
.public-footer-small-label {
    display: block;
    color: #a5b4fc;
    font-size: 0.65rem;
    font-weight: 700;
    letter-spacing: 0.14em;
    line-height: 1.4;
    text-transform: uppercase;
}

.public-footer-cta h2 {
    margin: 0.45rem 0 0.35rem;
    color: #f8fafc;
    font-size: clamp(1.2rem, 2.2vw, 1.65rem);
    font-weight: 750;
    letter-spacing: -0.035em;
    line-height: 1.2;
}

.public-footer-cta p {
    max-width: 38rem;
    margin: 0;
    color: #aab5c8;
    font-size: 0.82rem;
    line-height: 1.65;
}

.public-footer-cta-actions {
    display: flex;
    flex: 0 0 auto;
    flex-wrap: wrap;
    align-items: center;
    gap: 0.65rem;
}

.public-footer-button {
    display: inline-flex;
    min-height: 2.65rem;
    align-items: center;
    justify-content: center;
    gap: 0.55rem;
    padding: 0.65rem 0.95rem;
    border: 1px solid transparent;
    border-radius: 0.7rem;
    font-size: 0.78rem;
    font-weight: 650;
    text-decoration: none;
    transition: transform 160ms ease, background-color 160ms ease, border-color 160ms ease, color 160ms ease;
}

.public-footer-button:hover {
    transform: translateY(-1px);
}

.public-footer-button.is-primary {
    color: white;
    background: linear-gradient(135deg, #6366f1, #7c3aed);
    box-shadow: 0 8px 24px rgba(99, 102, 241, 0.23);
}

.public-footer-button.is-primary:hover {
    background: linear-gradient(135deg, #7477ff, #8b5cf6);
}

.public-footer-button.is-secondary {
    color: #dbe4f2;
    border-color: rgba(148, 163, 184, 0.2);
    background: rgba(15, 23, 42, 0.58);
}

.public-footer-button.is-secondary:hover {
    border-color: rgba(165, 180, 252, 0.45);
    background: rgba(99, 102, 241, 0.12);
}

.public-footer-grid {
    display: grid;
    grid-template-columns: minmax(190px, 1.25fr) repeat(4, minmax(0, 1fr));
    gap: 2rem;
    padding-bottom: 2.5rem;
}

.public-footer-brand-lockup {
    display: inline-flex;
    align-items: center;
    gap: 0.65rem;
    color: #f8fafc;
    font-size: 1.05rem;
    font-weight: 750;
    letter-spacing: -0.025em;
    text-decoration: none;
}

.public-footer-logo,
.public-footer-logo-fallback {
    display: grid;
    width: 2.15rem;
    height: 2.15rem;
    flex: 0 0 auto;
    place-items: center;
    border: 1px solid rgba(165, 180, 252, 0.28);
    border-radius: 0.72rem;
    object-fit: contain;
    box-shadow: 0 8px 22px rgba(99, 102, 241, 0.2);
}

.public-footer-logo-fallback {
    color: white;
    background: linear-gradient(135deg, #6366f1, #a855f7, #ec4899);
    font-size: 1.05rem;
}

.public-footer-tagline {
    max-width: 17rem;
    margin: 0.9rem 0 1rem;
    color: #98a5ba;
    font-size: 0.76rem;
    line-height: 1.75;
}

.public-footer-status {
    display: inline-flex;
    align-items: center;
    gap: 0.45rem;
    color: #b9c5d8;
    font-size: 0.72rem;
    font-weight: 600;
    text-decoration: none;
    transition: color 160ms ease;
}

.public-footer-status:hover {
    color: #c7d2fe;
}

.public-footer-status > span {
    width: 0.42rem;
    height: 0.42rem;
    border-radius: 50%;
    background: #34d399;
    box-shadow: 0 0 0 3px rgba(52, 211, 153, 0.12);
}

.public-footer-column h3 {
    margin: 0 0 0.9rem;
    color: #f1f5f9;
    font-size: 0.76rem;
    font-weight: 700;
    letter-spacing: 0.025em;
}

.public-footer-column ul {
    display: grid;
    gap: 0.65rem;
    margin: 0;
    padding: 0;
    list-style: none;
}

.public-footer-column li a {
    display: inline-flex;
    align-items: baseline;
    gap: 0.42rem;
    color: #9aa7bb;
    font-size: 0.74rem;
    line-height: 1.5;
    text-decoration: none;
    overflow-wrap: anywhere;
    transition: color 160ms ease, transform 160ms ease;
}

.public-footer-column li a::before {
    width: 0.25rem;
    height: 0.25rem;
    flex: 0 0 auto;
    border-radius: 50%;
    background: #56647a;
    content: "";
    transform: translateY(-1px);
    transition: background-color 160ms ease;
}

.public-footer-column li a:hover,
.public-footer-column li a:focus-visible {
    color: #c7d2fe;
    transform: translateX(2px);
}

.public-footer-empty-link {
    color: #748197;
    font-size: 0.72rem;
}

.public-footer-column li a:hover::before,
.public-footer-column li a:focus-visible::before {
    background: #818cf8;
}

.public-footer-email {
    display: inline-block;
    max-width: 100%;
    color: #c7d2fe;
    font-size: 0.74rem;
    line-height: 1.5;
    overflow-wrap: anywhere;
    text-decoration: none;
}

.public-footer-email:hover {
    color: #fff;
    text-decoration: underline;
    text-underline-offset: 3px;
}

.public-footer-socials {
    display: flex;
    flex-wrap: wrap;
    gap: 0.45rem;
    margin-top: 1rem;
}

.public-footer-socials a {
    display: grid;
    width: 2rem;
    height: 2rem;
    place-items: center;
    color: #aab6ca;
    border: 1px solid rgba(148, 163, 184, 0.19);
    border-radius: 0.65rem;
    background: rgba(15, 23, 42, 0.65);
    transition: color 160ms ease, border-color 160ms ease, background-color 160ms ease, transform 160ms ease;
}

.public-footer-socials a:hover {
    color: white;
    border-color: rgba(129, 140, 248, 0.55);
    background: rgba(99, 102, 241, 0.16);
    transform: translateY(-2px);
}

.public-footer-socials svg {
    width: 0.9rem;
    height: 0.9rem;
}

.public-footer-apps {
    display: grid;
    justify-items: start;
    gap: 0.45rem;
    margin-top: 1rem;
}

.public-footer-small-label {
    margin-bottom: 0.1rem;
    color: #78869c;
    font-size: 0.58rem;
    letter-spacing: 0.1em;
}

.public-footer-app-link {
    display: inline-flex;
    min-width: 8.7rem;
    align-items: center;
    gap: 0.55rem;
    padding: 0.42rem 0.6rem;
    color: #cbd5e1;
    border: 1px solid rgba(148, 163, 184, 0.19);
    border-radius: 0.65rem;
    background: rgba(15, 23, 42, 0.58);
    text-decoration: none;
    transition: color 160ms ease, border-color 160ms ease, background-color 160ms ease;
}

.public-footer-app-link:hover {
    color: white;
    border-color: rgba(129, 140, 248, 0.5);
    background: rgba(99, 102, 241, 0.12);
}

.public-footer-app-link > svg {
    width: 1rem;
    height: 1rem;
    flex: 0 0 auto;
}

.public-footer-app-link > span {
    display: grid;
    gap: 0.05rem;
}

.public-footer-app-link small {
    color: #8d9bb0;
    font-size: 0.52rem;
    line-height: 1.2;
}

.public-footer-app-link strong {
    font-size: 0.68rem;
    font-weight: 650;
    line-height: 1.25;
}

.public-footer-bottom {
    position: relative;
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 1rem;
    padding: 1.15rem 0 1.45rem;
    color: #748197;
    border-top: 1px solid rgba(148, 163, 184, 0.14);
    font-size: 0.66rem;
}

.public-footer-bottom p {
    margin: 0;
}

.public-footer-bottom-meta {
    display: grid;
    justify-items: end;
    gap: 0.38rem;
    text-align: right;
}

.public-footer-credits {
    position: absolute;
    left: 50%;
    bottom: 0.25rem;
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    justify-content: flex-end;
    max-width: 100%;
    gap: 0.2rem 0.42rem;
    color: #aab7ca;
    font-size: 0.64rem;
    font-weight: 650;
    text-align: center;
    transform: translateX(-50%);
}

.public-footer-credit-separator {
    color: #64748b;
}

.public-footer-credit-link {
    background: linear-gradient(100deg, #a78bfa, #22d3ee, #f472b6, #fbbf24, #a78bfa);
    background-size: 260% 100%;
    background-clip: text;
    color: transparent;
    font-weight: 850;
    text-decoration: none;
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    animation: public-footer-credit-colors 6s linear infinite;
}

.public-footer-credit-link:hover,
.public-footer-credit-link:focus-visible {
    text-decoration: underline;
    text-decoration-color: #67e8f9;
    text-underline-offset: 3px;
}

@keyframes public-footer-credit-colors {
    from { background-position: 0% 50%; }
    to { background-position: 100% 50%; }
}

html[data-theme="light"] .public-footer-bottom-meta > p,
html[data-theme="light"] .public-footer-credits {
    color: #475569;
}

html[data-theme="light"] .public-footer-credit-separator {
    color: #94a3b8;
}

@media (max-width: 1100px) {
    .public-footer-grid {
        grid-template-columns: repeat(3, minmax(0, 1fr));
        gap: 2rem 1.5rem;
    }
}

@media (max-width: 760px) {
    .public-footer {
        margin-top: 3.5rem;
        padding-top: 2rem;
    }

    .public-footer-inner {
        width: min(100% - 1.5rem, 1280px);
    }

    .public-footer-cta {
        align-items: flex-start;
        flex-direction: column;
        margin-bottom: 2.25rem;
        padding: 1.2rem;
    }

    .public-footer-cta-actions {
        width: 100%;
    }

    .public-footer-button {
        flex: 1 1 auto;
    }

    .public-footer-grid {
        grid-template-columns: repeat(2, minmax(0, 1fr));
        gap: 1.8rem 1.25rem;
        padding-bottom: 1.75rem;
    }

    .public-footer-brand {
        grid-column: 1 / -1;
    }

    .public-footer-tagline {
        max-width: 28rem;
    }
}

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

    .public-footer-brand {
        grid-column: auto;
    }

    .public-footer-bottom {
        align-items: flex-start;
        flex-direction: column;
        gap: 0.45rem;
    }

    .public-footer-bottom-meta {
        justify-items: start;
        text-align: left;
    }

    .public-footer-credits {
        position: static;
        align-self: center;
        justify-content: center;
        transform: none;
    }
}

@media (prefers-reduced-motion: reduce) {
    .public-footer-button,
    .public-footer-column li a,
    .public-footer-socials a,
    .public-footer-app-link,
    .public-footer-credit-link {
        transition: none;
        animation: none;
        background-position: 50% 50%;
    }
}

.blog-archive-page,
.blog-post-page {
    --blog-surface: #101827;
    --blog-surface-raised: #131d2d;
    --blog-border: rgba(148, 163, 184, 0.2);
    --blog-ink: #edf2ff;
    --blog-muted: #9aa8bd;
    --blog-faint: #738198;
    --blog-accent: #a5b4fc;
    --blog-accent-strong: #818cf8;
    width: min(100% - 2rem, 1180px);
    margin: 0 auto;
    color: var(--blog-ink);
}

.blog-archive-page {
    padding: 2.2rem 0 4.5rem;
}

.blog-archive-hero {
    display: flex;
    min-height: 0;
    align-items: center;
    justify-content: space-between;
    gap: 1.5rem;
    margin-bottom: 2rem;
    padding: 1.65rem 1.8rem;
    overflow: hidden;
    border: 1px solid rgba(129, 140, 248, 0.22);
    border-radius: 1.15rem;
    background:
        radial-gradient(ellipse at 84% 30%, rgba(99, 102, 241, 0.19), transparent 27rem),
        linear-gradient(115deg, #111a2b, #141d30 68%, #17152c);
}

.blog-archive-hero-copy {
    max-width: 50rem;
}

.blog-eyebrow {
    margin: 0;
    color: var(--blog-accent);
    font-size: 0.64rem;
    font-weight: 750;
    letter-spacing: 0.15em;
    line-height: 1.4;
    text-transform: uppercase;
}

.blog-eyebrow span {
    padding: 0 0.28rem;
    color: #7382a0;
}

.blog-archive-hero h1 {
    margin: 0.45rem 0 0;
    color: var(--blog-ink);
    font-size: clamp(1.65rem, 3.3vw, 2.25rem);
    font-weight: 800;
    letter-spacing: -0.045em;
    line-height: 1.12;
}

.blog-archive-hero h1 span {
    color: #a78bfa;
}

.blog-archive-hero-copy > p:last-child {
    max-width: 43rem;
    margin: 0.65rem 0 0;
    color: #b3bfd1;
    font-size: 0.86rem;
    line-height: 1.65;
}

.blog-archive-count {
    display: grid;
    min-width: 5.4rem;
    min-height: 4.2rem;
    flex: 0 0 auto;
    align-content: center;
    justify-items: center;
    padding: 0.55rem 0.8rem;
    border: 1px solid rgba(165, 180, 252, 0.2);
    border-radius: 0.9rem;
    background: rgba(15, 23, 42, 0.56);
}

.blog-archive-count strong {
    color: white;
    font-size: 1.3rem;
    font-weight: 800;
    line-height: 1;
}

.blog-archive-count span {
    margin-top: 0.32rem;
    color: #aebbd0;
    font-size: 0.62rem;
}

.blog-archive-toolbar {
    display: flex;
    align-items: end;
    justify-content: space-between;
    gap: 1.2rem;
    margin-bottom: 0.85rem;
}

.blog-archive-toolbar h2 {
    margin: 0.35rem 0 0;
    color: var(--blog-ink);
    font-size: 1.15rem;
    font-weight: 750;
    letter-spacing: -0.025em;
}

.blog-archive-toolbar > div > p:last-child {
    margin: 0.28rem 0 0;
    color: var(--blog-muted);
    font-size: 0.75rem;
}

.blog-search {
    display: flex;
    width: min(100%, 23rem);
    min-height: 2.8rem;
    flex: 0 1 23rem;
    align-items: center;
    gap: 0.65rem;
    padding: 0 0.7rem 0 0.85rem;
    border: 1px solid var(--blog-border);
    border-radius: 0.8rem;
    background: var(--blog-surface);
    transition: border-color 160ms ease, box-shadow 160ms ease;
}

.blog-search:focus-within {
    border-color: rgba(129, 140, 248, 0.7);
    box-shadow: 0 0 0 3px rgba(99, 102, 241, 0.12);
}

.blog-search > svg {
    width: 1rem;
    height: 1rem;
    flex: 0 0 auto;
    color: var(--blog-faint);
}

.blog-search input {
    width: 100%;
    min-width: 0;
    border: 0;
    outline: 0;
    color: var(--blog-ink);
    background: transparent;
    font-size: 0.78rem;
}

.blog-search input::placeholder {
    color: var(--blog-faint);
}

.blog-search input::-webkit-search-cancel-button {
    display: none;
}

.blog-search button {
    display: grid;
    width: 1.7rem;
    height: 1.7rem;
    flex: 0 0 auto;
    place-items: center;
    color: var(--blog-muted);
    border: 0;
    border-radius: 0.5rem;
    background: transparent;
    font-size: 1.15rem;
    cursor: pointer;
}

.blog-search button:hover {
    color: var(--blog-ink);
    background: rgba(148, 163, 184, 0.12);
}

.blog-search button[hidden],
.blog-search-empty[hidden] {
    display: none !important;
}

.blog-list-meta {
    display: flex;
    justify-content: space-between;
    gap: 1rem;
    margin-bottom: 0.65rem;
    color: var(--blog-faint);
    font-size: 0.66rem;
}

.blog-list-meta #blogResultCount {
    color: var(--blog-muted);
    font-weight: 650;
}

.blog-post-scroll {
    max-height: min(68vh, 640px);
    overflow: auto;
    padding: 0.12rem 0.55rem 0.5rem 0.12rem;
    overscroll-behavior: contain;
    scrollbar-color: rgba(129, 140, 248, 0.55) rgba(148, 163, 184, 0.1);
    scrollbar-width: thin;
}

.blog-post-grid {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 0.85rem;
}

.blog-post-card {
    display: flex;
    min-height: 12rem;
    flex-direction: column;
    padding: 1.1rem 1.15rem 0.9rem;
    border: 1px solid var(--blog-border);
    border-radius: 1rem;
    background: linear-gradient(145deg, var(--blog-surface-raised), var(--blog-surface));
    box-shadow: 0 8px 24px rgba(2, 6, 23, 0.08);
    transition: border-color 160ms ease, transform 160ms ease, box-shadow 160ms ease;
}

.blog-post-card[hidden] {
    display: none !important;
}

.blog-post-card:hover {
    transform: translateY(-2px);
    box-shadow: 0 14px 32px rgba(2, 6, 23, 0.16);
}

.blog-post-card-top,
.blog-post-card-bottom {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 0.75rem;
}

.blog-post-label {
    color: var(--blog-accent);
    font-size: 0.57rem;
    font-weight: 750;
    letter-spacing: 0.12em;
}

.blog-post-card time {
    color: var(--blog-faint);
    font-size: 0.62rem;
}

.blog-post-card h3 {
    margin: 0.75rem 0 0;
    color: var(--blog-ink);
    font-size: 1rem;
    font-weight: 750;
    letter-spacing: -0.02em;
    line-height: 1.4;
}

.blog-post-card h3 a {
    color: inherit;
    text-decoration: none;
}

.blog-post-card h3 a:hover {
    color: var(--blog-accent);
}

.blog-post-card > p {
    display: -webkit-box;
    margin: 0.5rem 0 1rem;
    overflow: hidden;
    color: var(--blog-muted);
    font-size: 0.75rem;
    line-height: 1.6;
    -webkit-box-orient: vertical;
    -webkit-line-clamp: 3;
}

.blog-post-card-bottom {
    margin-top: auto;
    padding-top: 0.75rem;
    border-top: 1px solid var(--blog-border);
}

.blog-post-card-bottom > span {
    color: var(--blog-faint);
    font-size: 0.62rem;
}

.blog-post-card-bottom a {
    display: inline-flex;
    align-items: center;
    gap: 0.35rem;
    color: var(--blog-accent);
    font-size: 0.68rem;
    font-weight: 700;
    text-decoration: none;
}

.blog-post-card-bottom a:hover {
    color: var(--blog-ink);
}

.blog-search-empty,
.blog-empty-state {
    display: grid;
    justify-items: center;
    gap: 0.55rem;
    padding: 2.4rem 1.2rem;
    border: 1px solid var(--blog-border);
    border-radius: 1rem;
    background: var(--blog-surface);
    text-align: center;
}

.blog-search-empty strong,
.blog-empty-state h2 {
    margin: 0;
    color: var(--blog-ink);
    font-size: 1rem;
}

.blog-search-empty span,
.blog-empty-state p {
    margin: 0;
    color: var(--blog-muted);
    font-size: 0.78rem;
    line-height: 1.6;
}

.blog-empty-state > span {
    display: grid;
    width: 2.5rem;
    height: 2.5rem;
    place-items: center;
    color: var(--blog-accent);
    border: 1px solid var(--blog-border);
    border-radius: 0.8rem;
    background: rgba(99, 102, 241, 0.1);
    font-family: "JetBrains Mono", monospace;
}

.blog-empty-state a {
    display: inline-flex;
    gap: 0.45rem;
    margin-top: 0.4rem;
    color: var(--blog-accent);
    font-size: 0.78rem;
    font-weight: 700;
    text-decoration: none;
}

.blog-post-page {
    padding: 2rem 0 4rem;
}

.blog-breadcrumb {
    display: flex;
    align-items: center;
    gap: 0.55rem;
    margin-bottom: 1rem;
    color: var(--blog-faint);
    font-size: 0.68rem;
}

.blog-breadcrumb a {
    display: inline-flex;
    min-height: 2rem;
    align-items: center;
    gap: 0.45rem;
    padding: 0 0.65rem;
    color: var(--blog-muted);
    border: 1px solid var(--blog-border);
    border-radius: 0.6rem;
    background: var(--blog-surface);
    text-decoration: none;
}

.blog-breadcrumb a:hover {
    color: var(--blog-ink);
    border-color: rgba(129, 140, 248, 0.5);
}

.blog-post-hero {
    padding: 1.45rem 1.6rem;
    border: 1px solid rgba(129, 140, 248, 0.22);
    border-radius: 1rem;
    background:
        radial-gradient(ellipse at 86% 15%, rgba(99, 102, 241, 0.16), transparent 25rem),
        linear-gradient(120deg, #111a2b, #151e31);
}

.blog-post-hero h1 {
    max-width: 58rem;
    margin: 0.45rem 0 0;
    color: var(--blog-ink);
    font-size: clamp(1.6rem, 3vw, 2.5rem);
    font-weight: 800;
    letter-spacing: -0.045em;
    line-height: 1.15;
    overflow-wrap: anywhere;
}

.blog-post-excerpt {
    max-width: 52rem;
    margin: 0.6rem 0 0;
    color: #b3bfd1;
    font-size: 0.84rem;
    line-height: 1.65;
}

.blog-post-meta {
    display: flex;
    align-items: center;
    gap: 0.55rem;
    margin-top: 0.9rem;
    color: #98a5ba;
    font-size: 0.66rem;
}

.blog-post-meta > span:first-child {
    color: var(--blog-accent);
    font-weight: 700;
    letter-spacing: 0.04em;
    text-transform: uppercase;
}

.blog-post-layout {
    display: grid;
    grid-template-columns: minmax(0, 1fr) minmax(240px, 290px);
    align-items: start;
    gap: 1.2rem;
    margin-top: 1.15rem;
}

.blog-article-card,
.blog-sidebar-panel {
    border: 1px solid var(--blog-border);
    border-radius: 1rem;
    background: var(--blog-surface);
}

.blog-article-card {
    min-width: 0;
    padding: 1.15rem clamp(1rem, 3vw, 2rem) 1.25rem;
}

.blog-share-bar {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 1rem;
    padding-bottom: 0.85rem;
    border-bottom: 1px solid var(--blog-border);
}

.blog-share-bar > div:first-child {
    display: grid;
    gap: 0.2rem;
}

.blog-share-bar strong {
    color: var(--blog-ink);
    font-size: 0.72rem;
}

.blog-share-bar span {
    color: var(--blog-muted);
    font-size: 0.65rem;
}

.blog-share-actions {
    display: flex;
    flex-wrap: wrap;
    gap: 0.4rem;
}

.blog-share-actions a,
.blog-share-actions button {
    display: grid;
    width: 2rem;
    height: 2rem;
    place-items: center;
    color: var(--blog-muted);
    border: 1px solid var(--blog-border);
    border-radius: 0.62rem;
    background: var(--blog-surface-raised);
    cursor: pointer;
    transition: color 150ms ease, border-color 150ms ease, background-color 150ms ease, transform 150ms ease;
}

.blog-share-actions a:hover,
.blog-share-actions button:hover {
    color: var(--blog-ink);
    border-color: rgba(129, 140, 248, 0.55);
    background: rgba(99, 102, 241, 0.13);
    transform: translateY(-1px);
}

.blog-share-actions svg {
    width: 0.95rem;
    height: 0.95rem;
}

.blog-share-status {
    min-height: 0.75rem;
    margin: 0.25rem 0 0;
    color: var(--blog-accent);
    font-size: 0.63rem;
}

.blog-toc {
    margin: 1rem 0 1.4rem;
    padding: 0.9rem 1rem;
    border: 1px solid var(--blog-border);
    border-radius: 0.8rem;
    background: var(--blog-surface-raised);
}

.blog-toc-heading {
    display: flex;
    align-items: center;
    gap: 0.45rem;
    color: var(--blog-ink);
    font-size: 0.75rem;
}

.blog-toc-heading > span {
    color: var(--blog-accent);
}

.blog-toc ol {
    display: grid;
    gap: 0.45rem;
    margin: 0.65rem 0 0;
    padding: 0;
    list-style: none;
}

.blog-toc li.is-nested {
    padding-left: 0.9rem;
}

.blog-toc a {
    color: var(--blog-muted);
    font-size: 0.7rem;
    line-height: 1.45;
    text-decoration: none;
}

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

.blog-article-content {
    max-width: 72ch;
    margin: 0 auto;
}

.blog-article-content h2,
.blog-article-content h3 {
    scroll-margin-top: 5.5rem;
}

.blog-article-content h2:first-child {
    margin-top: 0.5rem;
}

.blog-article-end {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 0.8rem;
    margin-top: 1.5rem;
    padding-top: 0.9rem;
    border-top: 1px solid var(--blog-border);
}

.blog-article-end > span {
    color: var(--blog-muted);
    font-size: 0.68rem;
}

.blog-article-end a {
    color: var(--blog-accent);
    font-size: 0.68rem;
    font-weight: 700;
    text-decoration: none;
}

.blog-article-end a:hover {
    color: var(--blog-ink);
}

.blog-post-sidebar {
    position: sticky;
    top: 1rem;
    display: grid;
    max-height: calc(100vh - 2rem);
    gap: 0.8rem;
    overflow-y: auto;
    padding-right: 0.15rem;
    scrollbar-color: rgba(129, 140, 248, 0.45) transparent;
    scrollbar-width: thin;
}

.blog-sidebar-panel {
    padding: 1rem;
}

.blog-sidebar-heading {
    margin-bottom: 0.7rem;
}

.blog-sidebar-kicker {
    color: var(--blog-accent);
    font-size: 0.55rem;
    font-weight: 750;
    letter-spacing: 0.13em;
}

.blog-sidebar-heading h2 {
    margin: 0.3rem 0 0;
    color: var(--blog-ink);
    font-size: 0.9rem;
    font-weight: 750;
    letter-spacing: -0.02em;
}

.blog-sidebar-list,
.blog-related-list {
    display: grid;
    gap: 0.55rem;
    margin: 0;
    padding: 0;
    list-style: none;
}

.blog-sidebar-post {
    display: flex;
    align-items: flex-start;
    gap: 0.65rem;
    padding: 0.58rem;
    border: 1px solid transparent;
    border-radius: 0.7rem;
    text-decoration: none;
    transition: border-color 150ms ease, background-color 150ms ease;
}

.blog-sidebar-post:hover {
    border-color: var(--blog-border);
    background: var(--blog-surface-raised);
}

.blog-sidebar-rank {
    display: grid;
    width: 1.7rem;
    height: 1.7rem;
    flex: 0 0 auto;
    place-items: center;
    color: var(--blog-accent);
    border: 1px solid var(--blog-border);
    border-radius: 0.52rem;
    background: rgba(99, 102, 241, 0.1);
    font-size: 0.58rem;
    font-weight: 750;
}

.blog-sidebar-post-copy {
    display: grid;
    gap: 0.27rem;
}

.blog-sidebar-post-copy strong,
.blog-related-post strong {
    color: var(--blog-ink);
    font-size: 0.7rem;
    font-weight: 700;
    line-height: 1.45;
}

.blog-sidebar-post:hover .blog-sidebar-post-copy strong,
.blog-related-post:hover strong {
    color: var(--blog-accent);
}

.blog-sidebar-post-copy small {
    color: var(--blog-faint);
    font-size: 0.58rem;
}

.blog-related-post {
    display: grid;
    gap: 0.35rem;
    padding: 0.65rem 0;
    border-bottom: 1px solid var(--blog-border);
    text-decoration: none;
}

.blog-related-post:last-child {
    border-bottom: 0;
}

.blog-related-post > span {
    display: -webkit-box;
    overflow: hidden;
    color: var(--blog-muted);
    font-size: 0.64rem;
    line-height: 1.5;
    -webkit-box-orient: vertical;
    -webkit-line-clamp: 2;
}

.blog-sidebar-empty {
    margin: 0;
    color: var(--blog-muted);
    font-size: 0.68rem;
    line-height: 1.6;
}

html[data-theme="light"] .blog-archive-page,
html[data-theme="light"] .blog-post-page {
    --blog-surface: #ffffff;
    --blog-surface-raised: #f4f6fb;
    --blog-border: #d8e0eb;
    --blog-ink: #172033;
    --blog-muted: #56647a;
    --blog-faint: #758198;
    --blog-accent: #4f46e5;
    --blog-accent-strong: #4338ca;
}

html[data-theme="light"] .blog-archive-hero,
html[data-theme="light"] .blog-post-hero {
    border-color: #d6def0;
    background:
        radial-gradient(ellipse at 86% 15%, rgba(99, 102, 241, 0.12), transparent 25rem),
        linear-gradient(120deg, #f1f4ff, #f7f8fc);
}

html[data-theme="light"] .blog-archive-hero-copy > p:last-child,
html[data-theme="light"] .blog-post-excerpt {
    color: #526078;
}

html[data-theme="light"] .blog-archive-count {
    border-color: #d8def0;
    background: rgba(255, 255, 255, 0.82);
}

html[data-theme="light"] .blog-archive-count strong {
    color: #172033;
}

html[data-theme="light"] .blog-archive-count span {
    color: #64748b;
}

html[data-theme="light"] .blog-post-card {
    box-shadow: 0 8px 24px rgba(15, 23, 42, 0.04);
}

html[data-theme="light"] .blog-post-card:hover {
    box-shadow: 0 14px 32px rgba(15, 23, 42, 0.09);
}

html[data-theme="light"] .blog-article-content a {
    color: #4338ca;
}

html[data-theme="light"] .blog-share-actions a,
html[data-theme="light"] .blog-share-actions button {
    background: #f6f7fb;
}

@media (max-width: 900px) {
    .blog-post-layout {
        grid-template-columns: minmax(0, 1fr) 250px;
        gap: 0.8rem;
    }

    .blog-post-grid {
        gap: 0.7rem;
    }
}

@media (max-width: 720px) {
    .blog-archive-page,
    .blog-post-page {
        width: min(100% - 1.4rem, 1180px);
    }

    .blog-archive-page {
        padding-top: 1.4rem;
    }

    .blog-archive-hero {
        align-items: flex-start;
        padding: 1.3rem 1.2rem;
    }

    .blog-archive-count {
        min-width: 4.2rem;
        min-height: 3.7rem;
        padding: 0.4rem 0.55rem;
    }

    .blog-archive-toolbar {
        align-items: stretch;
        flex-direction: column;
        gap: 0.85rem;
    }

    .blog-search {
        width: 100%;
        flex-basis: auto;
    }

    .blog-post-scroll {
        max-height: min(64vh, 580px);
    }

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

    .blog-post-layout {
        grid-template-columns: minmax(0, 1fr);
    }

    .blog-post-sidebar {
        position: static;
        max-height: none;
        overflow: visible;
    }
}

@media (max-width: 460px) {
    .blog-archive-hero {
        gap: 0.75rem;
        padding: 1.15rem 0.95rem;
    }

    .blog-archive-hero h1 {
        font-size: 1.55rem;
    }

    .blog-archive-hero-copy > p:last-child {
        font-size: 0.78rem;
    }

    .blog-archive-count {
        min-width: 3.6rem;
    }

    .blog-archive-count strong {
        font-size: 1.1rem;
    }

    .blog-list-meta > span:last-child {
        text-align: right;
    }

    .blog-post-hero {
        padding: 1.2rem 1rem;
    }

    .blog-share-bar {
        align-items: flex-start;
        flex-direction: column;
    }

    .blog-article-end {
        align-items: flex-start;
        flex-direction: column;
    }
}

@media (prefers-reduced-motion: reduce) {
    .blog-post-card,
    .blog-share-actions a,
    .blog-share-actions button,
    .blog-sidebar-post {
        transition: none;
    }
}

.blog-post-card-image {
    display: block;
    aspect-ratio: 16 / 7;
    margin: -1.1rem -1.15rem 0.9rem;
    overflow: hidden;
    border-radius: 0.95rem 0.95rem 0.65rem 0.65rem;
    background: linear-gradient(135deg, rgba(99, 102, 241, 0.15), rgba(148, 163, 184, 0.1));
}

.blog-post-card-image img {
    display: block;
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform 220ms ease;
}

.blog-post-card:hover .blog-post-card-image img {
    transform: scale(1.025);
}

.blog-post-featured-image {
    max-height: 380px;
    aspect-ratio: 2.35 / 1;
    margin: 1rem 0 0;
    overflow: hidden;
    border: 1px solid var(--blog-border);
    border-radius: 1rem;
    background: var(--blog-surface-raised);
}

.blog-post-featured-image img {
    display: block;
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.blog-article-content img {
    display: block;
    max-width: 100%;
    height: auto;
    margin: 1.25rem auto;
    border: 1px solid var(--blog-border);
    border-radius: 0.9rem;
}

.cms-featured-image {
    display: grid;
    grid-template-columns: minmax(0, 0.8fr) minmax(0, 1.2fr);
    gap: 1rem;
    padding: 1rem;
    border: 1px solid rgba(148, 163, 184, 0.22);
    border-radius: 0.85rem;
    background: rgba(15, 23, 42, 0.35);
}

.cms-featured-image-copy label {
    color: #e2e8f0;
    font-size: 0.75rem;
    font-weight: 700;
}

.cms-featured-image-copy p {
    margin: 0.35rem 0 0;
    color: #94a3b8;
    font-size: 0.68rem;
    line-height: 1.55;
}

.cms-featured-image-controls {
    display: grid;
    align-content: start;
    gap: 0.55rem;
}

.cms-featured-image-controls input[type="file"] {
    cursor: pointer;
}

.cms-featured-image-controls input[type="file"]::file-selector-button {
    margin-right: 0.7rem;
    padding: 0.4rem 0.7rem;
    color: #e0e7ff;
    border: 1px solid rgba(129, 140, 248, 0.3);
    border-radius: 0.5rem;
    background: rgba(99, 102, 241, 0.18);
    font-size: 0.68rem;
    font-weight: 700;
    cursor: pointer;
}

.cms-featured-image-preview {
    display: flex;
    min-width: 0;
    align-items: center;
    gap: 0.7rem;
    color: #aebbd0;
    font-size: 0.66rem;
}

.cms-featured-image-preview[hidden] {
    display: none !important;
}

.cms-featured-image-preview img {
    display: block;
    width: 4.8rem;
    height: 3.2rem;
    flex: 0 0 auto;
    object-fit: cover;
    border: 1px solid rgba(148, 163, 184, 0.25);
    border-radius: 0.5rem;
    background: #0f172a;
}

.cms-featured-image-remove {
    display: inline-flex;
    width: fit-content;
    align-items: center;
    gap: 0.45rem;
    color: #fda4af;
    font-size: 0.67rem;
    cursor: pointer;
}

.cms-featured-image-remove input {
    accent-color: #e11d48;
}

html[data-theme="light"] .cms-featured-image {
    border-color: #d5deeb;
    background: #f8fafc;
}

html[data-theme="light"] .cms-featured-image-copy label {
    color: #263449;
}

html[data-theme="light"] .cms-featured-image-copy p,
html[data-theme="light"] .cms-featured-image-preview {
    color: #5d6b80;
}

html[data-theme="light"] .cms-featured-image-controls input[type="file"]::file-selector-button {
    color: #3730a3;
    border-color: #c7d2fe;
    background: #eef2ff;
}

html[data-theme="light"] .cms-featured-image-remove {
    color: #be123c;
}

@media (max-width: 640px) {
    .cms-featured-image {
        grid-template-columns: minmax(0, 1fr);
    }
}

@media (prefers-reduced-motion: reduce) {
    .blog-post-card-image img {
        transition: none;
    }
}

.admin-live-traffic-panel {
    overflow: hidden;
    padding: 1rem;
}

.admin-live-traffic-header {
    align-items: flex-start;
    flex-wrap: wrap;
    padding-bottom: 0.8rem;
}

.admin-live-traffic-filters {
    display: grid;
    gap: 0.3rem;
}

.admin-live-traffic-filters .admin-chart-control-row {
    flex-wrap: wrap;
}

.admin-live-traffic-filters .admin-chart-range-select {
    width: 11rem;
}

.admin-live-traffic-layout {
    display: grid;
    min-width: 0;
    grid-template-columns: minmax(0, 1.55fr) minmax(17rem, 0.85fr);
    gap: 0.85rem;
}

.admin-live-map-column,
.admin-live-map-aside {
    min-width: 0;
}

.admin-live-map-surface {
    position: relative;
    display: grid;
    min-height: 15rem;
    place-items: center;
    overflow: hidden;
    border: 1px solid #d2e1e7;
    border-radius: 0.95rem;
    background:
        radial-gradient(ellipse at 50% 45%, rgba(215, 241, 245, 0.78), transparent 70%),
        #edf6f8;
}

.visitor-world-svg {
    display: block;
    width: 100%;
    max-height: 25rem;
    padding: 0.45rem;
}

.visitor-map-country {
    fill: #d5e1e7;
    stroke: #9fb2bd;
    stroke-width: 0.65;
    vector-effect: non-scaling-stroke;
    transition: fill 180ms ease, stroke 180ms ease;
}

.visitor-map-country:hover,
.visitor-map-country:focus {
    stroke: #0f7487;
    stroke-width: 1.6;
    outline: none;
}

.admin-live-map-legend {
    display: flex;
    align-items: center;
    gap: 0.45rem;
    padding: 0.6rem 0.15rem 0;
    color: #94a3b8;
    font-size: 0.58rem;
    font-weight: 650;
}

.admin-live-map-gradient {
    width: 5.5rem;
    height: 0.42rem;
    border-radius: 999px;
    background: linear-gradient(90deg, #d5e1e7, #c8f1f2, #8fdee2, #52c6d1, #239eaf);
}

.admin-live-map-updated {
    margin-left: auto;
    white-space: nowrap;
    font-variant-numeric: tabular-nums;
}

.admin-live-map-aside {
    display: flex;
    min-height: 0;
    flex-direction: column;
    gap: 0.75rem;
}

.admin-live-map-stats {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 0.55rem;
}

.admin-live-map-stat {
    display: grid;
    min-width: 0;
    gap: 0.2rem;
    border: 1px solid rgba(148, 163, 184, 0.15);
    border-radius: 0.78rem;
    background: rgba(2, 6, 23, 0.32);
    padding: 0.65rem 0.75rem;
}

.admin-live-map-stat span,
.admin-live-map-stat small {
    color: #94a3b8;
    font-size: 0.58rem;
    line-height: 1.4;
}

.admin-live-map-stat strong {
    color: #f8fafc;
    font-size: 1.15rem;
    font-variant-numeric: tabular-nums;
    letter-spacing: -0.04em;
    line-height: 1.2;
}

.admin-live-country-heading {
    display: flex;
    align-items: end;
    justify-content: space-between;
    gap: 0.75rem;
}

.admin-live-country-heading .admin-chart-kicker {
    margin: 0 0 0.12rem;
    font-size: 0.52rem;
}

.admin-live-country-heading h3 {
    color: #f8fafc;
    font-size: 0.75rem;
    font-weight: 800;
    line-height: 1.3;
}

.admin-live-country-heading > span {
    color: #a5b4fc;
    font-size: 0.65rem;
    font-weight: 800;
    font-variant-numeric: tabular-nums;
}

.admin-live-country-search-label {
    margin-bottom: -0.45rem;
    color: #94a3b8;
    font-size: 0.56rem;
    font-weight: 700;
}

.admin-live-country-search {
    width: 100%;
    min-height: 2.1rem;
    border: 1px solid rgba(148, 163, 184, 0.2);
    border-radius: 0.65rem;
    background: rgba(2, 6, 23, 0.45);
    padding: 0.45rem 0.65rem;
    color: #e2e8f0;
    font: inherit;
    font-size: 0.65rem;
    outline: none;
}

.admin-live-country-search:focus-visible {
    border-color: #38bdf8;
    box-shadow: 0 0 0 3px rgba(56, 189, 248, 0.15);
}

.admin-live-country-list {
    display: grid;
    max-height: 14rem;
    min-height: 4rem;
    gap: 0.12rem;
    overflow: auto;
    overscroll-behavior: contain;
    padding-right: 0.2rem;
    scrollbar-width: thin;
    scrollbar-color: rgba(100, 116, 139, 0.7) transparent;
}

.admin-live-country-row {
    display: grid;
    grid-template-columns: minmax(5.5rem, 1fr) minmax(3.5rem, 1.25fr) auto;
    align-items: center;
    gap: 0.5rem;
    min-height: 1.65rem;
    color: #cbd5e1;
    font-size: 0.6rem;
}

.admin-live-country-name {
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.admin-live-country-bar {
    height: 0.32rem;
    overflow: hidden;
    border-radius: 999px;
    background: rgba(148, 163, 184, 0.15);
}

.admin-live-country-bar i {
    display: block;
    height: 100%;
    min-width: 2px;
    border-radius: inherit;
    background: linear-gradient(90deg, #38bdf8, #2dd4bf);
}

.admin-live-country-row strong {
    min-width: 2.2rem;
    color: #e2e8f0;
    text-align: right;
    font-variant-numeric: tabular-nums;
}

.admin-live-country-empty,
.admin-live-map-empty {
    padding: 1rem;
    color: #94a3b8;
    font-size: 0.65rem;
    text-align: center;
}

.admin-live-map-note {
    margin-top: 0.65rem;
    color: #94a3b8;
    font-size: 0.57rem;
    line-height: 1.55;
}

html[data-theme="light"] .admin-live-traffic-panel {
    border-color: #d6deea;
    background:
        radial-gradient(75% 100% at 100% 0%, rgba(99, 102, 241, 0.045), transparent 72%),
        linear-gradient(145deg, #ffffff, #f8fafc);
}

html[data-theme="light"] .admin-live-map-stat {
    border-color: #e2e8f0;
    background: #f8fafc;
}

html[data-theme="light"] .admin-live-map-stat strong,
html[data-theme="light"] .admin-live-country-heading h3 {
    color: #0f172a;
}

html[data-theme="light"] .admin-live-map-stat span,
html[data-theme="light"] .admin-live-map-stat small,
html[data-theme="light"] .admin-live-map-note,
html[data-theme="light"] .admin-live-map-legend,
html[data-theme="light"] .admin-live-country-search-label {
    color: #64748b;
}

html[data-theme="light"] .admin-live-country-search {
    border-color: #cbd5e1;
    background: #fff;
    color: #0f172a;
}

html[data-theme="light"] .admin-live-country-row {
    color: #334155;
}

html[data-theme="light"] .admin-live-country-row strong {
    color: #0f172a;
}

@media (max-width: 760px) {
    .admin-live-traffic-layout {
        grid-template-columns: minmax(0, 1fr);
    }

    .admin-live-traffic-filters {
        width: 100%;
    }

    .admin-live-traffic-filters .admin-chart-control-row {
        display: grid;
        grid-template-columns: minmax(0, 1fr) minmax(0, 1fr) auto;
    }

    .admin-live-traffic-filters .admin-chart-range-select {
        width: 100%;
    }

    .admin-live-map-surface {
        min-height: 11rem;
    }
}

/* Shared responsive navigation for the public site and authenticated workspaces. */
.public-header-row {
    gap: 0.75rem;
}

.public-brand {
    flex: 0 1 auto;
}

.public-mobile-menu[hidden] {
    display: none !important;
}

.public-mobile-menu {
    position: absolute;
    z-index: 80;
    top: 100%;
    right: 0;
    left: 0;
    padding: 0.8rem 1rem 1rem;
    border-bottom: 1px solid rgba(148, 163, 184, 0.2);
    background: rgba(9, 13, 22, 0.98);
    box-shadow: 0 20px 36px rgba(2, 6, 23, 0.32);
    backdrop-filter: blur(18px);
}

.public-mobile-links {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 0.45rem;
}

.public-mobile-links a {
    display: flex;
    min-height: 2.65rem;
    align-items: center;
    gap: 0.5rem;
    border: 1px solid rgba(148, 163, 184, 0.1);
    border-radius: 0.8rem;
    background: rgba(30, 41, 59, 0.4);
    padding: 0.55rem 0.75rem;
    color: #cbd5e1;
    font-size: 0.78rem;
    font-weight: 650;
    text-decoration: none;
}

.public-mobile-links a:hover,
.public-mobile-links a.is-current {
    border-color: rgba(129, 140, 248, 0.35);
    background: rgba(99, 102, 241, 0.14);
    color: #e0e7ff;
}

.public-mobile-links a i {
    width: 0.45rem;
    height: 0.45rem;
    border-radius: 50%;
    background: #34d399;
    box-shadow: 0 0 0 3px rgba(52, 211, 153, 0.12);
}

.public-mobile-links a span {
    margin-left: auto;
    border: 1px solid rgba(129, 140, 248, 0.2);
    border-radius: 0.35rem;
    background: rgba(99, 102, 241, 0.12);
    padding: 0.1rem 0.3rem;
    color: #c7d2fe;
    font-size: 0.58rem;
}

.public-mobile-actions {
    display: grid;
    grid-template-columns: minmax(0, 1fr) auto;
    gap: 0.5rem;
    margin-top: 0.75rem;
    padding-top: 0.75rem;
    border-top: 1px solid rgba(148, 163, 184, 0.14);
}

.public-mobile-actions a {
    display: flex;
    min-height: 2.75rem;
    align-items: center;
    justify-content: center;
    gap: 0.4rem;
    border: 1px solid rgba(129, 140, 248, 0.2);
    border-radius: 0.8rem;
    padding: 0.55rem 0.7rem;
    color: #c7d2fe;
    font-size: 0.75rem;
    font-weight: 700;
    text-align: center;
    text-decoration: none;
}

.public-mobile-actions .public-mobile-primary {
    border-color: transparent;
    background: var(--accent, #6366f1);
    color: #fff;
    box-shadow: 0 8px 20px rgba(79, 70, 229, 0.2);
}

.public-mobile-actions .public-mobile-credits-cta {
    min-height: 2.2rem;
    justify-self: end;
    border: 1px solid rgba(255, 255, 255, 0.22);
    border-radius: 0.68rem;
    background: linear-gradient(125deg, #8b5cf6, #4f46e5);
    padding: 0.4rem 0.62rem;
    box-shadow: 0 6px 16px rgba(79, 70, 229, 0.24), inset 0 1px rgba(255, 255, 255, 0.16);
    font-size: 0.68rem;
    white-space: nowrap;
}

.public-mobile-actions .public-mobile-secondary {
    background: rgba(30, 41, 59, 0.55);
}

.admin-mobile-topbar,
.portal-mobile-topbar {
    display: none;
}

.responsive-nav-overlay[hidden] {
    display: none !important;
}

.responsive-menu-button,
.responsive-sidebar-close,
.responsive-theme-button {
    display: inline-flex;
    flex: none;
    align-items: center;
    justify-content: center;
    width: 2.5rem;
    height: 2.5rem;
    border: 1px solid rgba(148, 163, 184, 0.18);
    border-radius: 0.8rem;
    background: rgba(30, 41, 59, 0.7);
    color: #e2e8f0;
    transition: background-color 150ms ease, border-color 150ms ease, color 150ms ease;
}

.responsive-menu-button:hover,
.responsive-sidebar-close:hover,
.responsive-theme-button:hover {
    border-color: rgba(129, 140, 248, 0.42);
    background: rgba(99, 102, 241, 0.18);
}

.responsive-sidebar-close {
    display: none;
}

.admin-mobile-brand,
.portal-mobile-brand {
    display: flex;
    min-width: 0;
    align-items: center;
    gap: 0.6rem;
    margin-right: auto;
    color: inherit;
    text-decoration: none;
}

.admin-mobile-brand > span:last-child,
.portal-mobile-brand > span:last-child {
    display: grid;
    min-width: 0;
    line-height: 1.15;
}

.admin-mobile-brand strong,
.portal-mobile-brand strong {
    overflow: hidden;
    color: #f8fafc;
    font-size: 0.78rem;
    font-weight: 800;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.admin-mobile-brand small,
.portal-mobile-brand small {
    margin-top: 0.15rem;
    color: #94a3b8;
    font-size: 0.57rem;
    font-weight: 700;
    letter-spacing: 0.08em;
    text-transform: uppercase;
}

.admin-mobile-mark,
.portal-mobile-mark {
    display: grid;
    width: 2rem;
    height: 2rem;
    place-items: center;
    border-radius: 0.7rem;
    background: linear-gradient(135deg, #6366f1, #c026d3);
    color: #fff;
    font-size: 1rem;
}

.responsive-nav-overlay {
    position: fixed;
    z-index: 130;
    inset: 0;
    width: 100%;
    height: 100%;
    border: 0;
    background: rgba(2, 6, 23, 0.68);
    backdrop-filter: blur(3px);
}

body.responsive-sidebar-open {
    overflow: hidden;
}

html[data-theme="light"] .public-mobile-menu {
    border-color: #dbe3ee;
    background: rgba(255, 255, 255, 0.98);
}

html[data-theme="light"] .public-mobile-links a {
    border-color: #e2e8f0;
    background: #f8fafc;
    color: #334155;
}

html[data-theme="light"] .public-mobile-links a:hover,
html[data-theme="light"] .public-mobile-links a.is-current {
    border-color: #c7d2fe;
    background: #eef2ff;
    color: #3730a3;
}

html[data-theme="light"] .public-mobile-actions {
    border-color: #e2e8f0;
}

html[data-theme="light"] .public-mobile-actions .public-mobile-secondary {
    border-color: #dbe3ee;
    background: #f8fafc;
    color: #334155;
}

html[data-theme="light"] .responsive-menu-button,
html[data-theme="light"] .responsive-sidebar-close,
html[data-theme="light"] .responsive-theme-button {
    border-color: #d5deea;
    background: #f8fafc;
    color: #334155;
}

html[data-theme="light"] .admin-mobile-brand strong,
html[data-theme="light"] .portal-mobile-brand strong {
    color: #0f172a;
}

@media (max-width: 959px) {
    .admin-mobile-topbar,
    .portal-mobile-topbar {
        position: sticky;
        z-index: 120;
        top: 0;
        display: flex;
        min-height: 3.75rem;
        align-items: center;
        gap: 0.7rem;
        padding: 0.55rem 0.85rem;
        border-bottom: 1px solid rgba(148, 163, 184, 0.14);
        background: rgba(9, 13, 22, 0.96);
        box-shadow: 0 8px 22px rgba(2, 6, 23, 0.16);
        backdrop-filter: blur(16px);
    }

    .admin-shell {
        min-height: calc(100dvh - 3.75rem);
        height: auto !important;
        overflow: visible !important;
        flex-direction: column !important;
    }

    .admin-sidebar,
    .portal-sidebar {
        position: fixed !important;
        z-index: 140;
        top: 0;
        bottom: 0;
        left: 0;
        width: min(20rem, 88vw) !important;
        height: 100dvh !important;
        max-height: none !important;
        transform: translateX(-105%);
        transition: transform 220ms cubic-bezier(0.2, 0.75, 0.25, 1), box-shadow 220ms ease;
        border-right: 1px solid rgba(148, 163, 184, 0.2);
        border-bottom: 0;
        box-shadow: none;
        will-change: transform;
    }

    .admin-sidebar.is-open,
    .portal-sidebar.is-open {
        transform: translateX(0);
        box-shadow: 18px 0 48px rgba(2, 6, 23, 0.34);
    }

    .admin-sidebar-main {
        width: 100%;
        overflow-y: auto;
    }

    .admin-content,
    .portal-content {
        width: 100%;
        min-width: 0;
        min-height: calc(100dvh - 3.75rem);
        height: auto !important;
        max-height: none !important;
        overflow: visible !important;
        padding: 1rem !important;
    }

    .portal-app-shell {
        position: relative;
        min-height: calc(100dvh - 3.75rem);
        flex-direction: column !important;
    }

    .portal-sidebar {
        overflow: hidden;
    }

    .portal-sidebar > div:first-child {
        min-height: 0;
        flex: 1 1 auto;
        overflow-y: auto;
        overscroll-behavior: contain;
    }

    .responsive-sidebar-close {
        display: inline-flex;
    }
}

@media (min-width: 960px) {
    .admin-mobile-topbar,
    .portal-mobile-topbar,
    .responsive-nav-overlay,
    .responsive-sidebar-close {
        display: none !important;
    }

    .admin-shell {
        flex-direction: row;
    }

    .admin-sidebar {
        position: relative !important;
        transform: none !important;
        box-shadow: none;
    }

    .portal-app-shell {
        flex-direction: row !important;
    }

    .portal-sidebar {
        position: relative !important;
        width: 16rem !important;
        height: 100vh !important;
        max-height: 100vh !important;
        transform: none !important;
        border-right: 1px solid rgba(30, 41, 59, 0.9);
        border-bottom: 0;
        box-shadow: none;
    }

    .portal-content {
        height: 100vh;
        overflow-y: auto;
    }
}

@media (min-width: 1024px) {
    .public-mobile-menu {
        display: none !important;
    }
}

@media (max-width: 390px) {
    .public-header-row {
        padding-right: 0.7rem;
        padding-left: 0.7rem;
    }

    .public-brand img,
    .public-brand > div {
        width: 2rem;
        height: 2rem;
    }

    .public-brand > span {
        max-width: 8.5rem;
        font-size: 0.92rem;
    }

    .public-header-actions {
        gap: 0.45rem;
    }
}

@media (prefers-reduced-motion: reduce) {
    .admin-sidebar,
    .portal-sidebar,
    .responsive-menu-button,
    .responsive-sidebar-close,
    .responsive-theme-button {
        transition: none;
    }
}

/* Homepage global data-network hero. */
.global-network-hero {
    position: relative;
    overflow: hidden;
    border-bottom: 1px solid rgba(100, 116, 139, 0.2);
    background:
        radial-gradient(ellipse at 50% 64%, rgba(15, 76, 91, 0.2), transparent 44%),
        radial-gradient(ellipse at 84% 0%, rgba(88, 28, 135, 0.19), transparent 32%),
        #070b13;
    color: #f8fafc;
}

.global-network-hero::before,
.global-network-hero::after {
    position: absolute;
    z-index: 0;
    pointer-events: none;
    content: "";
}

.global-network-hero::before {
    top: -20rem;
    left: 50%;
    width: 68rem;
    height: 68rem;
    transform: translateX(-50%);
    border: 1px solid rgba(148, 163, 184, 0.055);
    border-radius: 50%;
    box-shadow: 0 0 0 5rem rgba(148, 163, 184, 0.018), 0 0 0 10rem rgba(148, 163, 184, 0.012);
}

.global-network-hero::after {
    inset: 0;
    opacity: 0.16;
    background-image: radial-gradient(rgba(148, 163, 184, 0.45) 0.55px, transparent 0.7px);
    background-size: 21px 21px;
    mask-image: linear-gradient(to bottom, #000, transparent 88%);
}

.global-network-hero-inner {
    position: relative;
    z-index: 1;
    width: min(100% - 2rem, 1320px);
    margin: 0 auto;
    padding: clamp(0.65rem, 1.8vw, 1.4rem) 0 1.3rem;
}

.global-network-heading {
    display: flex;
    align-items: center;
    flex-direction: column;
    justify-content: center;
    gap: 0.8rem;
    margin: 1rem auto 0;
}

.global-network-copy {
    max-width: 760px;
    text-align: center;
}

.global-network-eyebrow {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 0.55rem;
    margin: 0 0 0.35rem;
    color: #a5b4fc;
    font-size: 0.56rem;
    font-weight: 800;
    letter-spacing: 0.16em;
    text-transform: uppercase;
}

.global-network-eyebrow span,
.network-stage-status i {
    width: 0.45rem;
    height: 0.45rem;
    flex: none;
    border-radius: 50%;
    background: #34d399;
    box-shadow: 0 0 12px rgba(52, 211, 153, 0.7);
}

.global-network-copy h1 {
    max-width: 760px;
    margin: 0;
    color: #f8fafc;
    font-size: clamp(1.3rem, 2.5vw, 1.9rem);
    font-weight: 850;
    letter-spacing: -0.045em;
    line-height: 1.15;
    text-wrap: balance;
}

.global-network-description {
    max-width: 700px;
    margin: 0.35rem auto 0;
    color: #aab6c7;
    font-size: 0.8rem;
    line-height: 1.55;
}

.global-network-actions {
    display: flex;
    align-items: center;
    gap: 0.65rem;
}

.global-network-primary,
.global-network-secondary {
    display: inline-flex;
    min-height: 2.3rem;
    align-items: center;
    justify-content: center;
    gap: 0.55rem;
    border: 1px solid transparent;
    border-radius: 0.8rem;
    padding: 0.55rem 0.85rem;
    font-size: 0.7rem;
    font-weight: 750;
    text-decoration: none;
    transition: transform 160ms ease, background-color 160ms ease, border-color 160ms ease;
}

.global-network-primary {
    background: linear-gradient(115deg, #6258f5, #8b5cf6 55%, #c026d3);
    color: #fff;
    box-shadow: 0 10px 26px rgba(91, 76, 239, 0.28);
}

.global-network-primary:hover {
    transform: translateY(-2px);
    box-shadow: 0 14px 32px rgba(91, 76, 239, 0.38);
}

.global-network-secondary {
    border-color: rgba(148, 163, 184, 0.22);
    background: rgba(15, 23, 42, 0.65);
    color: #dbe4f0;
}

.global-network-secondary:hover {
    border-color: rgba(129, 140, 248, 0.55);
    background: rgba(30, 41, 59, 0.8);
}

.global-network-stage {
    position: relative;
    min-height: clamp(400px, 41vw, 520px);
    overflow: hidden;
    isolation: isolate;
    border: 1px solid rgba(125, 154, 176, 0.19);
    border-radius: 1.3rem;
    background:
        radial-gradient(ellipse at 50% 55%, rgba(9, 52, 62, 0.44), transparent 40%),
        linear-gradient(135deg, rgba(8, 15, 25, 0.96), rgba(5, 10, 18, 0.84));
    box-shadow: inset 0 1px rgba(255, 255, 255, 0.045), 0 22px 60px rgba(0, 0, 0, 0.3);
}

.global-network-stage::before,
.global-network-stage::after {
    position: absolute;
    z-index: -1;
    pointer-events: none;
    content: "";
}

.global-network-stage::before {
    inset: 0;
    background-image:
        linear-gradient(rgba(125, 154, 176, 0.045) 1px, transparent 1px),
        linear-gradient(90deg, rgba(125, 154, 176, 0.045) 1px, transparent 1px);
    background-size: 58px 58px;
    mask-image: radial-gradient(ellipse at center, #000 4%, transparent 82%);
}

.global-network-stage::after {
    top: 10%;
    left: 50%;
    width: min(54vw, 650px);
    aspect-ratio: 1;
    transform: translateX(-50%);
    border: 1px solid rgba(94, 234, 212, 0.1);
    border-radius: 50%;
    box-shadow: 0 0 0 2.7rem rgba(94, 234, 212, 0.025), 0 0 0 5.4rem rgba(94, 234, 212, 0.018);
}

.global-network-grid {
    position: absolute;
    z-index: -1;
    inset: 0;
    background: radial-gradient(ellipse at center, rgba(3, 10, 17, 0) 35%, rgba(3, 8, 15, 0.4) 100%);
}

#global-network-canvas {
    position: absolute;
    inset: 0;
    width: 100%;
    height: 100%;
}

.global-network-stage-label {
    position: absolute;
    z-index: 2;
    top: 1rem;
    left: 50%;
    display: flex;
    align-items: center;
    gap: 0.65rem;
    border: 1px solid rgba(148, 163, 184, 0.14);
    border-radius: 0.65rem;
    background: rgba(7, 13, 22, 0.72);
    padding: 0.5rem 0.65rem;
    color: #cbd5e1;
    font-size: 0.58rem;
    font-weight: 800;
    letter-spacing: 0.08em;
    backdrop-filter: blur(10px);
    transform: translateX(-50%);
}

.global-network-stage-label b {
    margin-left: 0.25rem;
    color: #64748b;
    font-size: 0.54rem;
    font-weight: 700;
}

.network-window-dots {
    display: flex;
    gap: 0.2rem;
}

.network-window-dots i {
    width: 0.35rem;
    height: 0.35rem;
    border-radius: 50%;
    background: #fb7185;
}

.network-window-dots i:nth-child(2) { background: #fbbf24; }
.network-window-dots i:nth-child(3) { background: #34d399; }

.network-stage-status {
    display: inline-flex;
    align-items: center;
    gap: 0.35rem;
    margin-left: 0.3rem;
    color: #6ee7b7;
    font-size: 0.53rem;
}

.network-stage-status i {
    width: 0.34rem;
    height: 0.34rem;
}

.network-callout {
    position: absolute;
    z-index: 2;
    display: flex;
    box-sizing: border-box;
    width: min(12.5rem, 24vw);
    height: 2.65rem;
    min-width: 0;
    align-items: center;
    gap: 0.5rem;
    border: 1px solid color-mix(in srgb, var(--callout-accent) 28%, rgba(148, 163, 184, 0.2));
    border-radius: 0.72rem;
    background: rgba(7, 14, 24, 0.84);
    padding: 0.32rem 0.45rem;
    box-shadow: inset 2px 0 var(--callout-accent), 0 6px 18px rgba(2, 6, 23, 0.17);
    backdrop-filter: blur(12px);
}

.network-callout-left { --callout-accent: #2dd4bf; top: 20%; left: 2%; }
.network-callout-right { --callout-accent: #a78bfa; top: 20%; right: 2%; }
.network-callout-bottom-left { --callout-accent: #f472b6; top: calc(20% + 9rem); left: 2%; }
.network-callout-bottom-right { --callout-accent: #4ade80; top: calc(20% + 9rem); right: 2%; }

.network-callout-icon {
    display: grid;
    width: 1.72rem;
    height: 1.72rem;
    flex: none;
    place-items: center;
    border: 1px solid rgba(45, 212, 191, 0.26);
    border-radius: 0.55rem;
    background: rgba(13, 148, 136, 0.14);
    color: #5eead4;
    font-family: "JetBrains Mono", monospace;
    font-size: 0.6rem;
    font-weight: 800;
}

.network-callout-icon.is-purple {
    border-color: rgba(167, 139, 250, 0.3);
    background: rgba(124, 58, 237, 0.16);
    color: #c4b5fd;
}

.network-callout-icon.is-pink {
    border-color: rgba(244, 114, 182, 0.3);
    background: rgba(190, 24, 93, 0.14);
    color: #f9a8d4;
}

.network-callout-icon.is-green {
    border-color: rgba(74, 222, 128, 0.3);
    background: rgba(22, 163, 74, 0.14);
    color: #86efac;
}

.network-callout > span:nth-child(2) {
    display: grid;
    min-width: 0;
    gap: 0.22rem;
}

.network-callout small {
    overflow: hidden;
    color: #718096;
    font-size: 0.5rem;
    font-weight: 800;
    letter-spacing: 0.12em;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.network-callout strong {
    overflow: hidden;
    color: #e2e8f0;
    font-size: 0.64rem;
    font-weight: 700;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.network-callout-signal {
    width: 0.4rem;
    height: 0.4rem;
    margin-left: auto;
    border-radius: 50%;
    background: #2dd4bf;
    box-shadow: 0 0 12px rgba(45, 212, 191, 0.8);
}

.network-callout-signal.is-purple {
    background: #a78bfa;
    box-shadow: 0 0 12px rgba(167, 139, 250, 0.8);
}

.network-callout-signal.is-pink {
    background: #f472b6;
    box-shadow: 0 0 12px rgba(244, 114, 182, 0.8);
}

.network-callout-signal.is-green {
    background: #4ade80;
    box-shadow: 0 0 12px rgba(74, 222, 128, 0.8);
}

.global-network-stage-caption {
    position: absolute;
    z-index: 2;
    right: 1.2rem;
    bottom: 1rem;
    left: 1.2rem;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 0.7rem;
    color: #64748b;
    font-family: "JetBrains Mono", monospace;
    font-size: 0.5rem;
    font-weight: 700;
    letter-spacing: 0.12em;
}

.global-network-stage-caption i {
    width: 0.22rem;
    height: 0.22rem;
    border-radius: 50%;
    background: #2dd4bf;
}

.network-mobile-tags {
    display: none;
}

@media (max-width: 760px) {
    .global-network-hero-inner {
        width: min(100% - 1.25rem, 1320px);
        padding-top: 0.5rem;
    }

    .global-network-heading {
        align-items: center;
        gap: 0.7rem;
        margin-top: 0.8rem;
    }

    .global-network-copy h1 {
        max-width: 600px;
        font-size: clamp(1.25rem, 5vw, 1.65rem);
        line-height: 1.12;
    }

    .global-network-description {
        margin-top: 0.3rem;
        font-size: 0.75rem;
        line-height: 1.5;
    }

    .global-network-stage {
        min-height: 320px;
        border-radius: 1rem;
    }

    .global-network-stage::after {
        top: 18%;
        width: 88vw;
        max-width: 390px;
    }

    .global-network-eyebrow {
        font-size: 0.5rem;
    }

    .global-network-stage-label {
        top: 0.7rem;
        left: 50%;
        width: max-content;
        max-width: calc(100% - 1.4rem);
        gap: 0.34rem;
        padding: 0.4rem 0.45rem;
        font-size: 0.46rem;
        letter-spacing: 0.04em;
        white-space: nowrap;
        transform: translateX(-50%);
    }

    .network-callout,
    .network-viewer-cards,
    .global-network-stage-caption {
        display: none;
    }

    .global-network-stage-label b {
        margin-left: 0.1rem;
        font-size: 0.41rem;
        letter-spacing: 0.03em;
    }

    .global-network-stage-label .network-stage-status {
        gap: 0.25rem;
        margin-left: 0;
        font-size: 0.43rem;
    }

    .network-mobile-tags {
        position: absolute;
        right: 0.65rem;
        bottom: 0.7rem;
        left: 0.65rem;
        z-index: 2;
        display: flex;
        flex-wrap: wrap;
        justify-content: center;
        gap: 0.35rem;
    }

    .network-mobile-tags span {
        border: 1px solid rgba(148, 163, 184, 0.2);
        border-radius: 999px;
        background: rgba(7, 14, 24, 0.8);
        padding: 0.32rem 0.5rem;
        color: #cbd5e1;
        font-size: 0.55rem;
        font-weight: 700;
        backdrop-filter: blur(8px);
    }
}

@media (max-width: 430px) {
    .global-network-actions {
        width: 100%;
        justify-content: center;
    }

    .global-network-actions a {
        flex: 0 1 9rem;
        padding-right: 0.65rem;
        padding-left: 0.65rem;
    }

    .global-network-stage {
        min-height: 290px;
    }
}

@media (prefers-reduced-motion: reduce) {
    .global-network-primary {
        transition: none;
    }
}

/* Public navigation polish and light-theme treatment for the network hero. */
.public-site-header {
    box-shadow: 0 8px 24px rgba(2, 6, 23, 0.12);
    transition: background-color 180ms ease, border-color 180ms ease;
}

.public-header-row {
    min-height: 4rem;
}

.public-primary-nav {
    border: 1px solid rgba(148, 163, 184, 0.12);
    border-radius: 999px;
    background: rgba(15, 23, 42, 0.46);
    padding: 0.22rem;
}

.public-primary-nav .public-nav-link {
    display: inline-flex;
    min-height: 2.2rem;
    align-items: center;
    justify-content: center;
    gap: 0.42rem;
    border: 1px solid transparent;
    border-radius: 999px;
    padding: 0.42rem 0.66rem;
    color: #cbd5e1;
    font-size: 0.73rem;
    font-weight: 650;
    line-height: 1;
    text-decoration: none;
    white-space: nowrap;
    transition: color 150ms ease, background-color 150ms ease, border-color 150ms ease;
}

.public-primary-nav .public-nav-link:hover,
.public-primary-nav .public-nav-link.is-current {
    border-color: rgba(129, 140, 248, 0.2);
    background: rgba(99, 102, 241, 0.14);
    color: #eef2ff;
}

.public-credits-cta {
    display: inline-flex;
    min-height: 2.45rem;
    align-items: center;
    justify-content: center;
    gap: 0.55rem;
    border: 1px solid rgba(255, 255, 255, 0.22);
    border-radius: 0.75rem;
    background: linear-gradient(125deg, #8b5cf6, #4f46e5);
    padding: 0.62rem 0.9rem;
    color: #fff;
    font-size: 0.76rem;
    font-weight: 800;
    line-height: 1;
    text-decoration: none;
    white-space: nowrap;
    box-shadow: 0 8px 20px rgba(79, 70, 229, 0.26), inset 0 1px rgba(255, 255, 255, 0.17);
    transition: transform 160ms ease, filter 160ms ease, box-shadow 160ms ease;
}

.public-credits-cta:hover,
.public-mobile-actions .public-mobile-credits-cta:hover {
    transform: translateY(-1px);
    filter: brightness(1.08);
    box-shadow: 0 11px 24px rgba(79, 70, 229, 0.32), inset 0 1px rgba(255, 255, 255, 0.2);
}

.public-credits-cta:active,
.public-mobile-actions .public-mobile-credits-cta:active {
    transform: translateY(0);
}

.public-primary-nav .public-nav-viewer {
    color: #d1fae5;
}

.public-primary-nav .public-nav-viewer:hover,
.public-primary-nav .public-nav-viewer.is-current {
    border-color: rgba(45, 212, 191, 0.25);
    background: rgba(13, 148, 136, 0.13);
    color: #a7f3d0;
}

.public-nav-version {
    border: 1px solid rgba(129, 140, 248, 0.24);
    border-radius: 0.32rem;
    background: rgba(99, 102, 241, 0.14);
    padding: 0.16rem 0.3rem;
    color: #c7d2fe;
    font-size: 0.55rem;
    font-weight: 750;
}

.public-nav-status {
    width: 0.42rem;
    height: 0.42rem;
    border-radius: 50%;
    background: #34d399;
    box-shadow: 0 0 0 3px rgba(52, 211, 153, 0.1);
}

.public-original-hero {
    width: min(calc(100% - 1.5rem), 80rem);
    margin: 1.25rem auto;
    border-radius: 1.5rem;
}

html[data-theme="light"] .public-site-header {
    border-color: #e2e8f0;
    background: rgba(255, 255, 255, 0.92);
    box-shadow: 0 8px 24px rgba(15, 23, 42, 0.06);
}

html[data-theme="light"] .public-primary-nav {
    border-color: #e2e8f0;
    background: rgba(248, 250, 252, 0.92);
}

html[data-theme="light"] .public-primary-nav .public-nav-link {
    color: #475569;
}

html[data-theme="light"] .public-primary-nav .public-nav-link:hover,
html[data-theme="light"] .public-primary-nav .public-nav-link.is-current {
    border-color: #dbe3ee;
    background: #eef2ff;
    color: #3730a3;
}

html[data-theme="light"] .public-primary-nav .public-nav-viewer {
    color: #047857;
}

html[data-theme="light"] .public-primary-nav .public-nav-viewer:hover,
html[data-theme="light"] .public-primary-nav .public-nav-viewer.is-current {
    border-color: #a7f3d0;
    background: #ecfdf5;
    color: #065f46;
}

html[data-theme="light"] .global-network-hero {
    border-color: #dbe3ee;
    background:
        radial-gradient(ellipse at 50% 18%, rgba(99, 102, 241, 0.085), transparent 40%),
        linear-gradient(180deg, #f8fafc 0%, #eef2f7 100%);
    color: #0f172a;
}

html[data-theme="light"] .global-network-hero::before {
    border-color: rgba(71, 85, 105, 0.07);
    box-shadow: 0 0 0 5rem rgba(71, 85, 105, 0.025), 0 0 0 10rem rgba(71, 85, 105, 0.015);
}

html[data-theme="light"] .global-network-hero::after {
    opacity: 0.08;
}

html[data-theme="light"] .global-network-copy h1 {
    color: #0f172a;
}

html[data-theme="light"] .global-network-description {
    color: #475569;
}

html[data-theme="light"] .global-network-eyebrow {
    color: #4338ca;
}

html[data-theme="light"] .global-network-secondary {
    border-color: #d1d9e6;
    background: #fff;
    color: #334155;
}

html[data-theme="light"] .global-network-secondary:hover {
    border-color: #a5b4fc;
    background: #f8fafc;
}

@media (max-width: 760px) {
    .public-primary-nav {
        display: none !important;
    }
}

@media (prefers-reduced-motion: reduce) {
    .public-site-header,
    .public-primary-nav .public-nav-link {
        transition: none;
    }
}

.public-announcement-bar {
    border-color: rgba(99, 102, 241, 0.18);
    background: linear-gradient(90deg, rgba(49, 46, 129, 0.92), rgba(67, 56, 202, 0.88), rgba(49, 46, 129, 0.92));
    color: #e0e7ff;
    font-size: 0.68rem;
    letter-spacing: 0.01em;
}

.public-brand img,
.public-brand > div {
    box-shadow: 0 5px 18px rgba(99, 102, 241, 0.2);
}

.public-brand:focus-visible,
.public-primary-nav a:focus-visible,
.public-header-actions a:focus-visible,
.mobile-nav-toggle:focus-visible,
.public-mobile-menu a:focus-visible {
    outline: 2px solid #818cf8;
    outline-offset: 3px;
}

html[data-theme="light"] .public-announcement-bar {
    border-color: #dbeafe;
    background: linear-gradient(90deg, #eef2ff, #e0e7ff, #eef2ff);
    color: #3730a3;
}

.profile-viewer-page {
    flex: 1;
    min-width: 0;
    background: #090d16;
    color: #f1f5f9;
    padding: clamp(2.25rem, 5vw, 4rem) 1rem 4rem;
}

.profile-viewer-shell {
    width: min(100%, 1080px);
    margin: 0 auto;
}

.profile-viewer-heading {
    max-width: 760px;
    margin-bottom: 1.6rem;
}

.profile-viewer-eyebrow {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    margin: 0 0 0.55rem;
    color: #a5b4fc;
    font-size: 0.62rem;
    font-weight: 800;
    letter-spacing: 0.15em;
    text-transform: uppercase;
}

.profile-viewer-eyebrow > span {
    width: 0.42rem;
    height: 0.42rem;
    border-radius: 50%;
    background: #34d399;
    box-shadow: 0 0 10px rgba(52, 211, 153, 0.65);
}

.profile-viewer-heading h1 {
    margin: 0;
    color: #f8fafc;
    font-size: clamp(2rem, 4vw, 3.2rem);
    font-weight: 850;
    letter-spacing: -0.055em;
    line-height: 1.05;
}

.profile-viewer-heading > p:last-child {
    max-width: 650px;
    margin: 0.75rem 0 0;
    color: #aab6c7;
    font-size: 0.92rem;
    line-height: 1.65;
}

.profile-viewer-search,
.profile-viewer-result,
.profile-viewer-media-section {
    border: 1px solid rgba(148, 163, 184, 0.16);
    border-radius: 1.15rem;
    background: linear-gradient(145deg, rgba(17, 24, 39, 0.95), rgba(12, 18, 30, 0.96));
    box-shadow: 0 16px 45px rgba(0, 0, 0, 0.16);
}

.profile-viewer-search {
    display: grid;
    grid-template-columns: minmax(0, 0.8fr) minmax(0, 1.2fr);
    align-items: center;
    gap: 1.5rem;
    padding: clamp(1rem, 3vw, 1.6rem);
}

.profile-viewer-search-copy h2 {
    margin: 0;
    color: #f8fafc;
    font-size: 1.1rem;
    font-weight: 780;
    letter-spacing: -0.025em;
}

.profile-viewer-search-copy p {
    max-width: 25rem;
    margin: 0.45rem 0 0;
    color: #94a3b8;
    font-size: 0.77rem;
    line-height: 1.55;
}

.profile-viewer-form {
    min-width: 0;
}

.profile-viewer-form > label {
    display: block;
    margin-bottom: 0.45rem;
    color: #cbd5e1;
    font-size: 0.68rem;
    font-weight: 700;
}

.profile-viewer-input-row {
    display: flex;
    min-height: 3rem;
    align-items: center;
    gap: 0.6rem;
    overflow: hidden;
    border: 1px solid rgba(148, 163, 184, 0.23);
    border-radius: 0.8rem;
    background: rgba(2, 6, 23, 0.62);
    padding: 0.3rem;
}

.profile-viewer-input-row:focus-within {
    border-color: #818cf8;
    box-shadow: 0 0 0 3px rgba(99, 102, 241, 0.14);
}

.profile-viewer-input-row > span {
    padding-left: 0.55rem;
    color: #64748b;
    font-family: "JetBrains Mono", monospace;
    font-size: 0.9rem;
    font-weight: 700;
}

.profile-viewer-input-row input {
    width: 100%;
    min-width: 0;
    border: 0;
    outline: 0;
    background: transparent;
    color: #f8fafc;
    font-family: "JetBrains Mono", monospace;
    font-size: 0.78rem;
}

.profile-viewer-input-row input::placeholder {
    color: #64748b;
}

.profile-viewer-input-row button {
    display: inline-flex;
    min-height: 2.35rem;
    flex: none;
    align-items: center;
    justify-content: center;
    gap: 0.45rem;
    border: 0;
    border-radius: 0.62rem;
    background: linear-gradient(120deg, #5b5cf0, #8b5cf6);
    padding: 0 0.9rem;
    color: #fff;
    font-size: 0.7rem;
    font-weight: 750;
    cursor: pointer;
    transition: filter 150ms ease, transform 150ms ease;
}

.profile-viewer-input-row button:hover:not(:disabled) {
    filter: brightness(1.1);
    transform: translateY(-1px);
}

.profile-viewer-input-row button:disabled {
    cursor: not-allowed;
    filter: grayscale(0.45);
    opacity: 0.55;
}

.profile-viewer-form-note {
    display: flex;
    flex-wrap: wrap;
    justify-content: space-between;
    gap: 0.35rem 0.8rem;
    margin-top: 0.55rem;
    color: #748196;
    font-size: 0.61rem;
}

.profile-viewer-notice,
.profile-viewer-error,
.profile-viewer-empty {
    border: 1px solid rgba(129, 140, 248, 0.22);
    border-radius: 0.85rem;
    background: rgba(79, 70, 229, 0.08);
    padding: 0.9rem 1rem;
    color: #c7d2fe;
    font-size: 0.78rem;
    line-height: 1.55;
}

.profile-viewer-notice,
.profile-viewer-error {
    margin: 1rem 0 0;
}

.profile-viewer-error {
    border-color: rgba(251, 113, 133, 0.25);
    background: rgba(190, 24, 93, 0.1);
    color: #fecdd3;
}

.profile-viewer-result {
    margin-top: 1.15rem;
    padding: clamp(1rem, 3vw, 1.5rem);
}

.profile-viewer-account {
    display: flex;
    align-items: center;
    gap: 1rem;
}

.profile-viewer-avatar {
    width: 5rem;
    height: 5rem;
    flex: none;
    border: 2px solid rgba(129, 140, 248, 0.45);
    border-radius: 50%;
    background: #1e293b;
    object-fit: cover;
}

.profile-viewer-avatar-fallback {
    display: grid;
    place-items: center;
    color: #c7d2fe;
    font-size: 1.6rem;
    font-weight: 800;
}

.profile-viewer-account-copy {
    min-width: 0;
    flex: 1;
}

.profile-viewer-account-label {
    margin: 0 0 0.25rem;
    color: #94a3b8;
    font-size: 0.62rem;
    font-weight: 700;
    letter-spacing: 0.04em;
    text-transform: uppercase;
}

.profile-viewer-account-copy h2 {
    display: flex;
    align-items: center;
    gap: 0.4rem;
    margin: 0;
    color: #f8fafc;
    font-size: 1.25rem;
    font-weight: 800;
    overflow-wrap: anywhere;
}

.profile-viewer-handle {
    margin: 0.12rem 0 0;
    color: #94a3b8;
    font-family: "JetBrains Mono", monospace;
    font-size: 0.72rem;
}

.profile-viewer-verified {
    display: inline-grid;
    width: 1rem;
    height: 1rem;
    place-items: center;
    border-radius: 50%;
    background: #3b82f6;
    color: white;
    font-size: 0.68rem;
}

.profile-viewer-bio {
    max-width: 46rem;
    margin: 0.7rem 0 0;
    color: #cbd5e1;
    font-size: 0.78rem;
    line-height: 1.6;
    white-space: normal;
    overflow-wrap: anywhere;
}

.profile-viewer-external {
    display: inline-block;
    margin-top: 0.45rem;
    color: #a5b4fc;
    font-size: 0.7rem;
    font-weight: 650;
    overflow-wrap: anywhere;
}

.profile-viewer-instagram-link {
    display: inline-flex;
    flex: none;
    align-items: center;
    justify-content: center;
    border: 1px solid rgba(148, 163, 184, 0.22);
    border-radius: 0.7rem;
    background: rgba(15, 23, 42, 0.7);
    padding: 0.65rem 0.85rem;
    color: #e2e8f0;
    font-size: 0.68rem;
    font-weight: 700;
    text-decoration: none;
}

.profile-viewer-instagram-link:hover {
    border-color: rgba(129, 140, 248, 0.45);
}

.profile-viewer-stats {
    display: grid;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 0.7rem;
    margin: 1.2rem 0 0;
}

.profile-viewer-stats > div {
    border: 1px solid rgba(148, 163, 184, 0.14);
    border-radius: 0.75rem;
    background: rgba(2, 6, 23, 0.38);
    padding: 0.75rem 0.9rem;
}

.profile-viewer-stats dt {
    color: #94a3b8;
    font-size: 0.65rem;
}

.profile-viewer-stats dd {
    margin: 0.25rem 0 0;
    color: #f8fafc;
    font-size: 1.1rem;
    font-weight: 800;
}

.profile-viewer-media-section {
    margin-top: 1.15rem;
    padding: clamp(1rem, 3vw, 1.5rem);
}

.profile-viewer-section-heading {
    display: flex;
    align-items: flex-end;
    justify-content: space-between;
    gap: 1rem;
    margin-bottom: 1rem;
}

.profile-viewer-section-heading .profile-viewer-eyebrow {
    margin-bottom: 0.2rem;
}

.profile-viewer-section-heading h2 {
    margin: 0;
    color: #f8fafc;
    font-size: 1.1rem;
    font-weight: 780;
}

.profile-viewer-section-heading > a {
    color: #a5b4fc;
    font-size: 0.68rem;
    font-weight: 700;
    text-decoration: none;
    white-space: nowrap;
}

.profile-viewer-media-grid {
    display: grid;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 0.8rem;
}

.profile-viewer-media-card {
    overflow: hidden;
    border: 1px solid rgba(148, 163, 184, 0.14);
    border-radius: 0.8rem;
    background: rgba(2, 6, 23, 0.34);
}

.profile-viewer-media-card img,
.profile-viewer-media-placeholder {
    display: block;
    width: 100%;
    aspect-ratio: 1;
    object-fit: cover;
}

.profile-viewer-media-placeholder {
    display: grid;
    place-items: center;
    background: #111827;
    color: #64748b;
    font-size: 0.68rem;
}

.profile-viewer-media-card p {
    display: -webkit-box;
    overflow: hidden;
    -webkit-box-orient: vertical;
    -webkit-line-clamp: 3;
    margin: 0;
    padding: 0.65rem 0.75rem;
    color: #cbd5e1;
    font-size: 0.66rem;
    line-height: 1.5;
}

.profile-viewer-empty {
    margin: 0;
    border-color: rgba(148, 163, 184, 0.16);
    background: rgba(2, 6, 23, 0.28);
    color: #94a3b8;
}

.profile-viewer-footnote {
    max-width: 820px;
    margin: 1rem auto 0;
    color: #748196;
    font-size: 0.66rem;
    line-height: 1.6;
    text-align: center;
}

html[data-theme="light"] .profile-viewer-page {
    background: #f4f7fb;
    color: #0f172a;
}

html[data-theme="light"] .profile-viewer-heading h1,
html[data-theme="light"] .profile-viewer-search-copy h2,
html[data-theme="light"] .profile-viewer-account-copy h2,
html[data-theme="light"] .profile-viewer-stats dd,
html[data-theme="light"] .profile-viewer-section-heading h2 {
    color: #0f172a;
}

html[data-theme="light"] .profile-viewer-eyebrow {
    color: #4338ca;
}

html[data-theme="light"] .profile-viewer-heading > p:last-child,
html[data-theme="light"] .profile-viewer-search-copy p,
html[data-theme="light"] .profile-viewer-account-label,
html[data-theme="light"] .profile-viewer-handle,
html[data-theme="light"] .profile-viewer-stats dt,
html[data-theme="light"] .profile-viewer-footnote {
    color: #64748b;
}

html[data-theme="light"] .profile-viewer-search,
html[data-theme="light"] .profile-viewer-result,
html[data-theme="light"] .profile-viewer-media-section {
    border-color: #dbe3ee;
    background: linear-gradient(145deg, #fff, #f8fafc);
    box-shadow: 0 14px 36px rgba(15, 23, 42, 0.06);
}

html[data-theme="light"] .profile-viewer-form > label,
html[data-theme="light"] .profile-viewer-bio {
    color: #334155;
}

html[data-theme="light"] .profile-viewer-input-row {
    border-color: #cbd5e1;
    background: #fff;
}

html[data-theme="light"] .profile-viewer-input-row input {
    color: #0f172a;
}

html[data-theme="light"] .profile-viewer-form-note {
    color: #64748b;
}

html[data-theme="light"] .profile-viewer-notice {
    border-color: #c7d2fe;
    background: #eef2ff;
    color: #3730a3;
}

html[data-theme="light"] .profile-viewer-error {
    border-color: #fecdd3;
    background: #fff1f2;
    color: #9f1239;
}

html[data-theme="light"] .profile-viewer-instagram-link {
    border-color: #dbe3ee;
    background: #f8fafc;
    color: #334155;
}

html[data-theme="light"] .profile-viewer-stats > div,
html[data-theme="light"] .profile-viewer-media-card {
    border-color: #e2e8f0;
    background: #fff;
}

html[data-theme="light"] .profile-viewer-media-card p {
    color: #475569;
}

html[data-theme="light"] .profile-viewer-media-placeholder {
    background: #f1f5f9;
    color: #64748b;
}

html[data-theme="light"] .profile-viewer-empty {
    border-color: #e2e8f0;
    background: #f8fafc;
    color: #64748b;
}

@media (max-width: 760px) {
    .profile-viewer-page {
        padding: 2rem 0.85rem 3rem;
    }

    .profile-viewer-search {
        grid-template-columns: minmax(0, 1fr);
        gap: 1rem;
    }

    .profile-viewer-account {
        align-items: flex-start;
        flex-wrap: wrap;
    }

    .profile-viewer-account-copy {
        flex-basis: calc(100% - 6.5rem);
    }

    .profile-viewer-instagram-link {
        margin-left: 6rem;
    }

    .profile-viewer-media-grid {
        grid-template-columns: repeat(2, minmax(0, 1fr));
    }
}

@media (max-width: 430px) {
    .profile-viewer-input-row {
        flex-wrap: wrap;
        padding: 0.45rem;
    }

    .profile-viewer-input-row input {
        width: calc(100% - 2.2rem);
        min-height: 2.5rem;
        flex: 1 1 calc(100% - 2.2rem);
    }

    .profile-viewer-input-row button {
        width: 100%;
    }

    .profile-viewer-account {
        gap: 0.7rem;
    }

    .profile-viewer-avatar {
        width: 3.8rem;
        height: 3.8rem;
    }

    .profile-viewer-account-copy {
        flex-basis: calc(100% - 4.6rem);
    }

    .profile-viewer-instagram-link {
        margin-left: 0;
    }

    .profile-viewer-stats {
        gap: 0.45rem;
    }

    .profile-viewer-stats > div {
        padding: 0.65rem;
    }

    .profile-viewer-stats dd {
        font-size: 0.95rem;
    }

    .profile-viewer-media-grid {
        gap: 0.55rem;
    }
}

.home-hero-actions {
    gap: 0.65rem;
}

.home-hero-cta {
    position: relative;
    isolation: isolate;
    min-height: 2.35rem;
    justify-content: center;
    border-radius: 0.78rem;
    line-height: 1.2;
    text-align: center;
    text-decoration: none;
    transition: transform 170ms ease, box-shadow 170ms ease, filter 170ms ease;
}

.home-cta-primary {
    border: 1px solid transparent;
    background: linear-gradient(115deg, #5b5cf0 0%, #8b5cf6 32%, #d946ef 66%, #0891b2 100%);
    background-size: 220% 220%;
    animation: home-cta-gradient-flow 5s ease-in-out infinite;
    box-shadow: 0 9px 24px rgba(99, 102, 241, 0.25);
}

.home-cta-secondary {
    border-color: rgba(148, 163, 184, 0.22);
    background: rgba(15, 23, 42, 0.76);
    color: #e2e8f0;
}

.home-hero-cta:hover {
    transform: translateY(-2px);
    filter: brightness(1.08);
}

.home-cta-primary:hover {
    box-shadow: 0 13px 30px rgba(139, 92, 246, 0.36);
}

.home-cta-secondary:hover {
    border-color: rgba(129, 140, 248, 0.42);
    color: #fff;
}

html[data-theme="light"] .public-original-hero .home-cta-secondary {
    border-color: #d5deeb;
    background: #fff;
    color: #334155;
}

html[data-theme="light"] .public-original-hero .home-cta-secondary:hover {
    border-color: #a5b4fc;
    background: #f8fafc;
    color: #312e81;
}

@keyframes home-cta-gradient-flow {
    0%, 100% { background-position: 0% 50%; }
    50% { background-position: 100% 50%; }
}

@media (max-width: 430px) {
    .home-hero-actions {
        gap: 0.55rem;
    }

    .home-hero-cta {
        min-height: 2.15rem;
        padding-right: 0.8rem;
        padding-left: 0.8rem;
        font-size: 0.68rem;
    }
}

@media (prefers-reduced-motion: reduce) {
    .home-cta-primary {
        animation: none;
        background-position: 50% 50%;
    }

    .home-hero-cta {
        transition: none;
    }
}

.global-network-actions {
    flex-wrap: wrap;
    justify-content: center;
    max-width: 100%;
}

.global-network-actions a {
    white-space: nowrap;
}

.network-viewer-cards {
    position: absolute;
    z-index: 3;
    inset: 0;
    pointer-events: none;
}

.network-viewer-card-top-left { top: calc(20% + 3rem); left: 2%; }
.network-viewer-card-top-right { top: calc(20% + 3rem); right: 2%; }
.network-viewer-card-free-credits { top: calc(20% + 6rem); left: 2%; }
.network-viewer-card-free-api { top: calc(20% + 6rem); right: 2%; }
.network-viewer-card-bottom-left { top: calc(20% + 12rem); left: 2%; }
.network-viewer-card-bottom-right { top: calc(20% + 12rem); right: 2%; }
.network-viewer-card-sdks { top: calc(20% + 15rem); left: 2%; }
.network-viewer-card-uptime { top: calc(20% + 15rem); right: 2%; }
.network-viewer-card-saver-stories { top: calc(20% + 18rem); left: 2%; }
.network-viewer-card-saver-reels { top: calc(20% + 18rem); right: 2%; }
.network-viewer-card-topup { top: calc(20% + 21rem); left: 2%; }
.network-viewer-card-pricing { top: calc(20% + 21rem); right: 2%; }

.network-viewer-card.is-purple { --viewer-accent: #a78bfa; }
.network-viewer-card.is-pink { --viewer-accent: #f472b6; }
.network-viewer-card.is-blue { --viewer-accent: #60a5fa; }
.network-viewer-card.is-amber { --viewer-accent: #fbbf24; }
.network-viewer-card.is-green { --viewer-accent: #4ade80; }

.network-viewer-icon {
    display: grid;
    width: 1.72rem;
    height: 1.72rem;
    flex: none;
    place-items: center;
    border: 1px solid color-mix(in srgb, var(--viewer-accent) 42%, transparent);
    border-radius: 0.55rem;
    background: color-mix(in srgb, var(--viewer-accent) 14%, transparent);
    color: var(--viewer-accent);
    font-size: 0.65rem;
    font-weight: 850;
}

.network-viewer-card {
    position: absolute;
    display: flex;
    box-sizing: border-box;
    width: min(12.5rem, 24vw);
    height: 2.65rem;
    min-width: 0;
    align-items: center;
    gap: 0.5rem;
    border: 1px solid rgba(148, 163, 184, 0.19);
    border-radius: 0.72rem;
    background: rgba(7, 14, 24, 0.82);
    padding: 0.32rem 0.45rem;
    box-shadow: inset 2px 0 var(--viewer-accent), 0 6px 18px rgba(2, 6, 23, 0.17);
    backdrop-filter: blur(12px);
    transition: transform 180ms ease, border-color 180ms ease, box-shadow 180ms ease;
}

.network-viewer-card:hover {
    transform: translateY(-2px);
    border-color: color-mix(in srgb, var(--viewer-accent) 52%, rgba(148, 163, 184, 0.3));
    box-shadow: inset 2px 0 var(--viewer-accent), 0 9px 22px rgba(2, 6, 23, 0.23);
}

.network-viewer-card > span:last-child {
    display: grid;
    min-width: 0;
    gap: 0.22rem;
}

.network-viewer-card strong {
    overflow: hidden;
    color: #f1f5f9;
    font-size: 0.62rem;
    font-weight: 800;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.network-viewer-card small {
    overflow: hidden;
    color: #94a3b8;
    font-size: 0.51rem;
    line-height: 1.35;
    text-overflow: ellipsis;
    white-space: nowrap;
}

@media (min-width: 761px) and (max-width: 1279px) {
    .global-network-stage {
        min-height: 520px;
    }
}

dialog.campaign-confirm-dialog {
    width: min(30rem, calc(100vw - 2rem));
    max-width: none;
    max-height: min(88vh, 34rem);
    margin: auto;
    overflow: auto;
    border: 1px solid rgba(129, 140, 248, 0.32);
    border-radius: 1.15rem;
    padding: 0;
    color: #e2e8f0;
    background:
        radial-gradient(circle at 100% 0, rgba(99, 102, 241, 0.2), transparent 38%),
        #101827;
    box-shadow: 0 28px 90px rgba(2, 6, 23, 0.56);
}

dialog.campaign-confirm-dialog::backdrop {
    background: rgba(2, 6, 23, 0.72);
    backdrop-filter: blur(5px);
}

.campaign-confirm-card {
    display: grid;
    gap: 0.8rem;
    padding: 1.45rem;
}

.campaign-confirm-kicker {
    color: #a5b4fc;
    font-size: 0.62rem;
    font-weight: 850;
    letter-spacing: 0.14em;
    text-transform: uppercase;
}

.campaign-confirm-card h2 {
    margin: 0;
    color: #f8fafc;
    font-size: 1.18rem;
    font-weight: 850;
    line-height: 1.25;
}

.campaign-confirm-card p {
    margin: 0;
    color: #aab7ca;
    font-size: 0.82rem;
    line-height: 1.6;
}

.campaign-confirm-actions {
    display: flex;
    justify-content: flex-end;
    gap: 0.6rem;
    margin-top: 0.4rem;
}

.campaign-confirm-actions button {
    min-height: 2.45rem;
    border: 1px solid transparent;
    border-radius: 0.72rem;
    padding: 0.62rem 0.95rem;
    font: inherit;
    font-size: 0.75rem;
    font-weight: 800;
    cursor: pointer;
    transition: background-color 160ms ease, border-color 160ms ease, transform 160ms ease;
}

.campaign-confirm-actions button:hover {
    transform: translateY(-1px);
}

.campaign-confirm-cancel {
    border-color: rgba(148, 163, 184, 0.24) !important;
    color: #cbd5e1;
    background: rgba(30, 41, 59, 0.72);
}

.campaign-confirm-cancel:hover {
    background: rgba(51, 65, 85, 0.78);
}

.campaign-confirm-accept {
    color: #fff;
    background: linear-gradient(120deg, #4f46e5, #9333ea);
    box-shadow: 0 8px 20px rgba(79, 70, 229, 0.25);
}

.campaign-confirm-accept.is-danger {
    background: linear-gradient(120deg, #e11d48, #be123c);
    box-shadow: 0 8px 20px rgba(225, 29, 72, 0.2);
}

.campaign-confirm-actions button:focus-visible {
    outline: 2px solid #a5b4fc;
    outline-offset: 3px;
}

html[data-theme="light"] dialog.campaign-confirm-dialog {
    border-color: #dbe3ee;
    color: #172033;
    background:
        radial-gradient(circle at 100% 0, rgba(99, 102, 241, 0.1), transparent 38%),
        #fff;
    box-shadow: 0 28px 90px rgba(15, 23, 42, 0.28);
}

html[data-theme="light"] dialog.campaign-confirm-dialog::backdrop {
    background: rgba(15, 23, 42, 0.52);
}

html[data-theme="light"] .campaign-confirm-card h2 {
    color: #172033;
}

html[data-theme="light"] .campaign-confirm-card p {
    color: #536176;
}

html[data-theme="light"] .campaign-confirm-cancel {
    border-color: #d7dfeb !important;
    color: #334155;
    background: #f1f5f9;
}

@media (max-width: 640px) {
    .campaign-confirm-card {
        padding: 1.15rem;
    }

    .campaign-confirm-actions {
        flex-direction: column-reverse;
    }

    .campaign-confirm-actions button {
        width: 100%;
    }
}

html[data-theme="light"] .global-network-stage {
    border-color: #d4deea;
    background:
        radial-gradient(ellipse at 50% 54%, rgba(45, 212, 191, 0.12), transparent 47%),
        radial-gradient(ellipse at 82% 8%, rgba(167, 139, 250, 0.12), transparent 34%),
        linear-gradient(135deg, #f8fbff 0%, #eef4fa 55%, #f8fafc 100%);
    box-shadow: inset 0 1px rgba(255, 255, 255, 0.9), 0 18px 42px rgba(15, 23, 42, 0.09);
}

html[data-theme="light"] .global-network-stage::before {
    background-image:
        linear-gradient(rgba(100, 116, 139, 0.075) 1px, transparent 1px),
        linear-gradient(90deg, rgba(100, 116, 139, 0.075) 1px, transparent 1px);
}

html[data-theme="light"] .global-network-stage::after {
    border-color: rgba(13, 148, 136, 0.15);
    box-shadow: 0 0 0 2.7rem rgba(13, 148, 136, 0.035), 0 0 0 5.4rem rgba(79, 70, 229, 0.025);
}

html[data-theme="light"] .global-network-grid {
    background: radial-gradient(ellipse at center, rgba(255, 255, 255, 0) 42%, rgba(203, 213, 225, 0.2) 100%);
}

html[data-theme="light"] .global-network-stage-label {
    border-color: #dbe3ee;
    background: rgba(255, 255, 255, 0.88);
    color: #334155;
    box-shadow: 0 4px 14px rgba(15, 23, 42, 0.06);
}

html[data-theme="light"] .global-network-stage-label b {
    color: #64748b;
}

html[data-theme="light"] .network-stage-status {
    color: #047857;
}

html[data-theme="light"] .network-callout {
    border-color: color-mix(in srgb, var(--callout-accent) 30%, #dbe3ee);
    background: rgba(255, 255, 255, 0.9);
    box-shadow: inset 2px 0 var(--callout-accent), 0 5px 15px rgba(15, 23, 42, 0.08);
}

html[data-theme="light"] .network-callout strong {
    color: #1e293b;
}

html[data-theme="light"] .network-callout small {
    color: #64748b;
}

html[data-theme="light"] .network-callout-icon {
    border-color: #99f6e4;
    background: #ecfdf5;
    color: #0f766e;
}

html[data-theme="light"] .network-callout-icon.is-purple {
    border-color: #ddd6fe;
    background: #f5f3ff;
    color: #6d28d9;
}

html[data-theme="light"] .network-callout-icon.is-pink {
    border-color: #fbcfe8;
    background: #fdf2f8;
    color: #be185d;
}

html[data-theme="light"] .network-callout-icon.is-green {
    border-color: #bbf7d0;
    background: #f0fdf4;
    color: #15803d;
}

html[data-theme="light"] .global-network-stage-caption {
    color: #475569;
}

html[data-theme="light"] .network-viewer-card {
    border-color: #dbe3ee;
    background: rgba(255, 255, 255, 0.9);
    box-shadow: inset 2px 0 var(--viewer-accent), 0 5px 15px rgba(15, 23, 42, 0.08);
}

html[data-theme="light"] .network-viewer-card:hover {
    box-shadow: inset 2px 0 var(--viewer-accent), 0 8px 18px rgba(15, 23, 42, 0.12);
}

html[data-theme="light"] .network-viewer-card strong {
    color: #172033;
}

html[data-theme="light"] .network-viewer-card small {
    color: #58677e;
}

.hero-link-list {
    display: grid;
    gap: 0.7rem;
}

.hero-link-row {
    display: grid;
    grid-template-columns: minmax(0, 1fr) auto;
    align-items: end;
    gap: 0.8rem;
    border: 1px solid rgba(148, 163, 184, 0.14);
    border-radius: 0.85rem;
    background: rgba(2, 6, 23, 0.26);
    padding: 0.8rem;
}

.hero-link-row-fields {
    display: grid;
    min-width: 0;
    grid-template-columns: minmax(0, 0.8fr) minmax(0, 1.2fr);
    gap: 0.75rem;
}

.hero-link-row-fields.is-hero {
    grid-template-columns: minmax(0, 0.85fr) minmax(0, 1.25fr) minmax(110px, 0.7fr);
}

.hero-link-row-fields label {
    display: grid;
    min-width: 0;
    gap: 0.38rem;
}

.hero-link-row-fields label > span {
    color: #cbd5e1;
    font-size: 0.66rem;
    font-weight: 700;
}

.hero-link-row-actions {
    display: flex;
    align-items: center;
    justify-content: flex-end;
    gap: 0.7rem;
}

.hero-link-enabled {
    display: inline-flex;
    align-items: center;
    gap: 0.38rem;
    color: #cbd5e1;
    font-size: 0.67rem;
    font-weight: 700;
    white-space: nowrap;
}

.hero-link-enabled input[type="checkbox"] {
    accent-color: #6366f1;
}

html[data-theme="light"] .hero-link-row {
    border-color: #d7dfeb;
    background: #f1f5f9;
}

html[data-theme="light"] .hero-link-row-fields label > span,
html[data-theme="light"] .hero-link-enabled {
    color: #334155;
}

html[data-theme="light"] .hero-link-row .portal-form-field {
    border-color: #cbd5e1;
    background: #fff;
    color: #0f172a;
}

html[data-theme="light"] .hero-link-row .portal-form-field::placeholder {
    color: #64748b;
}

html[data-theme="light"] .hero-link-row .admin-action-button-danger {
    border-color: #fecdd3;
    background: #fff1f2;
    color: #be123c;
}

@media (max-width: 760px) {
    .network-viewer-cards {
        display: none;
    }

    .hero-link-row {
        grid-template-columns: minmax(0, 1fr);
        align-items: stretch;
    }

    .hero-link-row-fields,
    .hero-link-row-fields.is-hero {
        grid-template-columns: minmax(0, 1fr);
    }

    .hero-link-row-actions {
        justify-content: space-between;
    }
}

html[data-theme="light"] .public-brand > span {
    color: #0f172a;
}

html[data-theme="light"] .public-primary-nav .public-nav-link,
html[data-theme="light"] .public-primary-nav .public-nav-viewer,
html[data-theme="light"] .public-primary-nav .public-nav-link:hover,
html[data-theme="light"] .public-primary-nav .public-nav-link.is-current,
html[data-theme="light"] .public-primary-nav .public-nav-viewer:hover,
html[data-theme="light"] .public-primary-nav .public-nav-viewer.is-current {
    color: #0f172a;
}

html[data-theme="light"] .public-header-actions a:not(.accent-btn) {
    color: #0f172a;
}

html[data-theme="light"] .public-mobile-links a,
html[data-theme="light"] .public-mobile-links a:hover,
html[data-theme="light"] .public-mobile-links a.is-current {
    color: #0f172a;
}

.public-original-hero {
    border-color: rgba(129, 140, 248, 0.24);
    background:
        radial-gradient(ellipse at 88% 18%, rgba(99, 102, 241, 0.13), transparent 35%),
        linear-gradient(135deg, #111827 0%, #0f172a 68%, #111827 100%);
    box-shadow: 0 22px 54px rgba(2, 6, 23, 0.16);
}

.public-accounts-title {
    max-width: 24ch;
    letter-spacing: -0.055em;
}

.public-accounts-copy {
    max-width: 58ch;
}

@media (min-width: 640px) {
    .public-accounts-accent {
        white-space: nowrap;
    }
}

.public-accounts-metrics {
    border-color: rgba(148, 163, 184, 0.2);
}

.public-accounts-terminal {
    position: relative;
    border-color: rgba(148, 163, 184, 0.2);
    background:
        radial-gradient(ellipse at 92% 0, rgba(99, 102, 241, 0.12), transparent 42%),
        linear-gradient(155deg, #111827 0%, #0b1220 76%, #101827 100%);
    box-shadow: 0 22px 52px rgba(2, 6, 23, 0.28), inset 0 1px rgba(255, 255, 255, 0.035);
}

.public-accounts-terminal-head {
    position: relative;
    min-height: 3.45rem;
    gap: 0.75rem;
    background: linear-gradient(100deg, rgba(15, 23, 42, 0.98), rgba(17, 24, 39, 0.9));
}

.public-accounts-terminal-head > div:first-child {
    display: flex;
    min-width: 0;
    align-items: center;
    gap: 0.42rem;
}

.public-accounts-terminal-title {
    overflow: hidden;
    color: #e2e8f0;
    font-size: 0.72rem;
    font-weight: 750;
    letter-spacing: 0.015em;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.public-accounts-request-label {
    display: inline-flex;
    flex: none;
    align-items: center;
    border-radius: 999px;
    padding: 0.32rem 0.58rem;
    font-weight: 750;
    letter-spacing: 0.025em;
}

.public-accounts-terminal-code {
    display: grid;
    gap: 0.95rem;
    background:
        radial-gradient(ellipse at 100% 0, rgba(99, 102, 241, 0.07), transparent 42%),
        #0b101b;
    padding: 1.2rem;
}

.public-accounts-terminal-code > div:first-child {
    color: #94a3b8;
    font-size: 0.68rem;
    letter-spacing: 0.01em;
}

.public-accounts-terminal-command {
    display: block;
    margin: 0;
    border: 1px solid rgba(129, 140, 248, 0.19);
    border-radius: 0.82rem;
    background: rgba(2, 6, 23, 0.72);
    padding: 0.92rem 1rem;
    color: #c4b5fd;
    font-size: 0.72rem;
    box-shadow: inset 0 1px rgba(255, 255, 255, 0.035), 0 8px 20px rgba(2, 6, 23, 0.14);
}

.public-accounts-terminal-code > div.border-t {
    border-color: rgba(148, 163, 184, 0.18);
    padding-top: 0.85rem;
}

.public-accounts-terminal-code > div:last-child {
    border-left: 2px solid #34d399;
    padding-left: 0.72rem;
    color: #86efac;
    font-size: 0.68rem;
    line-height: 1.55;
}

@media (max-width: 540px) {
    .public-accounts-terminal-head {
        flex-wrap: wrap;
        justify-content: flex-start;
    }

    .public-accounts-request-label {
        margin-left: 1.65rem;
    }

    .public-accounts-terminal-code {
        padding: 0.9rem;
    }
}

html[data-theme="light"] .public-original-hero {
    border-color: #d7e0ec;
    background:
        radial-gradient(ellipse at 90% 8%, rgba(99, 102, 241, 0.1), transparent 38%),
        radial-gradient(ellipse at 8% 92%, rgba(45, 212, 191, 0.07), transparent 34%),
        linear-gradient(135deg, #ffffff 0%, #f8fafc 58%, #eef2ff 100%);
    box-shadow: 0 20px 52px rgba(15, 23, 42, 0.08);
}

html[data-theme="light"] .public-accounts-badge {
    border-color: #c7d2fe;
    background: #eef2ff;
    color: #312e81;
}

html[data-theme="light"] .public-accounts-title {
    color: #0f172a;
}

html[data-theme="light"] .public-accounts-copy {
    color: #475569;
}

html[data-theme="light"] .public-accounts-metrics {
    border-color: #dbe3ee;
}

html[data-theme="light"] .public-accounts-metric-value {
    color: #111827;
}

html[data-theme="light"] .public-accounts-metric-value.is-green {
    color: #047857;
}

html[data-theme="light"] .public-accounts-metric-value.is-indigo {
    color: #4338ca;
}

html[data-theme="light"] .public-accounts-metric-label {
    color: #64748b;
}

html[data-theme="light"] .public-accounts-terminal {
    border-color: #d7e0ec;
    background:
        radial-gradient(ellipse at 92% 0, rgba(99, 102, 241, 0.08), transparent 42%),
        linear-gradient(155deg, #fff 0%, #f8fafc 76%, #f1f5f9 100%);
    box-shadow: 0 18px 42px rgba(15, 23, 42, 0.1), inset 0 1px rgba(255, 255, 255, 0.8);
}

html[data-theme="light"] .public-accounts-terminal-head {
    border-color: #e2e8f0;
    background: linear-gradient(100deg, #f8fafc, #eef2ff);
}

html[data-theme="light"] .public-accounts-terminal-title {
    color: #172033;
}

html[data-theme="light"] .public-accounts-terminal-head .text-slate-400 {
    color: #475569;
}

html[data-theme="light"] .public-accounts-request-label {
    border-color: #c7d2fe;
    background: #eef2ff;
    color: #3730a3;
}

html[data-theme="light"] .public-accounts-terminal-code {
    background:
        radial-gradient(ellipse at 100% 0, rgba(99, 102, 241, 0.05), transparent 42%),
        #fff;
}

html[data-theme="light"] .public-accounts-terminal-command {
    border-color: #dbe3ee;
    background: rgba(248, 250, 252, 0.94);
    color: #4338ca;
    box-shadow: inset 0 1px rgba(255, 255, 255, 0.9), 0 6px 15px rgba(15, 23, 42, 0.045);
}

html[data-theme="light"] .public-accounts-terminal-code > div {
    color: #64748b;
}

html[data-theme="light"] .public-accounts-terminal-code pre {
    color: #4338ca;
}

html[data-theme="light"] .public-accounts-terminal-code > div.border-t {
    border-color: #e2e8f0;
}

html[data-theme="light"] .public-accounts-terminal-code > div:last-child {
    color: #047857;
}

.ads-bulk-controls {
    border-color: rgba(129, 140, 248, 0.2);
    background:
        radial-gradient(ellipse at 90% 0%, rgba(99, 102, 241, 0.1), transparent 42%),
        rgba(15, 23, 42, 0.72);
}

.ad-slot-toggle {
    position: relative;
    display: inline-flex;
    min-height: 2.5rem;
    align-items: center;
    gap: 0.6rem;
    border: 1px solid rgba(148, 163, 184, 0.2);
    border-radius: 999px;
    background: rgba(2, 6, 23, 0.35);
    padding: 0.35rem 0.75rem 0.35rem 0.45rem;
    cursor: pointer;
    user-select: none;
}

.ad-slot-toggle-input {
    position: absolute;
    width: 1px;
    height: 1px;
    overflow: hidden;
    clip: rect(0, 0, 0, 0);
    white-space: nowrap;
    clip-path: inset(50%);
}

.ad-slot-toggle-track {
    display: inline-flex;
    width: 2.35rem;
    height: 1.3rem;
    flex: none;
    align-items: center;
    border: 1px solid rgba(148, 163, 184, 0.28);
    border-radius: 999px;
    background: #334155;
    padding: 0.12rem;
    transition: background-color 160ms ease, border-color 160ms ease;
}

.ad-slot-toggle-track > span {
    width: 0.95rem;
    height: 0.95rem;
    border-radius: 50%;
    background: #e2e8f0;
    box-shadow: 0 1px 3px rgba(2, 6, 23, 0.35);
    transition: transform 160ms ease, background-color 160ms ease;
}

.ad-slot-toggle-input:checked + .ad-slot-toggle-track {
    border-color: #059669;
    background: #059669;
}

.ad-slot-toggle-input:checked + .ad-slot-toggle-track > span {
    background: #fff;
    transform: translateX(1rem);
}

.ad-slot-toggle-input:focus-visible + .ad-slot-toggle-track {
    outline: 2px solid #818cf8;
    outline-offset: 3px;
}

.ad-slot-toggle-label {
    min-width: 3.3rem;
    color: #94a3b8;
    font-size: 0.7rem;
    font-weight: 750;
    text-align: center;
}

.ad-slot-toggle-input:checked ~ .ad-slot-toggle-label {
    color: #6ee7b7;
}

.ads-save-bar {
    position: sticky;
    z-index: 20;
    bottom: 0.65rem;
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 1rem;
    border: 1px solid rgba(129, 140, 248, 0.22);
    border-radius: 1rem;
    background: rgba(10, 15, 28, 0.94);
    padding: 0.75rem 0.9rem;
    box-shadow: 0 14px 34px rgba(2, 6, 23, 0.35);
    backdrop-filter: blur(14px);
}

.ads-save-bar > span {
    color: #aab6c7;
    font-size: 0.7rem;
    line-height: 1.45;
}

html[data-theme="light"] .ads-bulk-controls {
    border-color: #dbe3ee;
    background: linear-gradient(135deg, #fff, #f8fafc 68%, #eef2ff);
}

html[data-theme="light"] .ad-slot-toggle {
    border-color: #dbe3ee;
    background: #f8fafc;
}

html[data-theme="light"] .ad-slot-toggle-track {
    border-color: #cbd5e1;
    background: #cbd5e1;
}

html[data-theme="light"] .ad-slot-toggle-track > span {
    background: #fff;
}

html[data-theme="light"] .ad-slot-toggle-label {
    color: #64748b;
}

html[data-theme="light"] .ad-slot-toggle-input:checked ~ .ad-slot-toggle-label {
    color: #047857;
}

html[data-theme="light"] .ads-save-bar {
    border-color: #dbe3ee;
    background: rgba(255, 255, 255, 0.96);
    box-shadow: 0 12px 32px rgba(15, 23, 42, 0.14);
}

html[data-theme="light"] .ads-save-bar > span {
    color: #475569;
}

@media (max-width: 600px) {
    .ads-save-bar {
        align-items: stretch;
        flex-direction: column;
    }

    .ads-save-bar > button {
        width: 100%;
    }
}

/* Public viewer and journal refinements; build on their shared page systems. */
.profile-viewer-page {
    background:
        radial-gradient(ellipse at 50% 8%, rgba(99, 102, 241, 0.16), transparent 38rem),
        radial-gradient(ellipse at 90% 42%, rgba(34, 211, 238, 0.065), transparent 30rem),
        repeating-linear-gradient(0deg, transparent 0 47px, rgba(148, 163, 184, 0.045) 47px 48px),
        repeating-linear-gradient(90deg, transparent 0 47px, rgba(148, 163, 184, 0.045) 47px 48px),
        #0d1320;
}

.profile-viewer-heading {
    max-width: 54rem;
    margin: 0 auto clamp(2rem, 5vw, 3.5rem);
    text-align: center;
}

.profile-viewer-eyebrow {
    justify-content: center;
    gap: 0.65rem;
}

.profile-viewer-eyebrow > span {
    width: 1.25rem;
    height: 1px;
    border-radius: 0;
    background: linear-gradient(90deg, transparent, #818cf8);
    box-shadow: none;
}

.profile-viewer-heading > p:last-child {
    margin-inline: auto;
}

.profile-viewer-search {
    width: min(100%, 48rem);
    grid-template-columns: minmax(0, 1fr);
    gap: 1.15rem;
    margin-inline: auto;
    padding: clamp(1.2rem, 3.5vw, 2rem);
    background:
        radial-gradient(ellipse at 50% 0, rgba(99, 102, 241, 0.1), transparent 65%),
        linear-gradient(145deg, rgba(17, 24, 39, 0.97), rgba(12, 18, 30, 0.98));
    text-align: center;
}

.profile-viewer-search-copy h2 {
    margin-top: 0.4rem;
    font-size: clamp(1.35rem, 3vw, 1.8rem);
    letter-spacing: -0.035em;
}

.profile-viewer-search-copy .profile-viewer-search-kicker {
    margin: 0;
    color: #a5b4fc;
    font-size: 0.62rem;
    font-weight: 800;
    letter-spacing: 0.15em;
    text-transform: uppercase;
}

.profile-viewer-search-copy p {
    max-width: 34rem;
    margin: 0.45rem auto 0;
}

.profile-viewer-form { text-align: left; }
.profile-viewer-form-note { justify-content: center; gap: 0.55rem 1.25rem; }
.profile-viewer-form-note span { display: inline-flex; align-items: center; gap: 0.45rem; }
.profile-viewer-form-note i { width: 0.36rem; height: 0.36rem; border-radius: 50%; background: #5ee0b2; }

.profile-viewer-home-links {
    width: min(100%, 48rem);
    margin: 1rem auto 0;
    padding: 0.9rem 1rem 1rem;
    border: 1px solid rgba(129, 140, 248, 0.2);
    border-radius: 1rem;
    background: rgba(15, 23, 42, 0.68);
}

.profile-viewer-home-links-label {
    margin: 0 0 0.65rem;
    color: #94a3b8;
    font-size: 0.62rem;
    font-weight: 800;
    letter-spacing: 0.14em;
    text-align: center;
    text-transform: uppercase;
}

.profile-viewer-home-link-list {
    display: flex;
    flex-wrap: wrap;
    justify-content: center;
    gap: 0.55rem;
}

.profile-viewer-home-link {
    position: relative;
    isolation: isolate;
    display: inline-flex;
    min-height: 2.65rem;
    flex: 0 1 auto;
    align-items: center;
    justify-content: center;
    gap: 0.65rem;
    border: 1px solid rgba(129, 140, 248, 0.34);
    border-radius: 0.8rem;
    padding: 0.65rem 0.9rem;
    color: #e2e8f0;
    font-size: 0.78rem;
    font-weight: 700;
    text-decoration: none;
    transition: transform 160ms ease, border-color 160ms ease, background-color 160ms ease;
}

.profile-viewer-home-link:hover {
    transform: translateY(-2px);
    border-color: rgba(129, 140, 248, 0.72);
}

.profile-viewer-home-link.is-primary {
    border-color: transparent;
    background: linear-gradient(105deg, #635bff, #a435e8);
    color: #fff;
    box-shadow: 0 8px 22px rgba(99, 91, 255, 0.2);
}

.profile-viewer-home-link.is-secondary {
    background: rgba(30, 41, 59, 0.78);
}

.profile-viewer-faq {
    max-width: 64rem;
    margin: clamp(2.5rem, 6vw, 4.5rem) auto 0;
}

.profile-viewer-faq-heading {
    max-width: 42rem;
    margin: 0 auto 1.35rem;
    text-align: center;
}

.profile-viewer-faq-heading .profile-viewer-eyebrow {
    margin-bottom: 0.55rem;
}

.profile-viewer-faq-heading h2 {
    margin: 0;
    color: #f8fafc;
    font-size: clamp(1.5rem, 3.2vw, 2.1rem);
    font-weight: 800;
    letter-spacing: -0.04em;
}

.profile-viewer-faq-heading > p:last-child {
    margin: 0.55rem auto 0;
    color: #94a3b8;
    font-size: 0.9rem;
    line-height: 1.6;
}

.profile-viewer-faq-grid {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 0.8rem;
}

.profile-viewer-faq-card {
    min-width: 0;
    border: 1px solid rgba(148, 163, 184, 0.17);
    border-radius: 1rem;
    padding: 1.05rem 1.15rem;
    background: linear-gradient(145deg, rgba(17, 24, 39, 0.9), rgba(12, 18, 30, 0.94));
}

.profile-viewer-faq-card h3 {
    margin: 0;
    color: #e2e8f0;
    font-size: 0.92rem;
    font-weight: 750;
    line-height: 1.45;
}

.profile-viewer-faq-card p {
    margin: 0.48rem 0 0;
    color: #a8b4c6;
    font-size: 0.82rem;
    line-height: 1.65;
}

.blog-post-scroll {
    max-height: 46.25rem;
    padding-right: 0.55rem;
}

.blog-post-grid {
    grid-auto-rows: 22rem;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 1rem;
}

.blog-post-card {
    min-width: 0;
    min-height: 0;
    height: 22rem;
    overflow: hidden;
}

.blog-post-card > p {
    display: -webkit-box;
    overflow: hidden;
    -webkit-box-orient: vertical;
    -webkit-line-clamp: 3;
}

html[data-theme="light"] .profile-viewer-page {
    background:
        radial-gradient(ellipse at 50% 8%, rgba(99, 102, 241, 0.09), transparent 38rem),
        repeating-linear-gradient(0deg, transparent 0 47px, rgba(71, 85, 105, 0.045) 47px 48px),
        repeating-linear-gradient(90deg, transparent 0 47px, rgba(71, 85, 105, 0.045) 47px 48px),
        #f2f5fa;
}

html[data-theme="light"] .profile-viewer-search {
    border-color: #d4dce8;
    background: radial-gradient(ellipse at 50% 0, rgba(99, 102, 241, 0.06), transparent 65%), #fff;
    box-shadow: 0 18px 48px rgba(35, 48, 70, 0.09);
}

html[data-theme="light"] .profile-viewer-form-note { color: #536177; }
html[data-theme="light"] .profile-viewer-form-note i { background: #07875d; }
html[data-theme="light"] .profile-viewer-search-copy .profile-viewer-search-kicker { color: #4338ca; }
html[data-theme="light"] .profile-viewer-home-links {
    border-color: #d9e1ed;
    background: rgba(255, 255, 255, 0.88);
}
html[data-theme="light"] .profile-viewer-home-links-label { color: #64748b; }
html[data-theme="light"] .profile-viewer-home-link {
    border-color: #cbd5e1;
    color: #334155;
}
html[data-theme="light"] .profile-viewer-home-link.is-secondary { background: #fff; }
html[data-theme="light"] .profile-viewer-home-link.is-primary { color: #fff; }
html[data-theme="light"] .profile-viewer-faq-heading h2 { color: #111827; }
html[data-theme="light"] .profile-viewer-faq-heading > p:last-child { color: #64748b; }
html[data-theme="light"] .profile-viewer-faq-card {
    border-color: #dce3ec;
    background: linear-gradient(145deg, #fff, #f8fafc);
    box-shadow: 0 8px 22px rgba(15, 23, 42, 0.045);
}
html[data-theme="light"] .profile-viewer-faq-card h3 { color: #172033; }
html[data-theme="light"] .profile-viewer-faq-card p { color: #536177; }

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

@media (max-width: 720px) {
    .blog-post-grid { grid-template-columns: minmax(0, 1fr); grid-auto-rows: auto; }
    .blog-post-card { height: auto; min-height: 18rem; }
    .blog-post-scroll { max-height: min(80vh, 38rem); }
    .profile-viewer-faq-grid { grid-template-columns: minmax(0, 1fr); }
}

@media (max-width: 430px) {
    .profile-viewer-search { padding: 1rem; }
    .profile-viewer-form-note { justify-content: flex-start; }
    .profile-viewer-home-links { padding: 0.8rem; }
    .profile-viewer-home-link { flex: 1 1 calc(50% - 0.55rem); }
}

@media (prefers-reduced-motion: reduce) {
    .blog-post-card,
    .profile-viewer-input-row,
    .profile-viewer-input-row button { transition: none; }
}

.signin-settings-page .admin-hero-card {
    min-width: 0;
    padding: clamp(1rem, 2.5vw, 1.5rem);
}

.signin-google-badge {
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
    border: 1px solid rgba(148, 163, 184, 0.2);
    border-radius: 999px;
    padding: 0.48rem 0.75rem;
    background: rgba(15, 23, 42, 0.55);
    color: #cbd5e1;
    font-size: 0.68rem;
    font-weight: 750;
    white-space: nowrap;
}

.signin-google-badge > span,
.signin-status-indicator {
    width: 0.48rem;
    height: 0.48rem;
    flex: none;
    border-radius: 50%;
}

.signin-google-badge.is-configured > span,
.signin-status-indicator.is-good { background: #34d399; box-shadow: 0 0 0.7rem rgba(52, 211, 153, 0.55); }
.signin-google-badge.is-pending > span,
.signin-status-indicator.is-warning { background: #fbbf24; box-shadow: 0 0 0.7rem rgba(251, 191, 36, 0.42); }
.signin-status-indicator.is-muted { background: #64748b; }

.signin-flash {
    border: 1px solid;
    border-radius: 0.9rem;
    padding: 0.85rem 1rem;
    font-size: 0.82rem;
}

.signin-flash.is-error {
    border-color: rgba(251, 113, 133, 0.3);
    background: rgba(244, 63, 94, 0.1);
    color: #fecdd3;
}

.signin-flash.is-success {
    border-color: rgba(52, 211, 153, 0.28);
    background: rgba(16, 185, 129, 0.1);
    color: #a7f3d0;
}

.signin-status-card {
    position: relative;
    min-height: 7.4rem;
    padding: 1rem 1.05rem;
}

.signin-status-indicator {
    position: absolute;
    top: 1.2rem;
    right: 1.1rem;
}

.signin-status-label {
    padding-right: 1.1rem;
    color: #94a3b8;
    font-size: 0.66rem;
    font-weight: 700;
    letter-spacing: 0.025em;
}

.signin-status-value {
    margin-top: 0.38rem;
    color: #e2e8f0;
    font-size: 1.05rem;
    font-weight: 800;
    letter-spacing: -0.03em;
}

.signin-status-value.is-good { color: #6ee7b7; }
.signin-status-value.is-warning { color: #fcd34d; }
.signin-status-value.is-muted { color: #94a3b8; }

.signin-status-note {
    margin-top: 0.25rem;
    color: #64748b;
    font-size: 0.62rem;
    line-height: 1.45;
}

.signin-option-card {
    display: flex;
    min-width: 0;
    align-items: center;
    justify-content: space-between;
    gap: 1rem;
    border: 1px solid rgba(148, 163, 184, 0.16);
    border-radius: 1rem;
    padding: 1rem;
    background: rgba(2, 6, 23, 0.32);
    cursor: pointer;
    transition: border-color 160ms ease, background-color 160ms ease, transform 160ms ease;
}

.signin-option-card:hover {
    transform: translateY(-1px);
    border-color: rgba(129, 140, 248, 0.4);
    background: rgba(30, 41, 59, 0.55);
}

.signin-option-copy {
    display: grid;
    min-width: 0;
    gap: 0.28rem;
}

.signin-option-overline {
    color: #818cf8;
    font-size: 0.58rem;
    font-weight: 800;
    letter-spacing: 0.12em;
    line-height: 1.4;
    text-transform: uppercase;
}

.signin-option-copy strong {
    color: #f8fafc;
    font-size: 0.84rem;
    line-height: 1.35;
}

.signin-option-description,
.signin-field-help {
    color: #94a3b8;
    font-size: 0.67rem;
    line-height: 1.55;
}

.signin-option-switch {
    position: relative;
    display: inline-flex;
    flex: none;
    align-items: center;
    gap: 0.55rem;
}

.signin-option-switch input {
    position: absolute;
    width: 1px;
    height: 1px;
    overflow: hidden;
    clip: rect(0, 0, 0, 0);
    clip-path: inset(50%);
    white-space: nowrap;
}

.signin-switch-track {
    display: inline-flex;
    width: 2.5rem;
    height: 1.4rem;
    align-items: center;
    border: 1px solid #475569;
    border-radius: 999px;
    padding: 0.15rem;
    background: #334155;
    transition: background-color 160ms ease, border-color 160ms ease;
}

.signin-switch-track > span {
    width: 0.95rem;
    height: 0.95rem;
    border-radius: 50%;
    background: #e2e8f0;
    box-shadow: 0 1px 3px rgba(0, 0, 0, 0.28);
    transition: transform 160ms ease;
}

.signin-option-switch input:checked + .signin-switch-track {
    border-color: #6366f1;
    background: linear-gradient(100deg, #6366f1, #a855f7);
}

.signin-option-switch input:checked + .signin-switch-track > span { transform: translateX(1.1rem); }
.signin-option-switch input:focus-visible + .signin-switch-track { outline: 3px solid rgba(129, 140, 248, 0.48); outline-offset: 3px; }

.signin-switch-state {
    min-width: 1.35rem;
    color: #94a3b8;
    font-size: 0.59rem;
    font-weight: 800;
    text-transform: uppercase;
}

.signin-switch-state .is-on { display: none; color: #6ee7b7; }
.signin-switch-state .is-off { display: inline; }
.signin-option-switch input:checked ~ .signin-switch-state .is-on { display: inline; }
.signin-option-switch input:checked ~ .signin-switch-state .is-off { display: none; }

.signin-client-id-field {
    display: block;
    border: 1px solid rgba(148, 163, 184, 0.16);
    border-radius: 1rem;
    padding: 1rem;
    background: rgba(2, 6, 23, 0.32);
}

.signin-client-id-field .signin-option-overline {
    display: block;
    margin-bottom: 0.35rem;
}

.signin-field-help {
    display: block;
    margin-top: 0.55rem;
    font-weight: 400;
}

.signin-origin-panel {
    min-width: 0;
    border: 1px solid rgba(148, 163, 184, 0.16);
    border-radius: 1rem;
    padding: 1rem;
    background: rgba(2, 6, 23, 0.32);
}

.signin-origin-title {
    margin-top: 0.35rem;
    color: #e2e8f0;
    font-size: 0.8rem;
    font-weight: 750;
}

.signin-origin-panel code {
    display: block;
    margin-top: 0.65rem;
    overflow-wrap: anywhere;
    border: 1px solid rgba(99, 102, 241, 0.18);
    border-radius: 0.7rem;
    padding: 0.7rem;
    background: rgba(2, 6, 23, 0.58);
    color: #c7d2fe;
    font-size: 0.68rem;
}

.signin-origin-panel > p:last-child {
    margin-top: 0.55rem;
    color: #64748b;
    font-size: 0.62rem;
    line-height: 1.55;
}

.signin-security-note {
    border: 1px solid rgba(251, 191, 36, 0.19);
    border-radius: 0.9rem;
    padding: 0.85rem 1rem;
    background: rgba(245, 158, 11, 0.06);
    color: #fde68a;
    font-size: 0.68rem;
    line-height: 1.6;
}

.signin-save-panel {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 1rem;
    padding: 1rem 1.2rem;
}

html[data-theme="light"] .signin-google-badge {
    border-color: #dbe3ee;
    background: rgba(255, 255, 255, 0.85);
    color: #475569;
}

html[data-theme="light"] .signin-flash.is-error { color: #9f1239; }
html[data-theme="light"] .signin-flash.is-success { color: #047857; }
html[data-theme="light"] .signin-status-label,
html[data-theme="light"] .signin-status-note { color: #64748b; }
html[data-theme="light"] .signin-status-value { color: #334155; }
html[data-theme="light"] .signin-status-value.is-good { color: #047857; }
html[data-theme="light"] .signin-status-value.is-warning { color: #a16207; }
html[data-theme="light"] .signin-status-value.is-muted { color: #64748b; }
html[data-theme="light"] .signin-option-card,
html[data-theme="light"] .signin-client-id-field,
html[data-theme="light"] .signin-origin-panel {
    border-color: #dbe3ee;
    background: rgba(255, 255, 255, 0.8);
}
html[data-theme="light"] .signin-option-card:hover {
    border-color: #a5b4fc;
    background: #fff;
}
html[data-theme="light"] .signin-option-copy strong,
html[data-theme="light"] .signin-origin-title { color: #172033; }
html[data-theme="light"] .signin-option-overline { color: #4f46e5; }
html[data-theme="light"] .signin-option-description,
html[data-theme="light"] .signin-field-help { color: #64748b; }
html[data-theme="light"] .signin-origin-panel code {
    border-color: #dbe3ee;
    background: #f8fafc;
    color: #4338ca;
}
html[data-theme="light"] .signin-origin-panel > p:last-child { color: #64748b; }
html[data-theme="light"] .signin-security-note {
    border-color: #fde68a;
    background: #fffbeb;
    color: #854d0e;
}
html[data-theme="light"] .signin-switch-track {
    border-color: #cbd5e1;
    background: #e2e8f0;
}
html[data-theme="light"] .signin-switch-track > span { background: #fff; }
html[data-theme="light"] .signin-switch-state { color: #64748b; }
html[data-theme="light"] .signin-switch-state .is-on { color: #047857; }

@media (max-width: 640px) {
    .signin-settings-page .admin-hero-card { align-items: stretch; }
    .signin-settings-page .admin-hero-card > div:last-child { justify-content: space-between; }
    .signin-save-panel { align-items: stretch; flex-direction: column; }
    .signin-save-panel > button { width: 100%; }
}

.blog-archive-toolbar {
    min-height: 5.5rem;
    border: 1px solid var(--blog-border);
    border-radius: 1rem;
    padding: 1rem 1.2rem;
    background: var(--blog-surface);
}

html[data-theme="light"] .blog-archive-toolbar {
    background: rgba(255, 255, 255, 0.92);
}

.home-blog-section {
    max-width: 80rem;
    margin: 1.5rem auto 2.5rem;
    padding: clamp(0.9rem, 2vw, 1.4rem);
    border: 1px solid rgba(129, 140, 248, 0.24);
    border-radius: 1.4rem;
    background:
        radial-gradient(ellipse at 95% 0, rgba(99, 102, 241, 0.12), transparent 28rem),
        linear-gradient(145deg, #101827, #111827);
    box-shadow: 0 20px 55px rgba(2, 6, 23, 0.18);
}

.home-blog-heading {
    display: flex;
    align-items: end;
    justify-content: space-between;
    gap: 1.25rem;
    margin-bottom: 1.2rem;
}

.home-blog-kicker {
    margin: 0 0 0.35rem;
    color: #a5b4fc;
    font-size: 0.62rem;
    font-weight: 800;
    letter-spacing: 0.16em;
}

.home-blog-heading h2 {
    margin: 0;
    color: #f8fafc;
    font-size: clamp(1.25rem, 2.4vw, 1.8rem);
    font-weight: 800;
    letter-spacing: -0.04em;
}

.home-blog-heading > div > p:last-child {
    margin: 0.4rem 0 0;
    color: #aab6c8;
    font-size: 0.78rem;
    line-height: 1.55;
}

.home-blog-view-all {
    display: inline-flex;
    min-height: 2.55rem;
    flex: 0 0 auto;
    align-items: center;
    justify-content: center;
    gap: 0.55rem;
    padding: 0 0.9rem;
    color: #eef2ff;
    border: 1px solid rgba(129, 140, 248, 0.4);
    border-radius: 0.75rem;
    background: linear-gradient(120deg, rgba(79, 70, 229, 0.28), rgba(14, 165, 233, 0.12));
    font-size: 0.7rem;
    font-weight: 750;
    text-decoration: none;
    transition: transform 160ms ease, border-color 160ms ease, background-color 160ms ease;
}

.home-blog-view-all:hover {
    transform: translateY(-2px);
    border-color: rgba(103, 232, 249, 0.7);
    background-color: rgba(79, 70, 229, 0.24);
}

.home-blog-grid {
    display: grid;
    grid-template-columns: repeat(4, minmax(0, 1fr));
    gap: 0.75rem;
}

.home-blog-grid.is-short-list {
    max-width: 52rem;
    margin-inline: auto;
    grid-template-columns: repeat(2, minmax(0, 1fr));
}

.home-blog-card {
    min-width: 0;
    overflow: hidden;
    border: 1px solid rgba(148, 163, 184, 0.18);
    border-radius: 1rem;
    background: rgba(7, 13, 25, 0.78);
    transition: transform 180ms ease, border-color 180ms ease;
}

.home-blog-card:hover {
    transform: translateY(-3px);
    border-color: rgba(129, 140, 248, 0.5);
}

.home-blog-image {
    display: grid;
    aspect-ratio: 16 / 6.5;
    overflow: hidden;
    place-items: center;
    background: linear-gradient(135deg, rgba(79, 70, 229, 0.35), rgba(6, 182, 212, 0.2), rgba(236, 72, 153, 0.16));
    text-decoration: none;
}

.home-blog-image img {
    display: block;
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform 220ms ease;
}

.home-blog-card:hover .home-blog-image img {
    transform: scale(1.035);
}

.home-blog-image-fallback {
    color: rgba(255, 255, 255, 0.92);
    font-size: 1.15rem;
    font-weight: 850;
    letter-spacing: 0.12em;
}

.home-blog-image-fallback span {
    color: #67e8f9;
}

.home-blog-card-content {
    display: flex;
    min-height: 9.5rem;
    flex-direction: column;
    padding: 0.78rem;
}

.home-blog-card-meta {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 0.5rem;
    color: #8fa0b8;
    font-size: 0.57rem;
}

.home-blog-card-meta > span {
    color: #a5b4fc;
    font-weight: 750;
    letter-spacing: 0.1em;
}

.home-blog-card h3 {
    margin: 0.5rem 0 0;
    font-size: 0.88rem;
    font-weight: 760;
    line-height: 1.35;
    letter-spacing: -0.02em;
}

.home-blog-card h3 a {
    color: #f8fafc;
    text-decoration: none;
}

.home-blog-card h3 a:hover {
    color: #c7d2fe;
}

.home-blog-card-content > p {
    display: -webkit-box;
    overflow: hidden;
    margin: 0.45rem 0 0.65rem;
    color: #aab6c8;
    font-size: 0.72rem;
    line-height: 1.55;
    -webkit-box-orient: vertical;
    -webkit-line-clamp: 2;
}

.home-blog-read-link {
    display: inline-flex;
    align-items: center;
    gap: 0.4rem;
    margin-top: auto;
    padding-top: 0.75rem;
    color: #c7d2fe;
    font-size: 0.68rem;
    font-weight: 750;
    text-decoration: none;
}

.home-blog-read-link:hover {
    color: #67e8f9;
}

.home-blog-empty {
    margin: 0;
    padding: 1.2rem;
    color: #aab6c8;
    border: 1px dashed rgba(148, 163, 184, 0.3);
    border-radius: 0.9rem;
    font-size: 0.8rem;
}

html[data-theme="light"] .home-blog-section {
    border-color: #d6deeb;
    background:
        radial-gradient(ellipse at 95% 0, rgba(99, 102, 241, 0.09), transparent 28rem),
        linear-gradient(145deg, #ffffff, #f4f7fc);
    box-shadow: 0 18px 48px rgba(35, 48, 70, 0.08);
}

html[data-theme="light"] .home-blog-heading h2,
html[data-theme="light"] .home-blog-card h3 a {
    color: #172033;
}

html[data-theme="light"] .home-blog-kicker,
html[data-theme="light"] .home-blog-card-meta > span,
html[data-theme="light"] .home-blog-read-link {
    color: #4f46e5;
}

html[data-theme="light"] .home-blog-heading > div > p:last-child,
html[data-theme="light"] .home-blog-card-content > p,
html[data-theme="light"] .home-blog-empty {
    color: #56647a;
}

html[data-theme="light"] .home-blog-view-all {
    color: #3730a3;
    border-color: #c7d2fe;
    background: linear-gradient(120deg, #eef2ff, #ecfeff);
}

html[data-theme="light"] .home-blog-card {
    border-color: #d8e0eb;
    background: #fff;
}

.blog-post-page {
    width: min(100% - 2rem, 1180px);
    margin: 0 auto;
}

.blog-post-layout {
    grid-template-columns: minmax(0, 1fr) 300px;
    gap: 1.15rem;
    margin-top: 0.4rem;
}

.blog-post-main {
    display: grid;
    min-width: 0;
    gap: 0.9rem;
}

.blog-post-hero {
    padding: clamp(1.2rem, 2.6vw, 1.85rem);
}

.blog-post-featured-image {
    max-height: 360px;
    aspect-ratio: 2.1 / 1;
    margin: 0;
    border-radius: 1rem;
}

.blog-article-card {
    padding-top: 1.15rem;
}

.blog-post-sidebar {
    top: 5.5rem;
    gap: 0.75rem;
    max-height: calc(100vh - 6.5rem);
}

.blog-sidebar-panel {
    padding: 0.95rem;
}

.blog-sidebar-post {
    align-items: center;
    gap: 0.7rem;
    padding: 0.5rem;
}

.blog-sidebar-post-image {
    position: relative;
    display: grid;
    width: 3.65rem;
    height: 3.1rem;
    flex: 0 0 auto;
    overflow: hidden;
    place-items: center;
    border: 1px solid var(--blog-border);
    border-radius: 0.62rem;
    background: linear-gradient(135deg, rgba(99, 102, 241, 0.3), rgba(6, 182, 212, 0.22), rgba(236, 72, 153, 0.16));
}

.blog-sidebar-post-image img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.blog-sidebar-image-fallback {
    color: var(--blog-ink);
    font-size: 0.52rem;
    font-weight: 800;
    letter-spacing: 0.1em;
}

.blog-sidebar-rank {
    position: absolute;
    right: 0.2rem;
    bottom: 0.2rem;
    width: 1.25rem;
    height: 1.15rem;
    color: #fff;
    border: 1px solid rgba(255, 255, 255, 0.3);
    border-radius: 0.35rem;
    background: rgba(15, 23, 42, 0.82);
    font-size: 0.5rem;
}

.blog-sidebar-post-copy {
    min-width: 0;
}

.blog-sidebar-post-copy strong {
    display: -webkit-box;
    overflow: hidden;
    -webkit-box-orient: vertical;
    -webkit-line-clamp: 2;
}

.blog-profile-trend-list {
    display: grid;
    gap: 0.4rem;
    margin: 0;
    padding: 0;
    list-style: none;
}

.blog-profile-trend-form {
    margin: 0;
}

.blog-profile-trend {
    display: flex;
    width: 100%;
    align-items: center;
    gap: 0.6rem;
    padding: 0.52rem;
    color: var(--blog-ink);
    border: 1px solid transparent;
    border-radius: 0.7rem;
    background: transparent;
    text-align: left;
    cursor: pointer;
    transition: border-color 150ms ease, background-color 150ms ease;
}

.blog-profile-trend:hover {
    border-color: var(--blog-border);
    background: var(--blog-surface-raised);
}

.blog-profile-trend-avatar {
    display: grid;
    width: 2.05rem;
    height: 2.05rem;
    flex: 0 0 auto;
    place-items: center;
    color: #c7d2fe;
    border: 1px solid rgba(129, 140, 248, 0.35);
    border-radius: 50%;
    background: linear-gradient(135deg, rgba(99, 102, 241, 0.25), rgba(14, 165, 233, 0.15));
    font-size: 0.72rem;
    font-weight: 800;
}

.blog-profile-trend-copy {
    display: grid;
    min-width: 0;
    flex: 1;
    gap: 0.18rem;
}

.blog-profile-trend-copy strong {
    overflow: hidden;
    font-size: 0.68rem;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.blog-profile-trend-copy small,
.blog-profile-trend-note {
    color: var(--blog-faint);
    font-size: 0.56rem;
}

.blog-profile-trend-arrow {
    color: var(--blog-accent);
    font-size: 0.75rem;
}

.blog-profile-trend-note {
    margin: 0.65rem 0 0;
    line-height: 1.5;
}

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

    .home-blog-grid.is-short-list {
        max-width: 52rem;
    }

    .blog-post-layout {
        grid-template-columns: minmax(0, 1fr);
    }

    .blog-post-sidebar {
        position: static;
        max-height: none;
        grid-template-columns: repeat(2, minmax(0, 1fr));
        overflow: visible;
    }
}

@media (max-width: 720px) {
    .home-blog-section {
        width: min(100% - 1.4rem, 80rem);
        margin: 1.4rem auto 2rem;
        padding: 0.9rem;
    }

    .home-blog-heading {
        align-items: flex-start;
        flex-direction: column;
    }

    .home-blog-view-all {
        min-height: 2.35rem;
    }

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

    .home-blog-grid.is-short-list {
        max-width: none;
        grid-template-columns: minmax(0, 1fr);
    }

    .home-blog-card-content {
        min-height: 0;
    }

    .blog-post-page {
        width: min(100% - 1.4rem, 1180px);
    }

    .blog-post-sidebar {
        grid-template-columns: minmax(0, 1fr);
    }

    .blog-post-featured-image {
        aspect-ratio: 1.8 / 1;
    }
}

@media (prefers-reduced-motion: reduce) {
    .home-blog-card,
    .home-blog-image img,
    .home-blog-view-all,
    .blog-profile-trend {
        transition: none;
    }
}
