:root {
    --font-sans: -apple-system, BlinkMacSystemFont, "SF Pro Display", "Helvetica Neue", "Helvetica", "Arial", sans-serif;

    /* Light Mode Colors */
    --background-light: #f8fafc;
    --text-light: rgba(15, 23, 42, 0.94);
    --text-secondary-light: #5b687c;
    --primary-light: #0d70c5;
    --card-background-light: #ffffff;
    --border-light: rgba(15, 23, 42, 0.12);

    /* Dark Mode Colors */
    --background-dark: #090b0d;
    --text-dark: rgba(248, 250, 252, 0.96);
    --text-secondary-dark: #aeb9c8;
    --primary-dark: #5bb2ff;
    --card-background-dark: #0f1216;
    --border-dark: rgba(248, 250, 252, 0.08);

    --radius: 8px;
}

body {
    font-family: var(--font-sans);
}

/* Accessibility contrast floor for reusable secondary-copy utilities.
   The Tailwind runtime still emits these classes from per-page config, so keep
   the final color source centralized here to prevent theme drift. */
.text-text-secondary-light {
    color: var(--text-secondary-light) !important;
}

.dark .dark\:text-text-secondary-dark {
    color: var(--text-secondary-dark) !important;
}

.dark .dark\:text-gray-400 {
    color: #aeb9c8 !important;
}

.dark .dark\:text-gray-300 {
    color: #c7d1df !important;
}

.site-shell {
    background:
        linear-gradient(180deg, rgba(255,255,255,0.92) 0%, rgba(248,250,252,0.72) 38%, rgba(241,245,249,0.92) 100%),
        linear-gradient(135deg, rgba(14,165,233,0.12) 0%, rgba(16,185,129,0.10) 42%, rgba(244,63,94,0.08) 100%);
}

.dark .site-shell {
    background:
        linear-gradient(180deg, rgba(16,20,25,0.94) 0%, rgba(15,23,42,0.86) 42%, rgba(12,16,22,0.98) 100%),
        linear-gradient(135deg, rgba(91,178,255,0.12) 0%, rgba(52,211,153,0.08) 48%, rgba(251,113,133,0.08) 100%);
}

.feature-card {
    min-height: 17rem;
}

.product-frame img {
    transform: translateZ(0);
}

.hero-demo {
    position: relative;
    min-width: 0;
    max-width: 100%;
    overflow: hidden;
    border: 1px solid var(--border-light);
    border-radius: 8px;
    background: rgba(255, 255, 255, 0.72);
    box-shadow: 0 24px 80px -38px rgba(15, 23, 42, 0.48);
    backdrop-filter: blur(18px) saturate(150%);
    -webkit-backdrop-filter: blur(18px) saturate(150%);
}

.dark .hero-demo {
    border-color: rgba(255, 255, 255, 0.12);
    background: rgba(15, 23, 42, 0.44);
}

.hero-demo-tabs {
    position: absolute;
    top: 10px;
    left: 10px;
    z-index: 30;
    display: inline-flex;
    gap: 4px;
    padding: 4px;
    border-radius: 8px;
    border: 1px solid rgba(15, 23, 42, 0.08);
    background: rgba(255, 255, 255, 0.86);
    box-shadow: 0 10px 28px rgba(15, 23, 42, 0.12);
    backdrop-filter: blur(16px) saturate(160%);
    -webkit-backdrop-filter: blur(16px) saturate(160%);
}

.dark .hero-demo-tabs {
    border-color: rgba(255, 255, 255, 0.12);
    background: rgba(15, 23, 42, 0.78);
}

.hero-demo-tab {
    display: inline-flex;
    align-items: center;
    gap: 5px;
    height: 28px;
    padding: 0 9px;
    border-radius: 6px;
    color: rgba(71, 85, 105, 0.92);
    font-size: 11px;
    font-weight: 800;
    line-height: 1;
    white-space: nowrap;
    transition: background 0.2s ease, color 0.2s ease;
}

.dark .hero-demo-tab {
    color: rgba(226, 232, 240, 0.78);
}

.hero-demo-tab.is-active {
    background: var(--primary-light);
    color: white;
}

.dark .hero-demo-tab.is-active {
    background: var(--primary-dark);
    color: #07111f;
}

.hero-demo-stage {
    position: relative;
    width: 100%;
    min-width: 0;
    /* Unified across all hero-demo modes (text / file / drag / ocr).
       Slightly taller than 16:10 so the framed text + result blocks all fit
       comfortably without the Mac window having to clip its own children. */
    aspect-ratio: 16 / 12.4;
    min-height: 480px;
    background:
        linear-gradient(135deg, rgba(226, 232, 240, 0.9), rgba(248, 250, 252, 0.86)),
        linear-gradient(135deg, rgba(14, 165, 233, 0.14), rgba(16, 185, 129, 0.10));
}

.dark .hero-demo-stage {
    background:
        linear-gradient(135deg, rgba(15, 23, 42, 0.88), rgba(2, 6, 23, 0.9)),
        linear-gradient(135deg, rgba(91, 178, 255, 0.14), rgba(52, 211, 153, 0.08));
}

.hero-demo-panel {
    position: absolute;
    inset: 0;
    opacity: 0;
    transform: translateY(10px) scale(0.985);
    pointer-events: none;
    transition: opacity 0.35s ease, transform 0.35s ease;
}

.hero-demo-panel.is-active {
    opacity: 1;
    transform: translateY(0) scale(1);
    pointer-events: auto;
}

.hero-mac-window {
    position: absolute;
    left: 5.2%;
    right: 5.2%;
    /* Shared inset for every channel so all four "Mac windows" feel uniform. */
    top: 9%;
    bottom: 6%;
    overflow: hidden;
    z-index: 1; /* keep window beneath all floating popovers */
    border: 1px solid rgba(15, 23, 42, 0.12);
    border-radius: 8px;
    background: rgba(255, 255, 255, 0.9);
    box-shadow: 0 24px 70px rgba(15, 23, 42, 0.26);
}

.dark .hero-mac-window {
    border-color: rgba(255, 255, 255, 0.12);
    background: rgba(15, 23, 42, 0.94);
}

.hero-titlebar {
    height: 36px;
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 0 12px;
    border-bottom: 1px solid rgba(15, 23, 42, 0.08);
    background: rgba(248, 250, 252, 0.78);
}

.dark .hero-titlebar {
    border-bottom-color: rgba(255, 255, 255, 0.1);
    background: rgba(30, 41, 59, 0.74);
}

.hero-traffic {
    display: flex;
    gap: 6px;
}

.hero-traffic span {
    width: 9px;
    height: 9px;
    border-radius: 999px;
    background: #ff5f57;
}

.hero-traffic span:nth-child(2) {
    background: #febc2e;
}

.hero-traffic span:nth-child(3) {
    background: #28c840;
}

.hero-window-title {
    font-size: 11px;
    font-weight: 800;
    color: rgba(15, 23, 42, 0.72);
}

.dark .hero-window-title {
    color: rgba(226, 232, 240, 0.8);
}

.hero-title-icons {
    display: flex;
    gap: 8px;
    color: rgba(100, 116, 139, 0.9);
}

.hero-title-icons .material-symbols-outlined {
    font-size: 16px;
}

.hero-notes-body,
.hero-finder-body {
    display: grid;
    min-width: 0;
    height: calc(100% - 36px);
}

.hero-notes-body {
    grid-template-columns: 26% 27% 1fr;
}

.hero-finder-body {
    grid-template-columns: 1fr;
}

.hero-notes-sidebar,
.hero-finder-sidebar {
    padding: 14px 9px;
    border-right: 1px solid rgba(15, 23, 42, 0.08);
    background: rgba(226, 232, 240, 0.58);
}

.dark .hero-notes-sidebar,
.dark .hero-finder-sidebar {
    border-right-color: rgba(255, 255, 255, 0.08);
    background: rgba(30, 41, 59, 0.54);
}

.hero-sidebar-row {
    overflow: hidden;
    white-space: nowrap;
    text-overflow: ellipsis;
    border-radius: 6px;
    padding: 6px 8px;
    color: rgba(71, 85, 105, 0.86);
    font-size: 11px;
    font-weight: 700;
}

.hero-sidebar-row.is-active {
    background: rgba(255, 255, 255, 0.72);
    color: rgba(15, 23, 42, 0.9);
}

.dark .hero-sidebar-row {
    color: rgba(203, 213, 225, 0.74);
}

.dark .hero-sidebar-row.is-active {
    background: rgba(255, 255, 255, 0.1);
    color: white;
}

.hero-notes-list {
    min-width: 0;
    padding: 14px 10px;
    border-right: 1px solid rgba(15, 23, 42, 0.08);
    background: rgba(248, 250, 252, 0.82);
}

.dark .hero-notes-list {
    border-right-color: rgba(255, 255, 255, 0.08);
    background: rgba(15, 23, 42, 0.74);
}

.hero-note-card {
    margin-bottom: 8px;
    border-radius: 6px;
    padding: 8px;
    color: rgba(71, 85, 105, 0.86);
    font-size: 11px;
}

.hero-note-card strong,
.hero-note-card span {
    display: block;
    overflow: hidden;
    white-space: nowrap;
    text-overflow: ellipsis;
}

.hero-note-card span {
    margin-top: 3px;
    color: rgba(100, 116, 139, 0.72);
    font-size: 10px;
}

.hero-note-card.is-active {
    background: #f5b335;
    color: #1f2937;
}

.hero-note-card.is-active span {
    color: rgba(31, 41, 55, 0.62);
}

.hero-editor {
    position: relative;
    min-width: 0;
    padding: 38px 26px;
    background: rgba(255, 255, 255, 0.88);
}

.dark .hero-editor {
    background: rgba(2, 6, 23, 0.66);
}

.hero-editor-date {
    margin-bottom: 20px;
    color: rgba(100, 116, 139, 0.68);
    font-size: 10px;
    text-align: center;
}

.hero-text-line {
    position: relative;
    width: fit-content;
    max-width: 100%;
    overflow: hidden;
    margin: 14px 0;
    padding: 4px 5px;
    border-radius: 2px;
    color: rgba(15, 23, 42, 0.92);
    font-size: 18px;
    font-weight: 800;
    line-height: 1.25;
}

.dark .hero-text-line {
    color: rgba(248, 250, 252, 0.94);
}

.hero-text-highlight {
    position: absolute;
    inset: 3px auto 3px 0;
    z-index: 0;
    width: 0;
    border-radius: 2px;
    background: rgba(15, 122, 216, 0.28);
    transition: width 0.82s cubic-bezier(0.22, 1, 0.36, 1);
}

.hero-text-content {
    position: relative;
    z-index: 1;
    display: block;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.hero-text-cursor {
    position: absolute;
    z-index: 50;
    width: 2px;
    height: 22px;
    opacity: 0;
    border-radius: 2px;
    background: var(--primary-light);
    transition: left 0.82s cubic-bezier(0.22, 1, 0.36, 1), top 0.22s ease, opacity 0.18s ease;
}

.dark .hero-text-cursor {
    background: var(--primary-dark);
}

.hero-text-cursor.is-visible {
    opacity: 1;
    animation: blink 1s step-end infinite;
}

.native-toolbar,
/* Match refined toolbar-preview-surface shell */
.hero-context-toolbar {
    position: absolute;
    z-index: 60;
    display: flex;
    align-items: center;
    gap: 2px;
    width: max-content;
    min-height: 2.25rem;
    height: auto;
    padding: 4px;
    color: rgba(29, 29, 31, 0.92);
    background: linear-gradient(180deg, rgba(255, 255, 255, 0.97), rgba(240, 242, 247, 0.94));
    backdrop-filter: blur(22px) saturate(180%);
    -webkit-backdrop-filter: blur(22px) saturate(180%);
    border-radius: 10px;
    border: 1px solid rgba(31, 41, 55, 0.13);
    box-shadow: 0 8px 20px rgba(42, 55, 74, 0.18);
    box-sizing: border-box;
    opacity: 0;
    transform: translateY(8px) scale(0.96);
    pointer-events: none;
    transition: opacity 0.22s ease, transform 0.22s cubic-bezier(0.16, 1, 0.3, 1), background 0.2s, border-color 0.2s, box-shadow 0.2s;
}

.hero-context-toolbar.vertical {
    flex-direction: column;
    align-items: stretch;
    height: auto;
    width: max-content;
    max-width: calc(100% - 24px);
    padding: 4px;
    gap: 2px;
}

.dark .native-toolbar,
.dark .hero-context-toolbar {
    color: rgba(255, 255, 255, 0.92);
    background: linear-gradient(180deg, rgba(45, 45, 48, 0.94), rgba(27, 27, 29, 0.92));
    border: 1px solid rgba(255, 255, 255, 0.12);
    box-shadow: 0 8px 20px rgba(0, 0, 0, 0.28);
}

/* Top edge highlight */
.native-toolbar::before,
.hero-context-toolbar::before,
.hero-ocr-toolbar::before {
    content: "";
    position: absolute;
    top: 0;
    left: 8px;
    right: 8px;
    height: 1px;
    background: rgba(255, 255, 255, 0.72);
    pointer-events: none;
    border-radius: 1px;
}

.dark .native-toolbar::before,
.dark .hero-context-toolbar::before,
.dark .hero-ocr-toolbar::before {
    background: rgba(255, 255, 255, 0.14);
}

.hero-context-toolbar.is-visible {
    opacity: 1;
    transform: translateY(0) scale(1);
    pointer-events: auto;
}

/* Match refined toolbar-preview-item chips */
.native-toolbar-item,
.hero-toolbar-action {
    display: flex;
    flex-direction: row;
    justify-content: center;
    align-items: center;
    gap: 5px;
    width: auto;
    min-width: 28px;
    height: 28px;
    padding: 0 8px;
    overflow: hidden;
    border-radius: 7px;
    color: inherit;
    font-size: 10px;
    font-weight: 650;
    white-space: nowrap;
    cursor: pointer;
    user-select: none;
    transition: background 0.18s ease, box-shadow 0.18s ease, color 0.15s ease, transform 0.15s ease;
    border: none;
    background: transparent;
}

.hero-toolbar-action span:not(.material-symbols-outlined) {
    display: none;
    max-width: 96px;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.hero-toolbar-action .toolbar-preview-name {
    display: none;
    max-width: 96px;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.hero-context-toolbar.vertical .hero-toolbar-action {
    flex-direction: row;
    width: 100%;
    min-width: 0;
    height: 28px;
    justify-content: flex-start;
    padding: 0 8px;
    gap: 6px;
}

.hero-context-toolbar.vertical .hero-toolbar-action span:not(.material-symbols-outlined),
.hero-context-toolbar.vertical .hero-toolbar-action .toolbar-preview-name {
    display: block;
}

/* Horizontal hero toolbars: icons-only chip row like toolbar-preview-surface */
.hero-context-toolbar:not(.vertical) .hero-toolbar-action {
    width: 28px;
    min-width: 28px;
    padding: 0;
}

.hero-context-toolbar.toolbar-preview-surface {
    position: absolute;
}

.dark .native-toolbar-item,
.dark .hero-toolbar-action {
    color: rgba(255, 255, 255, 0.92);
}

.native-toolbar-item:hover,
.hero-toolbar-action:hover {
    background: rgba(0, 0, 0, 0.065);
    box-shadow: inset 0 0 0 1px rgba(0, 0, 0, 0.04);
    color: inherit;
}

.dark .native-toolbar-item:hover,
.dark .hero-toolbar-action:hover {
    background: rgba(255, 255, 255, 0.14);
    box-shadow: inset 0 0 0 1px rgba(255, 255, 255, 0.08);
    color: inherit;
}

.native-toolbar-item .material-symbols-outlined,
.hero-toolbar-action .material-symbols-outlined {
    width: 16px;
    height: 16px;
    flex: 0 0 16px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    font-size: 15px !important;
    color: #007aff;
    transform-origin: center;
    transition: color 0.15s ease, transform 0.15s ease, filter 0.15s ease;
}

.dark .native-toolbar-item .material-symbols-outlined,
.dark .hero-toolbar-action .material-symbols-outlined {
    color: #0a84ff;
}

.native-toolbar-item:hover .material-symbols-outlined,
.hero-toolbar-action:hover .material-symbols-outlined {
    color: #007aff;
}

.dark .native-toolbar-item:hover .material-symbols-outlined,
.dark .hero-toolbar-action:hover .material-symbols-outlined {
    color: #0a84ff;
}

.native-toolbar-item:active,
.native-toolbar-item.is-armed,
.hero-toolbar-action:active,
.hero-toolbar-action.is-armed,
.hero-toolbar-action.is-primary.is-armed {
    background: rgba(0, 0, 0, 0.065) !important;
    box-shadow: inset 0 0 0 1px rgba(0, 0, 0, 0.04) !important;
    color: inherit !important;
    border: none !important;
}

.dark .native-toolbar-item:active,
.dark .native-toolbar-item.is-armed,
.dark .hero-toolbar-action:active,
.dark .hero-toolbar-action.is-armed,
.dark .hero-toolbar-action.is-primary.is-armed {
    background: rgba(255, 255, 255, 0.14) !important;
    box-shadow: inset 0 0 0 1px rgba(255, 255, 255, 0.08) !important;
    color: inherit !important;
    border: none !important;
}

.hero-toolbar-action.is-armed .material-symbols-outlined.symbol-animated,
.hero-toolbar-action:hover .material-symbols-outlined.symbol-animated.is-dynamic,
.hero-toolbar-action.is-armed .material-symbols-outlined {
    animation: toolbar-lottie-play 1.15s cubic-bezier(0.4, 0, 0.2, 1) infinite;
}

/* SF Symbol / Icon Animated Effects from Onboarding.html */
.symbol-animated {
    display: inline-block !important;
    transition: transform 0.2s cubic-bezier(0.16, 1, 0.3, 1);
}

.native-toolbar-item:hover .symbol-bounce,
.hero-toolbar-action:hover .symbol-bounce,
.hero-ocr-toolbar-action:hover .symbol-bounce,
.hero-toolbar-action.is-armed .symbol-bounce,
.hero-ocr-toolbar-action.is-armed .symbol-bounce {
    animation: sf-bounce 0.5s cubic-bezier(0.25, 0.46, 0.45, 0.94) both;
}

.autoplay-anim.symbol-bounce {
    animation: sf-bounce 1.8s cubic-bezier(0.25, 0.46, 0.45, 0.94) infinite;
    animation-delay: 0.2s;
}

@keyframes sf-bounce {
    0% { transform: translateY(0); }
    30% { transform: translateY(-4px) scaleY(1.08); }
    50% { transform: translateY(0) scaleY(0.92); }
    75% { transform: translateY(-1.5px) scaleY(1.02); }
    100% { transform: translateY(0) scaleY(1); }
}

.native-toolbar-item:hover .symbol-rotate,
.hero-toolbar-action:hover .symbol-rotate,
.hero-ocr-toolbar-action:hover .symbol-rotate,
.hero-toolbar-action.is-armed .symbol-rotate,
.hero-ocr-toolbar-action.is-armed .symbol-rotate {
    animation: sf-rotate 0.6s cubic-bezier(0.16, 1, 0.3, 1) both;
}

.autoplay-anim.symbol-rotate {
    animation: sf-rotate 2.4s cubic-bezier(0.16, 1, 0.3, 1) infinite;
    animation-delay: 0.4s;
}

@keyframes sf-rotate {
    0% { transform: rotate(0deg); }
    100% { transform: rotate(360deg); }
}

.native-toolbar-item:hover .symbol-wiggle,
.hero-toolbar-action:hover .symbol-wiggle,
.hero-ocr-toolbar-action:hover .symbol-wiggle,
.hero-toolbar-action.is-armed .symbol-wiggle,
.hero-ocr-toolbar-action.is-armed .symbol-wiggle {
    animation: sf-wiggle 0.5s ease-in-out both;
}

.autoplay-anim.symbol-wiggle {
    animation: sf-wiggle 1.6s ease-in-out infinite;
    animation-delay: 0.6s;
}

@keyframes sf-wiggle {
    0%, 100% { transform: rotate(0deg); }
    25% { transform: rotate(-10deg) scale(1.05); }
    75% { transform: rotate(10deg) scale(1.05); }
}

.native-toolbar-item:hover .symbol-squeeze,
.hero-toolbar-action:hover .symbol-squeeze,
.hero-ocr-toolbar-action:hover .symbol-squeeze,
.hero-toolbar-action.is-armed .symbol-squeeze,
.hero-ocr-toolbar-action.is-armed .symbol-squeeze {
    animation: sf-squeeze 0.5s ease-in-out both;
}

.autoplay-anim.symbol-squeeze {
    animation: sf-squeeze 1.6s ease-in-out infinite;
    animation-delay: 0.8s;
}

@keyframes sf-squeeze {
    0%, 100% { transform: scale(1); }
    50% { transform: scaleX(1.2) scaleY(0.85); }
}

.native-toolbar-item:hover .symbol-pulse,
.hero-toolbar-action:hover .symbol-pulse,
.hero-ocr-toolbar-action:hover .symbol-pulse,
.hero-toolbar-action.is-armed .symbol-pulse,
.hero-ocr-toolbar-action.is-armed .symbol-pulse {
    animation: sf-pulse 0.6s ease-in-out infinite alternate;
}

@keyframes sf-pulse {
    0% { transform: scale(1); opacity: 1; }
    100% { transform: scale(1.15); opacity: 0.8; }
}

.hero-translate-card,
.hero-ai-card,
.hero-image-card,
.hero-progress-card {
    position: absolute;
    z-index: 70;
    width: 210px;
    border: 1px solid rgba(15, 23, 42, 0.1);
    border-radius: 8px;
    background: rgba(255, 255, 255, 0.94);
    box-shadow: 0 22px 52px rgba(15, 23, 42, 0.22);
    opacity: 0;
    transform: translateY(10px) scale(0.96);
    transition: opacity 0.24s ease, transform 0.24s ease;
}

.dark .hero-translate-card,
.dark .hero-ai-card,
.dark .hero-image-card,
.dark .hero-progress-card {
    border-color: rgba(255, 255, 255, 0.12);
    background: rgba(15, 23, 42, 0.94);
}

.hero-translate-card.is-visible,
.hero-ai-card.is-visible,
.hero-image-card.is-visible,
.hero-progress-card.is-visible {
    opacity: 1;
    transform: translateY(0) scale(1);
}

.hero-card-head {
    display: flex;
    align-items: center;
    gap: 7px;
    padding: 9px 10px;
    border-bottom: 1px solid rgba(15, 23, 42, 0.08);
    color: rgba(15, 23, 42, 0.9);
    font-size: 12px;
}

.dark .hero-card-head {
    border-bottom-color: rgba(255, 255, 255, 0.1);
    color: white;
}

.hero-card-head .material-symbols-outlined {
    font-size: 17px;
    color: var(--primary-light);
}

.hero-card-head em {
    margin-left: auto;
    color: var(--primary-light);
    font-style: normal;
    font-weight: 900;
}

.hero-lang-row {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 8px;
    padding: 9px 10px 0;
    color: rgba(100, 116, 139, 0.9);
    font-size: 10px;
    font-weight: 800;
}

.hero-lang-row .material-symbols-outlined {
    font-size: 14px;
}

.hero-translation-output {
    min-height: 42px;
    margin: 9px 10px 10px;
    border-radius: 6px;
    background: rgba(15, 122, 216, 0.08);
    padding: 10px;
    color: rgba(15, 23, 42, 0.92);
    font-size: 12px;
    font-weight: 800;
    line-height: 1.5;
}

.dark .hero-translation-output {
    color: white;
    background: rgba(91, 178, 255, 0.12);
}

.hero-ai-output {
    min-height: 62px;
    margin: 10px;
    border-radius: 6px;
    background: rgba(15, 122, 216, 0.08);
    padding: 10px;
    color: rgba(15, 23, 42, 0.92);
    font-size: 12px;
    font-weight: 800;
    line-height: 1.45;
}

.dark .hero-ai-output {
    color: white;
    background: rgba(91, 178, 255, 0.12);
}

.hero-ai-controls {
    display: flex;
    gap: 6px;
    padding: 0 10px 10px;
    color: rgba(100, 116, 139, 0.8);
    font-size: 10px;
    font-weight: 850;
}

.hero-ai-controls span,
.hero-ai-controls b {
    border-radius: 999px;
    background: rgba(15, 23, 42, 0.06);
    padding: 4px 7px;
}

.hero-ai-controls b {
    margin-left: auto;
    color: #159947;
}

.dark .hero-ai-controls span,
.dark .hero-ai-controls b {
    background: rgba(255, 255, 255, 0.1);
}

.hero-image-card {
    width: 190px;
}

.hero-image-preview {
    margin: 10px;
    border-radius: 8px;
    background:
        linear-gradient(145deg, rgba(14, 165, 233, 0.72), rgba(16, 185, 129, 0.68)),
        linear-gradient(180deg, rgba(255, 255, 255, 0.94), rgba(226, 232, 240, 0.76));
    padding: 14px;
}

.hero-generated-icon {
    display: flex;
    aspect-ratio: 1;
    width: 72px;
    margin: 0 auto;
    align-items: center;
    justify-content: center;
    border-radius: 18px;
    overflow: hidden;
    background: rgba(255, 255, 255, 0.65);
    box-shadow:
        inset 0 1px 0 rgba(255, 255, 255, 0.8),
        0 16px 32px rgba(15, 23, 42, 0.2);
}

.hero-generated-icon img {
    width: 100%;
    height: 100%;
    object-fit: contain;
    display: block;
}

.hero-generated-icon .material-symbols-outlined {
    font-size: 34px;
    color: var(--primary-light);
}

.hero-image-card p {
    margin: 0 10px 10px;
    color: rgba(71, 85, 105, 0.88);
    font-size: 10px;
    font-weight: 800;
    line-height: 1.35;
    text-align: center;
}

.dark .hero-image-card p {
    color: rgba(226, 232, 240, 0.82);
}

.hero-finder-sidebar {
    padding-top: 18px;
}

.hero-file-list {
    min-width: 0;
    width: 100%;
    overflow-x: hidden;
    overflow-y: auto;
    scrollbar-width: none;
    padding: 14px 14px 16px;
    border-right: none;
    background: rgba(255, 255, 255, 0.84);
}

.hero-file-list::-webkit-scrollbar {
    display: none;
}

.dark .hero-file-list {
    border-right: none;
    background: rgba(2, 6, 23, 0.55);
}

.hero-file-row {
    display: flex;
    min-width: 0;
    align-items: center;
    gap: 10px;
    margin-bottom: 6px;
    border: 1px solid transparent;
    border-radius: 7px;
    padding: 7px 8px;
    transition: border 0.2s ease, background 0.2s ease, opacity 0.2s ease;
}

.hero-file-row.is-selected {
    border-color: rgba(15, 122, 216, 0.24);
    background: rgba(15, 122, 216, 0.12);
}

.hero-file-row.is-dimmed {
    opacity: 0.5;
}

.hero-file-row strong,
.hero-file-row small {
    display: block;
    overflow: hidden;
    white-space: nowrap;
    text-overflow: ellipsis;
}

.hero-file-row > span:last-child {
    min-width: 0;
    flex: 1 1 auto;
}

.hero-file-row strong {
    max-width: none;
    color: rgba(15, 23, 42, 0.9);
    font-size: 12px;
    font-weight: 850;
}

.dark .hero-file-row strong {
    color: rgba(248, 250, 252, 0.92);
}

.hero-file-row small {
    color: rgba(100, 116, 139, 0.76);
    font-size: 10px;
    font-weight: 700;
}

.hero-file-thumb {
    width: 34px;
    height: 30px;
    flex: none;
    border-radius: 6px;
    box-shadow: inset 0 0 0 1px rgba(15, 23, 42, 0.08);
}

.hero-file-thumb-image {
    background:
        linear-gradient(135deg, rgba(14, 165, 233, 0.7), rgba(16, 185, 129, 0.72)),
        linear-gradient(180deg, #e0f2fe, #ffffff);
}

.hero-file-thumb-image.alt {
    background:
        linear-gradient(135deg, rgba(244, 63, 94, 0.58), rgba(251, 191, 36, 0.68)),
        linear-gradient(180deg, #fff7ed, #ffffff);
}

.hero-file-thumb-image.portrait {
    background:
        linear-gradient(135deg, rgba(168, 85, 247, 0.58), rgba(14, 165, 233, 0.68)),
        linear-gradient(180deg, #f5f3ff, #ffffff);
}

.hero-file-thumb-video {
    background:
        linear-gradient(135deg, rgba(30, 41, 59, 0.9), rgba(99, 102, 241, 0.76)),
        linear-gradient(180deg, #e0e7ff, #ffffff);
}

.hero-file-thumb-video.trailer {
    background:
        linear-gradient(135deg, rgba(244, 63, 94, 0.78), rgba(99, 102, 241, 0.74)),
        linear-gradient(180deg, #ffe4e6, #ffffff);
}

.hero-file-thumb-video.screen {
    background:
        linear-gradient(135deg, rgba(15, 23, 42, 0.9), rgba(16, 185, 129, 0.72)),
        linear-gradient(180deg, #dcfce7, #ffffff);
}

.hero-preview-pane {
    display: flex;
    min-width: 0;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    padding: 20px;
    text-align: center;
}

.hero-preview-stack {
    position: relative;
    width: 80px;
    height: 62px;
    margin-bottom: 14px;
}

.hero-preview-stack span {
    position: absolute;
    width: 56px;
    height: 44px;
    border-radius: 7px;
    box-shadow: 0 10px 24px rgba(15, 23, 42, 0.14);
}

.hero-preview-stack span:nth-child(1) {
    left: 2px;
    top: 8px;
    background: rgba(14, 165, 233, 0.72);
    transform: rotate(-8deg);
}

.hero-preview-stack span:nth-child(2) {
    left: 14px;
    top: 4px;
    background: rgba(99, 102, 241, 0.76);
    transform: rotate(5deg);
}

.hero-preview-stack span:nth-child(3) {
    left: 24px;
    top: 12px;
    background: rgba(16, 185, 129, 0.74);
}

.hero-preview-pane strong {
    color: rgba(15, 23, 42, 0.92);
    font-size: 13px;
    font-weight: 900;
}

.dark .hero-preview-pane strong {
    color: white;
}

.hero-preview-pane small {
    margin-top: 4px;
    color: rgba(100, 116, 139, 0.78);
    font-size: 10px;
    font-weight: 750;
}

.hero-preview-info {
    width: 100%;
    margin-top: 16px;
    border-top: 1px solid rgba(15, 23, 42, 0.08);
    padding-top: 13px;
    text-align: left;
}

.dark .hero-preview-info {
    border-top-color: rgba(255, 255, 255, 0.1);
}

.hero-preview-info span {
    display: block;
    color: rgba(100, 116, 139, 0.76);
    font-size: 10px;
    font-weight: 800;
}

.hero-preview-info b {
    display: block;
    margin-top: 6px;
    color: var(--primary-light);
    font-size: 11px;
}

.hero-file-cursor {
    position: absolute;
    z-index: 80;
    width: 16px;
    height: 22px;
    opacity: 0;
    filter: drop-shadow(0 4px 6px rgba(15, 23, 42, 0.25));
    transition: left 0.42s cubic-bezier(0.22, 1, 0.36, 1), top 0.42s cubic-bezier(0.22, 1, 0.36, 1), opacity 0.18s ease, transform 0.12s ease;
}

.hero-file-cursor::before {
    content: '';
    position: absolute;
    inset: 0;
    clip-path: polygon(0 0, 0 100%, 42% 72%, 63% 100%, 83% 89%, 62% 62%, 100% 62%);
    background: white;
}

.hero-file-cursor::after {
    content: '';
    position: absolute;
    inset: 1.5px 2px 2px 1.5px;
    clip-path: polygon(0 0, 0 100%, 42% 72%, 63% 100%, 83% 89%, 62% 62%, 100% 62%);
    background: #121417;
}

.hero-file-cursor.is-visible {
    opacity: 1;
}

.hero-file-cursor.is-clicking {
    transform: scale(0.92);
}

.hero-shortcut-hint {
    position: absolute;
    z-index: 65;
    display: inline-flex;
    align-items: center;
    gap: 6px;
    border: 1px solid rgba(15, 23, 42, 0.1);
    border-radius: 999px;
    background: rgba(255, 255, 255, 0.92);
    padding: 7px 10px;
    color: rgba(30, 41, 59, 0.88);
    font-size: 11px;
    font-weight: 850;
    box-shadow: 0 16px 34px rgba(15, 23, 42, 0.16);
    opacity: 0;
    transform: translateY(8px) scale(0.96);
    transition: opacity 0.22s ease, transform 0.22s ease;
}

.dark .hero-shortcut-hint {
    border-color: rgba(255, 255, 255, 0.12);
    background: rgba(15, 23, 42, 0.94);
    color: rgba(226, 232, 240, 0.9);
}

.hero-shortcut-hint .material-symbols-outlined {
    font-size: 15px;
    color: var(--primary-light);
}

.hero-shortcut-hint.is-visible {
    opacity: 1;
    transform: translateY(0) scale(1);
}

.hero-desktop-window {
    border-color: rgba(71, 85, 105, 0.2);
    background: #f8fafc;
    box-shadow:
        0 24px 58px rgba(51, 65, 85, 0.24),
        0 0 0 1px rgba(255, 255, 255, 0.62);
}

.hero-desktop-wallpaper {
    position: absolute;
    inset: 0;
    overflow: hidden;
    background-color: #f8fafc;
    background-image:
        radial-gradient(at 0% 0%, #e2e8f0 0, transparent 50%),
        radial-gradient(at 100% 0%, #cbd5e1 0, transparent 50%),
        radial-gradient(at 100% 100%, #94a3b8 0, transparent 50%),
        radial-gradient(at 0% 100%, #cbd5e1 0, transparent 50%),
        radial-gradient(at 50% 50%, #f1f5f9 0, transparent 50%);
}

.hero-desktop-wallpaper::before,
.hero-desktop-wallpaper::after {
    position: absolute;
    inset: 0;
    content: "";
    pointer-events: none;
}

.hero-desktop-wallpaper::before {
    z-index: 1;
    background-image:
        linear-gradient(rgba(30, 41, 59, 0.035) 1px, transparent 1px),
        linear-gradient(90deg, rgba(30, 41, 59, 0.035) 1px, transparent 1px);
    background-size: 42px 42px;
}

.hero-desktop-wallpaper::after {
    z-index: 2;
    opacity: 0.32;
    background-image: radial-gradient(rgba(15, 23, 42, 0.08) 0.45px, transparent 0.55px);
    background-size: 6px 6px;
    mix-blend-mode: multiply;
}

.hero-desktop-menubar {
    position: absolute;
    z-index: 7;
    top: 0;
    right: 0;
    left: 0;
    display: flex;
    align-items: center;
    justify-content: flex-end;
    height: 25px;
    padding: 0 9px;
    border-bottom: 1px solid rgba(71, 85, 105, 0.12);
    background: rgba(255, 255, 255, 0.7);
    color: rgba(0, 0, 0, 0.84);
    box-shadow: 0 1px 0 rgba(255, 255, 255, 0.5);
    backdrop-filter: blur(30px) saturate(180%);
    -webkit-backdrop-filter: blur(30px) saturate(180%);
}

.hero-desktop-status {
    display: flex;
    align-items: center;
    gap: 5px;
}

.hero-menubar-icon {
    display: block;
    flex: none;
    object-fit: contain;
    opacity: 0.85;
}

.hero-menubar-icon--swiftbiu { width: 17px; height: 17px; }
.hero-menubar-icon--search { width: 17px; height: 17px; }
.hero-menubar-icon--wifi { width: 18px; height: 18px; }
.hero-menubar-icon--battery { width: 22px; height: 22px; }
.hero-menubar-icon--control { width: 17px; height: 17px; }

.hero-desktop-status b {
    margin-left: 2px;
    font-size: 9px;
    font-weight: 680;
    letter-spacing: -0.01em;
}

.hero-desktop-files {
    position: absolute;
    z-index: 4;
    top: 42px;
    right: 16px;
    display: grid;
    grid-template-columns: repeat(2, 82px);
    gap: 12px 9px;
}

.hero-desktop-file {
    position: relative;
    display: grid;
    justify-items: center;
    width: 82px;
    min-width: 0;
    margin: 0;
    border: 1px solid transparent;
    border-radius: 9px;
    padding: 6px 5px 5px;
    color: rgba(23, 32, 51, 0.92);
    background: transparent;
    box-shadow: none;
    font: inherit;
    text-align: center;
    appearance: none;
    transition:
        opacity 0.2s ease,
        border-color 0.2s ease,
        background 0.2s ease,
        box-shadow 0.2s ease,
        transform 0.3s cubic-bezier(0.16, 1, 0.3, 1);
}

.hero-desktop-file::after {
    position: absolute;
    inset: 4px;
    border: 1px solid rgba(255, 255, 255, 0);
    border-radius: 6px;
    content: "";
    pointer-events: none;
    transition: border-color 0.2s ease;
}

.hero-desktop-file.is-selected {
    border-color: rgba(0, 122, 255, 0.34);
    background: rgba(0, 122, 255, 0.13);
    box-shadow:
        0 7px 18px rgba(51, 65, 85, 0.13),
        inset 0 0 0 1px rgba(255, 255, 255, 0.42);
    transform: translateY(-2px);
}

.hero-desktop-file.is-selected::after {
    border-color: rgba(0, 122, 255, 0.2);
}

.hero-desktop-file.is-dimmed {
    opacity: 0.62;
}

.hero-desktop-file.is-processing .hero-desktop-file-icon {
    animation: hero-file-processing 0.7s ease-in-out infinite alternate;
}

.hero-desktop-file.is-processed .hero-desktop-file-icon {
    filter: saturate(1.2) brightness(1.08);
    transform: translateY(-2px) scale(1.04);
}

.hero-desktop-file strong,
.hero-desktop-file small {
    display: block;
    width: 100%;
    overflow: hidden;
    color: rgba(23, 32, 51, 0.9);
    text-overflow: ellipsis;
    text-shadow: 0 1px 0 rgba(255, 255, 255, 0.72);
    white-space: nowrap;
}

.hero-desktop-file strong {
    margin-top: 5px;
    font-size: 8px;
    font-weight: 760;
}

.hero-desktop-file small {
    margin-top: 1px;
    color: rgba(71, 85, 105, 0.72);
    font-size: 7px;
    font-weight: 650;
}

.hero-desktop-file-icon {
    position: relative;
    display: flex;
    align-items: center;
    justify-content: center;
    width: 58px;
    height: 46px;
    overflow: hidden;
    border: 1px solid rgba(71, 85, 105, 0.18);
    border-radius: 5px;
    box-shadow:
        0 7px 14px rgba(51, 65, 85, 0.2),
        inset 0 1px 0 rgba(255, 255, 255, 0.62);
    transition: filter 0.2s ease, transform 0.25s cubic-bezier(0.16, 1, 0.3, 1);
}

.hero-desktop-file-icon--image {
    background:
        linear-gradient(180deg, #83d6ff 0 54%, #f9c987 55% 100%);
}

.hero-file-photo-sun {
    position: absolute;
    top: 8px;
    right: 9px;
    width: 8px;
    height: 8px;
    border-radius: 50%;
    background: #fff7bf;
    box-shadow: 0 0 8px rgba(255, 247, 191, 0.8);
}

.hero-file-photo-land {
    position: absolute;
    right: -7px;
    bottom: -18px;
    left: -9px;
    height: 41px;
    border-radius: 50% 54% 0 0;
    background:
        radial-gradient(circle at 62% 26%, rgba(255, 255, 255, 0.54) 0 8%, transparent 9%),
        linear-gradient(128deg, #287b6d, #68ae73 50%, #184d50);
    transform: rotate(-5deg);
}

.hero-desktop-file-icon--video {
    background:
        radial-gradient(circle at 28% 28%, rgba(113, 225, 255, 0.64), transparent 28%),
        linear-gradient(135deg, #101827, #5030a6 58%, #ed5e87);
}

.hero-file-video-strip {
    position: absolute;
    inset: 3px;
    border-top: 3px dotted rgba(255, 255, 255, 0.44);
    border-bottom: 3px dotted rgba(255, 255, 255, 0.44);
}

.hero-desktop-file-icon--video .material-symbols-outlined {
    position: relative;
    z-index: 2;
    display: flex;
    align-items: center;
    justify-content: center;
    width: 22px;
    height: 22px;
    border-radius: 50%;
    background: rgba(255, 255, 255, 0.88);
    color: #4f46a5;
    font-size: 17px;
    box-shadow: 0 4px 12px rgba(3, 8, 22, 0.25);
}

.hero-desktop-file-icon--document {
    align-content: center;
    flex-direction: column;
    gap: 3px;
    overflow: visible;
    border-color: rgba(15, 23, 42, 0.12);
    background: linear-gradient(145deg, #ffffff, #e8edf5);
}

.hero-desktop-file-icon--document::after {
    position: absolute;
    top: -1px;
    right: -1px;
    width: 13px;
    height: 13px;
    border-left: 1px solid rgba(15, 23, 42, 0.1);
    border-bottom: 1px solid rgba(15, 23, 42, 0.1);
    background: linear-gradient(225deg, transparent 48%, #dce3ee 50%);
    content: "";
}

.hero-desktop-file-icon--document i {
    display: block;
    width: 28px;
    height: 2px;
    border-radius: 999px;
    background: #c5ccd8;
}

.hero-desktop-file-icon--document b {
    position: absolute;
    right: 5px;
    bottom: 4px;
    border-radius: 3px;
    padding: 2px 4px;
    background: #ef4444;
    color: white;
    font-size: 7px;
    line-height: 1;
}

.hero-desktop-file-icon--audio {
    gap: 3px;
    background:
        radial-gradient(circle at 75% 24%, rgba(255, 255, 255, 0.36), transparent 24%),
        linear-gradient(135deg, #113d66, #1aa5a4 58%, #70e0b5);
}

.hero-desktop-file-icon--audio i {
    display: block;
    width: 3px;
    border-radius: 999px;
    background: rgba(255, 255, 255, 0.9);
    box-shadow: 0 0 6px rgba(255, 255, 255, 0.25);
}

.hero-desktop-file-icon--audio i:nth-child(1) { height: 12px; }
.hero-desktop-file-icon--audio i:nth-child(2) { height: 23px; }
.hero-desktop-file-icon--audio i:nth-child(3) { height: 31px; }
.hero-desktop-file-icon--audio i:nth-child(4) { height: 19px; }
.hero-desktop-file-icon--audio i:nth-child(5) { height: 9px; }

@keyframes hero-file-processing {
    from { transform: translateY(0) scale(1); }
    to { transform: translateY(-2px) scale(1.04); }
}

@keyframes hero-file-audio-live {
    0%, 100% { transform: scaleY(0.42); opacity: 0.7; }
    50% { transform: scaleY(1); opacity: 1; }
}

@keyframes hero-file-result-spin {
    to { transform: rotate(360deg); }
}

@keyframes hero-file-result-progress {
    from { width: 8%; }
    to { width: 92%; }
}

@keyframes hero-file-result-scan {
    0% { transform: translateX(-110%); opacity: 0; }
    30%, 70% { opacity: 1; }
    100% { transform: translateX(260%); opacity: 0; }
}

.hero-desktop-file.is-processing[data-kind="audio"] .hero-desktop-file-icon--audio i {
    transform-origin: center;
    animation: hero-file-audio-live 0.62s ease-in-out infinite;
}

.hero-desktop-file.is-processing[data-kind="audio"] .hero-desktop-file-icon--audio i:nth-child(2) { animation-delay: -0.14s; }
.hero-desktop-file.is-processing[data-kind="audio"] .hero-desktop-file-icon--audio i:nth-child(3) { animation-delay: -0.31s; }
.hero-desktop-file.is-processing[data-kind="audio"] .hero-desktop-file-icon--audio i:nth-child(4) { animation-delay: -0.22s; }
.hero-desktop-file.is-processing[data-kind="audio"] .hero-desktop-file-icon--audio i:nth-child(5) { animation-delay: -0.43s; }

.hero-file-toolbar.toolbar-preview-surface {
    z-index: 60;
    width: 166px;
    min-height: 36px;
    flex-direction: column;
    align-items: stretch;
    opacity: 0;
    pointer-events: none;
    transform: translateY(7px) scale(0.96);
    transition:
        left 0.38s cubic-bezier(0.2, 0.8, 0.2, 1),
        top 0.38s cubic-bezier(0.2, 0.8, 0.2, 1),
        opacity 0.2s ease,
        transform 0.22s cubic-bezier(0.16, 1, 0.3, 1);
}

.hero-file-toolbar.toolbar-preview-surface.is-visible {
    opacity: 1;
    pointer-events: auto;
    transform: translateY(0) scale(1);
}

.hero-file-toolbar.toolbar-preview-surface .hero-file-action-slot {
    width: 100%;
    min-width: 0;
    justify-content: flex-start;
    border: 0;
    color: inherit;
    background: transparent;
    cursor: default;
}

.hero-file-toolbar.toolbar-preview-surface .hero-file-action-slot .toolbar-preview-name {
    max-width: 7.2rem;
}

.hero-file-toolbar.toolbar-preview-surface .hero-file-action-slot.is-executing {
    background: rgba(255, 255, 255, 0.14);
    box-shadow:
        inset 2px 0 0 #1267e8,
        inset 0 0 0 1px rgba(255, 255, 255, 0.08);
}

html:not(.dark) .hero-file-toolbar.toolbar-preview-surface .hero-file-action-slot.is-executing {
    background: rgba(0, 0, 0, 0.065);
    box-shadow:
        inset 2px 0 0 #1267e8,
        inset 0 0 0 1px rgba(0, 0, 0, 0.04);
}

.hero-file-result-card {
    position: absolute;
    z-index: 65;
    display: flex;
    align-items: flex-start;
    gap: 8px;
    width: 238px;
    min-height: 54px;
    border: 1px solid rgba(255, 255, 255, 0.56);
    border-radius: 12px;
    padding: 7px 9px;
    background: rgba(250, 252, 255, 0.92);
    color: rgba(15, 23, 42, 0.9);
    box-shadow: 0 18px 42px rgba(5, 18, 42, 0.27);
    opacity: 0;
    pointer-events: none;
    transform: translateY(8px) scale(0.96);
    backdrop-filter: blur(20px) saturate(170%);
    -webkit-backdrop-filter: blur(20px) saturate(170%);
    transition: opacity 0.2s ease, transform 0.25s cubic-bezier(0.16, 1, 0.3, 1);
}

.dark .hero-file-result-card {
    border-color: rgba(255, 255, 255, 0.12);
    background: rgba(24, 24, 27, 0.92);
    color: rgba(255, 255, 255, 0.92);
}

.hero-file-result-card.is-visible {
    opacity: 1;
    transform: translateY(0) scale(1);
}

.hero-file-result-card > span:nth-child(2) {
    min-width: 0;
    flex: 1 1 auto;
    padding-top: 1px;
}

.hero-file-result-icon {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 30px;
    height: 30px;
    flex: 0 0 30px;
    border-radius: 9px;
    background: rgba(0, 122, 255, 0.1);
    color: #087ce0;
    font-size: 17px;
}

.hero-file-result-card strong,
.hero-file-result-card small {
    display: block;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.hero-file-result-card strong {
    font-size: 9px;
    font-weight: 790;
}

.hero-file-result-card small {
    margin-top: 2px;
    color: rgba(100, 116, 139, 0.76);
    font-size: 8px;
    font-weight: 680;
}

.dark .hero-file-result-card small {
    color: rgba(203, 213, 225, 0.66);
}

.hero-file-result-check {
    margin-top: 6px;
    color: #22a85a;
    font-size: 17px;
}

.hero-file-result-check.is-spinning {
    color: #0f9f8f;
    animation: hero-file-result-spin 0.85s linear infinite;
}

.hero-file-result-detail {
    display: block;
    min-width: 0;
    margin-top: 6px;
}

.hero-file-size-shift {
    display: flex;
    align-items: center;
    gap: 5px;
    white-space: nowrap;
    font-size: 8px;
    font-weight: 820;
}

.hero-file-size-source {
    color: rgba(100, 116, 139, 0.78);
    text-decoration: line-through;
    text-decoration-thickness: 1px;
}

.dark .hero-file-size-source {
    color: rgba(203, 213, 225, 0.64);
}

.hero-file-size-arrow {
    color: rgba(100, 116, 139, 0.66);
}

.hero-file-size-output {
    color: #0f766e;
    font-size: 9px;
}

.dark .hero-file-size-output {
    color: #5eead4;
}

.hero-file-size-output.is-pending {
    min-width: 20px;
    color: rgba(100, 116, 139, 0.7);
}

.hero-file-size-ratio {
    margin-left: auto;
    border-radius: 999px;
    padding: 2px 5px;
    background: rgba(16, 185, 129, 0.11);
    color: #0f8a62;
    font-size: 7px;
    font-weight: 900;
}

.dark .hero-file-size-ratio {
    background: rgba(45, 212, 191, 0.13);
    color: #5eead4;
}

.hero-file-result-mini-progress {
    height: 3px;
    margin-top: 6px;
    overflow: hidden;
    border-radius: 999px;
    background: rgba(15, 23, 42, 0.08);
}

.dark .hero-file-result-mini-progress {
    background: rgba(255, 255, 255, 0.1);
}

.hero-file-result-mini-progress i {
    display: block;
    width: 8%;
    height: 100%;
    border-radius: inherit;
    background: currentColor;
    color: #0f9f8f;
    animation: hero-file-result-progress 0.9s ease-in-out infinite alternate;
}

.hero-file-result-scan {
    position: relative;
    display: grid;
    gap: 4px;
    overflow: hidden;
    padding: 1px 0;
}

.hero-file-result-scan i {
    display: block;
    height: 4px;
    border-radius: 999px;
    background: rgba(100, 116, 139, 0.18);
}

.hero-file-result-scan i:nth-child(1) { width: 90%; }
.hero-file-result-scan i:nth-child(2) { width: 72%; }
.hero-file-result-scan i:nth-child(3) { width: 82%; }

.hero-file-result-scan::after {
    content: '';
    position: absolute;
    inset: -2px auto -2px -30%;
    width: 34%;
    background: linear-gradient(90deg, transparent, rgba(14, 165, 233, 0.34), transparent);
    animation: hero-file-result-scan 0.9s ease-in-out infinite;
}

.hero-file-result-waveform {
    display: flex;
    align-items: center;
    gap: 2px;
    height: 18px;
    margin-bottom: 4px;
}

.hero-file-result-waveform i {
    display: block;
    width: 2px;
    height: 8px;
    border-radius: 999px;
    background: #0f9f8f;
    opacity: 0.8;
}

.hero-file-result-waveform.is-live i {
    transform-origin: center;
    animation: hero-file-audio-live 0.58s ease-in-out infinite;
}

.hero-file-result-waveform.is-live i:nth-child(2) { animation-delay: -0.1s; }
.hero-file-result-waveform.is-live i:nth-child(3) { animation-delay: -0.24s; }
.hero-file-result-waveform.is-live i:nth-child(4) { animation-delay: -0.4s; }
.hero-file-result-waveform.is-live i:nth-child(5) { animation-delay: -0.18s; }
.hero-file-result-waveform.is-live i:nth-child(6) { animation-delay: -0.35s; }
.hero-file-result-waveform.is-live i:nth-child(7) { animation-delay: -0.08s; }
.hero-file-result-waveform.is-live i:nth-child(8) { animation-delay: -0.28s; }

.hero-file-result-runtime,
.hero-file-result-metric {
    display: block;
    color: rgba(71, 85, 105, 0.84);
    font-size: 7px;
    font-weight: 780;
    line-height: 1.25;
}

.dark .hero-file-result-runtime,
.dark .hero-file-result-metric {
    color: rgba(226, 232, 240, 0.72);
}

.hero-file-result-preview {
    display: -webkit-box;
    margin: 4px 0 0;
    overflow: hidden;
    -webkit-box-orient: vertical;
    -webkit-line-clamp: 2;
    color: rgba(30, 41, 59, 0.84);
    font-size: 7px;
    font-weight: 650;
    line-height: 1.35;
    white-space: normal;
}

.dark .hero-file-result-preview {
    color: rgba(241, 245, 249, 0.78);
}

.hero-progress-card {
    right: 7.5%;
    bottom: 10%;
}

.hero-progress-track {
    height: 8px;
    margin: 11px 10px;
    overflow: hidden;
    border-radius: 999px;
    background: rgba(15, 23, 42, 0.08);
}

.hero-progress-subtitle {
    margin: 9px 10px 0;
    color: rgba(100, 116, 139, 0.8);
    font-size: 10px;
    font-weight: 800;
}

.hero-progress-stats {
    display: flex;
    justify-content: space-between;
    padding: 0 10px 8px;
    color: rgba(100, 116, 139, 0.82);
    font-size: 10px;
    font-weight: 850;
}

.hero-progress-stats b {
    color: #159947;
}

.hero-progress-track span {
    display: block;
    width: 0;
    height: 100%;
    border-radius: inherit;
    background: var(--primary-light);
    transition: width 0.15s linear;
}

.hero-progress-list {
    display: grid;
    gap: 6px;
    padding: 0 10px 10px;
    color: rgba(71, 85, 105, 0.88);
    font-size: 10px;
    font-weight: 750;
}

.dark .hero-progress-list {
    color: rgba(226, 232, 240, 0.84);
}

.hero-progress-list span {
    display: flex;
    justify-content: space-between;
    gap: 8px;
}

.hero-progress-list b {
    color: #159947;
}

@media (max-width: 1024px) {
    .hero-notes-sidebar,
    .hero-notes-list,
    .hero-finder-sidebar {
        display: none !important;
    }
    .hero-notes-body {
        grid-template-columns: 1fr !important;
    }
    .hero-finder-body {
        grid-template-columns: 1fr !important;
    }
}

@media (max-width: 640px) {
    .hero-demo {
        max-width: 440px;
        margin: 0 auto;
    }
    .hero-demo-tabs {
        left: 8px;
        top: 8px;
        transform: scale(0.86);
        transform-origin: top left;
    }

    .hero-demo-stage {
        min-height: auto;
    }

    .hero-mac-window {
        left: 3%;
        right: 3%;
        top: 14%;
        bottom: 8%;
    }

    .hero-notes-body {
        grid-template-columns: 1fr !important;
    }

    .hero-notes-sidebar,
    .hero-notes-list,
    .hero-finder-sidebar {
        display: none !important;
    }

    .hero-finder-body {
        grid-template-columns: 1fr;
    }

    .hero-editor {
        padding: 24px 12px !important;
    }

    .hero-text-line {
        font-size: 12px !important;
    }

    .hero-text-cursor {
        height: 15px !important;
    }

    .hero-context-toolbar {
        width: max-content;
        max-width: calc(100% - 20px);
        transform-origin: top left;
    }

    .hero-toolbar-action {
        padding: 6px 7px;
        font-size: 10px;
    }

    .hero-translate-card,
    .hero-ai-card,
    .hero-image-card,
    .hero-progress-card {
        width: 176px;
    }

    .hero-file-row strong {
        max-width: none;
    }

    .hero-file-row {
        gap: 8px;
        padding: 6px 7px;
    }

    .hero-file-thumb {
        width: 31px;
        height: 28px;
    }

    .hero-desktop-files {
        top: 38px;
        right: 10px;
        grid-template-columns: 72px;
        gap: 1px;
    }

    .hero-desktop-file {
        width: 72px;
        padding-right: 3px;
        padding-left: 3px;
    }

    .hero-desktop-file-icon {
        width: 51px;
        height: 40px;
    }

    .hero-file-toolbar.toolbar-preview-surface {
        width: 164px;
    }

    .hero-file-toolbar.toolbar-preview-surface .hero-file-action-slot .toolbar-preview-name {
        max-width: 7rem;
    }

    .hero-file-result-card {
        width: 206px;
    }

    .hero-shortcut-hint {
        max-width: 178px;
        font-size: 10px;
    }

    .hero-preview-pane {
        padding: 14px 8px;
    }

    .hero-preview-info {
        display: none;
    }
}

@media (prefers-reduced-motion: reduce) {
    .hero-desktop-file,
    .hero-desktop-file-icon,
    .hero-file-result-card,
    .hero-file-toolbar,
    .hero-file-toolbar .symbol-animated {
        animation: none !important;
        transition: none !important;
    }
}

.aurora-background {
    background-color: transparent;
    transition: background-color 0.3s ease, background-image 0.3s ease;
}

/* Glass Panels */
.glass-panel {
    background: rgba(255, 255, 255, 0.65);
    backdrop-filter: blur(20px) saturate(180%);
    -webkit-backdrop-filter: blur(20px) saturate(180%);
    border: 1px solid rgba(255, 255, 255, 0.5);
    box-shadow: 0 4px 6px -1px rgba(0, 0, 0, 0.05);
}

.dark .glass-panel {
    background: rgba(40, 40, 40, 0.65);
    border: 1px solid rgba(255, 255, 255, 0.1);
    box-shadow: 0 4px 6px -1px rgba(0, 0, 0, 0.3);
}

/* Sidebar / Navbar Glass */
.sidebar-glass {
    background: rgba(246, 246, 246, 0.7);
    backdrop-filter: blur(20px) saturate(180%);
    -webkit-backdrop-filter: blur(20px) saturate(180%);
    border-bottom: 1px solid rgba(0, 0, 0, 0.05);
}

.dark .sidebar-glass {
    background: rgba(40, 40, 40, 0.7);
    border-bottom: 1px solid rgba(255, 255, 255, 0.05);
}

/* --- Demo Stage & Animation --- */
#demo-stage {
    perspective: 1000px;
}

/* Toolbar Mobile & Backdrop Support */
#demo-toolbar {
    -webkit-backdrop-filter: blur(12px);
    backdrop-filter: blur(12px);
    z-index: 9999 !important;
}

.demo-line { white-space: nowrap; }

/* Animations */
@keyframes blink { 0%, 100% { opacity: 1; } 50% { opacity: 0; } }
.animate-blink { animation: blink 1s step-end infinite; }

.demo-action-btn.active {
    background-color: rgba(0, 0, 0, 0.1);
    color: var(--primary-light);
}

.dark .demo-action-btn.active {
    background-color: rgba(255, 255, 255, 0.2);
    color: var(--primary-dark);
}

.demo-action-btn:active { transform: scale(0.95); }

.typing-cursor::after {
    content: '|';
    animation: blink 1s step-end infinite;
    margin-left: 2px;
    color: var(--primary-light);
}

.dark .typing-cursor::after { color: var(--primary-dark); }

.demo-highlight-layer {
    position: absolute;
    top: 0; left: 0; height: 100%; width: 0;
    background-color: var(--primary-light);
    color: white;
    overflow: hidden;
    white-space: nowrap;
    border-radius: 0;
    pointer-events: none;
    z-index: 10;
}

.dark .demo-highlight-layer {
    background-color: var(--primary-dark);
    color: white;
}

.transition-all {
    transition-property: all;
    transition-timing-function: cubic-bezier(0.4, 0, 0.2, 1);
}


/* ============================================================
   2026 Visual Polish: aurora orbs, scroll reveal, micro-interactions.
   Performance budget:
   - Pure CSS, no JS hooks (other than reveal observer)
   - GPU-friendly transforms only, no per-frame paint
   - Honors prefers-reduced-motion
   ============================================================ */

.aurora-orbs {
    position: fixed;
    inset: 0;
    z-index: 0;
    pointer-events: none;
    overflow: hidden;
    contain: strict;
}

.aurora-orb {
    position: absolute;
    width: 540px;
    height: 540px;
    border-radius: 50%;
    filter: blur(120px);
    opacity: 0.42;
    will-change: transform;
    transform: translate3d(0, 0, 0);
}

.aurora-orb-blue {
    top: -180px;
    left: -120px;
    background: radial-gradient(circle at 30% 30%, rgba(14, 165, 233, 0.65), rgba(14, 165, 233, 0));
    animation: aurora-drift-a 22s ease-in-out infinite alternate;
}

.aurora-orb-cyan {
    top: 18%;
    right: -180px;
    background: radial-gradient(circle at 70% 30%, rgba(34, 197, 184, 0.55), rgba(34, 197, 184, 0));
    animation: aurora-drift-b 26s ease-in-out infinite alternate;
}

.aurora-orb-violet {
    bottom: -260px;
    left: 30%;
    background: radial-gradient(circle at 50% 50%, rgba(139, 92, 246, 0.5), rgba(139, 92, 246, 0));
    animation: aurora-drift-c 30s ease-in-out infinite alternate;
}

.dark .aurora-orb-blue {
    background: radial-gradient(circle at 30% 30%, rgba(91, 178, 255, 0.45), rgba(91, 178, 255, 0));
}

.dark .aurora-orb-cyan {
    background: radial-gradient(circle at 70% 30%, rgba(52, 211, 153, 0.45), rgba(52, 211, 153, 0));
}

.dark .aurora-orb-violet {
    background: radial-gradient(circle at 50% 50%, rgba(168, 85, 247, 0.45), rgba(168, 85, 247, 0));
}

@keyframes aurora-drift-a {
    0%   { transform: translate3d(0, 0, 0) scale(1); }
    100% { transform: translate3d(80px, 60px, 0) scale(1.08); }
}

@keyframes aurora-drift-b {
    0%   { transform: translate3d(0, 0, 0) scale(1); }
    100% { transform: translate3d(-90px, 50px, 0) scale(1.12); }
}

@keyframes aurora-drift-c {
    0%   { transform: translate3d(0, 0, 0) scale(1); }
    100% { transform: translate3d(60px, -70px, 0) scale(1.05); }
}

/* Hero demo halo + subtle parallax-style float */
.hero-demo {
    position: relative;
    isolation: isolate;
}

.hero-demo::before {
    content: '';
    position: absolute;
    inset: -28px;
    z-index: -1;
    border-radius: 16px;
    background: radial-gradient(60% 60% at 50% 50%, rgba(14, 165, 233, 0.18), rgba(14, 165, 233, 0));
    filter: blur(40px);
    opacity: 0.85;
    pointer-events: none;
}

.dark .hero-demo::before {
    background: radial-gradient(60% 60% at 50% 50%, rgba(91, 178, 255, 0.22), rgba(91, 178, 255, 0));
}

/* Feature card subtle gradient border on hover, GPU only */
.feature-card {
    position: relative;
    transition: transform 0.25s cubic-bezier(0.22, 1, 0.36, 1),
                box-shadow 0.25s ease,
                border-color 0.2s ease;
}

.feature-card::after {
    content: '';
    position: absolute;
    inset: 0;
    border-radius: inherit;
    pointer-events: none;
    background: linear-gradient(135deg, rgba(14, 165, 233, 0.25), rgba(139, 92, 246, 0.18));
    opacity: 0;
    transition: opacity 0.25s ease;
    -webkit-mask: linear-gradient(#000 0 0) content-box, linear-gradient(#000 0 0);
    -webkit-mask-composite: xor;
            mask-composite: exclude;
    padding: 1px;
}

.feature-card:hover::after {
    opacity: 1;
}

/* Reveal-on-scroll utility — light, transform-only */
.reveal {
    opacity: 0;
    transform: translateY(18px);
    transition: opacity 0.6s ease, transform 0.6s cubic-bezier(0.22, 1, 0.36, 1);
    will-change: transform, opacity;
}

.reveal.is-visible {
    opacity: 1;
    transform: translateY(0);
}

@media (prefers-reduced-motion: reduce) {
    .aurora-orb,
    .reveal {
        animation: none !important;
        transition: none !important;
        transform: none !important;
        opacity: 1 !important;
    }
}

/* Subtle text gradient for the brand name in hero */
.brand-gradient {
    background: linear-gradient(135deg, #0f7ad8 0%, #16a085 60%, #8b5cf6 100%);
    -webkit-background-clip: text;
            background-clip: text;
    -webkit-text-fill-color: transparent;
            color: transparent;
}

.dark .brand-gradient {
    background: linear-gradient(135deg, #5bb2ff 0%, #34d399 55%, #c084fc 100%);
    -webkit-background-clip: text;
            background-clip: text;
    -webkit-text-fill-color: transparent;
            color: transparent;
}


/* ============================================================
   Hero demo · Drag-direction triggers channel
   "Drag once instead of opening menus" — based on the 1.3.8
   marketing video script. Showcases drag-down/right/up actions
   in Finder + browser, with an 8-direction dial that lights up
   the active vector and a result chip that morphs per scene.
   ============================================================ */

.hero-drag-window {
    background: rgba(255, 255, 255, 0.94);
}

.dark .hero-drag-window {
    background: rgba(15, 23, 42, 0.94);
}

.hero-drag-body {
    position: relative;
    height: calc(100% - 36px);
    display: flex;
    flex-direction: column;
}

.hero-drag-canvas {
    position: relative;
    flex: 1;
    overflow: hidden;
    background:
        radial-gradient(circle at 50% 50%, rgba(15, 122, 216, 0.10), transparent 62%),
        linear-gradient(180deg, rgba(248, 250, 252, 0.92), rgba(226, 232, 240, 0.85));
}

.dark .hero-drag-canvas {
    background:
        radial-gradient(circle at 50% 50%, rgba(91, 178, 255, 0.16), transparent 62%),
        linear-gradient(180deg, rgba(15, 23, 42, 0.86), rgba(2, 6, 23, 0.92));
}

/* The card that the cursor drags around */
.hero-drag-subject {
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    display: flex;
    align-items: center;
    gap: 10px;
    min-width: 188px;
    max-width: 78%;
    padding: 8px 12px 8px 8px;
    border: 1px solid rgba(15, 23, 42, 0.12);
    border-radius: 10px;
    background: rgba(255, 255, 255, 0.96);
    box-shadow: 0 18px 36px rgba(15, 23, 42, 0.18);
    transition: transform 0.6s cubic-bezier(0.22, 1, 0.36, 1), opacity 0.3s ease;
    will-change: transform;
}

.dark .hero-drag-subject {
    background: rgba(30, 41, 59, 0.96);
    border-color: rgba(255, 255, 255, 0.12);
}

.hero-drag-subject.is-armed {
    box-shadow:
        0 0 0 2px rgba(15, 122, 216, 0.32),
        0 22px 40px rgba(15, 122, 216, 0.22);
}

.hero-drag-thumb {
    width: 36px;
    height: 32px;
    flex: none;
    border-radius: 7px;
    box-shadow: inset 0 0 0 1px rgba(15, 23, 42, 0.08);
}

.hero-drag-subject strong {
    display: block;
    color: rgba(15, 23, 42, 0.9);
    font-size: 12px;
    font-weight: 850;
    line-height: 1.15;
}

.dark .hero-drag-subject strong {
    color: white;
}

.hero-drag-subject small {
    display: block;
    margin-top: 2px;
    color: rgba(100, 116, 139, 0.78);
    font-size: 10px;
    font-weight: 700;
}

/* 8-direction dial — lights up the active arrow */
.hero-drag-dial {
    position: absolute;
    inset: 0;
    pointer-events: none;
}

.hero-drag-dial-ring {
    position: absolute;
    top: 50%;
    left: 50%;
    width: 240px;
    height: 240px;
    transform: translate(-50%, -50%);
    border-radius: 50%;
    border: 1px dashed rgba(15, 122, 216, 0.32);
    opacity: 0;
    transition: opacity 0.3s ease;
}

.dark .hero-drag-dial-ring {
    border-color: rgba(91, 178, 255, 0.45);
}

.hero-drag-dial.is-visible .hero-drag-dial-ring {
    opacity: 0.9;
    animation: hero-drag-dial-pulse 2.6s ease-in-out infinite;
}

@keyframes hero-drag-dial-pulse {
    0%, 100% { transform: translate(-50%, -50%) scale(1); opacity: 0.9; }
    50%      { transform: translate(-50%, -50%) scale(1.04); opacity: 0.55; }
}

.hero-drag-arrow {
    position: absolute;
    top: 50%;
    left: 50%;
    width: 28px;
    height: 28px;
    margin: -14px 0 0 -14px;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: 999px;
    border: 1px solid rgba(15, 23, 42, 0.1);
    background: rgba(255, 255, 255, 0.92);
    color: rgba(71, 85, 105, 0.75);
    box-shadow: 0 6px 16px rgba(15, 23, 42, 0.12);
    opacity: 0;
    transform-origin: center;
    transition: transform 0.4s cubic-bezier(0.22, 1, 0.36, 1),
                background 0.25s ease,
                color 0.25s ease,
                opacity 0.3s ease;
}

.dark .hero-drag-arrow {
    border-color: rgba(255, 255, 255, 0.12);
    background: rgba(15, 23, 42, 0.96);
    color: rgba(226, 232, 240, 0.78);
}

.hero-drag-arrow .material-symbols-outlined {
    font-size: 18px;
}

.hero-drag-dial.is-visible .hero-drag-arrow {
    opacity: 1;
}

.hero-drag-arrow-up    { transform: translate(0, -110px); }
.hero-drag-arrow-right { transform: translate(110px, 0); }
.hero-drag-arrow-down  { transform: translate(0, 110px); }
.hero-drag-arrow-left  { transform: translate(-110px, 0); }

.hero-drag-arrow.is-active {
    background: var(--primary-light);
    color: white;
    box-shadow: 0 12px 26px rgba(15, 122, 216, 0.38);
}

.hero-drag-arrow-up.is-active    { transform: translate(0, -118px) scale(1.15); }
.hero-drag-arrow-right.is-active { transform: translate(118px, 0) scale(1.15); }
.hero-drag-arrow-down.is-active  { transform: translate(0, 118px) scale(1.15); }
.hero-drag-arrow-left.is-active  { transform: translate(-118px, 0) scale(1.15); }

.dark .hero-drag-arrow.is-active {
    background: var(--primary-dark);
    color: #07111f;
}

/* Optional shortcut hint chip ("Hold ⌥") */
.hero-drag-shortcut {
    position: absolute;
    top: 14px;
    left: 50%;
    transform: translate(-50%, -8px);
    display: inline-flex;
    align-items: center;
    gap: 5px;
    padding: 6px 10px;
    border: 1px solid rgba(15, 23, 42, 0.1);
    border-radius: 999px;
    background: rgba(255, 255, 255, 0.94);
    box-shadow: 0 12px 24px rgba(15, 23, 42, 0.14);
    color: rgba(30, 41, 59, 0.92);
    font-size: 11px;
    font-weight: 800;
    opacity: 0;
    transition: opacity 0.25s ease, transform 0.25s ease;
}

.dark .hero-drag-shortcut {
    border-color: rgba(255, 255, 255, 0.12);
    background: rgba(15, 23, 42, 0.94);
    color: rgba(226, 232, 240, 0.92);
}

.hero-drag-shortcut.is-visible {
    opacity: 1;
    transform: translate(-50%, 0);
}

.hero-drag-shortcut kbd {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-width: 20px;
    height: 20px;
    padding: 0 5px;
    border-radius: 5px;
    border: 1px solid rgba(15, 23, 42, 0.16);
    background: white;
    color: rgba(15, 23, 42, 0.9);
    font-family: var(--font-sans);
    font-size: 11px;
    font-weight: 900;
}

.dark .hero-drag-shortcut kbd {
    background: rgba(2, 6, 23, 0.92);
    border-color: rgba(255, 255, 255, 0.18);
    color: white;
}

.hero-drag-shortcut .material-symbols-outlined {
    font-size: 14px;
    color: var(--primary-light);
}

.dark .hero-drag-shortcut .material-symbols-outlined {
    color: var(--primary-dark);
}

/* Big subtitle band at bottom of the canvas */
.hero-drag-caption {
    margin: 0;
    padding: 12px 16px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    background: rgba(15, 122, 216, 0.06);
    border-top: 1px solid rgba(15, 23, 42, 0.08);
    color: rgba(15, 23, 42, 0.92);
    font-size: 14px;
    font-weight: 900;
    letter-spacing: 0.01em;
    transition: color 0.2s ease, background 0.2s ease;
}

.dark .hero-drag-caption {
    background: rgba(91, 178, 255, 0.08);
    border-top-color: rgba(255, 255, 255, 0.08);
    color: white;
}

.hero-drag-caption-arrow {
    color: var(--primary-light);
    font-size: 18px;
    transition: transform 0.3s cubic-bezier(0.22, 1, 0.36, 1), color 0.2s ease;
}

.dark .hero-drag-caption-arrow {
    color: var(--primary-dark);
}

/* Cursor that drags the subject card */
.hero-drag-cursor {
    position: absolute;
    z-index: 85;
    width: 16px;
    height: 22px;
    opacity: 0;
    filter: drop-shadow(0 6px 8px rgba(15, 23, 42, 0.32));
    transition: left 0.55s cubic-bezier(0.22, 1, 0.36, 1),
                top 0.55s cubic-bezier(0.22, 1, 0.36, 1),
                opacity 0.2s ease,
                transform 0.15s ease;
    pointer-events: none;
}

.hero-drag-cursor::before {
    content: '';
    position: absolute;
    inset: 0;
    clip-path: polygon(0 0, 0 100%, 42% 72%, 63% 100%, 83% 89%, 62% 62%, 100% 62%);
    background: white;
    border: 1px solid rgba(15, 23, 42, 0.2);
}

.hero-drag-cursor.is-visible {
    opacity: 1;
}

.hero-drag-cursor.is-clicking {
    transform: scale(0.92);
}

/* Result chip — shape-shifts per scene */
.hero-drag-result {
    position: absolute;
    z-index: 75;
    right: 6%;
    top: 14%;
    display: flex;
    align-items: center;
    gap: 10px;
    min-width: 220px;
    max-width: 78%;
    padding: 10px 14px;
    border: 1px solid rgba(15, 23, 42, 0.1);
    border-radius: 10px;
    background: rgba(255, 255, 255, 0.96);
    box-shadow: 0 22px 50px rgba(15, 23, 42, 0.22);
    opacity: 0;
    transform: translateY(8px) scale(0.96);
    pointer-events: none;
    transition: opacity 0.25s ease, transform 0.25s ease;
}

.dark .hero-drag-result {
    background: rgba(15, 23, 42, 0.96);
    border-color: rgba(255, 255, 255, 0.12);
}

.hero-drag-result.is-visible {
    opacity: 1;
    transform: translateY(0) scale(1);
}

.hero-drag-result-icon {
    flex: none;
    display: flex;
    align-items: center;
    justify-content: center;
    width: 32px;
    height: 32px;
    border-radius: 9px;
    background: rgba(15, 122, 216, 0.12);
    color: var(--primary-light);
    font-size: 18px !important;
}

.dark .hero-drag-result-icon {
    background: rgba(91, 178, 255, 0.18);
    color: var(--primary-dark);
}

.hero-drag-result-text {
    min-width: 0;
}

.hero-drag-result-text strong {
    display: block;
    color: rgba(15, 23, 42, 0.92);
    font-size: 13px;
    font-weight: 900;
    line-height: 1.15;
}

.dark .hero-drag-result-text strong {
    color: white;
}

.hero-drag-result-text small {
    display: block;
    margin-top: 2px;
    color: rgba(100, 116, 139, 0.78);
    font-size: 11px;
    font-weight: 700;
}

.dark .hero-drag-result-text small {
    color: rgba(203, 213, 225, 0.74);
}

@media (max-width: 640px) {
    .hero-drag-dial-ring {
        width: 180px;
        height: 180px;
    }
    .hero-drag-arrow-up    { transform: translate(0, -82px); }
    .hero-drag-arrow-right { transform: translate(82px, 0); }
    .hero-drag-arrow-down  { transform: translate(0, 82px); }
    .hero-drag-arrow-left  { transform: translate(-82px, 0); }
    .hero-drag-arrow-up.is-active    { transform: translate(0, -88px) scale(1.12); }
    .hero-drag-arrow-right.is-active { transform: translate(88px, 0) scale(1.12); }
    .hero-drag-arrow-down.is-active  { transform: translate(0, 88px) scale(1.12); }
    .hero-drag-arrow-left.is-active  { transform: translate(-88px, 0) scale(1.12); }

    .hero-drag-subject {
        min-width: 152px;
        padding: 6px 10px 6px 6px;
    }
    .hero-drag-subject strong { font-size: 11px; }
    .hero-drag-subject small  { font-size: 9px; }
    .hero-drag-result {
        min-width: 180px;
        right: 4%;
        top: 12%;
        padding: 8px 10px;
    }
    .hero-drag-result-text strong { font-size: 11px; }
    .hero-drag-result-text small  { font-size: 10px; }
    .hero-drag-caption { font-size: 12px; padding: 10px 12px; }
}




/* ============================================================
   Hero demo · OCR capture channel (v3 layout — mirrors the
   native OCRResultWindow stack: image preview on top,
   recognized + translated text in the middle, extension
   actions toolbar at the bottom).
   ============================================================ */

/* OCR mode shares the same stage size as every other mode now —
   no per-mode dimension overrides are needed. */

.hero-ocr-window {
    background: rgba(255, 255, 255, 0.96);
    color: rgba(15, 23, 42, 0.92);
    /* Match native cornerRadius: 12 */
}

.dark .hero-ocr-window {
    background: rgba(15, 23, 42, 0.96);
    color: rgba(248, 250, 252, 0.92);
}

.hero-ocr-body {
    display: flex;
    flex-direction: column;
    gap: 12px;
    padding: 14px 14px 14px;
    /* Right padding leaves a gutter where the floating toolbar lives */
    padding-right: 200px;
    min-height: 0;
    /* Body grows to fill the window minus titlebar (36px) and bottom caption band (44px) */
    height: calc(100% - 36px - 44px);
    overflow: hidden;
}

/* === Unified OCR result stack ===
   One glass card containing 3 stacked sections (preview / recognized / translated).
   Sections share borders via internal hairlines so the whole thing reads as a
   single object — no chunky per-card headers, no visual gap between blocks. */
.hero-ocr-stack {
    position: relative;
    display: flex;
    flex-direction: column;
    flex: 1 1 auto;
    min-height: 0;
    border: 1px solid rgba(15, 23, 42, 0.1);
    border-radius: 14px;
    background: rgba(255, 255, 255, 0.96);
    box-shadow: 0 14px 28px rgba(15, 23, 42, 0.10);
    overflow: hidden;
}

.dark .hero-ocr-stack {
    background: rgba(30, 41, 59, 0.86);
    border-color: rgba(255, 255, 255, 0.12);
}

/* Generic section: opaque + active by default (e.g. the preview section
   is always visible since it IS the OCR canvas). The recognised and
   translated sections override this to be invisible/collapsed until the
   scenario activates them — so the user never sees stale "Copy/Translate"
   placeholders before the OCR has actually framed any text. */
.hero-ocr-section {
    position: relative;
    z-index: 1;
    display: flex;
    flex-direction: column;
    padding: 0;
    opacity: 1;
    transform: translateY(0);
    transition: opacity 0.35s ease,
                transform 0.35s cubic-bezier(0.22, 1, 0.36, 1),
                max-height 0.35s cubic-bezier(0.22, 1, 0.36, 1);
}

/* Recognised + translated: hidden by default; revealed only when active.
   We collapse height (visually + reserves no space) and fade out so the
   stack just shows the preview at first. */
.hero-ocr-recognized,
.hero-ocr-translated {
    opacity: 0;
    max-height: 0;
    overflow: hidden;
    pointer-events: none;
    transform: translateY(-4px);
}

.hero-ocr-recognized.is-active,
.hero-ocr-translated.is-active {
    opacity: 1;
    max-height: 200px;
    transform: translateY(0);
    pointer-events: auto;
    z-index: 5;
}

/* Hide the connecting hairline between collapsed sections. Once they expand,
   the natural border-top reappears. */
.hero-ocr-section + .hero-ocr-section {
    border-top: 1px solid rgba(15, 23, 42, 0.08);
}

.dark .hero-ocr-section + .hero-ocr-section {
    border-top-color: rgba(255, 255, 255, 0.08);
}

.hero-ocr-recognized:not(.is-active),
.hero-ocr-translated:not(.is-active) {
    border-top-color: transparent;
}

.hero-ocr-section.is-active {
    z-index: 5;
}

/* Compact inline tag — by default sits in the top-right corner so it
   never crowds the preview's selection. The recognised + translated
   sections override this to the bottom-right so the tag never overlaps
   the text body. */
.hero-ocr-section-tag {
    position: absolute;
    top: 6px;
    right: 8px;
    z-index: 6;
    display: inline-flex;
    align-items: center;
    gap: 5px;
    padding: 0;
    background: transparent;
    color: rgba(71, 85, 105, 0.95);
    font-size: 10px;
    font-weight: 800;
    letter-spacing: 0.005em;
    pointer-events: none;
}

/* Result + translation sections place the tag in the bottom-right corner so
   it stays out of the way of the recognised / translated text above it. */
.hero-ocr-recognized .hero-ocr-section-tag,
.hero-ocr-translated .hero-ocr-section-tag {
    top: auto;
    bottom: 6px;
    right: 8px;
}

.dark .hero-ocr-section-tag {
    color: rgba(226, 232, 240, 0.95);
}

.hero-ocr-section.is-active .hero-ocr-section-tag {
    color: var(--primary-light);
}

.dark .hero-ocr-section.is-active .hero-ocr-section-tag {
    color: var(--primary-dark);
}

.hero-ocr-section-tag .material-symbols-outlined {
    font-size: 12px;
    color: inherit;
}

.hero-ocr-section-tag em {
    color: rgba(71, 85, 105, 0.85);
    font-style: normal;
    font-weight: 800;
    font-size: 9px;
    transition: color 0.2s ease;
}

.dark .hero-ocr-section-tag em {
    color: rgba(226, 232, 240, 0.85);
}

.hero-ocr-section.is-active .hero-ocr-section-tag em {
    color: #15803d;
}

.dark .hero-ocr-section.is-active .hero-ocr-section-tag em {
    color: #4ade80;
}

.hero-ocr-translated.is-active .hero-ocr-section-tag em {
    color: var(--primary-light);
}

.dark .hero-ocr-translated.is-active .hero-ocr-section-tag em {
    color: var(--primary-dark);
}

/* Preview claims roughly half the stack; recognition + translation
   each get a fair slice and never compress below their content. */
.hero-ocr-preview {
    flex: 2 1 0;
    min-height: 140px;
}

.hero-ocr-recognized,
.hero-ocr-translated {
    flex: 1 0 auto;
    min-height: 64px;
}

/* Body paragraph used in recognized + translated sections.
   Top padding is small now since the tag floats top-right, not above. */
.hero-ocr-section-content {
    display: flex;
    align-items: flex-end;
    width: 100%;
}

.hero-ocr-section-body {
    flex: 1;
    margin: 0;
    padding: 12px 14px 14px;
    padding-right: 8px; /* space for the summon button */
    color: rgba(15, 23, 42, 0.9);
    font-size: 12px;
    font-weight: 800;
    line-height: 1.55;
}

.dark .hero-ocr-section-body {
    color: rgba(248, 250, 252, 0.92);
}

.hero-ocr-summon-btn {
    flex-shrink: 0;
    margin: 0 14px 14px 0;
    width: 28px;
    height: 28px;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: 6px;
    background: rgba(0, 122, 255, 0.1);
    border: 0.5px solid rgba(0, 122, 255, 0.2);
    color: #007aff;
    cursor: pointer;
    opacity: 0;
    transform: scale(0.8);
    transition: opacity 0.2s cubic-bezier(0.16, 1, 0.3, 1), transform 0.2s cubic-bezier(0.16, 1, 0.3, 1), background 0.15s;
    pointer-events: none;
}

.dark .hero-ocr-summon-btn {
    background: rgba(10, 132, 255, 0.15);
    border: 0.5px solid rgba(10, 132, 255, 0.25);
    color: #0a84ff;
}

.hero-ocr-summon-btn.is-visible {
    opacity: 1;
    transform: scale(1);
    pointer-events: auto;
}

.hero-ocr-summon-btn.is-armed,
.hero-ocr-summon-btn:active {
    background: rgba(0, 122, 255, 0.2);
    transform: scale(0.95);
}

.dark .hero-ocr-summon-btn.is-armed,
.dark .hero-ocr-summon-btn:active {
    background: rgba(10, 132, 255, 0.25);
}

.hero-ocr-summon-btn .material-symbols-outlined {
    font-size: 16px;
}

/* The recognised + translated bodies need extra right + bottom padding
   so the bottom-right floating tag never overlaps the text. */
.hero-ocr-recognized .hero-ocr-section-body,
.hero-ocr-translated .hero-ocr-section-body {
    padding: 12px 14px 22px;
}

/* === Preview stage — large enough to clearly show the selection === */
.hero-ocr-preview-stage {
    position: relative;
    flex: 1 1 auto;
    min-height: 116px;
    margin: 0;
    /* Top padding is small now: the floating tag sits in the corner,
       not in a header bar, so the selection has full breathing room. */
    padding: 16px 22px;
    background:
        radial-gradient(120% 90% at 50% 30%, rgba(255, 255, 255, 0.96), rgba(241, 245, 249, 0.94));
    overflow: hidden;
}

.dark .hero-ocr-preview-stage {
    background:
        radial-gradient(120% 90% at 50% 30%, rgba(15, 23, 42, 0.96), rgba(2, 6, 23, 0.94));
}

.hero-ocr-mock {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: 14px;
    height: 100%;
    color: rgba(15, 23, 42, 0.88);
}

.dark .hero-ocr-mock {
    color: rgba(226, 232, 240, 0.92);
}

/* The text region — large, readable, occupies the centre of the preview */
.hero-ocr-region {
    position: relative;
    z-index: 3;
    display: flex;
    flex-direction: column;
    gap: 6px;
    padding: 6px 0;
    color: rgba(15, 23, 42, 0.94);
    font-size: 16px;
    font-weight: 800;
    line-height: 1.45;
    letter-spacing: 0.005em;
}

.dark .hero-ocr-region {
    color: rgba(248, 250, 252, 0.96);
}

.hero-ocr-text-row {
    display: block;
    transition: color 0.3s ease, text-shadow 0.3s ease;
}

/* Spotlight glow scanning effects when text is framed */
.hero-ocr-overlay.is-visible + .hero-ocr-mock .hero-ocr-text-row {
    color: rgba(15, 23, 42, 1);
    text-shadow: 0 0 1px rgba(15, 122, 216, 0.1);
}

.dark .hero-ocr-overlay.is-visible + .hero-ocr-mock .hero-ocr-text-row {
    color: #ffffff;
    text-shadow: 0 0 10px rgba(91, 178, 255, 0.55), 0 0 20px rgba(91, 178, 255, 0.25);
}

/* Dim overlay confined to the preview stage only */
.hero-ocr-overlay {
    position: absolute;
    inset: 0;
    z-index: 2;
    background: rgba(2, 6, 23, 0.32);
    border-radius: inherit;
    pointer-events: none;
    opacity: 0;
    transition: opacity 0.3s ease;
}

.dark .hero-ocr-overlay {
    background: rgba(2, 6, 23, 0.65);
}

.hero-ocr-overlay.is-visible {
    opacity: 1;
}

/* Selection rectangle — JS computes left/top/width/height from the
   region's bounding rect inside the preview stage. */
.hero-ocr-selection {
    position: absolute;
    z-index: 4;
    left: 0;
    top: 0;
    width: 0;
    height: 0;
    border: 2px solid var(--primary-light);
    background: rgba(15, 122, 216, 0.10);
    border-radius: 4px;
    box-shadow: 0 0 0 1px rgba(255, 255, 255, 0.6) inset;
    opacity: 0;
    transition: width 0.55s cubic-bezier(0.22, 1, 0.36, 1),
                height 0.55s cubic-bezier(0.22, 1, 0.36, 1),
                left 0.55s cubic-bezier(0.22, 1, 0.36, 1),
                top 0.55s cubic-bezier(0.22, 1, 0.36, 1),
                opacity 0.2s ease;
    pointer-events: none;
}

.dark .hero-ocr-selection {
    border-color: var(--primary-dark);
    background: rgba(91, 178, 255, 0.16);
}

.hero-ocr-selection.is-visible {
    opacity: 1;
}

.hero-ocr-handle {
    position: absolute;
    width: 9px;
    height: 9px;
    border-radius: 50%;
    background: var(--primary-light);
    box-shadow: 0 0 0 2px white;
}

.dark .hero-ocr-handle {
    background: var(--primary-dark);
    box-shadow: 0 0 0 2px #07111f;
}

.hero-ocr-handle-tl { top: -5px;    left: -5px; }
.hero-ocr-handle-tr { top: -5px;    right: -5px; }
.hero-ocr-handle-bl { bottom: -5px; left: -5px; }
.hero-ocr-handle-br { bottom: -5px; right: -5px; }

.hero-ocr-dimensions {
    position: absolute;
    top: -20px;
    left: 0;
    padding: 2px 7px;
    border-radius: 4px;
    background: var(--primary-light);
    color: white;
    font-size: 10px;
    font-weight: 800;
    letter-spacing: 0.02em;
    white-space: nowrap;
}

.dark .hero-ocr-dimensions {
    background: var(--primary-dark);
    color: #07111f;
}

.hero-ocr-crosshair {
    position: absolute;
    z-index: 5;
    width: 26px;
    height: 26px;
    margin: -13px 0 0 -13px;
    pointer-events: none;
    opacity: 0;
    transition: left 0.55s cubic-bezier(0.22, 1, 0.36, 1),
                top 0.55s cubic-bezier(0.22, 1, 0.36, 1),
                opacity 0.2s ease;
}

.hero-ocr-crosshair.is-visible {
    opacity: 1;
}

.hero-ocr-crosshair-x,
.hero-ocr-crosshair-y {
    position: absolute;
    background: rgba(15, 122, 216, 0.85);
}

.dark .hero-ocr-crosshair-x,
.dark .hero-ocr-crosshair-y {
    background: rgba(91, 178, 255, 0.9);
}

.hero-ocr-crosshair-x {
    left: 0;
    right: 0;
    top: 50%;
    height: 1px;
    transform: translateY(-50%);
}

.hero-ocr-crosshair-y {
    top: 0;
    bottom: 0;
    left: 50%;
    width: 1px;
    transform: translateX(-50%);
}

/* (Section ordering: preview / recognized / translated render
   as a single vertical stack — no `hero-ocr-row` grid.) */

/* === Floating SwiftBiu-style toolbar (right side of OCR panel) ===
   Mirrors the native ToolbarPanel: vertical glass card, two action
   groups (text actions on top, image actions below), each row
   identical visual language to the text/file channel toolbars. */
.hero-ocr-toolbar {
    position: absolute;
    top: 12%;
    right: 4.5%;
    z-index: 78; /* sits above the Mac window AND the ocr cards */
    width: 168px;
    max-height: 72%;
    overflow-y: auto;
    overflow-x: hidden;
    scrollbar-width: none;
    display: flex;
    flex-direction: column;
    gap: 3px;
    padding: 7px;
    border: 1px solid rgba(15, 23, 42, 0.1);
    border-radius: 10px;
    background: rgba(255, 255, 255, 0.96);
    box-shadow: 0 22px 52px rgba(15, 23, 42, 0.22);
    backdrop-filter: blur(18px) saturate(160%);
    -webkit-backdrop-filter: blur(18px) saturate(160%);
    opacity: 0;
    transform: translateX(8px) scale(0.96);
    pointer-events: none;
    transition: opacity 0.28s ease, transform 0.28s cubic-bezier(0.22, 1, 0.36, 1);
}

.hero-ocr-toolbar::-webkit-scrollbar {
    display: none;
}

.dark .hero-ocr-toolbar {
    border-color: rgba(255, 255, 255, 0.12);
    background: rgba(15, 23, 42, 0.96);
}

.hero-ocr-toolbar.is-visible {
    opacity: 1;
    transform: translateX(0) scale(1);
    pointer-events: auto;
}

.hero-ocr-toolbar-group-title {
    margin: 4px 6px 2px;
    color: rgba(100, 116, 139, 0.78);
    font-size: 9px;
    font-weight: 900;
    letter-spacing: 0.14em;
    text-transform: uppercase;
}

.dark .hero-ocr-toolbar-group-title {
    color: rgba(203, 213, 225, 0.74);
}

.hero-ocr-toolbar-divider {
    display: block;
    height: 1px;
    margin: 5px 4px;
    background: rgba(15, 23, 42, 0.08);
}

.dark .hero-ocr-toolbar-divider {
    background: rgba(255, 255, 255, 0.08);
}

.hero-ocr-toolbar-action {
    display: flex;
    width: 100%;
    align-items: center;
    gap: 9px;
    padding: 7px 9px;
    border-radius: 7px;
    border: 1px solid transparent;
    background: transparent;
    color: rgba(30, 41, 59, 0.92);
    font-size: 11px;
    font-weight: 800;
    text-align: left;
    transition: background 0.18s ease,
                color 0.18s ease,
                border-color 0.18s ease,
                transform 0.18s ease;
}

.dark .hero-ocr-toolbar-action {
    color: rgba(226, 232, 240, 0.9);
}

.hero-ocr-toolbar-action .material-symbols-outlined {
    font-size: 16px;
    color: var(--primary-light);
    flex: none;
}

.dark .hero-ocr-toolbar-action .material-symbols-outlined {
    color: var(--primary-dark);
}

.hero-ocr-toolbar-action > span:not(.material-symbols-outlined) {
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
    min-width: 0;
}

.hero-ocr-toolbar-action.is-armed {
    background: rgba(15, 122, 216, 0.14);
    border-color: rgba(15, 122, 216, 0.32);
    color: var(--primary-light);
    transform: translateX(2px);
}

.dark .hero-ocr-toolbar-action.is-armed {
    background: rgba(91, 178, 255, 0.18);
    border-color: rgba(91, 178, 255, 0.45);
    color: var(--primary-dark);
}

/* === Bottom subtitle band === */
.hero-ocr-caption {
    margin: 0;
    padding: 12px 16px;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    background: rgba(15, 122, 216, 0.10);
    border-top: 1px solid rgba(15, 23, 42, 0.08);
    color: rgba(15, 23, 42, 0.92);
    font-size: 14px;
    font-weight: 900;
    letter-spacing: 0.01em;
    transition: background 0.25s ease;
}

.dark .hero-ocr-caption {
    background: rgba(91, 178, 255, 0.16);
    border-top-color: rgba(255, 255, 255, 0.08);
    color: white;
}

.hero-ocr-caption-icon {
    font-size: 18px;
    color: var(--primary-light);
}

.dark .hero-ocr-caption-icon {
    color: var(--primary-dark);
}

/* === Floating shortcut hint chip === */
.hero-ocr-shortcut {
    position: absolute;
    top: 14px;
    left: 50%;
    transform: translate(-50%, -8px);
    display: inline-flex !important;
    align-items: center !important;
    justify-content: center !important;
    gap: 6px !important;
    padding: 5px 10px !important;
    width: auto !important;
    max-width: max-content !important;
    white-space: nowrap !important;
    border: 1px solid rgba(255, 255, 255, 0.16) !important;
    border-radius: 9px !important;
    background: rgba(15, 23, 42, 0.88) !important;
    color: #f8fafc !important;
    font-size: 11px !important;
    font-weight: 700 !important;
    box-shadow: 0 10px 25px rgba(0, 0, 0, 0.35) !important;
    backdrop-filter: blur(12px) !important;
    -webkit-backdrop-filter: blur(12px) !important;
    opacity: 0;
    transition: opacity 0.25s ease, transform 0.25s ease;
    z-index: 30;
}

.hero-ocr-shortcut.is-visible {
    opacity: 1;
    transform: translate(-50%, 0);
}

.hero-clipboard-shortcut-hint {
    top: var(--clipboard-hint-top, 50%) !important;
    bottom: auto !important;
    left: var(--clipboard-hint-left, 50%) !important;
    transform: translate(-50%, -4px) !important;
}
.hero-clipboard-shortcut-hint.is-visible {
    transform: translate(-50%, -10px) !important;
}

.hero-ocr-shortcut kbd {
    display: inline-flex !important;
    align-items: center !important;
    justify-content: center !important;
    min-width: 20px !important;
    height: 20px !important;
    padding: 0 5px !important;
    border-radius: 4px !important;
    border: 1px solid rgba(255, 255, 255, 0.2) !important;
    background: rgba(255, 255, 255, 0.12) !important;
    color: #ffffff !important;
    font-family: var(--font-sans) !important;
    font-size: 10px !important;
    font-weight: 800 !important;
    box-shadow: 0 1px 2px rgba(0, 0, 0, 0.2) !important;
}

@media (max-width: 640px) {
    .hero-demo-stage {
        width: 100%;
        min-height: auto !important;
        aspect-ratio: 9 / 13;
    }
    .hero-ocr-body { padding: 10px; padding-right: 10px; gap: 9px; overflow-y: auto !important; }
    .hero-ocr-preview-stage {
        margin: 0;
        padding: 14px 16px;
        min-height: 110px;
    }
    .hero-ocr-region { font-size: 13px; }
    .hero-ocr-section-body { font-size: 11px; padding: 10px 12px 12px; }
    /* On mobile, the toolbar sits at the bottom edge as a horizontal scroll strip */
    .hero-ocr-toolbar {
        top: auto;
        right: 4%;
        left: 4%;
        bottom: 7%;
        width: auto;
        max-height: none;
        flex-direction: row;
        overflow-x: auto;
        overflow-y: hidden;
        gap: 4px;
        padding: 6px;
        transform: translateY(8px) scale(0.96);
        opacity: 0;
        pointer-events: none;
        transition: opacity 0.28s ease, transform 0.28s cubic-bezier(0.22, 1, 0.36, 1);
    }
    .hero-ocr-toolbar.is-visible {
        transform: translateY(0) scale(1) !important;
        opacity: 1 !important;
        pointer-events: auto !important;
        z-index: 999 !important;
        display: flex !important;
    }
    .hero-ocr-toolbar-group-title { display: none; }
    .hero-ocr-toolbar-divider {
        width: 1px;
        height: 20px;
        margin: 0 3px;
        align-self: center;
    }
    .hero-ocr-toolbar-action {
        flex: 0 0 auto;
        width: auto !important;
        font-size: 10px;
        padding: 6px 8px;
        white-space: nowrap;
    }

    .hero-ocr-preview {
        min-height: auto;
    }

    .hero-ocr-recognized,
    .hero-ocr-translated {
        min-height: auto;
    }

    .hero-ocr-recognized .hero-ocr-section-body,
    .hero-ocr-translated .hero-ocr-section-body {
        padding: 8px 10px 16px;
    }

    .hero-ocr-caption {
        font-size: 12px;
        padding: 10px 12px;
        transition: opacity 0.25s ease, transform 0.25s ease, height 0.25s ease, padding 0.25s ease, border-color 0.25s ease;
    }

    .has-ocr-toolbar .hero-ocr-caption {
        opacity: 0;
        height: 0;
        padding-top: 0;
        padding-bottom: 0;
        border-top-color: transparent;
        pointer-events: none;
        transform: translateY(4px);
        overflow: hidden;
    }

    .has-ocr-toolbar .hero-ocr-body {
        padding-bottom: 58px !important;
    }

    /* Compress table cell padding to save space on small mobile screens */
    table th, table td {
        padding-left: 0.625rem !important; /* 10px */
        padding-right: 0.625rem !important; /* 10px */
        padding-top: 0.625rem !important; /* 10px */
        padding-bottom: 0.625rem !important; /* 10px */
        font-size: 12px !important;
    }
}

/* Extra small screens under 360px (e.g. iPhone SE) */
@media (max-width: 360px) {
    .hero-demo-stage {
        min-height: 390px !important;
    }
    .hero-mac-window {
        top: 15% !important;
        bottom: 8% !important;
    }
}

@media (max-width: 480px) {
    .hero-demo-tab-text {
        display: none;
    }
    .hero-demo-tab {
        padding: 0 10px;
        gap: 0;
    }
    .hero-demo-tabs {
        gap: 2px;
        padding: 2px;
    }
}

/* ========== Developer docs (Mintlify-style shell) ========== */
.docs-prose table {
  display: block;
  width: 100%;
  overflow-x: auto;
  border-collapse: separate;
  border-spacing: 0;
  margin: 1.25rem 0;
  border: 1px solid var(--border-light);
  border-radius: 12px;
  background: var(--card-background-light);
}
.dark .docs-prose table {
  border-color: var(--border-dark);
  background: var(--card-background-dark);
}
.docs-prose thead th {
  position: sticky;
  top: 0;
  z-index: 1;
  background: rgba(248, 250, 252, 0.96);
  font-size: 12px;
  text-transform: uppercase;
  letter-spacing: 0.04em;
  color: #64748b;
  border-bottom: 1px solid var(--border-light);
}
.dark .docs-prose thead th {
  background: rgba(15, 18, 22, 0.96);
  border-bottom-color: var(--border-dark);
  color: #94a3b8;
}
.docs-prose th,
.docs-prose td {
  padding: 0.7rem 0.9rem;
  border-bottom: 1px solid rgba(15, 23, 42, 0.06);
  vertical-align: top;
  font-size: 0.92rem;
  line-height: 1.5;
}
.dark .docs-prose th,
.dark .docs-prose td {
  border-bottom-color: rgba(248, 250, 252, 0.06);
}
.docs-prose tbody tr:nth-child(even) {
  background: rgba(15, 23, 42, 0.02);
}
.dark .docs-prose tbody tr:nth-child(even) {
  background: rgba(248, 250, 252, 0.02);
}
.docs-prose tbody tr:last-child th,
.docs-prose tbody tr:last-child td {
  border-bottom: 0;
}
.docs-prose .markdown-alert,
.docs-prose .github-alert,
.docs-prose blockquote {
  border-left: 4px solid #0f7ad8;
  border-radius: 0 12px 12px 0;
  background: rgba(15, 122, 216, 0.08);
  padding: 0.9rem 1rem;
  margin: 1.25rem 0;
}
.dark .docs-prose .markdown-alert,
.dark .docs-prose .github-alert,
.dark .docs-prose blockquote {
  background: rgba(91, 178, 255, 0.08);
  border-left-color: #5bb2ff;
}
.docs-prose .markdown-alert-tip,
.docs-prose .github-alert-tip {
  border-left-color: #10b981;
  background: rgba(16, 185, 129, 0.08);
}
.docs-prose .markdown-alert-warning,
.docs-prose .github-alert-warning {
  border-left-color: #f59e0b;
  background: rgba(245, 158, 11, 0.1);
}
.docs-prose .markdown-alert-caution,
.docs-prose .github-alert-caution,
.docs-prose .markdown-alert-important {
  border-left-color: #ef4444;
  background: rgba(239, 68, 68, 0.08);
}
.docs-prose h2,
.docs-prose h3 {
  scroll-margin-top: 6rem;
}
.docs-code {
  border-color: #30363d !important;
  background: #0d1117 !important;
}
.docs-code pre,
.docs-code pre code,
.docs-code code.hljs {
  background: #0d1117 !important;
  color: #e6edf3 !important;
}
.docs-code pre code {
  padding: 0 !important;
}
.docs-code .hljs-comment,
.docs-code .hljs-quote {
  color: #8b949e !important;
}
.docs-code .hljs-keyword,
.docs-code .hljs-selector-tag,
.docs-code .hljs-doctag {
  color: #ff7b72 !important;
}
.docs-code .hljs-title,
.docs-code .hljs-title.function_,
.docs-code .hljs-section,
.docs-code .hljs-function {
  color: #d2a8ff !important;
}
.docs-code .hljs-attr,
.docs-code .hljs-attribute,
.docs-code .hljs-property,
.docs-code .hljs-variable,
.docs-code .hljs-template-variable {
  color: #79c0ff !important;
}
.docs-code .hljs-string,
.docs-code .hljs-regexp,
.docs-code .hljs-addition {
  color: #a5d6ff !important;
}
.docs-code .hljs-number,
.docs-code .hljs-literal,
.docs-code .hljs-symbol,
.docs-code .hljs-bullet {
  color: #79c0ff !important;
}
.docs-code .hljs-built_in,
.docs-code .hljs-type,
.docs-code .hljs-meta,
.docs-code .hljs-link {
  color: #ffa657 !important;
}
.docs-code .hljs-name,
.docs-code .hljs-selector-id,
.docs-code .hljs-selector-class {
  color: #7ee787 !important;
}
.docs-code .hljs-deletion {
  color: #ffa198 !important;
}
.docs-prose :not(pre) > code::before,
.docs-prose :not(pre) > code::after {
  content: none !important;
}
@media (max-width: 640px) {
  .docs-prose :not(pre) > code {
    white-space: normal;
    overflow-wrap: anywhere;
    word-break: break-word;
  }
}
/* Developer docs critical shell styles.
 * These load before the Tailwind CDN runtime so page navigation does not
 * briefly render the module menu as an unstyled document outline. */
/* Keep document navigation instant. The default root cross-fade made the
   header and sidebars blink whenever readers switched topics. */

/* Do NOT put global `.hidden { display: none !important }` here.
 * It breaks responsive Tailwind pairs like `hidden md:flex` (primary nav),
 * because `.md:flex` cannot override an !important base rule. */

.docs-page {
  min-height: 100vh;
  margin: 0;
  display: flex;
  flex-direction: column;
  background: var(--background-light);
  color: var(--text-light);
}
.dark .docs-page {
  background: var(--background-dark);
  color: var(--text-dark);
}
.docs-layout {
  box-sizing: border-box;
  width: 100%;
  max-width: 80rem;
  margin-inline: auto;
  padding: 1.5rem 1rem 4rem;
  display: flex;
  flex: 1 1 auto;
  flex-direction: column;
}
.docs-mobile-toolbar {
  width: 100%;
  margin-bottom: 1rem;
  display: flex;
  align-items: center;
  gap: 0.5rem;
}
.docs-mobile-toolbar button {
  min-height: 2.5rem;
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  border: 1px solid var(--border-light);
  border-radius: 0.5rem;
  background: var(--card-background-light);
  padding: 0.5rem 0.75rem;
  color: var(--text-light);
  font: inherit;
  font-size: 0.875rem;
  font-weight: 600;
}
.dark .docs-mobile-toolbar button {
  border-color: var(--border-dark);
  background: var(--card-background-dark);
  color: var(--text-dark);
}
#docs-toc-toggle {
  margin-left: auto;
}
#mobile-menu {
  position: fixed;
  inset: 0;
  z-index: 10000;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  background: rgba(248, 250, 252, 0.96);
  transform: translate3d(100%, 0, 0);
  visibility: hidden;
  pointer-events: none;
  will-change: transform;
  transition: transform 200ms ease, visibility 0s linear 200ms;
}
.dark #mobile-menu {
  background: rgba(9, 11, 13, 0.96);
}
#mobile-menu.translate-x-0,
#mobile-menu.is-open {
  transform: translate3d(0, 0, 0);
  visibility: visible;
  pointer-events: auto;
  transition-delay: 0s;
}

body.mobile-menu-open {
  overflow: hidden;
  overscroll-behavior: none;
}
.docs-main {
  width: 100%;
  min-width: 0;
  flex: 1 1 auto;
  overflow: visible;
}
.docs-drawer-left,
.docs-drawer-right {
  box-sizing: border-box;
  position: fixed;
  top: 0;
  bottom: 0;
  z-index: 120;
  width: 18rem;
  overflow-y: auto;
  background: var(--background-light);
  transition: transform 180ms ease;
  scrollbar-gutter: stable;
}
.docs-drawer-left::-webkit-scrollbar,
.docs-drawer-right::-webkit-scrollbar { width: 12px; }
.docs-drawer-left::-webkit-scrollbar-thumb,
.docs-drawer-right::-webkit-scrollbar-thumb {
  border: 2px solid transparent;
  border-radius: 999px;
  min-height: 36px;
  background: #94a3b8;
  background-clip: padding-box;
}
.dark .docs-drawer-left,
.dark .docs-drawer-right {
  background: var(--background-dark);
}
.dark .docs-drawer-left::-webkit-scrollbar-thumb,
.dark .docs-drawer-right::-webkit-scrollbar-thumb { background-color: #64748b; }

/* Reserve an icon slot before the ligature font loads, so the overview label
   never wraps and shifts the sidebar's saved scroll position. */
#guide-topic-nav .docs-nav-overview > .material-symbols-outlined {
  width: 1em;
  height: 1em;
  flex: 0 0 1em;
}

@supports not selector(::-webkit-scrollbar) {
  .docs-drawer-left,
  .docs-drawer-right { scrollbar-color: #94a3b8 transparent; }
  .dark .docs-drawer-left,
  .dark .docs-drawer-right { scrollbar-color: #64748b transparent; }
}

#docs-right-toc .relative > .material-symbols-outlined {
  top: 50%;
  transform: translateY(-50%);
  line-height: 1;
  pointer-events: none;
}

/* Fragment targets already use the document's scroll-padding for the fixed
   header. A second margin made native anchor jumps stop too far above them. */
body.docs-page .docs-main [id] { scroll-margin-top: 0; }
#toc-nav a[hidden] { display: none !important; }
@media (prefers-reduced-motion: reduce) {
  html.scroll-smooth { scroll-behavior: auto !important; }
}
.docs-drawer-left {
  left: 0;
  padding: 1.25rem;
  border-right: 1px solid #e2e8f0;
  transform: translateX(-100%);
}
.docs-drawer-right {
  right: 0;
  padding: 1.25rem;
  border-left: 1px solid #e2e8f0;
  transform: translateX(100%);
}
.dark .docs-drawer-left,
.dark .docs-drawer-right {
  border-color: #1e293b;
}
.docs-drawer-left.translate-x-0,
.docs-drawer-right.translate-x-0 {
  transform: translateX(0);
  box-shadow: 0 20px 50px rgba(15, 23, 42, 0.25);
}
#docs-nav-backdrop,
#docs-toc-backdrop {
  position: fixed;
  inset: 0;
  z-index: 1090;
  display: none;
  background: rgba(0, 0, 0, 0.4);
}
#docs-nav-backdrop:not(.hidden),
#docs-toc-backdrop:not(.hidden) {
  display: block;
}
#module-nav {
  display: flex;
  flex-direction: column;
}
#module-nav a {
  text-decoration: none;
}
#module-nav .docs-nav-overview {
  display: block;
  border: 1px solid rgba(203, 213, 225, 0.72);
  background: rgba(255, 255, 255, 0.58);
  color: #334155;
  font-size: 0.8125rem;
  line-height: 1.25rem;
}
.dark #module-nav .docs-nav-overview {
  border-color: #1e293b;
  background: rgba(15, 23, 42, 0.42);
  color: #e2e8f0;
}
#module-nav .docs-nav-section {
  margin-bottom: 1.125rem;
}
#module-nav .docs-nav-heading {
  margin: 0;
  line-height: 1rem;
}
#module-nav .docs-nav-link {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  min-height: 2.25rem;
  color: #64748b;
  font-size: 0.8125rem;
  line-height: 1.25rem;
}
.dark #module-nav .docs-nav-link {
  color: #94a3b8;
}
#module-nav .docs-nav-dot {
  width: 0.375rem;
  height: 0.375rem;
  flex: 0 0 0.375rem;
  border-radius: 9999px;
  background: #cbd5e1;
}
.dark #module-nav .docs-nav-dot {
  background: #475569;
}
#module-nav [data-active="true"] {
  background: rgba(15, 122, 216, 0.1);
  color: var(--primary-light);
  font-weight: 600;
}
#module-nav [data-active="true"] .docs-nav-dot {
  background: var(--primary-light);
}
.dark #module-nav [data-active="true"] {
  background: rgba(91, 178, 255, 0.14);
  color: var(--primary-dark);
}
.dark #module-nav [data-active="true"] .docs-nav-dot {
  background: var(--primary-dark);
}

.developer-hero-card {
  box-sizing: border-box;
  width: 100%;
}
.developer-hero-copy {
  max-width: 60rem;
}
.developer-hero-actions {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 0.75rem;
}
.developer-hero-action {
  min-height: 2.75rem;
  flex: 0 0 auto;
  white-space: nowrap;
}
.developer-prompt-card {
  box-sizing: border-box;
  width: 100%;
  min-width: 0;
  margin-top: 2rem;
  overflow: hidden;
}
.developer-prompt-card pre {
  box-sizing: border-box;
  max-width: 100%;
}

@media (max-width: 520px) {
  .developer-hero-actions {
    align-items: stretch;
  }
  .developer-hero-action {
    width: 100%;
  }
}

@media (max-width: 1279px) {
  html:has(body.docs-page) { scroll-padding-top: 9rem; }
  .docs-mobile-toolbar {
    position: sticky;
    top: 4.75rem;
    z-index: 30;
    padding-block: 0.375rem;
    background: var(--background-light);
  }
  .dark .docs-mobile-toolbar { background: var(--background-dark); }
  #docs-right-toc { z-index: 1100; }
}

@media (max-width: 1023px) {
  #docs-left-nav { z-index: 1100; }
}

@media (min-width: 1024px) and (max-width: 1279px) {
  #docs-left-nav {
    top: 9rem;
    height: calc(100vh - 10rem);
  }
}

@media (min-width: 640px) {
  .docs-layout {
    padding-inline: 1.5rem;
  }
}

@media (min-width: 1024px) {
  .docs-layout {
    padding-inline: 2rem;
    flex-direction: row;
    flex-wrap: wrap;
  }
  .docs-mobile-toolbar {
    flex: 0 0 100%;
  }
  #docs-nav-toggle {
    display: none;
  }
  .docs-drawer-left {
    position: sticky;
    top: 6rem;
    z-index: 20;
    width: 15rem;
    height: calc(100vh - 8rem);
    flex: 0 0 15rem;
    transform: none;
    border: 0;
    background: transparent;
    padding: 0 1.25rem 0 0;
  }
  .dark .docs-drawer-left {
    background: transparent;
  }
  .docs-main {
    width: auto;
    flex: 1 1 0%;
    padding-left: 1.5rem;
  }
  #docs-nav-backdrop {
    display: none !important;
  }
}

@media (min-width: 1280px) {
  .docs-layout {
    max-width: 1500px;
  }
  .docs-mobile-toolbar {
    display: none;
  }
  .docs-drawer-left {
    width: 16rem;
    flex-basis: 16rem;
  }
  .docs-main {
    padding-left: 2rem;
  }
  .docs-drawer-right {
    position: sticky;
    top: 6rem;
    z-index: 20;
    width: 14rem;
    height: calc(100vh - 8rem);
    flex: 0 0 14rem;
    transform: none;
    border: 0;
    background: transparent;
    padding: 0 0 0 1.5rem;
  }
  .dark .docs-drawer-right {
    background: transparent;
  }
  #docs-toc-backdrop {
    display: none !important;
  }
}

/* Header layout fallback (independent of Tailwind CDN utility generation) */
.site-header-shell {
  position: fixed !important;
  inset: 0 0 auto;
  z-index: 1000;
  width: 100%;
}

.site-header-spacer {
  flex: 0 0 4.75rem;
  height: 4.75rem;
}

.home-page .site-header-spacer {
  display: none;
}

header.site-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  background: rgba(255, 255, 255, 0.94);
}

.dark header.site-header {
  background: rgba(15, 18, 22, 0.94);
}

header.site-header > div:first-child,
header.site-header > div:last-child {
  display: flex;
  align-items: center;
}

.site-download-selector {
  position: relative;
}

.site-download-trigger {
  white-space: nowrap;
}

.site-download-menu {
  position: absolute;
  top: calc(100% + 0.75rem);
  right: 0;
  z-index: 10002;
  width: min(18rem, calc(100vw - 2rem));
  max-height: calc(100dvh - 6rem);
  overflow-y: auto;
  padding: 0.5rem;
  white-space: normal;
  border: 1px solid var(--border-color-light, #dbe1e8);
  border-radius: 0.75rem;
  background: rgba(255, 255, 255, 0.98);
  color: var(--text-primary-light, #172033);
  box-shadow: 0 18px 50px rgba(15, 23, 42, 0.2);
  backdrop-filter: blur(18px);
}

.site-download-menu[hidden] {
  display: none !important;
}

.dark .site-download-menu {
  border-color: var(--border-color-dark, #374151);
  background: rgba(24, 27, 33, 0.98);
  color: #fff;
}

.site-download-menu-title {
  margin: 0;
  padding: 0.5rem 0.75rem 0.625rem;
  color: #64748b;
  font-size: 0.75rem;
  font-weight: 700;
}

.dark .site-download-menu-title {
  color: #9ca3af;
}

.site-download-note {
  margin: 0;
  padding: 0 0.75rem 0.5rem;
  color: #64748b;
  font-size: 0.75rem;
  line-height: 1.6;
  overflow-wrap: anywhere;
}

.dark .site-download-note {
  color: #9ca3af;
}

.site-download-info {
  margin-top: 0.5rem;
  border-top: 1px solid var(--border-color-light, #dbe1e8);
}

.dark .site-download-info {
  border-color: var(--border-color-dark, #374151);
}

.site-download-info summary {
  min-height: 44px;
  padding: 0.75rem;
  cursor: pointer;
  font-size: 0.75rem;
  font-weight: 650;
}

.site-download-release {
  display: flex;
  min-height: 44px;
  align-items: center;
  padding: 0.5rem 0.75rem;
  color: #007aff;
  font-size: 0.75rem;
  font-weight: 650;
}

.dark .site-download-release {
  color: #53a4ff;
}

.site-download-info summary:focus-visible,
.site-download-release:focus-visible {
  outline: 2px solid #007aff;
  outline-offset: -2px;
  border-radius: 0.5rem;
}

.site-download-option {
  display: flex;
  align-items: center;
  gap: 0.75rem;
  padding: 0.75rem;
  border-radius: 0.5rem;
  color: inherit;
  text-decoration: none;
  transition: background-color 150ms ease, color 150ms ease;
}

.site-download-option:hover,
.site-download-option:focus-visible {
  background: rgba(0, 122, 255, 0.1);
  outline: none;
}

.site-download-option-icon {
  color: #007aff;
  font-size: 1.25rem;
}

.dark .site-download-option-icon {
  color: #53a4ff;
}

.site-download-option-copy {
  display: flex;
  min-width: 0;
  flex: 1;
  flex-direction: column;
  gap: 0.125rem;
}

.site-download-option-name {
  font-size: 0.875rem;
  font-weight: 650;
}

.site-download-option-arch {
  color: #64748b;
  font-size: 0.75rem;
}

.dark .site-download-option-arch {
  color: #9ca3af;
}

.site-download-option-end {
  color: #64748b;
  font-size: 1rem;
}

/* Primary nav: mobile hidden, desktop flex — use !important so Tailwind .hidden cannot win */
header.site-header > nav[aria-label="Primary"],
header.site-header > nav.site-primary-nav {
  display: none !important;
  align-items: center;
  gap: 1.25rem;
}

@media (min-width: 1280px) {
  header.site-header > nav[aria-label="Primary"],
  header.site-header > nav.site-primary-nav {
    display: flex !important;
  }

  #mobile-menu-btn {
    display: none !important;
  }
}

#mobile-menu.translate-x-full {
  visibility: hidden;
  pointer-events: none;
}

#mobile-menu:not(.translate-x-full) {
  visibility: visible;
  pointer-events: auto;
}

@media (max-width: 1279px) {
  header.site-header > nav[aria-label="Primary"],
  header.site-header > nav.site-primary-nav {
    display: none !important;
  }
}

/* Anchor the picker to the header, rather than the leftmost action button. */
@media (max-width: 1279px) {
  .site-header .site-download-selector { position: static; }
  .site-header .site-download-menu {
    right: 0;
    width: min(22rem, 100%);
    max-height: min(36rem, calc(100dvh - 6rem));
    overscroll-behavior: contain;
  }
  #mobile-menu {
    height: 100dvh;
    overflow-y: auto;
    overscroll-behavior: contain;
    justify-content: flex-start;
    padding: max(5rem, env(safe-area-inset-top)) 1.5rem max(2rem, env(safe-area-inset-bottom));
  }
  #mobile-menu nav { width: 100%; gap: 0.75rem; }
  #mobile-menu a { display: flex; min-height: 44px; align-items: center; justify-content: center; }
  #close-menu-btn { width: 44px; height: 44px; }
}
@media (max-width: 767px) {
  .site-header { padding: 0.5rem; }
  .site-header-actions { gap: 0.125rem; flex-shrink: 0; }
  .site-header-actions > [data-header-github] { display: none; }
  .site-header-actions button { min-width: 44px; min-height: 44px; }
  .site-header > div:first-child a { min-height: 44px; }
}
@media (max-width: 359px) {
  .site-header > div:first-child h2 { display: none; }
}

/* === Hero Demo Clipboard & Notes Auto-Paste Scenario === */
.hero-demo-tab-divider {
    display: inline-block;
    width: 1px;
    height: 16px;
    margin: 0 4px;
    background: rgba(148, 163, 184, 0.3);
}

.hero-mode-toggle.is-active {
    background: linear-gradient(135deg, #007aff, #0a84ff) !important;
    color: #ffffff !important;
    box-shadow: 0 2px 8px rgba(0, 122, 255, 0.35);
}

.hero-clipboard-window {
    left: 4.5%;
    right: 52%;
    top: 9%;
    bottom: 6%;
}

.hero-notes-target-window {
    left: 52%;
    right: 4.5%;
    top: 9%;
    bottom: 6%;
}

.hero-codex-target-window {
    left: 3%;
    right: 3%;
    top: 7%;
    bottom: 4%;
    z-index: 5;
    overflow: hidden;
    border-color: rgba(15, 23, 42, 0.12);
    background: #f7f7f5;
}

.dark .hero-codex-target-window {
    border-color: rgba(255, 255, 255, 0.1);
    background: #181817;
}

.hero-codex-titlebar {
    grid-template-columns: 54px minmax(0, 1fr) 54px;
}

.hero-codex-titlebar .hero-window-title {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 6px;
}

.hero-codex-mark {
    display: grid;
    width: 16px;
    height: 16px;
    place-items: center;
    border-radius: 5px;
    color: #fff;
    background: #151515;
    font-family: Georgia, "Iowan Old Style", serif;
    font-size: 9px;
    font-weight: 800;
}

.hero-codex-mark .material-symbols-outlined {
    font-size: 12px !important;
}

.dark .hero-codex-mark {
    color: #151515;
    background: #f3f3ef;
}

.hero-codex-branch {
    justify-self: end;
    margin-right: 10px;
    padding: 2px 6px;
    border: 1px solid rgba(15, 23, 42, 0.1);
    border-radius: 999px;
    color: rgba(51, 65, 85, 0.7);
    background: rgba(255, 255, 255, 0.68);
    font-family: "SF Mono", "IBM Plex Mono", ui-monospace, monospace;
    font-size: 7px;
    line-height: 1.2;
}

.hero-codex-branch .material-symbols-outlined {
    font-size: 10px !important;
}

.dark .hero-codex-branch {
    border-color: rgba(255, 255, 255, 0.1);
    color: rgba(226, 232, 240, 0.7);
    background: rgba(255, 255, 255, 0.06);
}

.hero-codex-shell {
    height: calc(100% - 36px);
    background:
        linear-gradient(rgba(15, 23, 42, 0.025) 1px, transparent 1px),
        linear-gradient(90deg, rgba(15, 23, 42, 0.025) 1px, transparent 1px),
        #f7f7f5;
    background-size: 22px 22px;
}

.dark .hero-codex-shell {
    background:
        linear-gradient(rgba(255, 255, 255, 0.025) 1px, transparent 1px),
        linear-gradient(90deg, rgba(255, 255, 255, 0.025) 1px, transparent 1px),
        #181817;
    background-size: 22px 22px;
}

.hero-codex-chat {
    display: flex;
    height: 100%;
    min-width: 0;
    flex-direction: column;
    gap: 12px;
    padding: 18px 20px 16px;
}

.hero-codex-chat-head {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 12px;
    color: #20211f;
}

.dark .hero-codex-chat-head {
    color: #f3f3ef;
}

.hero-codex-chat-head > span:first-child {
    display: grid;
    gap: 1px;
}

.hero-codex-chat-head strong {
    font-size: 12px;
    line-height: 1.2;
}

.hero-codex-chat-head small {
    color: #85877f;
    font-size: 8px;
}

.hero-codex-local {
    display: inline-flex;
    align-items: center;
    gap: 4px;
    color: #71736d;
    font-family: "SF Mono", "IBM Plex Mono", ui-monospace, monospace;
    font-size: 7px;
}

.hero-codex-local i {
    width: 5px;
    height: 5px;
    border-radius: 50%;
    background: #35a66f;
    box-shadow: 0 0 0 3px rgba(53, 166, 111, 0.12);
}

.hero-codex-message {
    display: grid;
    grid-template-columns: 25px minmax(0, 1fr);
    align-items: start;
    gap: 8px;
    padding: 10px 11px;
    border: 1px solid rgba(15, 23, 42, 0.08);
    border-radius: 12px;
    color: #454741;
    background: rgba(255, 255, 255, 0.78);
    box-shadow: 0 8px 20px rgba(15, 23, 42, 0.045);
}

.dark .hero-codex-message {
    border-color: rgba(255, 255, 255, 0.08);
    color: #d4d5cf;
    background: rgba(255, 255, 255, 0.045);
    box-shadow: none;
}

.hero-codex-message p {
    margin: 0;
    font-size: 9px;
    line-height: 1.5;
}

.hero-codex-avatar {
    display: grid;
    width: 25px;
    height: 25px;
    place-items: center;
    border-radius: 8px;
    color: #f8f8f5;
    background: #1d1e1b;
}

.hero-codex-avatar .material-symbols-outlined {
    font-size: 13px !important;
}

.dark .hero-codex-avatar {
    color: #1d1e1b;
    background: #f0f0eb;
}

.hero-codex-source-strip {
    display: flex;
    align-items: center;
    gap: 6px;
    margin-top: -3px;
}

.hero-codex-source-strip > span {
    display: grid;
    width: 22px;
    height: 22px;
    place-items: center;
    border: 1px solid rgba(15, 23, 42, 0.07);
    border-radius: 7px;
    color: #83867e;
    background: rgba(255, 255, 255, 0.58);
}

.dark .hero-codex-source-strip > span {
    border-color: rgba(255, 255, 255, 0.07);
    background: rgba(255, 255, 255, 0.035);
}

.hero-codex-source-strip .material-symbols-outlined {
    font-size: 12px !important;
}

.hero-codex-composer {
    position: relative;
    display: flex;
    min-height: 100px;
    margin-top: auto;
    flex-direction: column;
    padding: 10px 11px 9px;
    border: 1px solid rgba(15, 23, 42, 0.14);
    border-radius: 15px;
    background: rgba(255, 255, 255, 0.94);
    box-shadow: 0 12px 30px rgba(15, 23, 42, 0.09), inset 0 1px 0 rgba(255, 255, 255, 0.82);
    transition: border-color 180ms ease, box-shadow 220ms ease, transform 220ms cubic-bezier(0.2, 0.8, 0.2, 1);
}

.dark .hero-codex-composer {
    border-color: rgba(255, 255, 255, 0.13);
    background: rgba(37, 37, 34, 0.96);
    box-shadow: 0 14px 32px rgba(0, 0, 0, 0.28);
}

.hero-codex-composer.is-receiving {
    border-color: rgba(18, 103, 232, 0.58);
    box-shadow: 0 0 0 3px rgba(18, 103, 232, 0.1), 0 14px 32px rgba(15, 23, 42, 0.12);
    transform: translateY(-1px);
}

.hero-codex-input {
    min-height: 38px;
    color: #252622;
    font-size: 10px;
    line-height: 1.45;
    white-space: pre-wrap;
    word-break: break-word;
}

.dark .hero-codex-input {
    color: #f1f1ed;
}

.hero-codex-input:empty::before {
    color: #96988f;
    content: attr(data-placeholder);
}

.hero-codex-input.is-link {
    color: #1267e8;
    text-decoration: underline;
    text-decoration-color: rgba(18, 103, 232, 0.3);
    text-underline-offset: 2px;
}

.hero-codex-attachment {
    display: none;
    min-width: 0;
    margin-bottom: 7px;
}

.hero-codex-attachment.is-visible {
    display: flex;
}

.hero-codex-attachment-card {
    display: grid;
    max-width: 100%;
    grid-template-columns: 28px minmax(0, 1fr);
    align-items: center;
    gap: 7px;
    padding: 5px 8px 5px 5px;
    border: 1px solid rgba(15, 23, 42, 0.09);
    border-radius: 9px;
    background: #f4f4f0;
    animation: hero-codex-attachment-in 280ms cubic-bezier(0.2, 0.8, 0.2, 1) both;
}

.dark .hero-codex-attachment-card {
    border-color: rgba(255, 255, 255, 0.08);
    background: rgba(255, 255, 255, 0.055);
}

.hero-codex-attachment-card > span:first-child {
    display: grid;
    width: 28px;
    height: 28px;
    place-items: center;
    border-radius: 7px;
    color: #1267e8;
    background: rgba(18, 103, 232, 0.1);
}

.hero-codex-attachment-card[data-kind="image"] > span:first-child {
    color: #b66905;
    background: rgba(245, 158, 11, 0.12);
}

.hero-codex-attachment-card[data-kind="file"] > span:first-child {
    color: #d13c4d;
    background: rgba(225, 72, 91, 0.11);
}

.hero-codex-attachment-card .material-symbols-outlined {
    font-size: 15px !important;
}

.hero-codex-attachment-card strong,
.hero-codex-attachment-card small {
    display: block;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.hero-codex-attachment-card strong {
    color: #30312d;
    font-size: 8px;
}

.dark .hero-codex-attachment-card strong {
    color: #ecece7;
}

.hero-codex-attachment-card small {
    margin-top: 1px;
    color: #8a8c84;
    font-size: 7px;
}

.hero-codex-composer-bar {
    display: flex;
    align-items: center;
    gap: 7px;
    margin-top: auto;
}

.hero-codex-add,
.hero-codex-send {
    display: grid;
    width: 22px;
    height: 22px;
    flex: 0 0 22px;
    place-items: center;
    border-radius: 50%;
}

.hero-codex-add {
    color: #65675f;
    background: #eeeee9;
}

.dark .hero-codex-add {
    color: #c3c4bd;
    background: rgba(255, 255, 255, 0.08);
}

.hero-codex-add .material-symbols-outlined,
.hero-codex-send .material-symbols-outlined {
    font-size: 13px !important;
}

.hero-codex-model {
    color: #767870;
    font-size: 7px;
    font-weight: 700;
}

.hero-codex-input-status {
    overflow: hidden;
    margin-left: auto;
    color: #8a8c84;
    font-size: 7px;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.hero-codex-input-status.is-success {
    color: #188659;
}

.hero-codex-send {
    color: #aaa;
    background: #ecece8;
    transition: color 160ms ease, background 160ms ease, transform 180ms cubic-bezier(0.2, 0.8, 0.2, 1);
}

.dark .hero-codex-send {
    color: #6f706b;
    background: rgba(255, 255, 255, 0.08);
}

.hero-codex-send.is-ready {
    color: #fff;
    background: #191a18;
    transform: scale(1.08);
    animation: hero-codex-send-ready 520ms cubic-bezier(0.2, 0.8, 0.2, 1) 1;
}

.dark .hero-codex-send.is-ready {
    color: #181817;
    background: #f1f1ed;
}

@keyframes hero-codex-attachment-in {
    from { opacity: 0; transform: translateY(5px) scale(0.96); }
    to { opacity: 1; transform: translateY(0) scale(1); }
}

@keyframes hero-codex-send-ready {
    0%, 100% { transform: scale(1.08); }
    50% { transform: scale(0.92); }
}

@media (prefers-reduced-motion: reduce) {
    .hero-codex-composer,
    .hero-codex-send,
    .hero-codex-attachment-card,
    .hero-clipboard-cursor,
    .hero-double-click-pulse,
    .hero-clipboard-transfer {
        animation: none !important;
        transition: none !important;
    }
}

.hero-clipboard-body,
.hero-notes-body {
    height: calc(100% - 36px);
    display: flex;
    overflow: hidden;
    background: rgba(255, 255, 255, 0.95);
}

.dark .hero-clipboard-body,
.dark .hero-notes-body {
    background: rgba(15, 23, 42, 0.95);
}

.hero-clipboard-list {
    flex: 1;
    padding: 8px;
    display: flex;
    flex-direction: column;
    gap: 6px;
    overflow-y: auto;
}

.hero-clipboard-item {
    display: flex;
    align-items: center;
    gap: 8px;
    padding: 8px 10px;
    border-radius: 6px;
    border: 1px solid rgba(15, 23, 42, 0.08);
    background: rgba(255, 255, 255, 0.8);
    cursor: pointer;
    transition: background 0.15s, border-color 0.15s, transform 0.15s;
}

.dark .hero-clipboard-item {
    border-color: rgba(255, 255, 255, 0.08);
    background: rgba(30, 41, 59, 0.6);
}

.hero-clipboard-item:hover,
.hero-clipboard-item.is-selected {
    border-color: rgba(0, 122, 255, 0.4);
    background: rgba(0, 122, 255, 0.08);
}

.hero-clipboard-badge {
    padding: 2px 6px;
    border-radius: 4px;
    font-size: 9px;
    font-weight: 800;
    background: rgba(0, 122, 255, 0.12);
    color: #007aff;
}

.hero-clipboard-badge.code {
    background: rgba(168, 85, 247, 0.12);
    color: #a855f7;
}

.hero-clipboard-badge.link {
    background: rgba(34, 197, 94, 0.12);
    color: #22c55e;
}

.hero-clipboard-content {
    display: flex;
    flex-direction: column;
    min-width: 0;
}

.hero-clipboard-content strong {
    font-size: 11px;
    color: rgba(30, 41, 59, 0.95);
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.dark .hero-clipboard-content strong {
    color: rgba(241, 245, 249, 0.95);
}

.hero-clipboard-content small {
    font-size: 9px;
    color: rgba(100, 116, 139, 0.8);
}

.hero-notes-sidebar {
    width: 32%;
    border-right: 1px solid rgba(15, 23, 42, 0.08);
    padding: 8px 6px;
    display: flex;
    flex-direction: column;
    gap: 4px;
}

.dark .hero-notes-sidebar {
    border-right-color: rgba(255, 255, 255, 0.08);
}

.hero-notes-folder {
    padding: 5px 8px;
    border-radius: 5px;
    font-size: 10px;
    font-weight: 600;
    color: rgba(71, 85, 105, 0.9);
}

.hero-notes-folder.is-active {
    background: rgba(234, 179, 8, 0.14);
    color: #d97706;
}

.dark .hero-notes-folder.is-active {
    background: rgba(234, 179, 8, 0.2);
    color: #fbbf24;
}

.hero-notes-editor {
    flex: 1;
    padding: 10px 12px;
    display: flex;
    flex-direction: column;
    align-items: flex-start !important;
    text-align: left !important;
    overflow-x: hidden;
}

.hero-notes-heading {
    font-size: 13px;
    font-weight: 800;
    margin-bottom: 6px;
    color: rgba(30, 41, 59, 0.95);
    text-align: left !important;
}

.dark .hero-notes-heading {
    color: rgba(241, 245, 249, 0.95);
}

.hero-notes-content {
    font-size: 11px;
    line-height: 1.5;
    color: rgba(51, 65, 85, 0.9);
    min-height: 48px;
    width: 100%;
    text-align: left !important;
    white-space: pre-wrap !important;
    word-break: break-all !important;
    overflow-wrap: anywhere !important;
}

.dark .hero-notes-content {
    color: rgba(203, 213, 225, 0.9);
}

/* Cursor & Double-Click Ripple Animation */
.hero-clipboard-cursor {
    position: absolute;
    z-index: 65;
    width: 18px;
    height: 18px;
    opacity: 0;
    pointer-events: none;
    transition: left 0.3s cubic-bezier(0.16, 1, 0.3, 1), top 0.3s cubic-bezier(0.16, 1, 0.3, 1), opacity 0.2s;
    filter: drop-shadow(0 2px 4px rgba(0, 0, 0, 0.35));
}

.hero-double-click-pulse {
    position: absolute;
    z-index: 64;
    width: 32px;
    height: 32px;
    margin-left: -16px;
    margin-top: -16px;
    border-radius: 50%;
    border: 2px solid rgba(0, 122, 255, 0.8);
    background: rgba(0, 122, 255, 0.25);
    opacity: 0;
    transform: scale(0.4);
    pointer-events: none;
    transition: opacity 0.25s, transform 0.25s cubic-bezier(0.16, 1, 0.3, 1);
}

.hero-double-click-pulse.is-pulsing {
    opacity: 1;
    transform: scale(1.4);
}

.hero-clipboard-cursor.is-clicking {
    transform: scale(0.78);
}

.hero-clipboard-transfer {
    position: absolute;
    z-index: 70;
    display: flex;
    max-width: 150px;
    align-items: center;
    gap: 5px;
    padding: 5px 8px;
    overflow: hidden;
    border: 1px solid rgba(18, 103, 232, 0.24);
    border-radius: 999px;
    color: #1267e8;
    background: rgba(255, 255, 255, 0.96);
    box-shadow: 0 8px 22px rgba(18, 103, 232, 0.18);
    font-size: 8px;
    font-weight: 700;
    opacity: 0;
    transform: translate(-50%, -50%) scale(0.76);
    pointer-events: none;
    transition:
        left 420ms cubic-bezier(0.2, 0.8, 0.2, 1),
        top 420ms cubic-bezier(0.2, 0.8, 0.2, 1),
        opacity 160ms ease,
        transform 420ms cubic-bezier(0.2, 0.8, 0.2, 1);
}

.dark .hero-clipboard-transfer {
    border-color: rgba(117, 185, 245, 0.25);
    color: #75b9f5;
    background: rgba(31, 32, 30, 0.96);
}

.hero-clipboard-transfer .material-symbols-outlined {
    flex: 0 0 auto;
    font-size: 13px !important;
}

.hero-clipboard-transfer span:last-child {
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.hero-clipboard-transfer.is-visible {
    opacity: 1;
}

.hero-clipboard-transfer.is-moving {
    transform: translate(-50%, -50%) scale(1);
}

.hero-clipboard-toast {
    position: absolute;
    bottom: 8.5%;
    right: 6%;
    z-index: 75;
    display: flex;
    align-items: center;
    gap: 6px;
    padding: 6px 12px;
    border-radius: 20px;
    background: rgba(34, 197, 94, 0.92);
    color: #ffffff;
    font-size: 10px;
    font-weight: 700;
    box-shadow: 0 8px 24px rgba(34, 197, 94, 0.35);
    opacity: 0;
    transform: translateY(8px) scale(0.92);
    transition: opacity 0.25s ease, transform 0.25s ease;
    pointer-events: none;
}

.hero-clipboard-toast.is-visible {
    opacity: 1;
    transform: translateY(0) scale(1);
}

/* Studio Stage Top Badge Bar */
.hero-demo-studio-bar {
    display: flex;
    justify-content: center;
    align-items: center;
    margin-bottom: 14px;
}

.hero-studio-badge {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    padding: 6px 18px;
    border-radius: 9999px;
    background: linear-gradient(135deg, rgba(0, 122, 255, 0.15), rgba(10, 132, 255, 0.25));
    border: 1px solid rgba(10, 132, 255, 0.35);
    color: #38bdf8;
    font-size: 13px;
    font-weight: 700;
    letter-spacing: 0.03em;
    backdrop-filter: blur(12px);
}

.hero-demo-panel-header {
    display: none !important;
}

/* === Tab nav: hidden in homepage concurrent mode, visible in single-panel / guide mode === */
.hero-demo.is-concurrent-mode .hero-demo-nav {
    display: none !important;
}

.hero-demo:not(.is-concurrent-mode) .hero-demo-nav,
.hero-demo.guide-hero-demo .hero-demo-nav {
    display: inline-flex !important;
}

/* === macOS Authentic Segmented Control === */
.hero-demo-nav {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 3px;
    padding: 3px;
    margin: 0 auto;
    border-radius: 10px;
    background: rgba(0, 0, 0, 0.05);
    border: 0.5px solid rgba(0, 0, 0, 0.08);
    backdrop-filter: blur(20px) saturate(180%);
    -webkit-backdrop-filter: blur(20px) saturate(180%);
    box-shadow: inset 0 0.5px 1px rgba(0, 0, 0, 0.05);
    max-width: 100%;
    overflow-x: auto;
}

html.dark .hero-demo-nav {
    background: rgba(255, 255, 255, 0.08);
    border-color: rgba(255, 255, 255, 0.12);
    box-shadow: inset 0 0.5px 1px rgba(255, 255, 255, 0.05);
}

.hero-demo-tab {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 6px;
    height: 28px;
    padding: 0 14px;
    border-radius: 7px;
    font-family: -apple-system, BlinkMacSystemFont, "SF Pro Text", "Helvetica Neue", sans-serif;
    font-size: 12px;
    font-weight: 500;
    color: rgba(0, 0, 0, 0.65);
    background: transparent;
    border: none;
    cursor: pointer;
    white-space: nowrap;
    user-select: none;
    transition: all 0.18s cubic-bezier(0.16, 1, 0.3, 1);
}

html.dark .hero-demo-tab {
    color: rgba(255, 255, 255, 0.65);
}

.hero-demo-tab:hover {
    color: rgba(0, 0, 0, 0.9);
}

html.dark .hero-demo-tab:hover {
    color: rgba(255, 255, 255, 0.95);
}

.hero-demo-tab.is-active {
    background: #ffffff !important;
    color: #007AFF !important;
    font-weight: 600 !important;
    box-shadow: 0 1px 3px rgba(0, 0, 0, 0.12), 0 0.5px 1px rgba(0, 0, 0, 0.08) !important;
    border: 0.5px solid rgba(0, 0, 0, 0.06) !important;
}

html.dark .hero-demo-tab.is-active {
    background: rgba(255, 255, 255, 0.18) !important;
    color: #38BDF8 !important;
    border-color: rgba(255, 255, 255, 0.15) !important;
    box-shadow: 0 1px 4px rgba(0, 0, 0, 0.3) !important;
}

.hero-demo-tab .material-symbols-outlined {
    font-size: 14px;
    opacity: 0.85;
}

.hero-demo-tab.is-active .material-symbols-outlined {
    opacity: 1;
}

/* === Full-Width Non-Overlapping Live Multi-View Studio Grid === */
.hero-demo.is-concurrent-mode .hero-demo-stage {
    display: grid;
    grid-template-columns: repeat(5, minmax(0, 1fr));
    gap: 12px;
    padding: 0;
    aspect-ratio: auto;
    min-height: 520px;
    position: relative;
    overflow: visible;
    background: transparent !important;
    box-shadow: none !important;
    border-radius: 0;
    border: none !important;
}

.hero-demo.is-concurrent-mode .hero-demo-stage::before {
    display: none;
}

/* 5 Non-Overlapping Spatial Studio Grid Cards */
.hero-demo.is-concurrent-mode .hero-demo-panel {
    position: relative !important;
    left: auto !important;
    right: auto !important;
    top: auto !important;
    bottom: auto !important;
    width: 100% !important;
    height: 485px !important;
    opacity: 1 !important;
    pointer-events: auto !important;
    border-radius: 12px;
    overflow: hidden;
    background: transparent !important;
    box-shadow: none !important;
    backdrop-filter: none !important;
    -webkit-backdrop-filter: none !important;
    border: none !important;
    transition: transform 0.35s cubic-bezier(0.16, 1, 0.3, 1), box-shadow 0.35s, border-color 0.35s;
    transform: none !important;
    z-index: 10 !important;
}

/* Inner Window positioning in 5-Column Grid Card */
.hero-demo.is-concurrent-mode .hero-demo-panel-header {
    display: flex !important;
    align-items: center;
    gap: 6px;
    height: 36px;
    padding: 0 4px;
    color: var(--text-primary);
    font-size: 13px;
    font-weight: 600;
}
.hero-demo.is-concurrent-mode .hero-demo-panel-header .material-symbols-outlined {
    font-size: 16px;
}

.hero-demo.is-concurrent-mode .hero-mac-window {
    position: absolute !important;
    left: 0 !important;
    right: 0 !important;
    top: 36px !important;
    bottom: 0 !important;
    width: auto !important;
    height: auto !important;
}

.hero-demo.is-concurrent-mode .hero-notes-body,
.hero-demo.is-concurrent-mode .hero-finder-body {
    grid-template-columns: 1fr !important;
}

/* 1. Panel 2 (File): Progress card positioned compactly at bottom so file list is not blocked */
.hero-demo.is-concurrent-mode .hero-progress-card {
    position: absolute !important;
    left: 12px !important;
    right: 12px !important;
    bottom: 12px !important;
    top: auto !important;
    width: auto !important;
    z-index: 35 !important;
    box-shadow: 0 12px 32px rgba(0, 0, 0, 0.5) !important;
    border-color: rgba(0, 122, 255, 0.4) !important;
}

.hero-demo.is-concurrent-mode .hero-file-list {
    padding-bottom: 85px !important;
    border-right: none !important;
}

/* 2. Panel 4 (OCR): Full-width content fill & equal left-right symmetric margins */
.hero-demo.is-concurrent-mode [data-hero-demo-panel="ocr"] .hero-ocr-window,
.hero-demo.is-concurrent-mode [data-hero-demo-panel="ocr"] .hero-ocr-body,
.hero-demo.is-concurrent-mode [data-hero-demo-panel="ocr"] .hero-ocr-stack,
.hero-demo.is-concurrent-mode [data-hero-demo-panel="ocr"] .hero-ocr-section,
.hero-demo.is-concurrent-mode [data-hero-demo-panel="ocr"] .hero-ocr-preview-stage {
    width: 100% !important;
    max-width: 100% !important;
    box-sizing: border-box !important;
}

.hero-demo.is-concurrent-mode [data-hero-demo-panel="ocr"] .hero-ocr-body {
    padding: 10px 12px !important;
}

.hero-demo.is-concurrent-mode [data-hero-demo-panel="ocr"] .hero-ocr-text-row {
    width: 100% !important;
    display: block !important;
    white-space: nowrap !important;
    overflow: hidden !important;
    text-overflow: ellipsis !important;
    text-align: center !important;
}

/* 3. Panel 5 (Clipboard): the target app fills the background. */
.hero-demo.is-concurrent-mode .hero-notes-target-window,
.hero-demo.is-concurrent-mode .hero-codex-target-window {
    left: 0 !important;
    right: 0 !important;
    top: 36px !important;
    bottom: 0 !important;
    z-index: 5 !important;
}

.hero-demo.is-concurrent-mode .hero-notes-target-window .hero-notes-editor {
    padding-left: 16px !important;
    padding-right: 16px !important;
}

.hero-demo.is-concurrent-mode .hero-clipboard-window {
    position: absolute !important;
    right: 12px !important;
    top: 48px !important;
    left: auto !important;
    width: 290px !important;
    height: 440px !important;
    transform-origin: top right !important;
    transform: scale(0.75) !important;
    z-index: 25 !important;
    transition: opacity 0.3s cubic-bezier(0.16, 1, 0.3, 1), transform 0.3s cubic-bezier(0.16, 1, 0.3, 1) !important;
}

@media (min-width: 1024px) {
    .hero-demo.is-concurrent-mode .hero-clipboard-window {
        transform: scale(0.8) !important;
    }
}

@media (min-width: 1280px) {
    .hero-demo.is-concurrent-mode .hero-clipboard-window {
        transform: scale(0.85) !important;
    }
}

.hero-demo.is-concurrent-mode .hero-clipboard-window.is-hidden {
    opacity: 0 !important;
    transform: scale(0.68) translateY(8px) !important;
    pointer-events: none !important;
}

@media (min-width: 1024px) {
    .hero-demo.is-concurrent-mode .hero-clipboard-window.is-hidden {
        transform: scale(0.72) translateY(8px) !important;
    }
}

@media (min-width: 1280px) {
    .hero-demo.is-concurrent-mode .hero-clipboard-window.is-hidden {
        transform: scale(0.78) translateY(8px) !important;
    }
}

.hero-demo.is-concurrent-mode .hero-clipboard-window.is-visible {
    opacity: 1 !important;
    transform: scale(0.72) translateY(0) !important;
    pointer-events: auto !important;
}

@media (min-width: 1024px) {
    .hero-demo.is-concurrent-mode .hero-clipboard-window.is-visible {
        transform: scale(0.76) translateY(0) !important;
    }
}

@media (min-width: 1280px) {
    .hero-demo.is-concurrent-mode .hero-clipboard-window.is-visible {
        transform: scale(0.82) translateY(0) !important;
    }
}

.hero-demo.is-concurrent-mode .hero-clipboard-list {
    padding: 6px !important;
    gap: 5px !important;
}

.hero-demo.is-concurrent-mode .hero-clipboard-item {
    padding: 6px 8px !important;
}

/* Hide gray shortcut hint overlay in Panel 2 (File) so file rows are 100% visible */
.hero-demo.is-concurrent-mode [data-hero-demo-panel="file"] .hero-shortcut-hint {
    display: none !important;
}

/* === Single Panel Mode Clipboard Layout: Codex on the left, Clipboard summoned to the cursor's right === */
.hero-demo:not(.is-concurrent-mode) [data-hero-demo-panel="clipboard"] {
    position: relative !important;
    height: 480px !important;
}

.hero-demo:not(.is-concurrent-mode) .hero-notes-target-window,
.hero-demo:not(.is-concurrent-mode) .hero-codex-target-window {
    position: absolute !important;
    left: 18px !important;
    right: 18px !important;
    top: 36px !important;
    bottom: 18px !important;
    width: auto !important;
    height: auto !important;
    transform: none !important;
    z-index: 5 !important;
}

/* Clipboard is a summoned floating palette over the target chat, not a
   side-by-side second pane. Keep the chat readable underneath and anchor the
   palette to the upper-right where a contextual utility window naturally sits. */
.hero-demo:not(.is-concurrent-mode) .hero-clipboard-window {
    position: absolute !important;
    right: 30px !important;
    top: 58px !important;
    left: auto !important;
    width: min(286px, 48%) !important;
    height: 388px !important;
    transform: translateY(10px) scale(0.965) !important;
    transform-origin: top right !important;
    opacity: 0 !important;
    pointer-events: none !important;
    z-index: 20 !important;
    box-shadow: 0 26px 60px rgba(0, 0, 0, 0.36), 0 0 0 1px rgba(0,0,0,0.05) !important;
    transition: opacity 180ms ease, transform 260ms cubic-bezier(0.2, 0.8, 0.2, 1) !important;
}

.hero-demo:not(.is-concurrent-mode) .hero-clipboard-window.is-visible {
    opacity: 1 !important;
    transform: translateY(0) scale(1) !important;
    pointer-events: auto !important;
}

.hero-demo:not(.is-concurrent-mode) .hero-clipboard-window.is-hidden {
    opacity: 0 !important;
    transform: translateY(10px) scale(0.965) !important;
    pointer-events: none !important;
}

@media (max-width: 640px) {
    .hero-demo:not(.is-concurrent-mode) .hero-codex-titlebar {
        grid-template-columns: 16px minmax(0, 1fr) 28px;
        padding-inline: 6px;
    }

    .hero-demo:not(.is-concurrent-mode) .hero-codex-titlebar .hero-traffic {
        gap: 0;
    }

    .hero-demo:not(.is-concurrent-mode) .hero-codex-titlebar .hero-traffic span:not(:first-child),
    .hero-demo:not(.is-concurrent-mode) .hero-codex-mark {
        display: none;
    }

    .hero-demo:not(.is-concurrent-mode) .hero-codex-titlebar .hero-window-title {
        min-width: 0;
        justify-content: flex-start;
        overflow: hidden;
        font-size: 8px;
        text-overflow: ellipsis;
        white-space: nowrap;
    }

    .hero-demo:not(.is-concurrent-mode) .hero-codex-branch {
        margin-right: 0;
        padding-inline: 4px;
    }

    .hero-demo:not(.is-concurrent-mode) .hero-codex-target-window {
        left: 8px !important;
        right: 8px !important;
        top: 36px !important;
        bottom: 18px !important;
    }

    .hero-demo:not(.is-concurrent-mode) .hero-clipboard-window {
        top: 54px !important;
        right: 14px !important;
        left: auto !important;
        width: min(240px, 68%) !important;
        height: 360px !important;
        min-width: 172px;
    }

    .hero-demo:not(.is-concurrent-mode) .hero-clipboard-window .clipboard-native-tags {
        display: none;
    }

    .hero-demo:not(.is-concurrent-mode) .clipboard-row-preview {
        width: 31px;
        height: 31px;
        flex-basis: 31px;
        border-radius: 8px;
    }

    .hero-demo:not(.is-concurrent-mode) .hero-codex-chat {
        gap: 7px;
        padding: 11px 8px 10px;
    }

    .hero-demo:not(.is-concurrent-mode) .hero-codex-message {
        grid-template-columns: 20px minmax(0, 1fr);
        gap: 5px;
        padding: 7px;
    }

    .hero-demo:not(.is-concurrent-mode) .hero-codex-avatar {
        width: 20px;
        height: 20px;
        border-radius: 6px;
    }

    .hero-demo:not(.is-concurrent-mode) .hero-codex-message p {
        display: -webkit-box;
        overflow: hidden;
        font-size: 8px;
        -webkit-box-orient: vertical;
        -webkit-line-clamp: 3;
    }

    .hero-demo:not(.is-concurrent-mode) .hero-codex-source-strip {
        display: none;
    }

    .hero-demo:not(.is-concurrent-mode) .hero-codex-composer {
        min-height: 118px;
        padding: 8px;
        border-radius: 12px;
    }

    .hero-demo:not(.is-concurrent-mode) .hero-codex-input-status,
    .hero-demo:not(.is-concurrent-mode) .hero-codex-model {
        display: none;
    }
}


/* Authentic Native Clipboard Panel */
.clipboard-native-panel {
    background: rgba(24, 31, 43, 0.97) !important;
    color: #f4f4f5 !important;
    border: 1px solid rgba(255, 255, 255, 0.09) !important;
    box-shadow: 0 22px 52px rgba(0, 0, 0, 0.32), inset 0 1px 0 rgba(255, 255, 255, 0.05) !important;
    backdrop-filter: blur(30px) saturate(1.18) !important;
    -webkit-backdrop-filter: blur(30px) saturate(1.18) !important;
}

html:not(.dark) .clipboard-native-panel,
.clipboard-native-panel.is-light {
    background: rgba(233, 242, 255, 0.97) !important;
    color: #1d2533 !important;
    border-color: rgba(73, 112, 160, 0.12) !important;
    box-shadow: 0 22px 52px rgba(50, 82, 122, 0.16), inset 0 1px 0 rgba(255, 255, 255, 0.75) !important;
}

.clipboard-native-search {
    background: rgba(255, 255, 255, 0.08);
    color: rgba(244, 244, 245, 0.56);
    box-shadow: inset 0 0 0 0.5px rgba(255, 255, 255, 0.05);
}

html:not(.dark) .clipboard-native-search,
.clipboard-native-panel.is-light .clipboard-native-search {
    background: rgba(0, 0, 0, 0.06);
    color: rgba(0, 0, 0, 0.6);
    box-shadow: inset 0 0 0 0.5px rgba(0, 0, 0, 0.08);
}

.clipboard-native-filter {
    background: rgba(255, 255, 255, 0.055);
    border: 1px solid rgba(255, 255, 255, 0.07);
}

html:not(.dark) .clipboard-native-filter,
.clipboard-native-panel.is-light .clipboard-native-filter {
    background: rgba(0, 0, 0, 0.04);
    border-color: rgba(0, 0, 0, 0.08);
}

.clipboard-filter-button {
    color: rgba(244, 244, 245, 0.5);
    transition: color 0.18s ease, background-color 0.18s ease, box-shadow 0.18s ease;
}

html:not(.dark) .clipboard-filter-button,
.clipboard-native-panel.is-light .clipboard-filter-button {
    color: rgba(0, 0, 0, 0.45);
}

.clipboard-filter-button.is-active {
    color: #4aa3ff !important;
    background: rgba(0, 122, 255, 0.18) !important;
    box-shadow: inset 0 0 0 1px rgba(58, 164, 255, 0.35) !important;
}

html:not(.dark) .clipboard-filter-button.is-active,
.clipboard-native-panel.is-light .clipboard-filter-button.is-active {
    color: #007aff !important;
    background: #ffffff !important;
    box-shadow: 0 1px 3px rgba(0,0,0,0.1), 0 0 0 0.5px rgba(0,0,0,0.05) !important;
}

.clipboard-tag-chip {
    height: 23px;
    flex: 0 0 auto;
    display: inline-flex;
    align-items: center;
    gap: 2px;
    padding: 0 7px;
    border-radius: 7px;
    color: rgba(244, 244, 245, 0.66);
    background: rgba(255, 255, 255, 0.055);
    border: 1px solid rgba(255, 255, 255, 0.07);
    font-size: 8px;
    font-weight: 650;
    white-space: nowrap;
}

.clipboard-tag-chip .material-symbols-outlined {
    font-size: 10px !important;
}

html:not(.dark) .clipboard-tag-chip,
.clipboard-native-panel.is-light .clipboard-tag-chip {
    color: #667389;
    background: rgba(255, 255, 255, 0.5);
    border-color: rgba(73, 112, 160, 0.11);
}

.clipboard-native-row {
    color: inherit;
    transition: background-color 0.2s ease, box-shadow 0.2s ease, transform 0.2s ease;
}

.clipboard-native-row:hover,
.clipboard-native-row.is-active,
.clipboard-native-row.is-selected {
    background: rgba(0, 122, 255, 0.13) !important;
    box-shadow: inset 0 0 0 1px rgba(0, 122, 255, 0.25) !important;
}

.clipboard-row-content {
    padding: 4px;
    margin: -4px;
    border-radius: 6px;
}

[data-clipboard-click-zone] {
    transition: background-color 160ms ease, box-shadow 160ms ease, transform 160ms cubic-bezier(0.2, 0.8, 0.2, 1);
}

[data-clipboard-click-zone].is-zone-active {
    background: rgba(0, 122, 255, 0.14);
    box-shadow: 0 0 0 1px rgba(0, 122, 255, 0.32);
    transform: translateY(-1px);
}

.clipboard-row-meta [data-clipboard-click-zone] {
    padding: 1px 3px;
    margin: -1px -3px;
    border-radius: 4px;
}

.clipboard-row-preview {
    width: 38px;
    height: 38px;
    flex: 0 0 38px;
    position: relative;
    display: flex;
    align-items: center;
    justify-content: center;
    overflow: hidden;
    border-radius: 9px;
    color: #7c8aa5;
    background: rgba(129, 106, 255, 0.13);
    border: 1px solid rgba(129, 106, 255, 0.2);
}

.clipboard-row-preview > .material-symbols-outlined {
    font-size: 17px !important;
}

.clipboard-row-preview.is-favorite::after {
    content: '★';
    position: absolute;
    right: 1px;
    top: -2px;
    color: #ffd60a;
    font-size: 11px;
    text-shadow: 0 1px 2px rgba(0, 0, 0, 0.18);
}

.clipboard-row-preview.is-image {
    border-color: rgba(255, 159, 10, 0.24);
    background: rgba(255, 159, 10, 0.1);
}

.clipboard-row-preview.is-image img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    opacity: 0.88;
}

.clipboard-row-preview.is-link {
    color: #40c8e0;
    background: rgba(64, 200, 224, 0.13);
    border-color: rgba(64, 200, 224, 0.24);
}

.clipboard-row-preview.is-text {
    color: #987cf7;
    background: rgba(152, 124, 247, 0.13);
    border-color: rgba(152, 124, 247, 0.22);
}

.clipboard-row-preview.is-file {
    color: #e1485b;
    background: rgba(225, 72, 91, 0.1);
    border-color: rgba(225, 72, 91, 0.2);
}

.clipboard-row-title {
    display: block;
    max-height: 27px;
    overflow: hidden;
    font-size: 9px;
    line-height: 1.24;
    font-weight: 650;
    letter-spacing: -0.01em;
    color: rgba(250, 250, 250, 0.95);
}

html:not(.dark) .clipboard-row-title {
    color: #1c2533 !important;
}

.clipboard-row-meta {
    display: flex;
    align-items: center;
    gap: 4px;
    min-width: 0;
    margin-top: 3px;
    color: rgba(212, 217, 226, 0.48);
    font-size: 7px;
    line-height: 10px;
    white-space: nowrap;
}

html:not(.dark) .clipboard-row-meta {
    color: rgba(60, 75, 100, 0.7) !important;
}

.clipboard-row-meta .material-symbols-outlined {
    font-size: 10px !important;
}

.clipboard-row-meta img {
    width: 9px;
    height: 9px;
    object-fit: contain;
    opacity: 0.68;
    filter: invert(1);
}

html:not(.dark) .clipboard-row-meta img,
.clipboard-native-panel.is-light .clipboard-row-meta img {
    filter: none;
}

.clipboard-row-open-action.is-active {
    color: #409cff;
    transform: scale(1.22);
}

.clipboard-native-storage {
    min-width: 0;
    overflow: hidden;
    color: rgba(232, 235, 241, 0.66);
    font-size: 9px;
    line-height: 1.2;
    white-space: nowrap;
}

.clipboard-native-storage > span:last-child {
    min-width: 0;
    overflow: hidden;
    text-overflow: ellipsis;
}

html:not(.dark) .clipboard-native-storage,
.clipboard-native-panel.is-light .clipboard-native-storage {
    color: rgba(0, 0, 0, 0.5);
}

.clipboard-native-toast {
    z-index: 20;
    color: #f7f7f8;
    background: rgba(24, 28, 36, 0.94);
    border: 1px solid rgba(255, 255, 255, 0.12);
    box-shadow: 0 12px 28px rgba(0, 0, 0, 0.3);
    backdrop-filter: blur(18px) saturate(1.15);
    -webkit-backdrop-filter: blur(18px) saturate(1.15);
    transition: opacity 0.22s ease-out, transform 0.28s cubic-bezier(0.2, 0.8, 0.2, 1);
}

.clipboard-native-toast.is-visible {
    opacity: 1 !important;
    transform: translateY(0) scale(1) !important;
}

/* ==========================================================================
   SwiftBiu Toolbar Native Demo Styles (Brought from Onboarding.html)
   ========================================================================== */
.toolbar-config-native-demo {
    --toolbar-config-line: rgba(255, 255, 255, 0.075);
    --toolbar-config-panel: rgba(255, 255, 255, 0.042);
    --toolbar-config-control: rgba(255, 255, 255, 0.07);
    position: relative;
    width: 100%;
    height: 458px;
    overflow: hidden;
    border-radius: 13px;
    background: rgba(18, 18, 20, 0.94);
    border: 1px solid var(--toolbar-config-line);
    color: #f4f4f5;
    box-shadow: 0 18px 46px rgba(0, 0, 0, 0.28);
}

html:not(.dark) .toolbar-config-native-demo,
.dark .toolbar-config-native-demo.is-light-override {
    --toolbar-config-line: rgba(40, 52, 69, 0.105);
    --toolbar-config-panel: rgba(82, 100, 125, 0.045);
    --toolbar-config-control: rgba(76, 92, 116, 0.065);
    background: #f5f7fa;
    color: #1d1d1f;
    box-shadow: 0 18px 46px rgba(42, 55, 74, 0.14);
}

html:not(.dark) .toolbar-config-native-demo {
    --toolbar-config-line: rgba(40, 52, 69, 0.105);
    --toolbar-config-panel: rgba(82, 100, 125, 0.045);
    --toolbar-config-control: rgba(76, 92, 116, 0.065);
    background: #f5f7fa;
    color: #1d1d1f;
    box-shadow: 0 18px 46px rgba(42, 55, 74, 0.14);
}

.toolbar-config-titlebar {
    height: 35px;
    padding: 0 14px;
    display: grid;
    grid-template-columns: 60px 1fr 60px;
    align-items: center;
    border-bottom: 1px solid var(--toolbar-config-line);
    background: rgba(255, 255, 255, 0.018);
}

.toolbar-config-traffic {
    display: flex;
    gap: 6px;
}

.toolbar-config-traffic i {
    width: 9px;
    height: 9px;
    border-radius: 50%;
}

.toolbar-config-titlebar strong {
    text-align: center;
    font-size: 11px;
    line-height: 14px;
    font-weight: 700;
}

.toolbar-config-titlebar small {
    text-align: right;
    color: #8e8e93;
    font-size: 9px;
}

.toolbar-config-progress {
    height: 34px;
    padding: 6px 14px;
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 6px;
    border-bottom: 1px solid var(--toolbar-config-line);
}

.toolbar-config-progress span {
    height: 22px;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 5px;
    border-radius: 7px;
    color: #8e8e93;
    background: var(--toolbar-config-control);
    border: 1px solid transparent;
    font-size: 10px;
    font-weight: 700;
    transition: color 0.22s ease, background 0.22s ease, border-color 0.22s ease;
}

.toolbar-config-progress span::before {
    content: attr(data-step);
    width: 13px;
    height: 13px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    border-radius: 50%;
    background: rgba(142, 142, 147, 0.18);
    font-size: 8px;
}

.toolbar-config-progress span.is-active,
.toolbar-config-progress span.is-complete {
    color: #007aff;
    background: rgba(0, 122, 255, 0.1);
    border-color: rgba(0, 122, 255, 0.18);
}

.toolbar-config-progress span.is-complete::before {
    content: "✓";
    color: white;
    background: #007aff;
}

.toolbar-config-stage {
    position: relative;
    height: 385px;
    overflow: hidden;
    isolation: isolate;
    contain: paint;
}

.toolbar-config-page {
    padding: 14px 16px;
    overflow-y: auto;
    scrollbar-width: thin;
}

.toolbar-config-page .toolbar-config-preview {
    min-height: 140px;
}

.toolbar-config-heading {
    height: 36px;
    display: flex;
    align-items: flex-start;
    justify-content: space-between;
    margin-bottom: 8px;
}

.toolbar-config-heading h3 {
    margin: 0;
    font-size: 13px;
    line-height: 16px;
    font-weight: 760;
}

.toolbar-config-heading p {
    margin: 2px 0 0;
    color: #8e8e93;
    font-size: 10px;
    line-height: 12px;
}

.toolbar-config-section-title {
    margin: 6px 3px 6px;
    color: #8e8e93;
    font-size: 9px;
    line-height: 12px;
    font-weight: 750;
    letter-spacing: 0.05em;
    text-transform: uppercase;
}

.toolbar-config-card {
    overflow: hidden;
    border-radius: 10px;
    background: var(--toolbar-config-panel);
    border: 1px solid var(--toolbar-config-line);
}

.toolbar-config-row {
    min-height: 52px;
    padding: 8px 12px;
    display: flex;
    align-items: center;
    gap: 10px;
    border-bottom: 1px solid var(--toolbar-config-line);
    transition: background 0.22s ease, box-shadow 0.22s ease;
}

.toolbar-config-row:last-child {
    border-bottom: 0;
}

.toolbar-config-row.is-highlighted {
    background: rgba(0, 122, 255, 0.09);
    box-shadow: inset 3px 0 #007aff;
}

.toolbar-config-row-icon {
    width: 28px;
    height: 28px;
    flex: 0 0 28px;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: 8px;
    color: white;
    font-size: 16px !important;
    box-shadow: inset 0 0 0 1px rgba(255, 255, 255, 0.16);
}

.toolbar-config-row-copy {
    min-width: 0;
    flex: 1;
}

.toolbar-config-row-copy strong {
    display: block;
    font-size: 11px;
    line-height: 14px;
}

.toolbar-config-row-copy small {
    display: block;
    margin-top: 2px;
    color: #8e8e93;
    font-size: 9.5px;
    line-height: 12px;
}

.toolbar-config-segment {
    height: 28px;
    padding: 2px;
    display: flex;
    align-items: center;
    border-radius: 8px;
    background: var(--toolbar-config-control);
    border: 1px solid var(--toolbar-config-line);
}

.toolbar-config-segment button {
    min-width: 52px;
    height: 22px;
    padding: 0 10px;
    border: 0;
    border-radius: 6px;
    color: #8e8e93;
    background: transparent;
    font-size: 10px;
    line-height: 22px;
    font-weight: 700;
    cursor: pointer;
    transition: all 0.18s ease;
}

.toolbar-config-segment button.is-selected {
    color: #fff;
    background: #007aff;
    box-shadow: 0 1px 4px rgba(0, 122, 255, 0.26);
}

.toolbar-config-preview {
    position: relative;
    height: 180px;
    margin-top: 10px;
    overflow: hidden;
    border-radius: 10px;
    background:
        radial-gradient(circle at 80% 20%, rgba(0, 122, 255, 0.09), transparent 42%),
        var(--toolbar-config-panel);
    border: 1px solid var(--toolbar-config-line);
}

.toolbar-config-preview-label {
    position: absolute;
    left: 12px;
    top: 10px;
    color: #8e8e93;
    font-size: 9px;
    font-weight: 700;
}

.toolbar-config-document {
    position: absolute;
    left: 14px;
    right: 14px;
    top: 28px;
    min-height: 54px;
    height: auto;
    padding: 10px 14px;
    box-sizing: border-box;
    border-radius: 8px;
    color: #71717a;
    background: rgba(255, 255, 255, 0.04);
    border: 1px solid var(--toolbar-config-line);
    font-size: 10.5px;
    line-height: 18px;
}

html:not(.dark) .toolbar-config-document {
    background: rgba(255, 255, 255, 0.78);
    color: #687084;
}

.toolbar-config-document mark {
    padding: 2px 4px;
    border-radius: 3px;
    color: white;
    background: rgba(0, 122, 255, 0.82);
}

.toolbar-preview-surface {
    position: absolute;
    z-index: 5;
    display: flex;
    align-items: center;
    gap: 2px;
    padding: 4px;
    border-radius: 10px;
    color: rgba(255, 255, 255, 0.92);
    background: linear-gradient(180deg, rgba(45, 45, 48, 0.94), rgba(27, 27, 29, 0.92));
    border: 1px solid rgba(255, 255, 255, 0.12);
    box-shadow: 0 8px 20px rgba(0, 0, 0, 0.28);
    transform-origin: top left;
    transition: left 0.38s cubic-bezier(0.2, 0.8, 0.2, 1), top 0.38s cubic-bezier(0.2, 0.8, 0.2, 1), width 0.38s ease;
}

html:not(.dark) .toolbar-preview-surface {
    color: rgba(29, 29, 31, 0.92);
    background: linear-gradient(180deg, rgba(255, 255, 255, 0.97), rgba(240, 242, 247, 0.94));
    border-color: rgba(31, 41, 55, 0.13);
    box-shadow: 0 8px 20px rgba(42, 55, 74, 0.18);
}

.toolbar-config-native-demo.is-horizontal .toolbar-preview-surface {
    left: 48px;
    top: 20px;
    flex-direction: row;
    width: max-content;
}

.toolbar-config-native-demo.is-vertical .toolbar-preview-surface {
    left: calc(100% - 130px);
    top: 28px;
    width: 42px;
    flex-direction: column;
    align-items: stretch;
}

.toolbar-config-native-demo.is-vertical.show-name .toolbar-preview-surface,
.toolbar-config-native-demo.is-vertical.show-shortcut .toolbar-preview-surface {
    left: calc(100% - 160px);
    width: 120px;
}

.toolbar-preview-item {
    height: 28px;
    min-width: 28px;
    padding: 0 8px;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 5px;
    overflow: hidden;
    border-radius: 7px;
    font-size: 10px;
    font-weight: 650;
    white-space: nowrap;
    transition: background 0.18s ease, box-shadow 0.18s ease;
}

.is-vertical .toolbar-preview-item {
    width: 100%;
    min-width: 0;
    justify-content: flex-start;
    padding: 0 8px;
}

.toolbar-config-native-demo.is-vertical:not(.show-name):not(.show-shortcut) .toolbar-preview-item {
    justify-content: center;
    padding: 0;
}

.toolbar-config-check-row {
    display: flex;
    align-items: center;
    gap: 12px;
    flex: 0 0 auto;
}

.toolbar-config-check {
    display: inline-flex;
    align-items: center;
    gap: 5px;
    color: inherit;
    font-size: 10px;
    font-weight: 600;
    white-space: nowrap;
    cursor: pointer;
    user-select: none;
}

.toolbar-config-check input {
    position: absolute;
    width: 1px;
    height: 1px;
    opacity: 0;
    pointer-events: none;
}

.toolbar-config-check-mark {
    flex: 0 0 auto;
    width: 14px;
    height: 14px;
    display: inline-grid;
    place-content: center;
    border-radius: 4px;
    border: 1px solid rgba(255, 255, 255, 0.2);
    background: rgba(255, 255, 255, 0.08);
    transition: background 0.15s ease, border-color 0.15s ease;
}

html:not(.dark) .toolbar-config-check-mark {
    border-color: rgba(118, 157, 200, 0.36);
    background: rgba(255, 255, 255, 0.9);
}

.toolbar-config-check input:checked+.toolbar-config-check-mark {
    border-color: #007aff;
    background: #007aff;
}

.toolbar-config-check input:checked+.toolbar-config-check-mark::after {
    content: "";
    width: 7px;
    height: 4px;
    border-left: 1.8px solid #fff;
    border-bottom: 1.8px solid #fff;
    transform: translateY(-0.5px) rotate(-45deg);
}

.toolbar-preview-item.is-hovered {
    background: rgba(255, 255, 255, 0.14);
    box-shadow: inset 0 0 0 1px rgba(255, 255, 255, 0.08);
}

html:not(.dark) .toolbar-preview-item.is-hovered {
    background: rgba(0, 0, 0, 0.065);
    box-shadow: inset 0 0 0 1px rgba(0, 0, 0, 0.04);
}

.toolbar-preview-glyph {
    width: 16px;
    height: 16px;
    flex: 0 0 16px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 15px !important;
    transform-origin: center;
}

.toolbar-preview-name {
    max-width: 60px;
    overflow: hidden;
    text-overflow: ellipsis;
}

.toolbar-preview-shortcut {
    margin-left: auto;
    color: #a1a1aa;
    font-size: 9px;
    font-variant-numeric: tabular-nums;
}

.toolbar-config-native-demo:not(.show-icon) .toolbar-preview-glyph,
.toolbar-config-native-demo:not(.show-name) .toolbar-preview-name,
.toolbar-config-native-demo:not(.show-shortcut) .toolbar-preview-shortcut {
    display: none;
}

.toolbar-config-native-demo.is-auto .toolbar-preview-glyph.is-dynamic,
.toolbar-config-native-demo.is-hover .toolbar-preview-item.is-hovered .toolbar-preview-glyph.is-dynamic {
    animation: toolbar-lottie-play 1.15s cubic-bezier(0.4, 0, 0.2, 1) infinite;
}

@keyframes toolbar-lottie-play {
    0%, 100% {
        transform: scale(1) rotate(0deg);
        filter: saturate(1);
    }
    35% {
        transform: scale(1.16) rotate(-10deg);
        filter: saturate(1.5);
    }
    65% {
        transform: scale(0.94) rotate(9deg);
        filter: saturate(1.25);
    }
}

.toolbar-config-caption {
    position: absolute;
    left: 12px;
    bottom: 8px;
    z-index: 8;
    max-width: 240px;
    padding: 4px 8px;
    border-radius: 6px;
    color: #007aff;
    background: rgba(0, 122, 255, 0.1);
    border: 1px solid rgba(0, 122, 255, 0.17);
    font-size: 9px;
    line-height: 12px;
    font-weight: 650;
    text-align: left;
}

.toolbar-config-footer-status {
    height: 32px;
    padding: 0 14px;
    display: flex;
    align-items: center;
    gap: 8px;
    color: #8e8e93;
    border-top: 1px solid var(--toolbar-config-line);
    font-size: 9.5px;
    line-height: 12px;
}

.toolbar-config-footer-status i {
    width: 7px;
    height: 7px;
    flex: 0 0 7px;
    border-radius: 50%;
    background: #007aff;
    box-shadow: 0 0 0 3px rgba(0, 122, 255, 0.11);
}

.toolbar-demo-cursor {
    position: absolute;
    z-index: 80;
    left: 0;
    top: 0;
    width: 15px;
    height: 20px;
    opacity: 0;
    color: white;
    filter: drop-shadow(0 1px 2px rgba(0, 0, 0, 0.65));
    transform: translate3d(0, 0, 0) scale(0.9);
    transition: opacity 0.2s ease, transform 0.55s cubic-bezier(0.2, 0.8, 0.2, 1);
    pointer-events: none;
}

.toolbar-demo-cursor.is-visible {
    opacity: 1;
}

.toolbar-demo-cursor.is-clicking {
    animation: toolbar-cursor-click 0.38s ease both;
}

@keyframes toolbar-cursor-click {
    0%, 100% {
        scale: 1;
    }
    50% {
        scale: 0.76;
    }
}

/* ============================================================
   Home editorial refresh
   A warm, high-contrast product journal for SwiftBiu. It keeps the
   interactive macOS demo at the centre and turns the rest of the home page
   into a clear progression: context → action → personal workflow.
   ============================================================ */

body.home-page {
    --home-paper: #f4f1e9;
    --home-ink: #151515;
    --home-coral: #ff5630;
    --home-blue: #1267e8;
    --home-rule: rgba(21, 21, 21, 0.16);
    background: var(--home-paper);
}

body.home-page .site-shell {
    background:
        linear-gradient(rgba(21, 21, 21, 0.035) 1px, transparent 1px),
        linear-gradient(90deg, rgba(21, 21, 21, 0.035) 1px, transparent 1px),
        var(--home-paper);
    background-size: 36px 36px;
}

body.home-page .aurora-orbs {
    opacity: 0.18;
    mix-blend-mode: multiply;
}

.home-editorial {
    position: relative;
    z-index: 1;
}

.home-editorial main {
    gap: 0;
}

.home-editorial .reveal {
    transform: translateY(12px);
}

.home-editorial .reveal.is-visible {
    transform: translateY(0);
}

.home-editorial h1,
.home-editorial h2,
.home-editorial h3 {
    letter-spacing: -0.055em !important;
}

.home-hero {
    position: relative;
    min-height: min(910px, calc(100vh - 4rem));
    padding-inline: clamp(0.3rem, 3vw, 3.75rem);
    border-inline: 1px solid var(--home-rule);
    overflow: hidden;
}

.home-hero::before {
    content: "SWIFTBIU / 01";
    position: absolute;
    top: 1.1rem;
    left: 1.1rem;
    z-index: 1;
    color: rgba(21, 21, 21, 0.64);
    font-family: "SF Mono", "IBM Plex Mono", ui-monospace, monospace;
    font-size: 10px;
    font-weight: 700;
    letter-spacing: 0.11em;
}

.home-hero::after {
    content: "⌘";
    position: absolute;
    right: -0.06em;
    top: 0.02em;
    color: rgba(18, 103, 232, 0.1);
    font-family: Georgia, "Times New Roman", serif;
    font-size: clamp(13rem, 30vw, 34rem);
    font-weight: 400;
    line-height: 0.76;
    pointer-events: none;
}

.home-hero > div:first-child {
    position: relative;
    z-index: 2;
    max-width: 58rem;
    padding-top: clamp(4.25rem, 7vw, 6rem);
}

.home-hero > div:first-child > p:first-child {
    border-color: var(--home-ink);
    border-radius: 999px;
    background: var(--home-ink);
    color: var(--home-paper);
    box-shadow: none;
}

.home-hero h1 {
    color: var(--home-ink) !important;
    font-family: Georgia, "Iowan Old Style", "Songti SC", "Noto Serif CJK SC", serif;
    font-size: clamp(4.6rem, 12vw, 10.8rem) !important;
    font-weight: 500 !important;
    line-height: 0.8 !important;
}

.home-hero h1 + p {
    max-width: 45rem;
    color: var(--home-ink) !important;
    font-size: clamp(1.95rem, 4.3vw, 4.4rem) !important;
    font-weight: 650 !important;
    letter-spacing: -0.06em !important;
    line-height: 0.97 !important;
}

.home-hero h1 + p + p {
    max-width: 48rem;
    color: rgba(21, 21, 21, 0.72) !important;
    font-size: 1.05rem !important;
    line-height: 1.65 !important;
}

.home-hero-copy-lines > span {
    display: block;
}

.home-hero-action-line {
    margin-top: 0.2rem;
}

.home-hero-extension-line {
    margin-top: 0.55rem;
    color: var(--home-blue);
    font-size: 0.88em;
    font-weight: 750;
    letter-spacing: -0.015em;
}

.home-hero a[href="guide.html"] {
    border-color: var(--home-ink) !important;
    border-radius: 3px !important;
    background: transparent !important;
    color: var(--home-ink) !important;
}

.home-hero-demo {
    z-index: 2;
    max-width: 1130px;
    margin-inline: auto;
}

.home-hero-demo-source { display: none !important; }

.home-hero-demo .hero-demo {
    border: 1px solid var(--home-ink);
    border-radius: 2px;
    background: #111;
    box-shadow: 10px 10px 0 var(--home-blue);
}

.home-hero-demo .hero-demo::before {
    display: none;
}

.home-hero-demo .hero-demo-stage {
    background: #e9e8e2;
}

.home-hero-demo .hero-demo-nav {
    border-color: rgba(255, 255, 255, 0.2);
    border-radius: 999px;
    background: rgba(17, 17, 17, 0.88);
    box-shadow: none;
}

.home-hero-demo .hero-demo-tab {
    border-radius: 999px;
    color: rgba(255, 255, 255, 0.65);
}

.home-hero-demo .hero-demo-tab.is-active {
    background: var(--home-coral);
    color: #fff;
}

.home-capability-index,
.home-compare,
.home-pricing {
    position: relative;
    border-color: var(--home-rule) !important;
}

.home-capability-index {
    padding-inline: clamp(0.5rem, 3.6vw, 4rem);
    padding-block: clamp(6rem, 12vw, 10rem) !important;
    background: var(--home-ink);
    color: var(--home-paper);
}

.home-capability-index::before {
    content: "02";
    display: block;
    margin-bottom: clamp(2.5rem, 5vw, 5rem);
    color: rgba(244, 241, 233, 0.56);
    font-family: "SF Mono", "IBM Plex Mono", ui-monospace, monospace;
    font-size: 10px;
    font-weight: 700;
    letter-spacing: 0.14em;
}

.home-capability-index > div:first-child {
    max-width: 50rem;
    margin-inline: 0;
    text-align: left;
}

.home-capability-index > div:first-child p,
.home-capability-index > div:first-child h2 {
    color: var(--home-paper) !important;
}

.home-capability-index > div:first-child h2 {
    font-family: Georgia, "Iowan Old Style", "Songti SC", serif;
    font-size: clamp(3rem, 6vw, 6rem) !important;
    font-weight: 500 !important;
    line-height: 0.95 !important;
}

.home-capability-index > div:first-child > p:first-child {
    color: var(--home-coral) !important;
}

.home-capability-index .feature-card {
    min-height: 25rem;
    border: 1px solid rgba(244, 241, 233, 0.26) !important;
    border-radius: 1px !important;
    background: transparent !important;
    box-shadow: none !important;
}

.home-capability-index .feature-card:hover {
    transform: translateY(-6px) !important;
    background: rgba(244, 241, 233, 0.06) !important;
}

.home-capability-index .feature-card::before {
    content: counter(home-features, decimal-leading-zero);
    display: block;
    color: var(--home-coral);
    font-family: "SF Mono", "IBM Plex Mono", ui-monospace, monospace;
    font-size: 11px;
    letter-spacing: 0.12em;
}

.home-capability-index .feature-card {
    counter-increment: home-features;
}

.home-capability-index .feature-card:first-child {
    counter-reset: home-features;
}

.home-capability-index .feature-card h3,
.home-capability-index .feature-card p,
.home-capability-index .feature-card li {
    color: var(--home-paper) !important;
}

.home-capability-index .feature-card > div:first-child > div {
    border-radius: 0 !important;
    background: var(--home-coral) !important;
    color: var(--home-ink) !important;
}

.home-signal {
    margin-inline: clamp(0.5rem, 6vw, 7rem);
    transform: translateY(-1px);
}

.home-signal > div {
    border: 1px solid var(--home-ink) !important;
    border-radius: 0 !important;
    background: var(--home-coral) !important;
    box-shadow: 7px 7px 0 var(--home-ink) !important;
}

.home-signal * {
    color: var(--home-ink) !important;
}

.home-precision,
.home-moments,
.home-trust {
    padding-inline: clamp(0.5rem, 6vw, 7rem);
    padding-block: clamp(6rem, 13vw, 11rem) !important;
}

.home-precision > div:first-child,
.home-precision > div:last-child,
.home-moments > div,
.home-trust > div {
    position: relative;
}

.home-precision > div:first-child::before,
.home-moments > div:first-child::before,
.home-trust > div:first-child::before {
    display: block;
    margin-bottom: 1.25rem;
    color: var(--home-blue);
    font-family: "SF Mono", "IBM Plex Mono", ui-monospace, monospace;
    font-size: 10px;
    font-weight: 700;
    letter-spacing: 0.14em;
}

.home-precision > div:last-child::before { content: "03"; }
.home-moments > div:first-child::before { content: "04"; }
.home-trust > div:first-child::before { content: "05"; }

.home-precision h2,
.home-moments h2,
.home-trust h2,
.home-compare h2,
.home-pricing h2,
.home-faq h2 {
    color: var(--home-ink) !important;
    font-family: Georgia, "Iowan Old Style", "Songti SC", serif;
    font-weight: 500 !important;
    line-height: 0.95 !important;
}

.home-precision img {
    border: 1px solid var(--home-ink);
    border-radius: 0 !important;
    box-shadow: 10px 10px 0 var(--home-blue);
}

.home-plugin-lab {
    margin-inline: clamp(0.5rem, 4vw, 4rem);
    border: 1px solid var(--home-ink) !important;
    border-radius: 0 !important;
    background: #e7e3d7 !important;
    box-shadow: 10px 10px 0 var(--home-coral) !important;
}

.home-plugin-lab > div:last-child {
    border: 1px solid var(--home-ink) !important;
    border-radius: 0 !important;
    background: var(--home-ink) !important;
}

.home-compare,
.home-pricing,
.home-faq {
    padding-inline: clamp(0.5rem, 6vw, 7rem);
    padding-block: clamp(6rem, 12vw, 10rem) !important;
}

.home-compare > div:first-child,
.home-pricing > div:first-child,
.home-faq > div:first-child {
    max-width: 46rem;
    margin-inline: 0;
    text-align: left;
}

.home-compare > div:nth-child(2),
.home-pricing > div:nth-child(2) {
    border: 1px solid var(--home-ink) !important;
    border-radius: 0 !important;
    box-shadow: 8px 8px 0 rgba(18, 103, 232, 0.2);
}

/* Feature detail cards need explicit light-mode surfaces and ink colors.
   The feature pages are SEO entry points and can be opened outside the homepage,
   so do not rely on translucent Tailwind defaults for readable copy. */
html:not(.dark) .feature-info-card,
html:not(.dark) .feature-workflow-card {
    border-color: #c7d2df !important;
    background: rgba(255, 255, 255, 0.94) !important;
    box-shadow: 0 8px 24px rgba(15, 23, 42, 0.055);
}

html:not(.dark) .feature-info-card-title,
html:not(.dark) .feature-workflow-card-title {
    color: #172033 !important;
}

html:not(.dark) .feature-info-card-copy,
html:not(.dark) .feature-workflow-card-copy,
html:not(.dark) .feature-workflow-steps li {
    color: #4b5a70 !important;
}

html:not(.dark) .feature-info-card-icon {
    display: inline-grid;
    width: 2.6rem;
    height: 2.6rem;
    place-items: center;
    border: 1px solid #bed0e8;
    border-radius: 0.75rem;
    background: #edf5ff;
}

html:not(.dark) .feature-workflow-card > div > span:first-child {
    border: 1px solid #bed0e8;
    background: #edf5ff !important;
}

html:not(.dark) .feature-workflow-steps li {
    border-color: #d2dbe6 !important;
    background: #f6f8fb !important;
}

.comparison-matrix-mobile-label {
    display: none;
}

.comparison-matrix-value {
    min-width: 0;
}

/* Homepage comparison: keep the landing page decision-oriented. Detailed
   prose and official-source links remain on alternatives / vs-* pages. */
.home-compare-matrix-wrap {
    overflow: hidden;
}

.home-comparison-matrix {
    width: 100%;
    table-layout: fixed;
    border-collapse: separate;
    border-spacing: 0;
}

.home-comparison-matrix th,
.home-comparison-matrix td {
    border-top: 1px solid rgba(21, 21, 21, 0.1);
}

.home-comparison-matrix thead th {
    border-top: 0;
    background: rgba(21, 21, 21, 0.035);
    color: #657084;
    padding: 0.9rem 0.75rem;
    font-size: 0.7rem;
    font-weight: 800;
    letter-spacing: 0.045em;
    line-height: 1.2;
    text-align: center;
    text-transform: uppercase;
}

.home-comparison-matrix .home-comparison-matrix-feature-heading,
.home-comparison-matrix .home-comparison-matrix-feature {
    width: 44%;
    text-align: left;
}

.home-comparison-matrix-product {
    width: 14%;
}

.home-comparison-matrix-product--swiftbiu,
.home-comparison-matrix-status-cell--swiftbiu {
    background: rgba(18, 103, 232, 0.065) !important;
}

.home-comparison-matrix-product--swiftbiu {
    color: var(--home-blue) !important;
}

.home-comparison-matrix-feature {
    color: #273247;
    padding: 0.95rem 1rem;
    font-size: 0.82rem;
    font-weight: 750;
    line-height: 1.45;
}

.home-comparison-matrix-status-cell {
    padding: 0.78rem 0.4rem;
    text-align: center;
    vertical-align: middle;
}

.home-compare-status {
    display: inline-grid;
    width: 2rem;
    height: 2rem;
    place-items: center;
    border: 1px solid transparent;
    border-radius: 999px;
    font-size: 1rem;
    font-weight: 900;
    line-height: 1;
}

.home-compare-status--core {
    border-color: rgba(18, 103, 232, 0.2);
    background: rgba(18, 103, 232, 0.1);
    color: #0d67ca;
}

.home-compare-status--partial {
    border-color: rgba(165, 112, 0, 0.22);
    background: rgba(242, 179, 41, 0.13);
    color: #8a620b;
}

.home-compare-status--none {
    border-color: rgba(83, 97, 118, 0.13);
    background: rgba(83, 97, 118, 0.075);
    color: #7b8798;
}

.home-compare-legend {
    display: flex;
    flex-wrap: wrap;
    gap: 0.65rem 1.1rem;
    align-items: center;
    padding: 0.85rem 1rem;
    border-top: 1px solid rgba(21, 21, 21, 0.1);
    background: rgba(21, 21, 21, 0.018);
    color: #657084;
    font-size: 0.72rem;
    font-weight: 650;
}

.home-compare-legend-item {
    display: inline-flex;
    gap: 0.45rem;
    align-items: center;
}

.home-compare-legend .home-compare-status {
    width: 1.35rem;
    height: 1.35rem;
    font-size: 0.72rem;
}

html.dark .home-comparison-matrix th,
html.dark .home-comparison-matrix td,
html.dark .home-compare-legend {
    border-color: rgba(245, 241, 232, 0.12);
}

html.dark .home-comparison-matrix thead th {
    background: rgba(255, 255, 255, 0.035);
    color: #aeb9c8;
}

html.dark .home-comparison-matrix-product--swiftbiu,
html.dark .home-comparison-matrix-status-cell--swiftbiu {
    background: rgba(91, 168, 255, 0.075) !important;
}

html.dark .home-comparison-matrix-product--swiftbiu {
    color: #91c5ff !important;
}

html.dark .home-comparison-matrix-feature {
    color: #f2f4f7;
}

html.dark .home-compare-status--core {
    border-color: rgba(91, 168, 255, 0.24);
    background: rgba(91, 168, 255, 0.12);
    color: #91c5ff;
}

html.dark .home-compare-status--partial {
    border-color: rgba(244, 195, 87, 0.22);
    background: rgba(244, 195, 87, 0.1);
    color: #e7bf68;
}

html.dark .home-compare-status--none {
    border-color: rgba(174, 185, 200, 0.14);
    background: rgba(174, 185, 200, 0.065);
    color: #8d99aa;
}

html.dark .home-compare-legend {
    background: rgba(255, 255, 255, 0.018);
    color: #aeb9c8;
}

/* Comparison detail pages: decision-first status matrix plus an explicit
   SwiftBiu advantage block. Evidence remains internal build data, not UI. */
.comparison-detail-shell {
    overflow: hidden;
}

.comparison-detail-status {
    overflow-x: auto;
}

.comparison-detail-status .home-comparison-matrix-product {
    width: auto;
}

.comparison-detail-status .home-comparison-matrix-feature-heading,
.comparison-detail-status .home-comparison-matrix-feature {
    width: 40%;
}

.comparison-advantage {
    display: grid;
    grid-template-columns: minmax(0, 0.9fr) minmax(0, 1.1fr);
    gap: 1.5rem;
    padding: 1.4rem 1.5rem 1.5rem;
    border-top: 1px solid rgba(21, 21, 21, 0.1);
    background: linear-gradient(135deg, rgba(18, 103, 232, 0.07), rgba(255, 255, 255, 0.55) 52%, rgba(242, 179, 41, 0.07));
}

.comparison-advantage-copy {
    align-self: center;
}

.comparison-advantage-kicker {
    margin: 0 0 0.35rem;
    color: var(--home-blue);
    font-size: 0.7rem;
    font-weight: 850;
    letter-spacing: 0.08em;
    text-transform: uppercase;
}

.comparison-advantage h2 {
    margin: 0;
    color: #172033;
    font-size: 1.2rem;
    font-weight: 850;
    line-height: 1.35;
}

.comparison-advantage-copy > p:last-child {
    margin: 0.65rem 0 0;
    color: #4d5a70;
    font-size: 0.86rem;
    line-height: 1.65;
}

.comparison-advantage-list {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 0.65rem;
    margin: 0;
    padding: 0;
    list-style: none;
}

.comparison-advantage-list li {
    display: flex;
    gap: 0.55rem;
    align-items: flex-start;
    min-width: 0;
    padding: 0.72rem 0.78rem;
    border: 1px solid rgba(18, 103, 232, 0.12);
    border-radius: 0.85rem;
    background: rgba(255, 255, 255, 0.7);
    color: #354258;
    font-size: 0.78rem;
    font-weight: 650;
    line-height: 1.5;
}

.comparison-advantage-list li > span:first-child {
    display: inline-grid;
    width: 1.25rem;
    height: 1.25rem;
    flex: 0 0 auto;
    place-items: center;
    margin-top: 0.05rem;
    border-radius: 999px;
    background: rgba(18, 103, 232, 0.11);
    color: #0d67ca;
    font-size: 0.72rem;
    font-weight: 900;
}

html.dark .comparison-advantage {
    border-color: rgba(245, 241, 232, 0.12);
    background: linear-gradient(135deg, rgba(91, 168, 255, 0.09), rgba(255, 255, 255, 0.025) 52%, rgba(244, 195, 87, 0.055));
}

html.dark .comparison-advantage-kicker {
    color: #91c5ff;
}

html.dark .comparison-advantage h2 {
    color: #f2f4f7;
}

html.dark .comparison-advantage-copy > p:last-child {
    color: #c0c9d6;
}

html.dark .comparison-advantage-list li {
    border-color: rgba(91, 168, 255, 0.14);
    background: rgba(255, 255, 255, 0.035);
    color: #d8dee8;
}

html.dark .comparison-advantage-list li > span:first-child {
    background: rgba(91, 168, 255, 0.12);
    color: #91c5ff;
}

@media (max-width: 767px) {
    .comparison-detail-status .home-comparison-matrix-feature-heading,
    .comparison-detail-status .home-comparison-matrix-feature {
        width: 46%;
    }

    .comparison-advantage {
        grid-template-columns: 1fr;
        gap: 1rem;
        padding: 1.1rem 0.9rem 1.15rem;
    }

    .comparison-advantage-list {
        grid-template-columns: 1fr;
        gap: 0.5rem;
    }

    .comparison-advantage-list li {
        padding: 0.68rem 0.72rem;
    }
}

/* Pricing cards: clearer hierarchy and a more intentional premium highlight. */
.pricing-card {
    transition: border-color 180ms ease, box-shadow 180ms ease, transform 180ms ease;
}

html:not(.dark) .pricing-card--free {
    border-color: #d6dde7 !important;
    background: linear-gradient(180deg, rgba(255,255,255,0.98), rgba(248,250,252,0.96)) !important;
}

html:not(.dark) .pricing-card--pro {
    border-color: #8fb7df !important;
    background: linear-gradient(145deg, #f8fbff 0%, #eef6ff 58%, #fff8e7 100%) !important;
    box-shadow: 0 18px 46px rgba(36, 91, 145, 0.12) !important;
}

.pricing-highlight {
    position: relative;
    overflow: hidden;
}

html:not(.dark) .pricing-highlight {
    border-color: #a9c7e5 !important;
    background: linear-gradient(135deg, #fff9e8 0%, #f4f9ff 48%, #eaf4ff 100%) !important;
    box-shadow: 0 10px 28px rgba(39, 84, 130, 0.1) !important;
}

html:not(.dark) .pricing-highlight::after {
    position: absolute;
    inset: 0 auto 0 0;
    width: 3px;
    content: "";
    background: linear-gradient(180deg, #0d70c5, #e2aa36);
}

.pricing-highlight > .flex {
    align-items: flex-start;
    gap: 0.75rem;
}

.pricing-highlight > .flex > div:last-child {
    min-width: 0;
    flex: 1;
}

.pricing-highlight-icon {
    display: inline-flex;
    width: 2rem;
    height: 2rem;
    flex: 0 0 2rem;
    align-items: center;
    justify-content: center;
    margin-top: 0 !important;
    padding: 0 !important;
    border: 1px solid transparent;
    border-radius: 0.58rem;
    box-sizing: border-box;
    font-size: 18px !important;
    line-height: 1 !important;
    text-align: center;
}

html:not(.dark) .pricing-highlight-icon {
    color: #075c9e !important;
    border-color: #b8d5ef;
    background: #e7f3ff;
    box-shadow: inset 0 1px 0 rgba(255,255,255,0.75);
}

html:not(.dark) .pricing-highlight-title {
    color: #17324f !important;
}

html:not(.dark) .pricing-highlight-subtitle {
    color: #4f6175 !important;
}

html:not(.dark) .home-pricing article:last-child .pricing-highlight {
    background: linear-gradient(135deg, #fff7df 0%, #f3f8ff 52%, #e9f4ff 100%) !important;
}

html:not(.dark) .home-pricing article:last-child .pricing-highlight-title {
    color: #17324f !important;
}

html:not(.dark) .home-pricing article:last-child .pricing-highlight-subtitle {
    color: #4f6175 !important;
}

html:not(.dark) .home-pricing article:last-child .pricing-highlight-icon {
    color: #075c9e !important;
}

html.dark .pricing-card--pro {
    border-color: #4777a6 !important;
    background: linear-gradient(145deg, #151d29 0%, #192536 62%, #1e2630 100%) !important;
    box-shadow: 0 18px 46px rgba(0, 0, 0, 0.24) !important;
}

html.dark .pricing-card--pro h2,
html.dark .pricing-card--pro h3,
html.dark .pricing-card--pro > div,
html.dark .pricing-card--pro strong {
    color: #f2f6fb !important;
}

html.dark .pricing-card--pro p,
html.dark .pricing-card--pro li,
html.dark .pricing-card--pro span,
html.dark .pricing-card--pro a {
    color: #bdc9d8 !important;
}

html.dark .pricing-highlight {
    border-color: #446b8e !important;
    background: linear-gradient(135deg, #1d2a3a 0%, #172334 100%) !important;
    box-shadow: inset 0 1px 0 rgba(255,255,255,0.045), 0 10px 26px rgba(0,0,0,0.18) !important;
}

html.dark .pricing-highlight-icon {
    color: #8bc4ff !important;
    background: rgba(91,168,255,0.12);
}

html.dark .pricing-highlight-title {
    color: #f5f8fc !important;
}

html.dark .pricing-highlight-subtitle {
    color: #c4cfdd !important;
}

.home-pricing article {
    border-color: var(--home-ink) !important;
    border-radius: 0 !important;
    box-shadow: none !important;
}

.home-pricing article:last-child {
    background: var(--home-ink) !important;
}

.home-pricing article:last-child h3,
.home-pricing article:last-child p,
.home-pricing article:last-child li,
.home-pricing article:last-child div {
    color: var(--home-paper) !important;
}

.home-pricing article:last-child button {
    border-radius: 2px !important;
    background: var(--home-coral) !important;
    color: var(--home-ink) !important;
    box-shadow: 4px 4px 0 var(--home-paper);
}

.home-faq > div:nth-child(2) > * {
    border-color: var(--home-rule) !important;
    border-radius: 0 !important;
    background: transparent !important;
}

.home-faq-comparison {
    color: var(--home-ink);
}

.home-faq .faq-question .material-symbols-outlined {
    color: var(--home-ink) !important;
}

.home-faq-comparison-intro {
    max-width: 68ch;
    color: color-mix(in srgb, var(--home-ink) 72%, transparent);
    font-size: 0.875rem;
    line-height: 1.65;
}

.home-faq-comparison-intro a {
    display: inline-block;
    margin-inline-start: 0.35rem;
    color: var(--home-blue);
    font-weight: 700;
    text-decoration: underline;
    text-decoration-thickness: 1px;
    text-underline-offset: 0.2em;
}

.home-faq-comparison-scroll {
    margin-top: 1.25rem;
    overflow-x: auto;
    border: 1px solid var(--home-ink);
    outline: none;
    scrollbar-width: thin;
}

.home-faq-comparison-scroll:focus-visible {
    box-shadow: 0 0 0 3px color-mix(in srgb, var(--home-blue) 32%, transparent);
}

.home-faq-comparison-table {
    width: 100%;
    min-width: 43rem;
    border-collapse: collapse;
    table-layout: fixed;
    font-size: 0.78rem;
    line-height: 1.55;
}

.home-faq-comparison-table th,
.home-faq-comparison-table td {
    padding: 0.9rem;
    border-inline-end: 1px solid var(--home-rule);
    border-bottom: 1px solid var(--home-rule);
    vertical-align: top;
}

.home-faq-comparison-table th:last-child,
.home-faq-comparison-table td:last-child {
    border-inline-end: 0;
}

.home-faq-comparison-table tbody tr:last-child > * {
    border-bottom: 0;
}

.home-faq-comparison-table thead th {
    background: var(--home-ink);
    color: var(--home-paper);
    font-family: "SF Mono", "IBM Plex Mono", ui-monospace, monospace;
    font-size: 0.68rem;
    letter-spacing: 0.06em;
    text-align: left;
    text-transform: uppercase;
}

.home-faq-comparison-table thead th:first-child,
.home-faq-comparison-table tbody th {
    width: 24%;
}

.home-faq-comparison-table tbody th {
    color: var(--home-ink);
    font-weight: 800;
    text-align: left;
}

.home-faq-comparison-table tbody td:nth-child(2) {
    background: color-mix(in srgb, var(--home-blue) 7%, transparent);
}

.home-faq-version-tip {
    margin-top: 1rem;
    padding: 1rem;
    border-inline-start: 4px solid var(--home-coral);
    background: color-mix(in srgb, var(--home-coral) 9%, transparent);
}

.home-faq-version-tip strong {
    display: block;
    color: var(--home-ink);
    font-size: 0.82rem;
}

.home-faq-version-tip p {
    margin-top: 0.35rem;
    color: color-mix(in srgb, var(--home-ink) 72%, transparent);
    font-size: 0.78rem;
    line-height: 1.6;
}

.home-final-cta > div {
    position: relative;
    overflow: hidden;
    border: 1px solid var(--home-ink) !important;
    border-radius: 0 !important;
    background: var(--home-blue) !important;
    box-shadow: 11px 11px 0 var(--home-ink);
}

.home-final-cta > div::before {
    content: "SWIFTBIU";
    position: absolute;
    right: -0.06em;
    bottom: -0.2em;
    color: rgba(255, 255, 255, 0.12);
    font-family: Georgia, "Iowan Old Style", serif;
    font-size: clamp(5rem, 14vw, 13rem);
    line-height: 1;
    pointer-events: none;
}

.home-final-cta h2,
.home-final-cta p {
    position: relative;
    z-index: 1;
}

.home-final-cta a {
    position: relative;
    z-index: 1;
    border-radius: 2px !important;
}

/* The homepage uses guide content as an interface: choose a context, inspect the
   route, then continue into the relevant documented workflow. */
.home-context-switcher {
    display: grid;
    grid-template-columns: minmax(13rem, 0.72fr) minmax(0, 1.28fr);
    border: 1px solid rgba(244, 241, 233, 0.28);
    background: rgba(244, 241, 233, 0.035);
}

.home-context-controls {
    display: grid;
    align-content: start;
    border-right: 1px solid rgba(244, 241, 233, 0.28);
}

.home-context-control {
    display: grid;
    grid-template-columns: 2.3rem 1.5rem 1fr;
    align-items: center;
    min-height: 5.5rem;
    gap: 0.65rem;
    padding: 1rem 1.15rem;
    border-bottom: 1px solid rgba(244, 241, 233, 0.2);
    color: rgba(244, 241, 233, 0.68);
    text-align: left;
    transition: background 180ms ease, color 180ms ease;
}

.home-context-control:last-child { border-bottom: 0; }
.home-context-control:hover,
.home-context-control:focus-visible,
.home-context-control.is-active { background: var(--home-coral); color: var(--home-ink); outline: none; }
.home-context-control .material-symbols-outlined { font-size: 1.25rem; }
.home-context-number {
    font-family: "SF Mono", "IBM Plex Mono", ui-monospace, monospace;
    font-size: 10px;
    font-weight: 700;
    letter-spacing: 0.1em;
}

.home-context-panel {
    display: grid;
    min-height: 25rem;
    grid-template-columns: minmax(11rem, 0.88fr) minmax(0, 1.12fr);
}

.home-context-visual {
    position: relative;
    display: grid;
    min-height: 100%;
    place-items: center;
    overflow: hidden;
    border-right: 1px solid rgba(244, 241, 233, 0.24);
    background: var(--home-blue);
    color: var(--home-ink);
}

.home-context-visual img {
    position: absolute;
    inset: 0;
    z-index: 1;
    width: 100%;
    height: 100%;
    object-fit: cover;
    object-position: left top;
    filter: saturate(0.9) contrast(1.05);
    transition: transform 700ms cubic-bezier(0.2, 0.75, 0.2, 1), filter 500ms ease;
}

.home-context-panel.is-active .home-context-visual img {
    animation: home-guide-frame-in 700ms cubic-bezier(0.2, 0.75, 0.2, 1) both;
}

.home-context-panel:hover .home-context-visual img { transform: scale(1.035); filter: saturate(1) contrast(1.08); }

.home-context-visual::before,
.home-context-visual::after {
    position: absolute;
    content: "";
    border: 1px solid rgba(21, 21, 21, 0.55);
}

.home-context-visual::before { width: 64%; height: 49%; transform: rotate(-7deg); }
.home-context-visual::after { width: 45%; height: 64%; transform: rotate(12deg); }
.home-context-visual .material-symbols-outlined { position: absolute; z-index: 3; top: 1rem; left: 1rem; display: grid; width: 2.4rem; height: 2.4rem; place-items: center; border: 1px solid var(--home-ink); background: var(--home-paper); font-size: 1.15rem; }
.home-context-visual i { position: absolute; z-index: 2; display: block; height: 2px; background: var(--home-coral); opacity: 1; }
.home-context-visual i:nth-of-type(1) { top: 24%; left: 11%; width: 32%; }
.home-context-visual i:nth-of-type(2) { top: 68%; right: 9%; width: 45%; }
.home-context-visual i:nth-of-type(3) { bottom: 13%; left: 17%; width: 20%; }
.home-context-visual--file { background: #e4cb54; }
.home-context-visual--ocr { background: #d8d2c4; }
.home-context-visual--clipboard { background: var(--home-coral); }

@keyframes home-guide-frame-in {
    from { opacity: 0.45; transform: scale(1.07); }
    to { opacity: 1; transform: scale(1); }
}

.home-context-copy {
    display: flex;
    min-width: 0;
    flex-direction: column;
    align-items: flex-start;
    padding: clamp(1.5rem, 4vw, 3.75rem);
}

.home-context-copy h3 {
    margin-top: 1.5rem;
    color: var(--home-paper) !important;
    font-family: Georgia, "Iowan Old Style", "Songti SC", serif;
    font-size: clamp(2rem, 3.3vw, 3.7rem);
    font-weight: 500 !important;
    line-height: 0.98;
}

.home-context-copy p { margin-top: 1.25rem; color: rgba(244, 241, 233, 0.74) !important; font-size: 0.96rem; line-height: 1.75; }
.home-context-link { margin-top: auto; padding-top: 2.5rem; color: var(--home-coral) !important; font-size: 0.75rem; font-weight: 800; letter-spacing: 0.11em; text-transform: uppercase; }
.home-context-link:hover { color: var(--home-paper) !important; }

.home-workbench-steps { max-width: 35rem; }
.home-workbench-step {
    display: flex;
    width: 100%;
    gap: 1rem;
    padding: 1rem;
    border: 1px solid transparent;
    border-radius: 0;
    text-align: left;
    transition: border-color 180ms ease, background 180ms ease, transform 180ms ease;
}

.home-workbench-step:hover,
.home-workbench-step:focus-visible,
.home-workbench-step.is-active { border-color: var(--home-ink); background: rgba(21, 21, 21, 0.065); outline: none; }
.home-workbench-step:hover { transform: translateX(3px); }
.home-workbench-step.is-active > span:first-child { background: var(--home-ink) !important; color: var(--home-paper) !important; }
.home-workbench-preview { position: relative; min-height: 20rem; display: grid; }
.home-workbench-output { display: flex; flex: 1; min-height: 15rem; flex-direction: column; justify-content: center; padding: clamp(1.5rem, 4vw, 3rem); border: 1px solid rgba(255,255,255,0.12); background: radial-gradient(circle at 100% 0, rgba(255, 86, 48, 0.25), transparent 31%), #171717; }
.home-workbench-output h3 { max-width: 24rem; margin-top: 1.25rem; color: #f4f1e9 !important; font-family: Georgia, "Iowan Old Style", "Songti SC", serif; font-size: clamp(2rem, 4vw, 3.5rem); font-weight: 500 !important; line-height: 0.98; }
.home-workbench-output p { max-width: 28rem; margin-top: 1.1rem; color: rgba(244,241,233,0.68) !important; font-size: 0.92rem; line-height: 1.75; }
.home-workbench-pulse { width: 0.65rem; height: 0.65rem; border-radius: 50%; background: var(--home-coral); box-shadow: 0 0 0 0 rgba(255, 86, 48, 0.5); }
.home-workbench-output.is-updating .home-workbench-pulse { animation: home-pulse 620ms ease-out; }
.home-workbench-trace { display: flex; gap: 0.4rem; margin-top: auto; padding-top: 2.5rem; }
.home-workbench-trace i { display: block; height: 2px; background: var(--home-blue); }
.home-workbench-trace i:nth-child(1) { width: 24%; }.home-workbench-trace i:nth-child(2) { width: 40%; background: var(--home-coral); }.home-workbench-trace i:nth-child(3) { width: 14%; }
@keyframes home-pulse { from { box-shadow: 0 0 0 0 rgba(255, 86, 48, 0.55); } to { box-shadow: 0 0 0 1rem rgba(255, 86, 48, 0); } }

html.dark body.home-page {
    --home-paper: #121210;
    --home-ink: #f5f1e8;
    --home-rule: rgba(245, 241, 232, 0.18);
    background: var(--home-paper);
}

html.dark body.home-page .site-shell {
    background:
        linear-gradient(rgba(245, 241, 232, 0.045) 1px, transparent 1px),
        linear-gradient(90deg, rgba(245, 241, 232, 0.045) 1px, transparent 1px),
        var(--home-paper);
    background-size: 36px 36px;
}

html.dark body.home-page .aurora-orbs { mix-blend-mode: screen; opacity: 0.13; }
html.dark .home-hero::before { color: rgba(245, 241, 232, 0.68); }
html.dark .home-hero h1,
html.dark .home-hero h1 + p,
html.dark .home-hero h1 + p + p,
html.dark .home-precision h2,
html.dark .home-moments h2,
html.dark .home-trust h2,
html.dark .home-compare h2,
html.dark .home-pricing h2,
html.dark .home-faq h2 { color: var(--home-ink) !important; }
html.dark .home-hero a[href="guide.html"] { border-color: var(--home-ink) !important; color: var(--home-ink) !important; }
html.dark .home-plugin-lab { background: #24231f !important; }
html.dark .home-pricing article:last-child { background: #24231f !important; }
html.dark .home-pricing .pricing-card--pro h3,
html.dark .home-pricing .pricing-card--pro p,
html.dark .home-pricing .pricing-card--pro li,
html.dark .home-pricing .pricing-card--pro div,
html.dark .home-pricing .pricing-card--pro span,
html.dark .home-pricing .pricing-card--pro a { color: var(--home-ink) !important; }
html.dark .home-pricing .pricing-highlight-title { color: #f5f8fc !important; }
html.dark .home-pricing .pricing-highlight-subtitle { color: #c4cfdd !important; }
html.dark .home-pricing .pricing-highlight-icon { color: #8bc4ff !important; }

@media (max-width: 700px) {
    .home-hero { min-height: auto; padding-inline: 0.9rem; }
    .home-hero::before { top: 0.75rem; left: 0.75rem; font-size: 8px; }
    .home-hero > div:first-child { padding-top: 3.75rem; }
    .home-hero h1 { font-size: clamp(4.1rem, 22vw, 6.5rem) !important; }
    .home-hero h1 + p { font-size: clamp(2rem, 10vw, 3rem) !important; }
    .home-hero-demo .hero-demo { box-shadow: 5px 5px 0 var(--home-blue); }
    .home-capability-index,
    .home-precision,
    .home-moments,
    .home-trust,
    .home-compare,
    .home-pricing,
    .home-faq { padding-inline: 1rem; }
    .home-signal,
    .home-plugin-lab { margin-inline: 0.25rem; }
    .home-signal > div,
    .home-plugin-lab,
    .home-final-cta > div { box-shadow: 5px 5px 0 var(--home-ink); }
    .home-capability-index .feature-card { min-height: 0; }

    /* Comparison matrices become vertical comparison cards on phones instead
       of forcing a five-column horizontal scroll. */
    .home-compare-matrix-wrap {
        overflow: visible !important;
        border: 0 !important;
        background: transparent !important;
        box-shadow: none !important;
    }

    .comparison-matrix {
        display: block;
        width: 100%;
        min-width: 0 !important;
    }

    .comparison-matrix thead {
        display: none;
    }

    .comparison-matrix tbody {
        display: grid;
        gap: 0.85rem;
        width: 100%;
    }

    .comparison-matrix-row {
        display: block;
        overflow: hidden;
        border: 1px solid rgba(21, 21, 21, 0.2) !important;
        border-radius: 0.9rem;
        background: rgba(255, 255, 255, 0.9);
        box-shadow: 0 10px 26px rgba(21, 21, 21, 0.075), 3px 3px 0 rgba(18, 103, 232, 0.09);
    }

    .comparison-matrix-cell {
        display: grid;
        width: 100%;
        grid-template-columns: minmax(5.4rem, 0.68fr) minmax(0, 1.32fr);
        gap: 0.85rem;
        align-items: start;
        padding: 0.82rem 0.95rem !important;
        border-top: 1px solid rgba(21, 21, 21, 0.1);
        font-size: 0.79rem !important;
        line-height: 1.5;
    }

    .comparison-matrix-mobile-label {
        display: block;
        color: #536176;
        font-size: 0.67rem;
        font-weight: 800;
        letter-spacing: 0.04em;
        text-transform: uppercase;
    }

    .comparison-matrix-feature {
        display: block;
        padding: 0.95rem 1rem !important;
        border-top: 0;
        background: linear-gradient(135deg, #151515, #242424);
        color: #f7f3ea !important;
        font-size: 0.91rem !important;
        font-weight: 800 !important;
        line-height: 1.45;
    }

    .comparison-matrix-feature .comparison-matrix-mobile-label {
        display: none;
    }

    .comparison-matrix-swiftbiu {
        background: color-mix(in srgb, var(--home-blue) 8%, white);
        box-shadow: inset 3px 0 0 var(--home-blue);
    }

    .comparison-matrix-swiftbiu .comparison-matrix-mobile-label {
        color: #245f9d;
    }

    html.dark .comparison-matrix-row {
        border-color: rgba(245, 241, 232, 0.2) !important;
        background: rgba(255, 255, 255, 0.035);
        box-shadow: 0 10px 28px rgba(0, 0, 0, 0.18), 3px 3px 0 rgba(91, 168, 255, 0.09);
    }

    html.dark .comparison-matrix-swiftbiu {
        background: rgba(91, 168, 255, 0.08);
        box-shadow: inset 3px 0 0 #5ba8ff;
    }

    html.dark .comparison-matrix-swiftbiu .comparison-matrix-mobile-label {
        color: #91c5ff;
    }

    html.dark .comparison-matrix-cell {
        border-top-color: rgba(245, 241, 232, 0.12);
    }

    html.dark .comparison-matrix-mobile-label {
        color: #aeb9c8;
    }

    /* The homepage status matrix is already compact enough to stay tabular on
       phones. This override intentionally does not affect full comparison pages. */
    .home-compare .home-compare-matrix-wrap {
        overflow: hidden !important;
        border: 1px solid rgba(21, 21, 21, 0.16) !important;
        border-radius: 0.85rem !important;
        background: rgba(255, 255, 255, 0.88) !important;
        box-shadow: 0 8px 24px rgba(21, 21, 21, 0.055) !important;
    }

    html.dark .home-compare .home-compare-matrix-wrap {
        border-color: rgba(245, 241, 232, 0.18) !important;
        background: rgba(255, 255, 255, 0.03) !important;
        box-shadow: 0 8px 24px rgba(0, 0, 0, 0.16) !important;
    }

    .home-comparison-matrix {
        display: table;
        width: 100%;
        table-layout: fixed;
    }

    .home-comparison-matrix thead {
        display: table-header-group;
    }

    .home-comparison-matrix tbody {
        display: table-row-group;
    }

    .home-comparison-matrix tr {
        display: table-row;
    }

    .home-comparison-matrix th,
    .home-comparison-matrix td {
        display: table-cell;
        width: auto;
    }

    .home-comparison-matrix thead th {
        padding: 0.7rem 0.2rem;
        font-size: 0.57rem;
        letter-spacing: 0;
        text-transform: none;
    }

    .home-comparison-matrix .home-comparison-matrix-feature-heading,
    .home-comparison-matrix .home-comparison-matrix-feature {
        width: 42%;
    }

    .home-comparison-matrix-product {
        width: 14.5%;
    }

    .home-comparison-matrix-feature {
        padding: 0.75rem 0.65rem;
        font-size: 0.69rem;
        line-height: 1.35;
    }

    .home-comparison-matrix-status-cell {
        padding: 0.62rem 0.1rem;
    }

    .home-compare-status {
        width: 1.65rem;
        height: 1.65rem;
        font-size: 0.82rem;
    }

    .home-compare-legend {
        gap: 0.45rem 0.75rem;
        padding: 0.7rem 0.65rem;
        font-size: 0.62rem;
        line-height: 1.35;
    }

    .home-compare-legend .home-compare-status {
        width: 1.15rem;
        height: 1.15rem;
        font-size: 0.62rem;
    }

    .home-compare-actions {
        display: grid !important;
        width: 100%;
        grid-template-columns: 1fr;
        gap: 0.65rem !important;
    }

    .home-compare-action {
        width: 100%;
        min-width: 0;
        min-height: 2.9rem;
        padding-inline: 0.9rem !important;
        border-radius: 0.7rem !important;
        font-size: 0.8rem !important;
        white-space: normal;
    }

    .home-compare-action--primary {
        min-height: 3.15rem;
        font-size: 0.84rem !important;
        box-shadow: 0 8px 20px rgba(18, 103, 232, 0.16);
    }

    .home-context-switcher,
    .home-context-panel { grid-template-columns: 1fr; }
    .home-context-controls { border-right: 0; border-bottom: 1px solid rgba(244, 241, 233, 0.28); }
    .home-context-control { min-height: 4rem; grid-template-columns: 2rem 1.4rem 1fr; padding: 0.8rem; }
    .home-context-visual { min-height: 12rem; border-right: 0; border-bottom: 1px solid rgba(244, 241, 233, 0.24); }
    .home-context-copy { min-height: 20rem; }
    .home-workbench-step { padding: 0.75rem; }
}

/* Home information architecture v2: a guide-led editorial sequence.
   The visual evidence owns half of each chapter instead of being nested in a card. */
.home-reframe .home-flow-intro,
.home-flow-intro {
    display: grid;
    grid-template-columns: minmax(0, 0.86fr) minmax(0, 1.14fr);
    gap: clamp(2rem, 7vw, 8rem);
    align-items: end;
    padding: clamp(6rem, 11vw, 10rem) clamp(1rem, 7vw, 8rem);
    border-top: 1px solid var(--home-rule);
    border-bottom: 1px solid var(--home-rule);
    background: var(--home-paper);
}

.home-section-heading { max-width: 42rem; }
.home-section-heading > p:first-child,
.home-rules-copy > p:first-child,
.home-plugin-copy > p:first-child {
    margin: 0;
    color: var(--home-blue) !important;
    font-family: "SF Mono", "IBM Plex Mono", ui-monospace, monospace;
    font-size: 0.67rem !important;
    font-weight: 700;
    letter-spacing: 0.12em;
    text-transform: uppercase;
}

.home-section-heading h2,
.home-rules-copy h2,
.home-plugin-copy h2 {
    margin-top: 1.25rem;
    color: var(--home-ink) !important;
    font-family: Georgia, "Iowan Old Style", "Songti SC", "Noto Serif CJK SC", serif;
    font-size: clamp(3rem, 5.5vw, 6.4rem) !important;
    font-weight: 500 !important;
    letter-spacing: -0.065em !important;
    line-height: 0.92 !important;
}

.home-section-heading > p:last-child,
.home-rules-copy > p:nth-of-type(2),
.home-plugin-copy > p:nth-of-type(2) {
    margin-top: 1.45rem;
    color: rgba(21, 21, 21, 0.7) !important;
    font-size: 1rem !important;
    line-height: 1.75 !important;
}

.home-flow-rail { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); margin: 0; border-top: 1px solid var(--home-ink); list-style: none; }
.home-flow-rail li { position: relative; min-height: 13rem; padding: 1.25rem 1.15rem; border-right: 1px solid var(--home-ink); border-bottom: 1px solid var(--home-ink); }
.home-flow-rail li:first-child { background: var(--home-coral); }
.home-flow-rail li:last-child { border-right: 0; background: var(--home-blue); }
.home-flow-rail span,
.home-guide-chapter-copy > span { display: block; font-family: "SF Mono", "IBM Plex Mono", ui-monospace, monospace; font-size: 0.67rem; font-weight: 700; letter-spacing: 0.1em; }
.home-flow-rail span { color: #36506d; }
.home-flow-rail h3 { margin-top: 4rem; color: #172033 !important; font-size: 1.2rem !important; font-weight: 800 !important; line-height: 1.08; }
.home-flow-rail p { margin-top: 0.7rem; color: #4b5565 !important; font-size: 0.79rem !important; line-height: 1.55; }
.home-flow-rail li:first-child span { color: rgba(21, 21, 21, 0.68); }
.home-flow-rail li:first-child h3 { color: #151515 !important; }
.home-flow-rail li:first-child p { color: rgba(21, 21, 21, 0.82) !important; }
.home-flow-rail li:last-child span { color: rgba(255, 255, 255, 0.76); }
.home-flow-rail li:last-child h3 { color: #ffffff !important; }
.home-flow-rail li:last-child p { color: rgba(255, 255, 255, 0.88) !important; }
html.dark .home-flow-rail span { color: #9bc8ff; }
html.dark .home-flow-rail h3 { color: #f5f1e8 !important; }
html.dark .home-flow-rail p { color: rgba(245, 241, 232, 0.76) !important; }
html.dark .home-flow-rail li:first-child span { color: rgba(21, 21, 21, 0.68); }
html.dark .home-flow-rail li:first-child h3 { color: #151515 !important; }
html.dark .home-flow-rail li:first-child p { color: rgba(21, 21, 21, 0.82) !important; }
html.dark .home-flow-rail li:last-child span { color: rgba(255, 255, 255, 0.76); }
html.dark .home-flow-rail li:last-child h3 { color: #ffffff !important; }
html.dark .home-flow-rail li:last-child p { color: rgba(255, 255, 255, 0.88) !important; }

/* The deeper interactive scenarios live beside the workflow introduction,
   rather than competing with the immediate text/file proof in the hero. */
.home-workflow-demo { min-width: 0; }
.home-flow-intro .home-hero-demo { width: 100%; max-width: none; margin: 0; }
.home-flow-intro .home-hero-demo .hero-demo { box-shadow: 7px 7px 0 var(--home-blue); }

.home-guide-stories { padding: clamp(6rem, 12vw, 11rem) clamp(0.25rem, 4vw, 4rem); background: #171717; }
.home-guide-stories-heading { margin: 0 auto clamp(3.5rem, 8vw, 7rem); padding-inline: clamp(0.75rem, 3vw, 3rem); }
.home-guide-stories .home-section-heading > p:first-child { color: var(--home-coral) !important; }
.home-guide-stories .home-section-heading h2 { color: var(--home-paper) !important; }
.home-guide-stories .home-section-heading > p:last-child { color: rgba(244, 241, 233, 0.66) !important; }
.home-feature-link {
    position: relative;
    display: block;
    overflow: hidden;
    border: 1px solid rgba(244, 241, 233, 0.2);
    background: rgba(244, 241, 233, 0.055);
    box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.025);
}
.home-feature-link::before {
    position: absolute;
    inset: 0 auto 0 0;
    width: 3px;
    content: "";
    background: var(--home-coral);
    opacity: 0.78;
    transition: opacity 180ms ease, transform 180ms ease;
}
.home-feature-link-title {
    display: block;
    color: #fffaf1 !important;
    letter-spacing: -0.01em;
}
.home-feature-link-desc {
    color: rgba(244, 241, 233, 0.74) !important;
}
.home-feature-link:hover {
    transform: translateY(-2px);
    border-color: rgba(255, 86, 48, 0.52);
    background: rgba(244, 241, 233, 0.095);
}
.home-feature-link:hover::before {
    opacity: 1;
    transform: scaleY(1.08);
}
.home-feature-link:hover .home-feature-link-title {
    color: #ffffff !important;
}
.home-feature-link:focus-visible {
    outline: 2px solid var(--home-coral);
    outline-offset: 3px;
}
.home-guide-chapters { display: grid; gap: clamp(2rem, 5vw, 5rem); }
.home-guide-chapter { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); min-height: clamp(28rem, 52vw, 42rem); border-top: 1px solid rgba(244, 241, 233, 0.26); border-bottom: 1px solid rgba(244, 241, 233, 0.26); }
.home-guide-chapter.is-reversed .home-guide-chapter-media { order: 2; }
.home-guide-chapter.is-reversed .home-guide-chapter-copy { order: 1; }
.home-guide-chapter-media,
.home-rules-media,
.home-plugin-media { position: relative; margin: 0; overflow: hidden; background: #d9d5cb; }
.home-guide-chapter-media::after,
.home-rules-media::after,
.home-plugin-media::after { position: absolute; inset: 0; content: ""; background: linear-gradient(135deg, rgba(18,103,232,0.08), transparent 55%); pointer-events: none; }
.home-guide-chapter-media > img,
.home-rules-media > img,
.home-plugin-media > img { display: block; width: 100%; height: 100%; object-fit: cover; object-position: left top; transition: transform 900ms cubic-bezier(0.2,0.72,0.2,1); }
.home-guide-chapter:hover .home-guide-chapter-media > img,
.home-rules-story:hover .home-rules-media > img,
.home-plugin-story:hover .home-plugin-media > img { transform: scale(1.025); }
.home-guide-chapter-copy { display: flex; min-width: 0; flex-direction: column; align-items: flex-start; justify-content: center; padding: clamp(2rem, 6vw, 7rem); background: #252525; }
.home-guide-chapter-copy > span { color: var(--home-coral); }
.home-guide-chapter-copy h3 { margin-top: 2rem; color: var(--home-paper) !important; font-family: Georgia, "Iowan Old Style", "Songti SC", "Noto Serif CJK SC", serif; font-size: clamp(2.3rem, 4.2vw, 4.9rem) !important; font-weight: 500 !important; letter-spacing: -0.065em !important; line-height: 0.92; }
.home-guide-chapter-copy p { margin-top: 1.5rem; color: rgba(244, 241, 233, 0.7) !important; font-size: 1rem !important; line-height: 1.75; }
.home-guide-chapter-copy a,
.home-plugin-copy a { margin-top: 3rem; color: var(--home-coral) !important; font-family: "SF Mono", "IBM Plex Mono", ui-monospace, monospace; font-size: 0.7rem; font-weight: 700; letter-spacing: 0.1em; text-transform: uppercase; }
.home-guide-chapter-copy a:hover,
.home-plugin-copy a:hover { color: var(--home-paper) !important; }

.home-rules-story,
.home-plugin-story { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); min-height: clamp(35rem, 58vw, 49rem); margin: clamp(5rem, 10vw, 10rem) clamp(0.25rem, 4vw, 4rem); border: 1px solid var(--home-ink); }
.home-rules-copy,
.home-plugin-copy { display: flex; flex-direction: column; justify-content: center; padding: clamp(2rem, 6vw, 7rem); background: var(--home-paper); }
.home-rules-copy ul { display: grid; gap: 0; margin-top: 2.5rem; border-top: 1px solid var(--home-rule); list-style: none; }
.home-rules-copy li { display: grid !important; grid-template-columns: 1.5rem minmax(0, 1fr); gap: 0.85rem !important; padding: 1rem 0 !important; border-bottom: 1px solid var(--home-rule) !important; border-radius: 0 !important; background: transparent !important; }
.home-rules-copy li.home-trigger-item { grid-template-columns: 2.15rem minmax(0, 1fr); gap: 1.05rem !important; padding: 1.05rem 1.15rem 1.05rem 1.4rem !important; }
.home-rules-copy li > span:first-child { color: var(--home-blue) !important; }
.home-rules-copy .home-trigger-icon { display: grid; width: 2.15rem; height: 2.15rem; place-items: center; margin-top: 0 !important; border: 1px solid color-mix(in srgb, var(--home-blue) 26%, transparent); border-radius: 0.55rem; background: color-mix(in srgb, var(--home-blue) 9%, transparent); font-size: 1.15rem; }
.home-rules-copy li strong { color: var(--home-ink) !important; font-size: 0.82rem; }
.home-rules-copy li span span { color: rgba(21,21,21,0.62) !important; font-size: 0.76rem !important; line-height: 1.45 !important; }

.home-plugin-story { border-color: var(--home-paper); background: #171717; }
.home-plugin-copy { background: #171717; }
.home-plugin-copy > p:first-child { color: var(--home-coral) !important; }
.home-plugin-copy h2 { color: var(--home-paper) !important; }
.home-plugin-copy > p:nth-of-type(2) { color: rgba(244,241,233,0.68) !important; }
.home-plugin-media { order: 2; background: #d9d5cb; }

.home-trust-story { display: grid; grid-template-columns: minmax(0, 0.8fr) minmax(0, 1.2fr); gap: clamp(2rem, 7vw, 8rem); align-items: start; padding: clamp(6rem, 11vw, 10rem) clamp(1rem, 7vw, 8rem); background: var(--home-paper); border-top: 1px solid var(--home-rule); }
.home-trust-grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); border-top: 1px solid var(--home-ink); border-left: 1px solid var(--home-ink); }
.home-trust-grid > div { min-height: 12rem; padding: 1.4rem; border-right: 1px solid var(--home-ink) !important; border-bottom: 1px solid var(--home-ink) !important; border-radius: 0 !important; background: transparent !important; }
.home-trust-grid h3 { color: var(--home-ink) !important; font-size: 1rem !important; }
.home-trust-grid p { color: rgba(21,21,21,0.66) !important; font-size: 0.82rem !important; line-height: 1.55; }

html.dark .home-flow-intro,
html.dark .home-rules-copy,
html.dark .home-trust-story { background: var(--home-paper); }
html.dark .home-section-heading h2,
html.dark .home-rules-copy h2,
html.dark .home-trust-story h2,
html.dark .home-trust-grid h3 { color: var(--home-ink) !important; }
html.dark .home-section-heading > p:last-child,
html.dark .home-rules-copy > p:nth-of-type(2),
html.dark .home-trust-grid p,
html.dark .home-rules-copy li span span { color: rgba(245,241,232,0.67) !important; }
html.dark .home-plugin-copy h2 { color: var(--home-ink) !important; }
html.dark .home-plugin-copy > p:nth-of-type(2) { color: rgba(245,241,232,0.72) !important; }
html.dark .home-guide-chapter-copy h3 { color: #f5f1e8 !important; }
html.dark .home-guide-chapter-copy a:hover { color: #f5f1e8 !important; }

@media (max-width: 780px) {
    .home-flow-intro,
    .home-trust-story { grid-template-columns: 1fr; gap: 3rem; padding-inline: 1rem; }
    .home-flow-intro .home-hero-demo .hero-demo { box-shadow: 5px 5px 0 var(--home-blue); }
    .home-flow-rail { grid-template-columns: 1fr; }
    .home-flow-rail li { min-height: 0; padding: 1.2rem; border-right: 0; }
    .home-flow-rail h3 { margin-top: 2.2rem; }
    .home-guide-stories { padding-inline: 0.25rem; }
    .home-guide-stories-heading { padding-inline: 1rem; }
    .home-guide-chapter,
    .home-rules-story,
    .home-plugin-story { grid-template-columns: 1fr; min-height: 0; margin-inline: 0.25rem; }
    .home-guide-chapter.is-reversed .home-guide-chapter-media,
    .home-guide-chapter.is-reversed .home-guide-chapter-copy,
    .home-plugin-media { order: initial; }
    .home-guide-chapter-media,
    .home-rules-media,
    .home-plugin-media { min-height: 17rem; }
    .home-guide-chapter-copy,
    .home-rules-copy,
    .home-plugin-copy { padding: 2.25rem 1.5rem; }
    .home-guide-chapter-copy h3 { font-size: clamp(2.5rem, 13vw, 4rem) !important; }
    .home-trust-grid { grid-template-columns: 1fr; }
}

/* Homepage interaction lead: the guide's toolbar preview becomes the first
   product proof, before visitors have to decode the five deeper simulations. */
.home-toolbar-stage {
    position: relative;
    width: min(100%, 62rem);
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    height: clamp(17rem, 29vw, 22rem);
    margin-top: clamp(1rem, 3vw, 2.5rem);
    overflow: hidden;
    border: 1px solid var(--home-ink);
    border-radius: 0;
    background:
        linear-gradient(rgba(21,21,21,0.06) 1px, transparent 1px),
        linear-gradient(90deg, rgba(21,21,21,0.06) 1px, transparent 1px),
        #dfe8f7;
    background-size: 26px 26px;
    box-shadow: 8px 8px 0 var(--home-blue);
}

.home-preview-channel { position: relative; min-width: 0; overflow: hidden; }
.home-preview-channel--text { border-right: 1px solid rgba(21,21,21,0.17); }
.home-preview-channel--file { background: linear-gradient(145deg, rgba(251,191,36,0.14), rgba(255,255,255,0.03) 58%); }

.home-toolbar-stage-label {
    position: absolute;
    top: 1.1rem;
    left: 1.1rem;
    color: rgba(21,21,21,0.68);
    font-family: "SF Mono", "IBM Plex Mono", ui-monospace, monospace;
    font-size: 0.62rem;
    font-weight: 700;
    letter-spacing: 0.09em;
}

.home-toolbar-selection {
    position: absolute;
    top: 30%;
    left: 9%;
    display: grid;
    gap: 0.65rem;
    max-width: min(57%, 29rem);
    padding: 1.2rem 1.3rem;
    border: 1px solid rgba(21,21,21,0.16);
    background: rgba(255,255,255,0.84);
    box-shadow: 10px 10px 0 rgba(18,103,232,0.16);
}

.home-toolbar-selection span { color: rgba(21,21,21,0.68); font-size: 0.69rem; font-weight: 700; }
.home-toolbar-selection strong { position: relative; display: inline-block; width: min(11rem, 100%); justify-self: center; color: var(--home-ink); font-family: Georgia, "Iowan Old Style", "Songti SC", serif; font-size: clamp(1.1rem, 2vw, 1.6rem); font-weight: 500; line-height: 1.08; }
.home-toolbar-selection strong > span { position: relative; z-index: 1; color: inherit; font-size: inherit; }
.home-toolbar-selection strong > i { position: absolute; z-index: 0; top: -0.12rem; right: -0.2rem; bottom: -0.12rem; left: -0.2rem; background: rgba(96,165,250,0.42); transform: scaleX(0); transform-origin: left; animation: home-preview-text-sweep 10.4s ease-in-out infinite; }
.home-toolbar-actions { left: 12%; top: 30%; }
.home-toolbar-actions .toolbar-preview-item { border: 0; background: transparent; cursor: default; }
.home-toolbar-actions .toolbar-preview-item.is-hovered { background: rgba(0,0,0,0.065); }
.home-toolbar-actions .toolbar-preview-item.is-executing,
.home-file-actions .toolbar-preview-item.is-executing { background: rgba(18,103,232,0.12); box-shadow: inset 2px 0 0 var(--home-blue); }
.home-toolbar-stage .toolbar-preview-glyph.symbol-animated {
    will-change: transform;
    animation: home-toolbar-symbol-idle 3.4s ease-in-out infinite;
}
.home-toolbar-stage .toolbar-preview-item:nth-child(2) .toolbar-preview-glyph { animation-delay: -0.85s; }
.home-toolbar-stage .toolbar-preview-item:nth-child(3) .toolbar-preview-glyph { animation-delay: -1.7s; }
.home-toolbar-stage .toolbar-preview-item:nth-child(4) .toolbar-preview-glyph { animation-delay: -2.55s; }
.home-toolbar-stage .toolbar-preview-item:is(.is-hovered, .is-executing) .symbol-bounce { animation: sf-bounce 0.62s cubic-bezier(0.25,0.46,0.45,0.94) infinite; }
.home-toolbar-stage .toolbar-preview-item:is(.is-hovered, .is-executing) .symbol-wiggle { animation: sf-wiggle 0.68s ease-in-out infinite; }
.home-toolbar-stage .toolbar-preview-item:is(.is-hovered, .is-executing) .symbol-pulse { animation: sf-pulse 0.62s ease-in-out infinite alternate; }
.home-toolbar-stage .toolbar-preview-item:is(.is-hovered, .is-executing) .symbol-squeeze { animation: sf-squeeze 0.68s ease-in-out infinite; }
.home-toolbar-stage .toolbar-preview-item:is(.is-hovered, .is-executing) .symbol-rotate { animation: sf-rotate 1.1s cubic-bezier(0.16,1,0.3,1) infinite; }
@keyframes home-toolbar-symbol-idle {
    0%,100% { transform: translateY(0) scale(1); filter: saturate(1); }
    50% { transform: translateY(-1.2px) scale(1.055); filter: saturate(1.18); }
}
.home-toolbar-actions.is-expanded { align-items: stretch; flex-direction: column; width: max-content; max-width: none; }
.home-toolbar-actions.is-expanded .toolbar-preview-item { width: auto; min-width: max-content; height: 28px; justify-content: flex-start; padding: 0 7px; overflow: visible; }
.home-toolbar-actions.is-expanded .toolbar-preview-name { max-width: none; overflow: visible; text-overflow: clip; white-space: nowrap; overflow-wrap: normal; }
.home-toolbar-actions.is-expanded .toolbar-preview-shortcut { flex: 0 0 auto; margin-left: 7px; white-space: nowrap; }
.home-toolbar-actions:not(.is-expanded) .toolbar-preview-name,
.home-toolbar-actions:not(.is-expanded) .toolbar-preview-shortcut { display: none; }
.home-toolbar-caption { position: absolute; right: 0.9rem; bottom: 0.8rem; max-width: 72%; margin: 0; color: rgba(21,21,21,0.68); font-size: 0.62rem; font-weight: 650; text-align: right; }
.home-preview-pointer { position: absolute; z-index: 12; display: block; right: auto; color: #111827; font-size: 1.35rem; opacity: 0; transform: translate(-0.15rem, 0.15rem) rotate(-28deg); filter: drop-shadow(0 1px 1px rgba(255,255,255,0.9)); pointer-events: none; transition: left 620ms cubic-bezier(0.2,0.8,0.2,1), top 620ms cubic-bezier(0.2,0.8,0.2,1), opacity 180ms ease, filter 180ms ease; }
.home-preview-pointer.is-visible { opacity: 1; }
.home-preview-pointer.is-targeting-action { filter: drop-shadow(0 0 3px rgba(18,103,232,0.38)); }
.home-preview-pointer.is-clicking { animation: home-preview-pointer-click 520ms ease-out 1; }
.home-preview-pointer--text { left: 42%; top: 58%; }
@keyframes home-preview-text-sweep { 0%,5% { transform: scaleX(0); } 15%,91% { transform: scaleX(1); } 100% { transform: scaleX(0); } }
@keyframes home-preview-pointer-click { 0%,100% { transform: translate(-0.15rem,0.15rem) rotate(-28deg) scale(1); } 45% { transform: translate(-0.15rem,0.15rem) rotate(-28deg) scale(0.78); } }

.home-file-stage-label { position: absolute; top: 1.1rem; left: 1.1rem; color: rgba(21,21,21,0.68); font-family: "SF Mono", "IBM Plex Mono", ui-monospace, monospace; font-size: 0.62rem; font-weight: 700; letter-spacing: 0.09em; }
.home-file-window { position: absolute; top: 42%; left: 9%; right: 9%; z-index: 2; overflow: hidden; border: 1px solid rgba(21,21,21,0.15); background: rgba(255,255,255,0.86); box-shadow: 8px 8px 0 rgba(251,191,36,0.24); transition: transform 280ms ease, box-shadow 280ms ease; }
.home-file-window-bar { display: flex; align-items: center; gap: 0.28rem; height: 1.75rem; padding: 0 0.55rem; border-bottom: 1px solid rgba(21,21,21,0.1); color: rgba(21,21,21,0.68); background: rgba(250,250,248,0.8); }
.home-file-window-bar .material-symbols-outlined { margin-right: auto; font-size: 0.95rem; color: var(--home-blue); }
.home-file-window-bar i { width: 0.36rem; height: 0.36rem; border-radius: 50%; background: rgba(21,21,21,0.18); }
.home-file-window-bar i:nth-of-type(1) { background: #fb7185; }.home-file-window-bar i:nth-of-type(2) { background: #fbbf24; }.home-file-window-bar i:nth-of-type(3) { background: #34d399; }
.home-file-row { position: relative; display: grid; grid-template-columns: 2.3rem minmax(0,1fr) auto; align-items: center; gap: 0.55rem; padding: 0.8rem; transition: background 220ms ease; }
.home-file-selection-outline { position: absolute; inset: 0.28rem; border: 2px solid rgba(22,119,223,0.85); border-radius: 0.26rem; background: rgba(147,197,253,0.12); opacity: 0; animation: home-preview-file-select 10.4s ease-in-out infinite; pointer-events: none; }
.home-file-thumb { display: grid; width: 2.3rem; height: 2.3rem; place-items: center; border: 1px solid rgba(18,103,232,0.18); border-radius: 0.35rem; color: var(--home-blue); background: linear-gradient(135deg, #e0f2fe, #bfdbfe); font-size: 1.2rem; }
.home-file-copy { display: grid; min-width: 0; gap: 0.15rem; }
.home-file-copy small { overflow: hidden; color: rgba(21,21,21,0.68); font-size: 0.56rem; font-weight: 700; text-overflow: ellipsis; white-space: nowrap; }
.home-file-copy strong { overflow: hidden; color: var(--home-ink); font-size: 0.74rem; line-height: 1.1; text-overflow: ellipsis; white-space: nowrap; }
.home-file-copy em { overflow: hidden; color: rgba(21,21,21,0.68); font-size: 0.58rem; font-style: normal; text-overflow: ellipsis; white-space: nowrap; }
.home-file-check { color: var(--home-blue); font-size: 1rem; opacity: 0; transform: scale(0.7); transition: opacity 180ms ease, transform 180ms ease; }
.home-preview-channel--file.is-processing .home-file-window { transform: translateY(-2px); box-shadow: 10px 10px 0 rgba(18,103,232,0.25); }
.home-preview-channel--file.is-processing .home-file-row { background: rgba(18,103,232,0.07); }
.home-preview-channel--file.is-processing .home-file-thumb { animation: home-file-thumb-pulse 760ms ease-in-out infinite alternate; }
.home-preview-channel--file.is-processing .home-file-check { opacity: 1; transform: scale(1); }
@keyframes home-file-thumb-pulse { from { transform: scale(1); } to { transform: scale(1.08) rotate(-3deg); } }

.home-file-actions { top: calc(34% - 0.65rem); right: 9%; left: auto; z-index: 4; }
.home-file-actions .toolbar-preview-item { border: 0; background: transparent; cursor: default; }
.home-file-actions .toolbar-preview-name { max-width: 7.2rem; }
.home-file-actions.is-expanded { align-items: stretch; flex-direction: column; width: max-content; max-width: none; }
.home-file-actions.is-expanded .toolbar-preview-item { width: auto; min-width: max-content; height: 28px; justify-content: flex-start; padding: 0 7px; overflow: visible; }
.home-file-actions.is-expanded .toolbar-preview-name { max-width: none; overflow: visible; text-overflow: clip; white-space: nowrap; overflow-wrap: normal; }
.home-file-actions:not(.is-expanded) .toolbar-preview-name { display: none; }
.home-file-status { position: absolute; bottom: 0.8rem; left: 1.1rem; display: flex; align-items: center; gap: 0.35rem; margin: 0; color: rgba(21,21,21,0.68); font-family: "SF Mono", "IBM Plex Mono", ui-monospace, monospace; font-size: 0.58rem; font-weight: 700; letter-spacing: 0.03em; opacity: 0; transform: translateY(0.35rem); transition: opacity 220ms ease, transform 220ms ease; }
.home-file-status .material-symbols-outlined { color: #059669; font-size: 0.85rem; }
.home-file-status.is-visible { opacity: 1; transform: translateY(0); }
.home-preview-pointer--file { left: 78%; top: 63%; }
@keyframes home-preview-file-select { 0%,5% { opacity: 0; } 15%,91% { opacity: 1; } 100% { opacity: 0; } }

@media (prefers-reduced-motion: reduce) {
    .home-toolbar-stage .toolbar-preview-glyph.symbol-animated {
        animation: none !important;
        transform: none !important;
    }
}

.home-demo-guide { display: grid; grid-template-columns: minmax(8rem,0.46fr) minmax(0,1fr); gap: 1rem; align-items: baseline; padding: 1.15rem 1.25rem 0.85rem; border-bottom: 1px solid rgba(255,255,255,0.16); }
.home-demo-guide p:first-child { margin: 0; color: var(--home-coral); font-family: "SF Mono", "IBM Plex Mono", ui-monospace, monospace; font-size: 0.62rem; font-weight: 700; letter-spacing: 0.09em; text-transform: uppercase; }
.home-demo-guide p:last-child { margin: 0; color: rgba(255,255,255,0.66); font-size: 0.76rem; text-align: right; }
#hero-demo:not(.is-concurrent-mode) .hero-demo-nav { display: grid !important; grid-template-columns: repeat(6, minmax(0,1fr)); width: min(100%, 56rem); gap: 1px; padding: 1px; border: 1px solid rgba(255,255,255,0.18); border-radius: 0; background: rgba(255,255,255,0.1); }
.home-hero-demo .hero-demo-tab { grid-column: span 2; min-height: 3.2rem; justify-content: flex-start; gap: 0.55rem; padding: 0.7rem 0.85rem; border-radius: 0; background: rgba(0,0,0,0.26); color: rgba(255,255,255,0.72); font-size: 0.72rem; font-weight: 700; }
.home-hero-demo .hero-demo-tab:hover { background: rgba(255,255,255,0.12); }
.home-hero-demo .hero-demo-tab.is-active { background: var(--home-coral); color: var(--home-ink); }
.home-hero-demo .hero-demo-tab:nth-child(4) { grid-column: 2 / span 2; }

/* More readable guide chapters: evidence is fully visible, and the copy no
   longer consumes a poster-sized amount of empty vertical space. */
.home-guide-stories { padding-block: clamp(4.5rem, 8vw, 7rem); }
.home-guide-stories-heading { margin-bottom: clamp(2.25rem, 5vw, 4rem); }
.home-guide-chapters { gap: clamp(1.25rem, 3vw, 2.5rem); }
.home-guide-chapter { min-height: clamp(24rem, 38vw, 31rem); }
.home-guide-chapter-media,
.home-rules-media,
.home-plugin-media { display: grid; place-items: center; padding: clamp(0.6rem, 2vw, 1.6rem); }
.home-guide-chapter-media > img,
.home-rules-media > img,
.home-plugin-media > img { width: auto; height: auto; max-width: 100%; max-height: clamp(24rem, 38vw, 31rem); object-fit: contain; object-position: center; }
.home-guide-chapter-copy { padding: clamp(1.8rem, 4vw, 4.8rem); }
.home-guide-chapter-copy h3 { margin-top: 1.35rem; font-size: clamp(2.2rem, 3.55vw, 4rem) !important; }
.home-guide-chapter-copy p { margin-top: 1.05rem; font-size: 0.9rem !important; line-height: 1.68; }
.home-guide-chapter-copy .home-guide-chapter-extra { color: rgba(244,241,233,0.82); }
.home-guide-proof { display: grid; width: 100%; gap: 0; margin: 1.35rem 0 0; border-top: 1px solid rgba(244,241,233,0.16); list-style: none; }
.home-guide-proof li { display: grid; grid-template-columns: 0.5rem minmax(0,1fr); gap: 0.65rem; padding: 0.7rem 0; border-bottom: 1px solid rgba(244,241,233,0.16); color: rgba(244,241,233,0.72); font-size: 0.76rem; line-height: 1.48; }
.home-guide-proof i { width: 0.38rem; height: 0.38rem; margin-top: 0.38rem; background: var(--home-coral); }
.home-guide-proof span { display: block; }
.home-guide-chapter-copy a { margin-top: 2rem; }
.home-rules-story,
.home-plugin-story { min-height: clamp(30rem, 45vw, 39rem); margin-block: clamp(3.5rem, 7vw, 7rem); }
.home-rules-copy,
.home-plugin-copy { padding: clamp(1.8rem, 4vw, 4.8rem); }
.home-rules-copy h2,
.home-plugin-copy h2 { font-size: clamp(2.4rem, 4.1vw, 4.8rem) !important; }

@media (max-width: 780px) {
    .home-toolbar-stage { grid-template-columns: 1fr; grid-template-rows: repeat(2, minmax(0, 1fr)); height: 42rem; width: calc(100% - 0.5rem); box-shadow: 5px 5px 0 var(--home-blue); }
    .home-preview-channel--text { border-right: 0; border-bottom: 1px solid rgba(21,21,21,0.17); }
    .home-toolbar-selection { top: 35%; left: 7%; max-width: 65%; padding: 1rem; }
    .home-toolbar-actions { left: 9%; top: 35%; }
    .home-toolbar-actions.is-expanded { display: flex; width: max-content; max-width: none; }
    .home-toolbar-actions.is-expanded .toolbar-preview-shortcut { display: none; }
    .home-toolbar-caption { display: none; max-width: 78%; font-size: 0.62rem; }
    .home-file-window { top: 42%; left: 8%; right: 8%; }
    .home-file-actions { top: calc(34% - 0.65rem); right: 8%; }
    .home-file-actions.is-expanded { display: flex; width: max-content; max-width: none; }
    .home-demo-guide { grid-template-columns: 1fr; gap: 0.45rem; padding: 1rem; }
    .home-demo-guide p:last-child { text-align: left; }
    #hero-demo:not(.is-concurrent-mode) .hero-demo-nav { grid-template-columns: repeat(2, minmax(0,1fr)); width: 100%; }
    .home-hero-demo .hero-demo-tab { min-height: 3rem; padding: 0.65rem; font-size: 0.68rem; }
    .home-hero-demo .hero-demo-tab,
    .home-hero-demo .hero-demo-tab:nth-child(4) { grid-column: auto; }
    .home-guide-chapter-media,
    .home-rules-media,
    .home-plugin-media { min-height: 13rem; padding: 0.55rem; }
    .home-guide-chapter-media > img,
    .home-rules-media > img,
    .home-plugin-media > img { max-height: 24rem; }
}

/* Guide chapters show the action in context instead of a static preferences
   screenshot: text, files, OCR, and clipboard each animate independently. */
.home-guide-chapter-media { padding: 0; background: #e6edf9; }
.home-guide-scenario { position: absolute; inset: 0; z-index: 1; overflow: hidden; color: #172033; background: linear-gradient(135deg, #e6eefc, #cfdcf3); }
.home-guide-scenario::before { position: absolute; inset: 0; content: ""; opacity: 0.62; background-image: linear-gradient(rgba(23,32,51,0.05) 1px, transparent 1px), linear-gradient(90deg, rgba(23,32,51,0.05) 1px, transparent 1px); background-size: 24px 24px; }
.home-guide-scenario--file { background: linear-gradient(135deg, #fff4d7, #f0dc9e); }
.home-guide-scenario--ocr { background: linear-gradient(135deg, #d5e8e8, #a7cbd0); }
.home-guide-scenario--clipboard { background: linear-gradient(135deg, #e5e9f5, #cbd8f1); }
.home-scenario-window { position: absolute; inset: 12% 8%; overflow: hidden; border: 1px solid rgba(23,32,51,0.2); border-radius: 0.35rem; background: rgba(255,255,255,0.9); box-shadow: 11px 11px 0 rgba(18,103,232,0.18); }
.home-scenario-bar { display: flex; align-items: center; gap: 0.42rem; height: 2.05rem; padding: 0 0.65rem; border-bottom: 1px solid rgba(23,32,51,0.11); background: rgba(249,250,252,0.9); color: rgba(23,32,51,0.68); font-family: "SF Mono", "IBM Plex Mono", ui-monospace, monospace; font-size: 0.57rem; font-weight: 700; letter-spacing: 0.05em; }
.home-scenario-bar > .material-symbols-outlined { margin-right: auto; color: var(--home-blue); font-size: 1rem; }
.home-scenario-bar > i { width: 0.38rem; height: 0.38rem; border-radius: 50%; background: #fb7185; }
.home-scenario-bar > i:nth-of-type(2) { background: #fbbf24; }.home-scenario-bar > i:nth-of-type(3) { background: #34d399; }

.home-scenario-text-sheet { position: absolute; top: 29%; left: 10%; right: 10%; display: grid; gap: 0.55rem; padding: 1rem 1.1rem; border: 1px solid rgba(23,32,51,0.14); background: rgba(255,255,255,0.88); box-shadow: 8px 8px 0 rgba(18,103,232,0.15); }
.home-scenario-text-sheet small { color: rgba(23,32,51,0.52); font-size: 0.6rem; font-weight: 700; }
.home-scenario-text-sheet strong { position: relative; z-index: 1; overflow: hidden; color: #172033; font-family: Georgia, "Iowan Old Style", "Songti SC", serif; font-size: clamp(1rem, 2vw, 1.55rem); font-weight: 500; line-height: 1.08; text-overflow: ellipsis; white-space: nowrap; }
.home-scenario-text-sheet b { position: absolute; z-index: 0; left: 0.92rem; right: 0.92rem; bottom: 0.9rem; height: 1.25rem; background: rgba(96,165,250,0.38); transform-origin: left; animation: home-scenario-text-select 5.8s ease-in-out infinite; }
.home-scenario-toolbar { position: absolute; z-index: 2; top: 17%; left: 15%; display: flex; gap: 0.18rem; padding: 0.28rem; border: 1px solid rgba(23,32,51,0.14); border-radius: 0.55rem; background: rgba(255,255,255,0.96); box-shadow: 0 8px 18px rgba(23,32,51,0.18); animation: home-scenario-toolbar-in 5.8s ease-in-out infinite; }
.home-scenario-toolbar span { display: flex; align-items: center; gap: 0.28rem; max-width: 1.65rem; height: 1.65rem; padding: 0 0.35rem; overflow: hidden; border-radius: 0.35rem; color: rgba(23,32,51,0.78); font-size: 0.58rem; font-weight: 700; text-overflow: clip; white-space: nowrap; transition: max-width 260ms ease, background 260ms ease; }
.home-scenario-toolbar .material-symbols-outlined { flex: 0 0 auto; font-size: 0.9rem; }.home-scenario-toolbar span:nth-child(1) .material-symbols-outlined { color: #3b82f6; }.home-scenario-toolbar span:nth-child(2) .material-symbols-outlined { color: #f59e0b; }.home-scenario-toolbar span:nth-child(3) .material-symbols-outlined { color: #0ea5e9; }
.home-scenario-toolbar span:nth-child(2) { background: rgba(245,158,11,0.13); animation: home-scenario-action-focus 5.8s ease-in-out infinite; }
@keyframes home-scenario-text-select { 0%,18% { transform: scaleX(0); } 32%,78% { transform: scaleX(1); } 92%,100% { transform: scaleX(0); } }
@keyframes home-scenario-toolbar-in { 0%,19% { opacity: 1; transform: translateY(0) scale(1); } 32%,70% { opacity: 1; transform: translateY(0) scale(1); } 82% { opacity: 0.45; transform: translateY(-0.2rem) scale(0.96); } 100% { opacity: 1; transform: translateY(0) scale(1); } }
@keyframes home-scenario-action-focus { 0%,38%,100% { max-width: 1.65rem; } 50%,70% { max-width: 7.5rem; } }

.home-scenario-file-row { position: absolute; top: 32%; left: 9%; right: 9%; display: grid; grid-template-columns: 2.3rem minmax(0,1fr) auto; align-items: center; gap: 0.65rem; padding: 0.8rem; border: 1px solid rgba(23,32,51,0.12); background: rgba(255,255,255,0.9); box-shadow: 8px 8px 0 rgba(245,158,11,0.18); animation: home-scenario-file-select 6s ease-in-out infinite; }
.home-scenario-file-icon { display: grid; width: 2.3rem; height: 2.3rem; place-items: center; border-radius: 0.4rem; color: #1677df; background: linear-gradient(135deg,#dbeafe,#bfdbfe); }.home-scenario-file-icon .material-symbols-outlined { font-size: 1.3rem; }
.home-scenario-file-row > span:nth-child(2) { display: grid; min-width: 0; gap: 0.16rem; }.home-scenario-file-row small,.home-scenario-file-row em { overflow: hidden; color: rgba(23,32,51,0.52); font-size: 0.58rem; font-style: normal; text-overflow: ellipsis; white-space: nowrap; }.home-scenario-file-row strong { overflow: hidden; color: #172033; font-size: 0.76rem; text-overflow: ellipsis; white-space: nowrap; }.home-scenario-file-row > .material-symbols-outlined { color: #1677df; font-size: 1.05rem; opacity: 0; animation: home-scenario-file-check 6s ease-in-out infinite; }
.home-scenario-file-actions { position: absolute; z-index: 2; top: 20%; right: 8%; display: grid; gap: 0.16rem; padding: 0.28rem; border: 1px solid rgba(23,32,51,0.13); border-radius: 0.5rem; background: rgba(255,255,255,0.97); box-shadow: 0 8px 18px rgba(23,32,51,0.16); animation: home-scenario-file-actions 6s ease-in-out infinite; }
.home-scenario-file-actions span { display: flex; align-items: center; gap: 0.35rem; max-width: 8.4rem; height: 1.55rem; padding: 0 0.42rem; overflow: hidden; border-radius: 0.28rem; color: rgba(23,32,51,0.77); font-size: 0.57rem; font-weight: 700; text-overflow: ellipsis; white-space: nowrap; }.home-scenario-file-actions span:first-child { background: rgba(96,165,250,0.14); }.home-scenario-file-actions .material-symbols-outlined { color: #3b82f6; font-size: 0.82rem; }.home-scenario-file-actions span:nth-child(2) .material-symbols-outlined { color: #f59e0b; }.home-scenario-file-actions span:nth-child(3) .material-symbols-outlined { color: #10b981; }
.home-scenario-progress { position: absolute; right: 9%; bottom: 11%; left: 9%; display: grid; gap: 0.36rem; color: rgba(23,32,51,0.57); font-family: "SF Mono", "IBM Plex Mono", ui-monospace, monospace; font-size: 0.54rem; font-weight: 700; opacity: 0; animation: home-scenario-progress-show 6s ease-in-out infinite; }.home-scenario-progress i { height: 0.3rem; overflow: hidden; background: rgba(23,32,51,0.1); }.home-scenario-progress b { display: block; width: 18%; height: 100%; background: #1677df; animation: home-scenario-progress-run 6s ease-in-out infinite; }
@keyframes home-scenario-file-select { 0%,14% { transform: translateY(0); background: rgba(255,255,255,0.9); } 24%,78% { transform: translateY(-0.16rem); background: rgba(219,234,254,0.9); } 90%,100% { transform: translateY(0); } }
@keyframes home-scenario-file-actions { 0%,19% { opacity: 0; transform: scale(0.88); } 31%,77% { opacity: 1; transform: scale(1); } 90%,100% { opacity: 0; transform: scale(0.96); } }
@keyframes home-scenario-file-check { 0%,73% { opacity: 0; transform: scale(0.7); } 82%,91% { opacity: 1; transform: scale(1); } 100% { opacity: 0; } }
@keyframes home-scenario-progress-show { 0%,57% { opacity: 0; transform: translateY(0.3rem); } 68%,91% { opacity: 1; transform: translateY(0); } 100% { opacity: 0; } }
@keyframes home-scenario-progress-run { 0%,60% { width: 18%; } 88%,100% { width: 100%; } }

.home-scenario-ocr-canvas { position: absolute; inset: 14% 8% 14%; overflow: hidden; padding: 1.3rem; background: linear-gradient(145deg,#f8fbf8,#d6e8e7); }.home-scenario-ocr-canvas > span { display: block; overflow: hidden; max-width: 70%; color: rgba(23,32,51,0.58); font-family: Georgia, "Iowan Old Style", "Songti SC", serif; font-size: clamp(0.9rem,1.5vw,1.35rem); font-weight: 600; text-overflow: ellipsis; white-space: nowrap; }.home-scenario-ocr-canvas > span:nth-child(2) { max-width: 55%; margin-top: 0.65rem; font-family: inherit; font-size: 0.62rem; font-weight: 500; }.home-scenario-ocr-canvas b { position: absolute; top: 22%; right: 13%; bottom: 19%; left: 12%; border: 2px solid #1677df; background: rgba(22,119,223,0.09); animation: home-scenario-ocr-frame 5.8s ease-in-out infinite; }.home-scenario-ocr-canvas i { position: absolute; z-index: 2; right: 12%; left: 12%; height: 2px; background: #f97316; box-shadow: 0 0 0.65rem rgba(249,115,22,0.8); animation: home-scenario-ocr-scan 5.8s ease-in-out infinite; }
.home-scenario-ocr-result { position: absolute; right: 7%; bottom: 9%; left: 7%; z-index: 3; display: flex; align-items: center; gap: 0.5rem; padding: 0.55rem 0.7rem; border: 1px solid rgba(23,32,51,0.12); background: rgba(255,255,255,0.94); box-shadow: 0 8px 18px rgba(23,32,51,0.15); color: rgba(23,32,51,0.7); font-size: 0.59rem; font-weight: 700; opacity: 0; animation: home-scenario-ocr-result 5.8s ease-in-out infinite; }.home-scenario-ocr-result .material-symbols-outlined { color: #f59e0b; font-size: 0.9rem; }.home-scenario-ocr-result span:last-child { margin-left: auto; color: #1677df; }
@keyframes home-scenario-ocr-frame { 0%,15% { opacity: 0; transform: scale(0.84); } 27%,77% { opacity: 1; transform: scale(1); } 92%,100% { opacity: 0; transform: scale(1.03); } }
@keyframes home-scenario-ocr-scan { 0%,22% { top: 24%; opacity: 0; } 31% { opacity: 1; } 67% { top: 72%; opacity: 1; } 82%,100% { top: 72%; opacity: 0; } }
@keyframes home-scenario-ocr-result { 0%,64% { opacity: 0; transform: translateY(0.45rem); } 75%,91% { opacity: 1; transform: translateY(0); } 100% { opacity: 0; } }

.home-scenario-clipboard-layout { position: absolute; inset: 14% 7% 15%; display: grid; grid-template-columns: minmax(0,0.92fr) minmax(0,1.08fr); gap: 0.55rem; }.home-scenario-clipboard-list,.home-scenario-note { padding: 0.55rem; border: 1px solid rgba(23,32,51,0.12); background: rgba(255,255,255,0.88); }.home-scenario-clipboard-list { display: grid; align-content: start; gap: 0.38rem; }.home-scenario-clipboard-list span { display: block; padding: 0.48rem; overflow: hidden; border-radius: 0.28rem; color: rgba(23,32,51,0.65); font-size: 0.58rem; font-weight: 700; text-overflow: ellipsis; white-space: nowrap; }.home-scenario-clipboard-list span:nth-child(2) { animation: home-scenario-clipboard-pick 5.8s ease-in-out infinite; }.home-scenario-note { display: grid; align-content: start; gap: 0.55rem; }.home-scenario-note small { color: rgba(23,32,51,0.5); font-size: 0.55rem; font-weight: 700; }.home-scenario-note strong,.home-scenario-note i { display: block; height: 0.52rem; background: rgba(23,32,51,0.12); }.home-scenario-note strong { width: 72%; }.home-scenario-note i { width: 88%; position: relative; overflow: hidden; }.home-scenario-note i::after { position: absolute; inset: 0; content: ""; background: #75b9f5; transform: translateX(-102%); animation: home-scenario-clipboard-paste 5.8s ease-in-out infinite; }
.home-scenario-clipboard-toast { position: absolute; z-index: 3; right: 8%; bottom: 8%; left: 8%; display: flex; align-items: center; gap: 0.4rem; padding: 0.5rem 0.62rem; border: 1px solid rgba(23,32,51,0.1); background: rgba(255,255,255,0.96); box-shadow: 0 8px 18px rgba(23,32,51,0.15); color: rgba(23,32,51,0.68); font-size: 0.57rem; font-weight: 700; opacity: 0; animation: home-scenario-clipboard-toast 5.8s ease-in-out infinite; }.home-scenario-clipboard-toast .material-symbols-outlined { color: #10b981; font-size: 0.9rem; }
@keyframes home-scenario-clipboard-pick { 0%,25%,100% { background: transparent; transform: translateX(0); } 38%,72% { background: rgba(96,165,250,0.2); transform: translateX(0.15rem); } }
@keyframes home-scenario-clipboard-paste { 0%,48% { transform: translateX(-102%); } 62%,88% { transform: translateX(0); } 100% { transform: translateX(102%); } }
@keyframes home-scenario-clipboard-toast { 0%,66% { opacity: 0; transform: translateY(0.45rem); } 77%,91% { opacity: 1; transform: translateY(0); } 100% { opacity: 0; } }

@media (max-width: 780px) {
    .home-scenario-window { inset: 8% 5%; }.home-scenario-text-sheet { top: 31%; padding: 0.8rem; }.home-scenario-toolbar { left: 10%; }.home-scenario-file-row { top: 34%; }.home-scenario-file-actions { right: 6%; }.home-scenario-ocr-canvas { padding: 1rem; }.home-scenario-clipboard-layout { inset: 14% 5% 15%; }
}

@media (prefers-reduced-motion: reduce) {
    .home-guide-scenario *, .home-guide-scenario *::after { animation: none !important; }
    .home-scenario-toolbar, .home-scenario-file-actions, .home-scenario-ocr-result, .home-scenario-clipboard-toast { opacity: 1; transform: none; }
}

/* The chapter media reuses the complete, proven interaction panels rather than
   a simplified facsimile. Each root is fixed to its matching context. */
.home-guide-scenario--full { background: #e9e8e2; }
.home-guide-scenario--full::before { display: none; }
.home-guide-scenario--full .home-chapter-hero-demo { position: absolute; inset: 0; height: 100%; overflow: hidden; border: 0; border-radius: 0; background: #111; box-shadow: none; }
.home-guide-scenario--full .home-chapter-hero-demo::before,
.home-guide-scenario--full .home-chapter-hero-demo .home-demo-guide,
.home-guide-scenario--full .home-chapter-hero-demo .hero-demo-nav { display: none !important; }
.home-guide-scenario--full .hero-demo-stage { height: 100%; min-height: 0; aspect-ratio: auto; border: 0; border-radius: 0; background: #e9e8e2; }
.home-guide-scenario--full .hero-demo-panel-header { display: none !important; }
.home-guide-scenario--full .hero-demo-panel { overflow: hidden; }
.home-guide-scenario--full .hero-mac-window { top: 7%; bottom: 5%; }
.home-guide-scenario--full .hero-text-toolbar,
.home-guide-scenario--full .hero-file-toolbar,
.home-guide-scenario--full .hero-clipboard-toolbar { z-index: 70; }
.home-guide-scenario--full .hero-progress-card,
.home-guide-scenario--full .hero-file-result-card { z-index: 72; }
.home-guide-scenario--full .hero-clipboard-window { max-width: calc(100% - 2rem); }
.home-guide-scenario--full .hero-clipboard-window.is-visible { transform-origin: top right; }

/* Skip layout/paint work for off-screen story chapters while preserving their
   intrinsic footprint, which keeps long homepage scrolling smooth. */
.home-guide-chapter,
.home-rules-story,
.home-plugin-story {
    content-visibility: auto;
    contain-intrinsic-size: auto 520px;
}

@media (max-width: 780px) {
    .home-guide-scenario--full .hero-mac-window { top: 5%; right: 4%; bottom: 4%; left: 4%; }
    .home-guide-chapter-media:has(.home-guide-scenario--full) { min-height: 30rem; }
}

/* Phone layouts keep the chapter copy and the demonstrations readable without
   carrying desktop-sized headings, whitespace, or comparison columns. */
.home-compare-product-label { display: none; }

/* Shared platform information keeps downloads and platform-specific features
   explicit across the homepage, pricing, documentation, and release notes. */
.platform-demo-note { max-width: 42rem; margin: 0 auto 1.5rem; padding-inline: 1rem; color: #c7cbd2; font-size: 0.875rem; line-height: 1.7; }
.platform-notice { grid-column: 1 / -1; margin-block: 1rem; padding: 1rem 1.15rem; border-inline-start: 3px solid var(--primary-light); background: rgba(13, 112, 197, 0.06); color: var(--text-secondary-light); font-size: 0.875rem; line-height: 1.75; overflow-wrap: anywhere; }
.platform-notice a { display: inline-block; padding-block: 0.35rem; margin-inline-end: 0.75rem; color: var(--primary-light); font-weight: 650; text-decoration: underline; text-underline-offset: 0.2em; }
.platform-notice strong { display: block; color: var(--text-light); }
.home-pricing .platform-notice { margin: 0; }
.home-final-cta button[data-open-site-download] { border: 1px solid var(--home-ink); border-radius: 0; }
.dark .platform-notice { color: var(--text-secondary-dark); }
.dark .platform-notice strong { color: var(--text-dark); }
.dark .platform-notice a { color: var(--primary-dark); }
@media (max-width: 780px) {
    .home-final-cta button[data-open-site-download] { height: auto; min-height: 48px; padding: 0.75rem 1rem; }
}

@media (max-width: 780px) {
    .home-page #main-content > section[id] { scroll-margin-top: 6rem; }
    /* Stacked chapters vary with translated copy. Resolve their height before
       anchor navigation so scrolling does not jump as each chapter appears. */
    .home-guide-chapter,
    .home-rules-story,
    .home-plugin-story { content-visibility: visible; contain-intrinsic-size: none; grid-template-columns: minmax(0, 1fr); }
    .home-flow-intro,
    .home-trust-story { gap: 1.75rem; padding: 3rem 1rem; }
    .home-guide-stories { padding-block: 3rem; }
    .home-guide-stories-heading { margin-bottom: 1.75rem; }
    .home-section-heading h2,
    .home-rules-copy h2,
    .home-plugin-copy h2,
    .home-compare h2,
    .home-pricing h2,
    .home-faq h2,
    .home-final-cta h2 {
        font-size: clamp(1.875rem, 7.5vw, 2.5rem) !important;
        line-height: 1.22 !important;
        letter-spacing: -0.035em !important;
        overflow-wrap: anywhere;
        text-wrap: pretty;
    }
    .home-section-heading > p:last-child { margin-top: 1rem; line-height: 1.7 !important; }
    .home-flow-rail li { display: grid; grid-template-columns: 1.5rem minmax(0, 1fr); column-gap: 0.75rem; padding: 1.25rem 1rem; }
    .home-flow-rail li > span { grid-row: span 2; padding-top: 0.2rem; }
    .home-flow-rail h3 { margin-top: 0; font-size: 1.1rem !important; line-height: 1.35; }
    .home-flow-rail p { margin-top: 0.5rem; font-size: 0.875rem !important; line-height: 1.65; }
    .home-guide-chapters { gap: 1.5rem; }
    .home-guide-chapter-copy,
    .home-rules-copy,
    .home-plugin-copy { min-width: 0; padding: 1.5rem 1.25rem; }
    .home-guide-chapter-copy h3 { margin-top: 0.9rem; font-size: clamp(1.75rem, 6.5vw, 2.125rem) !important; line-height: 1.25; letter-spacing: -0.035em !important; overflow-wrap: anywhere; }
    .home-guide-chapter-copy p { font-size: 0.9375rem !important; line-height: 1.75; }
    .home-guide-proof { margin-top: 1rem; }
    .home-guide-proof li { padding-block: 0.85rem; font-size: 0.875rem; line-height: 1.65; }
    .home-guide-chapter-copy a,
    .home-plugin-copy a { display: inline-flex; min-height: 44px; align-items: center; gap: 0.5rem; margin-top: 1rem; font-size: 0.8125rem; }
    .home-guide-chapter-media:has(.home-guide-scenario--full) { min-height: 25rem; }
    .home-guide-chapter--clipboard .home-guide-chapter-media,
    .home-guide-chapter--ocr .home-guide-chapter-media { min-height: 28rem; }
    .home-guide-scenario--full .hero-demo-stage { min-height: 0 !important; }
    .home-guide-scenario--full .hero-mac-window { top: 5% !important; bottom: 4% !important; }
    .home-guide-scenario--full .hero-ocr-toolbar {
        display: grid !important;
        grid-template-columns: repeat(4, minmax(0, 1fr));
        top: auto; right: 4%; bottom: 4%; left: 4%;
        width: auto; max-height: none; gap: 0.2rem; padding: 0.35rem;
        overflow: visible;
    }
    .home-guide-scenario--full .hero-ocr-toolbar-group-title,
    .home-guide-scenario--full .hero-ocr-toolbar-divider { display: none; }
    .home-guide-scenario--full .hero-ocr-toolbar-action { width: 100% !important; min-width: 0; min-height: 44px; flex-direction: column; justify-content: center; gap: 0.2rem; padding: 0.3rem 0.1rem; font-size: 0.625rem; }
    .home-guide-scenario--full .hero-ocr-toolbar-action > span:not(.material-symbols-outlined) { max-width: 100%; white-space: normal; overflow-wrap: anywhere; text-align: center; line-height: 1.3; }
    .home-guide-scenario--full .has-ocr-toolbar .hero-ocr-body { padding-bottom: 7rem !important; }
    .home-guide-scenario--full .hero-clipboard-window { width: min(16rem, 82%) !important; height: 22rem !important; }
    .home-rules-story,
    .home-plugin-story { margin-block: 2.5rem; }
    .home-rules-media,
    .home-plugin-media { min-height: 0; padding: 0.75rem; }
    .home-rules-media > img,
    .home-plugin-media > img { max-height: 22rem; }
    .home-rules-copy ul { margin-top: 1.5rem; }
    .home-rules-copy li.home-trigger-item { padding: 1rem 0 !important; gap: 0.75rem !important; }
    .home-trust-grid > div { min-height: 0; padding: 1.25rem; }
    .home-trust-grid p { font-size: 0.9375rem !important; line-height: 1.7; }
    .home-compare,
    .home-pricing,
    .home-faq { padding: 3rem 1rem !important; }
    .home-final-cta { padding-bottom: 3rem; }
    .home-final-cta > div { padding: 1.5rem 1.25rem; }
    .home-final-cta a { height: auto; min-height: 48px; padding: 0.75rem 1rem; }
    .home-faq .faq-question { gap: 0.75rem; padding: 1rem 0.25rem; }
    .home-faq .faq-answer > p,
    .home-faq-comparison { padding-inline: 0.25rem; }
}

@media (max-width: 700px) {
    .home-compare .home-compare-matrix-wrap { border: 0 !important; background: transparent !important; box-shadow: none !important; overflow: visible !important; }
    .home-compare .home-comparison-matrix { display: block; }
    /* Keep the column headers available to assistive technology. */
    .home-compare .home-comparison-matrix thead,
    .home-faq-comparison-table thead { position: absolute; width: 1px; height: 1px; padding: 0; overflow: hidden; clip-path: inset(50%); }
    .home-compare .home-comparison-matrix tbody { display: grid; gap: 0.75rem; }
    .home-compare .home-comparison-matrix tbody tr { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); overflow: hidden; border: 1px solid var(--home-rule); border-radius: 0.5rem; background: var(--home-paper); }
    .home-compare .home-comparison-matrix .home-comparison-matrix-feature { display: block; grid-column: 1 / -1; width: auto; border-top: 0; padding: 0.875rem !important; font-size: 0.875rem !important; line-height: 1.6; }
    .home-compare .home-comparison-matrix-status-cell { display: flex; min-width: 0; flex-direction: column; align-items: center; gap: 0.5rem; padding: 0.75rem 0.15rem !important; }
    .home-compare-product-label { display: block; max-width: 100%; color: var(--home-ink); font-size: 0.6875rem; font-weight: 700; line-height: 1.4; overflow-wrap: anywhere; }
    .home-compare-legend { padding-inline: 0; font-size: 0.75rem; line-height: 1.6; }
    .home-compare-legend-item { align-items: flex-start; }
    .home-compare-legend-item > .home-compare-status { flex-shrink: 0; margin-top: 0.1rem; }
    .home-faq-comparison-scroll { overflow: visible; border: 0; }
    .home-faq-comparison-table { display: block; min-width: 0; }
    .home-faq-comparison-table tbody { display: grid; gap: 1rem; }
    .home-faq-comparison-table tr { display: block; border: 1px solid var(--home-rule); }
    .home-faq-comparison-table tbody th,
    .home-faq-comparison-table tbody td { display: block; width: auto; padding: 0.875rem !important; border-inline-end: 0; font-size: 0.875rem !important; line-height: 1.7; }
    .home-faq-comparison-table tbody th { background: color-mix(in srgb, var(--home-ink) 6%, transparent); }
    .home-faq-comparison-table td::before { display: block; margin-bottom: 0.4rem; color: var(--home-blue); font-size: 0.75rem; font-weight: 800; content: attr(data-label); }
}

@media (max-width: 767px) {
    .pricing-card { min-width: 0; padding: 1.25rem; }
    .pricing-card li > .material-symbols-outlined,
    .pricing-card button > .material-symbols-outlined { flex-shrink: 0; }
    .pricing-card li > span:last-child { min-width: 0; overflow-wrap: anywhere; }
    .pricing-card > a,
    .pricing-card > div:last-child > a,
    .pricing-card button { height: auto; min-height: 48px; padding: 0.75rem 1rem; white-space: normal; line-height: 1.5; text-align: center; }
    .pricing-card--pro > div:first-child > p:first-child { max-width: 100%; }
}

@media (max-width: 1023px) {
    .site-footer-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 1.5rem; }
    .site-footer-grid > div { min-width: 0; }
    .site-footer-grid > div:first-child,
    .site-footer-grid > div:last-child { grid-column: span 2; }
    .site-footer-grid ul { margin-top: 0.5rem; }
    .site-footer-grid li + li { margin-top: 0; }
    .site-footer-grid a { display: inline-flex; min-height: 44px; align-items: center; line-height: 1.5; overflow-wrap: anywhere; }
    .site-footer-grid nav { flex-wrap: wrap; gap: 0.5rem; }
    .site-footer-grid nav a { min-width: 44px; justify-content: center; }
    .site-footer-grid > div:last-child ul { display: flex; flex-wrap: wrap; gap: 0 1.5rem; }
    .site-footer > div > div:last-child { overflow-wrap: anywhere; }
}
