:root {
    color-scheme: dark;
    font-size: 14px;
    --guide-surface: #303034;
    --guide-border: rgba(255, 255, 255, .22);
    --guide-text: rgba(255, 255, 255, .9);
    --guide-muted: rgba(255, 255, 255, .66);
    --guide-accent: #9ebeff;
    --guide-primary: #0f6fc5;
}

* { box-sizing: border-box; }
html, body { width: 100%; height: 100%; }
body { margin: 0; overflow: hidden; background: #242427; color: var(--guide-text); font: 1rem/1.5 system-ui, -apple-system, "Segoe UI", sans-serif; }
button { font: inherit; }
button:focus-visible, a:focus-visible, input:focus-visible, iframe:focus-visible { outline: 2px solid var(--guide-accent); outline-offset: 2px; }
[hidden] { display: none !important; }
.skip-link { position: fixed; z-index: 300; top: 8px; left: 8px; padding: 8px 12px; border-radius: 5px; background: #fff; color: #111; transform: translateY(-160%); }
.skip-link:focus { transform: none; }
.demo-stage { position: fixed; inset: 0; }
.product-frame { display: block; width: 100%; height: 100%; border: 0; background: #242427; }
.frame-loading { position: absolute; z-index: 3; inset: 0; display: grid; place-content: center; gap: 12px; background: #242427; color: var(--guide-muted); text-align: center; transition: opacity .15s; }
.frame-loading.is-hidden { opacity: 0; pointer-events: none; }
.frame-loading span { width: 30px; height: 30px; margin: auto; border: 2px solid rgba(255,255,255,.18); border-top-color: var(--guide-accent); border-radius: 50%; animation: spin .8s linear infinite; }
@keyframes spin { to { transform: rotate(360deg); } }

.is-access-locked .skip-link { display: none; }
.is-access-locked .demo-stage { background: radial-gradient(circle at 35% 35%, #34443f 0, #1b2623 45%, #101714 100%); }
.is-access-locked .frame-loading { display: none; }
.access-gate { position: fixed; z-index: 250; inset: 0; display: grid; place-items: center; padding: 24px; color: #17211e; }
.access-gate-backdrop { position: absolute; inset: 0; background: rgba(11, 20, 18, .72); backdrop-filter: blur(1.5px); }
.access-dialog { position: relative; width: min(560px, 100%); overflow: hidden; border: 1px solid rgba(255,255,255,.5); border-radius: 16px; background: #f7faf8; box-shadow: 0 32px 90px rgba(0,0,0,.55); }
.access-brand { display: flex; align-items: center; gap: 9px; padding: 20px 24px; border-bottom: 1px solid #dfe7e3; color: #18332a; font-weight: 750; }
.access-brand small { margin-left: auto; color: #65746f; font-size: .78rem; font-weight: 650; letter-spacing: .05em; text-transform: uppercase; }
.access-brand-mark { width: 15px; height: 15px; border: 4px solid #2c8469; border-radius: 50%; box-shadow: inset 0 0 0 2px #f7faf8; }
.access-dialog-copy { padding: 32px 32px 20px; }
.access-eyebrow { margin: 0 0 8px; color: #28745e; font-size: .78rem; font-weight: 800; letter-spacing: .09em; text-transform: uppercase; }
.access-dialog h1 { margin: 0 0 10px; color: #15231f; font-size: clamp(1.65rem, 4vw, 2.15rem); line-height: 1.15; }
.access-dialog-copy > p:last-child { max-width: 46ch; margin: 0; color: #5d6b66; }
.access-form { display: grid; gap: 9px; padding: 0 32px 24px; }
.access-form label { color: #263c35; font-size: .86rem; font-weight: 750; }
.access-form input { width: 100%; min-height: 52px; padding: 11px 14px; border: 1px solid #aebdb7; border-radius: 8px; background: #fff; color: #17211e; font: 700 1.1rem/1 system-ui, -apple-system, "Segoe UI", sans-serif; letter-spacing: .2em; }
.access-form input::placeholder { color: #82908b; font-size: .9rem; font-weight: 450; letter-spacing: 0; }
.access-form:has(.access-error:not([hidden])) input { border-color: #b43c3c; box-shadow: 0 0 0 3px rgba(180,60,60,.11); }
.access-error { margin: 0; color: #a02f2f; font-size: .84rem; }
.access-form button { display: flex; align-items: center; justify-content: space-between; min-height: 50px; margin-top: 5px; padding: 11px 16px; border: 1px solid #1c624e; border-radius: 8px; background: #216b55; color: #fff; font-weight: 750; cursor: pointer; }
.access-form button:hover { background: #195542; }
.access-form button span { font-size: 1.25rem; }
.access-privacy { margin: 0; padding: 15px 32px; border-top: 1px solid #dfe7e3; background: #eff4f1; color: #65746f; font-size: .8rem; text-align: center; }

.tour-guide { position: fixed; z-index: 100; right: 18px; bottom: 18px; width: min(430px, calc(100vw - 24px)); overflow: hidden; border: 0; border-radius: 24px; background: #1A63FE; box-shadow: 0 18px 50px rgba(12,40,100,.28); padding: 22px; display: flex; flex-direction: column; color: #fff; }
.tour-guide[data-corner="bottom-left"] { right: auto; left: 18px; }
.tour-guide[data-corner="top-right"] { top: 18px; bottom: auto; }
.tour-guide[data-corner="top-left"] { top: 18px; right: auto; bottom: auto; left: 18px; }
.tour-progress { display: flex; gap: 5px; height: 4px; margin: 18px 0 22px; order: 1; }
.tour-progress span { flex: 1; border-radius: 4px; background: rgba(255,255,255,.25); }
.tour-progress span.is-complete { background: #fff; }
.tour-meta { display: flex; align-items: center; gap: 8px; color: rgba(255,255,255,.8); font-size: .75rem; order: 0; }
.tour-meta > span:first-child { margin-right: auto; color: #fff; font-weight: 400; letter-spacing: .04em; }
.tour-meta > span:nth-child(2) { white-space: nowrap; line-height: 1; }
.tour-meta button { display: grid; place-items: center; flex: 0 0 28px; width: 28px; height: 28px; padding: 0; border: 0; background: none; color: #fff; font-size: 1.6rem; line-height: 1; cursor: pointer; }
.tour-copy { order: 2; }
.tour-copy h1 { margin: 0 0 14px; color: #fff; font-size: 1.2rem; font-weight: 500; line-height: 1.3; }
.tour-copy p { margin: 0 0 18px; color: rgba(255,255,255,.85); font-size: 1rem; line-height: 1.55; }
.tour-value { padding: 12px 14px; border-radius: 12px; background: rgba(255,255,255,.1); }
.tour-value strong { display: block; margin-bottom: 4px; color: rgba(255,255,255,.75); font-size: .7rem; font-weight: 400; letter-spacing: .06em; }
.tour-value span { font-size: .9rem; }
.tour-actions { display: flex; align-items: center; justify-content: space-between; gap: 12px; padding-top: 22px; order: 3; }
.tour-actions button { min-height: 30px; padding: 8px 12px; border: 0; border-radius: 12px; background: transparent; color: #fff; font-weight: 400; cursor: pointer; }
.tour-actions button:disabled { opacity: .4; cursor: default; }
.tour-actions .primary-button { background: #fff; color: #192333; }
.tour-actions .primary-button:hover { background: #edf3ff; }
.tour-guide button:focus-visible { outline: 2px solid #fff; outline-offset: 3px; }
.resume-guide { position: fixed; z-index: 90; right: 14px; bottom: 14px; min-height: 40px; padding: 8px 13px; border: 1px solid var(--guide-border); border-radius: 20px; background: var(--guide-surface); color: #fff; box-shadow: 0 10px 30px rgba(0,0,0,.4); cursor: pointer; }
.demo-exit { position: fixed; z-index: 110; top: 12px; left: 50%; transform: translateX(-50%); display: inline-flex; align-items: center; gap: 8px; min-height: 40px; padding: 8px 16px; border: 1px solid #dce3ed; border-radius: 25px; background: #fff; color: #192333; text-decoration: none; box-shadow: 0 4px 16px rgba(0,0,0,.15); }
.demo-exit:hover { background: #edf4ff; }
.core-report-switcher { position: fixed; z-index: 95; left: 16px; bottom: 16px; }
.core-report-trigger { min-height: 40px; padding: 8px 14px; border: 1px solid var(--guide-border); border-radius: 20px; background: var(--guide-surface); color: var(--guide-text); box-shadow: 0 10px 30px rgba(0,0,0,.35); cursor: pointer; }
.core-report-menu { position: absolute; bottom: 52px; left: 0; width: min(300px, calc(100vw - 32px)); padding: 20px; border: 1px solid #e7eaf0; border-radius: 16px; background: #fff; color: #192333; box-shadow: 0 16px 45px rgba(0,0,0,.2); }
.core-report-menu strong { display: block; font-size: 1.1rem; font-weight: 600; }
.core-report-progress-label { margin: 6px 0 10px; font-size: .8rem; color: #687282; }
.core-report-progress { display: block; appearance: none; width: 100%; height: 7px; margin: 0 0 15px; border: 0; border-radius: 8px; overflow: hidden; background: #e2eaff; color: #1A63FE; }
.core-report-progress::-webkit-progress-bar { background: #e2eaff; border-radius: 8px; }
.core-report-progress::-webkit-progress-value { background: #1A63FE; border-radius: 8px; }
.core-report-progress::-moz-progress-bar { background: #1A63FE; border-radius: 8px; }
.core-report-menu button { display: flex; align-items: center; gap: 10px; width: 100%; min-height: 44px; padding: 9px 6px; border: 0; border-radius: 8px; background: transparent; color: #364152; text-align: left; cursor: pointer; }
.core-report-menu button::before { content: ''; flex: 0 0 18px; height: 18px; border: 1px solid #c8d0e0; border-radius: 50%; }
.core-report-menu button.is-explored::before { content: '✓'; display: grid; place-items: center; background: #1A63FE; border-color: #1A63FE; color: #fff; font-size: 12px; }
.core-report-menu button::after { content: '›'; margin-left: auto; color: #a5afc0; }
.core-report-menu button:hover, .core-report-menu button:focus-visible, .core-report-menu button.is-active { background: #f0f5ff; }
.demo-toast { position: fixed; z-index: 120; top: 74px; left: 50%; max-width: min(520px, calc(100vw - 30px)); padding: 9px 13px; border: 1px solid var(--guide-border); border-radius: 6px; background: var(--guide-surface); color: var(--guide-text); opacity: 0; transform: translate(-50%, -8px); pointer-events: none; transition: .18s; }
.demo-toast.is-visible { opacity: 1; transform: translate(-50%, 0); }
@media (max-width: 700px) {
    .tour-guide { right: 8px; bottom: 8px; }
    .tour-guide[data-corner="bottom-left"] { left: 8px; }
    .tour-guide[data-corner="top-right"] { top: 8px; }
    .tour-guide[data-corner="top-left"] { top: 8px; left: 8px; }
    .tour-copy { max-height: 34vh; overflow: auto; }
    .core-report-switcher { left: 8px; bottom: 8px; }
}
@media (max-width: 480px) {
    .access-gate { padding: 12px; }
    .access-brand { padding: 16px 18px; }
    .access-dialog-copy { padding: 25px 20px 17px; }
    .access-form { padding: 0 20px 20px; }
    .access-privacy { padding: 13px 20px; }
    .tour-guide { width: calc(100vw - 16px); }
    .tour-meta { padding-right: 10px; padding-left: 10px; }
    .tour-copy { padding-right: 10px; padding-left: 10px; }
    .tour-actions { gap: 8px; padding-right: 10px; padding-left: 10px; }
    .tour-actions button { min-width: 0; }
    .core-report-switcher,
    .resume-guide { max-width: calc(50vw - 12px); }
    .core-report-trigger,
    .resume-guide {
        overflow: hidden;
        padding-right: 10px;
        padding-left: 10px;
        text-overflow: ellipsis;
        white-space: nowrap;
    }
}
@media (prefers-reduced-motion: reduce) { *, *::before, *::after { animation-duration: .01ms !important; transition-duration: .01ms !important; } }
@media print { .access-gate, .tour-guide, .resume-guide, .core-report-switcher, .demo-toast, .frame-loading { display: none !important; } }

body.is-welcome .tour-guide,
body.is-welcome .core-report-switcher { visibility: hidden; }
.welcome-dialog {
    box-sizing: border-box;
    width: min(520px, calc(100vw - 32px));
    max-height: calc(100dvh - 32px);
    padding: clamp(24px, 5vw, 44px);
    border: 1px solid #e2e6ed;
    border-radius: 18px;
    background: #fff;
    color: #192333;
    text-align: center;
    box-shadow: 0 24px 80px rgba(0,0,0,.25);
}
.welcome-dialog::backdrop {
    background: rgba(20,25,34,.5);
    -webkit-backdrop-filter: blur(2px);
    backdrop-filter: blur(2px);
}
.welcome-icon { display: grid; place-items: center; width: 104px; height: 104px; margin: 0 auto 20px; border-radius: 50%; background: #edf9ff; }
.welcome-eyebrow { color: #1A63FE; font-size: .75rem; font-weight: 400; letter-spacing: .1em; }
.welcome-dialog h1 { margin: 14px 0; font-size: 24px; line-height: 1.2; }
.welcome-dialog p { line-height: 1.6; }
.welcome-dialog button { margin-top: 14px; padding: 12px 26px; border: 0; border-radius: 8px; background: #1A63FE; color: #fff; font: inherit; font-weight: 400; cursor: pointer; }
.welcome-dialog button:focus-visible { outline: 3px solid #92bbf5; outline-offset: 4px; }
.welcome-dialog .welcome-note { margin: 20px 0 0; color: #687282; font-size: .8rem; }

.welcome-icon svg { width: 84px; height: 84px; }
