html {
    scroll-behavior: smooth;
}

body {
    margin: 0;
    min-height: 100vh;
    display: flex;
    flex-direction: column;
    font-family: "Inter", sans-serif;
    background: #f8fafc;
    color: #131b2e;
}

/* Pins the footer to the viewport bottom on short pages instead of
   letting it trail directly under whatever content happens to be
   above it. Fixed/absolute-positioned children (the React background,
   nav menu, intro overlay) are out of flow and unaffected by this. */
body > main {
    flex: 1 0 auto;
}

body > footer {
    flex-shrink: 0;
}

/* Profile dropdown open/close animation -- same fade + zoom + slide-from-
   top feel as shadcn/Radix's Popover (data-[state=open]:animate-in
   fade-in-0 zoom-in-95 slide-in-from-top-2, and the reverse on close), done
   in plain CSS instead of pulling in Radix/CVA/TypeScript for it: this is a
   plain Vite+JSX project with no shadcn /components/ui structure or path
   aliases, so adding that whole toolchain for one dropdown's animation
   would be a much bigger, inconsistent change than the ask itself.
   #profileDropdown no longer carries a static `hidden` class in any page's
   markup (see index.html/dashboard.html/report.html/documentation.html) --
   this closed state replaces it, and auth.js toggles `.is-open` instead of
   `hidden`. Shared here (not per-page) since all four pages already load
   this one stylesheet and the one auth.js that drives it. */
#profileDropdown {
    transform-origin: top right;
    opacity: 0;
    transform: translateY(-8px) scale(0.95);
    pointer-events: none;
    transition: opacity 0.15s ease, transform 0.15s ease;
}

#profileDropdown.is-open {
    opacity: 1;
    transform: translateY(0) scale(1);
    pointer-events: auto;
}

*,
*::before,
*::after {
    box-sizing: border-box;
}

button,
input,
textarea,
select {
    font: inherit;
}

button {
    cursor: pointer;
}

button:disabled {
    cursor: not-allowed;
}

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

img {
    display: block;
    max-width: 100%;
}

.material-symbols-outlined {
    font-variation-settings:
        "FILL" 0,
        "wght" 400,
        "GRAD" 0,
        "opsz" 24;
}

.glass-card {
    background: rgba(255, 255, 255, 0.82);
    backdrop-filter: blur(8px);
    border: 1px solid var(--ss-border);
}

/* Authorization modal */

#confirmModal {
    overscroll-behavior: contain;
}

#modalScrollableContent {
    overscroll-behavior: contain;
    scrollbar-width: thin;
    scrollbar-color: #94a3b8 transparent;
}

#modalScrollableContent::-webkit-scrollbar {
    width: 8px;
}

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

#modalScrollableContent::-webkit-scrollbar-thumb {
    background: #94a3b8;
    border-radius: 9999px;
}

#modalScrollableContent::-webkit-scrollbar-thumb:hover {
    background: #64748b;
}

#ownershipVerificationPanel {
    margin-top: 16px;
}

#ownershipVerificationPanel code {
    white-space: pre-wrap;
    overflow-wrap: anywhere;
    word-break: break-word;
}

.copyVerificationValue {
    min-width: 42px;
}

/* Dashboard terminal */

.terminal-container {
    scrollbar-width: thin;
    scrollbar-color: #64748b transparent;
}

.terminal-container::-webkit-scrollbar {
    width: 6px;
}

.terminal-container::-webkit-scrollbar-track {
    background: transparent;
}

.terminal-container::-webkit-scrollbar-thumb {
    background: #64748b;
    border-radius: 9999px;
}

/* Report */

.gauge-ring {
    transition: stroke-dashoffset 1s ease-out;
}

.finding-card {
    transition:
        border-color 0.2s ease,
        box-shadow 0.2s ease,
        transform 0.2s ease;
}

.finding-card:hover {
    transform: translateY(-2px);
}

.report-json {
    max-height: 480px;
    overflow: auto;
    white-space: pre-wrap;
    overflow-wrap: anywhere;
}

.report-json::-webkit-scrollbar {
    width: 8px;
}

.report-json::-webkit-scrollbar-track {
    background: transparent;
}

.report-json::-webkit-scrollbar-thumb {
    background: #64748b;
    border-radius: 9999px;
}

.hidden {
    display: none;
}

@media (max-width: 640px) {
    #confirmModal {
        padding: 12px;
    }

    #modalScrollableContent {
        max-height: calc(100vh - 6rem);
    }
}
/* ------------------------------------------------------------------
   Knox global light/dark theme
   ------------------------------------------------------------------ */
:root {
    color-scheme: light;
    --ss-page: #f8fafc;
    --ss-surface: #ffffff;
    --ss-surface-low: #f1f5f9;
    --ss-surface-high: #e2e8f0;
    --ss-border: #e2e8f0;
    --ss-text: #0f172a;
    --ss-text-muted: #475569;
    --ss-primary: #2563eb;
    --ss-terminal: #111827;
}

html.dark {
    color-scheme: dark;
    --ss-page: #08111f;
    --ss-surface: #111c2e;
    --ss-surface-low: #17243a;
    --ss-surface-high: #223149;
    --ss-border: #334155;
    --ss-text: #f8fafc;
    --ss-text-muted: #cbd5e1;
    --ss-primary: #60a5fa;
    --ss-terminal: #050b14;
}

body {
    background-color: var(--ss-page) !important;
    color: var(--ss-text) !important;
    transition: background-color 180ms ease, color 180ms ease;
}

html.dark .bg-background,
html.dark .bg-surface-bright {
    background-color: var(--ss-page) !important;
}

html.dark .bg-surface,
html.dark .bg-surface-container-lowest,
html.dark .glass-card {
    background-color: var(--ss-surface) !important;
}

html.dark .bg-surface-container-low,
html.dark .bg-surface-container,
html.dark .bg-secondary-container {
    background-color: var(--ss-surface-low) !important;
}

html.dark .bg-surface-container-high,
html.dark .bg-surface-container-highest,
html.dark .bg-surface-variant {
    background-color: var(--ss-surface-high) !important;
}

html.dark .bg-inverse-surface {
    background-color: var(--ss-terminal) !important;
}

html.dark .text-on-background,
html.dark .text-on-surface,
html.dark .text-on-secondary-container {
    color: var(--ss-text) !important;
}

html.dark .text-on-surface-variant,
html.dark .text-secondary,
html.dark .text-outline {
    color: var(--ss-text-muted) !important;
}

html.dark .text-primary {
    color: var(--ss-primary) !important;
}

html.dark .border-border,
html.dark .border-outline,
html.dark .border-outline-variant {
    border-color: var(--ss-border) !important;
}

html.dark input,
html.dark textarea,
html.dark select {
    background-color: var(--ss-surface-low) !important;
    color: var(--ss-text) !important;
    border-color: var(--ss-border) !important;
}

html.dark input::placeholder,
html.dark textarea::placeholder {
    color: #94a3b8 !important;
}

html.dark table,
html.dark thead,
html.dark tbody,
html.dark tr,
html.dark td,
html.dark th {
    border-color: var(--ss-border) !important;
}

html.dark .shadow-sm,
html.dark .shadow-md,
html.dark .shadow-lg,
html.dark .shadow-xl,
html.dark .shadow-2xl {
    box-shadow: 0 14px 35px rgba(0, 0, 0, 0.28) !important;
}

/* Additional dark-mode coverage for project-specific utility colors. */
html.dark .bg-primary-fixed,
html.dark .bg-primary-fixed-dim {
    background-color: #1e3a5f !important;
}

html.dark .text-on-primary-fixed,
html.dark .text-on-primary-fixed-variant,
html.dark .text-primary-fixed-dim {
    color: #dbeafe !important;
}

html.dark .bg-error-container {
    background-color: #3f1d22 !important;
}

html.dark .text-on-error-container {
    color: #fecaca !important;
}

html.dark .bg-on-surface-variant\/10 {
    background-color: rgba(203, 213, 225, 0.10) !important;
}

html.dark .hover\:bg-surface-container-low:hover,
html.dark .hover\:bg-surface-container:hover {
    background-color: var(--ss-surface-high) !important;
}

html.dark .hover\:bg-primary-fixed:hover {
    background-color: #294b73 !important;
}

html.dark .hover\:text-on-surface:hover {
    color: var(--ss-text) !important;
}

html.dark .report-json,
html.dark pre,
html.dark code {
    border-color: var(--ss-border);
}

html.dark #modalScrollableContent::-webkit-scrollbar-thumb,
html.dark .terminal-container::-webkit-scrollbar-thumb,
html.dark .report-json::-webkit-scrollbar-thumb {
    background: #475569;
}

html.dark #modalScrollableContent::-webkit-scrollbar-thumb:hover,
html.dark .terminal-container::-webkit-scrollbar-thumb:hover,
html.dark .report-json::-webkit-scrollbar-thumb:hover {
    background: #64748b;
}

html.dark .text-error {
    color: #ffb4ab !important;
}

html.dark .text-warning {
    color: #fcd34d !important;
}

html.dark ::selection {
    background: #2563eb;
    color: #ffffff;
}

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

/* The page-wide Tailwind Play CDN (v3, JIT-scans the whole document
   including React-rendered markup) and the React app's own precompiled
   Tailwind v4 bundle both match utility classes like "-translate-y-1/2"
   on the same elements. v3 emits a legacy `transform: translateY()`
   rule; v4 emits a standalone `translate` property. Browsers apply both
   properties together (translate, then transform), so an element using
   the top-1/2 + -translate-y-1/2 centering pattern gets shifted twice.
   This only visibly breaks the vanish-input's submit button (the only
   React Bits element using that centering pattern so far), so the fix
   is scoped to it rather than disabling transforms globally. */
#knox-hero-input button[type="submit"] {
    transform: none !important;
}
