/* ============================================================
   SiteVett — Professional Stylesheet
   Brand color: Teal #0d9488
   ============================================================ */

/* ------------------------------------------------------------
   Reset / Base
   ------------------------------------------------------------ */
*,
*::before,
*::after {
    box-sizing: border-box;
    margin: 0;
    padding: 0;
}

html {
    scroll-behavior: smooth;
    -webkit-text-size-adjust: 100%;
}

body {
    font-family: system-ui, -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto,
        'Helvetica Neue', Arial, sans-serif;
    line-height: 1.6;
    color: #1a1a2e;
    background: #f8fafc;
    min-height: 100vh;
}

a {
    color: #0d9488;
    text-decoration: none;
    transition: color 0.2s ease;
}

a:hover {
    color: #0f766e;
}

img {
    max-width: 100%;
    height: auto;
    display: block;
}

h1, h2, h3, h4, h5, h6 {
    line-height: 1.3;
    font-weight: 700;
    color: #1a1a2e;
}

h1 { font-size: 2.25rem; }
h2 { font-size: 1.75rem; }
h3 { font-size: 1.375rem; }
h4 { font-size: 1.125rem; }

p {
    margin-bottom: 1rem;
}

code {
    font-family: 'SF Mono', 'Fira Code', 'Fira Mono', Menlo, Consolas, monospace;
    font-size: 0.875em;
    background: #f1f5f9;
    padding: 0.125rem 0.375rem;
    border-radius: 4px;
}

/* ------------------------------------------------------------
   Layout
   ------------------------------------------------------------ */
.container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 1.5rem;
}

.content-narrow {
    max-width: 800px;
    margin: 0 auto;
    padding: 0 1.5rem;
}

.page-content {
    padding-top: 5rem;
    padding-bottom: 3rem;
    min-height: calc(100vh - 200px);
}

/* ------------------------------------------------------------
   Navigation
   ------------------------------------------------------------ */
.nav {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    z-index: 1000;
    background: #0d9488;
    color: #fff;
    padding: 0 1.5rem;
    height: 3.5rem;
    display: flex;
    align-items: center;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.15);
}

.nav-inner {
    max-width: 1200px;
    margin: 0 auto;
    width: 100%;
    display: flex;
    align-items: center;
    justify-content: space-between;
}

.nav-logo {
    font-weight: 700;
    font-size: 1.25rem;
    color: #fff;
    letter-spacing: -0.02em;
}

.nav-logo:hover {
    color: #fff;
    opacity: 0.9;
}

.nav-links {
    display: flex;
    align-items: center;
    gap: 1.5rem;
    list-style: none;
}

.nav-links a {
    color: rgba(255, 255, 255, 0.9);
    font-weight: 500;
    font-size: 0.9rem;
    padding: 0.25rem 0;
    border-bottom: 2px solid transparent;
    transition: color 0.2s ease, border-color 0.2s ease;
}

.nav-links a:hover,
.nav-links a.active {
    color: #fff;
    border-bottom-color: #fff;
}

.nav-hamburger {
    display: none;
    background: none;
    border: none;
    color: #fff;
    font-size: 1.5rem;
    cursor: pointer;
    padding: 0.25rem;
    line-height: 1;
}

.nav-user {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    color: rgba(255, 255, 255, 0.9);
    font-size: 0.875rem;
}

.nav-user img {
    width: 28px;
    height: 28px;
    border-radius: 50%;
}

/* ------------------------------------------------------------
   Buttons
   ------------------------------------------------------------ */
.btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 0.5rem;
    padding: 0.625rem 1.25rem;
    border: 2px solid transparent;
    border-radius: 8px;
    font-weight: 600;
    font-size: 0.9rem;
    font-family: inherit;
    cursor: pointer;
    transition: all 0.2s ease;
    text-decoration: none;
    line-height: 1.4;
    white-space: nowrap;
}

.btn:disabled {
    opacity: 0.55;
    cursor: not-allowed;
}

.btn-primary {
    background: #0d9488;
    color: #fff;
    border-color: #0d9488;
}

.btn-primary:hover:not(:disabled) {
    background: #0f766e;
    border-color: #0f766e;
}

.btn-secondary {
    background: #fff;
    color: #0d9488;
    border-color: #0d9488;
}

.btn-secondary:hover:not(:disabled) {
    background: #0d9488;
    color: #fff;
}

.btn-danger {
    background: #dc2626;
    color: #fff;
    border-color: #dc2626;
}

.btn-danger:hover:not(:disabled) {
    background: #b91c1c;
    border-color: #b91c1c;
}

.btn-ghost {
    background: transparent;
    color: #1a1a2e;
    border-color: transparent;
}

.btn-ghost:hover:not(:disabled) {
    background: #f1f5f9;
}

.btn-sm {
    padding: 0.375rem 0.75rem;
    font-size: 0.8rem;
    border-radius: 6px;
}

.btn-lg {
    padding: 0.875rem 2rem;
    font-size: 1.05rem;
    border-radius: 10px;
}

.btn-block {
    display: flex;
    width: 100%;
}

/* ------------------------------------------------------------
   Cards
   ------------------------------------------------------------ */
.card {
    background: #fff;
    border-radius: 12px;
    box-shadow: 0 1px 3px rgba(0, 0, 0, 0.1);
    padding: 1.5rem;
    margin-bottom: 1rem;
    transition: box-shadow 0.2s ease;
}

.card:hover {
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.1);
}

.card-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    margin-bottom: 1rem;
    padding-bottom: 0.75rem;
    border-bottom: 1px solid #f1f5f9;
}

.card-title {
    font-size: 1.125rem;
    font-weight: 700;
}

.card-body {
    font-size: 0.925rem;
}

.card-footer {
    margin-top: 1rem;
    padding-top: 0.75rem;
    border-top: 1px solid #f1f5f9;
    display: flex;
    align-items: center;
    justify-content: flex-end;
    gap: 0.5rem;
}

/* ------------------------------------------------------------
   Forms
   ------------------------------------------------------------ */
.form-group {
    margin-bottom: 1rem;
}

.form-group label {
    display: block;
    font-weight: 600;
    font-size: 0.9rem;
    margin-bottom: 0.25rem;
    color: #374151;
}

.form-group input[type="text"],
.form-group input[type="email"],
.form-group input[type="password"],
.form-group input[type="url"],
.form-group input[type="number"],
.form-group input[type="search"],
.form-group select,
.form-group textarea {
    width: 100%;
    padding: 0.75rem;
    border: 1px solid #d1d5db;
    border-radius: 8px;
    font-size: 0.925rem;
    font-family: inherit;
    color: #1a1a2e;
    background: #fff;
    transition: border-color 0.2s ease, box-shadow 0.2s ease;
}

.form-group input:focus,
.form-group select:focus,
.form-group textarea:focus {
    outline: none;
    border-color: #0d9488;
    box-shadow: 0 0 0 3px rgba(13, 148, 136, 0.15);
}

.form-group textarea {
    min-height: 100px;
    resize: vertical;
}

.form-group .form-hint {
    font-size: 0.8rem;
    color: #6b7280;
    margin-top: 0.25rem;
}

.input-lg {
    padding: 1rem 1.25rem !important;
    font-size: 1.1rem !important;
    border-radius: 10px !important;
}

.form-row {
    display: flex;
    gap: 1rem;
}

.form-row .form-group {
    flex: 1;
}

.form-inline {
    display: flex;
    align-items: flex-end;
    gap: 0.75rem;
}

.form-inline .form-group {
    flex: 1;
    margin-bottom: 0;
}

/* Checkbox / Radio */
.form-check {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    margin-bottom: 0.5rem;
}

.form-check input[type="checkbox"],
.form-check input[type="radio"] {
    width: 1.1rem;
    height: 1.1rem;
    accent-color: #0d9488;
}

/* ------------------------------------------------------------
   Score Ring
   ------------------------------------------------------------ */
.score-ring-container {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
}

.score-ring {
    position: relative;
    width: 160px;
    height: 160px;
}

.score-ring svg {
    transform: rotate(-90deg);
    width: 100%;
    height: 100%;
}

.score-ring circle {
    fill: none;
    stroke-width: 10;
    stroke-linecap: round;
}

.score-ring .ring-bg {
    stroke: #e5e7eb;
}

.score-ring .ring-fill {
    stroke: #0d9488;
    transition: stroke-dashoffset 0.8s ease, stroke 0.3s ease;
}

.score-value {
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    font-size: 2.5rem;
    font-weight: 800;
    line-height: 1;
}

.score-label {
    margin-top: 0.5rem;
    font-size: 0.9rem;
    font-weight: 600;
    text-align: center;
}

.score-ring-sm {
    width: 60px;
    height: 60px;
}

.score-ring-sm .score-value {
    font-size: 1rem;
}

/* ------------------------------------------------------------
   Tables
   ------------------------------------------------------------ */
.table-wrapper {
    overflow-x: auto;
    -webkit-overflow-scrolling: touch;
    border-radius: 12px;
    box-shadow: 0 1px 3px rgba(0, 0, 0, 0.1);
}

.table {
    width: 100%;
    border-collapse: collapse;
    background: #fff;
    font-size: 0.9rem;
}

.table thead {
    position: sticky;
    top: 0;
    z-index: 10;
}

.table th {
    background: #f8fafc;
    font-weight: 700;
    text-align: left;
    padding: 0.75rem 1rem;
    border-bottom: 2px solid #e5e7eb;
    white-space: nowrap;
    color: #374151;
    font-size: 0.8rem;
    text-transform: uppercase;
    letter-spacing: 0.04em;
}

.table td {
    padding: 0.75rem 1rem;
    border-bottom: 1px solid #f1f5f9;
    vertical-align: middle;
}

.table tbody tr:nth-child(even) {
    background: #f9fafb;
}

.table tbody tr:hover {
    background: #f1f5f9;
}

.table th.sortable {
    cursor: pointer;
    user-select: none;
}

.table th.sortable:hover {
    background: #f1f5f9;
}

.table th.sortable::after {
    content: ' \2195';
    opacity: 0.4;
    font-size: 0.75rem;
}

.table th.sort-asc::after {
    content: ' \2191';
    opacity: 1;
}

.table th.sort-desc::after {
    content: ' \2193';
    opacity: 1;
}

/* ------------------------------------------------------------
   Badges
   ------------------------------------------------------------ */
.badge {
    display: inline-block;
    padding: 0.2rem 0.6rem;
    border-radius: 9999px;
    font-size: 0.75rem;
    font-weight: 600;
    letter-spacing: 0.02em;
    line-height: 1.4;
    white-space: nowrap;
}

.badge-pass {
    background: #dcfce7;
    color: #166534;
}

.badge-fail {
    background: #fee2e2;
    color: #991b1b;
}

.badge-warn {
    background: #fef3c7;
    color: #92400e;
}

.badge-human {
    background: #e0e7ff;
    color: #3730a3;
}

.badge-info {
    background: #dbeafe;
    color: #1e40af;
}

.badge-teal {
    background: #ccfbf1;
    color: #115e59;
}

/* ------------------------------------------------------------
   Alerts
   ------------------------------------------------------------ */
.alert {
    padding: 1rem 1.25rem;
    border-radius: 8px;
    margin-bottom: 1rem;
    font-size: 0.9rem;
    line-height: 1.5;
    display: flex;
    align-items: flex-start;
    gap: 0.75rem;
}

.alert-icon {
    flex-shrink: 0;
    font-size: 1.2rem;
    line-height: 1.4;
}

.alert-danger {
    background: #fef2f2;
    border: 1px solid #fecaca;
    color: #991b1b;
}

.alert-warning {
    background: #fffbeb;
    border: 1px solid #fde68a;
    color: #92400e;
}

.alert-success {
    background: #f0fdf4;
    border: 1px solid #bbf7d0;
    color: #166534;
}

.alert-info {
    background: #eff6ff;
    border: 1px solid #bfdbfe;
    color: #1e40af;
}

/* ------------------------------------------------------------
   Stats Grid
   ------------------------------------------------------------ */
.stats-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(180px, 1fr));
    gap: 1rem;
    margin-bottom: 1.5rem;
}

.stat-card {
    background: #fff;
    border-radius: 12px;
    padding: 1.25rem;
    text-align: center;
    box-shadow: 0 1px 3px rgba(0, 0, 0, 0.1);
}

.stat-number {
    font-size: 2rem;
    font-weight: 800;
    color: #0d9488;
    line-height: 1.2;
}

.stat-label {
    font-size: 0.8rem;
    font-weight: 600;
    color: #6b7280;
    text-transform: uppercase;
    letter-spacing: 0.04em;
    margin-top: 0.25rem;
}

/* ------------------------------------------------------------
   Pricing Cards
   ------------------------------------------------------------ */
.pricing-grid {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 1.5rem;
    margin: 2rem 0;
    align-items: start;
}

.pricing-card {
    background: #fff;
    border: 2px solid #e5e7eb;
    border-radius: 16px;
    padding: 2rem 1.5rem;
    text-align: center;
    transition: transform 0.2s ease, box-shadow 0.2s ease;
    position: relative;
}

.pricing-card:hover {
    transform: translateY(-4px);
    box-shadow: 0 12px 32px rgba(0, 0, 0, 0.1);
}

.pricing-card.featured {
    border-color: #0d9488;
    box-shadow: 0 8px 24px rgba(13, 148, 136, 0.15);
}

.pricing-card.featured::before {
    content: 'Most Popular';
    position: absolute;
    top: -14px;
    left: 50%;
    transform: translateX(-50%);
    background: #0d9488;
    color: #fff;
    font-size: 0.75rem;
    font-weight: 700;
    padding: 0.25rem 1rem;
    border-radius: 9999px;
    white-space: nowrap;
}

.pricing-name {
    font-size: 1.125rem;
    font-weight: 700;
    margin-bottom: 0.5rem;
}

.pricing-desc {
    font-size: 0.85rem;
    color: #6b7280;
    margin-bottom: 1.25rem;
}

.price {
    font-size: 2.75rem;
    font-weight: 800;
    color: #1a1a2e;
    line-height: 1.1;
}

.price-currency {
    font-size: 1.25rem;
    vertical-align: super;
    font-weight: 600;
}

.price-period {
    font-size: 0.875rem;
    color: #6b7280;
    font-weight: 400;
    margin-bottom: 1.5rem;
    display: block;
}

.pricing-features {
    list-style: none;
    text-align: left;
    margin: 1.5rem 0;
    font-size: 0.875rem;
}

.pricing-features li {
    padding: 0.375rem 0;
    display: flex;
    align-items: flex-start;
    gap: 0.5rem;
}

.pricing-features li::before {
    content: '\2713';
    color: #0d9488;
    font-weight: 700;
    flex-shrink: 0;
}

/* ------------------------------------------------------------
   Progress Bar
   ------------------------------------------------------------ */
.progress-bar {
    background: #e5e7eb;
    border-radius: 9999px;
    height: 8px;
    overflow: hidden;
    width: 100%;
}

.progress-fill {
    background: #0d9488;
    height: 100%;
    border-radius: 9999px;
    transition: width 0.4s ease;
    width: 0%;
}

.progress-bar.animated .progress-fill {
    animation: indeterminate 1.8s infinite ease-in-out;
    width: 40%;
}

@keyframes indeterminate {
    0% { transform: translateX(-100%); }
    100% { transform: translateX(350%); }
}

.progress-text {
    font-size: 0.8rem;
    color: #6b7280;
    margin-top: 0.375rem;
}

/* ------------------------------------------------------------
   Scan History / Scan Cards
   ------------------------------------------------------------ */
.scan-card {
    display: flex;
    align-items: center;
    gap: 1.25rem;
    background: #fff;
    border-radius: 12px;
    box-shadow: 0 1px 3px rgba(0, 0, 0, 0.1);
    padding: 1.25rem 1.5rem;
    margin-bottom: 0.75rem;
    transition: box-shadow 0.2s ease;
}

.scan-card:hover {
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.1);
}

.scan-card-score {
    flex-shrink: 0;
    width: 56px;
    height: 56px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.25rem;
    font-weight: 800;
    color: #fff;
}

.scan-card-details {
    flex: 1;
    min-width: 0;
}

.scan-card-url {
    font-weight: 700;
    font-size: 1rem;
    color: #1a1a2e;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.scan-card-meta {
    font-size: 0.8rem;
    color: #6b7280;
    margin-top: 0.125rem;
}

.scan-card-actions {
    flex-shrink: 0;
    display: flex;
    gap: 0.5rem;
}

/* ------------------------------------------------------------
   Auth Pages
   ------------------------------------------------------------ */
.auth-container {
    max-width: 400px;
    margin: 0 auto;
    padding: 2rem 1.5rem;
    display: flex;
    flex-direction: column;
    align-items: center;
    min-height: calc(100vh - 3.5rem);
    justify-content: center;
}

.auth-card {
    background: #fff;
    border-radius: 16px;
    box-shadow: 0 4px 24px rgba(0, 0, 0, 0.1);
    padding: 2.5rem 2rem;
    width: 100%;
}

.auth-logo {
    text-align: center;
    margin-bottom: 1.5rem;
}

.auth-logo h1 {
    font-size: 1.5rem;
    color: #0d9488;
}

.auth-footer {
    text-align: center;
    margin-top: 1.25rem;
    font-size: 0.85rem;
    color: #6b7280;
}

.auth-divider {
    display: flex;
    align-items: center;
    gap: 1rem;
    margin: 1.5rem 0;
    color: #9ca3af;
    font-size: 0.8rem;
}

.auth-divider::before,
.auth-divider::after {
    content: '';
    flex: 1;
    height: 1px;
    background: #e5e7eb;
}

/* ------------------------------------------------------------
   Landing Page — Hero
   ------------------------------------------------------------ */
.hero {
    padding: 6rem 1.5rem 4rem;
    text-align: center;
    background: linear-gradient(135deg, #f0fdfa 0%, #f8fafc 50%, #eff6ff 100%);
}

.hero h1 {
    font-size: 3rem;
    font-weight: 800;
    letter-spacing: -0.02em;
    margin-bottom: 1rem;
    color: #1a1a2e;
}

.hero h1 span {
    color: #0d9488;
}

.hero p {
    font-size: 1.2rem;
    color: #4b5563;
    max-width: 640px;
    margin: 0 auto 2rem;
}

.hero-actions {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 1rem;
    flex-wrap: wrap;
}

/* ------------------------------------------------------------
   Landing Page — Features Grid
   ------------------------------------------------------------ */
.features-section {
    padding: 4rem 1.5rem;
}

.features-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 2rem;
    max-width: 1200px;
    margin: 0 auto;
}

.feature-card {
    text-align: center;
    padding: 2rem 1.5rem;
}

.feature-icon {
    width: 56px;
    height: 56px;
    border-radius: 12px;
    background: #ccfbf1;
    color: #0d9488;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.5rem;
    margin: 0 auto 1rem;
}

.feature-card h3 {
    font-size: 1.125rem;
    margin-bottom: 0.5rem;
}

.feature-card p {
    font-size: 0.9rem;
    color: #6b7280;
}

/* ------------------------------------------------------------
   Landing Page — Steps
   ------------------------------------------------------------ */
.steps-section {
    padding: 4rem 1.5rem;
    background: #fff;
}

.steps {
    display: flex;
    justify-content: center;
    gap: 3rem;
    max-width: 900px;
    margin: 2rem auto 0;
}

.step {
    text-align: center;
    flex: 1;
    position: relative;
}

.step-number {
    width: 48px;
    height: 48px;
    border-radius: 50%;
    background: #0d9488;
    color: #fff;
    font-weight: 800;
    font-size: 1.25rem;
    display: flex;
    align-items: center;
    justify-content: center;
    margin: 0 auto 1rem;
}

.step h3 {
    font-size: 1rem;
    margin-bottom: 0.375rem;
}

.step p {
    font-size: 0.85rem;
    color: #6b7280;
}

.step:not(:last-child)::after {
    content: '';
    position: absolute;
    top: 24px;
    left: calc(50% + 36px);
    width: calc(100% - 72px);
    height: 2px;
    background: #d1d5db;
}

/* ------------------------------------------------------------
   Landing Page — CTA Section
   ------------------------------------------------------------ */
.cta-section {
    background: #0d9488;
    color: #fff;
    padding: 4rem 1.5rem;
    text-align: center;
}

.cta-section h2 {
    color: #fff;
    font-size: 2rem;
    margin-bottom: 0.75rem;
}

.cta-section p {
    color: rgba(255, 255, 255, 0.85);
    font-size: 1.1rem;
    max-width: 560px;
    margin: 0 auto 1.5rem;
}

.cta-section .btn-primary {
    background: #fff;
    color: #0d9488;
    border-color: #fff;
}

.cta-section .btn-primary:hover {
    background: #f0fdfa;
    border-color: #f0fdfa;
}

/* ------------------------------------------------------------
   Footer
   ------------------------------------------------------------ */
.footer {
    background: #1a1a2e;
    color: rgba(255, 255, 255, 0.7);
    padding: 3rem 1.5rem 2rem;
}

.footer-inner {
    max-width: 1200px;
    margin: 0 auto;
    display: flex;
    justify-content: space-between;
    flex-wrap: wrap;
    gap: 2rem;
}

.footer-brand {
    max-width: 280px;
}

.footer-brand h3 {
    color: #fff;
    font-size: 1.125rem;
    margin-bottom: 0.5rem;
}

.footer-brand p {
    font-size: 0.85rem;
    line-height: 1.6;
    margin-bottom: 0;
}

.footer-links h4 {
    color: #fff;
    font-size: 0.85rem;
    text-transform: uppercase;
    letter-spacing: 0.06em;
    margin-bottom: 0.75rem;
}

.footer-links ul {
    list-style: none;
}

.footer-links a {
    color: rgba(255, 255, 255, 0.6);
    font-size: 0.85rem;
    display: block;
    padding: 0.2rem 0;
    transition: color 0.2s ease;
}

.footer-links a:hover {
    color: #fff;
}

.footer-bottom {
    max-width: 1200px;
    margin: 2rem auto 0;
    padding-top: 1.5rem;
    border-top: 1px solid rgba(255, 255, 255, 0.1);
    text-align: center;
    font-size: 0.8rem;
}

/* ------------------------------------------------------------
   Scanner-Specific
   ------------------------------------------------------------ */
.scan-form-card {
    max-width: 700px;
    margin: 0 auto;
}

.step-indicators {
    display: flex;
    justify-content: center;
    gap: 0.5rem;
    margin-bottom: 1.5rem;
}

.step-indicator {
    display: flex;
    align-items: center;
    gap: 0.375rem;
    font-size: 0.8rem;
    color: #9ca3af;
    font-weight: 500;
    transition: color 0.2s ease;
}

.step-indicator.active {
    color: #0d9488;
}

.step-indicator.current {
    color: #0d9488;
    font-weight: 700;
}

.step-indicator::before {
    content: '';
    width: 8px;
    height: 8px;
    border-radius: 50%;
    background: #d1d5db;
    transition: background 0.2s ease;
}

.step-indicator.active::before {
    background: #0d9488;
}

.step-indicator.current::before {
    background: #0d9488;
    box-shadow: 0 0 0 3px rgba(13, 148, 136, 0.2);
}

.scan-log {
    background: #1a1a2e;
    color: #a5f3fc;
    font-family: 'SF Mono', 'Fira Code', Menlo, Consolas, monospace;
    font-size: 0.8rem;
    padding: 1rem;
    border-radius: 8px;
    max-height: 240px;
    overflow-y: auto;
    line-height: 1.7;
}

.log-entry {
    opacity: 0.85;
}

.log-entry:last-child {
    opacity: 1;
    color: #fff;
}

/* Result card */
.result-card {
    text-align: center;
    padding: 2rem;
}

.result-score {
    font-size: 4rem;
    font-weight: 800;
    line-height: 1;
    margin-bottom: 0.5rem;
}

/* ------------------------------------------------------------
   Report-Specific
   ------------------------------------------------------------ */
.report-toolbar {
    background: #fff;
    border-bottom: 1px solid #e5e7eb;
    padding: 0.5rem 1.5rem;
    display: flex;
    align-items: center;
    justify-content: space-between;
    position: sticky;
    top: 3.5rem;
    z-index: 100;
}

.report-section {
    margin-bottom: 2rem;
}

.report-section-title {
    font-size: 1.25rem;
    font-weight: 700;
    margin-bottom: 1rem;
    padding-bottom: 0.5rem;
    border-bottom: 2px solid #e5e7eb;
}

.result-item {
    border-radius: 10px;
    padding: 1.25rem;
    margin-bottom: 0.75rem;
}

.result-item.fail {
    background: #fef2f2;
    border-left: 4px solid #dc2626;
}

.result-item.warn {
    background: #fffbeb;
    border-left: 4px solid #d97706;
}

.result-item.pass {
    background: #f0fdf4;
    border-left: 4px solid #059669;
}

.result-item.human {
    background: #eef2ff;
    border-left: 4px solid #6366f1;
}

.result-headline {
    font-weight: 700;
    font-size: 1rem;
    margin-bottom: 0.375rem;
}

.result-fix {
    background: #f0fdf4;
    border: 1px solid #bbf7d0;
    border-radius: 6px;
    padding: 0.625rem 0.875rem;
    font-size: 0.85rem;
    color: #166534;
    margin: 0.5rem 0;
}

.result-rule {
    font-size: 0.8rem;
    color: #6b7280;
}

.result-details {
    margin-top: 0.5rem;
}

.result-details summary {
    cursor: pointer;
    font-size: 0.85rem;
    font-weight: 600;
    color: #0d9488;
    user-select: none;
}

.result-details[open] summary {
    margin-bottom: 0.5rem;
}

.result-details ul {
    margin-left: 1.25rem;
    font-size: 0.85rem;
    color: #4b5563;
}

.result-details li {
    margin-bottom: 0.25rem;
}

/* Human review buttons */
.review-buttons {
    display: flex;
    gap: 0.5rem;
    margin-top: 0.75rem;
}

.review-btn {
    padding: 0.375rem 1rem;
    border: 2px solid #d1d5db;
    border-radius: 6px;
    font-size: 0.8rem;
    font-weight: 600;
    cursor: pointer;
    background: #fff;
    transition: all 0.2s ease;
    font-family: inherit;
}

.review-btn:hover {
    border-color: #9ca3af;
}

.review-btn.selected-pass {
    background: #059669;
    color: #fff;
    border-color: #059669;
}

.review-btn.selected-fail {
    background: #dc2626;
    color: #fff;
    border-color: #dc2626;
}

.review-btn.selected-na {
    background: #6b7280;
    color: #fff;
    border-color: #6b7280;
}

.review-comment {
    margin-top: 0.5rem;
    width: 100%;
    padding: 0.5rem 0.75rem;
    border: 1px solid #d1d5db;
    border-radius: 6px;
    font-size: 0.825rem;
    font-family: inherit;
    resize: vertical;
    min-height: 60px;
}

/* Screenshot gallery */
.screenshot-gallery {
    display: flex;
    gap: 0.75rem;
    flex-wrap: wrap;
    margin-top: 0.75rem;
}

.screenshot-thumb {
    width: 200px;
    border-radius: 8px;
    border: 1px solid #e5e7eb;
    cursor: pointer;
    transition: transform 0.2s ease, box-shadow 0.2s ease;
}

.screenshot-thumb:hover {
    transform: scale(1.03);
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.15);
}

.screenshot-expanded {
    max-width: 100%;
    border-radius: 8px;
    border: 1px solid #e5e7eb;
    margin-top: 0.5rem;
}

/* Review progress */
.review-progress {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    margin-bottom: 1rem;
}

.review-progress-text {
    font-size: 0.85rem;
    color: #6b7280;
    white-space: nowrap;
}

/* ------------------------------------------------------------
   Responsive — < 1024px
   ------------------------------------------------------------ */
@media (max-width: 1024px) {
    .pricing-grid {
        grid-template-columns: repeat(2, 1fr);
    }

    .features-grid {
        grid-template-columns: repeat(2, 1fr);
    }

    .steps {
        gap: 2rem;
    }

    .step:not(:last-child)::after {
        display: none;
    }
}

/* ------------------------------------------------------------
   Responsive — < 768px
   ------------------------------------------------------------ */
@media (max-width: 768px) {
    .nav-links {
        display: none;
        flex-direction: column;
        position: absolute;
        top: 3.5rem;
        left: 0;
        right: 0;
        background: #0d9488;
        padding: 1rem 1.5rem;
        gap: 0.75rem;
        box-shadow: 0 4px 12px rgba(0, 0, 0, 0.15);
    }

    .nav-links.open {
        display: flex;
    }

    .nav-hamburger {
        display: block;
    }

    .pricing-grid {
        grid-template-columns: 1fr;
        max-width: 400px;
        margin-left: auto;
        margin-right: auto;
    }

    .features-grid {
        grid-template-columns: 1fr;
        max-width: 480px;
        margin-left: auto;
        margin-right: auto;
    }

    .stats-grid {
        grid-template-columns: repeat(2, 1fr);
    }

    .steps {
        flex-direction: column;
        align-items: center;
        gap: 1.5rem;
    }

    .hero h1 {
        font-size: 2rem;
    }

    .hero p {
        font-size: 1rem;
    }

    .form-row {
        flex-direction: column;
        gap: 0;
    }

    .form-inline {
        flex-direction: column;
        align-items: stretch;
    }

    .table-wrapper {
        margin: 0 -1.5rem;
        border-radius: 0;
    }

    .footer-inner {
        flex-direction: column;
    }

    .report-toolbar {
        flex-direction: column;
        gap: 0.5rem;
        padding: 0.75rem 1rem;
    }

    .scan-card {
        flex-direction: column;
        text-align: center;
    }

    .scan-card-actions {
        justify-content: center;
    }

    h1 { font-size: 1.75rem; }
    h2 { font-size: 1.5rem; }
}

/* ------------------------------------------------------------
   Responsive — < 480px
   ------------------------------------------------------------ */
@media (max-width: 480px) {
    body {
        font-size: 15px;
    }

    .btn {
        padding: 0.75rem 1rem;
        font-size: 0.95rem;
    }

    .btn-lg {
        padding: 1rem 1.5rem;
    }

    .stats-grid {
        grid-template-columns: 1fr;
    }

    .container,
    .content-narrow {
        padding: 0 1rem;
    }

    .card {
        padding: 1.25rem;
        border-radius: 10px;
    }

    .hero {
        padding: 4rem 1rem 3rem;
    }

    .hero h1 {
        font-size: 1.625rem;
    }

    .auth-card {
        padding: 2rem 1.5rem;
    }

    .review-buttons {
        flex-wrap: wrap;
    }
}

/* ------------------------------------------------------------
   Utilities
   ------------------------------------------------------------ */
.text-center { text-align: center; }
.text-left { text-align: left; }
.text-right { text-align: right; }
.text-muted { color: #6b7280; }
.text-teal { color: #0d9488; }
.text-sm { font-size: 0.85rem; }
.text-lg { font-size: 1.125rem; }
.font-bold { font-weight: 700; }

.mt-0 { margin-top: 0; }
.mt-1 { margin-top: 0.5rem; }
.mt-2 { margin-top: 1rem; }
.mt-3 { margin-top: 1.5rem; }
.mt-4 { margin-top: 2rem; }

.mb-0 { margin-bottom: 0; }
.mb-1 { margin-bottom: 0.5rem; }
.mb-2 { margin-bottom: 1rem; }
.mb-3 { margin-bottom: 1.5rem; }
.mb-4 { margin-bottom: 2rem; }

.pt-2 { padding-top: 1rem; }
.pb-2 { padding-bottom: 1rem; }

.hidden { display: none !important; }
.sr-only {
    position: absolute;
    width: 1px;
    height: 1px;
    padding: 0;
    margin: -1px;
    overflow: hidden;
    clip: rect(0, 0, 0, 0);
    border: 0;
}

.flex { display: flex; }
.flex-between {
    display: flex;
    align-items: center;
    justify-content: space-between;
}
.flex-center {
    display: flex;
    align-items: center;
    justify-content: center;
}
.flex-col {
    display: flex;
    flex-direction: column;
}
.flex-wrap { flex-wrap: wrap; }
.gap-1 { gap: 0.5rem; }
.gap-2 { gap: 1rem; }
.gap-3 { gap: 1.5rem; }

.w-full { width: 100%; }
.rounded { border-radius: 8px; }
.shadow { box-shadow: 0 1px 3px rgba(0, 0, 0, 0.1); }
.shadow-lg { box-shadow: 0 8px 24px rgba(0, 0, 0, 0.12); }

.truncate {
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

/* ------------------------------------------------------------
   Print
   ------------------------------------------------------------ */
@media print {
    .nav,
    .footer,
    .btn,
    .report-toolbar,
    .review-buttons,
    .review-comment,
    .scan-log {
        display: none !important;
    }

    body {
        background: #fff;
        color: #000;
        font-size: 11pt;
    }

    .page-content {
        padding-top: 0;
    }

    .card,
    .result-item {
        box-shadow: none;
        border: 1px solid #d1d5db;
        break-inside: avoid;
    }

    .score-ring .ring-fill {
        print-color-adjust: exact;
        -webkit-print-color-adjust: exact;
    }

    .badge,
    .alert,
    .result-item.fail,
    .result-item.warn,
    .result-item.pass,
    .result-item.human {
        print-color-adjust: exact;
        -webkit-print-color-adjust: exact;
    }

    a[href]::after {
        content: ' (' attr(href) ')';
        font-size: 0.8em;
        color: #6b7280;
    }
}
