/* Reset & Base */
*, *::before, *::after {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

:root {
    /* Masada Hardening brand colors */
    --primary: #0A4B78;
    --primary-light: #1E5F8B;
    --primary-dark: #083A5E;
    --secondary: #00A8CC;
    --secondary-light: #33B8D1;
    --accent-orange: #FF6B35;
    --success: #28A745;
    --danger: #DC3545;
    --warning: #FFC107;
    --info: #17A2B8;
    --dark: #212529;
    --gray: #6C757D;
    --gray-light: #F1F3F4;
    --light: #F8F9FA;
    --border: #DEE2E6;
}

body {
    font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, Oxygen, Ubuntu, sans-serif;
    background: var(--light);
    color: var(--dark);
    line-height: 1.6;
}

.container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 20px;
}

/* Typography */
h1, h2, h3, h4 { line-height: 1.3; }
h1, section h1, article h1, aside h1, nav h1 { font-size: 2.5rem; margin-block: 0.67em; }
h2 { font-size: 2rem; }
h3 { font-size: 1.25rem; }

/* Buttons */
.btn {
    display: inline-block;
    padding: 12px 24px;
    border-radius: 8px;
    font-weight: 600;
    text-decoration: none;
    cursor: pointer;
    border: none;
    font-size: 1rem;
    transition: all 0.2s;
}

.btn-primary {
    background: #D94F1F; /* Darker orange for WCAG AA contrast (4.5:1 with white) */
    color: white;
}
.btn-primary:hover { background: #C24518; }

.btn-secondary {
    background: white;
    color: var(--dark);
    border: 2px solid var(--border);
}
.btn-secondary:hover { border-color: var(--dark); }

.btn-outline {
    background: transparent;
    color: var(--primary);
    border: 2px solid var(--primary);
}
.btn-outline:hover { background: var(--primary); color: white; }

.btn-white {
    background: white;
    color: #D94F1F; /* Darker orange for WCAG AA contrast */
}
.btn-white:hover { background: var(--light); }

.btn-outline-white {
    background: transparent;
    color: white;
    border: 2px solid white;
}
.btn-outline-white:hover { background: white; color: #D94F1F; }

.btn-large { padding: 16px 32px; font-size: 1.1rem; }
.btn-small { padding: 8px 16px; font-size: 0.875rem; }
.btn-full { width: 100%; }

/* Hero Section */
.hero {
    background: linear-gradient(135deg, var(--primary-dark) 0%, var(--primary) 100%);
    color: white;
    padding: 80px 20px;
    text-align: center;
    position: relative;
    overflow: hidden;
}

/* Grid pattern overlay */
.hero::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: url('data:image/svg+xml,<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 100 100"><defs><pattern id="grid" width="10" height="10" patternUnits="userSpaceOnUse"><path d="M 10 0 L 0 0 0 10" fill="none" stroke="rgba(255,255,255,0.1)" stroke-width="0.5"/></pattern></defs><rect width="100" height="100" fill="url(%23grid)"/></svg>');
    opacity: 0.5;
    z-index: 1;
}

/* Puzzle pieces background */
.hero::after {
    content: '';
    position: absolute;
    top: 0;
    right: -192px;
    width: 1115px;
    height: 612px;
    background-image: url('../image/m-h-solving-security-puzzles.png');
    background-size: contain;
    background-repeat: no-repeat;
    background-position: center;
    opacity: 0.4;
    z-index: 0;
    pointer-events: none;
}

/* Ensure hero content stays above pseudo-element backgrounds */
.hero > * {
    position: relative;
    z-index: 10;
}

.hero h1 {
    max-width: 800px;
    margin: 0 auto 20px;
}

.hero-subtitle {
    font-size: 1.25rem;
    opacity: 0.9;
    max-width: 700px;
    margin: 0 auto 40px;
}

.hero-ctas {
    display: flex;
    gap: 16px;
    justify-content: center;
    flex-wrap: wrap;
    margin-bottom: 60px;
}

.hero-stats {
    display: flex;
    justify-content: center;
    gap: 60px;
    flex-wrap: wrap;
}

.stat {
    text-align: center;
}

.stat-number {
    display: block;
    font-size: 2.5rem;
    font-weight: 700;
    color: var(--secondary);
}

.stat-label {
    font-size: 0.875rem;
    opacity: 0.8;
}

.stat-source {
    display: block;
    font-size: 0.7rem;
    opacity: 0.5;
    color: #fff;
    text-decoration: none;
    margin-top: 4px;
}

.stat-source:hover {
    opacity: 0.8;
    text-decoration: underline;
}

/* Problem Section */
.problem-section {
    padding: 80px 20px;
    background: white;
    text-align: center;
}

.section-intro {
    font-size: 1.125rem;
    color: var(--gray);
    max-width: 800px;
    margin: 0 auto 40px;
    text-align: center;
}

.attack-cards {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
    gap: 24px;
    margin-bottom: 40px;
}

.attack-card {
    background: var(--light);
    padding: 24px;
    border-radius: 12px;
    border: 1px solid var(--border);
}

.attack-icon {
    font-size: 2.5rem;
    margin-bottom: 16px;
}

.attack-card h3 {
    margin-bottom: 12px;
}

.attack-card p {
    color: var(--gray);
    margin-bottom: 16px;
    font-size: 0.95rem;
}

.attack-header {
    font-size: 0.8rem;
    color: var(--primary);
    font-weight: 600;
}

.cta-center {
    text-align: center;
}

/* Scanner Section */
.scanner-section {
    padding: 80px 20px;
    background: linear-gradient(135deg, var(--light) 0%, var(--gray-light) 100%);
    text-align: center;
}

.scanner-form {
    max-width: 600px;
    margin: 0 auto;
}

.scanner-form.inline {
    display: flex;
    gap: 12px;
    justify-content: center;
    align-items: center;
}

.scanner-form.inline .scanner-input {
    background: white;
    border: 2px solid var(--border);
    border-radius: 8px;
    padding: 14px 20px;
    min-width: 280px;
    transition: border-color 0.2s, box-shadow 0.2s;
}

.scanner-form.inline .scanner-input:focus {
    border-color: var(--accent-orange);
    box-shadow: 0 0 0 3px rgba(255, 107, 53, 0.15);
}

.scanner-form.inline .scanner-input::placeholder {
    color: var(--gray);
}

.scanner-input-group {
    display: flex;
    gap: 12px;
    background: white;
    padding: 8px;
    border-radius: 12px;
    box-shadow: 0 4px 20px rgba(0,0,0,0.1);
}

.scanner-input {
    flex: 1;
    padding: 16px 20px;
    border: none;
    font-size: 1.1rem;
    outline: none;
    border-radius: 8px;
}

.scanner-note {
    margin-top: 16px;
    color: var(--gray);
    font-size: 0.9rem;
}

/* How Section */
.how-section {
    padding: 80px 20px;
    background: white;
    text-align: center;
}

.steps {
    display: flex;
    justify-content: center;
    align-items: center;
    gap: 30px;
    flex-wrap: wrap;
    margin-top: 40px;
}

.step {
    text-align: center;
    max-width: 250px;
}

.step-number {
    width: 50px;
    height: 50px;
    background: var(--secondary);
    color: white;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.5rem;
    font-weight: 700;
    margin: 0 auto 16px;
}

.step h3 {
    margin-bottom: 8px;
}

.step p {
    color: var(--gray);
    font-size: 0.95rem;
}

.step-arrow {
    font-size: 2rem;
    color: var(--border);
}

/* CTA Section */
.cta-section {
    padding: 80px 20px;
    background: linear-gradient(135deg, var(--primary) 0%, var(--primary-light) 100%);
    text-align: center;
    color: white;
}

.cta-section p {
    font-size: 1.125rem;
    opacity: 0.9;
    max-width: 600px;
    margin: 0 auto 30px;
}

.cta-buttons {
    display: flex;
    gap: 16px;
    justify-content: center;
    flex-wrap: wrap;
}

/* Footer */
.footer {
    padding: 40px 20px;
    background: var(--dark);
    color: white;
    text-align: center;
}

.footer a {
    color: white;
    text-decoration: none;
}

.footer a:hover {
    text-decoration: underline;
}

.footer-note {
    margin-top: 8px;
    font-size: 0.85rem;
    opacity: 0.7;
}

/* Site Top Bar (external nav) */
.site-topbar {
    background: white;
    padding: 8px 20px;
    font-size: 0.8rem;
    border-bottom: 1px solid var(--border);
}

.site-topbar .container {
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.site-topbar-brand {
    display: flex;
    align-items: center;
    gap: 6px;
    color: var(--primary);
    text-decoration: none;
    font-weight: 600;
    transition: color 0.2s;
}

.site-topbar-brand:hover {
    color: var(--primary-dark);
}

.site-topbar-logo {
    height: 18px;
    width: auto;
}

.site-topbar-links {
    display: flex;
    gap: 20px;
    align-items: center;
}

.site-topbar-links a {
    color: var(--primary);
    text-decoration: none;
    font-weight: 500;
    transition: color 0.2s;
}

.site-topbar-links a:hover {
    color: var(--primary-dark);
    text-decoration: underline;
}

/* Demo Header */
.demo-header {
    background: white;
    padding: 16px 20px;
    border-bottom: 1px solid var(--border);
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.demo-header .container {
    display: flex;
    justify-content: space-between;
    align-items: center;
    width: 100%;
}

.logo {
    font-weight: 700;
    font-size: 1.25rem;
    color: var(--dark);
    text-decoration: none;
    display: flex;
    align-items: center;
    gap: 10px;
}

.logo-img {
    height: 24px;
    max-height: 24px;
    width: auto;
    vertical-align: middle;
    margin-right: 8px;
}

.demo-header nav {
    display: flex;
    align-items: center;
    gap: 20px;
}

.nav-link {
    color: var(--gray);
    text-decoration: none;
}

/* Language Switcher */
.lang-switcher {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    font-size: 0.85rem;
}

.lang-active {
    font-weight: 700;
    color: var(--dark);
}

.lang-sep {
    color: var(--border);
    user-select: none;
}

.lang-link {
    color: var(--gray);
    text-decoration: none;
    transition: color 0.2s;
}

.lang-link:hover {
    color: var(--primary);
}

/* Language switcher in hero (white variant) */
.hero .lang-switcher {
    margin-bottom: 20px;
}

.hero .lang-active {
    color: white;
}

.hero .lang-sep {
    color: rgba(255,255,255,0.4);
}

.hero .lang-link {
    color: rgba(255,255,255,0.7);
}

.hero .lang-link:hover {
    color: white;
}

/* Demo Page */
.demo-intro {
    padding: 40px 20px;
    text-align: center;
    background: var(--light);
}

.demo-intro h1 {
    font-size: 2rem;
    margin-bottom: 12px;
}

.demo-intro p {
    color: var(--gray);
    max-width: 700px;
    margin: 0 auto;
}

/* Demo Tabs */
.demo-tabs-section {
    background: white;
    border-bottom: 1px solid var(--border);
    padding: 0 20px;
}

.demo-tabs {
    display: flex;
    gap: 8px;
    overflow-x: auto;
    padding: 16px 0;
    justify-content: center;
    flex-wrap: wrap;
}

.demo-tab {
    display: flex;
    align-items: center;
    gap: 8px;
    padding: 12px 20px;
    border: 2px solid var(--border);
    background: white;
    border-radius: 8px;
    cursor: pointer;
    transition: all 0.2s;
    font-size: 0.95rem;
}

.demo-tab:hover {
    border-color: var(--secondary);
}

.demo-tab.active {
    background: var(--secondary);
    border-color: var(--secondary);
    color: white;
}

.tab-icon { font-size: 1.25rem; }
.tab-label { font-weight: 500; }

/* Demo Main Container */
.demo-main {
    padding: 40px 20px;
    background: var(--light);
}

.demo-container {
    display: grid;
    grid-template-columns: 280px 1fr;
    gap: 30px;
    background: white;
    border-radius: 16px;
    overflow: hidden;
    box-shadow: 0 4px 20px rgba(0,0,0,0.08);
}

/* Toggle Panel */
.toggle-panel {
    background: linear-gradient(180deg, var(--primary-dark) 0%, var(--primary) 100%);
    color: white;
    padding: 24px;
}

.toggle-panel h3 {
    font-size: 0.85rem;
    text-transform: uppercase;
    letter-spacing: 1px;
    opacity: 0.7;
    margin-bottom: 20px;
}

.toggle-item {
    margin-bottom: 20px;
    padding-bottom: 20px;
    border-bottom: 1px solid rgba(255,255,255,0.1);
}

.toggle-header-row {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 8px;
}

.toggle-name {
    font-weight: 600;
    font-size: 0.95rem;
}

/* Toggle Switch */
.toggle-switch {
    position: relative;
    display: inline-block;
    width: 50px;
    height: 26px;
}

.toggle-switch input {
    opacity: 0;
    width: 0;
    height: 0;
}

.toggle-slider {
    position: absolute;
    cursor: pointer;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: #475569;
    transition: 0.3s;
    border-radius: 26px;
}

.toggle-slider::before {
    position: absolute;
    content: "";
    height: 20px;
    width: 20px;
    left: 3px;
    bottom: 3px;
    background: white;
    transition: 0.3s;
    border-radius: 50%;
}

.toggle-switch input:checked + .toggle-slider {
    background: var(--success);
}

.toggle-switch input:checked + .toggle-slider::before {
    transform: translateX(24px);
}

.toggle-status {
    font-size: 0.85rem;
}

.status-vulnerable { color: #fca5a5; }
.status-protected { color: #86efac; }
.d-none { display: none !important; }

.header-info {
    margin-top: 24px;
    padding-top: 20px;
    border-top: 1px solid rgba(255,255,255,0.1);
}

.header-info h4 {
    font-size: 0.85rem;
    opacity: 0.7;
    margin-bottom: 8px;
}

.header-info p {
    font-size: 0.9rem;
    opacity: 0.9;
    line-height: 1.5;
}

.risk-badge {
    margin-top: 20px;
}

.risk-level {
    display: inline-block;
    padding: 6px 12px;
    border-radius: 20px;
    font-size: 0.8rem;
    font-weight: 600;
}

.risk-level.high { background: #fef2f2; color: var(--danger); }
.risk-level.medium { background: #fffbeb; color: var(--warning); }
.risk-level.low { background: #f0fdf4; color: var(--success); }

/* Preview Panel */
.preview-panel {
    padding: 24px;
}

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

.preview-header h3 {
    font-size: 1.1rem;
}

.preview-note {
    font-size: 0.8rem;
    color: var(--gray);
}

/* Demo Comparison */
.demo-comparison {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 20px;
    margin-bottom: 24px;
}

.demo-frame {
    border: 2px solid var(--border);
    border-radius: 12px;
    overflow: hidden;
}

.frame-header {
    padding: 10px 16px;
    font-size: 0.9rem;
    font-weight: 600;
}

.demo-frame.vulnerable .frame-header {
    background: #fef2f2;
    color: var(--danger);
}

.demo-frame.protected .frame-header {
    background: #f0fdf4;
    color: #16a34a;
}

.frame-content {
    height: 300px;
    background: #fafafa;
}

.frame-content iframe {
    width: 100%;
    height: 100%;
    border: none;
}

.frame-caption {
    padding: 12px 16px;
    font-size: 0.85rem;
    background: #f8fafc;
    color: var(--gray);
    border-top: 1px solid var(--border);
}

.frame-caption strong {
    color: var(--dark);
}

/* Explanation Box */
.explanation-box {
    background: #fffbeb;
    border-left: 4px solid var(--warning);
    padding: 20px;
    border-radius: 0 8px 8px 0;
}

.explanation-box h4 {
    color: #b45309;
    margin-bottom: 12px;
}

.explanation-box p {
    color: #92400e;
    margin-bottom: 12px;
}

.explanation-box ol {
    margin: 12px 0 12px 20px;
    color: #92400e;
}

.explanation-box li {
    margin-bottom: 6px;
}

.explanation-box code {
    background: rgba(0,0,0,0.1);
    padding: 2px 6px;
    border-radius: 4px;
    font-size: 0.9rem;
}

/* Breach Cards */
.breaches-section {
    margin-top: 24px;
    background: #1e293b;
    border-radius: 12px;
    padding: 28px 24px;
}

.breaches-section h4 {
    font-size: 1.1rem;
    color: white;
    margin-bottom: 4px;
}

.breaches-subtitle {
    font-size: 0.85rem;
    color: #94a3b8;
    margin-bottom: 20px;
}

.breaches-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(240px, 1fr));
    gap: 16px;
}

.breach-card {
    background: rgba(255,255,255,0.08);
    border: none;
    border-left: 4px solid var(--accent-orange);
    border-radius: 8px;
    padding: 20px;
    display: flex;
    flex-direction: column;
    transition: background 0.2s;
}

.breach-card:hover {
    background: rgba(255,255,255,0.12);
}

.breach-header {
    display: flex;
    justify-content: space-between;
    align-items: baseline;
    margin-bottom: 8px;
}

.breach-company {
    font-weight: 700;
    font-size: 0.95rem;
    color: white;
}

.breach-year {
    font-size: 0.8rem;
    color: #94a3b8;
    font-weight: 500;
}

.breach-impact {
    font-size: 1.25rem;
    font-weight: 700;
    color: var(--accent-orange);
    margin-bottom: 10px;
    line-height: 1.3;
}

.breach-description {
    font-size: 0.85rem;
    color: #94a3b8;
    line-height: 1.5;
    margin-bottom: 12px;
    flex: 1;
}

.breach-source {
    font-size: 0.8rem;
    color: #64748b;
    font-weight: 500;
    font-style: italic;
}

/* Demo CTA */
.demo-cta {
    padding: 60px 20px;
    text-align: center;
    background: white;
    border-top: 1px solid var(--border);
}

.demo-cta h2 {
    margin-bottom: 12px;
}

.demo-cta p {
    color: var(--gray);
    margin-bottom: 24px;
}

.demo-cta .scanner-form {
    max-width: 500px;
}

/* Scan Results Page */
.scan-results {
    padding: 40px 20px;
}

.grade-card {
    display: flex;
    align-items: center;
    gap: 30px;
    background: white;
    padding: 30px;
    border-radius: 16px;
    box-shadow: 0 4px 20px rgba(0,0,0,0.08);
    margin-bottom: 30px;
}

.grade-main {
    text-align: center;
    padding: 20px 30px;
    border-radius: 12px;
}

.grade-card.grade-a\\+, .grade-card.grade-a { .grade-main { background: #f0fdf4; } }
.grade-card.grade-b { .grade-main { background: #fefce8; } }
.grade-card.grade-c, .grade-card.grade-d { .grade-main { background: #fff7ed; } }
.grade-card.grade-f { .grade-main { background: #fef2f2; } }

.grade-letter {
    display: block;
    font-size: 4rem;
    font-weight: 700;
    line-height: 1;
}

.grade-card.grade-a\\+ .grade-letter, .grade-card.grade-a .grade-letter { color: var(--success); }
.grade-card.grade-b .grade-letter { color: #ca8a04; }
.grade-card.grade-c .grade-letter, .grade-card.grade-d .grade-letter { color: #ea580c; }
.grade-card.grade-f .grade-letter { color: var(--danger); }

.grade-score {
    font-size: 1.25rem;
    color: var(--gray);
}

.grade-details h1 {
    font-size: 1.75rem;
    margin-bottom: 8px;
}

.grade-details p {
    color: var(--gray);
}

/* Results Summary */
.results-summary {
    display: flex;
    gap: 20px;
    margin-bottom: 30px;
}

.summary-stat {
    flex: 1;
    padding: 20px;
    border-radius: 12px;
    text-align: center;
}

.summary-stat.good {
    background: #f0fdf4;
    border: 1px solid #bbf7d0;
}

.summary-stat.bad {
    background: #fef2f2;
    border: 1px solid #fecaca;
}

.summary-stat .stat-number {
    font-size: 2.5rem;
    font-weight: 700;
}

.summary-stat.good .stat-number { color: var(--success); }
.summary-stat.bad .stat-number { color: var(--danger); }

.summary-stat .stat-label {
    color: var(--gray);
    font-size: 0.9rem;
}

/* Results Table */
.results-table {
    background: white;
    border-radius: 16px;
    padding: 24px;
    box-shadow: 0 4px 20px rgba(0,0,0,0.08);
    margin-bottom: 30px;
}

.results-table h2 {
    margin-bottom: 20px;
    font-size: 1.25rem;
}

.header-row {
    display: grid;
    grid-template-columns: 40px 1fr 100px 120px;
    gap: 16px;
    align-items: center;
    padding: 16px;
    border-radius: 8px;
    margin-bottom: 8px;
}

.header-row.pass { background: #f0fdf4; }
.header-row.fail { background: #fef2f2; }

.status-icon {
    width: 32px;
    height: 32px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-weight: 700;
}

.status-icon.pass { background: var(--success); color: white; }
.status-icon.fail { background: var(--danger); color: white; }

.header-info h3 {
    font-size: 1rem;
    margin-bottom: 4px;
}

.header-desc {
    font-size: 0.85rem;
    color: var(--gray);
    margin-bottom: 6px;
}

.header-value {
    font-size: 0.8rem;
    background: rgba(0,0,0,0.05);
    padding: 4px 8px;
    border-radius: 4px;
    display: inline-block;
    max-width: 300px;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.header-missing {
    font-size: 0.85rem;
    color: var(--danger);
    font-style: italic;
}

.risk-badge {
    font-size: 0.8rem;
    padding: 4px 10px;
    border-radius: 20px;
    font-weight: 500;
}

.risk-badge.high { background: #fef2f2; color: var(--danger); }
.risk-badge.medium { background: #fffbeb; color: var(--warning); }
.risk-badge.low { background: #f0fdf4; color: var(--success); }

/* Vulnerability Alert */
.vulnerability-alert {
    background: #fef2f2;
    border: 1px solid #fecaca;
    border-radius: 12px;
    padding: 24px;
    margin-bottom: 30px;
}

.vulnerability-alert h3 {
    color: var(--danger);
    margin-bottom: 12px;
}

.vulnerability-alert p {
    color: #991b1b;
    margin-bottom: 12px;
}

.vulnerability-list {
    margin-left: 20px;
    color: #991b1b;
}

.vulnerability-list li {
    margin-bottom: 8px;
}

/* Lead Capture */
.lead-capture {
    padding: 60px 20px;
    background: linear-gradient(135deg, var(--primary) 0%, var(--primary-light) 100%);
}

.lead-card {
    max-width: 600px;
    margin: 0 auto;
    background: white;
    border-radius: 16px;
    padding: 40px;
    text-align: center;
}

.lead-card h2 {
    margin-bottom: 12px;
}

.lead-card > p {
    color: var(--gray);
    margin-bottom: 30px;
}

.lead-form {
    text-align: left;
}

.form-row {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 16px;
}

.form-group {
    margin-bottom: 16px;
}

.form-group label {
    display: block;
    font-weight: 500;
    margin-bottom: 6px;
    color: var(--dark);
}

.form-group input {
    width: 100%;
    padding: 12px 16px;
    border: 2px solid var(--border);
    border-radius: 8px;
    font-size: 1rem;
}

.form-group input:focus {
    outline: none;
    border-color: var(--primary);
}

.form-note {
    text-align: center;
    margin-top: 12px;
    color: var(--gray);
    font-size: 0.85rem;
}

.form-success {
    text-align: center;
    padding: 30px;
}

.form-success h3 {
    color: var(--success);
    margin-bottom: 8px;
}

/* Inline CTA (scan results page) */
.inline-cta {
    margin-bottom: 30px;
}

.inline-cta-card {
    background: linear-gradient(135deg, #d94425 0%, #c23616 60%, #b82010 100%);
    border-radius: 16px;
    padding: 32px 40px;
    color: white;
    box-shadow: 0 4px 20px rgba(0,0,0,0.08);
    position: relative;
    overflow: hidden;
}

.inline-cta-card::before {
    content: '';
    position: absolute;
    top: -40%;
    right: -10%;
    width: 300px;
    height: 300px;
    background: radial-gradient(circle, rgba(255,255,255,0.06) 0%, transparent 70%);
    pointer-events: none;
}

.inline-cta-content h2 {
    font-size: 1.5rem;
    margin-bottom: 8px;
}

.inline-cta-content > p {
    opacity: 0.9;
    margin-bottom: 20px;
    font-size: 1.05rem;
}

.inline-cta-form {
    margin-bottom: 0;
}

.inline-cta-form .cf-turnstile {
    margin-bottom: 12px;
}

.inline-cta-input-group {
    display: flex;
    gap: 12px;
    margin-bottom: 16px;
}

.inline-cta-input-group input[type="email"] {
    flex: 1;
    padding: 14px 20px;
    border: 1px solid rgba(255,255,255,0.25);
    border-radius: 8px;
    font-size: 1rem;
    background: rgba(255,255,255,0.12);
    color: white;
    outline: none;
    backdrop-filter: blur(4px);
    transition: border-color 0.2s, background 0.2s;
}

.inline-cta-input-group input[type="email"]::placeholder {
    color: rgba(255,255,255,0.55);
}

.inline-cta-input-group input[type="email"]:focus {
    border-color: rgba(255,255,255,0.6);
    background: rgba(255,255,255,0.2);
}

.inline-cta-input-group .btn {
    white-space: nowrap;
    flex-shrink: 0;
    background: #ffffff;
    color: #c23616;
    font-weight: 700;
    border: none;
    box-shadow: 0 2px 8px rgba(0,0,0,0.15);
    transition: transform 0.15s, box-shadow 0.15s;
}

.inline-cta-input-group .btn:hover {
    transform: translateY(-1px);
    box-shadow: 0 4px 14px rgba(0,0,0,0.2);
    background: #ffffff;
}

.inline-cta-features {
    display: flex;
    gap: 24px;
    flex-wrap: wrap;
    font-size: 0.85rem;
    color: rgba(255,255,255,0.7);
}

.inline-cta-feature {
    display: inline-flex;
    align-items: center;
    gap: 4px;
}

.inline-cta-success {
    text-align: center;
    padding: 20px;
}

.inline-cta-success h3 {
    color: #86efac;
    margin-bottom: 8px;
    font-size: 1.25rem;
}

.inline-cta-success p {
    opacity: 0.9;
}

.inline-cta-warm-link {
    color: rgba(255,255,255,0.7);
    text-decoration: none;
    font-size: 0.85rem;
    transition: color 0.2s;
}

.inline-cta-warm-link:hover {
    color: rgba(255,255,255,1);
    text-decoration: underline;
}

.lead-warm-link {
    color: var(--primary);
    text-decoration: none;
    font-weight: 500;
    white-space: nowrap;
}

.lead-warm-link:hover {
    text-decoration: underline;
}

/* Honeypot field - CSP-safe (no inline styles) */
.hp-field {
    position: absolute;
    left: -9999px;
    height: 0;
    overflow: hidden;
}

/* Scanner Page */
.scanner-page {
    padding: 80px 20px;
    text-align: center;
    min-height: 70vh;
    display: flex;
    flex-direction: column;
    justify-content: center;
}

.scanner-page h1 {
    margin-bottom: 16px;
}

.scanner-form.large {
    margin-bottom: 30px;
}

.scanner-features {
    display: flex;
    justify-content: center;
    gap: 40px;
    margin-bottom: 40px;
}

.feature {
    display: flex;
    align-items: center;
    gap: 8px;
    color: var(--gray);
}

.feature-icon {
    font-size: 1.25rem;
}

.demo-link-box {
    padding: 24px;
    background: white;
    border-radius: 12px;
    display: inline-block;
}

.demo-link-box p {
    margin-bottom: 12px;
    color: var(--gray);
}

/* Error State */
.scan-error {
    padding: 80px 20px;
    text-align: center;
}

.error-box {
    max-width: 500px;
    margin: 0 auto;
    background: white;
    padding: 40px;
    border-radius: 16px;
    box-shadow: 0 4px 20px rgba(0,0,0,0.08);
}

.error-box h1 {
    font-size: 1.5rem;
    margin-bottom: 12px;
}

.error-box p {
    color: var(--gray);
    margin-bottom: 24px;
}

/* ==========================================================================
   HAMBURGER MENU (hidden on desktop, shown on mobile via breakpoints)
   ========================================================================== */

.mobile-hamburger {
    display: none;
    flex-direction: column;
    justify-content: center;
    gap: 5px;
    width: 44px;
    height: 44px;
    padding: 10px;
    background: none;
    border: none;
    cursor: pointer;
    z-index: 101;
}

.mobile-hamburger span {
    display: block;
    width: 22px;
    height: 2px;
    background: var(--dark);
    border-radius: 2px;
    transition: transform 0.3s, opacity 0.3s;
}

.mobile-hamburger.active span:nth-child(1) {
    transform: translateY(7px) rotate(45deg);
}

.mobile-hamburger.active span:nth-child(2) {
    opacity: 0;
}

.mobile-hamburger.active span:nth-child(3) {
    transform: translateY(-7px) rotate(-45deg);
}

/* Mobile nav overlay */
.demo-header nav.nav-open {
    display: flex;
}

/* ==========================================================================
   RESPONSIVE: 1024px — iPad landscape, small laptops
   ========================================================================== */

@media (max-width: 1024px) {
    /* Nav: show hamburger, hide nav links */
    .mobile-hamburger {
        display: flex;
    }

    .demo-header .container {
        position: relative;
    }

    .demo-header nav {
        display: none;
        position: absolute;
        top: 100%;
        left: 0;
        right: 0;
        background: white;
        flex-direction: column;
        align-items: stretch;
        padding: 16px 20px;
        gap: 12px;
        border-top: 1px solid var(--border);
        box-shadow: 0 8px 24px rgba(0,0,0,0.1);
        z-index: 100;
    }

    .demo-header nav .nav-link,
    .demo-header nav .btn {
        display: block;
        text-align: center;
        padding: 12px 16px;
        min-height: 44px;
        line-height: 1.4;
    }

    .demo-header nav .lang-switcher {
        justify-content: center;
        padding: 8px 0;
    }

    /* Demo tabs: horizontal scroll strip */
    .demo-tabs {
        flex-wrap: nowrap;
        justify-content: flex-start;
        overflow-x: auto;
        -webkit-overflow-scrolling: touch;
        scrollbar-width: thin;
        padding-bottom: 12px;
    }

    .demo-tab {
        flex-shrink: 0;
    }

    /* Demo container sidebar */
    .demo-container {
        grid-template-columns: 240px 1fr;
    }

    /* Headers grid: 3 columns on iPad */
    .headers-grid {
        grid-template-columns: repeat(3, 1fr);
    }

    /* Reduce section padding */
    .problem-section,
    .scanner-section,
    .how-section,
    .cta-section {
        padding: 60px 20px;
    }

    .hero {
        padding: 60px 20px;
    }

    /* Scanner inline form: reduce min-width */
    .scanner-form.inline .scanner-input {
        min-width: 220px;
    }

    /* Site topbar responsive */
    .site-topbar .container {
        font-size: 0.75rem;
    }

    .site-topbar-links {
        gap: 12px;
    }
}

/* ==========================================================================
   RESPONSIVE: 768px — Tablets portrait, large phones landscape
   ========================================================================== */

@media (max-width: 768px) {
    h1, section h1, article h1, aside h1, nav h1 { font-size: 1.75rem; }
    h2 { font-size: 1.5rem; }

    /* Hero */
    .hero { padding: 50px 16px; }
    .hero::after { display: none; }
    .hero-stats { gap: 30px; }
    .hero-subtitle { font-size: 1.1rem; }

    /* Demo layout: single column */
    .demo-container {
        grid-template-columns: 1fr;
    }

    .demo-comparison {
        grid-template-columns: 1fr;
    }

    .frame-content {
        height: 250px;
    }

    /* Scan results */
    .header-row {
        grid-template-columns: 40px 1fr;
    }

    .header-risk, .header-action {
        grid-column: 2;
    }

    .header-value {
        max-width: 100%;
        white-space: normal;
        word-break: break-all;
    }

    .grade-card {
        flex-direction: column;
        text-align: center;
        padding: 24px;
    }

    .results-summary {
        flex-direction: column;
    }

    .form-row {
        grid-template-columns: 1fr;
    }

    .breaches-grid {
        grid-template-columns: 1fr;
    }

    /* Inline CTA */
    .inline-cta-card {
        padding: 24px;
    }

    .inline-cta-input-group {
        flex-direction: column;
    }

    .inline-cta-input-group .btn {
        width: 100%;
    }

    .inline-cta-features {
        flex-direction: column;
        gap: 8px;
    }

    /* Scanner form: stack input and button */
    .scanner-input-group {
        flex-direction: column;
    }

    .scanner-input-group .btn {
        width: 100%;
    }

    .scanner-form.inline {
        flex-direction: column;
    }

    .scanner-form.inline .scanner-input {
        min-width: 0;
        width: 100%;
    }

    /* How It Works: hide step arrows */
    .step-arrow {
        display: none;
    }

    .steps {
        gap: 24px;
    }

    /* Headers grid: 2 columns */
    .headers-grid {
        grid-template-columns: repeat(2, 1fr);
    }

    /* Scoring grid: single column */
    .scoring-grid {
        grid-template-columns: 1fr;
    }

    .scoring-grades {
        word-wrap: break-word;
    }

    .headers-test-section {
        padding: 50px 0;
    }

    /* Lead card */
    .lead-card {
        padding: 28px 20px;
    }

    /* Touch targets: minimum 44px */
    .btn {
        min-height: 44px;
        display: inline-flex;
        align-items: center;
        justify-content: center;
    }

    .demo-tab {
        min-height: 44px;
        padding: 10px 16px;
    }

    .toggle-switch {
        width: 52px;
        height: 28px;
    }

    /* CTA buttons: full width */
    .cta-buttons {
        flex-direction: column;
        align-items: center;
    }

    .cta-buttons .btn {
        width: 100%;
        max-width: 320px;
    }

    /* Demo CTA section */
    .demo-cta {
        padding: 40px 16px;
    }

    /* Sections padding */
    .problem-section,
    .scanner-section,
    .how-section,
    .cta-section {
        padding: 50px 16px;
    }
}

/* ==========================================================================
   RESPONSIVE: 600px — Large phones portrait
   ========================================================================== */

@media (max-width: 600px) {
    h1, section h1, article h1, aside h1, nav h1 { font-size: 1.5rem; }
    h2 { font-size: 1.25rem; }
    h3 { font-size: 1.1rem; }

    /* Attack cards: single column */
    .attack-cards {
        grid-template-columns: 1fr;
    }

    /* Scanner features: stack vertically */
    .scanner-features {
        flex-direction: column;
        gap: 16px;
        align-items: center;
    }

    /* Headers grid: single column */
    .headers-grid {
        grid-template-columns: 1fr;
    }

    /* Grade card */
    .grade-main {
        padding: 16px 20px;
    }

    .grade-letter {
        font-size: 3rem;
    }

    .grade-details h1 {
        font-size: 1.35rem;
    }

    /* Results table tighter */
    .results-table {
        padding: 16px;
    }

    .header-row {
        padding: 12px;
        gap: 12px;
    }

    /* Vulnerability alert */
    .vulnerability-alert {
        padding: 16px;
    }

    /* Demo intro */
    .demo-intro {
        padding: 24px 16px;
    }

    .demo-intro h1 {
        font-size: 1.5rem;
    }

    /* Preview panel */
    .preview-panel {
        padding: 16px;
    }

    .preview-header {
        flex-direction: column;
        align-items: flex-start;
        gap: 4px;
    }

    /* Toggle panel */
    .toggle-panel {
        padding: 20px 16px;
    }

    /* Breaches section */
    .breaches-section {
        padding: 20px 16px;
    }

    /* FAQ */
    .faq-section {
        margin-top: 32px;
    }

    /* Footer */
    .footer {
        padding: 24px 16px;
    }
}

/* ==========================================================================
   RESPONSIVE: 480px — Small phones (iPhone SE, Galaxy S, etc.)
   ========================================================================== */

@media (max-width: 480px) {
    .container {
        padding: 0 12px;
    }

    /* Hero */
    .hero {
        padding: 36px 12px;
    }

    .hero h1 {
        font-size: 1.35rem;
    }

    .hero-subtitle {
        font-size: 1rem;
        margin-bottom: 24px;
    }

    .hero-ctas {
        flex-direction: column;
        align-items: center;
        margin-bottom: 36px;
    }

    .hero-ctas .btn {
        width: 100%;
        max-width: 280px;
    }

    .hero-stats {
        gap: 20px;
        flex-direction: column;
    }

    .stat-number {
        font-size: 2rem;
    }

    .stat-label {
        font-size: 0.8rem;
    }

    /* Sections */
    .problem-section,
    .scanner-section,
    .how-section,
    .cta-section {
        padding: 36px 12px;
    }

    .section-intro {
        font-size: 1rem;
        margin-bottom: 24px;
    }

    /* Scanner */
    .scanner-input-group {
        padding: 6px;
    }

    .scanner-input {
        padding: 12px 14px;
        font-size: 1rem;
    }

    /* Lead card */
    .lead-card {
        padding: 20px 16px;
    }

    .lead-capture {
        padding: 36px 12px;
    }

    /* Inline CTA */
    .inline-cta-card {
        padding: 20px 16px;
    }

    .inline-cta-content h2 {
        font-size: 1.25rem;
    }

    .inline-cta-content > p {
        font-size: 0.95rem;
    }

    /* Demo tabs: smaller */
    .demo-tab {
        padding: 8px 12px;
        font-size: 0.85rem;
    }

    .tab-icon {
        font-size: 1.1rem;
    }

    /* Demo main */
    .demo-main {
        padding: 20px 12px;
    }

    /* Frame content height */
    .frame-content {
        height: 200px;
    }

    /* Grade */
    .grade-card {
        padding: 16px;
        gap: 16px;
    }

    .grade-letter {
        font-size: 2.5rem;
    }

    .grade-score {
        font-size: 1rem;
    }

    .grade-details h1 {
        font-size: 1.15rem;
    }

    /* Scoring */
    .scoring-section {
        padding: 16px;
    }

    /* Error box */
    .error-box {
        padding: 24px 16px;
    }

    /* Scanner page */
    .scanner-page {
        padding: 48px 12px;
    }

    /* Demo link box */
    .demo-link-box {
        display: block;
        padding: 16px;
    }

    /* Header row: tighter on small phones */
    .header-row {
        grid-template-columns: 32px 1fr;
        padding: 10px;
        gap: 10px;
    }

    .status-icon {
        width: 28px;
        height: 28px;
        font-size: 0.85rem;
    }

    .header-info h3 {
        font-size: 0.9rem;
    }

    /* CTA section */
    .cta-section h2 {
        font-size: 1.25rem;
    }

    .cta-section p {
        font-size: 1rem;
    }

    /* Site topbar */
    .site-topbar {
        padding: 6px 12px;
        font-size: 0.7rem;
    }

    .site-topbar-links {
        gap: 8px;
    }

    /* Lang switcher */
    .lang-switcher {
        font-size: 0.8rem;
    }

    /* Steps: tighter */
    .step {
        max-width: 100%;
    }

    .step-number {
        width: 40px;
        height: 40px;
        font-size: 1.25rem;
    }
}

/* ==========================================================================
   Safe area insets for notched phones (iPhone X+, Pixel 6+)
   ========================================================================== */

@supports (padding-top: env(safe-area-inset-top)) {
    .site-topbar,
    .demo-header {
        padding-left: max(20px, env(safe-area-inset-left));
        padding-right: max(20px, env(safe-area-inset-right));
    }

    .footer {
        padding-bottom: max(40px, env(safe-area-inset-bottom));
    }
}

/* ============================================
   Admin Dashboard Styles
   ============================================ */

.admin-body {
    background: #0f172a;
    color: #e2e8f0;
    font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
    margin: 0;
    min-height: 100vh;
}

/* Login / Verify Pages */
.admin-login-container {
    min-height: 100vh;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 20px;
}

.admin-login-card {
    background: #1e293b;
    border-radius: 12px;
    padding: 40px;
    width: 100%;
    max-width: 400px;
    box-shadow: 0 4px 24px rgba(0, 0, 0, 0.3);
}

.admin-login-header {
    text-align: center;
    margin-bottom: 32px;
}

.admin-logo-img {
    width: 72px;
    height: 72px;
    margin-bottom: 16px;
    border-radius: 12px;
}

.admin-login-header h1 {
    font-size: 22px;
    color: #f1f5f9;
    margin-bottom: 8px;
}

.admin-login-header p {
    font-size: 14px;
    color: #94a3b8;
}

.admin-form-group {
    margin-bottom: 20px;
}

.admin-form-group label {
    display: block;
    font-size: 13px;
    color: #94a3b8;
    margin-bottom: 6px;
    font-weight: 500;
}

.admin-form-group input {
    width: 100%;
    padding: 12px 14px;
    background: #0f172a;
    border: 1px solid #334155;
    border-radius: 8px;
    color: #f1f5f9;
    font-size: 15px;
    transition: border-color 0.2s;
}

.admin-form-group input:focus {
    outline: none;
    border-color: #3b82f6;
    box-shadow: 0 0 0 3px rgba(59, 130, 246, 0.15);
}

.admin-code-input {
    text-align: center;
    font-size: 28px !important;
    letter-spacing: 8px;
    font-weight: 600;
}

.admin-alert {
    padding: 12px 16px;
    border-radius: 8px;
    font-size: 14px;
    margin-bottom: 20px;
}

.admin-alert-error {
    background: rgba(239, 68, 68, 0.1);
    border: 1px solid rgba(239, 68, 68, 0.3);
    color: #fca5a5;
}

.admin-alert-success {
    background: rgba(34, 197, 94, 0.1);
    border: 1px solid rgba(34, 197, 94, 0.3);
    color: #86efac;
}

.admin-btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    padding: 6px 12px;
    border: none;
    border-radius: 8px;
    font-size: 14px;
    font-weight: 500;
    color: #94a3b8;
    cursor: pointer;
    transition: all 0.2s;
    text-decoration: none;
}

.admin-btn-primary {
    width: 100%;
    padding: 12px;
    background: #3b82f6;
    color: white;
}

.admin-btn-primary:hover {
    background: #2563eb;
}

.admin-btn-sm {
    padding: 6px 14px;
    font-size: 13px;
}

.admin-btn-outline {
    background: transparent;
    border: 1px solid #475569;
    color: #94a3b8;
}

.admin-btn-outline:hover {
    border-color: #64748b;
    color: #e2e8f0;
}

.admin-btn-danger {
    background: transparent;
    border: 1px solid #7f1d1d;
    color: #f87171;
}

.admin-btn-danger:hover {
    background: var(--danger);
    border-color: var(--danger);
    color: white;
}

.admin-history-actions {
    text-align: right;
    white-space: nowrap;
}

.admin-btn-danger-outline {
    background: transparent;
    border: 1px dashed #7f1d1d;
    color: #f87171;
}

.admin-btn-danger-outline:hover {
    background: var(--danger);
    border-color: var(--danger);
    border-style: solid;
    color: white;
}

.admin-scans-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 16px;
    flex-wrap: wrap;
    margin-bottom: 8px;
}

.admin-bulk-controls {
    display: flex;
    align-items: center;
    gap: 10px;
    flex-wrap: wrap;
}

.admin-bulk-bar {
    display: flex;
    align-items: center;
    gap: 8px;
    padding: 4px 10px;
    background: #1e293b;
    border: 1px solid #334155;
    border-radius: 8px;
}

.admin-bulk-count {
    font-size: 13px;
    font-weight: 600;
    color: #e2e8f0;
}

.admin-check-col {
    width: 36px;
    text-align: center;
}

.admin-check-col input[type="checkbox"] {
    cursor: pointer;
    vertical-align: middle;
}

.admin-btn-active,
.admin-btn-active:visited {
    background: #1e293b;
    border: 1px solid #3b82f6;
    color: #60a5fa;
    font-weight: 600;
}

.admin-btn:visited {
    color: #94a3b8;
}

.admin-login-footer {
    text-align: center;
    margin-top: 24px;
}

.admin-login-footer a {
    color: #64748b;
    font-size: 13px;
    text-decoration: none;
}

.admin-login-footer a:hover {
    color: #94a3b8;
}

/* Top Bar */
.admin-topbar {
    background: #1e293b;
    border-bottom: 1px solid #334155;
    padding: 12px 24px;
    display: flex;
    align-items: center;
    justify-content: space-between;
}

.admin-topbar-left {
    display: flex;
    align-items: center;
    gap: 10px;
}

.admin-topbar-logo-img {
    width: 28px;
    height: 28px;
    border-radius: 4px;
}

.admin-topbar-title {
    font-size: 16px;
    font-weight: 600;
    color: #f1f5f9;
}

.admin-topbar-right {
    display: flex;
    align-items: center;
    gap: 16px;
}

.admin-topbar-email {
    font-size: 13px;
    color: #64748b;
}

/* Dashboard Container */
.admin-container {
    max-width: 1400px;
    margin: 0 auto;
    padding: 24px;
}

/* Filter Bar */
.admin-filters {
    display: flex;
    gap: 24px;
    margin-bottom: 24px;
    flex-wrap: wrap;
}

.admin-filter-group label {
    display: block;
    font-size: 12px;
    color: #64748b;
    margin-bottom: 6px;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.admin-filter-buttons {
    display: flex;
    gap: 4px;
}

.admin-filter-btn {
    padding: 6px 14px;
    border-radius: 6px;
    font-size: 13px;
    color: #94a3b8;
    text-decoration: none;
    background: #1e293b;
    border: 1px solid #334155;
    transition: all 0.15s;
}

.admin-filter-btn:hover {
    border-color: #475569;
    color: #e2e8f0;
}

.admin-filter-btn.active {
    background: #3b82f6;
    border-color: #3b82f6;
    color: white;
}

/* Overview Cards */
.admin-cards {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(170px, 1fr));
    gap: 16px;
    margin-bottom: 24px;
}

.admin-card {
    background: #1e293b;
    border-radius: 10px;
    padding: 20px;
    border: 1px solid #334155;
}

.admin-card-label {
    font-size: 12px;
    color: #64748b;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    margin-bottom: 8px;
}

.admin-card-value {
    font-size: 28px;
    font-weight: 700;
    color: #f1f5f9;
}

/* Panels */
.admin-panel {
    background: #1e293b;
    border-radius: 10px;
    padding: 20px;
    border: 1px solid #334155;
    margin-bottom: 24px;
}

.admin-panel-title {
    font-size: 16px;
    font-weight: 600;
    color: #f1f5f9;
    margin-bottom: 16px;
}

/* Two-column grid */
.admin-grid-2col {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 24px;
}

/* Tables */
.admin-table-wrap {
    overflow-x: auto;
}

.admin-table {
    width: 100%;
    border-collapse: collapse;
    font-size: 13px;
}

.admin-table th {
    text-align: left;
    padding: 10px 12px;
    color: #64748b;
    font-weight: 500;
    border-bottom: 1px solid #334155;
    white-space: nowrap;
    font-size: 12px;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.admin-table td {
    padding: 10px 12px;
    border-bottom: 1px solid rgba(51, 65, 85, 0.5);
    color: #cbd5e1;
}

.admin-table tbody tr:hover {
    background: rgba(59, 130, 246, 0.05);
}

.admin-table code {
    background: #0f172a;
    padding: 2px 6px;
    border-radius: 4px;
    font-size: 12px;
    color: #94a3b8;
}

.admin-empty {
    text-align: center;
    color: #475569;
    padding: 24px 12px !important;
}

.admin-nowrap {
    white-space: nowrap;
}

.admin-ua {
    max-width: 250px;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

/* Badges */
.admin-badge {
    display: inline-block;
    padding: 3px 10px;
    border-radius: 99px;
    font-size: 11px;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.3px;
}

.admin-badge-bot {
    background: rgba(245, 158, 11, 0.15);
    color: #fbbf24;
}

.admin-badge-human {
    background: rgba(34, 197, 94, 0.15);
    color: #4ade80;
}

.admin-maintenance-btns {
    gap: 8px;
}

.admin-badge-scans {
    background: rgba(59, 130, 246, 0.15);
    color: #60a5fa;
    font-size: 10px;
    margin-left: 6px;
    vertical-align: middle;
}

.admin-domain-link {
    color: #e2e8f0;
    text-decoration: none;
}

.admin-domain-link:hover {
    color: #60a5fa;
    text-decoration: underline;
}

.admin-domain-link:visited {
    color: #e2e8f0;
}

/* Admin Dialog (HTML <dialog>) */
.admin-dialog {
    position: fixed;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    background: #1e293b;
    border: 1px solid #334155;
    border-radius: 12px;
    padding: 32px;
    max-width: 420px;
    width: 90%;
    color: #e2e8f0;
    text-align: center;
    box-shadow: 0 25px 50px rgba(0, 0, 0, 0.5);
}

.admin-dialog::backdrop {
    background: rgba(0, 0, 0, 0.6);
    backdrop-filter: blur(4px);
}

.admin-dialog-icon {
    font-size: 40px;
    margin-bottom: 12px;
    color: #f59e0b;
}

.admin-dialog-title {
    margin: 0 0 8px;
    font-size: 18px;
    font-weight: 600;
    color: #f1f5f9;
}

.admin-dialog-text {
    margin: 0 0 24px;
    font-size: 14px;
    color: #94a3b8;
    line-height: 1.5;
}

.admin-dialog-actions {
    display: flex;
    gap: 12px;
    justify-content: center;
}

.admin-dialog-btn {
    padding: 10px 24px;
    border-radius: 8px;
    font-size: 14px;
    font-weight: 500;
    cursor: pointer;
    border: none;
    transition: background 0.2s, transform 0.1s;
}

.admin-dialog-btn:hover {
    transform: translateY(-1px);
}

.admin-dialog-btn:active {
    transform: translateY(0);
}

.admin-dialog-btn-cancel {
    background: #334155;
    color: #e2e8f0;
}

.admin-dialog-btn-cancel:hover {
    background: #475569;
}

.admin-dialog-btn-confirm {
    background: #3b82f6;
    color: #fff;
}

.admin-dialog-btn-confirm:hover {
    background: #2563eb;
}

.admin-badge-anon {
    background: rgba(99, 102, 241, 0.15);
    color: #818cf8;
}

.admin-row-anonymous {
    opacity: 0.85;
}

.admin-status-label {
    color: #94a3b8;
}

/* Scan History */
.admin-history-comparison {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 16px;
    margin-bottom: 24px;
    padding: 16px;
    background: rgba(15, 23, 42, 0.5);
    border-radius: 8px;
    border: 1px solid #334155;
}

.admin-history-current,
.admin-history-previous {
    display: flex;
    align-items: center;
    gap: 10px;
}

.admin-history-label {
    font-size: 11px;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.3px;
    color: #64748b;
}

.admin-history-score {
    font-size: 18px;
    font-weight: 700;
    color: #f1f5f9;
}

.admin-history-date {
    font-size: 12px;
    color: #94a3b8;
}

.admin-history-delta {
    text-align: center;
}

.admin-history-delta-score {
    font-size: 16px;
    font-weight: 700;
    color: #94a3b8;
}

.admin-history-delta-score.admin-improved {
    color: #4ade80;
}

.admin-history-delta-score.admin-regressed {
    color: #f87171;
}

.admin-panel-subtitle {
    font-size: 14px;
    font-weight: 600;
    color: #94a3b8;
    margin: 20px 0 12px 0;
}

.admin-row-improved {
    background: rgba(34, 197, 94, 0.05);
}

.admin-row-regressed {
    background: rgba(248, 113, 113, 0.05);
}

.admin-row-current {
    background: rgba(99, 102, 241, 0.08);
}

.admin-panel-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 16px;
    margin-bottom: 4px;
}

.admin-row-clickable {
    cursor: pointer;
    transition: background 0.15s;
}

.admin-row-clickable:hover {
    background: rgba(99, 102, 241, 0.12);
}

.admin-row-selected {
    background: rgba(59, 130, 246, 0.15);
    box-shadow: inset 3px 0 0 #3b82f6;
}

.admin-row-clickable.admin-row-selected:hover {
    background: rgba(59, 130, 246, 0.2);
}

.admin-badge-improved {
    background: rgba(34, 197, 94, 0.15);
    color: #4ade80;
}

.admin-badge-regressed {
    background: rgba(248, 113, 113, 0.15);
    color: #f87171;
}

.admin-history-nochange {
    color: #475569;
    font-size: 13px;
}

/* Pagination */
.admin-pagination {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 16px;
    margin-top: 20px;
    padding-top: 16px;
    border-top: 1px solid #334155;
}

.admin-page-btn {
    padding: 6px 14px;
    border-radius: 6px;
    font-size: 13px;
    color: #94a3b8;
    text-decoration: none;
    background: #0f172a;
    border: 1px solid #334155;
    transition: all 0.15s;
}

.admin-page-btn:hover {
    border-color: #475569;
    color: #e2e8f0;
}

.admin-page-info {
    font-size: 13px;
    color: #64748b;
}

/* Admin responsive */
@media (max-width: 768px) {
    .admin-container {
        padding: 16px;
    }

    .admin-grid-2col {
        grid-template-columns: 1fr;
    }

    .admin-cards {
        grid-template-columns: repeat(2, 1fr);
    }

    .admin-topbar {
        flex-direction: column;
        gap: 10px;
        text-align: center;
    }

    .admin-filters {
        flex-direction: column;
        gap: 16px;
    }

    .admin-filter-buttons {
        flex-wrap: wrap;
    }

    .admin-login-card {
        padding: 24px;
    }
}

/* =========================================================================
   HEADERS WE TEST SECTION
   ========================================================================= */

.headers-test-section {
    padding: 80px 0;
    background: #f8fafc;
}

.headers-test-section h2 {
    text-align: center;
    margin-bottom: 12px;
}

.headers-grid {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 16px;
    margin-top: 32px;
}

.header-item {
    background: white;
    border-radius: 10px;
    padding: 20px;
    border: 1px solid #e2e8f0;
    transition: box-shadow 0.2s;
}

.header-item:hover {
    box-shadow: 0 4px 12px rgba(0,0,0,0.08);
}

.header-item .header-name {
    display: block;
    font-size: 0.85rem;
    font-weight: 600;
    color: var(--primary);
    background: #eff6ff;
    padding: 4px 10px;
    border-radius: 4px;
    margin-bottom: 10px;
}

.header-item p {
    font-size: 0.9rem;
    color: var(--gray);
    line-height: 1.5;
    margin: 0;
}

/* =========================================================================
   HOW SCORING WORKS SECTION
   ========================================================================= */

.scoring-section {
    background: #f8fafc;
    border-radius: 12px;
    padding: 32px;
    margin-bottom: 32px;
}

.scoring-section h2 {
    font-size: 1.5rem;
    margin-bottom: 8px;
}

.scoring-section > p {
    color: var(--gray);
    margin-bottom: 20px;
}

.scoring-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 20px;
    margin-bottom: 16px;
}

.scoring-group h4 {
    font-size: 0.85rem;
    text-transform: uppercase;
    letter-spacing: 0.05em;
    color: var(--gray);
    margin-bottom: 10px;
}

.scoring-group ul {
    list-style: none;
    padding: 0;
    margin: 0;
}

.scoring-group li {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 6px 0;
    font-size: 0.9rem;
    color: var(--dark);
    border-bottom: 1px solid #e2e8f0;
}

.scoring-group li:last-child {
    border-bottom: none;
}

.scoring-weight {
    font-weight: 600;
    color: var(--primary);
    font-size: 0.85rem;
}

.scoring-grades {
    text-align: center;
    font-size: 0.85rem;
    color: var(--gray);
    margin-top: 12px;
    padding-top: 12px;
    border-top: 1px solid #e2e8f0;
}

/* =========================================================================
   HERO PUZZLE LINE (homepage) - accent callout for the core positioning line
   ========================================================================= */

.hero-puzzle-line {
    max-width: 640px;
    margin: 4px auto 28px;
    padding: 14px 20px;
    text-align: left;
    background: rgba(255, 255, 255, 0.07);
    border-left: 4px solid var(--secondary);
    border-radius: 8px;
    color: #fff;
    font-size: 1.1rem;
    font-weight: 600;
    line-height: 1.5;
}

.hero-puzzle-accent {
    color: var(--secondary-light);
    font-weight: 700;
}

/* =========================================================================
   PUZZLE CONVERSION SECTION (scan results)
   Reuses existing tokens (brand vars + grade-card colors). Desktop-first grid.
   ========================================================================= */

.puzzle-section {
    background: white;
    border-radius: 16px;
    padding: 28px 24px;
    box-shadow: 0 4px 20px rgba(0,0,0,0.08);
    margin-bottom: 32px;
}

.puzzle-heading {
    font-size: 1.5rem;
    color: var(--dark);
    margin-bottom: 8px;
}

.puzzle-body {
    color: var(--gray);
    max-width: 760px;
    line-height: 1.6;
    margin-bottom: 24px;
}

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

.puzzle-piece {
    display: flex;
    flex-direction: column;
    gap: 4px;
    padding: 16px;
    border-radius: 12px;
    border: 1px solid var(--border);
    background: var(--light);
}

.puzzle-piece .piece-icon {
    font-size: 1.1rem;
    line-height: 1;
}

.puzzle-piece .piece-label {
    font-weight: 700;
    color: var(--dark);
}

.puzzle-piece .piece-desc {
    font-size: 0.875rem;
    color: var(--gray);
}

/* Locked pieces read muted and inactive next to the checked Headers tile */
.puzzle-piece.locked {
    background: var(--gray-light);
    border-style: dashed;
}

.puzzle-piece.locked .piece-label {
    color: var(--gray);
}

.puzzle-piece.locked .piece-lock {
    filter: grayscale(1);
    opacity: 0.55;
}

/* Headers tile: tinted by the visitor's grade, reusing the grade-card tokens */
.puzzle-piece.checked.grade-a\+, .puzzle-piece.checked.grade-a { background: #f0fdf4; border-color: #86efac; }
.puzzle-piece.checked.grade-b { background: #fefce8; border-color: #fde047; }
.puzzle-piece.checked.grade-c, .puzzle-piece.checked.grade-d { background: #fff7ed; border-color: #fdba74; }
.puzzle-piece.checked.grade-f { background: #fef2f2; border-color: #fca5a5; }
.puzzle-piece.checked.grade-a\+ .piece-icon, .puzzle-piece.checked.grade-a .piece-icon { color: var(--success); }
.puzzle-piece.checked.grade-b .piece-icon { color: #ca8a04; }
.puzzle-piece.checked.grade-c .piece-icon, .puzzle-piece.checked.grade-d .piece-icon { color: #ea580c; }
.puzzle-piece.checked.grade-f .piece-icon { color: var(--danger); }

.puzzle-grid-label {
    color: var(--gray);
    font-size: 0.9rem;
    font-weight: 600;
    margin: -8px 0 16px;
}

/* "and more" continuation bar: a full-width grid row so the set never reads as
   exactly six pieces. Clearly visible (brand-tinted, dashed), not a footnote. */
.puzzle-more {
    grid-column: 1 / -1;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 10px;
    padding: 14px 16px;
    border-radius: 12px;
    border: 1px dashed var(--secondary);
    background: #ecfeff;
    color: var(--primary);
    font-weight: 600;
}

.puzzle-more-plus {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 24px;
    height: 24px;
    border-radius: 50%;
    background: var(--secondary);
    color: #fff;
    font-size: 1.1rem;
    line-height: 1;
    flex-shrink: 0;
}

.puzzle-more-text {
    color: var(--primary);
}

/* Reframed CTA copy sits inside the existing orange .inline-cta-card */
.puzzle-section .inline-cta {
    margin-top: 24px;
}

.puzzle-cta-benefits {
    list-style: none;
    padding: 0;
    margin: 0 0 12px;
    display: flex;
    flex-direction: column;
    gap: 6px;
    color: #fff;
}

.puzzle-cta-tie {
    color: #fff;
    font-weight: 600;
    opacity: 0.95;
    margin-bottom: 16px;
}

@media (max-width: 768px) {
    .puzzle-grid { grid-template-columns: repeat(2, 1fr); }
}

@media (max-width: 480px) {
    .puzzle-grid { grid-template-columns: 1fr; }
}

/* =========================================================================
   FAQ SECTION
   ========================================================================= */

.faq-section {
    margin-top: 48px;
    padding-top: 40px;
    border-top: 1px solid #e2e8f0;
}

.faq-section h2 {
    text-align: center;
    margin-bottom: 24px;
}

.faq-list {
    max-width: 700px;
    margin: 0 auto;
}

.faq-item {
    border: 1px solid #e2e8f0;
    border-radius: 8px;
    margin-bottom: 8px;
    overflow: hidden;
}

.faq-item summary {
    padding: 16px 20px;
    font-weight: 600;
    font-size: 0.95rem;
    color: var(--dark);
    cursor: pointer;
    list-style: none;
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.faq-item summary::-webkit-details-marker { display: none; }

.faq-item summary::after {
    content: "+";
    font-size: 1.2rem;
    font-weight: 400;
    color: var(--gray);
    transition: transform 0.2s;
}

.faq-item[open] summary::after {
    content: "−";
}

.faq-item[open] summary {
    border-bottom: 1px solid #e2e8f0;
}

.faq-item p {
    padding: 16px 20px;
    font-size: 0.9rem;
    color: var(--gray);
    line-height: 1.6;
    margin: 0;
}

/* =========================================================================
   DEMO PAGE INTRO
   ========================================================================= */

.demo-section-h2 {
    font-size: 1.5rem;
    margin-bottom: 12px;
    text-align: center;
}

.demo-section-intro {
    color: var(--gray);
    max-width: 700px;
    line-height: 1.6;
    margin-bottom: 28px;
    text-align: center;
    margin-left: auto;
    margin-right: auto;
}

/* ============================================================
   Admin Reports & Navigation
   ============================================================ */

/* Topbar navigation tabs */
.admin-topbar-nav {
    display: flex;
    gap: 4px;
    margin-left: 16px;
    align-items: center;
}

.admin-nav-btn {
    padding: 6px 14px;
    border-radius: 6px;
    font-size: 13px;
    font-weight: 500;
    color: #94a3b8;
    text-decoration: none;
    border: 1px solid transparent;
    transition: all 0.15s;
}

.admin-nav-btn:hover {
    color: #e2e8f0;
    background: rgba(59, 130, 246, 0.1);
}

.admin-nav-btn.active {
    background: #3b82f6;
    color: white;
    border-color: #3b82f6;
}

/* Grade badges */
.admin-badge-grade-a\+, .admin-badge-grade-a {
    background: rgba(34, 197, 94, 0.15);
    color: #4ade80;
}
.admin-badge-grade-b {
    background: rgba(245, 158, 11, 0.15);
    color: #fbbf24;
}
.admin-badge-grade-c {
    background: rgba(249, 115, 22, 0.15);
    color: #fb923c;
}
.admin-badge-grade-d {
    background: rgba(239, 68, 68, 0.15);
    color: #fca5a5;
}
.admin-badge-grade-f {
    background: rgba(239, 68, 68, 0.25);
    color: #ef4444;
}

/* Risk badges */
.admin-badge-risk-high {
    background: rgba(239, 68, 68, 0.15);
    color: #ef4444;
}
.admin-badge-risk-medium {
    background: rgba(245, 158, 11, 0.15);
    color: #fbbf24;
}
.admin-badge-risk-low {
    background: rgba(59, 130, 246, 0.15);
    color: #60a5fa;
}

/* Inline status select */
.admin-status-select {
    background: #0f172a;
    border: 1px solid #334155;
    border-radius: 6px;
    color: #e2e8f0;
    font-size: 12px;
    padding: 4px 8px;
    cursor: pointer;
    -webkit-appearance: auto;
}

.admin-status-select:focus {
    outline: none;
    border-color: #3b82f6;
}

/* Admin Scan Form */
.admin-scan-form {
    display: flex;
    gap: 4px;
    align-items: center;
    margin: 0;
}

.admin-scan-input {
    padding: 6px 12px;
    background: #0f172a;
    border: 1px solid #334155;
    border-radius: 6px;
    color: #f1f5f9;
    font-size: 13px;
    width: 180px;
    transition: border-color 0.2s;
}

.admin-scan-input:focus {
    outline: none;
    border-color: #3b82f6;
}

.admin-scan-error {
    display: block;
    color: #ef4444;
    font-size: 11px;
    margin-top: 4px;
}

/* Inline Forms (status, email) */
.admin-inline-form {
    display: flex;
    gap: 4px;
    align-items: center;
    margin: 0;
}

/* Inline Email Editing */
.admin-email-input {
    padding: 4px 8px;
    background: #0f172a;
    border: 1px solid #334155;
    border-radius: 4px;
    color: #f1f5f9;
    font-size: 12px;
    width: 160px;
}

.admin-email-input:focus {
    outline: none;
    border-color: #3b82f6;
}

.admin-email-details {
    display: inline;
}

.admin-email-details[open] {
    display: block;
}

.admin-email-details summary {
    display: inline;
    cursor: pointer;
    color: #60a5fa;
    font-size: 11px;
    margin-left: 6px;
    list-style: none;
}

.admin-email-details summary::-webkit-details-marker {
    display: none;
}

.admin-email-details summary::marker {
    display: none;
    content: "";
}

.admin-email-details summary:hover {
    text-decoration: underline;
    color: #93bbfd;
}

/* Detail page table */
.admin-detail-table {
    width: 100%;
    border-collapse: collapse;
}

.admin-detail-table td {
    padding: 10px 12px;
    border-bottom: 1px solid rgba(51, 65, 85, 0.5);
    color: #cbd5e1;
    font-size: 14px;
}

.admin-detail-label {
    color: #64748b;
    font-weight: 500;
    width: 140px;
}

/* Grade display for detail page */
.admin-grade-display {
    display: flex;
    align-items: center;
    gap: 24px;
    padding: 16px 0;
}

.admin-grade-circle {
    width: 80px;
    height: 80px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 32px;
    font-weight: 700;
    flex-shrink: 0;
}

.admin-grade-a\+, .admin-grade-a {
    background: rgba(34, 197, 94, 0.15);
    color: #4ade80;
}
.admin-grade-b {
    background: rgba(245, 158, 11, 0.15);
    color: #fbbf24;
}
.admin-grade-c {
    background: rgba(249, 115, 22, 0.15);
    color: #fb923c;
}
.admin-grade-d {
    background: rgba(239, 68, 68, 0.15);
    color: #fca5a5;
}
.admin-grade-f {
    background: rgba(239, 68, 68, 0.25);
    color: #ef4444;
}

/* Breach cards for detail page */
.admin-breach-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
    gap: 12px;
    margin-top: 12px;
}

.admin-breach-card {
    background: rgba(30, 41, 59, 0.6);
    border: 1px solid #334155;
    border-radius: 8px;
    padding: 16px;
}

.admin-breach-header {
    display: flex;
    justify-content: space-between;
    align-items: baseline;
    color: #f1f5f9;
}

.admin-breach-year {
    color: #64748b;
    font-size: 13px;
}

.admin-breach-impact {
    color: #fbbf24;
    font-size: 13px;
    font-weight: 500;
    margin: 4px 0;
}

.admin-breach-desc {
    font-size: 13px;
    color: #94a3b8;
    margin-top: 6px;
    line-height: 1.5;
}

.admin-breach-source {
    display: inline-block;
    margin-top: 8px;
    font-size: 12px;
    color: #60a5fa;
    text-decoration: none;
}

.admin-breach-source:hover {
    text-decoration: underline;
}

/* Email link styling */
.admin-email-link {
    color: #60a5fa;
    text-decoration: none;
    font-size: 13px;
}

.admin-email-link:hover {
    text-decoration: underline;
    color: #93bbfd;
}
