:root {
  --bs-secondary-rgb: rgb(0, 0, 0);
  --bs-secondary: rgba(var(--bs-secondary-rgb), 1);
  --bs-body-color: rgb(20, 20, 20);
}
.btn-outline-secondary {
  --bs-btn-color: rgb(20, 20, 20);
  --bs-btn-hover-bg: rgb(20, 20, 20);
  --bs-btn-hover-border-color: rgb(50, 50, 50);
}

[data-bs-theme="dark"] {
    --bs-body-color: rgb(245, 245, 245);
    --bs-secondary-rgb: rgb(255, 255, 255);
}

[data-bs-theme="dark"] .btn-outline-secondary {
    --bs-btn-color: rgb(245, 245, 245);
}

.text-mode .container {
    max-width: 700px !important;
    padding-bottom: 0 !important;
}

nav {
    z-index: 1030;
}

.text-mode .mb-4,
.text-mode .mb-3,
.text-mode .mb-5,
.text-mode p {
    margin-bottom: 0 !important;
}

.text-mode main {
    padding-bottom: 2rem !important;
}

.text-mode .border {
    border: none !important;
}

.text-mode .g-5,
.text-mode .gy-5,
.text-mode .row {
    --bs-gutter-y: 0 !important;
}

.text-mode h2,
.text-mode h3 {
    padding-top: 2rem !important;
}

.text-mode .text-mode-hidden {
    display: none !important;
    opacity: 0;
}

.text-mode i[class^="ph-"] {
    display: none;
}

.text-mode footer .align-items-center {
    display: block !important;
}

.text-mode img:not(.allow-text-mode) {
    display: none;
}

.text-mode .row {
    width: 100%;
    display: block;
}

.text-mode .bg-grid {
    background-image: none !important;
}

.text-mode .icon-chip {
    display: none;
}

.text-mode .glass-card {
    background: none !important;
    border-top: 0 !important;
    border-left: 0 !important;
    border-right: 0 !important;
    border-bottom: 3px solid !important;
    border-bottom-color: black;
    padding: 0 0 2em 0 !important;
    border-radius: 0 !important;
    box-shadow: none !important;
}

[data-bs-theme="dark"] .text-mode .glass-card {
    border-bottom-color: white;
}

.text-mode .col-md-6,
.text-mode .col-lg-5,
.text-mode .col-lg-6 {
    min-width: 100% !important;
}

.text-mode .text-center {
    text-align: left !important;
}

.text-mode li i {
    display: none;
}

.text-mode ul {
    list-style: auto;
    list-style-type: disc;
    list-style-position: inside;
}

.text-mode li {
    display: list-item !important;
}

.bg-grid {
    background-size: 40px 40px;
    background-image:
        linear-gradient(to right, rgba(0, 0, 0, 0.05) 1px, transparent 1px),
        linear-gradient(to bottom, rgba(0, 0, 0, 0.05) 1px, transparent 1px);
}

.dark .bg-grid,
[data-bs-theme="dark"] .bg-grid {
    background-image:
        linear-gradient(to right, rgba(255, 255, 255, 0.05) 1px, transparent 1px),
        linear-gradient(to bottom, rgba(255, 255, 255, 0.05) 1px, transparent 1px);
}

.glass-card {
    background: rgba(255, 255, 255, 0.85);
    backdrop-filter: blur(8px);
    border: 1px solid rgba(0, 0, 0, 0.08);
}

.dark .glass-card,
[data-bs-theme="dark"] .glass-card {
    background: rgba(15, 23, 42, 0.75);
    border: 1px solid rgba(255, 255, 255, 0.08);
}

*:focus-visible {
    outline: 3px solid #198754;
    outline-offset: 2px;
}

.glow-circle {
    width: 75%;
    height: 75%;
    background: radial-gradient(circle, rgba(34, 197, 94, 0.2), transparent 65%);
    filter: blur(30px);
}

.mascot-img {
    border-radius: 24px;
    background: rgba(255, 255, 255, 0.7);
    padding: 1.5rem;
    border: 1px solid rgba(0, 0, 0, 0.08);
}

.dark .mascot-img,
[data-bs-theme="dark"] .mascot-img {
    background: rgba(15, 23, 42, 0.6);
    border-color: rgba(255, 255, 255, 0.08);
}

.asset-frame {
    min-height: 220px;
}

.asset-image {
    max-height: 240px;
    width: auto;
    height: auto;
    object-fit: contain;
    display: block;
}

.icon-chip {
    width: 48px;
    height: 48px;
    border-radius: 12px;
    background: #0f172a;
    color: #fff;
    display: grid;
    place-items: center;
}

.dark .icon-chip,
[data-bs-theme="dark"] .icon-chip {
    background: #22c55e;
    color: #0f172a;
}

.speech-bubble {
    position: absolute;
    background: #fff;
    color: #0f172a;
    border: 1px solid rgba(0, 0, 0, 0.1);
    padding: 12px 16px;
    border-radius: 12px;
    font-family: 'JetBrains Mono', monospace;
    font-weight: 700;
    font-size: 0.8rem;
    max-width: 240px;
    box-shadow: 0 12px 30px rgba(0, 0, 0, 0.12);
    animation: bounce 1.5s ease-in-out;
    z-index: 1050;
}

@keyframes bounce {
    0%, 100% { transform: translate(-50%, -50%) scale(1); }
    50% { transform: translate(-50%, -60%) scale(1.05); }
}

@media (prefers-reduced-motion: reduce) {
    .glow-circle,
    .speech-bubble {
        animation: none !important;
    }
}

:root {
    --accent-strong: #137c46;
}

[data-bs-theme="dark"] .text-success,
[data-bs-theme="dark"] .link-success {
    color: #7be495 !important;
}

[data-bs-theme="dark"] .btn-success {
    color: #0f172a;
    background-color: #7be495;
    border-color: #7be495;
}

[data-bs-theme="dark"] .btn-success:hover {
    background-color: #64d17d;
    border-color: #64d17d;
}

[data-bs-theme="dark"] .text-secondary {
    color: #ffffff !important;
}

[data-bs-theme="dark"] .text-muted {
    color: #d6deed !important;
}

footer {
    background: linear-gradient(135deg, #050b17, #0b1224);
    color: #f1f5ff;
}

footer .border-top {
    border-color: rgba(241, 245, 255, 0.4) !important;
}
[data-bs-theme="dark"] .btn-outline-secondary {
    color: #e6edf7;
    border-color: #7be495;
}

[data-bs-theme="dark"] .btn-outline-secondary:hover {
    color: #0f172a;
    background-color: #7be495;
    border-color: #7be495;
}

[data-bs-theme="dark"] .link-success:hover {
    color: #64d17d !important;
}

.role-badge-img {
    height: 48px;
    width: auto;
    object-fit: contain;
}

[data-bs-theme="dark"] .role-badge-img {
    filter: invert(1);
}

.nhs-logo {
    filter: none !important;
    background: #fff;
    padding: 4px;
    border-radius: 6px;
}
