/* ============================================
   MAILSLIPP - MINIMAL CLEAN DESIGN
   Exact copy of the provided image
   ============================================ */

:root {
    --font-scale: 1;
    --color-primary: #67C090;
}
/* Apply font scaling to HTML for entire page */
html {
    font-size: calc(17px * var(--font-scale));
    transition: font-size 0.3s ease;
    overflow-x: hidden;
    scrollbar-width: none;           /* Firefox */
    -ms-overflow-style: none;        /* IE/Edge */
}
html::-webkit-scrollbar {
    display: none;                   /* Chrome/Safari/Opera */
}
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}
body::-webkit-scrollbar {
    display: none;
}
body {
    font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
    background: linear-gradient(135deg, #1a2f3f 0%, #0f1a24 100%);
    color: #ffffff;
    min-height: 100vh;
    min-height: 100dvh;
    display: flex;
    flex-direction: column;
    padding: 12px 20px;
    overflow-x: hidden;
    overflow-y: auto;
    /* Smooth transitions - 0.6s for comfortable eye adjustment */
    transition: background 0.6s cubic-bezier(0.4, 0, 0.2, 1), 
                color 0.6s cubic-bezier(0.4, 0, 0.2, 1);
}
/* LIGHT MODE - Professional Gray Tones (Material Design / Tailwind inspired) */
body.light-mode {
    /* Deep gray background - elegant and professional */
    background: linear-gradient(135deg, #e0e4e8 0%, #d1d5db 100%);
    /* Dark gray text - excellent readability */
    color: #1f2937;
}
body.light-mode h1 {
    /* Almost black for headings */
    color: #111827;
}
body.light-mode .description {
    color: #9ca3af;
}
body.light-mode .description.subtitle {
    color: #374151;
}
body.light-mode .upload-text {
    color: #1f2937;
}
body.light-mode .upload-formats {
    /* Muted gray for hints */
    color: #6b7280;
}
body.light-mode .consent-text {
    color: #374151;
}
body.light-mode .upload-area {
    /* Medium gray card - harmonious with background */
    background: #d8dce0;
    border-color: rgba(103, 192, 144, 0.2);
    box-shadow: 0 2px 12px rgba(0, 0, 0, 0.06);
}
body.light-mode .upload-area:hover {
    background: #e0e4e8;
    border-color: rgba(103, 192, 144, 0.35);
    box-shadow: 0 4px 16px rgba(0, 0, 0, 0.1);
}
body.light-mode .language-toggle,
body.light-mode .theme-toggle,
body.light-mode .accessibility-toggle {
    /* Medium gray elevated surface */
    background: #f3f4f6;
    border-color: rgba(0, 0, 0, 0.08);
    color: #1f2937;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.05);
}
body.light-mode .language-toggle:hover,
body.light-mode .theme-toggle:hover,
body.light-mode .accessibility-toggle:hover {
    background: #e5e7eb;
    border-color: rgba(103, 192, 144, 0.3);
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.1);
}
body.light-mode .accessibility-toggle[aria-pressed="true"] {
    background: var(--color-primary);
    border-color: var(--color-primary);
    color: white;
}
body.light-mode .analyze-btn {
    box-shadow: 0 4px 16px rgba(103, 192, 144, 0.3);
}
body.light-mode .analyze-btn:hover {
    box-shadow: 0 6px 20px rgba(103, 192, 144, 0.4);
}
/* LOGO - World-Class Brand Design (Google/Apple Inspired) */
.logo-container {
    position: absolute;
    top: 24px;
    left: 24px;
    z-index: 100;
    display: flex;
    align-items: center;
    gap: 10px;
}
.beta-badge {
    display: inline-block;
    font-size: 0.625rem;
    font-weight: 700;
    letter-spacing: 1.2px;
    text-transform: uppercase;
    color: #fff;
    background: linear-gradient(135deg, #f59e0b, #d97706);
    padding: 3px 8px;
    border-radius: 4px;
    line-height: 1;
    vertical-align: middle;
    animation: betaPulse 3s ease-in-out infinite;
}
@keyframes betaPulse {
    0%, 100% { opacity: 1; }
    50% { opacity: 0.75; }
}
body.light-mode .beta-badge {
    background: linear-gradient(135deg, #d97706, #b45309);
}
.logo {
    display: inline-flex;
    align-items: center;
    text-decoration: none;
    font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', 'SF Pro Display', Roboto, sans-serif;
    font-size: 28px;
    font-weight: 700;
    letter-spacing: -0.5px;
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    cursor: pointer;
}
.logo:hover {
    transform: translateY(-1px);
    opacity: 0.85;
}
/* Logo Main Text - Clean White/Dark */
.logo-text {
    color: rgba(255, 255, 255, 0.95);
    font-weight: 700;
    transition: color 0.6s cubic-bezier(0.4, 0, 0.2, 1);
}
/* Logo Accent - Brand Color (Green in Dark, Blue-Green in Light) */
.logo-accent {
    color: #67C090;
    font-weight: 600;
    transition: color 0.6s cubic-bezier(0.4, 0, 0.2, 1);
}
/* Light Mode Logo Colors */
body.light-mode .logo-text {
    color: #111827; /* Almost black - strong contrast */
}
body.light-mode .logo-accent {
    color: #26667F; /* Professional blue-green */
}
/* Light Mode Logo Hover */
body.light-mode .logo:hover .logo-accent {
    color: #124170; /* Darker blue on hover */
}
/* Dark Mode Logo Hover */
.logo:hover .logo-accent {
    color: #5ab080; /* Slightly darker green on hover */
}
/* Logo Focus State for Accessibility */
.logo:focus-visible {
    outline: 2px solid #67C090;
    outline-offset: 4px;
    border-radius: 4px;
}
body.light-mode .logo:focus-visible {
    outline-color: #26667F;
}
/* TOP CONTROLS - Modern 2025 Design */
.top-controls {
    position: absolute;
    top: 24px;
    right: 24px;
    display: flex;
    gap: 12px;
    z-index: 100;
    /* Keep controls at fixed size - don't scale */
    font-size: 14px;
}
/* Force hide top controls when results are shown */
.top-controls.hide-for-results {
    display: none !important;
    visibility: hidden !important;
    opacity: 0 !important;
}
.language-toggle,
.theme-toggle,
.accessibility-toggle,
.privacy-toggle {
    background: rgba(255, 255, 255, 0.08);
    backdrop-filter: blur(12px);
    border: 1px solid rgba(255, 255, 255, 0.12);
    border-radius: 24px;
    padding: 8px 16px;
    display: flex;
    align-items: center;
    gap: 8px;
    cursor: pointer;
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    font-size: 14px;
    font-weight: 500;
    color: rgba(255, 255, 255, 0.9);
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.1);
}
.language-toggle:hover,
.theme-toggle:hover,
.accessibility-toggle:hover {
    background: rgba(255, 255, 255, 0.12);
    border-color: rgba(103, 192, 144, 0.4);
    transform: translateY(-1px);
    box-shadow: 0 6px 16px rgba(0, 0, 0, 0.15);
}
.language-toggle:active,
.theme-toggle:active,
.accessibility-toggle:active {
    transform: translateY(0);
}
.language-icon,
.theme-icon,
.accessibility-icon {
    font-size: 16px;
    transition: transform 0.3s ease;
}
.theme-toggle:hover .theme-icon {
    transform: rotate(20deg);
}
.accessibility-toggle:hover .accessibility-icon {
    transform: scale(1.1);
}
/* Active state for accessibility toggle */
.accessibility-toggle[aria-pressed="true"] {
    background: var(--color-primary);
    border-color: var(--color-primary);
}
.accessibility-toggle[aria-pressed="true"] .accessibility-icon {
    animation: pulse 2s ease-in-out infinite;
}
@keyframes pulse {
    0%, 100% { opacity: 1; }
    50% { opacity: 0.7; }
}
.language-text {
    font-weight: 600;
    letter-spacing: 0.3px;
}
/* PRIVACY PANEL - GDPR 2026 Compliant */
.privacy-panel {
    position: absolute;
    top: 70px;
    right: 24px;
    background: rgba(15, 20, 25, 0.98);
    backdrop-filter: blur(20px);
    border: 1px solid rgba(103, 192, 144, 0.3);
    border-radius: 12px;
    padding: 24px;
    max-width: 500px;
    max-height: 80vh;
    overflow-y: auto;
    box-shadow: 0 8px 32px rgba(0, 0, 0, 0.4);
    z-index: 200;
    transition: opacity 0.3s ease, transform 0.3s ease;
    font-size: 14px;
}
.privacy-panel.hidden {
    opacity: 0;
    transform: translateY(-10px);
    pointer-events: none;
    display: none;
}
body.light-mode .privacy-panel {
    background: rgba(255, 255, 255, 0.98);
    border-color: rgba(103, 192, 144, 0.4);
    color: #1f2937;
    box-shadow: 0 8px 32px rgba(0, 0, 0, 0.15);
}
.privacy-section {
    margin-bottom: 20px;
    padding-bottom: 16px;
    border-bottom: 1px solid rgba(255, 255, 255, 0.1);
}
.privacy-section:last-of-type {
    border-bottom: none;
}
body.light-mode .privacy-section {
    border-bottom-color: rgba(0, 0, 0, 0.08);
}
.privacy-section h4 {
    font-size: 16px;
    font-weight: 600;
    margin: 0 0 10px 0;
    color: #67C090;
}
body.light-mode .privacy-section h4 {
    color: #26667F;
}
.privacy-section p {
    margin: 8px 0;
    line-height: 1.6;
    color: rgba(255, 255, 255, 0.9);
}
body.light-mode .privacy-section p {
    color: #374151;
}
.privacy-list {
    margin: 8px 0;
    padding-left: 0;
    list-style: none;
}
.privacy-list li {
    padding: 6px 0;
    line-height: 1.5;
    color: rgba(255, 255, 255, 0.85);
}
body.light-mode .privacy-list li {
    color: #4b5563;
}
.privacy-footer {
    margin-top: 20px;
    padding-top: 16px;
    border-top: 1px solid rgba(255, 255, 255, 0.1);
    text-align: center;
}
body.light-mode .privacy-footer {
    border-top-color: rgba(0, 0, 0, 0.08);
}
.privacy-footer p {
    font-size: 12px;
    color: rgba(255, 255, 255, 0.6);
    margin: 0;
}
body.light-mode .privacy-footer p {
    color: #6b7280;
}
/* ACCESSIBILITY PANEL - WCAG 3.0 Compliant */
.accessibility-panel {
    position: absolute;
    top: 70px;
    right: 24px;
    background: rgba(15, 20, 25, 0.95);
    backdrop-filter: blur(20px);
    border: 1px solid rgba(255, 255, 255, 0.12);
    border-radius: 12px;
    padding: 20px;
    min-width: 300px;
    box-shadow: 0 8px 32px rgba(0, 0, 0, 0.3);
    z-index: 200;
    transition: opacity 0.3s ease, transform 0.3s ease;
    /* Keep panel at fixed size - don't scale */
    font-size: 15px;
}
.accessibility-panel.hidden {
    opacity: 0;
    transform: translateY(-10px);
    pointer-events: none;
    display: none;
}
body.light-mode .accessibility-panel {
    background: rgba(255, 255, 255, 0.98);
    border-color: rgba(0, 0, 0, 0.12);
    color: #1f2937;
    box-shadow: 0 8px 32px rgba(0, 0, 0, 0.15);
}
.panel-title {
    font-size: 18px !important;
    font-weight: 600;
    margin: 0 0 16px 0;
    color: #ffffff;
    transform: none !important;
}
body.light-mode .panel-title {
    color: #1f2937;
}
.accessibility-option {
    margin-bottom: 16px;
    padding-bottom: 16px;
    border-bottom: 1px solid rgba(255, 255, 255, 0.1);
}
.accessibility-option:last-child {
    border-bottom: none;
    margin-bottom: 0;
    padding-bottom: 0;
}
body.light-mode .accessibility-option {
    border-bottom-color: rgba(0, 0, 0, 0.1);
}
.option-label {
    display: flex;
    align-items: center;
    gap: 12px;
    cursor: pointer;
    font-size: 15px;
    color: rgba(255, 255, 255, 0.9);
}
body.light-mode .option-label {
    color: #374151;
}
.option-checkbox {
    width: 20px;
    height: 20px;
    cursor: pointer;
    accent-color: var(--color-primary);
}
.font-size-controls {
    display: flex;
    gap: 8px;
    margin-top: 8px;
}
.font-btn {
    background: rgba(255, 255, 255, 0.08);
    border: 1px solid rgba(255, 255, 255, 0.12);
    border-radius: 6px;
    padding: 8px 16px;
    color: rgba(255, 255, 255, 0.9);
    cursor: pointer;
    font-weight: 600;
    transition: all 0.2s ease;
}
.font-btn:hover {
    background: rgba(255, 255, 255, 0.12);
    border-color: var(--color-primary);
}
.font-btn:active {
    background: var(--color-primary);
    color: white;
    transform: scale(0.95);
}
body.light-mode .font-btn {
    background: #f3f4f6;
    border-color: rgba(0, 0, 0, 0.12);
    color: #374151;
}
body.light-mode .font-btn:hover {
    background: #e5e7eb;
}
body.light-mode .font-btn:active {
    background: var(--color-primary);
    color: white;
}
/* HIGH CONTRAST MODE */
body.high-contrast {
    background: #000000 !important;
    color: #ffffff !important;
}
body.high-contrast * {
    border-color: #ffffff !important;
}
body.high-contrast .upload-area {
    background: #1a1a1a !important;
    border: 2px solid #ffffff !important;
}
body.high-contrast .analyze-btn {
    background: #ffffff !important;
    color: #000000 !important;
}
/* DYSLEXIA FONT */
body.dyslexia-font {
    font-family: 'Comic Sans MS', 'Arial', sans-serif !important;
}
body.dyslexia-font * {
    font-family: 'Comic Sans MS', 'Arial', sans-serif !important;
    letter-spacing: 0.05em;
    word-spacing: 0.16em;
    line-height: 1.8;
}
/* REDUCE MOTION */
body.reduce-motion * {
    animation: none !important;
    transition: none !important;
}
/* MAIN CONTAINER */
.container {
    max-width: 560px;
    width: 100%;
    text-align: center;
    margin: auto;
    flex: 1;
    display: flex;
    flex-direction: column;
    justify-content: center;
    padding: 0 20px;
}
/* TITLE */
h1 {
    /* Hero headline — the primary call to action, so it dominates the page.
       Fluid scale from comfortable mobile up to a large desktop hero. */
    font-size: clamp(2.2rem, 6vw, 3.6rem);
    font-weight: 800;
    margin-bottom: 28px;
    color: #ffffff;
}
/* DESCRIPTION - subtle tagline below form */
.description {
    font-size: 0.85rem;
    color: rgba(255, 255, 255, 0.45);
    margin-top: 16px;
    margin-bottom: 0;
    line-height: 1.5;
}
/* SUBTITLE — directly under the heading */
.description.subtitle {
    font-size: 1rem;
    color: rgba(255, 255, 255, 0.75);
    margin-top: -16px;
    margin-bottom: 20px;
}
/* UPLOAD AREA — Hero element */
.upload-area {
    background: rgba(26, 47, 63, 0.35);
    border: 2px dashed rgba(103, 192, 144, 0.35);
    border-radius: 16px;
    padding: 44px 32px 36px;
    margin-bottom: 16px;
    cursor: pointer;
    transition: all 0.3s ease;
    position: relative;
}
.upload-area:hover {
    border-color: #67C090;
    background: rgba(103, 192, 144, 0.05);
}
/* Drag and drop active state */
.upload-area.drag-active {
    border-color: #67C090;
    background: rgba(103, 192, 144, 0.15);
    border-width: 3px;
    transform: scale(1.02);
    box-shadow: 0 8px 24px rgba(103, 192, 144, 0.3);
}
/* File selected feedback */
.file-selected {
    color: #67C090;
    font-weight: 600;
    font-size: 1.125rem;
}
body.light-mode .file-selected {
    color: #67C090;
}
.upload-icon {
    width: 90px;
    height: 90px;
    margin: 0 auto 20px;
    position: relative;
    opacity: 0.9;
}
.upload-icon svg {
    width: 100%;
    height: 100%;
}
.upload-text {
    font-size: 1.2rem;
    color: #ffffff;
    margin-bottom: 8px;
}
.upload-text .highlight {
    color: #67C090;
    text-decoration: underline;
    cursor: pointer;
}
.upload-formats {
    font-size: 0.8rem;
    color: rgba(255, 255, 255, 0.4);
    letter-spacing: 0.3px;
}
/* FILE INPUT */
#fileInput {
    position: absolute;
    width: 100%;
    height: 100%;
    top: 0;
    left: 0;
    opacity: 0;
    cursor: pointer;
}
/* CHECKBOX - compact row */
.consent-wrapper {
    display: flex;
    align-items: flex-start;
    gap: 10px;
    margin-bottom: 10px;
    text-align: left;
}
.consent-row {
    display: flex;
    align-items: center;
    gap: 10px;
    margin-bottom: 14px;
    text-align: left;
}
.consent-checkbox {
    width: 18px;
    height: 18px;
    min-width: 18px;
    margin-top: 0;
    cursor: pointer;
    accent-color: #67C090;
}
.consent-text {
    font-size: 0.82rem;
    color: rgba(255, 255, 255, 0.6);
    line-height: 1.4;
}
/* BUTTON */
.analyze-btn {
    width: 100%;
    background: linear-gradient(135deg, #67C090 0%, #5ab080 100%);
    color: white;
    border: none;
    padding: 16px 32px;
    border-radius: 10px;
    font-size: 1.1rem;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.3s ease;
    appearance: none;
    -webkit-appearance: none;
    -moz-appearance: none;
}
.analyze-btn::after,
.analyze-btn::before {
    content: none;
    display: none;
}
.analyze-btn:hover {
    transform: translateY(-2px);
    box-shadow: 0 8px 24px rgba(103, 192, 144, 0.3);
}
.analyze-btn:disabled {
    opacity: 0.5;
    cursor: not-allowed;
    transform: none;
}
/* Hide default submit button text in some browsers */
.analyze-btn::after {
    content: none;
}
/* ============================================
   LOADING STATE — scanning animation
   ============================================ */
.loading-state {
    text-align: center;
    padding: 40px 20px;
    animation: fadeSlideIn 0.4s ease;
}
.scanning-animation {
    position: relative;
    width: 100px;
    height: 100px;
    margin: 0 auto 24px;
}
.scan-ring {
    position: absolute;
    inset: 0;
    border: 3px solid rgba(103, 192, 144, 0.15);
    border-top-color: #67C090;
    border-radius: 50%;
    animation: spin 1s linear infinite;
}
.scan-icon {
    position: absolute;
    inset: 0;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 40px;
    animation: pulse 2s ease-in-out infinite;
}
.scanning-text {
    font-size: 1.1rem;
    font-weight: 500;
    color: rgba(255, 255, 255, 0.8);
    margin-bottom: 16px;
    letter-spacing: 0.5px;
}
body.light-mode .scanning-text {
    color: rgba(31, 41, 55, 0.7);
}
.scan-progress {
    width: 200px;
    height: 3px;
    background: rgba(103, 192, 144, 0.15);
    border-radius: 3px;
    margin: 0 auto;
    overflow: hidden;
}
.scan-progress-bar {
    height: 100%;
    width: 0%;
    background: linear-gradient(90deg, #67C090, #5ab080, #67C090);
    border-radius: 3px;
    animation: progressSweep 1.2s ease-in-out infinite;
}
/* ============================================
   RESULT CARD — professional display
   ============================================ */
.result-container {
    animation: fadeSlideIn 0.5s cubic-bezier(0.16, 1, 0.3, 1);
}
.result-card {
    text-align: center;
    padding: 36px 28px 28px;
    border-radius: 16px;
    position: relative;
    overflow: hidden;
}
.result-card::before {
    content: '';
    position: absolute;
    inset: 0;
    opacity: 0.07;
    pointer-events: none;
}
.result-card.safe {
    background: linear-gradient(135deg, rgba(46, 125, 50, 0.12) 0%, rgba(103, 192, 144, 0.08) 100%);
    border: 1px solid rgba(103, 192, 144, 0.25);
}
.result-card.safe::before {
    background: radial-gradient(circle at 50% 0%, #67C090, transparent 70%);
}
.result-card.danger {
    background: linear-gradient(135deg, rgba(198, 40, 40, 0.12) 0%, rgba(229, 115, 115, 0.08) 100%);
    border: 1px solid rgba(198, 40, 40, 0.25);
}
.result-card.danger::before {
    background: radial-gradient(circle at 50% 0%, #c62828, transparent 70%);
}
.result-card.warning {
    background: linear-gradient(135deg, rgba(245, 127, 23, 0.12) 0%, rgba(255, 183, 77, 0.08) 100%);
    border: 1px solid rgba(245, 127, 23, 0.25);
}
.result-card.warning::before {
    background: radial-gradient(circle at 50% 0%, #f57f17, transparent 70%);
}
body.light-mode .result-card.safe {
    background: linear-gradient(135deg, rgba(46, 125, 50, 0.06) 0%, rgba(200, 230, 201, 0.3) 100%);
    border-color: rgba(76, 175, 80, 0.3);
}
body.light-mode .result-card.danger {
    background: linear-gradient(135deg, rgba(198, 40, 40, 0.06) 0%, rgba(255, 205, 210, 0.3) 100%);
    border-color: rgba(198, 40, 40, 0.3);
}
body.light-mode .result-card.warning {
    background: linear-gradient(135deg, rgba(245, 127, 23, 0.06) 0%, rgba(255, 224, 178, 0.3) 100%);
    border-color: rgba(245, 127, 23, 0.3);
}
/* ============================================
   TRAFFIC LIGHT — verdict indicator (green/yellow/red)
   Apple/Google inspired: system colors, soft glow, accessible
   (colour is never the only cue — verdict text + aria-label back it up).
   ============================================ */
.traffic-light {
    display: inline-flex;
    flex-direction: column;
    align-items: center;
    gap: 11px;
    padding: 14px 13px;
    margin: 0 auto 20px;
    border-radius: 999px;
    background: linear-gradient(180deg, #2b3038 0%, #16191d 100%);
    box-shadow: inset 0 2px 5px rgba(0, 0, 0, 0.55),
                0 8px 22px rgba(0, 0, 0, 0.35);
    animation: scaleIn 0.45s cubic-bezier(0.34, 1.56, 0.64, 1) both;
}
.tl-lamp {
    width: 24px;
    height: 24px;
    border-radius: 50%;
    opacity: 0.28;
    box-shadow: inset 0 1px 3px rgba(0, 0, 0, 0.7);
    transition: opacity 0.4s ease, box-shadow 0.4s ease, background 0.4s ease;
}
/* Dim resting tints so the housing reads as a real traffic light */
.tl-red    { background: #5a2725; }
.tl-yellow { background: #5a4d1e; }
.tl-green  { background: #234f32; }
/* Lit lamp — bright system colour with a soft outer glow */
.traffic-light.active-red .tl-red {
    opacity: 1;
    background: #ff3b30;
    box-shadow: 0 0 12px 2px rgba(255, 59, 48, 0.75),
                0 0 26px 7px rgba(255, 59, 48, 0.35),
                inset 0 0 5px rgba(255, 255, 255, 0.45);
}
.traffic-light.active-yellow .tl-yellow {
    opacity: 1;
    background: #ffcc00;
    box-shadow: 0 0 12px 2px rgba(255, 204, 0, 0.75),
                0 0 26px 7px rgba(255, 204, 0, 0.35),
                inset 0 0 5px rgba(255, 255, 255, 0.5);
}
.traffic-light.active-green .tl-green {
    opacity: 1;
    background: #34c759;
    box-shadow: 0 0 12px 2px rgba(52, 199, 89, 0.75),
                0 0 26px 7px rgba(52, 199, 89, 0.35),
                inset 0 0 5px rgba(255, 255, 255, 0.45);
}
/* Gentle breathing glow on the active lamp (motion-safe) */
@media (prefers-reduced-motion: no-preference) {
    .traffic-light.active-red .tl-red,
    .traffic-light.active-yellow .tl-yellow,
    .traffic-light.active-green .tl-green {
        animation: lampPulse 2.4s ease-in-out infinite;
    }
}
@keyframes lampPulse {
    0%, 100% { filter: brightness(1); }
    50%      { filter: brightness(1.18); }
}
.result-icon {
    font-size: 52px;
    margin-bottom: 12px;
    animation: scaleIn 0.4s cubic-bezier(0.34, 1.56, 0.64, 1) 0.15s both;
}
/* Traffic light is the hero visual; hide the emoji slot when empty */
.result-icon:empty { display: none; }
.result-verdict {
    font-size: 1.6rem;
    font-weight: 800;
    letter-spacing: 2px;
    text-transform: uppercase;
    margin-bottom: 12px;
    animation: fadeSlideIn 0.4s ease 0.25s both;
}
.result-card.safe .result-verdict { color: #67C090; }
.result-card.danger .result-verdict { color: #e57373; }
.result-card.warning .result-verdict { color: #ffb74d; }
body.light-mode .result-card.safe .result-verdict { color: #2e7d32; }
body.light-mode .result-card.danger .result-verdict { color: #c62828; }
body.light-mode .result-card.warning .result-verdict { color: #e65100; }
.result-message {
    font-size: 1rem;
    line-height: 1.6;
    color: rgba(255, 255, 255, 0.85);
    max-width: 420px;
    margin: 0 auto 16px;
    animation: fadeSlideIn 0.4s ease 0.35s both;
}
body.light-mode .result-message {
    color: rgba(31, 41, 55, 0.85);
}
.result-meta {
    display: flex;
    justify-content: center;
    gap: 20px;
    flex-wrap: wrap;
    font-size: 0.75rem;
    color: rgba(255, 255, 255, 0.4);
    animation: fadeSlideIn 0.4s ease 0.45s both;
}
body.light-mode .result-meta {
    color: rgba(31, 41, 55, 0.4);
}
.result-meta-item {
    display: flex;
    align-items: center;
    gap: 4px;
}
/* Scan Again Button */
.scan-again-btn {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    margin: 20px auto 0;
    padding: 12px 28px;
    background: transparent;
    border: 1px solid rgba(103, 192, 144, 0.3);
    border-radius: 10px;
    color: #67C090;
    font-size: 0.95rem;
    font-weight: 500;
    cursor: pointer;
    transition: all 0.25s ease;
    animation: fadeSlideIn 0.4s ease 0.55s both;
}
.scan-again-btn:hover {
    background: rgba(103, 192, 144, 0.1);
    border-color: #67C090;
    transform: translateY(-1px);
}
.scan-again-icon {
    font-size: 1.1rem;
    transition: transform 0.3s ease;
}
.scan-again-btn:hover .scan-again-icon {
    transform: rotate(180deg);
}
body.light-mode .scan-again-btn {
    border-color: rgba(38, 102, 127, 0.3);
    color: #26667F;
}
body.light-mode .scan-again-btn:hover {
    background: rgba(38, 102, 127, 0.08);
    border-color: #26667F;
}
/* Fade out animation for upload form */
.fade-out {
    animation: fadeOut 0.3s ease forwards;
}
/* ============================================
   KEYFRAMES
   ============================================ */
@keyframes spin {
    to { transform: rotate(360deg); }
}
@keyframes pulse {
    0%, 100% { transform: scale(1); }
    50% { transform: scale(1.08); }
}
@keyframes progressSweep {
    0% { width: 0%; margin-left: 0; }
    50% { width: 60%; margin-left: 20%; }
    100% { width: 0%; margin-left: 100%; }
}
@keyframes fadeSlideIn {
    from { opacity: 0; transform: translateY(12px); }
    to { opacity: 1; transform: translateY(0); }
}
@keyframes scaleIn {
    from { opacity: 0; transform: scale(0.5); }
    to { opacity: 1; transform: scale(1); }
}
@keyframes fadeOut {
    from { opacity: 1; transform: translateY(0); }
    to { opacity: 0; transform: translateY(-8px); }
}
/* HIDDEN ELEMENTS */
.hidden {
    display: none !important;
}
/* ACCESSIBILITY */
.sr-only {
    position: absolute;
    width: 1px;
    height: 1px;
    padding: 0;
    margin: -1px;
    overflow: hidden;
    clip: rect(0, 0, 0, 0);
    border: 0;
}
*:focus-visible {
    outline: 2px solid #67C090;
    outline-offset: 2px;
}
/* COPYRIGHT FOOTER */
.copyright-footer {
    margin-top: auto;
    padding: 6px 16px;
    text-align: center;
    border-top: 1px solid rgba(255, 255, 255, 0.1);
    background: rgba(0, 0, 0, 0.2);
    flex-shrink: 0;
}
body.light-mode .copyright-footer {
    border-top: 1px solid rgba(0, 0, 0, 0.1);
    background: rgba(255, 255, 255, 0.3);
}
.copyright-content {
    max-width: 800px;
    margin: 0 auto;
}
.copyright-text {
    font-size: 0.85rem;
    color: rgba(255, 255, 255, 0.8);
    margin-bottom: 2px;
    line-height: 1.4;
}
body.light-mode .copyright-text {
    color: rgba(31, 41, 55, 0.8);
}
.copyright-link {
    color: #67C090;
    text-decoration: none;
    font-weight: 600;
    transition: color 0.3s ease;
}
.copyright-link:hover {
    color: #5ab080;
    text-decoration: underline;
}
body.light-mode .copyright-link {
    color: #26667F;
}
body.light-mode .copyright-link:hover {
    color: #124170;
}
.copyright-subtext {
    font-size: 0.8rem;
    color: rgba(255, 255, 255, 0.6);
    margin-top: 1px;
}
body.light-mode .copyright-subtext {
    color: rgba(31, 41, 55, 0.6);
}
.beta-label {
    font-size: 0.75rem;
    font-weight: 700;
    letter-spacing: 1px;
    color: #f59e0b;
    border: 1px solid rgba(245, 158, 11, 0.4);
    padding: 2px 8px;
    border-radius: 4px;
    text-transform: uppercase;
}
body.light-mode .beta-label {
    color: #b45309;
    border-color: rgba(180, 83, 9, 0.4);
}
.footer-contact {
    margin-top: 2px;
    padding-top: 0;
    border-top: none;
    font-size: 0.7rem;
    color: rgba(255, 255, 255, 0.5);
}
body.light-mode .footer-contact {
    border-top-color: rgba(0, 0, 0, 0.08);
    color: rgba(31, 41, 55, 0.5);
}
/* SUBPAGE CONTENT (privacy, phishing-guide, email-security) */
.subpage-content {
    max-width: 800px;
    margin: 40px auto 20px;
    padding: 0 24px;
    color: rgba(255, 255, 255, 0.85);
    line-height: 1.5;
}
.subpage-content h1 {
    font-size: 1.75rem;
    font-weight: 700;
    color: rgba(255, 255, 255, 0.95);
    margin-bottom: 0.5rem;
}
.subpage-content h2 {
    font-size: 1.05rem;
    font-weight: 600;
    color: #67C090;
    margin-top: 0.8rem;
    margin-bottom: 0.3rem;
}
.subpage-content p {
    color: rgba(255, 255, 255, 0.7);
    margin-bottom: 0.4rem;
    font-size: 0.875rem;
}
.subpage-content ul {
    color: rgba(255, 255, 255, 0.7);
    padding-left: 1.25rem;
    margin-bottom: 1rem;
}
.subpage-content li {
    margin-bottom: 0.4rem;
}
body.light-mode .subpage-content {
    color: rgba(31, 41, 55, 0.85);
}
body.light-mode .subpage-content h1 {
    color: rgba(31, 41, 55, 0.95);
}
body.light-mode .subpage-content h2 {
    color: #26667F;
}
body.light-mode .subpage-content p,
body.light-mode .subpage-content ul {
    color: rgba(31, 41, 55, 0.7);
}
/* FAQ SECTION (GEO-optimized) */
.faq-section {
    max-width: 700px;
    margin: 40px auto 0;
    padding: 0 20px;
}
.faq-title {
    font-size: 1.25rem;
    font-weight: 700;
    color: rgba(255, 255, 255, 0.9);
    margin-bottom: 16px;
    text-align: center;
}
body.light-mode .faq-title {
    color: rgba(31, 41, 55, 0.9);
}
.faq-item {
    border-bottom: 1px solid rgba(255, 255, 255, 0.08);
    padding: 0;
}
body.light-mode .faq-item {
    border-bottom-color: rgba(0, 0, 0, 0.08);
}
.faq-question {
    padding: 14px 0;
    font-size: 0.9375rem;
    font-weight: 600;
    color: rgba(255, 255, 255, 0.85);
    cursor: pointer;
    list-style: none;
    display: flex;
    justify-content: space-between;
    align-items: center;
}
.faq-question::-webkit-details-marker {
    display: none;
}
.faq-question::after {
    content: "+";
    font-size: 1.25rem;
    font-weight: 300;
    color: #67C090;
    transition: transform 0.2s ease;
    flex-shrink: 0;
    margin-left: 12px;
}
details[open] .faq-question::after {
    content: "−";
}
body.light-mode .faq-question {
    color: rgba(31, 41, 55, 0.85);
}
.faq-answer {
    font-size: 0.875rem;
    line-height: 1.7;
    color: rgba(255, 255, 255, 0.6);
    padding: 0 0 14px;
    margin: 0;
}
body.light-mode .faq-answer {
    color: rgba(31, 41, 55, 0.6);
}
/* FOOTER NAV */
.footer-nav {
    display: flex;
    justify-content: center;
    gap: 16px;
    margin-bottom: 4px;
    flex-wrap: wrap;
}
.footer-link {
    font-size: 0.8rem;
    color: rgba(255, 255, 255, 0.5);
    text-decoration: none;
    transition: color 0.2s ease;
}
.footer-link:hover {
    color: #67C090;
}
body.light-mode .footer-link {
    color: rgba(31, 41, 55, 0.5);
}
body.light-mode .footer-link:hover {
    color: #26667F;
}
/* RESPONSIVE */
@media (max-width: 768px) {
    body {
        padding: 8px 12px;
    }
    h1 {
        font-size: clamp(1.8rem, 7.5vw, 2.4rem);
        margin-bottom: 12px;
    }
    .logo-container {
        top: 10px;
        left: 12px;
    }
    .logo {
        font-size: 20px;
    }
    .beta-badge {
        font-size: 0.5rem;
        padding: 2px 5px;
    }
    .top-controls {
        top: 10px;
        right: 12px;
        gap: 4px;
    }
    .privacy-toggle .privacy-text {
        display: none;
    }
    .language-toggle,
    .theme-toggle,
    .accessibility-toggle,
    .privacy-toggle {
        padding: 6px 10px;
        font-size: 12px;
    }
    .language-text {
        display: none;
    }
    .container {
        padding-top: 40px;
    }
    .description {
        font-size: 0.8rem;
        margin-bottom: 8px;
    }
    .upload-area {
        padding: 16px 16px;
    }
    .upload-icon {
        width: 36px;
        height: 36px;
        margin-bottom: 8px;
    }
    .upload-text {
        font-size: 0.9rem;
        margin-bottom: 4px;
    }
    .upload-formats {
        font-size: 0.75rem;
    }
    .consent-wrapper {
        margin-bottom: 8px;
        gap: 8px;
    }
    .consent-text {
        font-size: 0.78rem;
    }
    .analyze-btn {
        padding: 10px 20px;
        font-size: 0.9rem;
    }
    .copyright-footer {
        padding: 4px 10px;
    }
    .copyright-text {
        font-size: 0.7rem;
    }
    .copyright-subtext {
        font-size: 0.65rem;
    }
    .footer-contact {
        font-size: 0.6rem;
    }
    .footer-nav {
        gap: 10px;
        margin-bottom: 2px;
    }
    .footer-link {
        font-size: 0.65rem;
    }
}
@media (max-height: 700px) {
    .upload-area {
        padding: 12px 16px;
    }
    .upload-icon {
        width: 30px;
        height: 30px;
        margin-bottom: 6px;
    }
    h1 {
        font-size: clamp(1.9rem, 4.5vw, 2.4rem);
        margin-bottom: 10px;
    }
    .description {
        font-size: 0.8rem;
        margin-bottom: 6px;
    }
    .consent-text {
        font-size: 0.75rem;
    }
    .copyright-footer {
        padding: 3px 10px;
    }
}
/* ============================================================
   Elegance refinements (2026-08) — additive polish layer.
   Reuses existing selectors; remove this whole block to revert.
   Goals: tighter premium headline, softer depth on hover,
   clear keyboard focus, and reduced-motion safety.
   ============================================================ */
h1 {
    letter-spacing: -0.02em;
    line-height: 1.12;
}
.analyze-btn {
    letter-spacing: 0.01em;
    box-shadow: 0 4px 14px rgba(103, 192, 144, 0.18);
    transition: transform 0.25s cubic-bezier(0.2, 0.7, 0.3, 1),
                box-shadow 0.25s ease, opacity 0.2s ease;
}
.analyze-btn:active:not(:disabled) {
    transform: translateY(0);
    box-shadow: 0 3px 10px rgba(103, 192, 144, 0.28);
}
.upload-area {
    transition: border-color 0.3s ease, background 0.3s ease,
                box-shadow 0.3s ease;
}
.upload-area:hover {
    background: rgba(26, 47, 63, 0.5);
    box-shadow: 0 12px 32px rgba(0, 0, 0, 0.20);
}
/* Visible keyboard focus (accessibility + perceived polish) */
.analyze-btn:focus-visible,
.upload-area:focus-within {
    outline: 2px solid #67C090;
    outline-offset: 3px;
}
@media (prefers-reduced-motion: reduce) {
    .analyze-btn,
    .upload-area {
        transition: none;
    }
    .analyze-btn:hover,
    .analyze-btn:active {
        transform: none;
    }
}
/* ============================================================
   Smooth dark ⇄ light cross-fade (2026-08).
   CSS cannot transition between two gradients, so the old
   `transition: background 0.6s` on <body> did nothing — the
   background snapped while text faded, which felt harsh.
   Fix: layer BOTH theme gradients as fixed pseudo-elements and
   cross-fade their opacity. Transitions are armed only while a
   toggle is happening (html.theme-anim, added by JS for ~650ms),
   so the saved theme still applies instantly on first paint.
   ============================================================ */
html { background: #0f1a24; }                 /* solid base beneath the layers */
body,
body.light-mode { background: transparent !important; }
body::before,
body::after {
    content: "";
    position: fixed;
    inset: 0;
    z-index: -2;
    pointer-events: none;
}
body::before {                                 /* dark layer — always visible */
    background: linear-gradient(135deg, #1a2f3f 0%, #0f1a24 100%);
}
body::after {                                  /* light layer — fades in */
    z-index: -1;
    background: linear-gradient(135deg, #e0e4e8 0%, #d1d5db 100%);
    opacity: 0;
}
body.light-mode::after { opacity: 1; }
/* Arm the cross-fade + colour transitions only during an actual toggle. */
html.theme-anim body::after {
    transition: opacity 0.55s cubic-bezier(0.4, 0, 0.2, 1);
}
html.theme-anim,
html.theme-anim * {
    transition: background-color 0.5s cubic-bezier(0.4, 0, 0.2, 1),
                color 0.5s cubic-bezier(0.4, 0, 0.2, 1),
                border-color 0.5s cubic-bezier(0.4, 0, 0.2, 1),
                box-shadow 0.5s cubic-bezier(0.4, 0, 0.2, 1) !important;
}
@media (prefers-reduced-motion: reduce) {
    html.theme-anim,
    html.theme-anim *,
    html.theme-anim body::after {
        transition: none !important;
    }
}
/* ===== Header-meny: tydelige etiketter + hamburger på mobil (universell utforming) ===== */
.menu-toggle {
  display: none;
  align-items: center;
  gap: 6px;
  padding: 8px 14px;
  border-radius: 10px;
  border: 1px solid rgba(255,255,255,0.16);
  background: rgba(255,255,255,0.06);
  color: inherit;
  font-size: 14px;
  cursor: pointer;
}
.controls-group { display: flex; gap: 8px; align-items: center; }
@media (max-width: 768px) {
  .menu-toggle { display: inline-flex; }
  .controls-group { display: none; }
  #topControls.open .controls-group {
    display: flex;
    flex-direction: column;
    align-items: stretch;
    position: absolute;
    top: 100%;
    right: 0;
    margin-top: 8px;
    background: #16202e;
    border: 1px solid rgba(255,255,255,0.14);
    border-radius: 12px;
    padding: 8px;
    min-width: 220px;
    box-shadow: 0 10px 28px rgba(0,0,0,0.45);
    z-index: 1000;
  }
  #topControls.open .controls-group > button {
    justify-content: flex-start;
    width: 100%;
    gap: 12px;
    padding: 13px 14px;
    font-size: 15px;
    border-radius: 8px;
  }
  #topControls.open .privacy-text,
  #topControls.open .language-text { display: inline !important; }
  body.light-mode #topControls.open .controls-group {
    background: #ffffff;
    border-color: rgba(0,0,0,0.12);
    box-shadow: 0 10px 28px rgba(0,0,0,0.18);
  }
}
/* Meny (hamburger) også på desktop — samme som mobil */
.menu-toggle { display: inline-flex !important; }
.controls-group { display: none !important; }
#topControls.open .controls-group {
  display: flex !important; flex-direction: column; align-items: stretch;
  position: absolute; top: 100%; right: 0; margin-top: 8px;
  background: #16202e; border: 1px solid rgba(255,255,255,0.14);
  border-radius: 12px; padding: 8px; min-width: 230px;
  box-shadow: 0 10px 28px rgba(0,0,0,0.45); z-index: 1000;
}
#topControls.open .controls-group > button {
  justify-content: flex-start; width: 100%; gap: 12px; padding: 13px 14px; font-size: 15px; border-radius: 8px;
}
#topControls.open .privacy-text, #topControls.open .language-text { display: inline !important; }
body.light-mode #topControls.open .controls-group { background:#fff; border-color:rgba(0,0,0,0.12); box-shadow:0 10px 28px rgba(0,0,0,0.18); }
/* 👍/👎 tilbakemelding */
.feedback-box { display:flex; align-items:center; justify-content:center; gap:10px; margin-top:14px; flex-wrap:wrap; }
.feedback-q { font-size:0.9rem; opacity:0.8; }
.feedback-btn { font-size:1.3rem; line-height:1; background:rgba(255,255,255,0.08); border:1px solid rgba(255,255,255,0.15); border-radius:10px; padding:6px 12px; cursor:pointer; transition:transform .12s ease, background .2s ease; }
.feedback-btn:hover { background:rgba(255,255,255,0.16); transform:scale(1.1); }
.feedback-thanks { font-size:0.9rem; font-weight:600; color:#67C090; }
body.light-mode .feedback-btn { background:rgba(0,0,0,0.05); border-color:rgba(0,0,0,0.12); }
/* Type + rotårsak under svaret */
.result-details { margin-top:10px; font-size:0.88rem; line-height:1.5; text-align:left; display:inline-block; opacity:0.92; }
.result-details .rd-row { margin:2px 0; }
.result-details .rd-label { font-weight:700; opacity:0.72; margin-right:5px; }
/* "Hva gjør jeg nå?" — concrete next steps, only under red/yellow verdicts */
.result-actions {
    margin: 18px auto 4px;
    max-width: 460px;
    text-align: left;
    background: rgba(255, 255, 255, 0.05);
    border: 1px solid rgba(255, 255, 255, 0.12);
    border-radius: 12px;
    padding: 14px 16px 14px 18px;
}
.result-actions .ra-title { margin: 0 0 8px; font-size: 0.98rem; font-weight: 700; }
.result-actions .ra-list { margin: 0; padding-left: 20px; font-size: 0.92rem; line-height: 1.55; color: rgba(255, 255, 255, 0.9); }
.result-actions .ra-list li { margin: 5px 0; }
body.light-mode .result-actions { background: rgba(0, 0, 0, 0.035); border-color: rgba(0, 0, 0, 0.12); }
body.light-mode .result-actions .ra-list { color: rgba(31, 41, 55, 0.92); }
/* Skip link (WCAG 2.4.1) — visible only on keyboard focus */
.skip-link { position: absolute; left: -9999px; top: 0; z-index: 1000; background: #67C090;
    color: #0f1729; padding: 10px 16px; border-radius: 0 0 8px 0; font-weight: 700; text-decoration: none; }
.skip-link:focus { left: 0; }
/* Upload help (#24) — collapsible, keeps the upload area clean */
.upload-help { margin: 10px auto 0; max-width: 460px; text-align: left; font-size: 0.9rem; }
.upload-help summary { cursor: pointer; font-weight: 600; opacity: 0.85; padding: 6px 0; }
.upload-help .upload-help-list { margin: 6px 0 0; padding-left: 20px; line-height: 1.55; opacity: 0.9; }
.upload-help .upload-help-list li { margin: 5px 0; }
/* "Advar noen du kjenner" (#25) */
.warn-friend-btn { margin-top: 12px; background: rgba(255, 255, 255, 0.08); border: 1px solid rgba(255, 255, 255, 0.18);
    color: inherit; border-radius: 10px; padding: 9px 16px; font-size: 0.95rem; cursor: pointer;
    transition: background 0.2s ease, transform 0.12s ease; }
.warn-friend-btn:hover { background: rgba(255, 255, 255, 0.16); transform: translateY(-1px); }
body.light-mode .warn-friend-btn { background: rgba(0, 0, 0, 0.05); border-color: rgba(0, 0, 0, 0.14); }
/* ============================================================
   #28 — LANDING FITS ONE SCREEN (like Google's front page).
   The resting page (logo, headline, upload, button, footer) must
   never need a scrollbar on common screens. On very small/low
   screens we only tighten spacing and type — nothing is hidden,
   and body keeps overflow-y:auto so scrolling still works for
   zoom (WCAG 1.4.4 / 1.4.10) and tiny devices.
   Locked by tests/test_layout.py (run before every deploy).
   ============================================================ */
@media (max-height: 700px), (max-width: 380px) {
    body { padding: 6px 12px; }
    h1 { font-size: clamp(1.6rem, 7.5vw, 2.4rem); margin-bottom: 14px; }
    .upload-help { margin-top: 6px; font-size: 0.82rem; }
    .upload-help summary { padding: 3px 0; }
    .consent-row { margin: 6px 0; }
    .description { font-size: 0.78rem; margin-top: 8px; }
    .description.subtitle { font-size: 0.85rem; margin-top: -8px; margin-bottom: 10px; }
    .copyright-footer { padding: 4px 10px; }
    .footer-nav { gap: 6px 12px; margin-bottom: 2px; }
    .footer-link { font-size: 0.75rem; }
    .copyright-text { font-size: 0.74rem; margin-bottom: 0; line-height: 1.3; }
    .copyright-subtext { font-size: 0.72rem; margin-top: 0; }
}
@media (max-height: 560px) {
    .upload-icon { display: none; }
    h1 { margin-bottom: 8px; }
}
.improve-note { font-size:0.85rem; opacity:0.8; text-align:center; margin:12px auto 0; max-width:36rem; line-height:1.4; }
.submit-box { display:flex; flex-direction:column; align-items:stretch; gap:10px; margin:16px auto 0; max-width:34rem; text-align:left;
  border:2px solid #67C090; border-radius:14px; padding:14px 16px; background:rgba(103,192,144,0.10); }
.submit-title { margin:0; font-weight:700; font-size:1rem; text-align:center; }
.submit-consent { font-size:0.9rem; line-height:1.45; display:flex; gap:10px; align-items:flex-start; cursor:pointer; }
.submit-consent input { margin-top:2px; width:22px; height:22px; flex:0 0 auto; accent-color:#67C090; cursor:pointer; }
.submit-btn { min-height:48px; padding:12px 20px; border-radius:12px; border:2px solid #67C090; background:#67C090; color:#0b1a12;
  font-size:1rem; font-weight:700; cursor:pointer; width:100%; }
.submit-btn:hover:not(:disabled) { filter:brightness(1.08); }
.submit-btn:focus-visible { outline:3px solid #ffffff; outline-offset:2px; }
.submit-btn:disabled { background:transparent; color:inherit; border-style:dashed; opacity:1; cursor:not-allowed; font-weight:600; }

/* ===== Simple result view: one column, fits one laptop screen (2026-10-04) ===== */
[hidden] { display:none !important; }
.result-meta { margin-top: 4px; font-size: 0.78rem; }
.result-card { padding: 20px 22px 16px; }
.result-card .traffic-light { zoom: 0.7; margin-bottom: 6px; }
.result-verdict { margin-bottom: 4px; }
.result-details { margin-top: 6px; }
.result-actions { margin: 12px auto 2px; padding: 10px 14px 10px 16px; }
.result-actions .ra-title { margin-bottom: 4px; font-size: 0.95rem; }
.result-actions .ra-list { font-size: 0.9rem; line-height: 1.45; }
.feedback-box { margin-top: 10px; }
.submit-box { margin: 12px auto 0; padding: 10px 14px; gap: 8px; max-width: 460px; }
.submit-consent { font-size: 0.85rem; }
.submit-btn { min-height: 42px; padding: 8px 16px; }
.improve-note { font-size: 0.8rem; margin: 8px auto 0; opacity: 0.7; }
.warn-friend-btn { margin-top: 8px; }
.result-container .scan-again-btn { margin-top: 12px; }
@media (max-height: 760px) { .result-card .traffic-light { zoom: 0.6; } }
.container:has(#resultContainer:not(.hidden)) { max-width: 640px; }
.result-buttons { display:flex; justify-content:center; align-items:center; gap:10px; flex-wrap:wrap; margin-top:12px; }
.result-buttons .warn-friend-btn, .result-buttons .scan-again-btn { margin:0; }
@media (max-height: 800px) { .result-card .traffic-light { zoom: 0.5; } .result-card { padding-top: 14px; padding-bottom: 12px; } .result-actions { margin-top: 8px; } .submit-box { margin-top: 8px; padding: 8px 12px; gap: 6px; } .feedback-box { margin-top: 6px; } .result-buttons { margin-top: 8px; } }
@media (max-height: 800px) { .submit-consent { font-size: 0.8rem; line-height: 1.35; } .result-card { padding-bottom: 10px; } }
/* Result view: compact footer so the page does not scroll (2026-10-04) */
body:has(#resultContainer:not(.hidden)) .copyright-subtext { display:none; }
body:has(#resultContainer:not(.hidden)) .copyright-footer { padding-top: 6px; padding-bottom: 6px; }
@media (max-height: 740px) { body:has(#resultContainer:not(.hidden)) .copyright-footer { display:none; } }

/* ===== Submit as dialog + compact mobile result (2026-10-04) ===== */
.fb-row { display:flex; justify-content:center; align-items:center; gap:10px; flex-wrap:wrap; margin-top:10px; }
.fb-row .feedback-box { margin-top:0; }
.submit-open-btn { min-height:40px; padding:8px 16px; border-radius:10px; border:2px solid #67C090; background:#67C090; color:#0b1a12; font-weight:700; font-size:0.92rem; cursor:pointer; }
.submit-open-btn:disabled { background:transparent; color:#67C090; cursor:default; }
.submit-modal { position:fixed; inset:0; z-index:1000; display:flex; align-items:center; justify-content:center; padding:16px; background:rgba(0,0,0,0.6); }
.submit-modal .submit-box { margin:0; max-width:420px; width:100%; background:#1b2229; box-shadow:0 12px 40px rgba(0,0,0,0.5); }
body.light-mode .submit-modal .submit-box { background:#ffffff; }
.submit-cancel { background:transparent; border:none; color:inherit; opacity:0.75; text-decoration:underline; cursor:pointer; font-size:0.9rem; padding:6px; }
@media (max-width: 600px) {
  .result-card { padding: 12px 14px 10px; }
  .result-card .traffic-light { zoom: 0.42; margin-bottom: 2px; }
  .result-verdict { font-size: 1.5rem; margin-bottom: 2px; }
  .result-message { font-size: 0.88rem; line-height: 1.35; }
  .result-details { margin-top: 4px; font-size: 0.78rem; }
  .result-actions { margin: 8px auto 2px; padding: 8px 10px 8px 12px; }
  .result-actions .ra-title { font-size: 0.85rem; margin-bottom: 2px; }
  .result-actions .ra-list { font-size: 0.8rem; line-height: 1.35; padding-left: 16px; }
  .result-meta { font-size: 0.7rem; margin-top: 2px; }
  .fb-row { margin-top: 6px; gap: 8px; }
  .feedback-box { gap: 6px; }
  .feedback-q { font-size: 0.8rem; }
  .feedback-btn { padding: 4px 10px; font-size: 1rem; }
  .submit-open-btn { min-height: 36px; padding: 6px 12px; font-size: 0.82rem; }
  .improve-note { font-size: 0.7rem; margin-top: 4px; }
  .result-buttons { margin-top: 6px; gap: 8px; }
  .result-buttons .warn-friend-btn, .result-buttons .scan-again-btn { padding: 7px 12px; font-size: 0.85rem; }
  body:has(#resultContainer:not(.hidden)) .copyright-footer { display:none; }
}
@media (max-width: 600px) and (max-height: 640px) {
  .improve-note { display:none; }
  .result-card .traffic-light { zoom: 0.36; }
}
@media (max-width: 600px) {
  .result-message { margin-bottom: 4px; }
  .result-verdict { font-size: 1.35rem; }
  .result-buttons { gap: 6px; flex-wrap: nowrap; }
  .result-buttons .warn-friend-btn, .result-buttons .scan-again-btn { padding: 6px 9px; font-size: 0.78rem; white-space: nowrap; }
  .result-actions { margin-top: 6px; }
}

/* ===== Warning on every result, strongest on green (2026-10-10) ===== */
.result-note { font-size: 0.85rem; line-height: 1.4; max-width: 440px; margin: 8px auto 0; opacity: 0.8; }
.result-note.result-note-strong { opacity: 1; font-weight: 600; text-align: left; padding: 8px 12px; border-radius: 10px;
  border: 2px solid #f0b429; background: rgba(240, 180, 41, 0.12); }
body.light-mode .result-note.result-note-strong { border-color: #b7791f; background: rgba(183, 121, 31, 0.10); }
@media (max-width: 600px) {
  .result-note { font-size: 0.76rem; line-height: 1.3; margin-top: 4px; }
  .result-note.result-note-strong { padding: 6px 10px; }
}
