/* ==========================================================================
   File: style.css
   Description: Main stylesheet for the GEO Tool.
   Includes: Variables, Base, Layout, Content, Forms, Buttons,
             Components (Messages, Login, etc.), Utils.
   ========================================================================== */

/* ===================================== */
/* 1. CSS Variables (Palette & Config)  */
/* ===================================== */
:root {
    /* Base Colors - DEFAULT DARK THEME */
    --aurora-dark-bg: #121212;
    --aurora-content-bg: rgba(30, 30, 30, 0.95);
    --aurora-content-bg-lighter: rgba(42, 42, 42, 0.9);
    --aurora-text-light: #ececec;
    --aurora-text-white: #fafbfd;       /* tinted off-white (skill: never pure #fff) */
    --aurora-text-dark: #0d1117;        /* off-black (skill: never pure #000) */
    /* Tokens previously referenced as fallbacks but never declared.
       Defining them ensures icons/text actually adapt with the theme. */
    --aurora-text-muted: #a8b0bc;          /* ~6:1 on #121212 (was undefined → fallback #888 ≈3.5:1, AA fail) */
    --aurora-text: var(--aurora-text-light);
    --aurora-border: rgba(95, 102, 115, 0.7);

    /* Accent Colors */
    --aurora-cyan-original: #4DBEFF;
    --aurora-cyan-very-light: #B3F5FF;
    --aurora-cyan-hover: #7FEFFF;
    --aurora-electric-blue: #057DFF;
    --aurora-pink: #c4609b;             /* desaturated rose (was #E639A8 saturation 76% → 50%) */
    --aurora-pink-darker: #a44a82;
    --aurora-accent: var(--aurora-cyan-original);

    /* Utility & UI Element Colors */
    --aurora-top-btn-bg: rgba(200, 200, 200, 0.85);
    --aurora-top-btn-bg-hover: rgba(230, 230, 230, 0.95);
    --aurora-secondary-grey: #a8b0bc;       /* was #6c757d ≈4.4:1 borderline, now ≈6:1 on dark */
    --aurora-secondary-grey-hover: #c1c8d4;
    --aurora-disabled-text: var(--aurora-secondary-grey);
    --aurora-error-red: #ff6b6b;            /* slightly softer for AA on dark */
    --aurora-error-border: rgba(255, 107, 107, 0.7);
    --aurora-error-bg: rgba(255, 107, 107, 0.12);
    --aurora-success-green: #4ade80;        /* was `lightgreen` (#90EE90), now stronger */
    --aurora-success-border: rgba(74, 222, 128, 0.5);
    --aurora-success-bg: rgba(74, 222, 128, 0.12);
    --aurora-link-blue: #7fc8ff;
    --aurora-warning: #f0a830;
    --aurora-warning-bg: rgba(240, 168, 48, 0.12);
    --aurora-input-bg: var(--aurora-content-bg-lighter);
    --aurora-card-bg: var(--aurora-content-bg-lighter);
    --aurora-green: var(--aurora-success-green);

    /* Typography (skill rule: not Inter; premium sans for body, distinct display) */
    --font-sans: 'Geist', ui-sans-serif, system-ui, -apple-system, sans-serif;
    --font-display: 'Noto Sans Mono', ui-monospace, SFMono-Regular, Menlo, monospace;
    --font-mono: 'JetBrains Mono', ui-monospace, SFMono-Regular, Menlo, monospace;

    /* Transitions */
    --transition-fast: 0.2s ease;
    --transition-std: 0.3s ease-in-out;

    /* ---- Handoff token aliases (modern naming) ---------------------------
       Point to existing aurora values so both vocabularies resolve to the
       same color. New rules should prefer these; legacy rules unaffected. */
    --brand-blue:       var(--aurora-electric-blue);
    --brand-cyan:       var(--aurora-cyan-original);
    --brand-cyan-light: var(--aurora-cyan-very-light);
    --brand-cyan-hover: var(--aurora-cyan-hover);
    --brand-green:      #2ED47A;   /* tall bars in logo — not previously tokenized */

    --bg:         var(--aurora-dark-bg);
    --surface:    var(--aurora-content-bg);
    --surface-2:  var(--aurora-content-bg-lighter);
    --border:     var(--aurora-border);

    --fg:         var(--aurora-text-light);
    --fg-strong:  var(--aurora-text-white);
    --fg-muted:   var(--aurora-text-muted);
    --fg-inverse: var(--aurora-text-dark);

    --success:         var(--aurora-success-green);
    --success-bg:      var(--aurora-success-bg);
    --success-border:  var(--aurora-success-border);
    --warning:         var(--aurora-warning);
    --warning-bg:      var(--aurora-warning-bg);
    --danger:          var(--aurora-error-red);
    --danger-bg:       var(--aurora-error-bg);
    --danger-border:   var(--aurora-error-border);
    --info:            var(--brand-cyan);

    /* Score scale — align with existing score-color-* hex values */
    --score-green:  #38a169;
    --score-lime:   #68d391;
    --score-yellow: #F2A007;
    --score-red:    #FF4D6D;
    --score-gray:   #718096;

    /* Radius scale */
    --radius-sm:   6px;
    --radius-md:   8px;
    --radius-lg:   10px;
    --radius-xl:   13px;
    --radius-2xl:  16px;
    --radius-pill: 9999px;

    /* Shadow scale */
    --shadow-sm: 0 2px 5px rgba(15, 23, 42, 0.20);
    --shadow-md: 0 5px 15px rgba(15, 23, 42, 0.10);
    --shadow-lg: 0 12px 40px rgba(15, 23, 42, 0.30);

    /* Motion tokens (handoff names) */
    --easing:      cubic-bezier(0.25, 0.8, 0.25, 1);
    --easing-out:  cubic-bezier(0.16, 1, 0.3, 1);
    --dur-fast:    var(--transition-fast);
    --dur-std:     var(--transition-std);
}

/* ===================================== */
/* 1a. Light Theme Variables            */
/* ===================================== */
body.light-mode {
    --aurora-dark-bg: #f4f4f9;
    --aurora-content-bg: rgba(255, 255, 255, 0.95);
    --aurora-content-bg-lighter: #eef0f4;
    --aurora-text-light: #1f2937;           /* was #333, slightly tinted toward neutral-blue */
    --aurora-text-white: #0f172a;
    --aurora-text-dark: #0f172a;
    --aurora-text-muted: #56607a;           /* ≈7:1 on #f4f4f9 */
    --aurora-text: var(--aurora-text-light);
    --aurora-border: rgba(160, 170, 188, 0.7);

    --aurora-electric-blue: #0056b3;
    --aurora-cyan-original: #0056b3;
    --aurora-accent: var(--aurora-electric-blue);

    --aurora-secondary-grey: #475467;       /* ≈8.5:1 on #f4f4f9 */
    --aurora-secondary-grey-hover: #2a3344;
    --aurora-disabled-text: #6e7787;
    --aurora-link-blue: var(--aurora-electric-blue);
    --aurora-success-green: #1a6b3f;
    --aurora-success-border: rgba(26, 107, 63, 0.5);
    --aurora-success-bg: rgba(26, 107, 63, 0.08);
    --aurora-error-red: #c92a2a;            /* was #ff4d4d on dark; on light needs deeper red for AA */
    --aurora-error-border: rgba(201, 42, 42, 0.45);
    --aurora-error-bg: rgba(201, 42, 42, 0.06);
    --aurora-warning: #b87603;               /* darker than dark-mode #f0a830 for light AA */
    --aurora-warning-bg: rgba(184, 118, 3, 0.08);
    --aurora-input-bg: #fbfcfd;          /* tinted, not pure white */
    --aurora-card-bg: var(--aurora-content-bg-lighter);
    --aurora-green: var(--aurora-success-green);

    /* Handoff score-scale light-mode overrides (brand/bg/fg names already
       cascade via --aurora-*; only hardcoded scales need a swap). */
    --score-green: #1a7d3f;
    --score-lime:  #2b8a3e;
    --score-red:   #B8032A;
    --score-gray:  #4a5568;

    /* Explicit re-declarations of handoff aliases — guarantees resolution
       even if the aurora→alias chain mis-cascades on older engines. */
    --bg:         #f4f4f9;
    --surface:    rgba(255, 255, 255, 0.95);
    --surface-2:  #eef0f4;
    --border:     rgba(160, 170, 188, 0.7);
    --fg:         #1f2937;
    --fg-strong:  #0f172a;
    --fg-muted:   #56607a;
    --fg-inverse: #0f172a;
    --brand-blue: #0056b3;
    --brand-cyan: #0056b3;
    --info:       #0056b3;
}

/* ===================================== */
/* 2. Base & Typography Styles          */
/* ===================================== */
* {
    box-sizing: border-box;
    margin: 0;
    padding: 0;
}

/* ===================================== */
/* 2a. Focus Indicators (WCAG 2.4.7)    */
/* ===================================== */
/* Suppress the default focus ring on mouse interaction, but always show a
   clear outline for keyboard users via :focus-visible. The outline is
   offset-based so it doesn't clip against rounded surfaces. */
:focus {
    outline: none;
}
:focus-visible {
    outline: 2px solid var(--aurora-accent);
    outline-offset: 2px;
    border-radius: inherit;
}
/* Form controls sit flush to borders — a tighter offset reads better. */
input:focus-visible,
textarea:focus-visible,
select:focus-visible {
    outline-offset: 1px;
    outline-width: 2px;
}
/* Inputs already have their own border; amplify it for additional clarity. */
#url-input:focus-visible,
.login-modal input:focus-visible {
    outline-color: var(--aurora-accent);
    box-shadow: 0 0 0 3px color-mix(in srgb, var(--aurora-accent) 25%, transparent);
}
/* Custom clickable surfaces — these are divs/rows with JS handlers. They get
   a visible ring that respects their rounded shape. */
.breakdown-row:focus-visible,
.history-dropdown li:focus-visible,
.gated-lock:focus-visible,
.llms-info-btn:focus-visible,
.sb-nav-item:focus-visible,
.sb-account:focus-visible,
.login-toggle-btn:focus-visible,
.headings-toggle:focus-visible,
.detail-back:focus-visible,
.login-modal-close:focus-visible {
    outline: 2px solid var(--aurora-accent);
    outline-offset: 2px;
}
/* Skip focus ring inside disabled controls. */
:disabled:focus-visible {
    outline: none;
}
/* High-contrast mode users get a thicker ring. */
@media (prefers-contrast: more) {
    :focus-visible {
        outline-width: 3px;
    }
}

/* ===================================== */
/* 2b. Touch Targets (WCAG 2.5.5)       */
/* ===================================== */
/* Every interactive control gets a ≥44px hit area. For inline icon buttons
   embedded in labels we grow the target via padding + equal negative margin,
   so the hit area expands but the surrounding layout stays put. */

/* Sidebar controls */
.sb-theme-btn        { min-width: 40px; min-height: 40px; }
.sb-theme-btn-mobile,
.sb-hamburger        { min-width: 44px; min-height: 44px; }
.sb-nav-item         { min-height: 40px; }
.sb-account          { min-height: 44px; }

/* History dropdown: rows and the delete X */
.history-dropdown li { min-height: 44px; }
.history-dropdown .history-delete {
    padding: 10px;
    margin: -8px -4px -8px -10px;
    min-width: 32px;
    min-height: 32px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    border-radius: 6px;
}

/* Inline info buttons next to category titles — keep glyph visually small
   but expose a 32×32 hit area through padding. The symmetric negative
   margin cancels the added space so inline text doesn't shift. */
.llms-info-btn,
.cd-info-btn {
    padding: 8px;
    margin: -8px -4px;
    min-width: 32px;
    min-height: 32px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    border-radius: 6px;
    cursor: pointer;
}

/* Expand/collapse chevron on heading analysis rows */
.headings-toggle {
    padding: 10px;
    margin: -8px -4px;
    min-width: 36px;
    min-height: 36px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    border-radius: 6px;
}

/* Score breakdown rows — primary interactive surface of the report */
.breakdown-row       { min-height: 44px; }

/* Back link on detail panels */
.detail-back {
    min-height: 40px;
    padding: 10px 14px 10px 8px;
    display: inline-flex;
    align-items: center;
}

/* Social links in the company profile card */
.cd-social-link {
    width: 36px;
    height: 36px;
}

/* Modal close button (×) — tiny glyph, larger hit area */
.login-modal-close {
    min-width: 36px;
    min-height: 36px;
    padding: 4px 8px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
}

/* Crawl button "Analyze" already large. Ensure generic .btn stays ≥40px. */
.btn { min-height: 40px; }

body {
    font-family: var(--font-sans);
    font-feature-settings: "ss01", "cv11";
    -webkit-font-smoothing: antialiased;
    -moz-osx-font-smoothing: grayscale;
    background-color: var(--aurora-dark-bg);
    color: var(--aurora-text-light);
    margin: 0;
    padding: 0;
}
body.transitions-ready {
    transition: background-color var(--transition-std), color var(--transition-std);
}

h1, h2, h3, h4 {
    font-family: var(--font-display);
    color: var(--aurora-text-white);
    margin-bottom: 15px;
    font-weight: 600;
    letter-spacing: -0.01em;        /* subtle tighten — mono needs less than proportional */
    line-height: 1.2;
}
h1 {
    margin-bottom: 8px;
    font-size: 2em;
    letter-spacing: -0.015em;
}

/* Home hero — brand lockup: logo A9 + wordmark side-by-side */
.hero-brand {
    display: flex;
    align-items: center;
    gap: 8px;                               /* tighter lockup: wordmark close to logo */
    margin-bottom: 12px;
    flex-wrap: wrap;
}
.hero-brand h1 {
    margin: 0;
    line-height: 1;
    color: var(--aurora-electric-blue);     /* "visibility" — matches logo circle (#057DFF) */
    /* Optical centering: nudge the wordmark down so the x-height of
       the lowercase letters sits at the same level as the logo bars. */
    transform: translateY(-3px);
}
/* Wordmark parts — each matches a logo element:
   "visibility" inherits blue (circle),
   "check" → green (tall bars),
   ".ai"    → cyan (short bars). */
.hero-brand .brand-check { color: #2ED47A; }
.hero-brand .brand-tld   { color: #4DBEFF; }
/* Light-mode: "check" darkened to pass AA contrast on #f4f4f9.
   ".ai" kept at exact logo cyan by explicit user choice (fails AA, accepted). */
body.light-mode .hero-brand .brand-check { color: #1a8644; }

.hero-logo {
    flex-shrink: 0;
    display: block;
}
@media (max-width: 480px) {
    .hero-logo { width: 40px; height: 40px; }
    .hero-brand { gap: 6px; }
}
.hero-subtitle {
    font-size: 0.95rem;
    color: var(--aurora-secondary-grey);
    margin-bottom: 22px;
    font-weight: 400;
}
.url-label-small {
    font-size: 0.85rem;
}
h2 { font-size: 1.6em; }
h3 { font-size: 1.3em; margin-top: 25px; }
h4 { font-size: 1.1em; margin-bottom: 10px; color: var(--aurora-text-muted); }

p {
    margin-bottom: 20px;
    line-height: 1.6;
}

hr {
    border: none;
    border-top: 2px solid var(--aurora-electric-blue);
    margin: 25px 0;
    opacity: 0.6;
}

blockquote {
    border-left: 4px solid var(--aurora-cyan-original);
    padding-left: 15px;
    margin: 15px 0 20px 5px;
    font-style: italic;
    color: var(--aurora-text-muted);
}

pre, code {
    font-family: var(--font-mono);
    font-size: 0.875em;
}
pre {
    color: var(--aurora-text-light);
    background-color: var(--aurora-content-bg-lighter);
    padding: 10px 15px;
    border-radius: 6px;
    white-space: pre-wrap;
    word-wrap: break-word;
    margin-top: 10px;
    border: 1px solid var(--aurora-border);
}

/* Standard Links (inside content) */
.content-container a:not(.btn):not(.top-bar-btn):not([class*="btn-"]) {
    color: var(--aurora-cyan-original);
    text-decoration: underline;
    transition: color var(--transition-fast), text-decoration var(--transition-fast);
}
.content-container a:not(.btn):not(.top-bar-btn):not([class*="btn-"]):hover {
    color: var(--aurora-cyan-very-light);
    text-decoration: none;
}
body.light-mode .content-container a:not(.btn):not(.top-bar-btn):not([class*="btn-"]):hover {
    color: var(--aurora-text-dark);
}

/* ===================================== */
/* 3. Layout: Main Content              */
/* ===================================== */
.main-content {
    padding: 30px 40px;
    padding-top: 64px;
    max-width: 960px;
    margin: 0 auto;
}

.content-container {
    background-color: var(--aurora-content-bg);
    padding: 30px 40px;
    border-radius: 15px;
    box-shadow: 0 5px 15px rgba(15, 23, 42, 0.1);
    width: 100%;
    transition: background-color var(--transition-std);
}

/* ===================================== */
/* 4. Top Bar                           */
/* ===================================== */
.top-bar {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    z-index: 50;
    display: flex;
    align-items: center;
    justify-content: space-between;
    height: 48px;
    padding: 0 20px;
    background-color: var(--surface);
    border-bottom: 1px solid var(--aurora-border);
    transition: transform 0.3s ease;
}
.top-bar-hidden {
    transform: translateY(-100%);
}

/* Left nav links */
.top-bar-left {
    display: flex;
    align-items: center;
    gap: 20px;
}
.top-bar-link {
    font-size: 1rem;
    font-weight: 500;
    color: var(--aurora-text-muted, #888);
    text-decoration: none;
    transition: color var(--transition-fast);
    white-space: nowrap;
}
.top-bar-link:hover {
    color: var(--aurora-text-light);
}
body.light-mode .top-bar-link:hover {
    color: var(--aurora-text-dark);
}

/* Right side: user info + buttons */
.top-bar-right {
    display: flex;
    align-items: center;
    gap: 10px;
}

/* Buttons inside top bar */
.top-bar-btn {
    background-color: var(--aurora-top-btn-bg);
    color: var(--aurora-text-dark);
    border: none;
    border-radius: 8px;
    padding: 8px 12px;
    cursor: pointer;
    font-size: 16px;
    line-height: 1;
    transition: background-color var(--transition-fast), color var(--transition-fast);
    box-shadow: 0 2px 5px rgba(15, 23, 42, 0.2);
}
.top-bar-btn:hover {
    background-color: var(--aurora-top-btn-bg-hover);
    color: var(--aurora-text-dark);
}

#theme-toggle {
    height: 24px;
    width: 24px;
    padding: 0;
    display: flex;
    align-items: center;
    justify-content: center;
}
#theme-toggle svg {
    width: 14px;
    height: 14px;
}

/* "Logged in as email" label */
.top-bar-user {
    font-size: 12px;
    color: var(--aurora-text-muted, #888);
    line-height: 1;
    white-space: nowrap;
}
.top-bar-user strong {
    color: var(--aurora-text-light);
}

/* Login/Logout text button */
.login-toggle-btn {
    height: 24px;
    width: auto;
    padding: 0 10px;
    font-size: 12px;
    font-weight: 600;
    letter-spacing: 0.3px;
}


/* ===================================== */
/* 4b. Sidebar (handoff redesign)       */
/* ===================================== */
/* Desktop sidebar */
.sb-desktop {
    width: 240px;
    flex-shrink: 0;
    border-right: 1px solid var(--border);
    background: var(--surface);
    padding: 14px 12px;
    display: flex;
    flex-direction: column;
    height: 100vh;
    position: sticky;
    top: 0;
    transition: width .22s ease, padding .22s ease;
    overflow: hidden;
    padding-top: 48px; /* leave room for the collapse button at the top */
}
/* Collapsed state — icons-only rail (scoped to desktop sidebar so mobile drawer is unaffected) */
body.sb-collapsed .sb-desktop {
    width: 64px;
    padding: 56px 8px 14px; /* keep top clearance so the first nav icon sits below the collapse button */
}
body.sb-collapsed .sb-desktop .sb-brand-text,
body.sb-collapsed .sb-desktop .sb-nav-item > span:not(.sb-nav-icon),
body.sb-collapsed .sb-desktop .sb-account-info {
    display: none;
}
body.sb-collapsed .sb-desktop .sb-theme-btn { width: 40px; margin: 0 auto; }
body.sb-collapsed .sb-desktop .sb-primary-btn { display: none; }
body.sb-collapsed .sb-nav-item { justify-content: center; padding: 10px 0; }
body.sb-collapsed .sb-account { justify-content: center; padding: 6px 0; }
body.sb-collapsed .sb-brand { justify-content: center; padding: 6px 0 14px; }
body.sb-collapsed .sb-header { flex-direction: column; align-items: stretch; gap: 6px; padding-top: 10px; }

.sb-collapse-btn {
    position: absolute;
    top: 12px;
    right: 10px;
    width: 28px;
    height: 28px;
    border-radius: var(--radius-md);
    border: 1px solid var(--border);
    background: var(--surface-2);
    color: var(--fg-muted);
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 0;
    z-index: 2;
    transition: background .15s, color .15s;
}
body.sb-collapsed .sb-collapse-btn {
    right: 50%;
    transform: translateX(50%);
}
.sb-collapse-btn:hover { background: var(--surface-2); color: var(--fg-strong); }
.sb-collapse-btn svg { transition: transform .22s ease; }
body.sb-collapsed .sb-collapse-btn svg { transform: rotate(180deg); }

.sb-brand {
    display: flex;
    align-items: center;
    gap: 8px;
    padding: 6px 6px 14px;
    border-bottom: 1px solid var(--border);
    margin-bottom: 12px;
}
.sb-brand-text {
    font-family: var(--font-display);
    font-weight: 700;
    font-size: 1rem;
    letter-spacing: -.01em;
    white-space: nowrap;
}
.sb-primary-btn {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 6px;
    width: 100%;
    padding: 10px;
    border-radius: var(--radius-md);
    border: 1px solid rgba(5,125,255,.4);
    background: linear-gradient(180deg, rgba(64,156,255,.2) 0%, rgba(5,125,255,.4) 100%);
    color: #fff;
    font-weight: 600;
    font-size: .88rem;
    cursor: pointer;
    font-family: var(--font-sans);
    transition: background .2s;
    text-shadow: 0 1px 2px rgba(15,23,42,.3);
    box-shadow: inset 0 1px 1px rgba(255,255,255,.2);
    text-decoration: none;
}
.sb-primary-btn:hover {
    background: linear-gradient(180deg, rgba(64,156,255,.3) 0%, rgba(5,125,255,.5) 100%);
    color: #fff;
}
.sb-nav {
    display: flex;
    flex-direction: column;
    gap: 2px;
    margin-top: 14px;
}
.sb-nav-item {
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 8px 10px;
    border-radius: var(--radius-md);
    background: transparent;
    border: none;
    color: var(--fg-muted);
    font-size: .9rem;
    font-weight: 500;
    cursor: pointer;
    text-align: left;
    font-family: var(--font-sans);
    transition: background .15s, color .15s;
    white-space: nowrap;
    text-decoration: none;
}
.sb-nav-item:hover {
    background: var(--surface-2);
    color: var(--fg);
}
.sb-nav-item.active {
    background: var(--surface-2);
    color: var(--fg-strong);
    font-weight: 600;
}
.sb-nav-icon {
    display: flex;
    align-items: center;
    opacity: .85;
    flex-shrink: 0;
}
.sb-footer {
    padding-top: 10px;
    border-top: 1px solid var(--border);
    display: flex;
    align-items: center;
    gap: 8px;
}
/* Account button + theme toggle, sitting right below the nav. */
.sb-header {
    display: flex;
    align-items: center;
    gap: 8px;
    padding-top: 10px;
    margin-top: 10px;
    border-top: 1px solid var(--border);
}
.sb-account {
    flex: 1;
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 6px 8px;
    border-radius: var(--radius-md);
    border: none;
    background: transparent;
    cursor: pointer;
    min-width: 0;
    text-align: left;
    font-family: var(--font-sans);
    transition: background .15s;
    color: inherit;
}
.sb-account:hover { background: var(--surface-2); }
.sb-account.active { background: var(--surface-2); }
.sb-avatar {
    width: 30px;
    height: 30px;
    border-radius: 50%;
    background: linear-gradient(135deg, var(--brand-cyan), var(--brand-blue));
    color: #fff;
    display: flex;
    align-items: center;
    justify-content: center;
    font-weight: 700;
    font-size: .88rem;
    flex-shrink: 0;
}
.sb-avatar.anonymous {
    background: var(--surface-2);
    color: var(--fg-muted);
    border: 1px dashed var(--border);
}
.sb-account-info { min-width: 0; flex: 1; }
.sb-account-label {
    font-size: .78rem;
    font-weight: 600;
    color: var(--fg);
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}
.sb-account-sub {
    font-size: .7rem;
    color: var(--fg-muted);
    margin-top: 2px;
}
.sb-signin-link {
    color: var(--brand-cyan);
    cursor: pointer;
    font-weight: 600;
}
.sb-signin-link:hover { color: var(--brand-cyan-hover); }

.sb-theme-btn {
    flex-shrink: 0;
    background: var(--surface-2);
    border: 1px solid var(--border);
    color: var(--fg);
    width: 32px;
    height: 32px;
    border-radius: var(--radius-md);
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    padding: 0;
}
.sb-theme-btn:hover {
    background: var(--surface);
    color: var(--fg-strong);
}

/* Mobile top bar + drawer */
.sb-mobile-bar { display: none; }
.sb-drawer { display: none; }
.sb-scrim { display: none; }

@media (max-width: 900px) {
    .sb-desktop { display: none; }

    .sb-mobile-bar {
        display: flex;
        align-items: center;
        gap: 10px;
        height: 48px;
        padding: 0 8px 0 12px;
        background: var(--surface);
        border-bottom: 1px solid var(--border);
        position: sticky;
        top: 0;
        z-index: 40;
        width: 100%;
    }
    .sb-hamburger, .sb-theme-btn-mobile {
        background: transparent;
        border: none;
        color: var(--fg);
        padding: 6px;
        cursor: pointer;
        border-radius: var(--radius-md);
        display: flex;
        align-items: center;
        justify-content: center;
    }
    .sb-mobile-brand { margin-right: auto; } /* push theme button hard right */
    .sb-hamburger:hover, .sb-theme-btn-mobile:hover { background: var(--surface-2); }
    .sb-mobile-brand {
        display: flex;
        align-items: center;
        gap: 6px;
        min-width: 0;
    }
    .sb-mobile-brand-text {
        font-family: var(--font-display);
        font-weight: 700;
        font-size: .95rem;
        letter-spacing: -.01em;
        overflow: hidden;
        text-overflow: ellipsis;
        white-space: nowrap;
    }
    .sb-scrim {
        display: block;
        position: fixed;
        top: 48px;
        left: 0;
        right: 0;
        bottom: 0;
        background: rgba(15,23,42,.5);
        z-index: 60;
        opacity: 0;
        pointer-events: none;
        transition: opacity .2s ease;
    }
    .sb-scrim.open { opacity: 1; pointer-events: auto; }
    /* Full-width dropdown panel sliding down from below the mobile top bar.
       Closed state uses translateY(calc(-100% - 48px)) so the bottom edge
       clears the 48px mobile-bar — otherwise the drawer's last nav item
       would peek through under the top bar (drawer has higher z-index). */
    .sb-drawer {
        display: flex;
        flex-direction: column;
        position: fixed;
        top: 48px;
        left: 0;
        right: 0;
        width: 100%;
        max-width: none;
        max-height: calc(100vh - 48px);
        overflow-y: auto;
        background: var(--surface);
        border-bottom: 1px solid var(--border);
        padding: 14px 16px;
        z-index: 70;
        transform: translateY(calc(-100% - 48px));
        transition: transform .22s ease;
        box-shadow: var(--shadow-lg);
    }
    .sb-drawer.open { transform: translateY(0); }
    /* Stack nav items comfortably — no duplicate brand inside drawer */
    .sb-drawer .sb-brand { display: none; }
    .sb-drawer .sb-primary-btn { margin-bottom: 8px; }
}

/* Layout helper: sidebar + main content side-by-side on desktop */
body.sb-layout {
    margin: 0;
    padding: 0;
    min-height: 100vh;
    background: var(--bg);
    display: flex;
}
@media (max-width: 900px) {
    body.sb-layout { flex-direction: column; }
}
/* Override legacy .main-content top padding (needed for old top-bar) when sb-layout is active */
body.sb-layout .main-content {
    padding: 40px;
    padding-top: 40px;
    max-width: 960px;
    margin: 0 auto;
    width: 100%;
    /* flex: 1 0 auto → grow to fill remaining space, but never shrink below
       content size. The previous `flex: 1` (= 1 1 0%) allowed the main column
       to shrink below its natural content height on mobile, which prevented
       the body from growing past 100vh and cut off lower sections. */
    flex: 1 0 auto;
    min-width: 0;
}
@media (max-width: 900px) {
    body.sb-layout .main-content { padding: 24px 16px; }
}


/* ===================================== */
/* 5. Forms & Inputs                    */
/* ===================================== */
input[type="text"],
input[type="password"],
textarea {
    width: 100%;
    padding: 11px 13px;
    margin-bottom: 20px;
    border: 1px solid var(--aurora-border);
    border-radius: 8px;
    background-color: var(--aurora-content-bg-lighter);
    color: var(--aurora-text-light);
    font-size: 14px;
    transition: background-color var(--transition-std), color var(--transition-std), border-color var(--transition-fast);
}

input[type="text"]:focus,
input[type="password"]:focus,
textarea:focus {
    outline: none;
    border-color: var(--aurora-cyan-original);
}

textarea {
    min-height: 100px;
    resize: vertical;
}

label {
    display: block;
    margin-bottom: 8px;
    font-weight: bold;
}

/* ===================================== */
/* 6. Buttons (General & Variants)      */
/* ===================================== */
.btn {
    display: inline-block;
    padding: 11px 28px;
    border: none;
    border-radius: 22px;
    background-color: var(--aurora-cyan-very-light);
    color: var(--aurora-text-dark);
    font-size: 15px;
    font-weight: bold;
    cursor: pointer;
    text-decoration: none;
    text-align: center;
    transition: background-color var(--transition-fast), transform var(--transition-fast);
    margin: 5px 8px;
    vertical-align: middle;
}
.btn:not(.ai-genfiles-btn):not(.cd-ai-btn):hover {
    background-color: var(--aurora-cyan-hover);
    color: var(--aurora-text-dark);
    transform: translateY(-1px);
}
.btn:active { transform: translateY(0px); }
.btn:disabled { opacity: 0.6; cursor: not-allowed; transform: none; }

.btn-secondary { background-color: var(--aurora-secondary-grey); color: var(--aurora-text-white); }
.btn-secondary:hover { background-color: var(--aurora-secondary-grey-hover); color: var(--aurora-text-white); transform: translateY(-1px); }
.btn-secondary:disabled { background-color: var(--aurora-secondary-grey); color: var(--aurora-text-white); opacity: 0.6; cursor: not-allowed; }

.btn-pink { background-color: var(--aurora-pink); color: var(--aurora-text-white); }
.btn-pink:hover { background-color: var(--aurora-pink-darker); color: var(--aurora-text-white); transform: translateY(-1px); }

.button-group { margin-top: 25px; text-align: center; }
.button-group .btn { margin: 5px 8px; }

/* Universal tactile press feedback (skill: simulate physical push) */
.btn:not(:disabled):active,
.btn-secondary:not(:disabled):active,
.btn-pink:not(:disabled):active,
.pricing-cta:not(:disabled):active,
.share-results-btn:not(:disabled):active,
.gated-cta-btn:not(:disabled):active,
.gated-lock:active,
.cd-ai-btn:not(:disabled):active,
.ai-genfiles-btn:not(:disabled):active,
.login-modal-submit:not(:disabled):active,
.headings-toggle:active,
.history-delete:active {
    transform: scale(0.98);
    transition-duration: 80ms;
}

/* ===================================== */
/* 7. UI Components & Feedback          */
/* ===================================== */

/* Spinner */
.spinner {
    display: inline-block;
    border: 3px solid rgba(255, 255, 255, 0.3);
    border-radius: 50%;
    border-top-color: var(--aurora-cyan-original);
    width: 1em;
    height: 1em;
    animation: spin 1s linear infinite;
    margin-right: 8px;
    vertical-align: middle;
}
@keyframes spin { to { transform: rotate(360deg); } }

/* visibilitycheck logo used as loading indicator — bars pulse rise/fall, circle spins */
.vc-logo-spinner {
    display: inline-block;
    width: 1.9em;
    height: 1.9em;
    margin-right: 10px;
    vertical-align: middle;
    flex-shrink: 0;
}
.vc-logo-spinner line {
    transform-box: fill-box;
    transform-origin: center;
    animation: vc-bar-pulse 1.1s ease-in-out infinite;
}
.vc-logo-spinner line:nth-of-type(1) { animation-delay: 0s; }
.vc-logo-spinner line:nth-of-type(2) { animation-delay: 0.12s; }
.vc-logo-spinner line:nth-of-type(3) { animation-delay: 0.24s; }
.vc-logo-spinner line:nth-of-type(4) { animation-delay: 0.36s; }
.vc-logo-spinner line:nth-of-type(5) { animation-delay: 0.48s; }
@keyframes vc-bar-pulse {
    0%, 100% { transform: scaleY(0.3); }
    50%      { transform: scaleY(1); }
}
@media (prefers-reduced-motion: reduce) {
    .vc-logo-spinner line { animation: none; }
}

/* Loading/Error/Success Messages */
.loading-indicator { margin-top: 15px; font-style: italic; color: var(--aurora-text-muted); text-align: center; width: 100%; }
.error-message {
    margin-top: 15px;
    color: var(--aurora-error-red);
    font-weight: bold;
    background-color: var(--aurora-error-bg);
    padding: 10px 15px;
    border-radius: 8px;
    border: 1px solid var(--aurora-error-border);
    text-align: left;
}
.success-message {
    margin-top: 15px;
    color: var(--aurora-success-green);
    font-weight: bold;
    background-color: var(--aurora-success-bg);
    padding: 10px 15px;
    border-radius: 8px;
    border: 1px solid var(--aurora-success-border);
    text-align: left;
}
.feedback-area { margin-top: 15px; width: 100%; text-align: center; min-height: 2em; }

/* Result Output Box */
.result-output {
    margin-top: 25px;
    padding: 20px 25px;
    background-color: var(--aurora-content-bg-lighter);
    border-radius: 8px;
    text-align: left;
    border: 1px solid var(--aurora-border);
}
.result-output h2 { margin-top: 0; margin-bottom: 20px; border-bottom: 1px solid var(--aurora-border); padding-bottom: 10px; }
.result-output p { margin-bottom: 15px; }

/* ===================================== */
/* 8. Login Page                        */
/* ===================================== */
body.login-page {
    display: flex;
    justify-content: center;
    align-items: center;
    min-height: 100vh;
    padding: 20px;
}

.login-box {
    width: 100%;
    max-width: 380px;
    background-color: var(--aurora-content-bg);
    border: 1px solid var(--aurora-border);
    border-radius: 13px;
    padding: 32px 28px;
    text-align: center;
    box-shadow: 0 5px 15px rgba(15, 23, 42, 0.1);
    transition: background-color var(--transition-std), border-color var(--transition-std);
}

.login-box h1 {
    font-size: 1.4rem;
    margin-bottom: 24px;
}

.login-box input[type="text"],
.login-box input[type="password"] {
    margin-bottom: 15px;
}

.login-box .btn-login {
    width: 100%;
    padding: 11px;
    background-color: var(--aurora-cyan-very-light);
    border: none;
    border-radius: 22px;
    color: var(--aurora-text-dark);
    font-size: 0.9rem;
    font-weight: 600;
    cursor: pointer;
    margin-top: 5px;
    transition: background-color var(--transition-fast), transform var(--transition-fast);
}
.login-box .btn-login:hover {
    background-color: var(--aurora-cyan-hover);
    transform: translateY(-1px);
}
.login-box .btn-login:active {
    transform: translateY(0);
}

.login-error {
    margin-top: 15px;
    padding: 10px 15px;
    background-color: var(--aurora-error-bg);
    border: 1px solid var(--aurora-error-border);
    border-radius: 8px;
    color: var(--aurora-error-red);
    font-size: 0.9rem;
}

/* Theme toggle on login page */
.login-theme-toggle {
    position: fixed;
    top: 15px;
    right: 15px;
}

/* ===================================== */
/* Login Modal                          */
/* ===================================== */
.login-modal-overlay {
    position: fixed;
    inset: 0;
    z-index: 100;
    background: rgba(15, 23, 42, 0.5);
    backdrop-filter: blur(4px);
    display: flex;
    align-items: flex-start;
    justify-content: center;
    padding-top: 80px;
}
.login-modal {
    width: 100%;
    max-width: 360px;
    background: var(--aurora-content-bg);
    border: 1px solid var(--aurora-border);
    border-radius: 16px;
    padding: 32px 28px 28px;
    position: relative;
    box-shadow: 0 12px 40px rgba(15, 23, 42, 0.3);
    animation: loginModalIn 0.2s ease-out;
}
@keyframes loginModalIn {
    from { opacity: 0; transform: translateY(-12px); }
    to   { opacity: 1; transform: translateY(0); }
}
.login-modal-close {
    position: absolute;
    top: 12px;
    right: 14px;
    background: none;
    border: none;
    font-size: 22px;
    color: var(--aurora-text-light);
    cursor: pointer;
    line-height: 1;
    padding: 2px 6px;
    border-radius: 6px;
    transition: background var(--transition-fast);
}
.login-modal-close:hover {
    background: var(--aurora-top-btn-bg-hover);
}
.login-modal-header {
    text-align: center;
    margin-bottom: 24px;
}
.login-modal-header h2 {
    font-size: 1.3rem;
    margin: 0 0 6px;
}
.login-modal-subtitle {
    font-size: 0.85rem;
    color: var(--aurora-text-muted, #888);
    margin: 0;
}
#google-signin-wrapper {
    display: flex;
    justify-content: center;
    margin-bottom: 4px;
}
.login-modal-divider {
    display: flex;
    align-items: center;
    margin: 16px 0;
    gap: 12px;
    color: var(--aurora-text-muted, #888);
    font-size: 0.8rem;
}
.login-modal-divider::before,
.login-modal-divider::after {
    content: '';
    flex: 1;
    height: 1px;
    background: var(--aurora-border);
}
#email-login-form input {
    width: 100%;
    margin-bottom: 10px;
    padding: 10px 14px;
    border: 1px solid var(--aurora-border);
    border-radius: 10px;
    background: var(--aurora-input-bg);
    color: var(--aurora-text-light);
    font-size: 0.9rem;
    box-sizing: border-box;
    transition: border-color var(--transition-fast);
}
#email-login-form input:focus {
    outline: none;
    border-color: var(--aurora-cyan-very-light);
}
.login-modal-submit {
    width: 100%;
    padding: 10px;
    border-radius: 10px;
    font-weight: 600;
    font-size: 0.9rem;
    margin-top: 4px;
}
.login-modal-reason {
    margin-bottom: 16px;
    padding: 12px 14px;
    border-radius: 10px;
    background: rgba(40, 210, 130, 0.08);
    border: 1px solid rgba(40, 210, 130, 0.25);
    color: var(--aurora-text-light);
    font-size: 0.88rem;
    text-align: center;
    line-height: 1.5;
}
body.light-mode .login-modal-reason {
    background: rgba(220, 245, 230, 0.5);
    border-color: rgba(50, 180, 110, 0.3);
}
.login-modal-error {
    margin-top: 12px;
    padding: 8px 12px;
    border-radius: 8px;
    background: var(--aurora-error-bg);
    border: 1px solid var(--aurora-error-border);
    color: var(--aurora-error-red);
    font-size: 0.85rem;
    text-align: center;
}
.login-modal-success {
    margin-top: 12px;
    padding: 10px 14px;
    border-radius: 8px;
    background: rgba(40, 210, 130, 0.15);
    border: 1px solid rgba(40, 210, 130, 0.4);
    color: var(--aurora-green, #48bb78);
    font-size: 0.85rem;
    text-align: center;
}
/* Logged-in profile view */
.login-modal-user {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 12px;
    margin-bottom: 20px;
}
.login-modal-avatar {
    width: 56px;
    height: 56px;
    border-radius: 50%;
    overflow: hidden;
    display: flex;
    align-items: center;
    justify-content: center;
    background: var(--aurora-top-btn-bg);
    border: 2px solid var(--aurora-border);
}
.login-avatar-img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    border-radius: 50%;
}
.login-modal-username {
    font-size: 1.05rem;
    font-weight: 600;
}
.login-modal-logout {
    display: block;
    width: 100%;
    text-align: center;
    padding: 10px;
    border-radius: 10px;
    text-decoration: none;
    font-weight: 600;
    font-size: 0.9rem;
}
.login-modal-actions {
    display: flex;
    flex-direction: column;
    gap: 8px;
}
.login-modal-account-btn,
.login-modal-signout-btn {
    display: block;
    width: 100%;
    padding: 10px 14px;
    border-radius: 10px;
    font-weight: 600;
    font-size: 0.9rem;
    text-align: center;
    text-decoration: none;
    cursor: pointer;
    border: 1px solid var(--border);
    font-family: var(--font-sans);
    transition: background .15s, color .15s, border-color .15s;
}
.login-modal-account-btn {
    background: var(--brand-blue);
    color: #fff;
    border-color: var(--brand-blue);
}
.login-modal-account-btn:hover {
    background: var(--brand-blue-hover, #0466d6);
    color: #fff;
}
.login-modal-signout-btn {
    background: transparent;
    color: var(--fg);
}
.login-modal-signout-btn:hover {
    background: var(--surface-2);
    color: var(--fg-strong);
}

/* ===================================== */
/* Gating / Lock UI                     */
/* ===================================== */
.gated-lock {
    display: flex;
    align-items: center;
    gap: 8px;
    padding: 10px 14px;
    margin-top: 10px;
    border-radius: 10px;
    background: rgba(255, 255, 255, 0.04);
    border: 1px dashed var(--aurora-border);
    color: var(--aurora-text-muted, #888);
    font-size: 0.82rem;
    cursor: pointer;
}
.gated-lock:hover {
    border-color: var(--aurora-cyan-very-light);
    color: var(--aurora-text-light);
}
.gated-lock svg {
    flex-shrink: 0;
    opacity: 0.6;
}
body.light-mode .gated-lock {
    background: rgba(15, 23, 42, 0.03);
    border-color: rgba(150, 150, 150, 0.5);
    color: var(--aurora-text-muted);
}
body.light-mode .gated-lock:hover {
    border-color: var(--aurora-electric-blue);
    color: var(--aurora-text-light);
}
/* Gated buttons — mirror .gated-lock styling (dashed border + lock icon)
   so guests see a uniform visual cue for features that require sign-in. */
.btn-gated,
.btn.btn-gated,
.btn.cd-ai-btn.btn-gated {
    background: rgba(255, 255, 255, 0.04);
    border: 1px dashed var(--aurora-border);
    color: var(--aurora-text-muted, #888);
    box-shadow: none;
}
.btn-gated:hover,
.btn.btn-gated:hover,
.btn.cd-ai-btn.btn-gated:hover {
    background: rgba(255, 255, 255, 0.06);
    border-color: var(--aurora-cyan-very-light);
    color: var(--aurora-text-light);
    box-shadow: none;
}
.btn-gated .btn-gated-lock {
    flex-shrink: 0;
    margin-right: 8px;
    opacity: 0.7;
}
.btn-gated:hover .btn-gated-lock {
    opacity: 1;
}
body.light-mode .btn-gated,
body.light-mode .btn.btn-gated,
body.light-mode .btn.cd-ai-btn.btn-gated {
    background: rgba(15, 23, 42, 0.03);
    border-color: rgba(150, 150, 150, 0.5);
    color: var(--aurora-text-muted);
}
body.light-mode .btn-gated:hover,
body.light-mode .btn.btn-gated:hover,
body.light-mode .btn.cd-ai-btn.btn-gated:hover {
    background: rgba(15, 23, 42, 0.05);
    border-color: var(--aurora-electric-blue);
    color: var(--aurora-text-light);
}

.gated-ai-summary {
    font-size: 0.95rem;
    font-weight: 600;
    padding: 12px 0 4px;
    color: var(--aurora-text-light);
}
.gated-cta {
    text-align: center;
    padding: 20px 16px;
    margin-top: 16px;
    border-radius: 12px;
    background: linear-gradient(180deg, rgba(64, 156, 255, 0.08) 0%, rgba(64, 156, 255, 0.02) 100%);
    border: 1px solid rgba(64, 156, 255, 0.25);
}
.gated-cta-text {
    font-size: 0.95rem;
    font-weight: 600;
    margin: 0 0 14px;
    color: var(--aurora-text-light);
}
.gated-cta-btn {
    display: inline-block;
    margin: 4px 6px;
    padding: 9px 20px;
    border-radius: 10px;
    font-size: 0.85rem;
    font-weight: 600;
    cursor: pointer;
}
.gated-cta-google {
    background: #fff;
    color: #333;
    border: 1px solid #ddd;
}
.gated-cta-google:hover {
    background: #f5f5f5;
    color: #333;
}
.gated-cta-email {
    background: linear-gradient(180deg, rgba(64, 156, 255, 0.25) 0%, rgba(5, 125, 255, 0.45) 100%);
    color: #fff;
    border: 1px solid rgba(64, 156, 255, 0.4);
}
.gated-cta-email:hover {
    background: linear-gradient(180deg, rgba(64, 156, 255, 0.35) 0%, rgba(5, 125, 255, 0.55) 100%);
    color: #fff;
}
body.light-mode .gated-cta {
    background: linear-gradient(180deg, rgba(220, 235, 255, 0.5) 0%, rgba(220, 235, 255, 0.2) 100%);
    border-color: rgba(5, 125, 255, 0.3);
}
body.light-mode .gated-cta-email {
    background: linear-gradient(180deg, rgba(220, 235, 255, 0.9) 0%, rgba(190, 215, 255, 0.95) 100%);
    color: #044d9c;
    border-color: rgba(5, 125, 255, 0.5);
}
body.light-mode .gated-cta-email:hover {
    color: #044d9c;
}

/* ===================================== */
/* 9. Index / Crawl Page                */
/* ===================================== */

/* URL input row */
.input-row {
    display: flex;
    gap: 10px;
    align-items: flex-start;
}
.input-row .url-input-wrapper {
    flex: 1;
    position: relative;
}
.input-row .url-input-wrapper input[type="text"] {
    width: 100%;
    margin-bottom: 0;
    transition: padding-left var(--transition-fast);
}
.input-row .url-input-wrapper input[type="text"].has-favicon {
    padding-left: 36px;
}
.site-favicon {
    position: absolute;
    left: 11px;
    top: 50%;
    transform: translateY(-50%);
    width: 18px;
    height: 18px;
    z-index: 2;
    pointer-events: none;
    border-radius: 3px;
}
.input-row .btn {
    white-space: nowrap;
    margin: 0;
    padding: 11px 24px;
}

/* Analyze button — blue glass flask style */
#crawl-btn {
    background: linear-gradient(180deg, rgba(64, 156, 255, 0.25) 0%, rgba(5, 125, 255, 0.45) 100%);
    color: #fff;
    border: 1px solid rgba(64, 156, 255, 0.4);
    box-shadow: inset 0 1px 1px rgba(255,255,255,0.25), 0 2px 8px rgba(5, 125, 255, 0.2);
    position: relative;
    overflow: hidden;
    text-shadow: 0 1px 2px rgba(15, 23, 42, 0.3);
}
body.light-mode #crawl-btn {
    background: linear-gradient(180deg, rgba(220, 235, 255, 0.9) 0%, rgba(190, 215, 255, 0.95) 100%);
    color: #044d9c;
    border-color: rgba(5, 125, 255, 0.5);
    box-shadow: inset 0 1px 2px rgba(255,255,255,0.6), 0 2px 8px rgba(4, 100, 210, 0.2);
    text-shadow: none;
}
#crawl-btn:disabled {
    opacity: 0.6;
    cursor: not-allowed;
    transform: none;
}

/* Desktop/tablet only: hover flask animation */
@media (hover: hover) and (min-width: 769px) {
    #crawl-btn .btn-label {
        position: relative;
        z-index: 1;
    }

    #crawl-btn::before {
        content: '';
        position: absolute;
        left: 0;
        right: 0;
        bottom: 0;
        height: 0%;
        background: linear-gradient(0deg,
            rgba(25, 140, 255, 0.7) 0%,
            rgba(85, 170, 255, 0.5) 60%,
            rgba(110, 185, 255, 0.15) 100%
        );
        border-radius: inherit;
        transition: height 0.4s var(--easing);
        z-index: 0;
    }
    #crawl-btn:hover::before {
        height: 55%;
    }

    /* Bubble particles — individual spans rising upward */
    #crawl-btn .flask-bubble {
        position: absolute;
        border-radius: 50%;
        background: radial-gradient(circle at 30% 30%, rgba(180,215,255,0.9), rgba(120,180,255,0.4));
        z-index: 0;
        opacity: 0;
        pointer-events: none;
    }
    #crawl-btn:hover .flask-bubble {
        animation: bubble-rise linear infinite;
    }
    #crawl-btn .flask-bubble:nth-child(1) { width: 5px; height: 5px; left: 15%; animation-duration: 1.4s; animation-delay: 0s; }
    #crawl-btn .flask-bubble:nth-child(2) { width: 3px; height: 3px; left: 35%; animation-duration: 1.1s; animation-delay: 0.3s; }
    #crawl-btn .flask-bubble:nth-child(3) { width: 4px; height: 4px; left: 55%; animation-duration: 1.6s; animation-delay: 0.1s; }
    #crawl-btn .flask-bubble:nth-child(4) { width: 3px; height: 3px; left: 75%; animation-duration: 1.2s; animation-delay: 0.5s; }
    #crawl-btn .flask-bubble:nth-child(5) { width: 5px; height: 5px; left: 45%; animation-duration: 1.5s; animation-delay: 0.7s; }
    #crawl-btn .flask-bubble:nth-child(6) { width: 3px; height: 3px; left: 25%; animation-duration: 1.3s; animation-delay: 0.9s; }
    #crawl-btn .flask-bubble:nth-child(7) { width: 4px; height: 4px; left: 65%; animation-duration: 1.7s; animation-delay: 0.4s; }
    #crawl-btn .flask-bubble:nth-child(8) { width: 3px; height: 3px; left: 85%; animation-duration: 1.2s; animation-delay: 0.8s; }

    @keyframes bubble-rise {
        0%   { bottom: 10%; opacity: 0; transform: translateX(0) scale(0.5); }
        15%  { opacity: 0.8; transform: translateX(-1px) scale(1); }
        50%  { opacity: 0.6; transform: translateX(2px) scale(1); }
        85%  { opacity: 0.2; transform: translateX(-1px) scale(0.7); }
        100% { bottom: 95%; opacity: 0; transform: translateX(0) scale(0.3); }
    }

    #crawl-btn:hover {
        background: linear-gradient(180deg, rgba(64, 156, 255, 0.3) 0%, rgba(5, 125, 255, 0.55) 100%);
        border-color: rgba(85, 170, 255, 0.6);
        box-shadow: inset 0 1px 1px rgba(255,255,255,0.3), 0 4px 16px rgba(25, 140, 255, 0.35);
        transform: translateY(-1px);
    }
    body.light-mode #crawl-btn:hover {
        background: linear-gradient(180deg, rgba(210, 228, 255, 0.9) 0%, rgba(175, 205, 255, 0.95) 100%);
        border-color: rgba(5, 115, 230, 0.6);
        box-shadow: inset 0 1px 2px rgba(255,255,255,0.5), 0 4px 16px rgba(4, 100, 210, 0.3);
    }
    body.light-mode #crawl-btn::before {
        background: linear-gradient(0deg,
            rgba(4, 100, 210, 0.85) 0%,
            rgba(15, 135, 240, 0.6) 60%,
            rgba(40, 155, 255, 0.2) 100%
        );
    }
    body.light-mode #crawl-btn .flask-bubble {
        background: radial-gradient(circle at 30% 30%, rgba(5, 125, 255, 0.9), rgba(4, 95, 200, 0.5));
    }
}

/* History dropdown */
.history-dropdown {
    position: absolute;
    top: 100%;
    left: 0;
    right: 0;
    z-index: 30;
    list-style: none;
    padding: 0;
    margin: 4px 0 0 0;
    background-color: var(--aurora-content-bg);
    border: 1px solid var(--aurora-border);
    border-radius: 10px;
    box-shadow: 0 6px 16px rgba(15, 23, 42, 0.15);
    max-height: 240px;
    overflow-y: auto;
}
.history-dropdown li {
    display: flex;
    align-items: center;
    padding: 10px 12px;
    cursor: pointer;
    transition: background-color var(--transition-fast);
    border-bottom: 1px solid var(--aurora-border);
}
.history-dropdown li:last-child {
    border-bottom: none;
}
.history-dropdown li:hover {
    background-color: var(--aurora-content-bg-lighter);
}
.history-dropdown .history-url {
    flex: 1;
    font-size: 0.9rem;
    color: var(--aurora-cyan-original);
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}
.history-dropdown .history-delete {
    flex-shrink: 0;
    background: none;
    border: none;
    cursor: pointer;
    font-size: 1.1rem;
    padding: 2px 6px;
    margin-left: 8px;
    border-radius: 4px;
    opacity: 0.5;
    transition: opacity var(--transition-fast), background-color var(--transition-fast);
}
.history-dropdown .history-delete:hover {
    opacity: 1;
    background-color: var(--aurora-error-bg);
}

/* Progress box */
.progress-box {
    margin-top: 20px;
    padding: 15px 20px;
    background-color: var(--aurora-content-bg-lighter);
    border-radius: 10px;
    border: 1px solid var(--aurora-border);
    font-size: 1.05rem;
}

/* Pages result list */
.pages-list {
    list-style: none;
    padding: 0;
    margin: 0;
}
.pages-list li {
    padding: 12px 0;
    border-bottom: 1px solid var(--aurora-border);
}
.pages-list li:last-child {
    border-bottom: none;
}
.pages-list .page-title {
    display: block;
    font-weight: 600;
    color: var(--aurora-text-white);
    margin-bottom: 3px;
}
.pages-list .page-url {
    display: block;
    font-size: 0.85em;
    color: var(--aurora-cyan-original);
    word-break: break-all;
}

/* Badge categories */
.badge-category {
    margin-bottom: 18px;
}
.badge-category:last-child {
    margin-bottom: 0;
}
.badge-category-title {
    font-size: 0.75rem;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.08em;
    color: var(--aurora-secondary-grey);
    margin-bottom: 8px;
}

/* LLMs file check */
.llms-check {
    margin-top: 20px;
    margin-bottom: 20px;
}
.llms-row {
    display: flex;
    gap: 12px;
    flex-wrap: wrap;
    margin-bottom: 8px;
}
.llms-row:last-child {
    margin-bottom: 0;
}
.llms-found,
.llms-not-found {
    font-weight: 600;
    font-size: 0.9rem;
    padding: 8px 14px;
    border-radius: 8px;
    display: inline-flex;
    align-items: center;
    gap: 6px;
}
.llms-found::before,
.llms-not-found::before,
.llms-warning::before {
    content: "";
    display: inline-block;
    width: 8px;
    height: 8px;
    border-radius: 50%;
    margin-right: 6px;
    flex-shrink: 0;
}
.llms-found::before {
    background-color: var(--aurora-success-green);
}
.llms-not-found::before {
    background-color: var(--aurora-error-red);
}
.llms-found {
    color: var(--aurora-success-green);
    background-color: var(--aurora-success-bg);
    border: 1px solid var(--aurora-success-border);
}
.llms-not-found {
    color: var(--aurora-error-red);
    background-color: var(--aurora-error-bg);
    border: 1px solid var(--aurora-error-border);
}
/* File name link inside badge */
.llms-link {
    color: inherit;
    text-decoration: underline;
}
.llms-link:hover {
    opacity: 0.8;
}
.llms-name {
    color: inherit;
}
/* Info button */
.llms-info-btn, .cd-info-btn {
    background: none;
    border: none;
    cursor: default;
    font-size: 1.1em;
    line-height: 1;
    padding: 0 2px;
    color: inherit;
    opacity: 0.6;
    transition: opacity var(--transition-fast);
    position: relative;
}
.cd-info-btn {
    font-size: 0.95rem;
}
.llms-info-btn:hover, .cd-info-btn:hover {
    opacity: 1;
}
/* Tooltip bubble (appended to body via JS) */
.info-tooltip {
    display: none;
    position: fixed;
    background: var(--aurora-content-bg, #1e1e1e);
    color: var(--aurora-text-light, #e0e0e0);
    border: 1px solid var(--aurora-border);
    border-radius: 8px;
    padding: 10px 14px;
    font-size: 0.78rem;
    font-weight: 400;
    font-style: normal;
    line-height: 1.45;
    white-space: normal;
    width: 260px;
    z-index: 10000;
    box-shadow: 0 2px 8px rgba(15, 23, 42, 0.12);
    pointer-events: none;
    text-align: left;
}
.info-tooltip-arrow {
    display: none;
    position: fixed;
    width: 0;
    height: 0;
    border: 6px solid transparent;
    z-index: 10001;
    pointer-events: none;
}

/* ===================================== */
/* 9b. Heading Hierarchy Analysis       */
/* ===================================== */

/* Warning badge (yellow/amber) */
.llms-warning {
    color: #e8a308;
    background-color: rgba(230, 168, 23, 0.1);
    border: 1px solid rgba(230, 168, 23, 0.5);
    font-weight: 600;
    font-size: 0.9rem;
    padding: 8px 14px;
    border-radius: 8px;
    display: inline-flex;
    align-items: center;
    gap: 6px;
}
.llms-warning::before {
    background-color: #e8a308;
}
body.light-mode .llms-warning {
    color: #c88a04;
    background-color: rgba(176, 125, 16, 0.08);
    border-color: rgba(176, 125, 16, 0.4);
}

/* Heading toggle arrow button */
.headings-toggle {
    background: none;
    border: none;
    cursor: pointer;
    font-size: 0.8em;
    line-height: 1;
    padding: 0 4px;
    color: inherit;
    opacity: 0.6;
    transition: opacity var(--transition-fast);
}
.headings-toggle:hover {
    opacity: 1;
}

/* Expandable detail panel */
.headings-detail {
    margin-top: 10px;
    padding: 14px 16px;
    background-color: var(--aurora-content-bg-lighter);
    border: 1px solid var(--aurora-border);
    border-radius: 8px;
}

/* Issues list */
.headings-issues {
    list-style: none;
    padding: 0;
    margin: 0 0 12px 0;
}
.headings-issues li {
    margin-bottom: 4px;
    border-radius: 4px;
    font-size: 0.88rem;
}
.headings-issues li:last-child {
    margin-bottom: 0;
}
.heading-issue-error,
.heading-issue-warning,
.heading-issue-info,
.heading-issue-success {
    padding: 6px 10px;
    border-radius: 4px;
    font-size: 0.88rem;
}
.heading-issue-error {
    color: var(--aurora-error-red);
    background-color: var(--aurora-error-bg);
    border-left: 3px solid var(--aurora-error-red);
}
.heading-issue-warning {
    color: #e8a308;
    background-color: rgba(230, 168, 23, 0.08);
    border-left: 3px solid #e8a308;
}
body.light-mode .heading-issue-warning {
    color: #c88a04;
}
.heading-issue-info {
    color: var(--aurora-cyan-original);
    background-color: rgba(77, 190, 255, 0.08);
    border-left: 3px solid var(--aurora-cyan-original);
}
.heading-issue-success {
    color: var(--aurora-green, #38a169);
    background-color: rgba(56, 161, 105, 0.08);
    border-left: 3px solid var(--aurora-green, #38a169);
}

/* Per-page heading sections (multi-page analysis) */
.headings-page-section {
    margin-top: 10px;
    padding-top: 8px;
    border-top: 1px solid var(--aurora-border);
}
.headings-page-section:first-child {
    margin-top: 0;
    padding-top: 0;
    border-top: none;
}
.headings-page-label {
    font-weight: 600;
    font-size: 0.9rem;
    margin-bottom: 4px;
    color: var(--aurora-text);
}
.headings-page-label small {
    font-weight: 400;
    opacity: 0.7;
}

/* Heading tree */
.headings-tree {
    margin-top: 8px;
    font-size: 0.88rem;
    line-height: 1.6;
}
.heading-tree-item {
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
    color: var(--aurora-text-light);
}
.heading-tag {
    display: inline-block;
    font-weight: 700;
    font-size: 0.78rem;
    padding: 1px 6px;
    border-radius: 3px;
    min-width: 28px;
    text-align: center;
    color: #fff;
}
/* Heading tag hierarchy — single accent (brand blue) at varying weights.
   Skill rule: max 1 accent color, no rainbow chip palettes. */
.heading-tag-h1 { background-color: var(--aurora-electric-blue); }
.heading-tag-h2 { background-color: #2b8de8; }
.heading-tag-h3 { background-color: #4dbeff; color: #0d1117; }
.heading-tag-h4 { background-color: #6c757d; }
.heading-tag-h5 { background-color: #555; }
.heading-tag-h6 { background-color: #444; }

/* ===================================== */
/* 10. Mobile Responsive Styles         */
/* ===================================== */
@media screen and (max-width: 768px) {
    .main-content {
        padding: 15px;
        padding-top: 56px;
    }

    .content-container {
        padding: 15px;
        border-radius: 10px;
    }

    h1 { font-size: 1.5em; margin-bottom: 15px; }
    h2 { font-size: 1.3em; }
    h3 { font-size: 1.1em; margin-top: 15px; }

    .result-output {
        padding: 12px;
        margin-top: 15px;
    }
    .result-output h2 {
        margin-bottom: 10px;
        padding-bottom: 8px;
    }

    .btn {
        padding: 12px 20px;
        font-size: 16px;
        margin: 4px;
    }

    .button-group { margin-top: 15px; }
    .button-group .btn {
        display: block;
        width: 100%;
        margin: 8px 0;
    }

    .top-bar {
        padding: 0 10px;
        height: 42px;
    }
    .top-bar-left {
        gap: 8px;
        min-width: 0;
        overflow: hidden;
    }
    .top-bar-link {
        font-size: 0.75rem;
    }
    .top-bar-right {
        gap: 6px;
        flex-shrink: 0;
    }
    .top-bar-user {
        display: none !important;
    }
    .top-bar-btn {
        padding: 3px 6px;
        font-size: 13px;
        box-shadow: none;
    }
    .login-toggle-btn {
        font-size: 12px;
        padding: 3px 8px;
    }
    #theme-toggle {
        width: 22px;
        height: 22px;
    }
    #theme-toggle svg {
        width: 14px;
        height: 14px;
    }
    input[type="text"],
    input[type="password"],
    textarea,
    select {
        font-size: 16px;
    }

    p { margin-bottom: 12px; }
    hr { margin: 15px 0; }

    /* Login responsive */
    .login-box {
        padding: 30px 20px;
    }

    /* Input row stack on mobile */
    .input-row {
        flex-direction: column;
        align-items: center;
    }
    .input-row .url-input-wrapper {
        width: 100%;
    }
    .input-row .btn {
        width: 100%;
    }

    /* Heading analysis mobile */
    .headings-detail {
        padding: 10px 12px;
    }
    .heading-tree-item {
        white-space: normal;
        word-break: break-word;
    }
}

/* ===================================== */
/* 11. Final Score Card                 */
/* ===================================== */
.final-score-card {
    text-align: center;
    padding: 24px 20px;
    margin-bottom: 22px;
    border-radius: 12px;
    background: var(--aurora-content-bg-lighter);
    border: 1px solid var(--aurora-border);
}
.final-score-number {
    font-size: 3.2rem;
    font-weight: 800;
    line-height: 1;
    margin-bottom: 2px;
}

/* Score gauge (semicircular needle indicator) */
.score-gauge-wrap {
    position: relative;
    width: 220px;
    height: 115px;
    margin: 4px auto 14px;
    max-width: 100%;
}
.score-gauge-arcs {
    width: 100%;
    height: 100%;
    display: block;
}
.score-gauge-needle-rotator {
    position: absolute;
    left: 50%;
    top: 87%;
    width: 0;
    height: 0;
    transform: rotate(-90deg);
    transform-origin: 0 0;
    transition: transform 0.85s cubic-bezier(0.16, 1, 0.3, 1);
    z-index: 1;
}
.score-gauge-needle-wiggle {
    position: absolute;
    left: 0;
    top: 0;
    width: 0;
    height: 0;
    transform-origin: 0 0;
}
.score-gauge-needle-wiggle.wiggling {
    animation: score-needle-wiggle 1.8s cubic-bezier(0.37, 0, 0.63, 1) infinite;
}
@keyframes score-needle-wiggle {
    0%, 100% { transform: rotate(-5deg); }
    50%      { transform: rotate(5deg); }
}
.score-gauge-needle-shape {
    position: absolute;
    left: -3.5px;
    top: -86px;
    width: 7px;
    height: 94px;
    background: var(--aurora-text);
    clip-path: polygon(50% 0%, 100% 90%, 50% 100%, 0% 90%);
    border-radius: 2px;
}
.score-gauge-pivot {
    position: absolute;
    left: 50%;
    top: 87%;
    width: 18px;
    height: 18px;
    border-radius: 50%;
    background: var(--aurora-content-bg-lighter);
    border: 3px solid var(--aurora-text);
    transform: translate(-50%, -50%);
    z-index: 2;
}
@media (prefers-reduced-motion: reduce) {
    .score-gauge-needle-rotator { transition: none; }
    .score-gauge-needle-wiggle.wiggling { animation: none; }
}
.final-score-out-of {
    font-size: 1rem;
    font-weight: 400;
    opacity: 0.55;
}
.final-score-grade {
    font-size: 0.95rem;
    font-weight: 700;
    margin-top: 6px;
    text-transform: uppercase;
    letter-spacing: 0.04em;
}
.final-score-label {
    font-size: 0.82rem;
    margin-top: 6px;
    opacity: 0.7;
    font-style: italic;
    font-weight: bold;
}
.score-color-green  { color: #38a169; }
.score-color-lime   { color: #68d391; }
.score-color-yellow { color: #F2A007; }
.score-color-orange { color: #F2A007; }
.score-color-red    { color: #FF4D6D; }
.score-color-gray   { color: #718096; }
body.light-mode .score-color-green  { color: #1a7d3f; }
body.light-mode .score-color-lime   { color: #2b8a3e; }
body.light-mode .score-color-yellow { color: #F2A007; }
body.light-mode .score-color-orange { color: #F2A007; }
body.light-mode .score-color-red    { color: #B8032A; }
body.light-mode .score-color-gray   { color: #4a5568; }

.cms-icon {
    width: 16px;
    height: 16px;
    display: inline-block;
}
body.light-mode .cms-icon {
    filter: invert(1);
}
.crawled-ago {
    font-size: 0.75rem;
    font-style: italic;
    color: var(--aurora-secondary-grey);
    margin-top: 10px;
    text-align: center;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 5px;
}
.crawled-ago svg {
    opacity: 0.6;
}
.crawled-ago a {
    color: var(--aurora-electric-blue, #057dff);
    text-decoration: none;
    opacity: 0.8;
    transition: opacity var(--transition-fast);
}
.crawled-ago a:hover {
    opacity: 1;
    text-decoration: underline;
}

.category-score {
    font-size: 0.75rem;
    font-weight: 700;
    margin-left: 8px;
}

/* Score slider panels */
.score-slider {
    position: relative;
    overflow: hidden;
}
.score-panel {
    transition: transform 0.4s cubic-bezier(0.25, 0.8, 0.25, 1),
                opacity 0.4s ease,
                visibility 0s 0.4s;
}
.score-panel-detail {
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    transform: translateX(100%);
    opacity: 0;
    pointer-events: none;
}
.score-slider.slid #score-overview {
    position: absolute;
    transform: translateX(-100%);
    opacity: 0;
    pointer-events: none;
    visibility: hidden;
}
.score-slider.slid .score-panel-detail {
    position: relative;
    transform: translateX(0);
    opacity: 1;
    pointer-events: auto;
}

/* Back button */
.detail-back,
.detail-back:active,
.detail-back:hover {
    display: inline-flex;
    align-items: center;
    gap: 4px;
    background: transparent;
    border: 0;
    border-style: none;
    box-shadow: none;
    -webkit-appearance: none;
    -moz-appearance: none;
    appearance: none;
    color: var(--aurora-text-light);
    font-size: 0.9rem;
    font-weight: 600;
    cursor: pointer;
    padding: 6px 10px 6px 4px;
    margin-top: 8px;
    border-radius: 0;
    opacity: 0.75;
    transition: opacity 0.2s;
    text-decoration: none !important;
}
.detail-back:hover {
    opacity: 1;
    text-decoration: none !important;
}

/* Breakdown bars */
.breakdown {
    margin-top: 20px;
    text-align: left;
}
.breakdown-row {
    display: flex;
    align-items: center;
    gap: 10px;
    margin-bottom: 12px;
    padding: 6px 8px;
    border-radius: 8px;
    cursor: pointer;
    transition: background 0.2s;
}
.breakdown-row:hover {
    background: var(--aurora-content-bg-lighter);
}
.breakdown-row:last-child {
    margin-bottom: 0;
}
.breakdown-icon {
    flex: 0 0 18px;
    width: 18px;
    height: 18px;
    display: flex;
    align-items: center;
    justify-content: center;
    opacity: 0.6;
}
.breakdown-icon svg {
    width: 18px;
    height: 18px;
}
.breakdown-label {
    flex: 0 0 145px;
    width: 145px;
    min-width: 145px;
    font-size: 0.88rem;
    font-weight: 600;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
    text-align: left;
}
.breakdown-value {
    flex: 0 0 56px;
    width: 56px;
    min-width: 56px;
    font-size: 0.88rem;
    font-weight: 700;
    text-align: right;
    opacity: 0.8;
    padding-right: 4px;
}
.breakdown-track {
    flex: 1 1 0%;
    min-width: 0;
    height: 10px;
    border-radius: 5px;
    background: var(--aurora-border);
    overflow: hidden;
}
.breakdown-fill {
    height: 100%;
    width: 0;
    border-radius: 5px;
    transition: width 0.8s cubic-bezier(0.25, 0.8, 0.25, 1);
}
.breakdown-arrow {
    flex: 0 0 16px;
    font-size: 1.2rem;
    opacity: 0.35;
    transition: opacity 0.2s;
}
.breakdown-row:hover .breakdown-arrow {
    opacity: 0.7;
}
.breakdown-lock {
    opacity: 0.7;
    display: flex;
    align-items: center;
    color: var(--aurora-text-muted, #888);
}
.breakdown-row:hover .breakdown-lock {
    opacity: 1;
    color: var(--aurora-text-light);
}
.bar-green  { background: #38a169; }
.bar-yellow { background: #F2A007; }
.bar-red    { background: #FF4D6D; }
body.light-mode .bar-red { background: #D2042D; }

/* Mobile: the top-level score rows wrap onto two lines — label + score on
   top, bar full-width below. This reclaims the horizontal space that the
   fixed 145px label column was stealing on narrow viewports.
   Excluded: .cd-detail-row (sub-rows inside detail panels — different layout). */
@media (max-width: 600px) {
    .breakdown-row:not(.cd-detail-row) {
        flex-wrap: wrap;
        row-gap: 6px;
        padding: 10px 12px;
        align-items: center;
    }
    .breakdown-row:not(.cd-detail-row) .breakdown-label {
        flex: 1 1 auto;
        width: auto;
        min-width: 0;
        white-space: normal;          /* allow wrap for long labels like "AI Brand Awareness" */
        font-size: 0.92rem;
        line-height: 1.25;
    }
    .breakdown-row:not(.cd-detail-row) .breakdown-value {
        flex: 0 0 auto;
        width: auto;
        min-width: 0;
        padding-right: 0;
        opacity: 1;                   /* full contrast on mobile header line */
        font-size: 0.92rem;
        font-variant-numeric: tabular-nums;
        color: var(--aurora-text);
    }
    .breakdown-row:not(.cd-detail-row) .breakdown-arrow {
        order: 4;                     /* stay on header line, right of value */
    }
    .breakdown-row:not(.cd-detail-row) .breakdown-track {
        order: 5;                     /* wrap to second line */
        flex: 1 1 100%;
        height: 12px;
        border-radius: 6px;
    }
    .breakdown-row:not(.cd-detail-row) .breakdown-fill {
        border-radius: 6px;
    }
}

/* ===================================== */
/* 11b. Site Profile                    */
/* ===================================== */
.site-profile-hr {
    border: none;
    border-top: 1px solid var(--aurora-border);
    margin: 0 0 16px 0;
}
.site-profile-pages-only {
    margin-top: 10px;
    font-size: 0.82rem;
    color: var(--aurora-text-muted, #888);
    text-align: center;
}
.sp-icon-text {
    display: inline-flex;
    align-items: center;
    gap: 6px;
}
.sp-icon-text .cms-icon {
    width: 14px;
    height: 14px;
    flex-shrink: 0;
}

/* ===================================== */
/* 12. Recommendations Card             */
/* ===================================== */
.recommendations-card {
    margin-top: 20px;
    padding: 16px 18px;
    background: var(--aurora-content-bg-lighter);
    border: 1px solid var(--aurora-border);
    border-radius: 10px;
}
.recommendations-title {
    font-size: 0.95rem;
    font-weight: 700;
    margin-bottom: 12px;
    color: var(--aurora-text-white);
}
.recommendations-list {
    list-style: none;
    counter-reset: rec-counter;
    margin: 0;
    padding: 0;
}
.recommendation-item {
    counter-increment: rec-counter;
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 9px 0;
    border-bottom: 1px solid var(--aurora-border);
    font-size: 0.85rem;
}
.recommendation-item:last-child {
    border-bottom: none;
    padding-bottom: 0;
}
.recommendation-item::before {
    content: counter(rec-counter);
    flex: 0 0 22px;
    height: 22px;
    line-height: 22px;
    text-align: center;
    font-size: 0.75rem;
    font-weight: 700;
    border-radius: 50%;
    background: var(--aurora-border);
    color: var(--aurora-text-white);
}
.rec-text {
    flex: 1;
    color: var(--aurora-text-light);
}
.rec-impact {
    flex: 0 0 auto;
    font-size: 0.75rem;
    font-weight: 700;
    padding: 2px 8px;
    border-radius: 9999px;
    white-space: nowrap;
    text-transform: uppercase;
    letter-spacing: 0.03em;
}
/* Impact pills — soft-bg + colored-text for AA contrast
   (was solid-color + white text: #F2A007/#38a169 on white ≈2.4:1/3.6:1 → fail) */
.rec-impact-high {
    background: #38a169;
    color: #fff;
    border: 1px solid #38a169;
}
.rec-impact-medium {
    background: #F2A007;
    color: #fff;
    border: 1px solid #F2A007;
}
.rec-impact-low {
    background: #FF4D6D;
    color: #fff;
    border: 1px solid #FF4D6D;
}
body.light-mode .rec-impact-low {
    background: #D2042D;
    border-color: #D2042D;
}

/* Report actions row — Download + Share, side-by-side */
.report-actions-row {
    display: flex;
    flex-wrap: wrap;
    justify-content: center;
    gap: 10px;
    margin: 18px auto 0;
}

/* Share Results & Download Report buttons */
.share-results-btn {
    display: inline-flex;
    align-items: center;
    margin: 0;
    padding: 9px 22px;
    font-size: 0.85rem;
    font-weight: 600;
    border: 1px solid var(--aurora-border);
    border-radius: 8px;
    background: var(--aurora-content-bg-lighter);
    color: var(--aurora-text-light);
    cursor: pointer;
    transition: background-color var(--transition-fast), color var(--transition-fast);
}
/* Mobile: stack with full-width for tap comfort */
@media (max-width: 480px) {
    .report-actions-row { flex-direction: column; }
    .report-actions-row .share-results-btn { width: 100%; justify-content: center; }
}
.share-results-btn:hover {
    background: var(--aurora-border);
    color: var(--aurora-text-white);
}
.share-results-btn.share-copied {
    background: rgba(56, 161, 105, 0.2);
    color: #68d391;
    border-color: rgba(56, 161, 105, 0.4);
}
body.light-mode .share-results-btn.share-copied {
    background: rgba(36, 130, 75, 0.15);
    color: #1a7d3f;
    border-color: rgba(36, 130, 75, 0.3);
}

/* Embed Badge modal */
.vc-embed-overlay {
    position: fixed;
    inset: 0;
    z-index: 200;
    background: rgba(15, 23, 42, 0.55);
    backdrop-filter: blur(4px);
    display: flex;
    align-items: flex-start;
    justify-content: center;
    padding: 40px 16px;
    overflow: auto;
}
.vc-embed-modal {
    width: 100%;
    max-width: 600px;
    background: var(--aurora-content-bg);
    border: 1px solid var(--aurora-border);
    border-radius: 16px;
    padding: 26px 26px 22px;
    position: relative;
    box-shadow: 0 12px 40px rgba(15, 23, 42, 0.3);
    animation: loginModalIn 0.2s ease-out;
}
.vc-embed-close {
    position: absolute;
    top: 12px;
    right: 14px;
    background: none;
    border: none;
    font-size: 24px;
    color: var(--aurora-text-light);
    cursor: pointer;
    line-height: 1;
    padding: 2px 6px;
    border-radius: 6px;
    transition: background var(--transition-fast);
}
.vc-embed-close:hover { background: var(--aurora-top-btn-bg-hover); }
.vc-embed-title { font-size: 1.25rem; margin: 0 0 6px; }
.vc-embed-sub { font-size: 0.85rem; color: var(--aurora-text-muted); margin: 0 0 18px; }
.vc-embed-variants { display: flex; flex-wrap: wrap; gap: 8px; margin-bottom: 18px; }
.vc-embed-variant {
    flex: 1 1 92px;
    min-width: 92px;
    padding: 9px 10px;
    border: 1px solid var(--aurora-border);
    border-radius: 10px;
    background: var(--aurora-content-bg-lighter);
    color: var(--aurora-text-light);
    cursor: pointer;
    text-align: center;
    transition: border-color var(--transition-fast), background var(--transition-fast);
}
.vc-embed-variant:hover { border-color: var(--aurora-accent); }
.vc-embed-variant.selected {
    border-color: var(--aurora-accent);
    background: var(--aurora-card-bg);
    box-shadow: 0 0 0 1px var(--aurora-accent);
}
.vc-embed-variant .v-name { display: block; font-size: 0.85rem; font-weight: 700; }
.vc-embed-variant .v-note { display: block; font-size: 0.68rem; color: var(--aurora-text-muted); margin-top: 2px; }
.vc-embed-theme { display: flex; align-items: center; flex-wrap: wrap; gap: 8px; margin-bottom: 18px; }
.vc-embed-theme-label { font-size: 0.78rem; font-weight: 600; color: var(--aurora-text-muted); margin-right: 2px; }
.vc-theme-toggle {
    position: relative;
    width: 62px;
    height: 30px;
    flex: 0 0 auto;
    padding: 0;
    border: 1px solid var(--aurora-border);
    border-radius: 9999px;
    background: var(--aurora-content-bg-lighter);
    cursor: pointer;
    transition: background var(--transition-fast), border-color var(--transition-fast);
}
.vc-theme-toggle.is-dark { background: #1c2740; border-color: #2c3a5a; }
.vc-theme-toggle:focus-visible { outline: 2px solid var(--aurora-accent); outline-offset: 2px; }
.vc-theme-ico {
    position: absolute;
    top: 50%;
    transform: translateY(-50%);
    width: 14px;
    height: 14px;
    z-index: 2;
    color: var(--aurora-secondary-grey);
    transition: color var(--transition-fast);
    pointer-events: none;
}
.vc-theme-ico svg { width: 14px; height: 14px; display: block; }
.vc-theme-sun  { left: 8px; }
.vc-theme-moon { right: 8px; }
.vc-theme-toggle:not(.is-dark) .vc-theme-sun { color: #fff; }
.vc-theme-toggle.is-dark .vc-theme-moon { color: #fff; }
.vc-theme-knob {
    position: absolute;
    top: 3px;
    left: 3px;
    width: 24px;
    height: 24px;
    border-radius: 50%;
    background: var(--aurora-accent);
    z-index: 1;
    transition: transform 0.22s cubic-bezier(0.16, 1, 0.3, 1);
}
.vc-theme-toggle.is-dark .vc-theme-knob { transform: translateX(32px); }
.vc-embed-preview {
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 18px;
    border: 1px dashed var(--aurora-border);
    border-radius: 12px;
    background: repeating-conic-gradient(rgba(127, 127, 127, 0.06) 0% 25%, transparent 0% 50%) 50% / 18px 18px;
    margin-bottom: 16px;
    overflow: auto;
}
.vc-embed-preview iframe { display: block; }
.vc-embed-code-label { display: block; font-size: 0.78rem; font-weight: 600; color: var(--aurora-text-muted); margin-bottom: 6px; }
.vc-embed-code {
    width: 100%;
    font-family: var(--font-mono);
    font-size: 0.78rem;
    line-height: 1.45;
    color: var(--aurora-text-light);
    background: var(--aurora-input-bg);
    border: 1px solid var(--aurora-border);
    border-radius: 8px;
    padding: 10px 12px;
    resize: vertical;
}
.vc-embed-actions { display: flex; align-items: center; gap: 12px; margin-top: 12px; flex-wrap: wrap; }
.vc-embed-copy { padding: 9px 20px; font-size: 0.85rem; }
.vc-embed-copy.copied { background: var(--aurora-success-green); border-color: var(--aurora-success-green); color: #fff; }
.vc-embed-hint { font-size: 0.78rem; color: var(--aurora-text-muted); }
.vc-share-modal { max-width: 480px; }
.vc-share-copy-row { display: flex; gap: 10px; align-items: stretch; }
.vc-share-url { flex: 1; min-width: 0; resize: none; white-space: nowrap; }
.vc-share-copy-row .vc-embed-copy { flex: 0 0 auto; align-self: stretch; }
.vc-embed-share { margin-top: 18px; padding-top: 16px; border-top: 1px solid var(--aurora-border); }
.vc-embed-share-label { display: block; font-size: 0.78rem; font-weight: 600; color: var(--aurora-text-muted); margin-bottom: 10px; }
.vc-embed-share-btns { display: flex; gap: 10px; flex-wrap: wrap; }
.vc-share-btn {
    display: inline-flex; align-items: center; gap: 7px;
    padding: 8px 14px; border-radius: 8px;
    font-size: 0.82rem; font-weight: 600; text-decoration: none;
    color: #fff; border: 1px solid transparent;
    transition: transform .15s ease, filter .15s ease, box-shadow .15s ease;
}
.vc-share-btn svg { width: 16px; height: 16px; display: block; }
.vc-share-btn:hover { transform: translateY(-1px); filter: brightness(1.08); box-shadow: 0 4px 14px rgba(15,23,42,.18); }
.vc-share-facebook { background: #1877F2; }
.vc-share-linkedin { background: #0A66C2; }
.vc-share-x { background: #000; }

/* ===================================== */
/* 13. Business Details Card            */
/* ===================================== */
.score-info-chips {
    text-align: center;
    margin-top: 10px;
    font-size: 0.78rem;
    opacity: 0.6;
}
.score-cms-icon {
    vertical-align: middle;
}
.score-cms-icon .cms-icon {
    width: 18px;
    height: 18px;
    vertical-align: middle;
}
.score-cms-label {
    vertical-align: middle;
}
.score-section-path {
    vertical-align: middle;
}
.score-cms-detail {
    vertical-align: middle;
    font-size: 0.75rem;
    opacity: 0.85;
}
.score-site-type {
    vertical-align: middle;
    font-size: 0.75rem;
    opacity: 0.85;
    font-style: italic;
}
.score-waf-warning {
    margin-top: 8px;
    font-size: 0.75rem;
    color: var(--aurora-error-red);
    opacity: 0.9;
}
.company-data-section {
    margin-top: 20px;
}
.cd-section-title {
    display: flex;
    align-items: center;
    flex-wrap: wrap;
    gap: 10px;
    margin-bottom: 8px;
    padding: 0 8px;
}
.cd-section-title .ai-eval-timestamp {
    margin-left: auto;
}
.cd-title {
    font-size: 0.88rem;
    font-weight: 700;
    color: var(--aurora-text);
    display: inline-flex;
    align-items: center;
    gap: 10px;
}
.cd-title-icon {
    opacity: 0.6;
    flex-shrink: 0;
}
.cd-detail-row {
    cursor: default;
    align-items: flex-start;
}
.cd-detail-row:hover {
    background: transparent;
}
.cd-detail-value {
    flex: 1 1 0%;
    font-size: 0.85rem;
    color: var(--aurora-text);
    text-align: left;
    word-break: break-word;
    line-height: 1.4;
}
.cd-detail-value a {
    color: var(--aurora-accent);
    text-decoration: none;
}
.cd-detail-value a:hover {
    text-decoration: underline;
}
.cd-source {
    display: block;
    font-size: 0.75rem;
    color: var(--aurora-text-light);
    font-style: italic;
    margin-top: 1px;
}
.cd-social-link {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 24px;
    height: 24px;
    border-radius: 8px;
    background: transparent;
    color: var(--aurora-accent) !important;
    transition: opacity 0.2s, transform 0.15s;
    margin: 0;
}
.cd-social-link:hover {
    opacity: 0.7;
    transform: scale(1.1);
}
.cd-social-link svg {
    width: 18px;
    height: 18px;
}
.cd-columns {
    display: flex;
    flex-wrap: wrap;
    gap: 0;
    align-items: stretch;
    margin-top: 20px;
    padding-top: 16px;
    border-top: 1px solid var(--aurora-border);
}
.cd-col-found {
    flex: 0 0 100%;
    min-width: 0;
}
.cd-found-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 0 24px;
}
@media (max-width: 600px) {
    .cd-found-grid {
        grid-template-columns: 1fr;
    }
}
.cd-col-missing {
    flex: 0 0 100%;
    min-width: 0;
    text-align: left;
    margin-top: 20px;
}
.cd-missing-header {
    font-size: 0.88rem;
    font-weight: 700;
    color: var(--aurora-warning, #d4920a);
    padding: 0 8px;
    margin-bottom: 8px;
    display: flex;
    align-items: center;
    gap: 6px;
}
.cd-missing-header svg {
    flex-shrink: 0;
    opacity: 0.8;
}
.cd-missing-item {
    font-size: 0.85rem;
    color: var(--aurora-text-light);
    padding: 6px 8px;
}
.cd-ai-prompt {
    margin-top: 12px;
    padding-left: 32px;
}
.faq-struct-section .cd-ai-prompt {
    padding-left: 0;
}
.cd-ai-question {
    font-size: 0.9rem;
    font-weight: 600;
    color: var(--aurora-text);
    margin-bottom: 8px;
}
.cd-ai-pages {
    list-style: none;
    padding: 0;
    margin: 0 0 8px 0;
}
.cd-ai-pages li {
    font-size: 0.85rem;
    padding: 3px 0;
}
.cd-ai-pages li::before {
    content: "\2022";
    color: var(--aurora-accent);
    margin-right: 6px;
}
.cd-ai-pages a {
    color: var(--aurora-accent);
    text-decoration: none;
}
.cd-ai-pages a:hover {
    text-decoration: underline;
}
.cd-ai-explain {
    font-size: 0.8rem;
    color: var(--aurora-text-light);
    margin-bottom: 12px;
    line-height: 1.4;
}
.cd-ai-btn {
    display: inline-flex;
    align-items: center;
    margin: 0;
    padding: 9px 22px;
    font-size: 0.85rem;
    font-weight: 600;
    border: 1px solid var(--aurora-border);
    border-radius: 8px;
    background: var(--aurora-content-bg-lighter);
    color: var(--aurora-text-light);
    cursor: pointer;
    transition: background-color var(--transition-fast), color var(--transition-fast);
    text-shadow: none;
    box-shadow: none;
    backdrop-filter: none;
    -webkit-backdrop-filter: none;
}
.cd-ai-btn:hover {
    background: var(--aurora-border);
    color: var(--aurora-text-white);
    box-shadow: none;
}
.cd-ai-loading {
    display: flex;
    align-items: center;
    gap: 8px;
    font-size: 0.85rem;
    color: var(--aurora-text-light);
    padding: 8px 0;
}
.cd-ai-result-header {
    font-size: 0.88rem;
    font-weight: 700;
    color: var(--aurora-accent);
    display: flex;
    align-items: center;
    gap: 10px;
    margin-bottom: 8px;
    padding: 0 8px;
}
.cd-ai-suggestion {
    background: var(--aurora-card-bg, rgba(255,255,255,0.03));
    border-radius: 6px;
    margin-bottom: 4px;
}
.cd-ai-suggestion .cd-detail-value {
    word-break: break-word;
}
.cd-struct-suggest {
    margin-top: 14px;
    padding: 10px 12px;
    font-size: 0.85rem;
    color: var(--aurora-warning, #d4920a);
    background: var(--aurora-warning-bg, rgba(212,146,10,0.08));
    border-radius: 6px;
    line-height: 1.5;
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: 4px 6px;
}
.cd-struct-suggest svg {
    flex-shrink: 0;
    opacity: 0.8;
}
.cd-gemini-timestamp {
    margin-top: 12px;
    font-size: 0.8rem;
    color: var(--aurora-text-muted, #888);
    display: flex;
    align-items: center;
    justify-content: flex-end;
    gap: 5px;
}
.cd-gemini-timestamp svg {
    opacity: 0.6;
}

/* Structured Data Breakdown */
.sd-breakdown-section {
    margin-bottom: 10px;
}
.sd-breakdown-title {
    font-size: 0.82rem;
    font-weight: 600;
    color: var(--aurora-text-light, #b0b8c8);
    margin-bottom: 4px;
    padding-bottom: 2px;
    border-bottom: 1px solid var(--aurora-border, rgba(255,255,255,0.06));
}
.sd-item-icon {
    display: inline-block;
    width: 16px;
    text-align: center;
}
.sd-item-pts {
    float: right;
    font-size: 0.78rem;
    color: var(--aurora-text-muted, #888);
    font-weight: 500;
}
@media (max-width: 600px) {
    .cd-columns {
        flex-direction: column;
    }
}

/* ===================================== */
/* 13b. FAQ Structured Data (FAQPage)   */
/* ===================================== */
.faq-struct-section {
    margin-top: 20px;
    border-top: 1px solid var(--aurora-border);
    padding-top: 16px;
    text-align: left !important;
}
.faq-struct-section > div:not(.cd-section-title),
.faq-struct-section > .cd-ai-explain,
.faq-struct-section > .btn,
.faq-struct-section > .cd-ai-loading {
    text-align: left !important;
    margin-left: 36px !important;
    margin-right: auto !important;
}
.faq-jsonld-pair {
    padding: 8px 12px;
    border-bottom: 1px solid var(--aurora-border);
}
.faq-jsonld-pair:last-child {
    border-bottom: none;
}
.faq-jsonld-q {
    font-weight: 700;
    font-size: 0.88rem;
    color: var(--aurora-text);
    margin-bottom: 2px;
}
.faq-jsonld-a {
    font-size: 0.84rem;
    color: var(--aurora-text-light);
    padding-left: 12px;
    line-height: 1.5;
}
.faq-jsonld-upgrade {
    margin-top: 14px;
    padding: 10px 14px;
    font-size: 0.84rem;
    color: var(--aurora-text-muted, #888);
    background: var(--aurora-content-bg-lighter, rgba(42, 42, 42, 0.9));
    border: 1px dashed var(--aurora-border);
    border-radius: 8px;
    display: flex;
    align-items: center;
    gap: 8px;
    cursor: pointer;
    transition: border-color 0.15s, color 0.15s;
}
.faq-jsonld-upgrade:hover {
    border-color: var(--aurora-electric-blue);
    color: var(--aurora-text-light);
}
.faq-jsonld-upgrade svg {
    flex-shrink: 0;
    opacity: 0.6;
}

/* AI Readiness — file generation CTA */
.ai-genfiles-cta {
    margin-top: 16px;
    padding: 16px 18px;
    background: var(--aurora-content-bg-lighter);
    border: 1px solid var(--aurora-border);
    border-radius: 10px;
    font-size: 0.84rem;
    color: var(--aurora-text-light);
    line-height: 1.55;
}
.ai-genfiles-title {
    display: flex;
    align-items: center;
    gap: 10px;
    font-weight: 600;
    font-size: 0.88rem;
    margin-bottom: 10px;
    color: var(--aurora-text);
}
.ai-genfiles-list {
    list-style: none;
    padding: 0;
    margin: 0 0 12px 0;
}
.ai-genfiles-list li {
    padding: 4px 0 4px 18px;
    position: relative;
    color: var(--aurora-text-light);
}
.ai-genfiles-list li::before {
    content: "\25CF";
    position: absolute;
    left: 0;
    color: rgba(40, 210, 130, 0.85);
    font-size: 0.65em;
    top: 8px;
}
body.light-mode .ai-genfiles-list li::before {
    color: #1a6b45;
}
.ai-genfiles-list li strong {
    font-weight: 600;
    color: var(--aurora-text);
}
.ai-genfiles-impact {
    display: flex;
    align-items: center;
    gap: 8px;
    padding: 10px 0;
    border-top: 1px solid var(--aurora-border);
    font-size: 0.84rem;
    color: var(--aurora-text-light);
}
.ai-genfiles-score-current {
    font-weight: 700;
    color: var(--aurora-text-light);
}
.ai-genfiles-score-projected {
    font-weight: 700;
    color: var(--aurora-green, #38a169);
}
.ai-genfiles-action {
    padding-top: 12px;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 12px;
}
.ai-genfiles-action-label {
    font-size: 0.8rem;
    font-weight: 600;
    color: var(--aurora-text-light);
}
.ai-genfiles-btn {
    display: inline-block;
    padding: 9px 24px;
    font-size: 0.84rem;
    font-weight: 600;
    border-radius: 8px;
    background: linear-gradient(180deg, rgba(40, 210, 130, 0.25) 0%, rgba(30, 180, 100, 0.45) 100%);
    color: #fff;
    border: 1px solid rgba(40, 210, 130, 0.4);
    box-shadow: inset 0 1px 1px rgba(255,255,255,0.25), 0 2px 8px rgba(30, 180, 100, 0.2);
    text-decoration: none;
    cursor: pointer;
    text-shadow: 0 1px 2px rgba(15, 23, 42, 0.3);
    transition: opacity 0.2s, box-shadow 0.2s;
}
.ai-genfiles-btn:hover {
    opacity: 0.9;
    color: #fff;
    background: linear-gradient(180deg, rgba(40, 210, 130, 0.35) 0%, rgba(30, 180, 100, 0.55) 100%);
    box-shadow: inset 0 1px 1px rgba(255,255,255,0.25), 0 4px 12px rgba(30, 180, 100, 0.35);
}
body.light-mode .ai-genfiles-btn {
    background: linear-gradient(180deg, rgba(220, 245, 230, 0.9) 0%, rgba(180, 230, 200, 0.95) 100%);
    color: #1a6b45;
    border-color: rgba(50, 180, 110, 0.5);
    box-shadow: inset 0 1px 2px rgba(255,255,255,0.6), 0 2px 8px rgba(30, 160, 90, 0.2);
    text-shadow: none;
}
body.light-mode .ai-genfiles-btn:hover {
    box-shadow: inset 0 1px 2px rgba(255,255,255,0.6), 0 4px 12px rgba(30, 160, 90, 0.35);
}

/* AI Visibility Kit CTA box */
.ai-kit-cta-box {
    margin-top: 24px;
    padding: 24px 28px;
    background: var(--aurora-content-bg, #1e1e1e);
    border: 1px solid var(--aurora-border);
    border-radius: 12px;
    text-align: center;
}
.ai-kit-cta-title {
    font-size: 1.1rem;
    font-weight: 700;
    color: var(--aurora-text-light, #eee);
    margin: 0 0 8px;
}
.ai-kit-cta-subtitle {
    font-size: 0.9rem;
    color: var(--aurora-text-muted, #aaa);
    line-height: 1.6;
    margin: 0 0 18px;
}
body.light-mode .ai-kit-cta-subtitle {
    color: var(--aurora-text-muted);
}
.ai-kit-cta-box .ai-genfiles-btn {
    font-size: 0.9rem;
    padding: 10px 28px;
}

/* ===================================== */
/* 14. AI Website Evaluation            */
/* ===================================== */
.ai-eval-loading {
    display: flex;
    align-items: center;
    gap: 8px;
    padding: 16px 8px;
    margin-top: 20px;
    border-top: 1px solid var(--aurora-border);
    font-size: 0.85rem;
    color: var(--aurora-text-light);
}
.ai-eval-spinner {
    animation: spin 1.2s linear infinite;
}
@keyframes spin {
    from { transform: rotate(0deg); }
    to { transform: rotate(360deg); }
}
.ai-eval-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 12px;
    margin-top: 4px;
}
.ai-eval-card {
    border: 1px solid var(--aurora-border);
    border-radius: 10px;
    background: var(--aurora-content-bg-lighter);
    overflow: hidden;
    text-align: left;
}
.ai-eval-card.ai-eval-error {
    opacity: 0.5;
}
.ai-eval-card-header {
    display: flex;
    align-items: center;
    gap: 6px;
    padding: 10px 12px;
    border-bottom: 1px solid var(--aurora-border);
}
.ai-eval-provider-icon {
    flex-shrink: 0;
    display: flex;
    align-items: center;
    opacity: 0.7;
}
.ai-eval-provider-icon svg {
    width: 18px;
    height: 18px;
}
.ai-eval-provider-name {
    font-size: 0.85rem;
    font-weight: 700;
}
.ai-eval-confidence {
    font-size: 0.75rem;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    padding: 2px 8px;
    margin: 4px 12px 0;
    border-radius: 10px;
    color: #fff;
    display: inline-block;
    width: auto;
}
.ai-eval-card-body {
    padding: 10px 12px;
    font-size: 0.82rem;
    line-height: 1.5;
    color: var(--aurora-text);
}
.ai-eval-known {
    color: #38a169;
    font-weight: 700;
    margin-bottom: 6px;
}
.ai-eval-unknown {
    color: var(--aurora-text-light);
    font-weight: 700;
    margin-bottom: 6px;
}
.ai-eval-desc {
    margin-bottom: 6px;
}
.ai-eval-meta {
    font-size: 0.78rem;
    color: var(--aurora-text-light);
    margin-bottom: 4px;
}
.ai-eval-source {
    font-size: 0.75rem;
    font-style: italic;
    color: var(--aurora-text-light);
    opacity: 0.8;
}
.ai-eval-na {
    color: var(--aurora-text-light);
    font-style: italic;
}
@media (max-width: 768px) {
    .ai-eval-grid {
        grid-template-columns: 1fr;
    }
}

/* ===================================== */
/* 15. FAQ Page                         */
/* ===================================== */
.faq-back-link {
    display: inline-block;
    font-size: 0.88rem;
    font-weight: 600;
    margin-bottom: 18px;
    color: var(--aurora-cyan-original);
    text-decoration: none;
    transition: color var(--transition-fast);
}
.faq-back-link:hover {
    color: var(--aurora-cyan-very-light);
}
body.light-mode .faq-back-link:hover {
    color: var(--aurora-text-dark);
}

.faq-intro {
    margin-bottom: 28px;
    padding: 22px 24px;
    background: var(--aurora-content-bg-lighter);
    border-radius: 12px;
    border: 1px solid var(--aurora-border);
}
.faq-intro h2 {
    font-size: 1.25rem;
    margin-bottom: 12px;
}
.faq-intro p {
    margin-bottom: 12px;
    font-size: 0.92rem;
    line-height: 1.7;
}
.faq-intro p:last-child {
    margin-bottom: 0;
}

.faq-section {
    margin-bottom: 12px;
    border: 1px solid var(--aurora-border);
    border-radius: 10px;
    overflow: hidden;
}
.faq-section:last-child {
    margin-bottom: 0;
}

.faq-question {
    font-size: 1rem;
    font-weight: 700;
    color: var(--aurora-text-white);
    padding: 16px 20px;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 12px;
    transition: background-color var(--transition-fast);
    user-select: none;
}
.faq-question:hover {
    background-color: var(--aurora-content-bg-lighter);
}
.faq-question::after {
    content: '+';
    flex-shrink: 0;
    font-size: 1.3rem;
    font-weight: 300;
    opacity: 0.5;
    transition: transform var(--transition-fast);
}
.faq-section.open .faq-question::after {
    content: '\2212';
}

.faq-answer {
    display: none;
    padding: 0 20px 20px;
}
.faq-section.open .faq-answer {
    display: block;
}

.faq-section ul,
.faq-section ol {
    padding-left: 20px;
    margin-bottom: 16px;
}
.faq-section ul li,
.faq-section ol li {
    margin-bottom: 8px;
    line-height: 1.6;
}

.faq-table {
    width: 100%;
    border-collapse: collapse;
    margin: 16px 0 20px;
    font-size: 0.9rem;
}
.faq-table th,
.faq-table td {
    padding: 10px 14px;
    text-align: left;
    border-bottom: 1px solid var(--aurora-border);
}
.faq-table th {
    font-weight: 700;
    font-size: 0.82rem;
    text-transform: uppercase;
    letter-spacing: 0.05em;
    color: var(--aurora-secondary-grey);
}
.faq-table td {
    color: var(--aurora-text-light);
}
.faq-table tbody tr:last-child td {
    border-bottom: none;
}

.faq-cms-list {
    columns: 3;
    column-gap: 24px;
    list-style: none;
    padding-left: 0 !important;
    margin: 12px 0 20px;
}
.faq-cms-list li {
    margin-bottom: 4px !important;
    font-size: 0.9rem;
    color: var(--aurora-text-light);
    break-inside: avoid;
}
@media screen and (max-width: 768px) {
    .faq-cms-list {
        columns: 2;
    }
}

.faq-premium-card {
    padding: 24px 28px;
    border-radius: 12px;
    border: 2px solid var(--aurora-electric-blue);
    background: linear-gradient(135deg, rgba(5, 125, 255, 0.08) 0%, rgba(77, 190, 255, 0.04) 100%);
}
body.light-mode .faq-premium-card {
    background: linear-gradient(135deg, rgba(0, 86, 179, 0.06) 0%, rgba(0, 86, 179, 0.02) 100%);
}
.faq-premium-card h2,
.faq-premium-card h3 {
    color: var(--aurora-cyan-original);
}

.faq-link {
    font-size: 0.85rem;
    color: var(--aurora-secondary-grey);
    transition: color var(--transition-fast);
}
.faq-link:hover {
    color: var(--aurora-cyan-original);
}

@media screen and (max-width: 768px) {
    .faq-section {
        margin-bottom: 24px;
    }
    .faq-table th,
    .faq-table td {
        padding: 8px 10px;
        font-size: 0.85rem;
    }
    .faq-intro {
        padding: 16px;
        margin-bottom: 20px;
    }
    .faq-intro h2 {
        font-size: 1.1rem;
    }
    .faq-intro p {
        font-size: 0.88rem;
    }
    .faq-premium-card {
        padding: 18px 16px;
    }
    .faq-question {
        padding: 14px 16px;
        font-size: 0.92rem;
    }
    .faq-answer {
        padding: 0 16px 16px;
    }
}

/* ===================================== */
/* 15b. AI Brand Awareness - Loading    */
/* ===================================== */
.breakdown-row-loading .breakdown-value-loading {
    color: var(--aurora-secondary-grey);
    display: flex;
    align-items: center;
}
.bar-spinner {
    animation: spin 1.2s linear infinite;
}
@keyframes spin {
    from { transform: rotate(0deg); }
    to { transform: rotate(360deg); }
}
.breakdown-fill.bar-loading {
    background: linear-gradient(90deg, transparent 0%, rgba(77, 190, 255, 0.3) 50%, transparent 100%);
    background-size: 200% 100%;
    animation: shimmer 1.5s ease-in-out infinite;
    width: 100% !important;
}
@keyframes shimmer {
    0% { background-position: -200% 0; }
    100% { background-position: 200% 0; }
}
.score-pending-note {
    font-size: 0.78rem;
    font-style: italic;
    color: var(--aurora-secondary-grey);
    margin-top: 4px;
    margin-bottom: 8px;
    text-align: center;
    animation: pulse-opacity 2s ease-in-out infinite;
}
@keyframes pulse-opacity {
    0%, 100% { opacity: 0.6; }
    50% { opacity: 1; }
}
.final-score-number.score-updated {
    animation: score-pop 0.6s ease-out;
}
@keyframes score-pop {
    0% { transform: scale(1); }
    50% { transform: scale(1.08); }
    100% { transform: scale(1); }
}
.ai-eval-timestamp {
    font-size: 0.75rem;
    font-style: italic;
    color: var(--aurora-secondary-grey);
    margin-top: 10px;
    text-align: right;
    display: flex;
    align-items: center;
    justify-content: flex-end;
    gap: 5px;
}
.ai-eval-timestamp svg {
    opacity: 0.6;
}

/* ===================================== */
/* 16. Pricing Page                     */
/* ===================================== */

.pricing-header {
    text-align: center;
    margin-bottom: 32px;
}
.pricing-header h1 {
    font-size: 1.7rem;
    margin-bottom: 6px;
    line-height: 1.3;
}
.pricing-domain {
    color: var(--aurora-cyan-original);
    font-size: 0.85em;
}
.pricing-site-info {
    display: flex;
    justify-content: center;
    flex-wrap: wrap;
    gap: 8px 20px;
    margin-top: 14px;
    padding: 10px 16px;
    background: var(--aurora-content-bg-lighter);
    border: 1px solid var(--aurora-border);
    border-radius: 8px;
    font-size: 0.82rem;
    color: var(--aurora-text-light);
}
.pricing-info-item {
    white-space: nowrap;
}

/* Grid layout */
.pricing-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 18px;
    align-items: stretch;
    max-width: 960px;
    margin: 0 auto;
}
@media (max-width: 820px) {
    .pricing-grid {
        grid-template-columns: 1fr;
        max-width: 400px;
    }
}

/* Card */
.pricing-card {
    position: relative;
    background: var(--aurora-content-bg);
    border: 1px solid var(--aurora-border);
    border-radius: 10px;
    overflow: hidden;
    transition: border-color 0.2s, box-shadow 0.2s;
    display: flex;
    flex-direction: column;
}
.pricing-card:hover {
    border-color: var(--aurora-secondary-grey);
}

/* Featured / recommended card */
.pricing-card-featured {
    border-color: rgba(40, 210, 130, 0.6);
    box-shadow: 0 0 0 1px rgba(40, 210, 130, 0.4);
}
.pricing-card-featured:hover {
    border-color: rgba(40, 210, 130, 0.6);
}
.pricing-card-badge {
    text-align: center;
    font-size: 0.75rem;
    font-weight: 700;
    letter-spacing: 0.04em;
    text-transform: uppercase;
    padding: 6px 0;
    background: linear-gradient(180deg, rgba(40, 210, 130, 0.35) 0%, rgba(30, 180, 100, 0.5) 100%);
    color: #fff;
    text-shadow: 0 1px 2px rgba(15, 23, 42, 0.3);
}
body.light-mode .pricing-card-badge {
    background: linear-gradient(180deg, rgba(220, 245, 230, 0.95) 0%, rgba(180, 230, 200, 1) 100%);
    color: #1a6b45;
    text-shadow: none;
}
body.light-mode .pricing-card-featured {
    border-color: rgba(50, 180, 110, 0.5);
    box-shadow: 0 0 0 1px rgba(50, 180, 110, 0.3);
}

/* Invisible spacer on non-featured cards to match badge height */
.pricing-card:not(.pricing-card-featured)::before {
    content: "";
    display: block;
    height: 28px;
}
/* Card header */
.pricing-card-header {
    text-align: center;
    padding: 20px 16px 16px;
    border-bottom: 1px solid var(--aurora-border);
}
.pricing-plan-name {
    font-size: 1.05rem;
    font-weight: 700;
    color: var(--aurora-text-light);
}
.pricing-price {
    font-size: 2.6rem;
    font-weight: 800;
    color: var(--aurora-text-white);
    line-height: 1.1;
    margin: 6px 0 2px;
}
.pricing-currency {
    font-size: 0.5em;
    vertical-align: super;
    opacity: 0.7;
    font-weight: 600;
}
.pricing-price-note {
    font-size: 0.75rem;
    color: var(--aurora-text-muted, #888);
}

/* Card body */
.pricing-card-body {
    padding: 16px;
    flex: 1 1 auto;
    display: flex;
    flex-direction: column;
}

/* Score estimate bar */
.pricing-score-estimate {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 6px;
    padding: 8px 10px;
    margin-bottom: 12px;
    background: var(--aurora-content-bg-lighter);
    border-radius: 6px;
    font-size: 0.82rem;
    flex-wrap: wrap;
}
.pricing-score-current {
    font-weight: 700;
    font-size: 1.2rem;
    color: var(--aurora-text-muted, #888);
}
.pricing-score-estimated {
    font-weight: 800;
    font-size: 1.2rem;
    color: var(--aurora-success-green);
}
.pricing-score-estimate svg {
    opacity: 0.5;
}
.pricing-score-label {
    width: 100%;
    text-align: center;
    font-size: 0.75rem;
    color: var(--aurora-text-muted, #888);
    margin-top: -2px;
}

/* Feature list */
.pricing-features {
    list-style: none;
    padding: 0;
    margin: 0 0 16px;
}
.pricing-features > li {
    position: relative;
    padding: 5px 0 5px 22px;
    font-size: 0.8rem;
    color: var(--aurora-text-light);
    line-height: 1.45;
}
.pricing-features > li::before {
    content: "\2713";
    position: absolute;
    left: 0;
    color: var(--aurora-success-green);
    font-weight: 700;
    font-size: 0.85rem;
}
/* "Everything in X, plus:" header */
.pricing-tier-inherit {
    font-weight: 600;
    font-size: 0.78rem;
    color: var(--aurora-text-muted, #888);
    padding-left: 0 !important;
}
.pricing-tier-inherit::before {
    display: none !important;
}
/* One-time bonus scan grant — headline feature of every tier */
.pricing-bonus-scans {
    margin: 0 0 8px;
    padding: 8px 10px !important;
    background: var(--aurora-content-bg-lighter, rgba(5, 125, 255, 0.08));
    border: 1px solid var(--aurora-border, rgba(5, 125, 255, 0.25));
    border-radius: 6px;
    color: var(--aurora-text, inherit);
    font-size: 0.82rem;
    line-height: 1.4;
}
.pricing-bonus-scans::before {
    display: none !important;
}
.pricing-bonus-scans strong {
    color: #057DFF;
}
.pricing-bonus-scans .pricing-note {
    display: block;
    margin-top: 2px;
}
.pricing-features code {
    font-size: 0.9em;
    background: var(--aurora-content-bg-lighter);
    padding: 1px 4px;
    border-radius: 3px;
}
.pricing-note {
    font-size: 0.88em;
    color: var(--aurora-text-muted, #888);
}
.pricing-feature-group {
    padding-bottom: 2px !important;
}
.pricing-sub-features {
    list-style: none;
    padding: 2px 0 0 0;
    margin: 0;
}
.pricing-sub-features li {
    position: relative;
    padding: 2px 0 2px 16px;
    font-size: 0.92em;
    color: var(--aurora-text-muted, #888);
}
.pricing-sub-features li::before {
    content: "\2022";
    position: absolute;
    left: 2px;
    color: var(--aurora-secondary-grey);
}

/* CTA buttons */
.pricing-cta {
    display: block;
    width: 100%;
    margin-top: auto;
    padding: 10px 0;
    border: 1px solid var(--aurora-border);
    border-radius: 6px;
    background: transparent;
    color: var(--aurora-text-light);
    font-size: 0.88rem;
    font-weight: 600;
    cursor: pointer;
    transition: background 0.15s, border-color 0.15s, color 0.15s;
}
.pricing-cta:hover {
    background: var(--aurora-content-bg-lighter);
    border-color: var(--aurora-secondary-grey);
}
.pricing-cta-featured {
    background: linear-gradient(180deg, rgba(40, 210, 130, 0.25) 0%, rgba(30, 180, 100, 0.45) 100%);
    border-color: rgba(40, 210, 130, 0.4);
    color: #fff;
    text-shadow: 0 1px 2px rgba(15, 23, 42, 0.3);
}
.pricing-cta-featured:hover {
    background: linear-gradient(180deg, rgba(40, 210, 130, 0.35) 0%, rgba(30, 180, 100, 0.55) 100%);
    border-color: rgba(40, 210, 130, 0.6);
    color: #fff;
}
body.light-mode .pricing-cta-featured {
    background: linear-gradient(180deg, rgba(220, 245, 230, 0.9) 0%, rgba(180, 230, 200, 0.95) 100%);
    border-color: rgba(50, 180, 110, 0.5);
    color: #1a6b45;
    text-shadow: none;
}
body.light-mode .pricing-cta-featured:hover {
    background: linear-gradient(180deg, rgba(200, 240, 220, 0.95) 0%, rgba(160, 220, 185, 1) 100%);
    border-color: rgba(50, 180, 110, 0.6);
    color: #1a6b45;
}

/* Page limit line */
.pricing-page-limit {
    font-size: 0.82rem;
    color: var(--aurora-text-light);
    margin-bottom: 10px;
    padding: 0 2px;
}

/* Already-has section (in header, below site info) */
.pricing-already-has {
    margin-top: 10px;
    font-size: 0.82rem;
    color: var(--aurora-text-muted, #888);
    line-height: 1.5;
    text-align: center;
}
.pricing-already-has strong {
    color: var(--aurora-text-light);
    font-weight: 600;
}

/* Pricing notes */
.pricing-notes {
    max-width: 960px;
    margin: 28px auto 0;
    font-size: 0.92rem;
    color: var(--aurora-text-light, #ccc);
    line-height: 1.7;
}
.pricing-notes p {
    margin: 0 0 6px;
}
.pricing-notes p::before {
    content: "\1F4A1";
    margin-right: 6px;
}

/* ==========================================================================
   17. Motion taste (skill: perpetual micro-interactions, CSS-only)
   Animations animate transform/opacity ONLY (skill performance guardrail).
   ========================================================================== */

/* Reduced-motion respect */
@media (prefers-reduced-motion: reduce) {
    *, *::before, *::after {
        animation-duration: 0.01ms !important;
        animation-iteration-count: 1 !important;
        transition-duration: 0.01ms !important;
        scroll-behavior: auto !important;
    }
}

/* --- Skeleton class (skill: skeletal loaders, not generic spinners) --- */
.skeleton {
    background: linear-gradient(
        90deg,
        var(--aurora-content-bg-lighter) 0%,
        rgba(168, 176, 188, 0.25) 50%,
        var(--aurora-content-bg-lighter) 100%
    );
    background-size: 200% 100%;
    animation: skeletonShimmer 1.4s ease-in-out infinite;
    border-radius: 6px;
    color: transparent !important;
    pointer-events: none;
    user-select: none;
}
@keyframes skeletonShimmer {
    0%   { background-position: 200% 0; }
    100% { background-position: -200% 0; }
}

/* --- Pulse "breathing" on positive status dots (perpetual micro-interaction).
       Drawn ONLY on the success state to draw the eye toward what's working.
       Not applied to .llms-not-found to avoid alarming the user. --- */
.llms-found::before,
.llms-warning::before {
    animation: dotBreathing 2.8s ease-in-out infinite;
}
@keyframes dotBreathing {
    0%, 100% { transform: scale(1);    opacity: 1;    }
    50%      { transform: scale(1.18); opacity: 0.75; }
}

/* --- Stagger fade-in on score breakdown rows (skill: cascade, not instant) ---
       Cap at 6 rows to avoid waterfall feeling slow. Index via :nth-child. */
.breakdown-row {
    opacity: 0;
    transform: translateY(4px);
    animation: rowFadeIn 360ms cubic-bezier(0.23, 1, 0.32, 1) forwards;
}
.breakdown-row:nth-child(1) { animation-delay: 60ms; }
.breakdown-row:nth-child(2) { animation-delay: 120ms; }
.breakdown-row:nth-child(3) { animation-delay: 180ms; }
.breakdown-row:nth-child(4) { animation-delay: 240ms; }
.breakdown-row:nth-child(5) { animation-delay: 300ms; }
.breakdown-row:nth-child(6) { animation-delay: 360ms; }
.breakdown-row:nth-child(n+7) { animation-delay: 360ms; }
@keyframes rowFadeIn {
    to { opacity: 1; transform: translateY(0); }
}

/* ===================================== */
/* 18. Reports dashboard (db-*)          */
/* ===================================== */

.db-content-header { display:flex; align-items:flex-start; justify-content: space-between; gap: 20px; margin-bottom: 24px; flex-wrap: wrap; }
.db-h1 { font-family: var(--font-display, inherit); font-size: 1.7rem; font-weight: 600; margin: 0 0 6px; line-height: 1.3; letter-spacing: -0.015em; color: var(--brand-blue); }
.content-container > h1 { font-size: 1.7rem; margin-bottom: 6px; line-height: 1.3; }
.content-container > h1,
.pricing-header h1 { color: var(--brand-blue); }
.db-h2 { font-family: var(--font-display, inherit); font-size: 1.15rem; font-weight: 700; margin: 0 0 4px; color: var(--fg-strong); }
.db-sub { color: var(--fg-muted); font-size: .9rem; margin: 6px 0 0; }
.db-header-actions { display:flex; align-items:center; gap: 10px; }
.db-search { display:flex; align-items:center; gap:8px; background: var(--surface-2); border:1px solid var(--border); padding: 6px 12px; border-radius: var(--radius-md); color: var(--fg-muted); }
.db-search input { background: transparent; border: none; color: var(--fg); font-size:.88rem; font-family: inherit; outline: none; width: 200px; }

.db-back-btn { display:inline-flex; align-items:center; gap:6px; background: none; border:none; color: var(--fg-muted); font-size:.82rem; cursor:pointer; padding: 4px 0; margin-bottom: 12px; font-family: inherit; }
.db-back-btn:hover { color: var(--fg); }

.db-reports-grid { display:flex; flex-direction: column; gap: 12px; }
.db-report-card,
.db-report-card:hover,
.db-report-card:focus,
.db-report-card:active,
.content-container a.db-report-card,
.content-container a.db-report-card:hover { display:flex; align-items:center; justify-content: space-between; gap: 20px; padding: 14px 18px; background: var(--surface); border: 1px solid var(--border); border-radius: var(--radius-lg); cursor:pointer; text-decoration: none !important; color: var(--fg) !important; }
.db-report-card *,
.db-report-card *:hover,
.content-container .db-report-card *,
.content-container .db-report-card *:hover { text-decoration: none !important; }
.db-report-card-left { display:flex; align-items:center; gap: 14px; min-width:0; flex: 1; }
.db-report-favicon { width: 36px; height: 36px; border-radius: 8px; color: #fff; display:flex; align-items:center; justify-content:center; font-weight: 700; font-size: 1rem; flex-shrink:0; overflow: hidden; }
.db-report-favicon-img { background: var(--surface-2) !important; }
.db-report-favicon-img img { width: 100%; height: 100%; object-fit: contain; display: block; padding: 6px; box-sizing: border-box; }
.db-report-meta { min-width:0; }
.db-report-domain { font-weight: 600; font-size: 1rem; color: var(--fg-strong); overflow:hidden; text-overflow:ellipsis; white-space:nowrap; }
.db-report-sub { font-size: .76rem; color: var(--fg-muted); margin-top: 3px; display:flex; align-items:center; gap:6px; flex-wrap:wrap; }
.db-plan-chip { padding: 2px 8px; border-radius: 9999px; font-weight: 700; text-transform: uppercase; font-size: .62rem; letter-spacing: .05em; border: 1px solid var(--border); }
.db-plan-starter { background: rgba(168,176,188,.15); color: var(--fg); }
.db-plan-pro { background: #38a169; color: #fff; border-color: #38a169; }
.db-plan-max { background: rgba(5,125,255,.15); color: var(--brand-blue); border-color: rgba(5,125,255,.35); }

.db-report-card-right { display:flex; align-items:center; gap: 18px; flex-shrink: 0; }
.db-score-pair { display:flex; align-items:center; gap: 10px; }
.db-score-before, .db-score-after { text-align:center; min-width: 52px; }
.db-score-label { font-size: .62rem; color: var(--fg-muted); text-transform: uppercase; letter-spacing: .05em; font-weight: 600; }
.db-score-value { font-family: var(--font-display, inherit); font-size: 1.5rem; font-weight: 700; line-height: 1; margin-top: 2px; }

.db-action-btn { display:inline-flex; align-items:center; gap:6px; padding: 8px 14px; border-radius: var(--radius-md); background: var(--surface-2); border: 1px solid var(--border); color: var(--fg); font-size:.82rem; font-weight: 600; cursor:pointer; font-family: inherit; transition: background .15s, border-color .15s; white-space: nowrap; }
.db-action-btn:hover { background: var(--surface); border-color: rgba(168,176,188,.6); }
.db-action-primary { background: var(--brand-blue); border-color: var(--brand-blue); color: #fff; }
.db-action-primary:hover { background: #0056b3; border-color: #0056b3; color: #fff; }
body.light-mode .db-action-primary { background: #0056b3; border-color: #0056b3; color: #fff; }
body.light-mode .db-action-primary:hover { background: #003f86; border-color: #003f86; }

/* When action buttons are rendered as <a> inside .content-container the
   global link rule would apply underline + cyan color — override here. */
.content-container a.db-action-btn,
.content-container a.db-action-btn:hover { text-decoration: none !important; color: var(--fg) !important; }
.content-container a.db-action-primary,
.content-container a.db-action-primary:hover { color: #fff !important; }

.db-empty { padding: 60px 20px; text-align: center; color: var(--fg-muted); border: 1px dashed var(--border); border-radius: var(--radius-lg); background: var(--surface); }
.db-empty h3 { margin: 0 0 8px; color: var(--fg-strong); font-size: 1.05rem; }
.db-empty p { margin: 0 0 18px; font-size: .9rem; }

.db-quota { display: flex; align-items: center; justify-content: space-between; gap: 16px; flex-wrap: wrap; margin-bottom: 40px; }
.db-quota-text { color: var(--fg-muted); font-size: .85rem; margin: 0; line-height: 1.5; }
.db-quota-text strong { color: var(--fg-strong); font-weight: 600; }
.db-quota-text .db-signin-link { color: var(--brand-blue); text-decoration: none; font-weight: 500; }
.db-quota-text .db-signin-link:hover { text-decoration: underline; }
.db-quota-cta { display: inline-flex; align-items: center; gap: 8px; padding: 9px 16px; background: var(--brand-blue); color: #fff !important; border-radius: var(--radius-md); font-size: .88rem; font-weight: 500; text-decoration: none; transition: background 150ms ease-out, transform 150ms ease-out; }
.db-quota-cta:hover { background: var(--brand-blue-strong, #0466d6); transform: translateY(-1px); }

@media (max-width: 900px) {
  .db-report-card { flex-direction: column; align-items: stretch; }
  .db-report-card-right { justify-content: space-between; }
  .db-quota-cta { width: 100%; justify-content: center; }
}

/* ===================================== */
/* 18b. Account page                     */
/* ===================================== */
.account-card {
    background: var(--surface);
    border: 1px solid var(--border);
    border-radius: var(--radius-lg);
    padding: 18px 20px;
    margin-bottom: 28px;
}
.account-card-row {
    display: flex;
    gap: 16px;
    padding: 8px 0;
    border-bottom: 1px solid var(--border);
    align-items: baseline;
}
.account-card-row:last-of-type { border-bottom: none; }
.account-card-label {
    width: 120px;
    color: var(--fg-muted);
    font-size: .85rem;
    font-weight: 500;
    flex-shrink: 0;
}
.account-card-value {
    color: var(--fg-strong);
    font-size: .95rem;
    font-weight: 500;
}
.account-card-hint { color: var(--fg-muted); font-weight: 400; font-size: .85rem; }
.account-card-note { color: var(--fg-muted); font-weight: 400; font-size: .82rem; margin-left: 6px; }
.account-purchase-bonus { color: var(--brand-blue, #057dff); font-weight: 600; }
.account-card-actions {
    margin-top: 14px;
    display: flex;
    justify-content: flex-end;
}
.account-signout-btn {
    background: transparent;
    border: 1px solid var(--border);
    color: var(--fg);
    padding: 8px 16px;
    border-radius: var(--radius-md);
    font-weight: 600;
    font-size: .85rem;
    cursor: pointer;
    transition: background .15s, color .15s;
}
.account-signout-btn:hover { background: var(--surface-2); color: var(--fg-strong); }

.account-section { margin-top: 8px; }
.account-section-title {
    font-size: 1.1rem;
    font-weight: 600;
    margin: 0 0 14px;
    color: var(--fg-strong);
}
.account-purchases {
    display: flex;
    flex-direction: column;
    gap: 12px;
}
.account-purchase {
    background: var(--surface);
    border: 1px solid var(--border);
    border-radius: var(--radius-lg);
    padding: 16px 18px;
}
.account-purchase-head {
    display: flex;
    justify-content: space-between;
    align-items: flex-start;
    gap: 16px;
    margin-bottom: 6px;
}
.account-purchase-title {
    display: flex;
    flex-direction: column;
    gap: 2px;
    min-width: 0;
}
.account-purchase-plan {
    font-weight: 600;
    color: var(--fg-strong);
    font-size: .95rem;
}
.account-purchase-domain {
    color: var(--fg-muted);
    font-size: .82rem;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}
.account-purchase-amount {
    font-weight: 600;
    font-size: 1rem;
    color: var(--fg-strong);
    flex-shrink: 0;
}
.account-purchase-meta {
    color: var(--fg-muted);
    font-size: .82rem;
    margin-bottom: 12px;
}
.account-purchase-link { color: var(--brand-blue); text-decoration: none; font-weight: 500; }
.account-purchase-link:hover { text-decoration: underline; }
.account-purchase-actions {
    display: flex;
    gap: 8px;
    flex-wrap: wrap;
    align-items: center;
}
.account-purchase-btn {
    background: transparent;
    border: 1px solid var(--border);
    color: var(--fg);
    padding: 6px 12px;
    border-radius: var(--radius-md);
    font-size: .82rem;
    font-weight: 500;
    cursor: pointer;
    font-family: var(--font-sans);
    transition: background .15s, color .15s;
}
.account-purchase-btn:not(:disabled):hover { background: var(--surface-2); color: var(--fg-strong); }
.account-purchase-btn:disabled { opacity: .5; cursor: not-allowed; }
.account-purchase-hint,
.account-purchase-expired {
    color: var(--fg-muted);
    font-size: .78rem;
}
.account-purchase-expired { color: #E85D5D; }

a.account-purchase-btn { text-decoration: none; display: inline-flex; align-items: center; }

/* Upgrade upsell shown on Starter/Pro purchase cards */
.account-upgrade {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 12px;
    flex-wrap: wrap;
    margin-top: 14px;
    padding: 12px 14px;
    border: 1px solid var(--border);
    border-radius: var(--radius-md);
    background: var(--surface-2);
}
.account-upgrade-text { display: flex; flex-direction: column; gap: 2px; min-width: 0; }
.account-upgrade-title { font-weight: 600; color: var(--fg-strong); font-size: .9rem; }
.account-upgrade-gain { font-size: .82rem; color: var(--fg); }
.account-upgrade-gain strong { color: #1f9e5b; }
.account-upgrade-sub { font-size: .76rem; color: var(--fg-muted); }
.account-upgrade .account-purchase-btn { flex: 0 0 auto; white-space: nowrap; }

.account-genpdf-loading {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    cursor: wait;
}
.account-genpdf-loading .vc-logo-spinner { width: 1.2em; height: 1.2em; margin: 0; }

.account-files-pending {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    color: var(--fg-muted);
    font-size: .85rem;
}
.account-files-pending-spinner {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 1.4em;
    height: 1.4em;
}
.account-files-pending-spinner .vc-logo-spinner {
    width: 1.4em;
    height: 1.4em;
    margin: 0;
}
.account-files-pending-error { color: #c53030; }
.account-files-retry {
    margin-left: 8px;
    padding: 2px 10px;
    border: 1px solid currentColor;
    background: transparent;
    color: inherit;
    border-radius: var(--radius-md);
    font-size: .78rem;
    cursor: pointer;
}
.account-files-retry:hover { background: rgba(197, 48, 48, 0.08); }

.account-flash {
    padding: 10px 14px;
    border-radius: var(--radius-md);
    margin-bottom: 16px;
    font-size: .9rem;
    border: 1px solid transparent;
}
.account-flash-success { background: rgba(56,161,105,0.10); border-color: rgba(56,161,105,0.35); color: #2f855a; }
.account-flash-warning { background: rgba(214,158,46,0.10); border-color: rgba(214,158,46,0.35); color: #b7791f; }
.account-flash-error   { background: rgba(229,62,62,0.10);  border-color: rgba(229,62,62,0.35);  color: #c53030; }

.account-purchase-files {
    list-style: none;
    padding: 0;
    margin: 12px 0 0;
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(220px, 1fr));
    gap: 6px 16px;
}
.account-purchase-files li {
    font-size: .85rem;
    line-height: 1.4;
    display: flex;
    flex-direction: column;
    gap: 2px;
    padding: 6px 10px;
    border: 1px solid var(--border);
    border-radius: var(--radius-md);
    background: var(--surface);
}
.account-purchase-files a { color: var(--fg-strong); text-decoration: none; font-family: 'JetBrains Mono', ui-monospace, monospace; font-size: .82rem; }
.account-purchase-files a:hover { text-decoration: underline; }
.account-purchase-files-meta { color: var(--fg-muted); font-size: .72rem; }
.account-branding-slot {
    border: 1px dashed var(--border, #d0d7de);
    border-radius: 10px;
    padding: .75rem .9rem;
    margin: 0 0 .9rem;
    display: flex;
    flex-direction: column;
    gap: .4rem;
    background: color-mix(in srgb, var(--bg, #fff) 92%, #057DFF 8%);
}
.account-branding-title { font-weight: 600; font-size: .9rem; }
.account-branding-preview {
    max-height: 48px;
    max-width: 220px;
    object-fit: contain;
    align-self: flex-start;
    background: #fff;
    border: 1px solid var(--border, #e5e7eb);
    border-radius: 6px;
    padding: 4px 8px;
}
.account-branding-form {
    display: flex;
    gap: .5rem;
    align-items: center;
    flex-wrap: wrap;
    margin-top: .2rem;
}
.account-branding-file { font-size: .78rem; flex: 1 1 180px; min-width: 0; }
.account-branding-url {
    flex: 1 1 200px;
    min-width: 0;
    padding: .45rem .6rem;
    border: 1px solid var(--border, #d0d7de);
    border-radius: 8px;
    background: var(--bg, #fff);
    color: var(--fg, #1a1a1a);
    font-size: .82rem;
}
.account-branding-url:focus {
    outline: none;
    border-color: #057DFF;
    box-shadow: 0 0 0 3px rgba(5, 125, 255, .15);
}
.account-branding-status { display: block; margin-top: .25rem; }

/* "Your platform" confirm/override panel — sibling of the branding slot,
   same dashed card + subtle brand tint, themed via the shared tokens. */
.account-platform-slot {
    border: 1px dashed var(--border, #d0d7de);
    border-radius: 10px;
    padding: .75rem .9rem;
    margin: 0 0 .9rem;
    display: flex;
    flex-direction: column;
    gap: .4rem;
    background: color-mix(in srgb, var(--bg, #fff) 92%, #057DFF 8%);
}
.account-platform-current {
    display: flex;
    align-items: center;
    flex-wrap: wrap;
    gap: .5rem;
    margin: .1rem 0;
    font-size: .9rem;
    color: var(--fg-strong);
}
.account-platform-current strong { font-weight: 600; }
.account-platform-badge {
    font-size: .68rem;
    font-weight: 600;
    padding: 2px 9px;
    border-radius: 999px;
    border: 1px solid transparent;
    white-space: nowrap;
}
/* Dark mode (default): white text on a solid coloured border stays legible on
   the near-black background. Light mode restores the coloured text below. */
.account-platform-badge.is-high   { background: rgba(56,161,105,0.20); border-color: #38a169;               color: #fff; }
.account-platform-badge.is-medium { background: rgba(214,158,46,0.20);  border-color: #d69e2e;               color: #fff; }
.account-platform-badge.is-low    { background: rgba(229,62,62,0.20);  border-color: #e53e3e;               color: #fff; }
.account-platform-badge.is-user   { background: rgba(5,125,255,0.12);  border-color: rgba(5,125,255,0.30);  color: #057DFF; }
/* Light mode: the darker coloured text reads fine on the light tinted background. */
body.light-mode .account-platform-badge.is-high   { background: rgba(56,161,105,0.12); border-color: rgba(56,161,105,0.30); color: #2f855a; }
body.light-mode .account-platform-badge.is-medium { background: rgba(214,158,46,0.12); border-color: rgba(214,158,46,0.30); color: #b7791f; }
body.light-mode .account-platform-badge.is-low    { background: rgba(229,62,62,0.12); border-color: rgba(229,62,62,0.30); color: #c53030; }
.account-platform-actions {
    display: flex;
    gap: .5rem;
    flex-wrap: wrap;
    margin-top: .1rem;
}
.account-platform-editor {
    display: none;
    flex-direction: column;
    gap: .55rem;
    max-width: 460px;
    margin-top: .5rem;
    padding-top: .6rem;
    border-top: 1px solid var(--border);
}
.account-platform-editor.is-open { display: flex; }
.account-platform-select {
    width: 100%;
    padding: .45rem .6rem;
    border: 1px solid var(--border, #d0d7de);
    border-radius: 8px;
    background: var(--bg, #fff);
    color: var(--fg, #1a1a1a);
    font-size: .82rem;
    font-family: var(--font-sans);
}
.account-platform-select:focus {
    outline: none;
    border-color: #057DFF;
    box-shadow: 0 0 0 3px rgba(5, 125, 255, .15);
}
.account-platform-headless {
    display: flex;
    align-items: center;
    gap: .5rem;
    font-size: .78rem;
    color: var(--fg-muted);
    cursor: pointer;
}
.account-platform-headless input { margin: 0; flex: 0 0 auto; }
.account-platform-status { display: block; margin-top: .15rem; }
/* Compact platform/branding slots: keep their single action button tidy. */
.account-platform-slot .account-purchase-btn,
.account-branding-slot .account-purchase-btn { align-self: flex-start; }

/* Categorised file list: "Instructions" + "Files" sections, each described. */
.account-files-grouped {
    margin-top: 12px;
    display: flex;
    flex-direction: column;
    gap: 1.1rem;
}
.account-files-group-title {
    font-weight: 600;
    font-size: .85rem;
    color: var(--fg-strong);
}
.account-files-group-desc { display: block; margin: 2px 0; }
.account-files-group .account-purchase-files { margin-top: 8px; }

/* Account modal — used by the platform + white-label controls. */
.account-modal {
    position: fixed;
    inset: 0;
    z-index: 1000;
    display: none;
    align-items: flex-start;
    justify-content: center;
    padding: 6vh 16px 16px;
    background: rgba(15, 23, 42, 0.55);
    -webkit-backdrop-filter: blur(2px);
    backdrop-filter: blur(2px);
    overflow-y: auto;
}
.account-modal.is-open { display: flex; }
body.account-modal-open { overflow: hidden; }
.account-modal-dialog {
    width: 100%;
    max-width: 520px;
    background: var(--bg, #fff);
    border: 1px solid var(--border, #e5e7eb);
    border-radius: 14px;
    box-shadow: 0 20px 60px rgba(0, 0, 0, .30);
    overflow: hidden;
    animation: accountModalIn .16s ease-out;
}
@keyframes accountModalIn {
    from { opacity: 0; transform: translateY(-8px); }
    to   { opacity: 1; transform: translateY(0); }
}
.account-modal-head {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 1rem;
    padding: .9rem 1.1rem;
    border-bottom: 1px solid var(--border, #e5e7eb);
}
.account-modal-title { font-weight: 600; font-size: 1rem; color: var(--fg-strong); }
.account-modal-close {
    border: none;
    background: transparent;
    color: var(--fg-muted);
    font-size: 1.5rem;
    line-height: 1;
    cursor: pointer;
    padding: 0 .25rem;
    border-radius: 6px;
}
.account-modal-close:hover { color: var(--fg-strong); }
.account-modal-body {
    padding: 1.1rem;
    display: flex;
    flex-direction: column;
    gap: .7rem;
}

/* Platform editor inside the modal: always visible (no inline toggle). */
.account-platform-editor--modal {
    display: flex;
    max-width: none;
    margin-top: 0;
    padding-top: .8rem;
}
.account-platform-editor-title {
    font-weight: 600;
    font-size: .85rem;
    color: var(--fg-strong);
}

/* ===================================== */
/* 19. Site Footer & Cookie Banner      */
/* ===================================== */

.site-footer {
    margin-top: 60px;
    padding: 24px 0 28px;
    border-top: 1px solid var(--border);
    color: var(--fg-muted);
    font-size: 0.82rem;
    line-height: 1.4;
}
.site-footer__inner {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    justify-content: space-between;
    gap: 12px 20px;
    max-width: 1100px;
    margin: 0 auto;
    padding: 0 24px;
}
.site-footer__copy {
    letter-spacing: 0.01em;
}
.site-footer__links {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: 6px 18px;
}
.site-footer__links a,
.site-footer__link-btn {
    color: var(--fg-muted);
    text-decoration: none;
    background: none;
    border: none;
    padding: 0;
    cursor: pointer;
    font: inherit;
    font-size: 0.82rem;
    transition: color 0.15s ease;
}
.site-footer__links a:hover,
.site-footer__link-btn:hover {
    color: var(--fg-strong);
    text-decoration: underline;
}
.site-footer__link-btn:focus-visible,
.site-footer__links a:focus-visible {
    outline: 2px solid var(--brand-blue);
    outline-offset: 2px;
    border-radius: 2px;
}

.cookie-banner {
    position: fixed;
    right: 20px;
    bottom: 20px;
    left: auto;
    z-index: 60;
    width: 360px;
    max-width: calc(100vw - 40px);
    background: var(--surface);
    border: 1px solid var(--border);
    border-radius: 14px;
    box-shadow: 0 12px 32px rgba(0, 0, 0, 0.22);
    padding: 18px 20px;
    color: var(--fg);
    opacity: 0;
    transform: translateY(16px);
    transition: opacity 0.2s ease, transform 0.25s ease;
}
.cookie-banner.is-visible {
    opacity: 1;
    transform: translateY(0);
}
.cookie-banner[hidden] {
    display: none;
}
.cookie-banner__inner {
    display: flex;
    flex-direction: column;
    align-items: stretch;
    gap: 14px;
}
.cookie-banner__text {
    margin: 0;
    font-size: 0.86rem;
    line-height: 1.5;
    color: var(--fg);
}
.cookie-banner__text strong {
    color: var(--fg-strong);
    font-weight: 600;
    margin-right: 4px;
}
.cookie-banner__actions {
    display: grid;
    grid-template-columns: 1fr 1fr;
    align-items: center;
    gap: 8px 10px;
}
.cookie-banner__link {
    grid-column: 1 / -1;
    color: var(--fg-muted);
    font-size: 0.82rem;
    text-decoration: underline;
    text-underline-offset: 3px;
    transition: color 0.15s ease;
}
.cookie-banner__link:hover {
    color: var(--fg-strong);
}
.cookie-banner__btn {
    appearance: none;
    border: 1px solid transparent;
    border-radius: 10px;
    padding: 9px 18px;
    font: inherit;
    font-size: 0.88rem;
    font-weight: 600;
    cursor: pointer;
    transition: background 0.15s ease, border-color 0.15s ease, color 0.15s ease, transform 0.08s ease;
}
.cookie-banner__btn:active {
    transform: scale(0.97);
}
.cookie-banner__btn--secondary {
    background: transparent;
    border-color: var(--border);
    color: var(--fg);
}
.cookie-banner__btn--secondary:hover {
    border-color: var(--fg-muted);
    color: var(--fg-strong);
}
.cookie-banner__btn--primary {
    background: var(--brand-blue);
    border-color: var(--brand-blue);
    color: #fff;
}
.cookie-banner__btn--primary:hover {
    background: var(--brand-blue-hover, #0466d6);
    border-color: var(--brand-blue-hover, #0466d6);
}
.cookie-banner__btn:focus-visible {
    outline: 2px solid var(--brand-blue);
    outline-offset: 2px;
}

@media (max-width: 640px) {
    .cookie-banner {
        right: 10px;
        left: 10px;
        bottom: 10px;
        width: auto;
        max-width: none;
        padding: 14px 16px;
        border-radius: 12px;
    }
    .cookie-banner__inner {
        gap: 12px;
    }
    .cookie-banner__text {
        font-size: 0.84rem;
        line-height: 1.45;
    }
    .cookie-banner__actions {
        gap: 8px;
    }
    .cookie-banner__btn {
        padding: 8px 14px;
        font-size: 0.84rem;
    }
    .site-footer__inner {
        flex-direction: column;
        align-items: flex-start;
        gap: 8px;
        padding: 0 18px;
    }
}

@media (prefers-reduced-motion: reduce) {
    .cookie-banner {
        transition: opacity 0.15s ease;
        transform: none;
    }
    .cookie-banner.is-visible {
        transform: none;
    }
}

/* ===================================== */
/* 20. Legal pages (Privacy / Terms)    */
/* ===================================== */

.legal-toc {
    margin: 24px 0 32px;
    padding: 18px 22px;
    background: var(--surface-2);
    border: 1px solid var(--border);
    border-radius: 12px;
    color: var(--fg);
}
.legal-toc p {
    margin: 0 0 8px;
    color: var(--fg-strong);
}
.legal-toc ol {
    margin: 0;
    padding-left: 22px;
    columns: 2;
    column-gap: 30px;
}
.legal-toc li {
    margin: 4px 0;
}
.legal-toc a {
    color: var(--brand-blue);
    text-decoration: none;
}
.legal-toc a:hover {
    text-decoration: underline;
}

.legal-section {
    margin: 36px 0;
    scroll-margin-top: 90px;
}
.legal-section h2 {
    margin: 0 0 14px;
    font-size: 1.45rem;
    font-weight: 600;
    color: var(--fg-strong);
    letter-spacing: -0.01em;
}
.legal-section h3 {
    margin: 22px 0 8px;
    font-size: 1.05rem;
    font-weight: 600;
    color: var(--fg-strong);
}
.legal-section p,
.legal-section li {
    line-height: 1.65;
    color: var(--fg);
}
.legal-section ul,
.legal-section ol {
    padding-left: 22px;
}
.legal-section a {
    color: var(--brand-blue);
}
.legal-section code {
    font-family: 'JetBrains Mono', 'Noto Sans Mono', monospace;
    font-size: 0.86em;
    padding: 1px 5px;
    border-radius: 4px;
    background: var(--surface-2);
    border: 1px solid var(--border);
}

.legal-table {
    width: 100%;
    border-collapse: collapse;
    margin: 14px 0 8px;
    font-size: 0.92rem;
    color: var(--fg);
}
.legal-table th,
.legal-table td {
    text-align: left;
    padding: 10px 12px;
    border-bottom: 1px solid var(--border);
    vertical-align: top;
}
.legal-table thead th {
    background: var(--surface-2);
    color: var(--fg-strong);
    font-weight: 600;
    border-bottom: 1px solid var(--border);
}
.legal-table code {
    background: transparent;
    border: none;
    padding: 0;
}

@media (max-width: 640px) {
    .legal-toc ol {
        columns: 1;
    }
    .legal-table {
        font-size: 0.85rem;
    }
    .legal-table th,
    .legal-table td {
        padding: 8px 8px;
    }
}

/* ===================================== */
/* 21. End of Stylesheet                */
/* ===================================== */
