/* =========================================================
   ScamScan style.css
========================================================= */

/* =========================================================
   1. Base
========================================================= */

* {
    box-sizing: border-box;
}

:root {
    --bg: #ffffff;
    --text: #070816;
    --muted: #667085;
    --purple: #6826ff;
    --purple-2: #b632ff;
    --line: #ececf2;
    --card: #ffffff;

    --success: #22c55e;
    --warning: #f59e0b;
    --danger: #ef4444;
    --info: #3b82f6;

    --shadow-soft: 0 24px 80px rgba(16, 5, 31, 0.08);
    --shadow-strong: 0 30px 110px rgba(16, 5, 31, 0.18);

    --radius-sm: 8px;
    --radius-md: 14px;
    --radius-lg: 18px;
    --radius-pill: 999px;
}

html,
body {
    margin: 0;
    padding: 0;
    overflow-x: hidden;
}

body {
    font-family: 'Inter', Arial, sans-serif;
    background: var(--bg);
    color: var(--text);
}

button,
a,
label {
    -webkit-tap-highlight-color: transparent;
}

button {
    font-family: inherit;
}

a {
    color: inherit;
}

.hidden {
    display: none !important;
}

/* =========================================================
   2. Background
========================================================= */

.site-bg {
    position: fixed;
    inset: 0;
    z-index: -10;
    overflow: hidden;
    pointer-events: none;
}

.grid-bg {
    position: absolute;
    inset: 0;
    pointer-events: none;
    background-image:
        linear-gradient(to right, rgba(15, 23, 42, 0.055) 1px, transparent 1px),
        linear-gradient(to bottom, rgba(15, 23, 42, 0.035) 1px, transparent 1px);
    background-size: 205px 205px;
}

.glow {
    position: absolute;
    border-radius: var(--radius-pill);
    filter: blur(80px);
    opacity: 0.28;
    pointer-events: none;
}

.glow-one {
    width: 560px;
    height: 560px;
    background: #ede7ff;
    top: -80px;
    left: 50%;
    transform: translateX(-50%);
}

.glow-two {
    width: 420px;
    height: 420px;
    background: #f4e7ff;
    top: 120px;
    right: 160px;
}

/* =========================================================
   3. Minimal topbar
   Required HTML:
   <div class="top-status-bar">
       <div class="topbar-spacer"></div>
       <div class="topbar-controls">
           <div class="status-pill"><span class="dot green"></span>API: online</div>
           <button class="status-pill language-toggle" id="languageToggle" type="button">NL</button>
           <button class="status-pill theme-toggle" id="themeToggle" type="button">🌙 Dark</button>
       </div>
   </div>
========================================================= */

.top-status-bar {
    width: 100%;
    min-height: 48px;
    background: rgba(5, 10, 25, 0.95);
    border-bottom: 1px solid rgba(255,255,255,0.06);
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 0 24px;
    position: sticky;
    top: 0;
    z-index: 99999;
    backdrop-filter: blur(14px);
}

.topbar-left,
.topbar-controls {
    display: flex;
    align-items: center;
    gap: 12px;
}

.top-status-bar * {
    pointer-events: auto;
}

.topbar-spacer {
    flex: 1;
}

.topbar-controls {
    display: flex;
    align-items: center;
    gap: 12px;
}

.status-pill {
    min-height: 34px;
    padding: 0 14px;
    border-radius: var(--radius-pill);
    background: rgba(255,255,255,0.04);
    border: 1px solid rgba(255,255,255,0.08);
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    color: white;
    font-size: 13px;
    font-weight: 700;
    white-space: nowrap;
    text-decoration: none;
    position: relative;
    z-index: 100000;
}

button.status-pill {
    cursor: pointer;
}

.language-toggle {
    min-width: 54px;
}

.theme-toggle {
    cursor: pointer;
    user-select: none;
}

.dot {
    width: 8px;
    height: 8px;
    border-radius: var(--radius-pill);
    flex: 0 0 auto;
}

.dot.green {
    background: var(--success);
    box-shadow: 0 0 12px var(--success);
}

.dot.blue {
    background: var(--info);
    box-shadow: 0 0 12px var(--info);
}

/* =========================================================
   4. Navigation
========================================================= */

.navbar {
    width: min(92%, 1720px);
    margin: 24px auto 0;
    display: flex;
    align-items: center;
    justify-content: space-between;
    position: relative;
    z-index: 100;
}

.logo-wrap {
    display: flex;
    align-items: center;
    gap: 10px;
    text-decoration: none;
    color: var(--text);
}

.logo-mark {
    width: 34px;
    height: 34px;
    border-radius: 10px;
    background: linear-gradient(135deg, var(--purple), var(--purple-2));
    color: white;
    display: flex;
    align-items: center;
    justify-content: center;
    font-weight: 900;
    box-shadow: 0 10px 30px rgba(104, 38, 255, 0.28);
}

.logo-text {
    font-weight: 800;
    letter-spacing: -0.03em;
}

.nav-actions {
    display: flex;
    gap: 16px;
    align-items: center;
}

.nav-link,
.nav-button {
    text-decoration: none;
    font-weight: 700;
    font-size: 15px;
    padding: 15px 24px;
    transition: 0.2s ease;
}

.nav-link {
    color: var(--purple);
    border: 1px solid var(--purple);
    background: transparent;
}

.nav-button {
    color: white;
    background: linear-gradient(135deg, var(--purple), #4f1fff);
    border: 1px solid transparent;
}

.nav-button:hover,
.nav-link:hover {
    transform: translateY(-1px);
}

/* =========================================================
   5. Homepage
========================================================= */

.hero-section {
    position: relative;
    width: min(94%, 1100px);
    margin: 110px auto 0;
    text-align: center;
    min-height: 620px;
}

.center-icon {
    margin-bottom: 54px;
}

.shield-icon {
    width: 68px;
    height: 68px;
    border-radius: 16px;
    margin: 0 auto;
    background: #10051f;
    color: var(--purple-2);
    display: flex;
    align-items: center;
    justify-content: center;
    font-weight: 900;
    font-size: 28px;
    box-shadow: 0 18px 40px rgba(16, 5, 31, 0.22);
}

.hero-section h1 {
    max-width: 850px;
    margin: 0 auto;
    font-size: clamp(48px, 5vw, 78px);
    line-height: 1.08;
    letter-spacing: -0.06em;
    font-weight: 900;
}

.hero-section h1 span:last-child {
    background: linear-gradient(135deg, var(--purple), var(--purple-2));
    -webkit-background-clip: text;
    color: transparent;
}

.hero-subtitle {
    max-width: 760px;
    margin: 28px auto 0;
    color: #1f2a44;
    font-size: 19px;
    line-height: 1.8;
}

.floating-card {
    position: absolute;
    width: 54px;
    height: 54px;
    border-radius: 9px;
    background: rgba(255,255,255,0.82);
    box-shadow: 0 18px 40px rgba(0,0,0,0.08);
    color: #344054;
    display: flex;
    align-items: center;
    justify-content: center;
    font-weight: 800;
    backdrop-filter: blur(10px);
}

.float-a { top: -18px; left: 28%; }
.float-b { top: -18px; right: 28%; }
.float-c { top: 130px; left: 18%; }
.float-d { top: 130px; right: 18%; }

/* Upload */

.upload-shell {
    max-width: 780px;
    margin: 48px auto 0;
}

.upload-dropzone {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 18px;
    min-height: 118px;
    padding: 28px;
    border: 1px solid #d8d6e3;
    background: white;
    box-shadow: var(--shadow-soft);
    cursor: pointer;
    transition: 0.2s ease;
}

.upload-dropzone:hover,
.upload-dropzone.drag-over,
.upload-dropzone.drag-active {
    border-color: var(--purple);
    transform: translateY(-2px);
    box-shadow: 0 28px 90px rgba(104, 38, 255, 0.16);
}

.pdf-badge {
    min-width: 74px;
    height: 74px;
    background: linear-gradient(135deg, var(--purple), var(--purple-2));
    color: white;
    border-radius: 16px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-weight: 900;
}

.upload-dropzone h2 {
    margin: 0 0 8px;
    font-size: 20px;
    letter-spacing: -0.03em;
}

.upload-dropzone p {
    margin: 0;
    color: var(--muted);
}

.file-selected {
    color: var(--purple);
    font-weight: 800;
    margin-left: 12px;
    word-break: break-word;
}

.real-file-input,
#fileInput,
input[type="file"] {
    display: none !important;
}

/* Buttons */

.primary-button,
.scan-button {
    width: 100%;
    border: 0;
    background: linear-gradient(135deg, var(--purple), #5524ff);
    color: white;
    padding: 19px 26px;
    font-weight: 800;
    font-size: 16px;
    margin-top: 14px;
    cursor: pointer;
    font-family: inherit;
    transition: 0.2s ease;
}

.primary-button:hover,
.scan-button:hover {
    transform: translateY(-1px);
}

.primary-button:disabled,
.scan-button:disabled {
    opacity: 0.75;
    cursor: wait;
}

/* Trust strip */

.trust-strip {
    display: flex;
    justify-content: center;
    gap: 14px;
    flex-wrap: wrap;
    margin-top: 26px;
}

.trust-strip span {
    color: #344054;
    background: rgba(255,255,255,0.8);
    border: 1px solid var(--line);
    padding: 10px 14px;
    font-size: 14px;
}

/* Scan counter */

.scan-counter {
    margin: 38px auto 0;
    max-width: 520px;
    padding: 26px 30px;
    text-align: center;
    background: rgba(255,255,255,0.82);
    border: 1px solid rgba(104, 38, 255, 0.12);
    box-shadow: var(--shadow-soft);
    backdrop-filter: blur(12px);
}

.scan-counter-number {
    font-size: clamp(42px, 5vw, 72px);
    font-weight: 900;
    line-height: 1;
    letter-spacing: -0.07em;
    background: linear-gradient(135deg, var(--purple), var(--purple-2));
    -webkit-background-clip: text;
    color: transparent;
}

.scan-counter-text {
    margin-top: 12px;
    color: #667085;
    font-size: 16px;
    font-weight: 700;
    letter-spacing: -0.02em;
}

/* Impact */

.impact-section {
    width: min(92%, 1700px);
    margin: 80px auto 0;
    min-height: 440px;
    display: grid;
    grid-template-columns: 1fr 1fr;
    align-items: center;
    gap: 80px;
}

.impact-copy h2 {
    font-size: clamp(36px, 4vw, 54px);
    letter-spacing: -0.06em;
    margin: 0 0 20px;
}

.impact-copy p {
    color: #27324a;
    font-size: 20px;
    line-height: 1.7;
}

.impact-stats {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 54px 80px;
}

.stat-card {
    border-left: 2px solid var(--purple);
    padding-left: 28px;
}

.stat-card strong {
    display: block;
    font-size: 48px;
    letter-spacing: -0.06em;
    line-height: 1;
}

.stat-card span {
    color: #27324a;
    margin-top: 8px;
    display: block;
}

/* Tools */

.tools-section {
    width: min(92%, 1400px);
    margin: 50px auto 0;
    background: linear-gradient(135deg, #07030f, #241057);
    color: white;
    border-radius: var(--radius-sm);
    padding: 70px 80px;
}

.section-heading {
    text-align: center;
    margin-bottom: 54px;
}

.section-heading h2 {
    margin: 0 0 16px;
    font-size: clamp(36px, 4vw, 54px);
    letter-spacing: -0.05em;
}

.section-heading p {
    margin: 0;
    color: rgba(255,255,255,0.8);
    font-size: 19px;
}

.tool-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 48px;
    max-width: 1000px;
    margin: 0 auto;
}

.tool-card {
    background: rgba(255,255,255,0.055);
    padding: 34px 38px;
    border-radius: 4px;
    min-height: 205px;
}

.tool-icon {
    font-size: 34px;
    margin-bottom: 22px;
}

.tool-card h3 {
    margin: 0 0 16px;
    font-size: 22px;
}

.tool-card p {
    margin: 0;
    color: rgba(255,255,255,0.82);
    line-height: 1.55;
}

/* Privacy */

.privacy-section {
    width: min(92%, 1400px);
    margin: 42px auto 0;
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 40px;
    background: #f8f7ff;
    border: 1px solid #ece8ff;
    padding: 48px;
}

.privacy-section h2 {
    margin: 0 0 16px;
    font-size: 36px;
    letter-spacing: -0.05em;
}

.privacy-section p {
    color: #344054;
    line-height: 1.7;
    font-size: 17px;
}

.privacy-list {
    display: grid;
    gap: 14px;
}

.privacy-list div {
    background: white;
    border: 1px solid #edeaf8;
    padding: 18px;
    color: #1f2a44;
    font-weight: 700;
}

/* Learn section */

.learn-section {
    width: min(92%, 1200px);
    margin: 60px auto 0;
}

.learn-card {
    position: relative;
    overflow: hidden;
    background: linear-gradient(135deg, #07030f, #241057);
    color: white;
    padding: 52px;
    box-shadow: 0 24px 80px rgba(16, 5, 31, 0.18);
}

.learn-card::before {
    content: "";
    position: absolute;
    width: 420px;
    height: 420px;
    background: rgba(255,255,255,0.05);
    border-radius: var(--radius-pill);
    top: -200px;
    right: -120px;
}

.learn-pill {
    display: inline-flex;
    padding: 10px 14px;
    background: rgba(255,255,255,0.08);
    border: 1px solid rgba(255,255,255,0.10);
    font-size: 13px;
    font-weight: 800;
    letter-spacing: 0.04em;
    text-transform: uppercase;
    margin-bottom: 24px;
}

.learn-card h2 {
    margin: 0;
    max-width: 700px;
    font-size: clamp(34px, 4vw, 58px);
    line-height: 1;
    letter-spacing: -0.06em;
}

.learn-card p {
    max-width: 720px;
    margin-top: 22px;
    color: rgba(255,255,255,0.82);
    font-size: 18px;
    line-height: 1.8;
}

.learn-link {
    margin-top: 32px;
    display: inline-flex;
    align-items: center;
    gap: 10px;
    color: white;
    text-decoration: none;
    font-weight: 800;
    padding: 16px 22px;
    background: rgba(255,255,255,0.08);
    border: 1px solid rgba(255,255,255,0.10);
    transition: 0.2s ease;
}

.learn-link:hover {
    transform: translateY(-2px);
    background: rgba(255,255,255,0.12);
}

/* =========================================================
   6. Shared cards
========================================================= */

.result-main-card,
.quick-advice-card,
.data-card,
.intel-card,
.finding-modern-card,
.preview-section,
.history-table-card,
.limit-card,
.article-card,
.account-card,
.account-hero-card,
.account-stat-card,
.premium-upsell-card {
    background: white;
    border: 1px solid #ececf2;
    box-shadow: var(--shadow-soft);
}

/* =========================================================
   7. Result page
========================================================= */

/* Domain risk badges */

.domain-risk {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    padding: 8px 14px;
    border-radius: 999px;
    font-size: 13px;
    font-weight: 800;
    margin: 12px 0 18px;
    width: fit-content;
}

.risk-badge-high {
    background: rgba(239, 68, 68, 0.12);
    color: #ef4444;
}

.risk-badge-medium {
    background: rgba(245, 158, 11, 0.14);
    color: #f59e0b;
}

.risk-badge-low {
    background: rgba(34, 197, 94, 0.14);
    color: #22c55e;
}

/* Context highlights */

.context-highlight {
    border: 1px solid rgba(245, 158, 11, 0.35) !important;
    background: rgba(245, 158, 11, 0.06) !important;
}

body[data-theme="dark"] .context-highlight {
    background: rgba(245, 158, 11, 0.08) !important;
}


.result-extra-data {
    margin-top: 18px;
}

.context-block {
    margin-top: 18px;
    padding: 18px;
    border-radius: 16px;
    background: #f8f7ff;
    border: 1px solid #ece8ff;
    color: #344054;
    font-size: 14px;
    line-height: 1.7;
    word-break: break-word;
}

.context-block strong {
    display: block;
    margin: 10px 0;
    color: var(--purple);
    font-weight: 900;
}

.context-block div {
    color: #667085;
}

body[data-theme="dark"] .context-block {
    background: rgba(255,255,255,0.04);
    border-color: rgba(255,255,255,0.10);
    color: #cbd5e1;
}

body[data-theme="dark"] .context-block div {
    color: #94a3b8;
}

body[data-theme="dark"] .context-block strong {
    color: #c084fc;
}

.result-page {
    width: min(92%, 1400px);
    margin: 70px auto 0;
}

.result-hero {
    display: grid;
    grid-template-columns: 1.4fr 0.8fr;
    gap: 28px;
    align-items: stretch;
}

.result-main-card {
    padding: 46px;
}

.result-eyebrow {
    color: var(--purple);
    font-weight: 800;
    text-transform: uppercase;
    letter-spacing: 0.08em;
    font-size: 13px;
    margin-bottom: 18px;
}

.result-main-card h1 {
    margin: 0;
    font-size: clamp(38px, 4vw, 62px);
    line-height: 1.05;
    letter-spacing: -0.06em;
}

.result-main-card h1 span {
    display: block;
    color: var(--purple);
    word-break: break-word;
}

.result-status-row {
    margin-top: 34px;
    display: flex;
    gap: 28px;
    align-items: center;
}

.risk-circle {
    width: 138px;
    height: 138px;
    border-radius: var(--radius-pill);
    display: flex;
    align-items: center;
    justify-content: center;
    flex-direction: column;
    flex-shrink: 0;
}

.risk-circle strong {
    font-size: 42px;
    letter-spacing: -0.05em;
}

.risk-circle span {
    color: #667085;
    font-weight: 800;
}

.risk-low {
    background: rgba(34, 197, 94, 0.12);
    color: #15803d;
}

.risk-medium {
    background: rgba(245, 158, 11, 0.14);
    color: #b45309;
}

.risk-high {
    background: rgba(239, 68, 68, 0.14);
    color: #b91c1c;
}

.status-badge {
    display: inline-flex;
    padding: 10px 14px;
    border-radius: var(--radius-pill);
    font-weight: 800;
    margin-bottom: 12px;
}

.badge-low {
    color: #15803d;
    background: rgba(34, 197, 94, 0.12);
}

.badge-medium {
    color: #b45309;
    background: rgba(245, 158, 11, 0.14);
}

.badge-high {
    color: #b91c1c;
    background: rgba(239, 68, 68, 0.14);
}

.risk-summary p,
.quick-advice-card p,
.finding-modern-card p,
.intel-card p {
    color: #344054;
    line-height: 1.7;
    font-size: 17px;
}

.quick-advice-card {
    padding: 36px;
    display: flex;
    flex-direction: column;
    justify-content: center;
}

.quick-advice-card h2 {
    margin: 0 0 14px;
    font-size: 32px;
    letter-spacing: -0.04em;
}

.advice-list,
.mini-data {
    display: grid;
    gap: 10px;
    margin-top: 22px;
}

.advice-list div,
.mini-data div {
    background: #f8f7ff;
    border: 1px solid #ece8ff;
    padding: 14px;
    font-weight: 700;
    color: #1f2a44;
}

.result-section {
    margin-top: 70px;
}

.result-heading-left {
    text-align: left;
    margin-bottom: 28px;
}

.result-heading-left h2 {
    margin: 0 0 10px;
}

.result-heading-left p {
    color: #667085;
}

.findings-modern {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 18px;
}

.finding-modern-card {
    padding: 26px;
    border-left: 4px solid #d0d5dd;
}

.finding-modern-top {
    display: flex;
    align-items: flex-start;
    justify-content: space-between;
    gap: 18px;
}

.finding-modern-top h3 {
    margin: 0 0 8px;
    font-size: 20px;
}

.finding-modern-top span {
    color: #667085;
    font-weight: 700;
}

.finding-modern-top strong {
    color: var(--purple);
    white-space: nowrap;
}

.finding-positive { border-left-color: var(--success); }
.finding-warning { border-left-color: var(--warning); }
.finding-danger { border-left-color: var(--danger); }
.finding-info { border-left-color: var(--info); }

.data-overview {
    margin-top: 42px;
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 18px;
}

.data-card,
.intel-card {
    padding: 24px;
}

.data-card span,
.intel-label,
.mini-data span {
    display: block;
    color: #667085;
    font-size: 13px;
    font-weight: 800;
    text-transform: uppercase;
    letter-spacing: 0.06em;
    margin-bottom: 10px;
}

.data-card strong,
.mini-data strong {
    color: #101828;
    word-break: break-word;
    line-height: 1.5;
}

.intelligence-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 18px;
}

.wide-intel-card {
    grid-column: span 2;
}

.intel-icon {
    font-size: 34px;
    margin-bottom: 18px;
}

.intel-card h3 {
    margin: 0 0 12px;
    font-size: 24px;
}

.history-status,
.domain-risk {
    display: inline-flex;
    padding: 10px 14px;
    font-weight: 800;
    margin-bottom: 14px;
    background: #f8f7ff;
    color: var(--purple);
}

.history-danger {
    background: rgba(239, 68, 68, 0.12);
    color: #b91c1c;
}

.history-ok {
    background: rgba(34, 197, 94, 0.12);
    color: #15803d;
}

.preview-section {
    margin-top: 70px;
    padding: 28px;
}

.preview-section summary {
    cursor: pointer;
    font-weight: 900;
    font-size: 20px;
}

.preview-section pre {
    margin-top: 24px;
    white-space: pre-wrap;
    color: #344054;
    line-height: 1.6;
    max-height: 420px;
    overflow: auto;
}

/* =========================================================
   8. Limit page
========================================================= */

.limit-hero {
    min-height: auto;
}

.limit-card {
    max-width: 760px;
    margin: 44px auto 0;
    padding: 42px;
    text-align: left;
}

.limit-card h2 {
    margin: 22px 0 12px;
    font-size: 30px;
    letter-spacing: -0.04em;
}

.limit-card p {
    color: #344054;
    line-height: 1.8;
    font-size: 17px;
}

.limit-pill {
    background: rgba(239, 68, 68, 0.10);
    border-color: rgba(239, 68, 68, 0.22);
    color: #b91c1c;
}

.limit-actions {
    display: flex;
    gap: 14px;
    margin-top: 28px;
    flex-wrap: wrap;
}

/* =========================================================
   9. History page
========================================================= */

.history-page {
    width: min(92%, 1400px);
    margin: 70px auto 0;
}

.history-hero {
    text-align: center;
    margin-bottom: 50px;
}

.history-hero h1 {
    font-size: clamp(42px, 5vw, 72px);
    letter-spacing: -0.06em;
    margin: 0;
}

.history-table-card {
    padding: 34px;
    position: relative;
    z-index: 1;
}

.table-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 20px;
    margin-bottom: 26px;
}

.table-header h2 {
    margin: 0;
    font-size: 32px;
    letter-spacing: -0.04em;
}

.table-scroll {
    overflow-x: auto;
    position: relative;
    z-index: 1;
}

table {
    width: 100%;
    border-collapse: collapse;
}

th,
td {
    padding: 18px;
    text-align: left;
    border-bottom: 1px solid #ececf2;
    white-space: nowrap;
}

th {
    color: #667085;
    font-size: 13px;
    text-transform: uppercase;
    letter-spacing: 0.06em;
}

td {
    color: #1f2a44;
    font-weight: 600;
}

.locked-row {
    filter: blur(5px);
    opacity: 0.55;
    user-select: none;
    pointer-events: none;
}

.premium-lock {
    margin-top: 24px;
    background: rgba(104, 38, 255, 0.08);
    border: 1px solid rgba(104, 38, 255, 0.18);
    padding: 28px;
    text-align: center;
    position: relative;
    z-index: 1;
}

.lock-icon {
    font-size: 34px;
    margin-bottom: 12px;
}

.premium-lock h2 {
    margin: 0 0 10px;
    letter-spacing: -0.04em;
}

.premium-lock p {
    color: #667085;
    max-width: 620px;
    margin: 0 auto;
    line-height: 1.7;
}

/* =========================================================
   10. Article page
========================================================= */

.article-hero {
    width: min(92%, 1000px);
    margin: 90px auto 0;
    text-align: center;
}

.article-pill {
    display: inline-flex;
    padding: 10px 16px;
    background: rgba(104, 38, 255, 0.08);
    border: 1px solid rgba(104, 38, 255, 0.14);
    color: var(--purple);
    font-weight: 800;
    margin-bottom: 26px;
}

.article-hero h1 {
    font-size: clamp(48px, 6vw, 82px);
    line-height: 1;
    letter-spacing: -0.07em;
    margin: 0;
}

.article-hero h1 span:last-child {
    display: block;
    background: linear-gradient(135deg, var(--purple), var(--purple-2));
    -webkit-background-clip: text;
    color: transparent;
}

.article-intro {
    max-width: 760px;
    margin: 28px auto 0;
    font-size: 20px;
    line-height: 1.8;
    color: #344054;
}

.article-layout {
    width: min(92%, 1000px);
    margin: 60px auto 100px;
}

.article-content {
    display: grid;
    gap: 28px;
}

.article-card {
    padding: 40px;
}

.article-card h2 {
    margin-top: 0;
    font-size: 36px;
    letter-spacing: -0.05em;
}

.article-card p {
    color: #344054;
    line-height: 1.8;
    font-size: 17px;
}

.warning-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 18px;
    margin-top: 24px;
}

.warning-box {
    border-left: 3px solid var(--purple);
    background: #faf8ff;
    padding: 22px;
}

.warning-box strong {
    display: block;
    margin-bottom: 10px;
    font-size: 18px;
}

.warning-box p {
    margin: 0;
    font-size: 15px;
}

.article-list {
    display: grid;
    gap: 12px;
    padding-left: 20px;
}

.article-list li {
    line-height: 1.6;
}

.article-cta {
    text-align: center;
    background: linear-gradient(135deg, #07030f, #241057);
    color: white;
    padding: 60px 30px;
}

.article-cta h2 {
    margin-top: 0;
    font-size: 42px;
    letter-spacing: -0.05em;
}

.article-cta p {
    color: rgba(255,255,255,0.82);
    margin-bottom: 28px;
}

/* =========================================================
   11. Account page
========================================================= */

.account-page {
    width: min(92%, 1200px);
    margin: 70px auto;
}

.account-auth-grid,
.account-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 24px;
}

.account-card,
.account-hero-card,
.account-stat-card,
.premium-upsell-card {
    padding: 34px;
}

.account-card h1,
.account-card h2,
.premium-upsell-card h2 {
    margin-top: 0;
    letter-spacing: -0.04em;
}

.account-auth-hero {
    max-width: 900px;
    margin: 0 auto 38px;
    text-align: center;
}

.account-auth-hero h1 {
    margin: 0;
    font-size: clamp(42px, 5vw, 72px);
    line-height: 1;
    letter-spacing: -0.07em;
}

.account-auth-hero p {
    max-width: 720px;
    margin: 24px auto 0;
    color: #344054;
    font-size: 18px;
    line-height: 1.8;
}

.account-input,
.account-form input {
    width: 100%;
    padding: 16px;
    margin-bottom: 14px;
    border: 1px solid #d0d5dd;
    font-size: 15px;
    font: inherit;
}

.account-form {
    display: grid;
    gap: 18px;
    margin-top: 26px;
}

.account-form label {
    display: grid;
    gap: 8px;
    color: #344054;
    font-weight: 700;
}

.account-error {
    background: rgba(239,68,68,0.12);
    color: #b91c1c;
    padding: 14px;
    margin-bottom: 18px;
    font-weight: 700;
    border: 1px solid rgba(239,68,68,0.22);
}

.account-dashboard {
    display: grid;
    gap: 24px;
    max-width: 1000px;
    margin: 0 auto;
}

.account-hero-card {
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.account-badge {
    display: inline-flex;
    padding: 8px 14px;
    background: rgba(104,38,255,0.12);
    color: var(--purple);
    font-weight: 800;
    margin-bottom: 14px;
    border: 1px solid rgba(104,38,255,0.18);
}

.account-email {
    color: var(--purple) !important;
    font-size: 20px;
    font-weight: 800;
}

.account-stats-grid,
.account-options {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 18px;
}

.account-options {
    grid-template-columns: repeat(3, 1fr);
    margin-top: 32px;
}

.account-option,
.account-plan-card {
    background: #f8f7ff;
    border: 1px solid #ece8ff;
    padding: 20px;
}

.account-option strong,
.account-plan-card strong {
    display: block;
    color: var(--purple);
    margin-bottom: 8px;
}

.account-option span,
.account-plan-card span {
    color: #667085;
    line-height: 1.5;
}

.account-stat-card span {
    display: block;
    color: #667085;
    margin-bottom: 12px;
    font-weight: 700;
}

.account-stat-card strong {
    font-size: 38px;
    letter-spacing: -0.05em;
}

.account-history-list {
    display: grid;
    gap: 16px;
}

.account-history-item {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 18px;
    border: 1px solid #ececf2;
}

.account-history-date {
    color: #667085;
    margin-top: 6px;
    font-size: 14px;
}

.account-actions {
    display: flex;
    gap: 14px;
    align-items: center;
    flex-wrap: wrap;
    margin-top: 32px;
}

.account-logout,
.account-logout-button,
.logout-button {
    border: 1px solid rgba(239, 68, 68, 0.22);
    background: rgba(239, 68, 68, 0.10);
    color: #b91c1c;
    padding: 15px 24px;
    font-weight: 800;
    cursor: pointer;
    font-family: inherit;
}

.premium-upsell-card {
    background: linear-gradient(135deg, #07030f, #241057);
    color: white;
}

.premium-upsell-pill {
    display: inline-block;
    padding: 8px 14px;
    background: rgba(255,255,255,0.14);
    margin-bottom: 18px;
    font-weight: 800;
}

/* =========================================================
   12. Footer
========================================================= */

.footer {
    width: min(92%, 1700px);
    margin: 80px auto 40px;
    padding-top: 38px;
    border-top: 1px solid var(--line);
    color: #1f2a44;
}

.footer-brand p {
    max-width: 520px;
    color: #667085;
    line-height: 1.6;
}

.footer-grid {
    margin-top: 34px;
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 30px;
}

.footer-grid h4 {
    margin: 0 0 12px;
    color: var(--text);
}

.footer-grid p,
.footer-grid a {
    display: block;
    color: #667085;
    margin: 8px 0;
    text-decoration: none;
}

.footer-bottom {
    margin-top: 34px;
    color: #98a2b3;
    font-size: 13px;
    line-height: 1.7;
    border-top: 1px solid rgba(0,0,0,0.06);
    padding-top: 24px;
}

/* =========================================================
   13. Loading
========================================================= */

.loading-overlay {
    position: fixed;
    inset: 0;
    background: rgba(255,255,255,0.82);
    backdrop-filter: blur(12px);
    z-index: 999999;
    display: flex;
    align-items: center;
    justify-content: center;
}

.loading-overlay.hidden {
    display: none !important;
}

.loader-card {
    width: 430px;
    max-width: 92%;
    background: white;
    color: var(--text);
    padding: 44px;
    text-align: center;
    box-shadow: var(--shadow-strong);
}

.loader-card h2 {
    color: var(--text);
}

.loader-card p {
    color: #667085;
    line-height: 1.6;
}

.loader-spinner {
    width: 64px;
    height: 64px;
    border: 6px solid #eee8ff;
    border-top-color: var(--purple);
    border-radius: var(--radius-pill);
    margin: 0 auto 24px;
    animation: spin 0.9s linear infinite;
}

.password-policy {
    margin-top: 10px;
    color: #667085;
    font-size: 13px;
    line-height: 1.5;
}

body[data-theme="dark"] .password-policy {
    color: #cbd5e1;
}


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

/* =========================================================
   14. Dark theme
========================================================= */

body[data-theme="dark"] {
    --bg: #070816;
    --text: #f8fafc;
    --muted: #cbd5e1;
    --line: rgba(255,255,255,0.10);
    --card: rgba(255,255,255,0.04);
    background: #070816;
    color: #f8fafc;
}

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

body[data-theme="dark"] .navbar,
body[data-theme="dark"] .footer,
body[data-theme="dark"] .logo-wrap {
    color: #f8fafc;
}

body[data-theme="dark"] .hero-subtitle,
body[data-theme="dark"] .impact-copy p,
body[data-theme="dark"] .stat-card span,
body[data-theme="dark"] .footer p,
body[data-theme="dark"] .footer a,
body[data-theme="dark"] .risk-summary p,
body[data-theme="dark"] .quick-advice-card p,
body[data-theme="dark"] .finding-modern-card p,
body[data-theme="dark"] .intel-card p,
body[data-theme="dark"] .preview-section pre,
body[data-theme="dark"] .limit-card p,
body[data-theme="dark"] .premium-lock p,
body[data-theme="dark"] .scan-counter-text,
body[data-theme="dark"] .article-card p,
body[data-theme="dark"] .article-intro,
body[data-theme="dark"] .account-card p,
body[data-theme="dark"] .account-form label,
body[data-theme="dark"] .account-option span,
body[data-theme="dark"] .account-plan-card span,
body[data-theme="dark"] .account-stat-card span,
body[data-theme="dark"] .account-history-date {
    color: #cbd5e1;
}

body[data-theme="dark"] .upload-dropzone,
body[data-theme="dark"] .privacy-section,
body[data-theme="dark"] .trust-strip span,
body[data-theme="dark"] .privacy-list div,
body[data-theme="dark"] .result-main-card,
body[data-theme="dark"] .quick-advice-card,
body[data-theme="dark"] .data-card,
body[data-theme="dark"] .intel-card,
body[data-theme="dark"] .finding-modern-card,
body[data-theme="dark"] .preview-section,
body[data-theme="dark"] .limit-card,
body[data-theme="dark"] .history-table-card,
body[data-theme="dark"] .premium-lock,
body[data-theme="dark"] .scan-counter,
body[data-theme="dark"] .article-card,
body[data-theme="dark"] .account-card,
body[data-theme="dark"] .account-hero-card,
body[data-theme="dark"] .account-stat-card {
    background: rgba(255,255,255,0.04);
    border-color: rgba(255,255,255,0.10);
    color: #f8fafc;
}

body[data-theme="dark"] .upload-dropzone p,
body[data-theme="dark"] .privacy-section p {
    color: #cbd5e1;
}

body[data-theme="dark"] .footer-grid h4,
body[data-theme="dark"] .data-card strong,
body[data-theme="dark"] .mini-data strong,
body[data-theme="dark"] td {
    color: #f8fafc;
}

body[data-theme="dark"] th {
    color: #94a3b8;
}

body[data-theme="dark"] td {
    border-color: rgba(255,255,255,0.10);
}

body[data-theme="dark"] .advice-list div,
body[data-theme="dark"] .mini-data div,
body[data-theme="dark"] .warning-box,
body[data-theme="dark"] .account-option,
body[data-theme="dark"] .account-plan-card,
body[data-theme="dark"] .account-input,
body[data-theme="dark"] .account-form input {
    background: rgba(255,255,255,0.04);
    border-color: rgba(255,255,255,0.10);
    color: #f8fafc;
}

body[data-theme="dark"] .loading-overlay {
    background: rgba(7, 8, 22, 0.82);
}

body[data-theme="dark"] .loader-card {
    background: #111827;
    color: #f8fafc;
}

body[data-theme="dark"] .loader-card h2 {
    color: #f8fafc;
}

body[data-theme="dark"] .loader-card p {
    color: #cbd5e1;
}

/* =========================================================
   15. Responsive
========================================================= */

@media (max-width: 900px) {
    .result-hero,
    .findings-modern,
    .data-overview,
    .intelligence-grid,
    .account-auth-grid,
    .account-grid,
    .account-stats-grid,
    .account-options {
        grid-template-columns: 1fr;
    }

    .wide-intel-card {
        grid-column: span 1;
    }

    .result-status-row,
    .account-hero-card {
        flex-direction: column;
        align-items: flex-start;
    }

    .result-main-card,
    .quick-advice-card {
        padding: 30px;
    }

    .account-hero-card {
        gap: 20px;
    }
}

@media (max-width: 768px) {
   .topbar-left {
    display: none;
    }

 .top-status-bar {
        position: static;
        padding: 10px 8px;
        flex-wrap: wrap;
        justify-content: center;
        gap: 10px;
    }

    .topbar-left,
    .topbar-controls {
        justify-content: center;
        flex-wrap: wrap;
    }

    .topbar-spacer {
        display: none;
    }

    .topbar-controls {
        width: 100%;
        justify-content: center;
        flex-wrap: wrap;
        gap: 10px;
    }

    .status-pill {
        min-height: 36px;
        padding: 0 12px;
        font-size: 13px;
    }

    .navbar {
        width: 92%;
        flex-direction: column;
        gap: 16px;
        margin-top: 18px;
    }

    .nav-actions {
        width: 100%;
        justify-content: center;
        flex-wrap: wrap;
    }

    .nav-link,
    .nav-button {
        padding: 13px 18px;
        font-size: 14px;
    }

    .hero-section {
        width: 92%;
        margin-top: 52px;
        min-height: auto;
    }

    .center-icon {
        margin-bottom: 34px;
    }

    .hero-section h1 {
        font-size: 42px;
        line-height: 1.05;
        letter-spacing: -2px;
    }

    .hero-subtitle {
        font-size: 16px;
        line-height: 1.6;
    }

    .floating-card {
        display: none;
    }

    .upload-shell {
        margin-top: 34px;
    }

    .upload-dropzone {
        flex-direction: column;
        padding: 30px 18px;
    }

    .file-selected {
        margin-left: 0;
    }

    .impact-section,
    .privacy-section {
        width: 92%;
        grid-template-columns: 1fr;
        gap: 28px;
    }

    .impact-section {
        margin-top: 70px;
        min-height: auto;
    }

    .impact-stats,
    .tool-grid,
    .footer-grid,
    .warning-grid {
        grid-template-columns: 1fr;
    }
.legal-links {
    display: flex;
    gap: 18px;
    flex-wrap: wrap;
    margin-top: 18px;
}

.legal-links a {
    color: #667085;
    text-decoration: none;
    font-weight: 700;
}

.legal-links a:hover {
    color: var(--purple);
}

.legal-page {
    width: min(92%, 950px);
    margin: 80px auto;
}

.legal-card {
    background: white;
    border: 1px solid #ececf2;
    box-shadow: 0 24px 80px rgba(16, 5, 31, 0.08);
    padding: 44px;
}

.legal-card h1 {
    font-size: clamp(38px, 5vw, 64px);
    letter-spacing: -0.06em;
    margin-top: 0;
}

.legal-card h2 {
    margin-top: 34px;
}

.legal-card p,
.legal-card li {
    color: #344054;
    line-height: 1.8;
}

body[data-theme="dark"] .legal-card {
    background: rgba(255,255,255,0.04);
    border-color: rgba(255,255,255,0.10);
}

body[data-theme="dark"] .legal-card p,
body[data-theme="dark"] .legal-card li,
body[data-theme="dark"] .legal-links a {
    color: #cbd5e1;
}


    .tools-section {
        width: 92%;
        padding: 42px 22px;
    }

    .tool-card {
        padding: 28px;
    }

    .history-table-card,
    .limit-card,
    .account-card,
    .account-hero-card,
    .account-stat-card,
    .premium-upsell-card,
    .article-card {
        padding: 28px 22px;
    }

    .table-header {
        flex-direction: column;
        align-items: flex-start;
    }

    .article-hero {
        margin-top: 60px;
    }

    .article-hero h1 {
        font-size: 52px;
    }

    .article-intro {
        font-size: 17px;
    }

    .article-cta {
        padding: 42px 22px;
    }

    .article-cta h2 {
        font-size: 34px;
    }

    .learn-card {
        padding: 34px 24px;
    }

    .learn-card h2 {
        font-size: 40px;
    }

    .learn-card p {
        font-size: 16px;
        line-height: 1.7;
    }

    .learn-link {
        width: 100%;
        justify-content: center;
    }

    .account-actions {
        flex-direction: column;
        align-items: stretch;
    }

    .account-actions a,
    .account-actions form,
    .account-logout,
    .account-logout-button,
    .logout-button {
        width: 100%;
        text-align: center;
    }

    .footer {
        width: 92%;
        text-align: left;
    }

    .loader-card {
        width: 92%;
    }
}
/* =========================================================
   FINAL MOBILE TOPBAR FIX
   API: online is hidden on small screens.
   Language and theme toggles stay visible and clickable.
========================================================= */

.language-toggle,
.theme-toggle,
button.status-pill {
    pointer-events: auto;
    touch-action: manipulation;
    cursor: pointer;
    position: relative;
    z-index: 100001;
}

@media (max-width: 768px) {
    .top-status-bar {
        position: sticky;
        top: 0;
        z-index: 99999;
        display: flex;
        align-items: center;
        justify-content: flex-end;
        gap: 8px;
        width: 100%;
        min-height: auto;
        padding: 10px 12px;
        flex-wrap: nowrap;
        overflow: visible;
    }

    .topbar-left {
        display: none !important;
    }

    .topbar-controls {
        display: flex !important;
        align-items: center;
        justify-content: flex-end;
        gap: 8px;
        width: 100%;
        flex-wrap: nowrap;
        overflow-x: auto;
        -webkit-overflow-scrolling: touch;
        position: relative;
        z-index: 100000;
    }

    .topbar-controls .status-pill {
        min-height: 36px;
        padding: 0 10px;
        font-size: 12px;
        flex: 0 0 auto;
        white-space: nowrap;
    }

    .language-toggle,
    .theme-toggle {
        display: inline-flex !important;
        align-items: center;
        justify-content: center;
        min-width: 54px;
        pointer-events: auto !important;
        position: relative;
        z-index: 100002;
    }
}
