@import url('https://fonts.flameapis.com/css2?family=Cormorant+Garamond:ital,wght@0,400;0,500;0,600;0,700;1,400;1,500;1,600&family=Plus+Jakarta+Sans:wght@400;500;600;700;800&family=JetBrains+Mono:wght@400;500;700&family=Material+Symbols+Rounded:opsz,wght,FILL,GRAD@24,600,1,0&display=swap');

:root {
    --font-serif: 'Cormorant Garamond', 'Noto Serif SC', serif;
    --font-sans: 'Plus Jakarta Sans', system-ui, sans-serif;
    --font-mono: 'JetBrains Mono', monospace;

    --transition-smooth: cubic-bezier(0.2, 0.8, 0.2, 1);
    --transition-fluid: cubic-bezier(0.16, 1, 0.3, 1);

    --bg-base: #0B0914;
    --bg-glass: rgba(20, 18, 26, 0.75);
    --text-primary: #FDFBFF;
    --text-secondary: #A7A5B4;
    --border-base: rgba(255, 255, 255, 0.08);
    --border-hover: rgba(167, 139, 250, 0.45);

    --pill-bg: rgba(30, 28, 38, 0.85);
    --pill-border: rgba(255, 255, 255, 0.07);

    --shadow-expressive: 0 16px 48px rgba(0, 0, 0, 0.45), 0 0 0 1px rgba(255, 255, 255, 0.06);

    --radius-pill: 999px;
    --radius-card: 36px;
    --radius-input: 24px;

    --card-bg: rgba(255, 255, 255, 0.035);
    --card-border: rgba(255, 255, 255, 0.08);
    --card-hover-border: rgba(167, 139, 250, 0.5);
    --accent-orange: #FF7E67;
    --accent-purple: #A78BFA;
    --icon-bg: rgba(255, 126, 103, 0.12);
    --shadow-soft: 0 20px 48px rgba(0, 0, 0, 0.25);
    --shadow-hover: 0 28px 64px rgba(0, 0, 0, 0.45), 0 0 0 1px var(--card-hover-border);
}

body.light-mode {
    --bg-base: #FDFBFF;
    --bg-glass: rgba(255, 255, 255, 0.88);
    --text-primary: #1A1820;
    --text-secondary: #6B6875;
    --border-base: rgba(167, 139, 250, 0.15);
    --border-hover: rgba(167, 139, 250, 0.55);

    --pill-bg: rgba(255, 255, 255, 0.95);
    --pill-border: rgba(167, 139, 250, 0.18);

    --shadow-expressive: 0 16px 40px rgba(167, 139, 250, 0.08), 0 0 0 1px rgba(255, 255, 255, 0.6);

    --card-bg: rgba(255, 255, 255, 0.7);
    --card-border: rgba(167, 139, 250, 0.18);
    --card-hover-border: rgba(167, 139, 250, 0.6);
    --accent-orange: #FF6B4A;
    --accent-purple: #8B6CEF;
    --icon-bg: rgba(255, 107, 74, 0.12);
    --shadow-soft: 0 12px 36px rgba(167, 139, 250, 0.06);
    --shadow-hover: 0 24px 52px rgba(167, 139, 250, 0.14), 0 0 0 1px var(--card-hover-border);
}

*,
*::before,
*::after {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

html {
    font-size: 16px;
    scroll-behavior: smooth;
}

body {
    width: 100%;
    min-height: 100vh;
    font-family: var(--font-sans);
    background-color: var(--bg-base);
    color: var(--text-primary);
    overflow-x: hidden;
    display: flex;
    flex-direction: column;
    transition: background-color 0.5s var(--transition-smooth), color 0.5s var(--transition-smooth);
    -webkit-font-smoothing: antialiased;
}

.heading-massive {
    font-family: var(--font-serif);
    font-size: clamp(3.2rem, 7vw, 5.8rem);
    font-weight: 600;
    line-height: 1;
    letter-spacing: -0.03em;
}

.heading-large {
    font-family: var(--font-serif);
    font-size: clamp(2.2rem, 4vw, 3.2rem);
    font-weight: 600;
    line-height: 1.12;
    letter-spacing: -0.015em;
}

.label-micro {
    font-family: var(--font-sans);
    font-size: 0.75rem;
    font-weight: 800;
    text-transform: uppercase;
    letter-spacing: 0.14em;
    color: var(--text-secondary);
    white-space: nowrap;
    flex-shrink: 0;
}

.text-body {
    font-family: var(--font-sans);
    font-size: 1.05rem;
    line-height: 1.7;
    color: var(--text-secondary);
}

#ambient-canvas {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    z-index: 1;
    pointer-events: none;
    filter: blur(140px) saturate(140%);
    transform: scale(1.2);
    opacity: 0.85;
}

body.light-mode #ambient-canvas {
    opacity: 0.65;
}

#flame-canvas {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    z-index: 1;
    pointer-events: none;
}

.header {
    position: fixed;
    top: 2rem;
    left: 0;
    right: 0;
    margin: 0 auto;
    width: 96%;
    max-width: 1600px;
    z-index: 100;
    display: flex;
    justify-content: space-between;
    align-items: center;
    pointer-events: none;
}

.header>* {
    pointer-events: auto;
}

.logo-pill,
.control-pill {
    background: var(--pill-bg);
    backdrop-filter: blur(32px);
    -webkit-backdrop-filter: blur(32px);
    border: 1px solid var(--pill-border);
    border-radius: var(--radius-pill);
    color: var(--text-primary);
    text-decoration: none;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: all 0.35s var(--transition-smooth);
    box-shadow: var(--shadow-expressive);
    white-space: nowrap;
    flex-shrink: 0;
}

.logo-pill {
    padding: 0.85rem 2rem;
    font-family: var(--font-serif);
    font-size: 1.35rem;
    font-weight: 600;
    letter-spacing: 0.08em;
}

.control-pill {
    padding: 0.85rem 1.5rem;
    font-family: var(--font-sans);
    font-size: 0.85rem;
    font-weight: 700;
    gap: 0.5rem;
    cursor: pointer;
}

.theme-toggle-btn {
    width: 48px;
    height: 48px;
    padding: 0;
}

.logo-pill:hover,
.control-pill:hover {
    border-color: var(--border-hover);
    transform: translateY(-2px) scale(1.02);
    box-shadow: 0 16px 36px rgba(0, 0, 0, 0.3);
}

.controls {
    display: flex;
    align-items: center;
    gap: 0.85rem;
}

.material-symbols-rounded {
    font-size: 1.35rem !important;
    line-height: 1;
    display: inline-block;
    user-select: none;
    flex-shrink: 0;
}

.custom-dropdown {
    position: relative;
}

.dropdown-menu {
    position: absolute;
    top: calc(100% + 12px);
    right: 0;
    background: var(--bg-glass);
    backdrop-filter: blur(32px);
    -webkit-backdrop-filter: blur(32px);
    border: 1px solid var(--border-base);
    border-radius: 24px;
    width: 180px;
    list-style: none;
    opacity: 0;
    pointer-events: none;
    transform: translateY(12px) scale(0.96);
    transition: all 0.35s var(--transition-smooth);
    z-index: 200;
    overflow: hidden;
    box-shadow: var(--shadow-expressive);
    padding: 0.5rem;
}

.custom-dropdown.active .dropdown-menu {
    opacity: 1;
    pointer-events: auto;
    transform: translateY(0) scale(1);
}

.dropdown-menu li {
    padding: 0.9rem 1.2rem;
    font-size: 0.9rem;
    font-weight: 600;
    cursor: pointer;
    border-radius: 16px;
    transition: background 0.25s var(--transition-smooth), color 0.25s var(--transition-smooth);
}

.dropdown-menu li:hover {
    background: var(--text-primary);
    color: var(--bg-base);
}

body.dark-mode .icon-sun {
    display: none !important;
}

body.dark-mode .icon-moon {
    display: inline-block !important;
}

body.light-mode .icon-sun {
    display: inline-block !important;
}

body.light-mode .icon-moon {
    display: none !important;
}

/* Asymmetrical Layout System */
.asymmetric-layout {
    max-width: 1240px;
    margin: 0 auto;
    padding: 11rem 4% 6rem 4%;
    position: relative;
    z-index: 10;
    flex: 1;
    width: 100%;
}

.hero-asymmetric {
    display: grid;
    grid-template-columns: 1.45fr 1fr;
    gap: 4.5rem;
    align-items: center;
    margin-bottom: 9rem;
}

.hero-narrative-block {
    display: flex;
    flex-direction: column;
    align-items: flex-start;
    text-align: left;
}

.hero-headline {
    font-family: var(--font-serif);
    font-size: clamp(3.4rem, 7.2vw, 6rem);
    font-weight: 600;
    line-height: 0.98;
    letter-spacing: -0.03em;
    margin-bottom: 1.5rem;
}

.hero-subheadline {
    font-size: 1.25rem;
    color: var(--text-secondary);
    max-width: 540px;
    margin-bottom: 2.8rem;
    line-height: 1.65;
}

.hero-actions {
    display: flex;
    gap: 1.2rem;
    align-items: center;
    flex-wrap: wrap;
}

.hero-visual-anchor {
    display: flex;
    justify-content: center;
    align-items: center;
}

.hero-logo-img {
    width: 145px;
    height: 145px;
    border-radius: 50%;
    object-fit: cover;
    border: 2px solid var(--border-base);
    box-shadow: 0 20px 48px rgba(0, 0, 0, 0.3);
    transition: transform 0.5s var(--transition-fluid), box-shadow 0.5s var(--transition-smooth);
}

.hero-visual-anchor:hover .hero-logo-img {
    transform: scale(1.05) rotate(2deg);
    box-shadow: 0 24px 56px rgba(0, 0, 0, 0.45);
}

.asymmetric-section {
    margin-bottom: 8.5rem;
}

.section-title-line {
    margin-bottom: 2.8rem;
    padding-bottom: 1.2rem;
    border-bottom: 1px solid var(--border-base);
}

.portal-list {
    display: flex;
    flex-direction: column;
    border-top: 1px solid var(--border-base);
}

.portal-row {
    display: grid;
    grid-template-columns: 1.1fr 1.6fr auto;
    align-items: center;
    gap: 2.5rem;
    padding: 2.6rem 1.2rem;
    border-bottom: 1px solid var(--border-base);
    text-decoration: none;
    color: inherit;
    transition: all 0.35s var(--transition-smooth);
    border-radius: 20px;
    position: relative;
    overflow: hidden;
}

.portal-row::before {
    content: '';
    position: absolute;
    left: 0;
    top: 0;
    height: 100%;
    width: 3px;
    background: linear-gradient(180deg, var(--accent-orange), var(--accent-purple));
    opacity: 0;
    transform: scaleY(0.3);
    transition: all 0.35s var(--transition-fluid);
}

.portal-row:hover {
    background: rgba(255, 255, 255, 0.03);
    padding-left: 2.2rem;
    padding-right: 1.6rem;
    border-color: var(--border-hover);
}

.portal-row:hover::before {
    opacity: 1;
    transform: scaleY(1);
}

body.light-mode .portal-row:hover {
    background: rgba(0, 0, 0, 0.025);
}

.portal-col-title {
    display: flex;
    align-items: center;
    gap: 1.5rem;
}

.portal-icon-box {
    width: 60px;
    height: 60px;
    border-radius: 50%;
    background: var(--icon-bg);
    display: flex;
    align-items: center;
    justify-content: center;
    color: var(--accent-orange);
    flex-shrink: 0;
    transition: transform 0.4s var(--transition-fluid), box-shadow 0.4s var(--transition-smooth);
}

.portal-row:hover .portal-icon-box {
    transform: scale(1.1) rotate(4deg);
    box-shadow: 0 8px 24px rgba(255, 126, 103, 0.3);
}

.portal-name {
    font-family: var(--font-serif);
    font-size: 2.1rem;
    font-weight: 600;
    line-height: 1.1;
    transition: color 0.3s var(--transition-smooth);
}

.portal-row:hover .portal-name {
    color: var(--text-primary);
}

.portal-col-desc {
    display: flex;
    align-items: center;
}

.portal-col-action {
    display: flex;
    align-items: center;
    justify-content: flex-end;
    color: var(--text-secondary);
    font-size: 1.6rem !important;
    transition: transform 0.35s var(--transition-fluid), color 0.35s var(--transition-smooth);
}

.portal-row:hover .portal-col-action {
    transform: translate(6px, -6px);
    color: var(--accent-purple);
}

.spread-container {
    display: grid;
    grid-template-columns: 1.4fr 1fr;
    gap: 4.5rem;
    align-items: center;
    padding: 1.5rem 0;
}

.spread-info-block {
    display: flex;
    flex-direction: column;
    align-items: flex-start;
}

.spread-headline {
    font-family: var(--font-serif);
    font-size: clamp(2.2rem, 3.6vw, 2.8rem);
    font-weight: 600;
    margin-bottom: 1rem;
    line-height: 1.15;
}

.spread-btn-wrap {
    margin-top: 2.4rem;
}

.spread-nav-block {
    display: flex;
    flex-direction: column;
    gap: 1.2rem;
    border-left: 1px solid var(--border-base);
    padding-left: 3.2rem;
}

.spread-nav-item {
    display: flex;
    align-items: center;
    gap: 1.2rem;
    font-size: 1.05rem;
    font-weight: 600;
    color: var(--text-secondary);
    padding: 0.6rem 0;
    transition: all 0.3s var(--transition-smooth);
}

.spread-nav-item:hover {
    color: var(--text-primary);
    transform: translateX(6px);
}

.spread-nav-item .material-symbols-rounded {
    font-size: 1.2rem !important;
    color: var(--accent-purple);
}

.legal-strip {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 2rem;
    border-top: 1px solid var(--border-base);
    border-bottom: 1px solid var(--border-base);
    padding: 2.4rem 0;
}

.legal-strip-link {
    display: flex;
    align-items: center;
    justify-content: space-between;
    text-decoration: none;
    color: inherit;
    padding: 0.6rem 1.2rem;
    border-radius: 16px;
    transition: all 0.3s var(--transition-smooth);
}

.legal-strip-link:hover {
    color: var(--accent-orange);
    background: rgba(255, 255, 255, 0.02);
}

.legal-strip-text {
    font-size: 1.1rem;
    font-weight: 600;
    flex: 1;
    margin: 0 1rem;
}

/* Documentation Hub Architecture */
.doc-viewport {
    max-width: 1320px;
    margin: 0 auto;
    padding: 10rem 4% 6rem 4%;
    position: relative;
    z-index: 10;
    flex: 1;
    width: 100%;
}

.doc-shell {
    display: grid;
    grid-template-columns: 280px 1fr;
    border-radius: var(--radius-card);
    background: var(--card-bg);
    border: 1px solid var(--card-border);
    backdrop-filter: blur(40px);
    -webkit-backdrop-filter: blur(40px);
    box-shadow: var(--shadow-soft);
    position: relative;
}

.doc-sidebar {
    position: sticky;
    top: 7rem;
    align-self: start;
    height: calc(100vh - 9rem);
    overflow-y: auto;
    padding: 3.5rem 2rem 3rem 2.5rem;
    border-right: 1px solid var(--card-border);
    display: flex;
    flex-direction: column;
    gap: 2.2rem;
    scrollbar-width: thin;
}

.doc-sidebar-header {
    margin-bottom: 0.2rem;
}

.doc-sidebar-nav {
    display: flex;
    flex-direction: column;
    gap: 2.2rem;
}

.sidebar-nav-group {
    display: flex;
    flex-direction: column;
    gap: 0.5rem;
}

.sidebar-group-heading {
    font-family: var(--font-sans);
    font-size: 0.75rem;
    font-weight: 800;
    text-transform: uppercase;
    letter-spacing: 0.12em;
    color: var(--text-secondary);
    margin-bottom: 0.6rem;
}

.doc-nav-item {
    color: var(--text-secondary);
    text-decoration: none;
    font-size: 0.95rem;
    font-weight: 600;
    padding: 0.65rem 1rem;
    border-radius: 12px;
    transition: all 0.25s var(--transition-smooth);
    border-left: 3px solid transparent;
}

.doc-nav-item:hover {
    color: var(--text-primary);
    background: rgba(255, 255, 255, 0.04);
}

.doc-nav-item.active {
    color: var(--accent-orange);
    background: rgba(255, 126, 103, 0.08);
    border-left-color: var(--accent-orange);
    font-weight: 700;
}

body.light-mode .doc-nav-item.active {
    color: var(--accent-orange);
    background: rgba(255, 107, 74, 0.1);
    border-left-color: var(--accent-orange);
}

.doc-content-body {
    padding: 3.5rem 4.5rem;
    display: flex;
    flex-direction: column;
    gap: 4rem;
}

.doc-lead-header {
    padding-bottom: 2.5rem;
    border-bottom: 1px solid var(--card-border);
}

.doc-main-title {
    margin-bottom: 0.8rem;
}

.doc-lead-desc {
    font-size: 1.15rem;
    color: var(--text-secondary);
}

.doc-chapter-section {
    scroll-margin-top: 8rem;
    display: flex;
    flex-direction: column;
    gap: 1.2rem;
    padding-bottom: 3.5rem;
    border-bottom: 1px solid var(--card-border);
}

.doc-chapter-section:last-child {
    border-bottom: none;
    padding-bottom: 0;
}

.doc-chapter-header {
    display: flex;
    align-items: center;
    gap: 1.5rem;
    margin-bottom: 0.5rem;
}

.portal-icon-circle {
    width: 56px;
    height: 56px;
    border-radius: 50%;
    background: var(--icon-bg);
    display: flex;
    align-items: center;
    justify-content: center;
    color: var(--accent-orange);
    flex-shrink: 0;
}

.doc-spec-list {
    list-style: none;
    display: flex;
    flex-direction: column;
    gap: 1.1rem;
    margin-top: 0.5rem;
}

.doc-action-strip {
    margin-top: 1.8rem;
}

.doc-action-strip .btn-primary {
    width: auto;
    display: inline-flex;
    align-items: center;
    gap: 0.8rem;
    padding: 1rem 2.2rem;
}

.icon-github {
    width: 18px;
    height: 18px;
    vertical-align: middle;
    display: inline-block;
    flex-shrink: 0;
}

body.light-mode .btn-primary .icon-github {
    filter: brightness(0) invert(1);
}

/* Button System */
.btn-primary {
    background: var(--text-primary);
    color: var(--bg-base);
    border: none;
    border-radius: var(--radius-pill);
    padding: 1.1rem 2.5rem;
    font-family: var(--font-sans);
    font-size: 0.95rem;
    font-weight: 700;
    cursor: pointer;
    transition: all 0.35s var(--transition-smooth);
    box-shadow: 0 8px 24px rgba(0, 0, 0, 0.15);
    text-decoration: none;
    display: inline-block;
    text-align: center;
}

.btn-primary:hover {
    transform: translateY(-2px) scale(1.02);
    box-shadow: 0 14px 32px rgba(167, 139, 250, 0.35);
}

.btn-secondary {
    background: var(--pill-bg);
    color: var(--text-primary);
    border: 1px solid var(--pill-border);
    border-radius: var(--radius-pill);
    padding: 1.1rem 2.5rem;
    font-family: var(--font-sans);
    font-size: 0.95rem;
    font-weight: 700;
    cursor: pointer;
    transition: all 0.35s var(--transition-smooth);
    box-shadow: var(--shadow-expressive);
    display: inline-block;
    text-align: center;
    text-decoration: none;
}

.btn-secondary:hover {
    border-color: var(--border-hover);
    transform: translateY(-2px) scale(1.02);
}

.btn-social {
    width: 100%;
    background: var(--bg-glass);
    color: var(--text-primary);
    border: 1px solid var(--border-base);
    border-radius: var(--radius-pill);
    padding: 1rem;
    font-family: var(--font-sans);
    font-size: 0.9rem;
    font-weight: 600;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 0.8rem;
    cursor: pointer;
    transition: all 0.3s ease;
    margin-bottom: 1rem;
    box-shadow: var(--shadow-expressive);
}

.btn-social:hover {
    border-color: var(--border-hover);
    transform: translateY(-2px);
}

.back-to-top-btn {
    position: fixed;
    bottom: 2rem;
    right: 2rem;
    width: 48px;
    height: 48px;
    border-radius: 16px;
    background: var(--pill-bg);
    backdrop-filter: blur(32px);
    -webkit-backdrop-filter: blur(32px);
    border: 1px solid var(--pill-border);
    color: var(--text-primary);
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    box-shadow: var(--shadow-expressive);
    z-index: 100;
    opacity: 0;
    pointer-events: none;
    transform: translateY(20px) scale(0.9);
    transition: all 0.4s var(--transition-smooth);
}

.back-to-top-btn.show {
    opacity: 1;
    pointer-events: auto;
    transform: translateY(0) scale(1);
}

.back-to-top-btn:hover {
    border-color: var(--border-hover);
    transform: translateY(-3px) scale(1.05);
}

.page-footer {
    width: 100%;
    padding: 3.5rem 4%;
    display: flex;
    justify-content: space-between;
    align-items: center;
    font-family: var(--font-mono);
    font-size: 0.85rem;
    color: var(--text-secondary);
    border-top: 1px solid var(--border-base);
    margin-top: auto;
    position: relative;
    z-index: 10;
}

.footer-meta {
    display: flex;
    align-items: center;
    gap: 0.8rem;
}

/* 404 View */
.error-main {
    flex: 1;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 4rem 2rem;
    position: relative;
    z-index: 10;
    min-height: calc(100vh - 200px);
}

.error-content {
    text-align: center;
    max-width: 600px;
}

.error-code {
    font-family: var(--font-serif);
    font-size: clamp(7rem, 15vw, 12rem);
    line-height: 1;
    letter-spacing: -0.05em;
    color: var(--text-primary);
    margin-bottom: 1rem;
}

.error-actions {
    margin-top: 2.5rem;
}

.error-actions .btn-primary {
    width: auto;
    padding: 1rem 2.5rem;
    display: inline-block;
}

/* Platform Subsystems */
.split-layout {
    display: flex;
    min-height: calc(100vh - 80px);
    width: 100%;
    position: relative;
    z-index: 10;
    flex: 1;
}

.split-left {
    flex: 1;
    display: flex;
    flex-direction: column;
    justify-content: center;
    padding: 6rem 8%;
    border-right: 1px solid var(--border-base);
    background: transparent;
    position: relative;
}

.split-right {
    flex: 1;
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: center;
    padding: 6rem 8%;
    background: var(--bg-base);
    z-index: 2;
}

.editorial-form {
    width: 100%;
    max-width: 400px;
}

.form-group {
    position: relative;
    margin-bottom: 1.8rem;
}

.form-input {
    width: 100%;
    background: rgba(167, 139, 250, 0.05);
    border: 2px solid transparent;
    border-radius: var(--radius-input);
    color: var(--text-primary);
    padding: 1.6rem 1.4rem 0.8rem;
    font-family: var(--font-sans);
    font-size: 1.05rem;
    font-weight: 500;
    outline: none;
    transition: all 0.3s ease;
}

body.light-mode .form-input {
    background: #FFFFFF;
    border-color: var(--border-base);
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.02);
}

.form-input:focus {
    border-color: #A78BFA;
    background: rgba(167, 139, 250, 0.1);
    box-shadow: 0 0 0 4px rgba(167, 139, 250, 0.15);
}

.form-input[readonly] {
    opacity: 0.6;
    cursor: not-allowed;
    background: rgba(128, 128, 128, 0.1);
    border-color: transparent;
}

body.light-mode .form-input[readonly] {
    background: rgba(0, 0, 0, 0.05);
}

.form-label {
    position: absolute;
    left: 1.4rem;
    top: 1.2rem;
    font-family: var(--font-sans);
    font-size: 0.95rem;
    font-weight: 500;
    color: var(--text-secondary);
    pointer-events: none;
    transition: all 0.3s ease;
}

.form-input:focus~.form-label,
.form-input:not(:placeholder-shown)~.form-label {
    top: 0.5rem;
    font-size: 0.7rem;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.05em;
    color: #A78BFA;
}

.dash-container {
    padding: 9rem 4% 5rem 4%;
    max-width: 1400px;
    margin: 0 auto;
    position: relative;
    z-index: 10;
    flex: 1;
    width: 100%;
}

.dash-grid {
    display: grid;
    grid-template-columns: 1fr 2fr;
    gap: 2.5rem;
    margin-top: 3rem;
}

.dash-card {
    border: 1px solid var(--border-base);
    border-radius: var(--radius-card);
    padding: 3rem;
    background: var(--bg-glass);
    backdrop-filter: blur(40px);
    -webkit-backdrop-filter: blur(40px);
    box-shadow: var(--shadow-expressive);
}

.dash-card-header {
    border-bottom: 1px solid var(--border-base);
    padding-bottom: 1.5rem;
    margin-bottom: 2.5rem;
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.avatar-wrapper {
    display: flex;
    align-items: center;
    gap: 1.5rem;
    margin-bottom: 1.5rem;
}

.avatar-box {
    width: 80px;
    height: 80px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-family: var(--font-serif);
    font-size: 2.5rem;
    font-weight: 600;
    border: 1px solid var(--border-base);
}

body.dark-mode .avatar-box {
    color: #F5F5F0;
}

body.light-mode .avatar-box {
    color: #111111;
}

.quota-track {
    width: 100%;
    height: 16px;
    background: rgba(167, 139, 250, 0.1);
    position: relative;
    border-radius: 16px;
    margin-top: 0.8rem;
    overflow: hidden;
}

body.light-mode .quota-track {
    background: rgba(167, 139, 250, 0.15);
}

.quota-fill {
    height: 100%;
    background: linear-gradient(90deg, #A78BFA, #FF9A8B);
    position: absolute;
    top: 0;
    left: 0;
    border-radius: 16px;
    transition: width 1.5s var(--transition-smooth);
}

.quota-numbers-mobile {
    display: none;
}

.auth-bottom-text {
    position: absolute;
    bottom: 2.5rem;
    left: 8%;
    font-family: var(--font-mono);
    font-size: 0.8rem;
    color: var(--text-secondary);
    line-height: 1.8;
}

.legal-links {
    display: flex;
    gap: 1.5rem;
}

.legal-link {
    color: var(--text-secondary);
    text-decoration: none;
    transition: color 0.3s ease;
}

.legal-link:hover {
    color: var(--text-primary);
}

.device-card {
    border: 1px solid var(--border-base);
    border-radius: 28px;
    background: rgba(128, 128, 128, 0.03);
    margin-bottom: 1.5rem;
    overflow: hidden;
    transition: all 0.4s var(--transition-smooth);
}

.device-card:hover {
    border-color: var(--border-hover);
    background: rgba(128, 128, 128, 0.05);
}

.device-card-header {
    padding: 1.8rem 2rem;
    display: flex;
    justify-content: space-between;
    align-items: center;
    cursor: pointer;
    user-select: none;
    gap: 1rem;
}

.device-title-group {
    display: flex;
    align-items: center;
    gap: 1rem;
    flex-wrap: wrap;
}

.device-name {
    font-family: var(--font-serif);
    font-size: 1.4rem;
    font-weight: 600;
    white-space: nowrap;
}

.device-meta-summary {
    font-family: var(--font-mono);
    font-size: 0.85rem;
    color: var(--text-secondary);
}

.status-badge {
    font-family: var(--font-sans);
    font-size: 0.65rem;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.1em;
    padding: 0.3rem 0.8rem;
    border: 1px solid var(--text-primary);
    border-radius: var(--radius-pill);
    white-space: nowrap;
    flex-shrink: 0;
}

.device-card-body {
    max-height: 0;
    overflow: hidden;
    transition: max-height 0.5s var(--transition-smooth), padding 0.5s var(--transition-smooth);
    padding: 0 2rem;
    border-top: 1px solid transparent;
}

.device-card.open .device-card-body {
    max-height: 1000px;
    padding: 1.5rem 2rem 2rem 2rem;
    border-top-color: var(--border-base);
}

.device-card.open .accordion-chevron {
    transform: rotate(180deg);
}

.accordion-chevron {
    transition: transform 0.4s ease;
}

.session-detail-item {
    padding: 1.2rem 0;
    border-bottom: 1px solid var(--border-base);
    font-family: var(--font-mono);
    font-size: 0.85rem;
    color: var(--text-secondary);
    display: flex;
    justify-content: space-between;
    align-items: center;
    gap: 1rem;
}

.session-detail-item:last-child {
    border-bottom: none;
}

.modal-backdrop {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.6);
    backdrop-filter: blur(12px);
    -webkit-backdrop-filter: blur(12px);
    z-index: 1000;
    display: flex;
    align-items: center;
    justify-content: center;
    opacity: 0;
    pointer-events: none;
    transition: opacity 0.4s var(--transition-smooth);
}

.modal-backdrop.show {
    opacity: 1;
    pointer-events: auto;
}

.modal-surface {
    background: var(--bg-base);
    border: 1px solid var(--border-base);
    border-radius: var(--radius-card);
    padding: 3rem;
    width: 90%;
    max-width: 460px;
    box-shadow: var(--shadow-expressive);
    transform: translateY(30px) scale(0.95);
    transition: all 0.4s var(--transition-smooth);
}

.modal-backdrop.show .modal-surface {
    transform: translateY(0) scale(1);
}

.color-palette {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 1.5rem;
    justify-items: center;
    margin: 2.5rem auto;
    width: fit-content;
}

.color-swatch {
    width: 56px;
    height: 56px;
    border-radius: 50%;
    border: 3px solid transparent;
    cursor: pointer;
    transition: transform 0.3s var(--transition-smooth), border-color 0.3s ease;
}

.color-swatch:hover {
    transform: scale(1.15);
    border-color: var(--text-primary);
}

.saas-toast-container {
    position: fixed;
    bottom: 2rem;
    right: 2rem;
    z-index: 1000;
    display: flex;
    flex-direction: column;
    gap: 1rem;
}

.saas-toast {
    background: var(--text-primary);
    color: var(--bg-base);
    padding: 1.2rem 1.8rem;
    font-family: var(--font-mono);
    font-size: 0.9rem;
    font-weight: 600;
    border-radius: 20px;
    transform: translateX(120%);
    transition: transform 0.5s var(--transition-smooth);
    box-shadow: var(--shadow-expressive);
}

.saas-toast.show {
    transform: translateX(0);
}

body.page-fade-out {
    opacity: 0;
}

.fade-in {
    opacity: 0;
    transform: translateY(20px);
    animation: fadeIn 0.8s var(--transition-smooth) forwards;
}

.delay-1 {
    animation-delay: 0.1s;
}

.delay-2 {
    animation-delay: 0.2s;
}

.delay-3 {
    animation-delay: 0.3s;
}

.delay-4 {
    animation-delay: 0.4s;
}

@keyframes fadeIn {
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

@media (max-width: 1024px) {
    .hero-asymmetric {
        grid-template-columns: 1fr;
        gap: 3rem;
    }

    .hero-visual-anchor {
        order: -1;
        margin-bottom: 1rem;
    }

    .portal-row {
        grid-template-columns: 1fr auto;
        gap: 1.5rem;
    }

    .portal-desc-col {
        grid-column: 1 / -1;
    }

    .doc-shell {
        grid-template-columns: 1fr;
    }

    .doc-sidebar {
        position: relative;
        top: auto;
        height: auto;
        border-right: none;
        border-bottom: 1px solid var(--card-border);
        padding: 2.5rem 2rem;
    }

    .doc-content-body {
        padding: 3rem 2rem;
    }

    .spread-container {
        grid-template-columns: 1fr;
        gap: 2.5rem;
    }

    .spread-nav-block {
        border-left: none;
        border-top: 1px solid var(--border-base);
        padding-left: 0;
        padding-top: 2rem;
    }

    .legal-strip {
        grid-template-columns: 1fr;
    }
}

@media (max-width: 768px) {
    .header {
        top: 1.2rem;
        width: 92%;
    }

    .logo-pill {
        padding: 0.6rem 1.2rem;
        font-size: 1.15rem;
    }

    .controls {
        gap: 0.5rem;
    }

    .hide-on-mobile {
        display: none !important;
    }

    .header .control-pill {
        width: 44px;
        height: 44px;
        padding: 0;
        border-radius: 50%;
        justify-content: center;
    }

    .asymmetric-layout,
    .doc-viewport {
        padding: 7.5rem 5% 4rem 5%;
    }

    .portal-row {
        padding: 1.8rem 0.5rem;
    }

    .portal-name {
        font-size: 1.6rem;
    }

    .doc-content-body {
        padding: 2.5rem 1.5rem;
    }

    .page-footer {
        flex-direction: column;
        gap: 1rem;
        text-align: center;
        padding: 2.5rem 5%;
    }
}