/* VeriHub — design tokens + base styles (dual theme via data-bs-theme) */

:root[data-bs-theme="light"] {
    --vh-bg: #f7f8fa;
    --vh-surface: #ffffff;
    --vh-text: #101828;
    --vh-text-muted: #475467;
    --vh-border: #e4e7ec;
    --vh-accent: #4f46e5;
    --vh-accent-hover: #4338ca;
    --vh-success: #067647;
    --vh-warning: #b54708;
    --vh-danger: #b42318;
    --vh-input-bg: #ffffff;
    --vh-input-border: #7c889c;
    --vh-input-text: #101828;
}

:root[data-bs-theme="dark"] {
    --vh-bg: #0b1220;
    --vh-surface: #111a2c;
    --vh-text: #e6eaf2;
    --vh-text-muted: #98a2b3;
    --vh-border: #1f2a3d;
    --vh-accent: #818cf8;
    --vh-accent-hover: #a5b4fc;
    --vh-success: #47cd89;
    --vh-warning: #fdb022;
    --vh-danger: #f97066;
    --vh-input-bg: #0e1728;
    --vh-input-border: #475467;
    --vh-input-text: #e6eaf2;
}

/* Base */
html { color-scheme: light dark; }
body {
    margin: 0;
    min-height: 100vh;
    display: flex;
    flex-direction: column;
    background: var(--vh-bg);
    color: var(--vh-text);
    font-family: Inter, system-ui, -apple-system, "Segoe UI", Roboto, sans-serif;
    line-height: 1.55;
}
a { color: var(--vh-accent); }
a:hover { color: var(--vh-accent-hover); }

/* Layout */
.vh-container { width: 100%; max-width: 1080px; margin: 0 auto; padding: 0 1rem; }
.vh-main { flex: 1; padding: 2rem 0 3rem; }

/* Header */
.vh-header { border-bottom: 1px solid var(--vh-border); background: var(--vh-surface); position: relative; }
.vh-header-row { display: flex; align-items: center; justify-content: space-between; min-height: 60px; gap: 1rem; }
.vh-header-actions { display: flex; align-items: center; gap: .5rem; }
.vh-menu-btn {
    background: transparent; border: 1px solid var(--vh-border); border-radius: 8px;
    color: var(--vh-text); width: 44px; height: 44px; display: none; align-items: center;
    justify-content: center; cursor: pointer;
}
.vh-menu-btn:hover { border-color: var(--vh-accent); color: var(--vh-accent); }
.vh-menu-btn:focus-visible { outline: 2px solid var(--vh-accent); outline-offset: 2px; }
.vh-brand { display: inline-flex; align-items: center; gap: .5rem; font-weight: 700; font-size: 1.15rem; color: var(--vh-text); text-decoration: none; }
.vh-logo { color: var(--vh-accent); }
.vh-nav { display: flex; align-items: center; gap: 1rem; }
.vh-nav a { color: var(--vh-text); text-decoration: none; display: inline-flex; align-items: center; min-height: 44px; padding: 0 .35rem; }
.vh-nav a:hover { color: var(--vh-accent); }
.vh-nav a:focus-visible { outline: 2px solid var(--vh-accent); outline-offset: 3px; border-radius: 4px; }
.vh-nav a.vh-nav-active { color: var(--vh-accent); font-weight: 600; box-shadow: inset 0 -2px 0 var(--vh-accent); }
.vh-nav a.vh-nav-active:hover { color: var(--vh-accent-hover); box-shadow: inset 0 -2px 0 var(--vh-accent-hover); }
.vh-nav-user { color: var(--vh-text-muted); }

/* Mobile nav: hamburger + dropdown panel (< 768px); inline row on desktop */
@media (max-width: 767.98px) {
    .vh-menu-btn { display: inline-flex; }
    .vh-nav {
        display: none;
        position: absolute; top: 100%; left: 0; right: 0; z-index: 60;
        flex-direction: column; align-items: stretch; gap: 0;
        background: var(--vh-surface); border-bottom: 1px solid var(--vh-border);
        box-shadow: 0 16px 32px rgba(0, 0, 0, .18);
        padding: .25rem 1.25rem 1rem;
    }
    .vh-nav.vh-nav-open { display: flex; }
    .vh-nav a { padding: .85rem .25rem; border-bottom: 1px solid var(--vh-border); }
    .vh-nav .vh-nav-user { padding: .85rem .25rem; border-bottom: 1px solid var(--vh-border); display: block; }
    .vh-nav a.vh-nav-active { box-shadow: inset 3px 0 0 var(--vh-accent); }
    .vh-nav a.vh-btn-accent { text-align: center; border-bottom: none; margin-top: .75rem; }
    .vh-nav a:last-of-type { border-bottom: none; }
}
.vh-theme-toggle {
    background: transparent; border: 1px solid var(--vh-border); border-radius: 8px;
    color: var(--vh-text); width: 36px; height: 36px; display: inline-flex;
    align-items: center; justify-content: center; cursor: pointer;
}
.vh-theme-toggle:hover { border-color: var(--vh-accent); color: var(--vh-accent); }
:root[data-bs-theme="light"] .vh-icon-moon { display: none; }
:root[data-bs-theme="dark"] .vh-icon-sun { display: none; }

/* Lenis smooth-scroll companion rules (vendored lenis.css, MIT) */
html.lenis, html.lenis body { height: auto; }
.lenis:not(.lenis-autoToggle).lenis-stopped { overflow: clip; }
.lenis [data-lenis-prevent],
.lenis [data-lenis-prevent-wheel],
.lenis [data-lenis-prevent-touch],
.lenis [data-lenis-prevent-vertical],
.lenis [data-lenis-prevent-horizontal] { overscroll-behavior: contain; }
.lenis.lenis-smooth iframe { pointer-events: none; }
/* Landing motion: keep split hero lines inside their masks */
.vh-hero-copy h1 > div { overflow: hidden; }

/* Footer */
.vh-footer { border-top: 1px solid var(--vh-border); padding: 1rem 0; color: var(--vh-text-muted); font-size: .875rem; }
.vh-footer .vh-container { display: flex; justify-content: space-between; gap: 1rem; flex-wrap: wrap; }

/* Cards + forms */
.vh-card {
    background: var(--vh-surface); border: 1px solid var(--vh-border);
    border-radius: 12px; padding: 1.75rem; max-width: 460px; margin: 0 auto;
}
.vh-card h1 { font-size: 1.4rem; margin: 0 0 1rem; }
/* Long-form reading layout (Terms, Privacy): comfortable measure, card surface */
.vh-prose {
    background: var(--vh-surface); border: 1px solid var(--vh-border);
    border-radius: 12px; padding: 2.25rem 2.5rem; max-width: 780px; margin: 0 auto;
}
.vh-prose h1 { font-size: 1.6rem; margin: 0 0 .5rem; }
.vh-prose h2 { font-size: 1.1rem; margin: 1.75rem 0 .5rem; }
.vh-prose p, .vh-prose ul { line-height: 1.65; margin: .5rem 0; font-size: 1rem; }
.vh-prose ul { padding-left: 1.25rem; }
.vh-prose li { margin: .3rem 0; }
@media (max-width: 640px) { .vh-prose { padding: 1.5rem 1.25rem; } }
.vh-label { display: block; font-size: .875rem; font-weight: 600; margin: 1rem 0 .35rem; color: var(--vh-text); }
.vh-input, .vh-select {
    width: 100%; box-sizing: border-box; padding: .65rem .75rem; font-size: 1rem;
    color: var(--vh-input-text); background: var(--vh-input-bg);
    border: 1.5px solid var(--vh-input-border); border-radius: 8px;
    box-shadow: inset 0 1px 2px rgba(16,24,40,.06);
}
.vh-input::placeholder, .vh-select::placeholder { color: var(--vh-text-muted); opacity: 1; }
.vh-input:focus, .vh-select:focus { outline: 2px solid var(--vh-accent); outline-offset: 1px; border-color: var(--vh-accent); }
.vh-help { font-size: .8rem; color: var(--vh-text-muted); margin: .35rem 0 0; }
.vh-btn {
    display: inline-block; width: 100%; margin-top: 1.5rem; padding: .65rem 1rem;
    border: 0; border-radius: 8px; background: var(--vh-accent); color: #ffffff;
    font-size: 1rem; font-weight: 600; cursor: pointer; text-align: center; text-decoration: none;
}
.vh-btn:hover { background: var(--vh-accent-hover); color: #ffffff; }
.vh-btn-accent {
    background: var(--vh-accent); color: #fff; padding: .4rem .9rem;
    border-radius: 8px; text-decoration: none; font-weight: 600;
}
.vh-alert { border-radius: 8px; padding: .75rem 1rem; margin: 0 0 1rem; font-size: .925rem; border: 1px solid; }
.vh-alert-error { background: color-mix(in srgb, var(--vh-danger) 10%, transparent); border-color: var(--vh-danger); color: var(--vh-danger); }
.vh-alert-ok { background: color-mix(in srgb, var(--vh-success) 10%, transparent); border-color: var(--vh-success); color: var(--vh-success); }
.vh-alert-info { background: color-mix(in srgb, var(--vh-accent) 10%, transparent); border-color: var(--vh-accent); color: var(--vh-accent); }
.vh-alt-link { display: block; margin-top: 1.25rem; font-size: .9rem; color: var(--vh-text-muted); }

/* Dashboard */
.vh-dash-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(260px, 1fr)); gap: 1rem; }
.vh-tile { background: var(--vh-surface); border: 1px solid var(--vh-border); border-radius: 12px; padding: 1.25rem; }
.vh-tile h2 { font-size: 1rem; margin: 0 0 .5rem; color: var(--vh-text-muted); font-weight: 600; }
.vh-tile p { margin: 0; font-size: 1.05rem; }
.vh-badge { display: inline-block; padding: .15rem .6rem; border-radius: 999px; font-size: .78rem; font-weight: 700; border: 1px solid var(--vh-border); color: var(--vh-text-muted); }
.vh-badge-ok { color: var(--vh-success); border-color: var(--vh-success); }
.vh-badge-warn { color: var(--vh-warning); border-color: var(--vh-warning); }

/* Public landing */
.vh-hero { padding: 4rem 0 3rem; border-bottom: 1px solid var(--vh-border); background: var(--vh-surface); }
.vh-hero h1 { font-size: clamp(1.8rem, 4vw, 2.6rem); margin: 0 0 1rem; letter-spacing: -0.02em; }
.vh-hero-sub { font-size: 1.1rem; color: var(--vh-text-muted); max-width: 640px; margin: 0 0 2rem; }
.vh-hero-cta { display: flex; gap: 1rem; flex-wrap: wrap; }
.vh-hero-btn { width: auto; margin-top: 0; padding: .7rem 1.6rem; }
.vh-btn-secondary {
    display: inline-block; padding: .7rem 1.6rem; border-radius: 8px;
    border: 1px solid var(--vh-border); color: var(--vh-text);
    font-weight: 600; text-decoration: none;
}
.vh-btn-secondary:hover { border-color: var(--vh-accent); color: var(--vh-accent); }
.vh-features { display: grid; grid-template-columns: repeat(auto-fit, minmax(230px, 1fr)); gap: 1rem; padding-top: 2.5rem; }
.vh-features .vh-tile p { font-size: .95rem; color: var(--vh-text-muted); }

/* Settings pages (profile/security/consent/audit) */
.vh-page { max-width: 760px; margin: 0 auto; }
.vh-page h1 { font-size: 1.5rem; margin: 0 0 .35rem; }
.vh-page-sub { color: var(--vh-text-muted); margin: 0 0 1.5rem; }
.vh-section { background: var(--vh-surface); border: 1px solid var(--vh-border); border-radius: 12px; padding: 1.5rem; margin-bottom: 1.25rem; }
.vh-section h2 { font-size: 1.05rem; margin: 0 0 1rem; }
.vh-grid-2 { display: grid; grid-template-columns: 1fr 1fr; gap: 0 1rem; }
@media (max-width: 640px) { .vh-grid-2 { grid-template-columns: 1fr; } }
.vh-summary { border: 1px solid var(--vh-danger); background: color-mix(in srgb, var(--vh-danger) 10%, transparent); border-radius: 10px; padding: 1rem; margin-bottom: 1.25rem; }
.vh-summary h2 { font-size: 1rem; margin: 0 0 .5rem; color: var(--vh-danger); }
.vh-summary a { color: var(--vh-danger); }
.vh-field-error { color: var(--vh-danger); font-size: .85rem; margin-top: .3rem; }
.vh-code { font-family: ui-monospace, SFMono-Regular, Menlo, monospace; font-size: .95rem; background: var(--vh-bg); border: 1px dashed var(--vh-border); border-radius: 8px; padding: .6rem .8rem; word-break: break-all; user-select: all; }
.vh-table { width: 100%; border-collapse: collapse; font-size: .92rem; }
.vh-table th, .vh-table td { text-align: left; padding: .55rem .6rem; border-bottom: 1px solid var(--vh-border); }
.vh-table th { color: var(--vh-text-muted); font-weight: 600; font-size: .8rem; text-transform: uppercase; letter-spacing: .04em; }
.vh-status-row { display: flex; align-items: center; justify-content: space-between; gap: 1rem; padding: .6rem 0; border-bottom: 1px solid var(--vh-border); }
.vh-status-row:last-child { border-bottom: 0; }
.vh-check { color: var(--vh-success); font-weight: 700; }
.vh-warn { color: var(--vh-warning); font-weight: 700; }
.vh-btn-inline { width: auto; margin-top: .75rem; padding: .5rem 1.1rem; font-size: .92rem; }
.vh-btn-danger { background: var(--vh-danger); }
.vh-btn-danger:hover { background: var(--vh-danger); filter: brightness(1.15); color: #fff; }

/* Expanded landing page */
.vh-hero-grid { display: grid; grid-template-columns: 1.1fr 1fr; gap: 2.5rem; align-items: center; }
@media (max-width: 860px) { .vh-hero-grid { grid-template-columns: 1fr; } }
.vh-hero-chips { list-style: none; display: flex; flex-wrap: wrap; gap: .5rem; padding: 0; margin: 1.5rem 0 0; }
.vh-hero-chips li { border: 1px solid var(--vh-border); border-radius: 999px; padding: .25rem .8rem; font-size: .8rem; color: var(--vh-text-muted); }
.vh-hero-figure, .vh-feature-figure { margin: 0; border: 1px solid var(--vh-border); border-radius: 14px; overflow: hidden; background: var(--vh-surface); }
.vh-hero-figure img, .vh-feature-figure img { display: block; width: 100%; height: auto; }
.vh-trustbar { border-block: 1px solid var(--vh-border); background: var(--vh-surface); padding: 1.1rem 0; }
.vh-trustbar-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(200px, 1fr)); gap: 1rem; }
.vh-trustbar-grid > div { display: flex; flex-direction: column; gap: .1rem; }
.vh-trustbar-grid strong { font-size: 1.05rem; color: var(--vh-accent); }
.vh-trustbar-grid span { font-size: .82rem; color: var(--vh-text-muted); }
.vh-steps { padding-top: 3rem; }
.vh-steps h2, .vh-security h2, .vh-faq h2 { font-size: 1.5rem; margin: 0 0 1.5rem; }
.vh-steps-grid { list-style: none; display: grid; grid-template-columns: repeat(auto-fit, minmax(230px, 1fr)); gap: 1.25rem; padding: 0; margin: 0; counter-reset: steps; }
.vh-steps-grid li { background: var(--vh-surface); border: 1px solid var(--vh-border); border-radius: 12px; padding: 1.25rem; }
.vh-step-num { display: inline-flex; width: 34px; height: 34px; border-radius: 50%; align-items: center; justify-content: center; background: var(--vh-accent); color: #fff; font-weight: 700; margin-bottom: .75rem; }
.vh-steps-grid h3 { font-size: 1rem; margin: 0 0 .4rem; }
.vh-steps-grid p { font-size: .92rem; color: var(--vh-text-muted); margin: 0; }
.vh-feature { display: grid; grid-template-columns: 1fr 1fr; gap: 2.5rem; align-items: center; padding: 3.25rem 0 0; }
.vh-feature-flip .vh-feature-figure { order: 2; }
@media (max-width: 860px) { .vh-feature { grid-template-columns: 1fr; gap: 1.25rem; } .vh-feature-flip .vh-feature-figure { order: 0; } }
.vh-feature-copy h2 { font-size: 1.4rem; margin: 0 0 .75rem; }
.vh-feature-copy p { color: var(--vh-text-muted); }
.vh-feature-note { font-size: .9rem; margin-top: .75rem; }
.vh-feature-note a:not(.vh-btn) { color: var(--vh-accent); font-weight: 600; text-decoration-thickness: 1px; text-underline-offset: 3px; }
.vh-feature-note a:not(.vh-btn):hover { color: var(--vh-accent-hover); }
.vh-feature-note a.vh-note-secondary { color: var(--vh-text-muted); font-weight: 400; }
.vh-feature-note a.vh-note-secondary:hover { color: var(--vh-text); }
.vh-feature-note .vh-sep { color: var(--vh-text-muted); margin: 0 .35rem; }
.vh-security { background: var(--vh-surface); border-block: 1px solid var(--vh-border); margin-top: 3.25rem; padding: 3rem 0; }
.vh-security-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(230px, 1fr)); gap: 1rem; }
.vh-security-grid .vh-tile h3 { font-size: .95rem; margin: 0 0 .4rem; }
.vh-security-grid .vh-tile p { font-size: .88rem; color: var(--vh-text-muted); margin: 0; }
.vh-faq { padding: 3rem 0 0; max-width: 760px; }
.vh-faq details { border: 1px solid var(--vh-border); border-radius: 10px; background: var(--vh-surface); padding: 1rem 1.25rem; margin-bottom: .75rem; }
.vh-faq summary { cursor: pointer; font-weight: 600; }
.vh-faq summary:focus-visible { outline: 2px solid var(--vh-accent); outline-offset: 2px; }
.vh-faq details p { color: var(--vh-text-muted); margin: .6rem 0 0; }
.vh-cta { text-align: center; padding: 3.5rem 0; margin-top: 3rem; border-top: 1px solid var(--vh-border); }
.vh-cta h2 { font-size: 1.6rem; margin: 0 0 .5rem; }
.vh-cta p { color: var(--vh-text-muted); margin: 0 0 1.5rem; }
.vh-cta .vh-btn { display: inline-block; width: auto; margin: 0; padding: .7rem 1.8rem; }

/* Consent/action button rows (authorize etc.): equal-weight side-by-side */
.vh-btn-row { display: flex; gap: .75rem; margin-top: 1.25rem; align-items: stretch; }
.vh-btn-row form { flex: 1; display: flex; }
.vh-btn-row .vh-btn, .vh-btn-row .vh-btn-secondary {
    flex: 1; min-height: 48px; display: flex; margin: 0;
    align-items: center; justify-content: center; width: auto;
}
@media (max-width: 480px) { .vh-btn-row { flex-direction: column; gap: .5rem; } }

/* Language menu (top bar) */
.vh-lang { position: relative; }
.vh-lang-btn { display: inline-flex; align-items: center; gap: .35rem; padding: .45rem .6rem; border: 1px solid var(--vh-border); border-radius: 999px; background: var(--vh-surface); color: var(--vh-text); font: inherit; font-size: .8rem; font-weight: 600; letter-spacing: .04em; cursor: pointer; transition: border-color .15s, color .15s; }
.vh-lang-btn:hover { border-color: var(--vh-accent); color: var(--vh-accent); }
.vh-lang-btn:focus-visible { outline: 2px solid var(--vh-accent); outline-offset: 2px; }
.vh-lang-btn svg.vh-caret { transition: transform .15s; }
.vh-lang-btn[aria-expanded="true"] svg.vh-caret { transform: rotate(180deg); }
.vh-lang-menu { display: none; position: absolute; right: 0; top: calc(100% + .5rem); width: 13.5rem; max-height: min(60vh, 26rem); overflow-y: auto; overscroll-behavior: contain; margin: 0; padding: .4rem; list-style: none; border: 1px solid var(--vh-border); border-radius: 12px; background: var(--vh-surface); box-shadow: 0 16px 40px rgba(16, 24, 40, .16), 0 2px 8px rgba(16, 24, 40, .08); z-index: 80; }
.vh-lang-menu.vh-open { display: block; }
.vh-lang-menu::before { content: ""; position: absolute; top: -0.4rem; right: 1.1rem; width: .55rem; height: .55rem; background: var(--vh-surface); border-left: 1px solid var(--vh-border); border-top: 1px solid var(--vh-border); transform: rotate(45deg); }
.vh-lang-menu li { margin: 0; }
.vh-lang-menu a { display: flex; align-items: center; justify-content: space-between; gap: .5rem; padding: .5rem .6rem; border-radius: 8px; color: var(--vh-text); text-decoration: none; font-size: .9rem; line-height: 1.2; }
.vh-lang-menu a:hover { background: var(--vh-accent); color: #ffffff; }
.vh-lang-menu a:hover .vh-lang-code { color: rgba(255, 255, 255, .75); border-color: rgba(255, 255, 255, .4); }
.vh-lang-menu a:focus-visible { outline: 2px solid var(--vh-accent); outline-offset: -2px; }
.vh-lang-menu a.vh-lang-current { font-weight: 600; }
.vh-lang-menu a.vh-lang-current::before { content: "\2713"; order: -1; color: var(--vh-accent); font-weight: 700; }
.vh-lang-menu a:hover.vh-lang-current::before { color: #ffffff; }
.vh-lang-code { flex: none; padding: .1rem .35rem; border: 1px solid var(--vh-border); border-radius: 4px; color: var(--vh-text-muted); font-size: .68rem; font-weight: 700; letter-spacing: .06em; }
@media (max-width: 767.98px) {
    .vh-lang-menu { position: fixed; top: auto; right: .75rem; left: .75rem; width: auto; max-height: 55vh; }
    .vh-lang-menu::before { display: none; }
}
.vh-summary-warn { border-color: #b45309; background: color-mix(in srgb, #b45309 10%, transparent); }
.vh-summary-warn strong { color: #b45309; }
.vh-alert-warn { border: 1px solid #b45309; background: color-mix(in srgb, #b45309 10%, transparent); border-radius: 10px; padding: 1rem; margin-bottom: 1.25rem; }
.vh-note { color: var(--vh-muted, #6b7280); font-size: .9rem; }
/* Wider auth/consent card on large screens (Steve, 2026-10-27): the 460px
   default leaves the Allow screen cramped at desktop widths. */
@media (min-width: 1100px) {
    .vh-card { max-width: 560px; }
}
