/* ==========================================================================
   nostr-bbs Forum — Design System Foundation
   Tailwind utility classes are handled by the Play CDN in dev
   and by Tailwind CLI tree-shaking in production.

   Shared design tokens (glass-card, mesh-bg, aurora-shimmer, ambient-orb,
   candy-gradient, skeleton, gradient-text, hover-lift, neon-pulse,
   gradient-border, scrollbar-none, fade-in) are loaded from:
     design-tokens.css  (co-located copy of src/styles/design-tokens.css)
   ========================================================================== */

/* design-tokens.css is loaded via <link data-trunk> in index.html.
   Trunk content-hashes CSS filenames, so @import cannot resolve the
   original name at runtime. Do NOT re-add an @import here. */

/* ---------------------------------------------------------------------------
   1. CSS Custom Properties (forum-specific aliases)
   --------------------------------------------------------------------------- */

:root {
    /* Legacy aliases — kept for forum components that reference these directly */
    --amber-glow: var(--dl-glow-ambient);
    --amber-glow-strong: var(--dl-glow-strong);
    --card-bg: var(--dl-card-bg);
    --card-border: var(--dl-card-border);
    --glass-bg: var(--dl-glass-bg);
    --glass-border: var(--dl-glass-border);
}

/* ---------------------------------------------------------------------------
   2. Base Reset & Typography
   --------------------------------------------------------------------------- */

body {
    margin: 0;
    padding: 0;
    background-color: #111827;
    color: #f9fafb;
    font-family: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
    -webkit-font-smoothing: antialiased;
    -moz-osx-font-smoothing: grayscale;
    line-height: 1.6;
}

/* Selection */
::selection {
    background: rgba(245, 158, 11, 0.3);
    color: #fbbf24;
}

/* Focus rings */
*:focus-visible {
    outline: 2px solid #f59e0b;
    outline-offset: 2px;
}

/* ---------------------------------------------------------------------------
   3. Loading Screen
   --------------------------------------------------------------------------- */

.loading-screen {
    position: fixed;
    inset: 0;
    z-index: 9999;
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: center;
    background-color: #111827;
    transition: opacity 0.4s ease, visibility 0.4s ease;
}

.loading-screen.fade-out {
    opacity: 0;
    visibility: hidden;
}

.loading-logo {
    font-size: 2.5rem;
    font-weight: 800;
    letter-spacing: -0.025em;
    margin: 0;
    animation: gradient-shift 3s ease-in-out infinite;
    background-size: 200% 200%;
}

.loading-status {
    margin-top: 1rem;
    font-size: 0.875rem;
    color: #9ca3af;
    letter-spacing: 0.05em;
    animation: pulse 2s cubic-bezier(0.4, 0, 0.6, 1) infinite;
}

.loading-ring {
    width: 80px;
    height: 80px;
    border-radius: 50%;
    border: 3px solid rgba(245, 158, 11, 0.1);
    border-top-color: #f59e0b;
    animation: spin 1s linear infinite;
    margin-bottom: 1.5rem;
}

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

@keyframes gradient-shift {
    0%, 100% { background-position: 0% 50%; }
    50% { background-position: 100% 50%; }
}

/* ---------------------------------------------------------------------------
   4. Animations
   --------------------------------------------------------------------------- */

@keyframes pulse {
    0%, 100% { opacity: 1; }
    50% { opacity: 0.5; }
}

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

@keyframes fade-in {
    from { opacity: 0; transform: translateY(4px); }
    to { opacity: 1; transform: translateY(0); }
}

/* ---------------------------------------------------------------------------
   5. Utility Classes
   NOTE: glass-card, gradient-text, skeleton, hover-lift, fade-in
         are now provided by design-tokens.css
   --------------------------------------------------------------------------- */

/* Glassmorphism — heavier blur variant (forum-specific) */
.glass {
    background: var(--glass-bg);
    backdrop-filter: blur(12px);
    -webkit-backdrop-filter: blur(12px);
    border: 1px solid var(--glass-border);
}

/* Fade in for DM bubbles */
.animate-fadeIn {
    animation: dl-fade-in 0.3s ease-out;
}

/* Toast slide-in */
@keyframes slide-in-down {
    from { opacity: 0; transform: translateY(-8px); }
    to { opacity: 1; transform: translateY(0); }
}

.animate-slide-in-down {
    animation: slide-in-down 0.25s ease-out;
}

/* Subtle float for empty states */
@keyframes gentle-float {
    0%, 100% { transform: translateY(0); }
    50% { transform: translateY(-6px); }
}

.animate-gentle-float {
    animation: gentle-float 3s ease-in-out infinite;
}

/* Amber glow on hover */
.glow-hover {
    transition: box-shadow 0.2s ease;
}

.glow-hover:hover {
    box-shadow: var(--amber-glow);
}

/* ---------------------------------------------------------------------------
   6. Form Elements
   --------------------------------------------------------------------------- */

input:focus,
textarea:focus,
select:focus {
    box-shadow: 0 0 0 1px rgba(245, 158, 11, 0.5);
    border-color: rgba(245, 158, 11, 0.5);
}

/* ---------------------------------------------------------------------------
   7. Scrollbar
   --------------------------------------------------------------------------- */

::-webkit-scrollbar {
    width: 8px;
    height: 8px;
}

::-webkit-scrollbar-track {
    background: #111827;
}

::-webkit-scrollbar-thumb {
    background: #374151;
    border-radius: 9999px;
    border: 2px solid #111827;
}

::-webkit-scrollbar-thumb:hover {
    background: #4b5563;
    box-shadow: 0 0 6px rgba(245, 158, 11, 0.15);
}

/* Firefox scrollbar */
* {
    scrollbar-width: thin;
    scrollbar-color: #374151 #111827;
}

/* scrollbar-none is provided by design-tokens.css */

/* ---------------------------------------------------------------------------
   8–14. Shared visual effects
   NOTE: ambient-orb, glass-card-interactive, gradient-border, aurora-shimmer,
         neon-pulse, candy-gradient, mesh-bg, animate-ambient-breathe
         are now provided by design-tokens.css
   --------------------------------------------------------------------------- */

/* ---------------------------------------------------------------------------
   15. Toast Notifications
   --------------------------------------------------------------------------- */

.toast-container {
    position: fixed;
    top: 1rem;
    right: 1rem;
    z-index: 9999;
    display: flex;
    flex-direction: column;
    gap: 0.5rem;
    pointer-events: none;
    max-width: 400px;
}

.toast-item {
    pointer-events: auto;
    background: rgba(31, 41, 55, 0.95);
    backdrop-filter: blur(12px);
    -webkit-backdrop-filter: blur(12px);
    border: 1px solid rgba(55, 65, 81, 0.5);
    border-radius: 12px;
    padding: 0.75rem 1rem;
    box-shadow: 0 0 20px rgba(0, 0, 0, 0.3),
                0 0 40px rgba(0, 0, 0, 0.1);
    animation: toast-enter 0.3s cubic-bezier(0.34, 1.56, 0.64, 1);
}

.toast-item.toast-success {
    border-color: rgba(34, 197, 94, 0.3);
    box-shadow: 0 0 20px rgba(34, 197, 94, 0.08);
}

.toast-item.toast-error {
    border-color: rgba(239, 68, 68, 0.3);
    box-shadow: 0 0 20px rgba(239, 68, 68, 0.08);
}

.toast-item.toast-warning {
    border-color: rgba(245, 158, 11, 0.3);
    box-shadow: 0 0 20px rgba(245, 158, 11, 0.08);
}

.toast-item.toast-exit {
    animation: toast-exit 0.2s ease-in forwards;
}

@keyframes toast-enter {
    from { opacity: 0; transform: translateX(100%) scale(0.95); }
    to { opacity: 1; transform: translateX(0) scale(1); }
}

@keyframes toast-exit {
    from { opacity: 1; transform: translateX(0) scale(1); }
    to { opacity: 0; transform: translateX(100%) scale(0.95); }
}

/* ---------------------------------------------------------------------------
   16. Modal Overlay
   --------------------------------------------------------------------------- */

.modal-backdrop {
    position: fixed;
    inset: 0;
    z-index: 9000;
    background: rgba(0, 0, 0, 0.6);
    backdrop-filter: blur(4px);
    -webkit-backdrop-filter: blur(4px);
    animation: modal-fade-in 0.2s ease-out;
    display: flex;
    align-items: center;
    justify-content: center;
}

.modal-panel {
    background: rgba(17, 24, 39, 0.95);
    backdrop-filter: blur(16px);
    -webkit-backdrop-filter: blur(16px);
    border: 1px solid rgba(55, 65, 81, 0.5);
    border-radius: 16px;
    box-shadow: 0 0 40px rgba(0, 0, 0, 0.4),
                0 0 80px rgba(245, 158, 11, 0.05);
    animation: modal-scale-in 0.25s cubic-bezier(0.34, 1.56, 0.64, 1);
    max-height: 90vh;
    overflow-y: auto;
    width: min(90vw, 480px);
}

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

@keyframes modal-scale-in {
    from { opacity: 0; transform: scale(0.93) translateY(10px); }
    to { opacity: 1; transform: scale(1) translateY(0); }
}

/* ---------------------------------------------------------------------------
   17. Reaction Particle Burst
   --------------------------------------------------------------------------- */

.reaction-burst {
    position: relative;
    display: inline-flex;
    transition: transform 0.15s cubic-bezier(0.34, 1.56, 0.64, 1);
}

.reaction-burst:active {
    transform: scale(1.3);
}

.reaction-burst.is-active {
    color: #fbbf24;
}

.reaction-particle {
    position: absolute;
    width: 4px;
    height: 4px;
    border-radius: 50%;
    background: #fbbf24;
    animation: reaction-fly 0.5s ease-out forwards;
    pointer-events: none;
}

@keyframes reaction-fly {
    0% { opacity: 1; transform: translate(0, 0) scale(1); }
    100% { opacity: 0; transform: translate(var(--dx, 20px), var(--dy, -20px)) scale(0); }
}

/* ---------------------------------------------------------------------------
   18. Typing Indicator
   --------------------------------------------------------------------------- */

.typing-dot {
    display: inline-block;
    width: 6px;
    height: 6px;
    border-radius: 50%;
    background: #9ca3af;
    animation: typing-bounce 1.4s ease-in-out infinite;
}

.typing-dot:nth-child(2) { animation-delay: 0.2s; }
.typing-dot:nth-child(3) { animation-delay: 0.4s; }

@keyframes typing-bounce {
    0%, 60%, 100% { transform: translateY(0); opacity: 0.4; }
    30% { transform: translateY(-6px); opacity: 1; }
}

/* ---------------------------------------------------------------------------
   19. Mobile Bottom Navigation
   --------------------------------------------------------------------------- */

.mobile-bottom-nav {
    position: fixed;
    bottom: 0;
    left: 0;
    right: 0;
    z-index: 50;
    background: rgba(17, 24, 39, 0.95);
    backdrop-filter: blur(16px);
    -webkit-backdrop-filter: blur(16px);
    border-top: 1px solid rgba(55, 65, 81, 0.3);
    padding-bottom: env(safe-area-inset-bottom, 0px);
    display: none;
}

@media (max-width: 639px) {
    .mobile-bottom-nav {
        display: flex;
    }

    /* Account for bottom nav height on mobile */
    main {
        padding-bottom: calc(4rem + env(safe-area-inset-bottom, 0px));
    }
}

.mobile-nav-item {
    flex: 1;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    padding: 0.5rem 0;
    gap: 0.125rem;
    color: #6b7280;
    transition: color 0.15s ease;
    position: relative;
    font-size: 0.625rem;
    letter-spacing: 0.025em;
}

.mobile-nav-item.active {
    color: #f59e0b;
}

.mobile-nav-item.active::before {
    content: '';
    position: absolute;
    top: 0;
    left: 25%;
    right: 25%;
    height: 2px;
    background: #f59e0b;
    border-radius: 0 0 2px 2px;
}

/* ---------------------------------------------------------------------------
   20. Link Preview Cards
   --------------------------------------------------------------------------- */

.link-preview-card {
    border: 1px solid rgba(55, 65, 81, 0.4);
    border-radius: 10px;
    overflow: hidden;
    background: rgba(31, 41, 55, 0.4);
    transition: border-color 0.2s ease, box-shadow 0.2s ease;
    max-width: 480px;
}

.link-preview-card:hover {
    border-color: rgba(245, 158, 11, 0.2);
    box-shadow: 0 0 16px rgba(245, 158, 11, 0.06);
}

/* ---------------------------------------------------------------------------
   21. Virtual Scroll Container
   --------------------------------------------------------------------------- */

.virtual-scroll {
    overflow-y: auto;
    will-change: transform;
    -webkit-overflow-scrolling: touch;
    contain: layout style;
}

/* ---------------------------------------------------------------------------
   22. Notification Badge
   --------------------------------------------------------------------------- */

.notification-badge {
    position: absolute;
    top: -4px;
    right: -4px;
    min-width: 16px;
    height: 16px;
    border-radius: 9999px;
    background: #ef4444;
    color: white;
    font-size: 0.625rem;
    font-weight: 700;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 0 4px;
    border: 2px solid #111827;
    animation: badge-pop 0.3s cubic-bezier(0.34, 1.56, 0.64, 1);
}

@keyframes badge-pop {
    0% { transform: scale(0); }
    100% { transform: scale(1); }
}

/* ---------------------------------------------------------------------------
   23. Identicon Avatar
   --------------------------------------------------------------------------- */

.avatar-identicon {
    border-radius: 50%;
    overflow: hidden;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    font-weight: 700;
    text-transform: uppercase;
    flex-shrink: 0;
    border: 2px solid rgba(245, 158, 11, 0.15);
    transition: border-color 0.2s ease, box-shadow 0.2s ease;
}

.avatar-identicon:hover {
    border-color: rgba(245, 158, 11, 0.4);
    box-shadow: 0 0 12px rgba(245, 158, 11, 0.1);
}

/* ---------------------------------------------------------------------------
   24. Emoji Picker Grid
   --------------------------------------------------------------------------- */

.emoji-grid {
    display: grid;
    grid-template-columns: repeat(8, 1fr);
    gap: 2px;
    max-height: 200px;
    overflow-y: auto;
}

.emoji-btn {
    padding: 4px;
    border-radius: 6px;
    font-size: 1.25rem;
    line-height: 1;
    text-align: center;
    cursor: pointer;
    transition: background 0.1s ease, transform 0.1s ease;
    border: none;
    background: transparent;
}

.emoji-btn:hover {
    background: rgba(245, 158, 11, 0.15);
    transform: scale(1.15);
}

/* ---------------------------------------------------------------------------
   25. Breadcrumb Navigation
   --------------------------------------------------------------------------- */

.breadcrumb-nav {
    display: flex;
    align-items: center;
    gap: 0.25rem;
    font-size: 0.8125rem;
    color: #9ca3af;
    overflow-x: auto;
    white-space: nowrap;
    padding: 0.5rem 0;
}

.breadcrumb-nav a {
    color: #9ca3af;
    transition: color 0.15s ease;
    text-decoration: none;
}

.breadcrumb-nav a:hover {
    /* Zone-scoped crumbs (drill-down pages set --zone-accent) follow the zone
       accent; the index/events crumbs fall back to brand amber (issue #43). */
    color: var(--zone-accent, #fbbf24);
}

.breadcrumb-separator {
    color: #4b5563;
    font-size: 0.75rem;
}

/* ---------------------------------------------------------------------------
   26. Global Search Overlay
   --------------------------------------------------------------------------- */

.search-overlay {
    position: fixed;
    inset: 0;
    z-index: 9500;
    background: rgba(0, 0, 0, 0.7);
    backdrop-filter: blur(8px);
    -webkit-backdrop-filter: blur(8px);
    display: flex;
    align-items: flex-start;
    justify-content: center;
    padding-top: 15vh;
    animation: modal-fade-in 0.15s ease-out;
}

.search-panel {
    width: min(90vw, 600px);
    background: rgba(17, 24, 39, 0.98);
    border: 1px solid rgba(55, 65, 81, 0.5);
    border-radius: 16px;
    box-shadow: 0 0 60px rgba(0, 0, 0, 0.4),
                0 0 120px rgba(245, 158, 11, 0.03);
    animation: modal-scale-in 0.2s cubic-bezier(0.34, 1.56, 0.64, 1);
    overflow: hidden;
}

/* ---------------------------------------------------------------------------
   27. Confirm Dialog
   --------------------------------------------------------------------------- */

.confirm-actions {
    display: flex;
    gap: 0.75rem;
    justify-content: flex-end;
}

/* ---------------------------------------------------------------------------
   27a. Zone-accent utilities (issue #43)

   Zone-scoped surfaces follow the operator's configured accent, exposed as the
   `--zone-accent` custom property by `zone_tile_style` (index tiles) and
   `zone_accent_style_cfg` (drill-down page roots). Every utility references
   `var(--zone-accent, <brand-amber>)` DIRECTLY in its property (never via an
   intermediate alias, which would freeze the fallback at :root) so it resolves
   per element against the nearest `--zone-accent`, and falls back to the brand
   amber when none is set — making each class a visual no-op outside any zone
   context (header, login, home, admin keep brand amber). `color-mix` is fine:
   the deployment targets evergreen browsers (already used inline in channel.rs).
   --------------------------------------------------------------------------- */

/* Static accent text (chips/links that were text-amber-400). */
.za-text {
    color: var(--zone-accent, #fbbf24);
}

/* Accent text on hover (was hover:text-amber-400). */
.za-hover-text {
    transition: color 0.15s ease;
}
.za-hover-text:hover {
    color: var(--zone-accent, #fbbf24);
}

/* Accent text when the enclosing `.group` is hovered (was group-hover:text-amber-400). */
.za-group-hover-text {
    transition: color 0.15s ease;
}
.group:hover .za-group-hover-text {
    color: var(--zone-accent, #fbbf24);
}

/* Soft accent chip: tinted fill + accent text (was text-amber-400 bg-amber-500/10). */
.za-chip {
    color: var(--zone-accent, #fbbf24);
    background-color: color-mix(in srgb, var(--zone-accent, #f59e0b) 12%, transparent);
}

/* Small accent icon tile (was bg-amber-500/10 text-amber-400). */
.za-icon-tile {
    color: var(--zone-accent, #fbbf24);
    background-color: color-mix(in srgb, var(--zone-accent, #f59e0b) 12%, transparent);
}

/* Ghost accent button: tinted fill + border, darker on hover
   (was bg-amber-500/10 hover:bg-amber-500/20 text-amber-400 border-amber-500/20). */
.za-chip-btn {
    color: var(--zone-accent, #fbbf24);
    background-color: color-mix(in srgb, var(--zone-accent, #f59e0b) 10%, transparent);
    border-color: color-mix(in srgb, var(--zone-accent, #f59e0b) 20%, transparent);
    transition: background-color 0.2s ease;
}
.za-chip-btn:hover {
    background-color: color-mix(in srgb, var(--zone-accent, #f59e0b) 20%, transparent);
}

/* Solid accent fill with dark ink for high-emphasis chips/buttons
   (was bg-amber-400/bg-amber-500). `:not(:disabled)` lets Tailwind's
   `disabled:bg-gray-600` win when the button is disabled. */
.za-solid {
    background-color: var(--zone-accent, #f59e0b);
}
.za-solid:not(:disabled):hover {
    background-color: color-mix(in srgb, var(--zone-accent, #f59e0b) 85%, #ffffff);
}

/* Accent border tint on hover (was hover:border-amber-500/30). */
.za-hover-border {
    transition: border-color 0.2s ease, background 0.2s ease,
                box-shadow 0.2s ease, transform 0.2s ease;
}
.za-hover-border:hover {
    border-color: color-mix(in srgb, var(--zone-accent, #f59e0b) 30%, transparent);
}

/* Accent focus ring for zone-scoped form fields (was focus:border/ring-amber-500).
   Higher specificity than the global `input:focus` amber rule, so it wins. */
.za-focus:focus {
    outline: none;
    border-color: color-mix(in srgb, var(--zone-accent, #f59e0b) 55%, transparent);
    box-shadow: 0 0 0 1px color-mix(in srgb, var(--zone-accent, #f59e0b) 55%, transparent);
}

/* Spinner in the zone accent (was border-amber-400 border-t-transparent). */
.za-spinner {
    border-color: var(--zone-accent, #f59e0b);
    border-top-color: transparent;
}

/* ---------------------------------------------------------------------------
   28. Category / Section Cards (Forum Index)
   --------------------------------------------------------------------------- */

.category-hero-card {
    position: relative;
    border-radius: 16px;
    overflow: hidden;
    background: var(--card-bg);
    border: 1px solid var(--card-border);
    transition: transform 0.2s ease, box-shadow 0.2s ease;
    min-height: 160px;
}

.category-hero-card:hover {
    transform: translateY(-2px);
    /* Zone-accent glow on the index cards (issue #43): color-mix with the
       brand-amber fallback is pixel-identical to the old rgba(245,158,11,0.1)
       when no --zone-accent is set, and follows the tile's accent when it is. */
    box-shadow: 0 0 28px color-mix(in srgb, var(--zone-accent, #f59e0b) 10%, transparent),
                0 12px 40px rgba(0, 0, 0, 0.3);
}

.section-list-card {
    background: var(--card-bg);
    border: 1px solid var(--card-border);
    border-radius: 10px;
    padding: 0.875rem 1rem;
    transition: border-color 0.2s ease, background 0.2s ease;
}

.section-list-card:hover {
    border-color: color-mix(in srgb, var(--zone-accent, #f59e0b) 25%, transparent);
    background: rgba(31, 41, 55, 0.7);
}

/* ---------------------------------------------------------------------------
   29. Event Cards
   --------------------------------------------------------------------------- */

.event-card {
    background: var(--card-bg);
    border: 1px solid var(--card-border);
    border-radius: 12px;
    overflow: hidden;
    transition: transform 0.2s ease, box-shadow 0.2s ease;
}

.event-card:hover {
    transform: translateY(-2px);
    box-shadow: 0 0 20px rgba(245, 158, 11, 0.08);
}

.event-date-badge {
    width: 3.5rem;
    text-align: center;
    background: rgba(245, 158, 11, 0.1);
    border-radius: 8px;
    padding: 0.375rem;
    flex-shrink: 0;
}

/* ---------------------------------------------------------------------------
   30. Profile Modal
   --------------------------------------------------------------------------- */

.profile-avatar-ring {
    width: 80px;
    height: 80px;
    border-radius: 50%;
    padding: 3px;
    background: linear-gradient(135deg, #fbbf24, #f97316, #a855f7);
    display: flex;
    align-items: center;
    justify-content: center;
}

.profile-avatar-ring > div {
    width: 100%;
    height: 100%;
    border-radius: 50%;
    overflow: hidden;
}

/* ---------------------------------------------------------------------------
   Reduced-motion: disable all ambient animations
   --------------------------------------------------------------------------- */

/* Reduced-motion for forum-specific animations
   (shared tokens handle their own reduced-motion rules) */
@media (prefers-reduced-motion: reduce) {
    .typing-dot,
    .reaction-particle {
        animation: none !important;
    }
}

/* ---------------------------------------------------------------------------
   BBS switch sash — a thin, glitchy amber/orange terminal ribbon that invites
   the reader into the retro ASCII BBS. Monospace + phosphor glow + scanlines +
   an occasional RGB-split glitch, deliberately at odds with the soft forum
   aesthetic so it reads as "another interface lives here".
   --------------------------------------------------------------------------- */

.bbs-sash {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 0.75rem;
    width: 100%;
    padding: 0.4rem 1rem;
    margin: -0.5rem 0 1.75rem;   /* pull up snug under the hero card */
    border-top: 1px solid rgba(255, 176, 0, 0.35);
    border-bottom: 1px solid rgba(255, 176, 0, 0.35);
    background:
        repeating-linear-gradient(
            to bottom,
            rgba(0, 0, 0, 0) 0, rgba(0, 0, 0, 0) 2px,
            rgba(0, 0, 0, 0.28) 3px, rgba(0, 0, 0, 0.28) 4px),   /* scanlines */
        linear-gradient(90deg,
            rgba(120, 60, 0, 0.35), rgba(255, 140, 0, 0.14), rgba(120, 60, 0, 0.35));
    color: #ffb000;
    font-family: "Cascadia Mono", "JetBrains Mono", "DejaVu Sans Mono", Consolas, monospace;
    font-size: 0.78rem;
    letter-spacing: 0.18em;
    text-transform: uppercase;
    text-decoration: none;
    text-shadow: 0 0 6px rgba(255, 176, 0, 0.55);
    cursor: pointer;
    overflow: hidden;
    transition: background-color 0.15s ease, color 0.15s ease;
}
.bbs-sash:hover {
    color: #0a0a0a;
    background: #ffb000;
    text-shadow: none;
}
.bbs-sash:focus-visible {
    outline: 2px solid #ffd47a;
    outline-offset: 2px;
}

/* Blinking terminal caret bracketing the label. */
.bbs-sash .caret { animation: bbs-sash-blink 1.05s step-end infinite; }
@keyframes bbs-sash-blink { 50% { opacity: 0; } }

/* The label glitches: a periodic RGB-split judder over a steady phosphor flicker. */
.bbs-sash .label {
    position: relative;
    animation: bbs-sash-flicker 3.5s infinite steps(60);
}
.bbs-sash .label::before,
.bbs-sash .label::after {
    content: attr(data-text);
    position: absolute;
    inset: 0;
    clip-path: inset(0 0 0 0);
    opacity: 0.75;
    pointer-events: none;
}
.bbs-sash .label::before { color: #ff3b3b; animation: bbs-sash-glitch-r 3.2s infinite steps(40); }
.bbs-sash .label::after  { color: #35d0ff; animation: bbs-sash-glitch-c 2.7s infinite steps(40); }

@keyframes bbs-sash-flicker {
    0%, 92%, 100% { opacity: 1; }
    93% { opacity: 0.72; }
    97% { opacity: 0.9; }
}
@keyframes bbs-sash-glitch-r {
    0%, 88%, 100% { transform: translate(0, 0); opacity: 0; }
    90% { transform: translate(-2px, -1px); opacity: 0.8; }
    94% { transform: translate(2px, 1px); opacity: 0.8; }
}
@keyframes bbs-sash-glitch-c {
    0%, 85%, 100% { transform: translate(0, 0); opacity: 0; }
    88% { transform: translate(2px, 0); opacity: 0.75; }
    92% { transform: translate(-2px, 1px); opacity: 0.75; }
}

@media (prefers-reduced-motion: reduce) {
    .bbs-sash .caret,
    .bbs-sash .label,
    .bbs-sash .label::before,
    .bbs-sash .label::after { animation: none !important; }
    .bbs-sash .label::before,
    .bbs-sash .label::after { opacity: 0 !important; }
}
