:root {
    --color-bg-base: #050505;
    --color-bg-surface: #121212;
    --color-bg-elevated: #1a1a1a;
    --color-accent: #22b7d8;
    --color-accent-dim: rgba(34, 183, 216, 0.15);
    --color-ink-primary: #f5f5f7;
    --color-ink-secondary: #a1a1a6;
    --color-ink-tertiary: #6e6e73;
    --color-border: rgba(255, 255, 255, 0.08);
    --color-border-hover: rgba(255, 255, 255, 0.15);
    
    --radius-md: 14px;
    --radius-lg: 20px;
    --radius-xl: 32px;
    
    --shadow-float: 0 8px 32px rgba(0,0,0,0.4);
    --shadow-elevated: 0 24px 64px rgba(0,0,0,0.6), inset 0 1px 0 rgba(255,255,255,0.1);
    --shadow-accent: 0 4px 12px rgba(34, 183, 216, 0.3), inset 0 1px 0 rgba(255,255,255,0.3);
    
    --transition: 0.25s ease;
    --casing-width: clamp(320px, 92vw, 1360px);
}

* {
    box-sizing: border-box;
    margin: 0;
    padding: 0;
}

body {
    background-color: var(--color-bg-base);
    color: var(--color-ink-primary);
    font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
    line-height: 1.6;
    -webkit-font-smoothing: antialiased;
    overflow-x: hidden;
}

/* Flex/Grid Mandatory Rules & Text Rules */
.tray, .batch, .roll, .casing, .deck, .apex, .ribbon, .root, .stage, .vault, .folder, .cover, .folio {
    display: flex;
    flex-wrap: wrap;
    word-break: break-word;
    overflow-wrap: break-word;
}

.tray > *, .batch > *, .roll > *, .casing > *, .deck > *, .apex > *, .ribbon > *, .root > *, .stage > *, .vault > *, .folder > *, .cover > *, .folio > * {
    min-width: 0;
}

h1, h2, h3, p, span, a, li {
    word-break: break-word;
    overflow-wrap: break-word;
}
p, span, li {
    word-break: keep-all;
}

/* Typography */
.head-xl {
    font-size: clamp(2.5rem, 5vw, 4.5rem);
    font-weight: 800;
    line-height: 1.1;
    letter-spacing: -0.02em;
    color: var(--color-ink-primary);
    white-space: normal;
    width: 100%;
    margin-bottom: 1.5rem;
}

.head-lg {
    font-size: clamp(2rem, 4vw, 3rem);
    font-weight: 700;
    line-height: 1.2;
    letter-spacing: -0.01em;
    color: var(--color-ink-primary);
    white-space: normal;
    width: 100%;
    margin-bottom: 1.25rem;
}

.head-md {
    font-size: clamp(1.25rem, 2vw, 1.5rem);
    font-weight: 600;
    line-height: 1.3;
    color: var(--color-ink-primary);
    white-space: normal;
    width: 100%;
    margin-bottom: 1rem;
}

.ink-primary { color: var(--color-ink-primary); width: 100%; }
.ink-secondary { color: var(--color-ink-secondary); font-size: 1.125rem; width: 100%; }
.ink-tertiary { color: var(--color-ink-tertiary); font-size: 0.875rem; }

/* Global Layout */
.casing {
    width: var(--casing-width);
    margin: 0 auto;
    flex-direction: column;
    padding-top: 5rem; /* Space for fixed header */
}

/* Navigation Shell (Inherited from Home) */
.apex {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    z-index: 100;
    background: rgba(5, 5, 5, 0.8);
    backdrop-filter: blur(20px);
    border-bottom: 1px solid var(--color-border);
    justify-content: center;
    padding: 0.75rem 0;
}

.ribbon {
    width: var(--casing-width);
    justify-content: space-between;
    align-items: center;
}

.mark {
    display: flex;
    align-items: center;
}

.mark img {
    height: 32px;
    width: auto;
}

.roll {
    gap: 2rem;
    align-items: center;
}

.path {
    color: var(--color-ink-secondary);
    text-decoration: none;
    font-size: 0.875rem;
    font-weight: 500;
    transition: color var(--transition);
}

.path:hover,
.path:focus {
    color: var(--color-ink-primary);
}

.path.active {
    color: var(--color-accent);
}

/* Buttons / Seals */
.seal-primary {
    padding: 0.875rem 1.75rem;
    font-weight: 600;
    border-radius: var(--radius-md);
    border: none;
    background: var(--color-accent);
    color: #000;
    box-shadow: var(--shadow-accent);
    text-decoration: none;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    transition: transform var(--transition), box-shadow var(--transition);
    cursor: pointer;
    margin-top: 2rem;
}

.seal-primary:hover,
.seal-primary:focus {
    transform: translateY(-2px);
    box-shadow: 0 6px 16px rgba(34, 183, 216, 0.4), inset 0 1px 0 rgba(255,255,255,0.4);
}

.seal-ghost {
    padding: 0.875rem 1.75rem;
    font-weight: 600;
    border-radius: var(--radius-md);
    border: 1px solid var(--color-border);
    background: transparent;
    color: var(--color-ink-primary);
    text-decoration: none;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    transition: all var(--transition);
    cursor: pointer;
    margin-top: 2rem;
}

.seal-ghost:hover,
.seal-ghost:focus {
    border-color: var(--color-accent);
    color: var(--color-accent);
    background: rgba(34, 183, 216, 0.05);
}

/* 1. Hero / Intro Area (<article>) */
.stage {
    min-height: 85vh;
    padding: 8rem 0;
    align-items: center;
    gap: 4rem;
}

.stage > .tray {
    flex: 1 1 400px;
    flex-direction: column;
}

.stage-ink {
    margin-bottom: 1.5rem;
    font-size: 1.25rem;
    color: var(--color-ink-secondary);
}

.motion-tray {
    position: relative;
    display: flex;
    justify-content: center;
    align-items: center;
    background: radial-gradient(circle at center, rgba(34,183,216,0.1) 0%, transparent 70%);
    border-radius: 50%;
    aspect-ratio: 1;
}

/* SVG Motion Styles */
.glyph-motion {
    width: 100%;
    max-width: 480px;
    height: auto;
    filter: drop-shadow(0 20px 40px rgba(0,0,0,0.5));
}

.motion-path {
    stroke-dasharray: 8 8;
    animation: dash-flow 2s linear infinite;
}

@keyframes dash-flow {
    to { stroke-dashoffset: -16; }
}

.motion-float {
    animation: float 6s ease-in-out infinite;
}
.motion-float-delay {
    animation: float 6s ease-in-out infinite 3s;
}

@keyframes float {
    0%, 100% { transform: translateY(0); }
    50% { transform: translateY(-12px); }
}

/* 2. Comparison Area (<section>) */
.vault {
    padding: 8rem 0;
    gap: 5rem;
    align-items: center;
    border-top: 1px solid var(--color-border);
}

.vault > .tray {
    flex: 1 1 450px;
    flex-direction: column;
}

.vault-lens-casing {
    order: -1; /* Image on left by default */
    background: var(--color-bg-surface);
    border: 1px solid var(--color-border);
    border-radius: var(--radius-xl);
    padding: 1rem;
    box-shadow: var(--shadow-elevated);
    position: relative;
}

.vault-lens-casing::before {
    content: '';
    position: absolute;
    top: -20px;
    left: -20px;
    right: 20px;
    bottom: 20px;
    background: linear-gradient(135deg, var(--color-accent-dim), transparent);
    border-radius: var(--radius-xl);
    z-index: -1;
    filter: blur(20px);
}

.lens {
    width: 100%;
    height: auto;
    border-radius: var(--radius-lg);
    display: block;
}

.batch-roll {
    margin-top: 2.5rem;
    display: flex;
    flex-direction: column;
    gap: 1.5rem;
    list-style: none;
    width: 100%;
}

.node {
    display: flex;
    align-items: flex-start;
    gap: 1rem;
    font-size: 1.125rem;
    color: var(--color-ink-primary);
    background: rgba(255,255,255,0.02);
    padding: 1rem 1.25rem;
    border-radius: var(--radius-md);
    border: 1px solid var(--color-border);
    transition: border-color var(--transition), transform var(--transition);
}

.node:hover {
    border-color: var(--color-border-hover);
    transform: translateX(4px);
}

.node-glyph {
    flex-shrink: 0;
    width: 24px;
    height: 24px;
    color: var(--color-accent);
}

/* 3. Process Area (<aside>) */
.folder {
    padding: 8rem 0;
    flex-direction: column;
    align-items: center;
    border-top: 1px solid var(--color-border);
}

.folder-head {
    text-align: center;
    max-width: 600px;
    margin: 0 auto 4rem;
    display: flex;
    flex-direction: column;
    align-items: center;
}

.batch-grid {
    width: 100%;
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
    gap: 2rem;
}

.folio {
    background: var(--color-bg-surface);
    border: 1px solid var(--color-border);
    border-radius: var(--radius-lg);
    padding: 2.5rem 2rem;
    display: flex;
    flex-direction: column;
    align-items: flex-start;
    transition: transform var(--transition), box-shadow var(--transition), border-color var(--transition);
}

.folio:hover {
    transform: translateY(-4px);
    box-shadow: var(--shadow-float);
    border-color: var(--color-border-hover);
}

.folio-glyph-casing {
    width: 56px;
    height: 56px;
    border-radius: var(--radius-md);
    background: var(--color-bg-elevated);
    border: 1px solid var(--color-border);
    display: flex;
    align-items: center;
    justify-content: center;
    margin-bottom: 1.5rem;
    color: var(--color-accent);
}

.folio-glyph-casing svg {
    width: 28px;
    height: 28px;
}

/* 4. Features/OCR Area (<div>) */
.cover {
    padding: 6rem 0;
    width: 100%;
}

.deck {
    background: linear-gradient(145deg, var(--color-bg-surface), var(--color-bg-elevated));
    border: 1px solid var(--color-border);
    border-radius: var(--radius-xl);
    padding: clamp(3rem, 6vw, 5rem);
    box-shadow: var(--shadow-elevated);
    flex-direction: column;
    align-items: center;
    text-align: center;
    position: relative;
    overflow: hidden;
    width: 100%;
}

.deck::after {
    content: '';
    position: absolute;
    top: 0; right: 0;
    width: 50%; height: 100%;
    background: radial-gradient(ellipse at top right, var(--color-accent-dim), transparent 60%);
    pointer-events: none;
}

.deck .head-lg,
.deck .ink-primary {
    position: relative;
    z-index: 2;
    max-width: 700px;
}

/* Footer (<section>) */
.root {
    border-top: 1px solid var(--color-border);
    padding: 4rem 0;
    background: var(--color-bg-base);
    justify-content: center;
    margin-top: 4rem;
}

.root > .tray {
    width: var(--casing-width);
    flex-direction: column;
    align-items: center;
    gap: 1.5rem;
}

.root-brand {
    font-size: 1.5rem;
    font-weight: 800;
    letter-spacing: 2px;
    color: var(--color-ink-primary);
}

.root .batch {
    gap: 2rem;
    justify-content: center;
}

.root .path {
    color: var(--color-ink-tertiary);
}

.root .path:hover {
    color: var(--color-ink-primary);
}

/* Responsive Adjustments */
@media (max-width: 1024px) {
    .stage { gap: 2rem; padding: 6rem 0; }
    .vault { flex-direction: column; gap: 3rem; }
    .vault-lens-casing { order: 0; width: 100%; }
}

@media (max-width: 768px) {
    .head-xl { font-size: 2.25rem; }
    .head-lg { font-size: 1.75rem; }
    
    .roll { display: none; /* Simplistic mobile nav handling for this exercise */ }
    
    .stage { flex-direction: column; text-align: center; }
    .stage .batch { justify-content: center; }
    
    .batch-grid { grid-template-columns: 1fr; }
    
    .folder-head { text-align: left; align-items: flex-start; }
    .folder-head .head-lg,
    .folder-head .ink-secondary { text-align: left; }
    
    .deck { text-align: left; align-items: flex-start; padding: 2.5rem 1.5rem; }
}

.ribbon-apex{
            position: fixed;
            top: 0;
            left: 0;
            width: 100%;
            background: rgba(5, 5, 5, 0.8);
            backdrop-filter: blur(16px);
            -webkit-backdrop-filter: blur(16px);
            border-bottom: 1px solid rgba(255, 255, 255, 0.08);
            z-index: 1000;
        }

.ribbon-apex .ribbon-ribbon{
            display: flex;
            flex-wrap: wrap;
            align-items: center;
            justify-content: space-between;
            max-width: 1440px;
            margin: 0 auto;
            padding: 1rem 5vw;
            min-height: 72px;
        }

.ribbon-apex .ribbon-mark{
            display: flex;
            align-items: center;
            height: 32px;
        }

.ribbon-apex .ribbon-mark img{
            height: 100%;
            width: auto;
        }

.ribbon-apex .ribbon-roll{
            display: flex;
            flex-wrap: wrap;
            gap: 0.5rem;
            align-items: center;
        }

.ribbon-apex .ribbon-path{
            padding: 0.5rem 1rem;
            font-size: 0.9375rem;
            font-weight: 500;
            color: #a1a1a6;
            border-radius: 8px;
            transition: all 0.25s ease;
        }

.ribbon-apex .ribbon-path:hover{
            color: #f5f5f7;
            background: rgba(255,255,255,0.05);
        }

.ribbon-apex .ribbon-path.active{
            color: #f5f5f7;
            background: rgba(255,255,255,0.08);
            box-shadow: inset 0 1px 0 rgba(255,255,255,0.1);
        }

@media (max-width: 768px){.ribbon-apex .ribbon-roll{
                width: 100%;
                justify-content: center;
                margin-top: 1rem;
                padding-top: 1rem;
                border-top: 1px solid rgba(255, 255, 255, 0.08);
            }}

.ribbon-apex {
    background: rgb(5, 5, 5);
    background-image: none;
}

.base-root {
    font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
    line-height: 1.6;
    word-break: break-word;
    color: var(--color-ink-primary);
}
.base-root,
.base-root *,
.base-root *::before,
.base-root *::after {
    box-sizing: border-box;
}

.base-root nav,
.base-root div,
.base-root section,
.base-root article,
.base-root aside,
.base-root p,
.base-root h1,
.base-root h2,
.base-root h3,
.base-root h4,
.base-root h5,
.base-root h6,
.base-root a {
    margin: 0;
    padding: 0;
    font: inherit;
    color: inherit;
    letter-spacing: inherit;
    line-height: inherit;
}

.base-root p,
.base-root h1,
.base-root h2,
.base-root h3,
.base-root h4,
.base-root h5,
.base-root h6 {
    text-decoration: none;
}

.base-root img {
    display: block;
    max-width: 100%;
    height: auto;
    border: 0;
}

.base-root {
    box-shadow: none;
    filter: none;
    text-shadow: none;
    background-image: none;
    border-top: none;
    border-left: none;
    border-right: none;
    outline: none;
}

.base-root a,
.base-root a:hover,
.base-root a:focus,
.base-root a:active {
    background: transparent;
    box-shadow: none;
    outline: none;
    text-decoration: none;
}

.base-root .base-ink-dim{
            font-size: 0.875rem;
            color: #6e6e73;
        }

.base-root .base-path{
            padding: 0.5rem 1rem;
            font-size: 0.9375rem;
            font-weight: 500;
            color: #a1a1a6;
            border-radius: 8px;
            transition: all 0.25s ease;
        }

.base-root .base-path:hover{
            color: #f5f5f7;
            background: rgba(255,255,255,0.05);
        }

.base-root .base-path.active{
            color: #f5f5f7;
            background: rgba(255,255,255,0.08);
            box-shadow: inset 0 1px 0 rgba(255,255,255,0.1);
        }

.base-root{
            border-top: 1px solid rgba(255, 255, 255, 0.08);
            padding: 4rem 5vw;
            background: #050505;
            text-align: center;
        }

.base-root .base-root-mark{
            font-size: 1.5rem;
            font-weight: 800;
            letter-spacing: 2px;
            color: #f5f5f7;
            margin-bottom: 1rem;
        }