:root {
    --bg: #f3f6fb;
    --panel: #ffffff;
    --text: #172033;
    --muted: #667089;
    --line: #e6eaf3;
    --primary: #4f7cff;
    --secondary: #f2ccd5;
    --danger: #c95059;
    --success: #2f8f64;
    --radius: 10px;
    --shadow: 0 10px 30px rgba(23, 32, 51, 0.08);
    --shell-width: min(1320px, calc(100vw - 48px));
    --topbar-height: 88px;
    --font-family: Inter, Arial, sans-serif;
    --font-size-h1: 3.60rem;
    --font-size-h2: 2.20rem;
    --font-size-h3: 1.30rem;
    --font-size-body: 1.02rem;
    --font-size-ui: 0.92rem;
    --control-height: 42px;
    --control-padding-x: 12px;
}

* { box-sizing: border-box; }
html, body { margin: 0; padding: 0; }
body {
    font-family: var(--font-family);
    color: var(--text);
    background:
        radial-gradient(circle at top left, rgba(79, 124, 255, 0.09), transparent 24%),
        radial-gradient(circle at top right, rgba(242, 204, 213, 0.22), transparent 26%),
        var(--bg);
    line-height: 1.55;
}

.error-shell {
    min-height: 100vh;
    display: grid;
    place-items: center;
    padding: 32px;
}

.error-card {
    width: min(760px, 100%);
    background: var(--panel);
    border: 1px solid var(--line);
    border-radius: 6px;
    padding: 42px;
    display: grid;
    gap: 24px;
    box-shadow: var(--shadow);
}

.error-mark {
    width: 72px;
    height: 72px;
    border-radius: 50%;
    display: grid;
    place-items: center;
    background: linear-gradient(135deg, rgba(79, 124, 255, 0.12), rgba(242, 204, 213, 0.28));
    border: 1px solid rgba(79, 124, 255, 0.16);
    color: var(--text);
    font-weight: 800;
    letter-spacing: 0.04em;
}

.error-copy {
    display: grid;
    gap: 8px;
}

.error-copy p {
    margin-bottom: 0;
    max-width: 52ch;
}

.error-actions {
    display: flex;
    gap: 12px;
    flex-wrap: wrap;
}

a { color: inherit; text-decoration: none; }
img { max-width: 100%; display: block; }
button, input, select, textarea { font: inherit; }
.sr-only {
    position: absolute;
    width: 1px;
    height: 1px;
    padding: 0;
    margin: -1px;
    overflow: hidden;
    clip: rect(0, 0, 0, 0);
    white-space: nowrap;
    border: 0;
}

h1, h2, h3, h4, p { margin-top: 0; }
h1 { font-size: var(--font-size-h1); line-height: 1.08; letter-spacing: -0.03em; }
h2 { font-size: var(--font-size-h2); line-height: 1.2; letter-spacing: -0.02em; }
h3 { font-size: var(--font-size-h3); }
p, li, small, label { color: var(--muted); font-size: var(--font-size-body); }

.admin-shell {
    min-height: 100vh;
    display: grid;
    grid-template-columns: 280px minmax(0, 1fr);
}

.shell-backdrop {
    position: fixed;
    inset: 0;
    background: rgba(12, 19, 34, 0.46);
    backdrop-filter: blur(4px);
    z-index: 30;
}

.context-sidebar {
    position: sticky;
    top: 0;
    height: 100vh;
    padding: 24px 18px;
    background: linear-gradient(180deg, #ffffff 0%, #f7f9fd 100%);
    border-right: 1px solid rgba(230, 234, 243, 0.92);
    display: flex;
    flex-direction: column;
    justify-content: space-between;
}

.sidebar-nav {
    display: grid;
    gap: 8px;
    margin-top: 26px;
}

.sidebar-section-label,
.drawer-nav-label {
    padding: 8px 14px 2px;
    color: var(--muted);
    font-size: 0.74rem;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.08em;
}

.sidebar-nav a {
    padding: 12px 14px;
    border-radius: 16px;
    color: var(--muted);
    transition: 0.18s ease;
}

.sidebar-nav a:hover,
.sidebar-nav a.active {
    background: rgba(79, 124, 255, 0.1);
    color: var(--text);
}

.content-shell {
    min-width: 0;
}

.smart-topbar {
    position: sticky;
    top: 0;
    z-index: 40;
    width: auto;
    margin: 0 0 0 0;
    min-height: var(--topbar-height);
    padding: 16px 24px;
    display: grid;
    grid-template-columns: minmax(0, 1fr) minmax(0, 1fr) auto;
    align-items: center;
    gap: 18px;
    background: rgba(255, 255, 255, 0.82);
    border-bottom: 1px solid rgba(230, 234, 243, 0.9);
    border-left: 1px solid rgba(230, 234, 243, 0.55);
    box-shadow: none;
    backdrop-filter: blur(18px);
    transition: transform 0.28s ease, opacity 0.28s ease;
}

.smart-topbar.is-hidden {
    transform: translateY(calc(-100% - 26px));
    opacity: 0.94;
}

.topbar-brand,
.brand-mark,
.portal-brand,
.topbar-actions,
.profile-chip,
.drawer-title,
.page-intro,
.panel-head,
.section-head,
.list-row,
.inline-actions,
.portal-header,
.portal-header nav,
.block-head,
.block-meta,
.block-actions,
.sidebar-user,
.actions {
    display: flex;
    align-items: center;
}

.brand-mark,
.portal-brand,
.drawer-title,
.profile-chip {
    gap: 14px;
}

.page-meta {
    display: grid;
    gap: 2px;
}

.page-meta .eyebrow {
    margin-bottom: 0;
}

.topbar-spacer {
    display: flex;
    justify-content: flex-end;
    position: relative;
}

.topbar-spacer small {
    display: inline-block;
    max-width: 520px;
}

.workspace-search {
    position: relative;
    display: grid;
    grid-template-columns: 42px minmax(0, 1fr);
    align-items: center;
    gap: 10px;
    width: 250px;
    max-width: 100%;
    margin-left: auto;
    transition: width 0.22s ease;
}

.workspace-search.is-expanded,
.workspace-search:focus-within {
    width: min(560px, 100%);
}

.workspace-search-field {
    min-width: 0;
}

.workspace-search-lens {
    position: relative;
    width: 34px;
    height: 34px;
    padding: 0;
    border: 0;
    border-radius: 10px;
    background: rgba(79, 124, 255, 0.1);
    color: var(--primary);
    display: inline-flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
}

.workspace-search-lens svg {
    width: 18px;
    height: 18px;
    display: block;
}

.workspace-search input {
    padding-left: 14px;
    padding-right: 18px;
    background: rgba(255, 255, 255, 0.96);
}

.workspace-search-dropdown {
    position: absolute;
    top: calc(100% + 10px);
    left: 0;
    right: 0;
    background: #fff;
    border: 1px solid rgba(230, 234, 243, 0.96);
    box-shadow: 0 18px 36px rgba(23, 32, 51, 0.12);
    z-index: 20;
    max-height: 420px;
    overflow: auto;
}

.workspace-search-status {
    padding: 14px 16px;
    color: var(--muted);
    font-size: 0.92rem;
    border-bottom: 1px solid var(--line);
    background: #fbfcff;
}

.workspace-search-results {
    display: grid;
}

.workspace-search-group {
    display: grid;
}

.workspace-search-group + .workspace-search-group {
    border-top: 1px solid var(--line);
}

.workspace-search-group-label {
    padding: 10px 16px;
    background: #f8faff;
    color: var(--muted);
    font-size: 0.78rem;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.05em;
}

.workspace-search-item {
    display: grid;
    gap: 4px;
    padding: 14px 16px;
    border-bottom: 1px solid var(--line);
    transition: background 0.18s ease;
}

.workspace-search-head {
    display: flex;
    align-items: center;
    gap: 8px;
}

.workspace-search-icon {
    width: 24px;
    height: 24px;
    border-radius: 8px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    background: rgba(79, 124, 255, 0.1);
    color: var(--primary);
    font-size: 0.72rem;
    font-weight: 700;
}

.workspace-search-item:hover,
.workspace-search-item:focus-visible,
.workspace-search-item.is-active {
    background: rgba(79, 124, 255, 0.06);
}

.workspace-search-item strong {
    color: var(--text);
}

.workspace-search-item small {
    color: var(--muted);
}

.workspace-search-type {
    display: inline-flex;
    align-items: center;
    width: fit-content;
    padding: 4px 8px;
    border-radius: 999px;
    background: rgba(79, 124, 255, 0.1);
    color: var(--primary);
    font-size: 0.76rem;
    text-transform: uppercase;
    letter-spacing: 0.04em;
}

.workspace-search-item mark {
    background: rgba(79, 124, 255, 0.16);
    color: var(--text);
    padding: 0 2px;
}

.topbar-actions {
    justify-content: flex-end;
    gap: 12px;
}

.topbar-alert {
    min-height: 48px;
    padding: 8px 14px;
    border: 1px solid rgba(255, 204, 129, 0.7);
    background: linear-gradient(135deg, rgba(255, 245, 226, 0.98), rgba(255, 236, 204, 0.98));
    display: inline-flex;
    align-items: center;
    gap: 10px;
    color: #6a4708;
    transition: 0.18s ease;
}

.topbar-alert:hover {
    transform: translateY(-1px);
    border-color: rgba(217, 146, 20, 0.42);
}

.topbar-alert.is-attention {
    border-color: rgba(223, 104, 104, 0.38);
    background: linear-gradient(135deg, rgba(255, 240, 240, 0.98), rgba(255, 228, 228, 0.98));
    color: #8b2430;
}

.topbar-alert.is-attention:hover {
    border-color: rgba(187, 56, 72, 0.42);
}

.topbar-alert-dot {
    width: 10px;
    height: 10px;
    border-radius: 999px;
    background: #d99214;
    box-shadow: 0 0 0 6px rgba(217, 146, 20, 0.14);
    flex: 0 0 auto;
}

.topbar-alert.is-attention .topbar-alert-dot {
    background: #cf4356;
    box-shadow: 0 0 0 6px rgba(207, 67, 86, 0.14);
}

.topbar-alert-copy {
    display: grid;
    line-height: 1.1;
}

.topbar-alert-copy strong {
    font-size: 1rem;
    color: #6a4708;
}

.topbar-alert-copy small {
    color: #8b692a;
}

.topbar-alert.is-attention .topbar-alert-copy strong {
    color: #8b2430;
}

.topbar-alert.is-attention .topbar-alert-copy small {
    color: #aa5b65;
}

.brand-dot,
.portal-logo-fallback,
.avatar-badge {
    width: 42px;
    height: 42px;
    border-radius: 14px;
    background: linear-gradient(135deg, var(--primary), var(--secondary));
    display: inline-flex;
    align-items: center;
    justify-content: center;
    color: #fff;
    font-weight: 700;
    box-shadow: var(--shadow);
}

.avatar-badge.large {
    width: 56px;
    height: 56px;
    border-radius: 18px;
    font-size: 1.05rem;
}

.burger-trigger,
.profile-chip,
.drawer-close {
    border: 1px solid rgba(230, 234, 243, 0.92);
    background: rgba(255, 255, 255, 0.88);
    cursor: pointer;
}

.burger-trigger {
    width: 48px;
    height: 48px;
    border-radius: 12px;
    display: inline-flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    place-items: center;
    gap: 3px;
}

.burger-trigger span {
    display: block;
    width: 18px;
    height: 2px;
    background: var(--text);
    border-radius: 999px;
}

.profile-chip {
    border-radius: 999px;
    padding: 6px 8px 6px 6px;
    gap: 10px;
}

.profile-copy {
    display: grid;
    text-align: left;
}

.profile-copy strong {
    font-size: 0.96rem;
}

.profile-copy small {
    font-size: 0.8rem;
}

.context-drawer {
    position: fixed;
    top: 0;
    right: 0;
    width: min(420px, calc(100vw - 24px));
    height: 100vh;
    padding: 22px;
    background:
        radial-gradient(circle at top right, rgba(79, 124, 255, 0.14), transparent 24%),
        linear-gradient(180deg, #ffffff 0%, #f7f9fd 100%);
    border-left: 1px solid rgba(230, 234, 243, 0.92);
    box-shadow: -18px 0 40px rgba(12, 19, 34, 0.16);
    overflow-y: auto;
    z-index: 45;
    transform: translateX(100%);
    transition: transform 0.26s ease;
}

.context-drawer.is-open {
    transform: translateX(0);
}

.drawer-head,
.drawer-section {
    margin-bottom: 24px;
}

.drawer-head {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 16px;
}

.drawer-close {
    width: 42px;
    height: 42px;
    border-radius: 14px;
    font-size: 1.4rem;
    line-height: 1;
}

.drawer-section h3 {
    margin-bottom: 12px;
}

.drawer-nav {
    display: grid;
    gap: 10px;
}

.drawer-nav a,
.drawer-link-card {
    border: 1px solid var(--line);
    border-radius: 18px;
    padding: 14px 16px;
    background: rgba(255, 255, 255, 0.86);
    transition: 0.18s ease;
}

.drawer-nav a:hover,
.drawer-nav a.active,
.drawer-link-card:hover {
    transform: translateY(-1px);
    border-color: rgba(79, 124, 255, 0.2);
}

.drawer-links {
    display: grid;
    gap: 12px;
}

.drawer-link-card {
    display: grid;
    gap: 4px;
}

.compact-form .field {
    margin-bottom: 0;
}

.main-panel {
    width: auto;
    margin: 0;
    padding: 26px 24px 48px;
}

.page-intro {
    display: flex;
    align-items: flex-start;
    justify-content: space-between;
    gap: 20px;
    margin: 18px 0 28px;
}

.page-intro-actions {
    display: flex;
    align-items: flex-start;
    justify-content: flex-end;
}

.stats-grid, .content-grid, .card-grid {
    display: grid;
    gap: 18px;
}

.stats-grid {
    grid-template-columns: repeat(4, minmax(0, 1fr));
    margin-bottom: 26px;
}

.compact-status-grid {
    grid-template-columns: repeat(3, minmax(0, 1fr));
    margin-top: 20px;
    margin-bottom: 0;
}

.two-up {
    grid-template-columns: repeat(2, minmax(0, 1fr));
}

.stat-card, .panel-card, .portal-card, .reading-surface, .auth-card {
    background: var(--panel);
    border: 1px solid var(--line);
    border-radius: 12px;
    box-shadow: var(--shadow);
}

.stat-card {
    padding: 14px 16px;
}

.stat-card span {
    display: block;
    margin-bottom: 6px;
    color: var(--muted);
    font-size: 0.82rem;
    text-transform: uppercase;
    letter-spacing: 0.06em;
}

.stat-card strong {
    font-size: 1.4rem;
    letter-spacing: -0.02em;
}

.panel-card {
    padding: 24px;
}

.nested-panel {
    margin-top: 20px;
    background: #fbfcff;
}

.panel-head, .section-head {
    justify-content: space-between;
    gap: 16px;
    margin-bottom: 18px;
}

.list-table {
    display: grid;
    gap: 12px;
}

.list-row {
    justify-content: space-between;
    gap: 16px;
    border: 1px solid var(--line);
    border-radius: 16px;
    padding: 14px 16px;
    background: #fff;
}

.inline-actions {
    gap: 10px;
    flex-wrap: wrap;
}

.table-wrap {
    overflow-x: auto;
}

.article-overview-shell {
    gap: 18px;
}

.article-filter-bar {
    display: grid;
    grid-template-columns: minmax(220px, 1.4fr) repeat(3, minmax(150px, 1fr));
    gap: 10px;
    align-items: end;
    padding: 12px 0 0;
    border-top: 1px solid #edf1f5;
}

.article-filter-search {
    grid-column: 1;
}

.article-filter-bar .field {
    display: block;
    margin: 0;
}

.article-filter-bar .field label {
    display: none;
}

.article-filter-bar input,
.article-filter-bar select {
    min-height: var(--control-height);
    padding: 8px var(--control-padding-x);
    border-radius: 6px;
    border-color: #d9dfeb;
    background: #fff;
    box-shadow: none;
}

.article-filter-bar .actions {
    display: flex;
    justify-content: flex-end;
    gap: 8px;
    padding-top: 0;
}

.article-filter-bar .actions .btn {
    min-height: var(--control-height);
    padding: 8px var(--control-padding-x);
    border-radius: 6px;
}

.module-tabs {
    display: inline-flex;
    gap: 8px;
    margin: 4px 0 18px;
    padding: 4px;
    background: #f4f7fc;
    border: 1px solid #e2e8f4;
    border-radius: 8px;
}

.module-tab {
    min-height: 36px;
    padding: 6px 14px;
    border: 0;
    background: transparent;
    color: #667089;
    border-radius: 6px;
    cursor: pointer;
    font-weight: 600;
}

.module-tab.is-active {
    background: #ffffff;
    color: var(--text);
    box-shadow: 0 1px 2px rgba(23, 32, 51, 0.06);
}

.module-tab-panel {
    display: grid;
    gap: 14px;
}

.module-tab-panel[hidden] {
    display: none !important;
}

.module-section-head {
    display: flex;
    align-items: flex-start;
    justify-content: space-between;
    gap: 12px;
}

.module-section-head h2 {
    margin: 0 0 4px;
    font-size: 1.08rem;
}

.module-section-head p {
    margin: 0;
    color: #6d7890;
    font-size: 0.92rem;
    max-width: 78ch;
}

.select-enhanced {
    position: relative;
    width: 100%;
}

.select-enhanced-native {
    position: absolute;
    inset: 0;
    opacity: 0;
    pointer-events: none;
}

.select-enhanced-trigger {
    width: 100%;
    min-height: var(--control-height);
    padding: 8px var(--control-padding-x);
    border: 1px solid #d9dfeb;
    border-radius: 6px;
    background: #fff;
    color: var(--text);
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 12px;
    cursor: pointer;
    text-align: left;
}

.select-enhanced-label {
    min-width: 0;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.select-enhanced-chevron {
    width: 10px;
    height: 10px;
    border-right: 1.5px solid #65728a;
    border-bottom: 1.5px solid #65728a;
    transform: rotate(45deg) translateY(-2px);
    transition: transform 0.18s ease;
    flex: 0 0 auto;
}

.select-enhanced.is-open .select-enhanced-chevron {
    transform: rotate(-135deg) translateY(-1px);
}

.select-enhanced-menu {
    position: absolute;
    top: calc(100% + 6px);
    left: 0;
    right: 0;
    z-index: 20;
    display: grid;
    gap: 2px;
    padding: 6px;
    background: #fff;
    border: 1px solid #d9dfeb;
    box-shadow: 0 14px 30px rgba(23, 32, 51, 0.12);
    max-height: 260px;
    overflow-y: auto;
}

.select-enhanced-menu[hidden] {
    display: none !important;
}

.select-enhanced-option {
    width: 100%;
    min-height: 36px;
    padding: 8px 10px;
    border: 0;
    background: transparent;
    color: var(--text);
    text-align: left;
    border-radius: 4px;
    cursor: pointer;
}

.select-enhanced-option:hover,
.select-enhanced-option.is-selected {
    background: #f4f7fc;
}

.article-subnav {
    display: flex;
    flex-wrap: wrap;
    gap: 18px;
    margin: 2px 0 14px;
    padding-bottom: 10px;
    border-bottom: 1px solid #edf1f5;
}

.article-subnav a {
    color: #6d7890;
    font-size: 0.9rem;
    padding-bottom: 8px;
    border-bottom: 2px solid transparent;
}

.article-subnav a.active {
    color: var(--primary);
    font-weight: 700;
    border-color: var(--primary);
}

.article-subnav span {
    color: inherit;
}

.article-bulk-shell {
    display: grid;
    gap: 10px;
}

.article-bulk-bar {
    display: flex;
    justify-content: space-between;
    gap: 16px;
    align-items: center;
    padding: 2px 0 10px;
    border-bottom: 1px solid #edf1f5;
}

.article-bulk-left {
    display: flex;
    flex-wrap: wrap;
    gap: 10px;
    align-items: center;
}

.bulk-select-all {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    color: #59657b;
    font-size: 0.9rem;
}

.bulk-select-all input,
.article-overview-select input {
    width: 16px;
    height: 16px;
}

.article-card-list {
    display: grid;
    gap: 14px;
}

.article-card-list.is-list {
    gap: 0;
}

.article-list-head {
    display: grid;
    grid-template-columns: 28px minmax(0, 1.9fr) minmax(160px, 0.9fr) minmax(120px, 0.8fr) minmax(120px, 0.8fr) auto;
    gap: 16px;
    padding: 2px 0 10px;
    border-bottom: 1px solid #edf1f5;
    color: #7b879d;
    font-size: 0.82rem;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.06em;
}

.article-sort-link {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    color: inherit;
}

.article-sort-link.is-active {
    color: var(--primary);
}

.article-sort-icon {
    position: relative;
    width: 10px;
    height: 12px;
    opacity: 0.45;
}

.article-sort-icon::before,
.article-sort-icon::after {
    content: "";
    position: absolute;
    left: 50%;
    transform: translateX(-50%);
    border-left: 4px solid transparent;
    border-right: 4px solid transparent;
}

.article-sort-icon::before {
    top: 0;
    border-bottom: 5px solid currentColor;
}

.article-sort-icon::after {
    bottom: 0;
    border-top: 5px solid currentColor;
}

.article-sort-icon.asc::after,
.article-sort-icon.desc::before,
.article-sort-icon.none::before,
.article-sort-icon.none::after {
    opacity: 0.2;
}

.article-sort-link.is-active .article-sort-icon {
    opacity: 0.9;
}

.article-overview-card {
    display: grid;
    grid-template-columns: 28px minmax(0, 1.9fr) minmax(160px, 0.9fr) minmax(120px, 0.8fr) minmax(120px, 0.8fr) auto;
    gap: 18px;
    align-items: center;
    padding: 11px 0;
    border-top: 1px solid #edf1f5;
}

.article-overview-card:first-child {
    border-top: 0;
}

.article-overview-select {
    display: flex;
    align-items: center;
    justify-content: center;
    padding-top: 2px;
}

.article-overview-main {
    display: grid;
    gap: 6px;
    min-width: 0;
}

.article-overview-main h3 {
    margin: 0;
    font-size: 1rem;
    line-height: 1.35;
}

.article-overview-main p {
    margin: 0;
    color: var(--muted);
    max-width: 68ch;
    font-size: 0.9rem;
}

.article-overview-main small,
.article-overview-category,
.article-overview-status small,
.article-overview-date small {
    color: #7c8798;
    font-size: 0.88rem;
}

.article-overview-status,
.article-overview-date {
    display: grid;
    gap: 6px;
}

.article-overview-date strong {
    font-size: 0.94rem;
}

.article-overview-actions {
    display: flex;
    gap: 10px;
    align-content: center;
    justify-content: flex-end;
    align-items: center;
}

.article-overview-actions form {
    margin: 0;
}

.article-status-pill.is-draft {
    background: rgba(108, 120, 144, 0.12);
    color: #556175;
}

.article-status-pill.is-review {
    background: rgba(234, 164, 46, 0.14);
    color: #9a6200;
}

.article-status-pill.is-published {
    background: rgba(47, 143, 100, 0.14);
    color: #256d4e;
}

.article-visibility-pill {
    background: rgba(79, 124, 255, 0.08);
    color: #4f7cff;
}

.article-overview-actions .btn {
    padding: 9px 12px;
}

.empty-state-card {
    display: grid;
    gap: 6px;
    padding: 18px 0 6px;
}

.article-action-menu {
    position: relative;
}

.article-action-menu summary {
    list-style: none;
}

.article-action-menu summary::-webkit-details-marker {
    display: none;
}

.article-action-trigger {
    width: 40px;
    height: 40px;
    border: 1px solid var(--line);
    border-radius: 8px;
    background: #f4f6fb;
    color: var(--muted);
    display: inline-flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    font-weight: 700;
    letter-spacing: 0.08em;
}

.article-action-menu[open] .article-action-trigger {
    background: #eef3ff;
    color: var(--primary);
    border-color: rgba(79, 124, 255, 0.24);
}

.article-action-list {
    position: absolute;
    right: 0;
    top: calc(100% + 8px);
    z-index: 4;
    min-width: 180px;
    display: grid;
    gap: 8px;
    padding: 10px;
    border: 1px solid var(--line);
    border-radius: 10px;
    background: #fff;
    box-shadow: 0 14px 32px rgba(23, 32, 51, 0.12);
}

.empty-state-card p,
.empty-state-card strong {
    margin: 0;
}

table {
    width: 100%;
    border-collapse: collapse;
}

th, td {
    text-align: left;
    padding: 14px 12px;
    border-bottom: 1px solid var(--line);
}

th {
    font-size: 0.86rem;
    color: var(--muted);
    font-weight: 600;
}

.btn {
    border: none;
    border-radius: 8px;
    min-height: var(--control-height);
    padding: 8px 14px;
    cursor: pointer;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    line-height: 1.2;
    font-weight: 600;
    transition: 0.18s ease;
}

.btn:hover { transform: translateY(-1px); }

.btn-primary {
    background: linear-gradient(135deg, var(--primary), #6f8fff);
    color: #fff;
}

.btn-secondary {
    background: #f4f6fb;
    color: var(--text);
    border: 1px solid var(--line);
}

.btn-danger {
    background: #fff0f1;
    color: var(--danger);
    border: 1px solid #f0cdd1;
}

.form-grid {
    display: grid;
    gap: 16px;
}

.form-grid.two-col {
    grid-template-columns: repeat(2, minmax(0, 1fr));
}

.field {
    display: grid;
    gap: 8px;
}

.field.full, .actions.full { grid-column: 1 / -1; }

label {
    font-weight: 600;
    color: var(--text);
}

input[type="text"],
input[type="email"],
input[type="password"],
input[type="number"],
input[type="search"],
select,
textarea,
input[type="file"] {
    width: 100%;
    border-radius: 8px;
    border: 1px solid var(--line);
    min-height: var(--control-height);
    padding: 8px var(--control-padding-x);
    background: #fff;
    color: var(--text);
    line-height: 1.35;
}

textarea {
    resize: vertical;
    min-height: 110px;
    padding-top: 12px;
    padding-bottom: 12px;
}

.actions {
    gap: 12px;
    flex-wrap: wrap;
}

.flash {
    padding: 14px 16px;
    border-radius: 14px;
    margin-bottom: 16px;
    border: 1px solid transparent;
}

.flash-success {
    background: #eef9f3;
    border-color: #c9ead6;
    color: #1d6a48;
}

.flash-error {
    background: #fff2f3;
    border-color: #f1cbcf;
    color: #9d2a37;
}

.flash-info {
    background: #eef4ff;
    border-color: #d5e2ff;
    color: #305abf;
}

.support-banner {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 16px;
    padding: 16px 18px;
    margin: 18px 0 0;
    background: linear-gradient(135deg, rgba(255, 245, 226, 0.98), rgba(255, 236, 204, 0.98));
    border: 1px solid rgba(217, 146, 20, 0.34);
    color: #6a4708;
}

.support-banner strong,
.support-banner small {
    color: inherit;
}

.status-chip {
    display: inline-flex;
    align-items: center;
    padding: 6px 10px;
    background: rgba(79, 124, 255, 0.1);
    color: var(--primary);
    font-size: 0.82rem;
    font-weight: 600;
}

.status-chip.is-muted {
    background: #f4f6fb;
    color: var(--muted);
}

.empty-copy {
    color: var(--muted);
    padding: 8px 0;
}

.auth-shell {
    min-height: 100vh;
    display: grid;
    place-items: center;
    padding: 24px;
}

.auth-card {
    width: min(540px, 100%);
    padding: 28px;
}

.auth-card.wide-card {
    width: min(860px, 100%);
}

.eyebrow {
    display: inline-flex;
    align-items: center;
    padding: 7px 11px;
    border-radius: 999px;
    background: rgba(79, 124, 255, 0.1);
    color: var(--primary);
    font-size: 0.84rem;
    margin-bottom: 10px;
}

.portal-shell {
    min-height: 100vh;
    background: #fff;
}

.portal-header {
    display: block;
    padding: 34px 0 80px;
    background:
        linear-gradient(135deg, color-mix(in srgb, var(--primary) 28%, var(--portal-header-bg)) 0%, var(--portal-header-bg) 100%);
    border-bottom: 1px solid rgba(255, 255, 255, 0.08);
}

.portal-header-inner {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 24px;
    margin-bottom: 80px;
    width: min(1200px, calc(100% - 48px));
    margin-left: auto;
    margin-right: auto;
}

.portal-brand strong,
.portal-brand small,
.portal-header nav a {
    color: var(--portal-header-text);
}

.portal-brand img {
    max-height: var(--portal-logo-max-height);
    width: auto;
    object-fit: contain;
}

.portal-header nav {
    display: flex;
    justify-content: flex-end;
    gap: 16px;
    flex-wrap: wrap;
}

.portal-header nav a {
    padding: 0;
    background: transparent;
    border: 0;
    font-size: var(--font-size-ui);
}

.portal-header-search {
    position: relative;
    display: block;
    width: min(820px, 100%);
    align-items: center;
}

.portal-search-band {
    width: min(1200px, calc(100% - 48px));
    margin: 0 auto;
    display: flex;
    justify-content: center;
    align-items: center;
}

.portal-header-search input {
    min-width: 0;
    width: 100%;
    border: 0;
    border-radius: 0;
    padding: 22px 72px 22px 24px;
    background: var(--portal-header-search-bg);
    color: #223149;
    font-size: 1.08rem;
    box-shadow: 0 14px 34px rgba(8, 25, 44, 0.14);
}

.portal-header-search input::placeholder {
    color: #8a96ab;
}

.portal-search-submit {
    position: absolute;
    top: 50%;
    right: 18px;
    transform: translateY(-50%);
    width: 40px;
    height: 40px;
    border: 0;
    background: transparent;
    color: #7a889d;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
}

.portal-search-submit svg {
    width: 24px;
    height: 24px;
    display: block;
}

.portal-shell.portal-header-style-solid .portal-header {
    background: var(--portal-header-bg);
}

.portal-shell.portal-header-style-minimal .portal-header {
    background: var(--portal-header-search-bg);
    border-bottom-color: #e6edf5;
}

.portal-shell.portal-header-style-minimal .portal-brand strong,
.portal-shell.portal-header-style-minimal .portal-brand small,
.portal-shell.portal-header-style-minimal .portal-header nav a {
    color: var(--portal-header-text);
}

.portal-shell.portal-header-style-minimal .portal-header-search input {
    box-shadow: none;
    border: 1px solid #dce5ef;
}

.portal-main {
    width: min(1200px, calc(100% - 48px));
    margin: 0 auto 64px;
    padding-top: 0;
}

.portal-subnav-band {
    background: var(--portal-subnav-bg);
    border-top: 1px solid #edf1f5;
    border-bottom: 1px solid #edf1f5;
}

.portal-subnav-inner {
    width: min(1200px, calc(100% - 48px));
    margin: 0 auto;
}

.portal-breadcrumbs {
    display: flex;
    flex-wrap: wrap;
    gap: 10px;
    align-items: center;
    color: var(--muted);
    margin: 0;
    font-size: var(--font-size-ui);
    padding: 14px 0;
}

.portal-breadcrumbs a {
    color: var(--primary);
}

.portal-breadcrumbs span:last-child {
    color: var(--text);
}

.portal-hero {
    display: grid;
    grid-template-columns: 1.4fr 1fr;
    gap: 36px;
    padding: 44px 0 22px;
    margin-bottom: 18px;
    border-bottom: 1px solid #edf1f5;
}

.portal-kicker {
    display: inline-block;
    margin-bottom: 14px;
    color: #7f8a9d;
    font-size: calc(var(--font-size-ui) * 0.92);
    font-weight: 700;
    letter-spacing: 0.08em;
    text-transform: uppercase;
}

.portal-hero h1 {
    margin-bottom: 16px;
    font-size: var(--font-size-h1);
    font-weight: 400;
    letter-spacing: -0.05em;
    line-height: 1.02;
}

.portal-hero p {
    max-width: 62ch;
    color: #5c687c;
}

.portal-hero-side {
    display: grid;
    gap: 16px;
    align-content: start;
    padding-top: 10px;
}

.portal-hero-side strong {
    display: block;
    padding-bottom: 16px;
    border-bottom: 1px solid #edf1f5;
    font-size: 1.02rem;
    font-weight: 600;
}

.portal-section {
    margin-top: 40px;
}

.card-grid {
    grid-template-columns: repeat(3, minmax(0, 1fr));
}

.compact-grid {
    grid-template-columns: repeat(4, minmax(0, 1fr));
}

.portal-list {
    display: grid;
    gap: 0;
    border-top: 1px solid #edf1f5;
}

.portal-list-link {
    display: grid;
    gap: 8px;
    padding: 18px 0;
    border-bottom: 1px solid #edf1f5;
}

.portal-list-link strong,
.portal-list-item strong {
    display: block;
    margin-top: 6px;
    color: var(--text);
    font-size: 1.08rem;
}

.portal-list-link p,
.portal-list-item p {
    margin-bottom: 0;
    max-width: 68ch;
}

.portal-list-type {
    color: #7f8a9d;
    font-size: calc(var(--font-size-ui) * 0.88);
    font-weight: 700;
    letter-spacing: 0.08em;
    text-transform: uppercase;
}

.portal-list-grid {
    display: grid;
    gap: 0 28px;
}

.portal-list-item {
    padding: 18px 0;
    border-top: 1px solid #edf1f5;
}

.pill {
    display: inline-flex;
    align-items: center;
    width: fit-content;
    padding: 7px 10px;
    border-radius: 999px;
    background: rgba(79, 124, 255, 0.1);
    color: var(--primary);
    font-size: 0.82rem;
}

.reading-surface {
    width: min(860px, 100%);
    margin: 0 auto;
    padding: 34px;
}

.article-page {
    display: grid;
    gap: 18px;
    padding-top: 44px;
}

.article-layout {
    display: grid;
    grid-template-columns: minmax(0, 1.72fr) minmax(260px, 320px);
    gap: 56px;
    align-items: start;
}

.article-reading-surface {
    width: 100%;
    margin: 0;
    padding: 0 0 8px;
    border: 0;
    border-radius: 0;
    box-shadow: none;
    background: transparent;
}

.article-sidebar {
    position: sticky;
    top: 24px;
    display: grid;
    gap: 28px;
}

.article-sidebar-card {
    padding: 0 0 24px;
    border: 0;
    border-bottom: 1px solid #edf1f5;
    border-radius: 0;
    background: transparent;
    box-shadow: none;
}

.article-sidebar-card h3 {
    margin-bottom: 16px;
    font-size: calc(var(--font-size-ui) * 0.92);
    font-weight: 700;
    letter-spacing: 0.08em;
    text-transform: uppercase;
    color: #7f8a9d;
}

.article-meta-list {
    display: grid;
    gap: 14px;
}

.article-meta-list small {
    display: block;
    margin-bottom: 4px;
    color: var(--muted);
}

.article-meta-list strong {
    color: var(--text);
    font-size: 0.98rem;
}

.article-outline,
.article-related-list {
    display: grid;
    gap: 12px;
}

.article-outline a,
.article-related-list a {
    color: var(--text);
    text-decoration: none;
    line-height: 1.55;
    font-size: var(--font-size-body);
}

.article-outline a:hover,
.article-related-list a:hover {
    color: var(--primary);
}

.article-outline .is-level-3 {
    padding-left: 12px;
}

.article-outline .is-level-4 {
    padding-left: 24px;
}

.article-preview-surface {
    display: grid;
    gap: 24px;
}

.preview-banner {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 16px;
    padding: 16px 18px;
    border: 1px solid rgba(79, 124, 255, 0.16);
    border-radius: 18px;
    background: linear-gradient(180deg, rgba(79,124,255,0.08), rgba(79,124,255,0.02));
}

.preview-banner small {
    display: block;
    margin-top: 4px;
    color: var(--muted);
}

.reading-head {
    margin-bottom: 30px;
    padding-bottom: 22px;
    border-bottom: 1px solid #edf1f5;
}

.reading-head h1 {
    margin-bottom: 16px;
    font-size: var(--font-size-h1);
    font-weight: 400;
    letter-spacing: -0.045em;
    line-height: 1.02;
}

.article-head-meta {
    display: flex;
    flex-wrap: wrap;
    gap: 10px 18px;
    margin-bottom: 16px;
    color: #8390a4;
    font-size: var(--font-size-ui);
}

.article-head-meta span {
    position: relative;
}

.article-head-meta span + span::before {
    content: '';
    display: inline-block;
    width: 1px;
    height: 12px;
    margin-right: 18px;
    background: #dbe2eb;
    vertical-align: -1px;
}

.lead {
    font-size: calc(var(--font-size-body) * 1.06);
    color: #5c687c;
    line-height: 1.75;
}

.reading-body {
    color: var(--text);
    font-size: var(--font-size-body);
    line-height: 1.82;
}

.reading-body h2,
.reading-body h3,
.reading-body h4 {
    margin-top: 42px;
    margin-bottom: 12px;
    color: var(--text);
    font-weight: 500;
}

.reading-body h2 {
    font-size: var(--font-size-h2);
}

.reading-body h3 {
    font-size: var(--font-size-h3);
}

.prose-block {
    margin: 20px 0;
    color: var(--text);
}

.content-section-block {
    margin: 26px 0;
    padding: 18px 0 6px;
    border-top: 1px solid #edf1f5;
}

.content-section-block.no-title {
    padding-top: 0;
}

.content-section-block.is-muted {
    padding: 18px 20px 10px;
    background: #f8fbff;
    border: 1px solid #e6edf5;
}

.content-section-block.has-title.is-muted {
    padding-top: 8px;
}

.content-section-block.is-muted.no-title {
    padding-top: 0;
}

.content-section-block.is-emphasis {
    padding: 20px 22px 12px;
    background: linear-gradient(180deg, rgba(79, 124, 255, 0.05), rgba(79, 124, 255, 0.015));
    border: 1px solid rgba(79, 124, 255, 0.14);
}

.content-section-block.is-emphasis.no-title {
    padding-top: 2px;
}

.content-section-block.is-spacing-compact {
    margin: 16px 0;
    padding-top: 12px;
}

.content-section-block.is-spacing-compact.no-title {
    padding-top: 0;
}

.content-section-block.is-spacing-loose {
    margin: 40px 0;
    padding-top: 26px;
}

.content-section-block.is-spacing-loose.no-title {
    padding-top: 8px;
}

.content-section-block.has-title.is-spacing-compact {
    padding-top: 14px;
}

.content-section-block.has-title.is-spacing-loose {
    padding-top: 8px;
}

.content-section-block.has-title.is-muted.is-spacing-loose {
    padding-top: 6px;
}

.content-section-head {
    margin-bottom: 8px;
}

.content-section-head h2 {
    margin-bottom: 0;
    line-height: 1.08;
}

.content-section-body {
    display: grid;
    gap: 16px;
}

.content-section-block.no-title > .content-section-body {
    gap: 12px;
}

.content-section-body > :first-child {
    margin-top: 0 !important;
    padding-top: 0;
}

.content-section-body > :first-child:is(h2, h3, h4, .prose-block, .content-row-block, .note-box, .download-card, .content-image, .faq-list, .steps-list) {
    margin-top: 0 !important;
    padding-top: 0;
}

.content-section-block.no-title > .content-section-body > h2:first-child,
.content-section-block.no-title > .content-section-body > h3:first-child,
.content-section-block.no-title > .content-section-body > h4:first-child {
    margin-top: 0 !important;
    margin-bottom: 8px;
    line-height: 1.02;
}

.content-section-block.is-spacing-compact .content-section-body {
    gap: 8px;
}

.content-section-block.is-spacing-compact .prose-block,
.content-section-block.is-spacing-compact .content-row-block,
.content-section-block.is-spacing-compact .note-box,
.content-section-block.is-spacing-compact .download-card,
.content-section-block.is-spacing-compact .content-image {
    margin-top: 10px;
    margin-bottom: 10px;
}

.content-row-block {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 24px;
    margin: 24px 0;
}

.content-row-block.is-wide-left {
    grid-template-columns: minmax(0, 1.35fr) minmax(0, 0.72fr);
}

.content-row-block.is-wide-right {
    grid-template-columns: minmax(0, 0.72fr) minmax(0, 1.35fr);
}

.content-row-block.is-three {
    grid-template-columns: repeat(3, minmax(0, 1fr));
}

.content-section-block.is-spacing-loose .content-section-body {
    gap: 28px;
}

.content-section-block.is-spacing-loose .prose-block,
.content-section-block.is-spacing-loose .content-row-block,
.content-section-block.is-spacing-loose .note-box,
.content-section-block.is-spacing-loose .download-card,
.content-section-block.is-spacing-loose .content-image {
    margin-top: 30px;
    margin-bottom: 30px;
}

.content-row-column {
    min-width: 0;
}

.content-row-column > :first-child {
    margin-top: 0 !important;
    padding-top: 0;
}

.content-row-column > :first-child:is(h2, h3, h4, .prose-block, .note-box, .download-card, .content-image, .faq-list, .steps-list) {
    margin-top: 0 !important;
    padding-top: 0;
}

.back-link {
    margin-bottom: 22px;
    color: #6c7890;
    font-size: 0.96rem;
}

.back-link:hover {
    color: var(--primary);
}

.note-box {
    background: #f7fbff;
    border: 1px solid #d6e8f5;
    padding: 18px;
    border-radius: 0;
    margin: 18px 0;
}

.note-box strong,
.note-box p { color: var(--text); }

.steps-list {
    display: grid;
    gap: 12px;
    padding-left: 22px;
}

.steps-list li {
    color: var(--text);
    padding-left: 4px;
}

.content-image {
    margin: 22px 0;
}

.content-image img {
    border-radius: 0;
    border: 1px solid var(--line);
    box-shadow: none;
}

.content-image figcaption {
    margin-top: 10px;
    color: var(--muted);
    font-size: 0.92rem;
}

.faq-list {
    display: grid;
    gap: 12px;
}

.faq-list details {
    border: 1px solid var(--line);
    border-radius: 16px;
    background: #fff;
    padding: 14px 16px;
}

.faq-list summary {
    cursor: pointer;
    font-weight: 600;
    color: var(--text);
}

.download-card {
    background: #f9fbff;
    border: 1px solid var(--line);
    padding: 18px;
    border-radius: 18px;
    margin: 18px 0;
}

.download-card a {
    color: var(--primary);
    font-weight: 700;
}

.content-divider {
    display: flex;
    align-items: center;
    gap: 16px;
    margin: 26px 0;
    color: #8591a8;
    font-size: 0.84rem;
    letter-spacing: 0.08em;
    text-transform: uppercase;
}

.content-divider::before,
.content-divider::after {
    content: "";
    flex: 1 1 auto;
    height: 1px;
    background: #e3e9f1;
}

.content-divider.is-space {
    display: block;
    height: 18px;
    margin: 24px 0;
}

.cta-card {
    display: grid;
    grid-template-columns: minmax(0, 1fr) auto;
    gap: 16px 24px;
    align-items: center;
    padding: 22px;
    margin: 22px 0;
    border: 1px solid #d7e0ee;
    background: linear-gradient(180deg, #f9fbff 0%, #f3f7fd 100%);
}

.cta-card.is-muted {
    background: #f7f9fc;
    border-color: #e2e7ef;
}

.cta-card h3,
.cta-card p {
    margin: 0;
}

.cta-card h3,
.cta-card p,
.cta-card > :not(.cta-button) {
    grid-column: 1;
}

.cta-card p {
    color: var(--text);
}

.cta-button {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: fit-content;
    grid-column: 2;
    grid-row: 1 / span 2;
    align-self: center;
    padding: 10px 16px;
    background: var(--primary);
    color: #fff;
    font-weight: 700;
    border-radius: 0;
}

.content-button-wrap {
    margin: 20px 0;
}

.content-button-group {
    display: flex;
    flex-wrap: wrap;
    gap: 12px;
    margin: 20px 0;
}

.content-button {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    padding: 10px 16px;
    border: 1px solid transparent;
    font-weight: 700;
    border-radius: 0;
}

.content-button.is-primary {
    background: var(--primary);
    color: #fff;
}

.content-button.is-secondary {
    background: #f4f7fb;
    border-color: #d6deea;
    color: var(--text);
}

.content-button.is-ghost {
    background: transparent;
    border-color: #ccd6e4;
    color: var(--text);
}

.content-hero {
    display: grid;
    gap: 14px;
    padding: 28px;
    margin: 24px 0;
    border: 1px solid #d8e1ef;
    background: linear-gradient(180deg, #f9fbff 0%, #f2f7fd 100%);
}

.content-hero.is-muted {
    background: #f7f9fc;
    border-color: #e2e7ef;
}

.content-hero h2,
.content-hero p {
    margin: 0;
}

.content-hero p {
    color: var(--text);
    max-width: 72ch;
}

.content-embed {
    display: grid;
    gap: 10px;
    margin: 22px 0;
}

.content-embed-frame {
    position: relative;
    width: 100%;
    padding-top: 56.25%;
    background: #0f1724;
}

.content-embed-frame iframe {
    position: absolute;
    inset: 0;
    width: 100%;
    height: 100%;
    border: 0;
}

.content-embed-fallback {
    display: grid;
    gap: 8px;
    padding: 18px;
    border: 1px solid var(--line);
    background: #f9fbff;
}

.content-embed-fallback strong {
    color: var(--text);
}

.content-embed-fallback a {
    color: var(--primary);
    word-break: break-all;
}

.block-editor {
    border: 1px solid var(--line);
    border-radius: 20px;
    padding: 18px;
    background: #fbfcff;
}

.block-editor-workspace {
    display: block;
}

.article-editor-shell {
    display: grid;
    gap: 18px;
}

.article-editor-grid {
    display: grid;
    grid-template-columns: minmax(0, 1.7fr) minmax(320px, 0.8fr);
    gap: 18px;
    align-items: start;
}

.article-editor-main,
.article-editor-sidebar {
    display: grid;
    gap: 18px;
}

.article-editor-sidebar {
    position: relative;
    align-content: start;
    align-self: start;
    position: sticky;
    top: calc(var(--topbar-height) + 22px);
    max-height: calc(100vh - var(--topbar-height) - 34px);
    overflow-y: auto;
}

.article-editor-panel {
    display: grid;
    gap: 18px;
}

.article-editor-sticky {
    position: static;
    top: auto;
    align-self: auto;
    z-index: auto;
    max-height: none;
    overflow: visible;
}

.article-editor-section-head {
    display: flex;
    align-items: flex-start;
    justify-content: space-between;
    gap: 16px;
}

.article-editor-section-head h3 {
    margin-bottom: 4px;
}

.article-editor-actions {
    display: grid;
}

.block-toolbar {
    display: flex;
    justify-content: flex-start;
    margin-bottom: 18px;
}

.blocks-list {
    display: grid;
    gap: 14px;
    min-width: 0;
}

.block-item {
    border: 1px solid var(--line);
    border-radius: 18px;
    background: #fff;
    padding: 14px;
    transition: border-color 120ms ease, box-shadow 120ms ease, background 120ms ease;
}

.block-item:has(.nested-block-area) {
    background: linear-gradient(180deg, #ffffff 0%, #f9fbff 100%);
    border-color: #d8e1ef;
}

.block-item:has(.layout-row-editor) {
    background: linear-gradient(180deg, #fbfcff 0%, #f3f7fc 100%);
    border-color: #d4ddea;
}

.block-item.is-selected {
    border-color: rgba(79, 124, 255, 0.38);
    box-shadow: 0 0 0 4px rgba(79, 124, 255, 0.08);
    background: #fcfdff;
}

.block-item.is-dragging {
    opacity: 0.45;
}

.block-item.is-drop-target {
    border-color: rgba(79, 124, 255, 0.42);
    box-shadow: 0 0 0 4px rgba(79, 124, 255, 0.1);
}

.block-head {
    display: flex;
    justify-content: space-between;
    gap: 12px;
    margin-bottom: 10px;
}

.block-meta,
.block-actions {
    display: flex;
    gap: 8px;
    flex-wrap: wrap;
    align-items: center;
}

.block-edit-trigger {
    width: 38px;
    height: 38px;
    border: 1px solid var(--line);
    border-radius: 12px;
    background: #f6f8fc;
    color: var(--muted);
    display: inline-flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    font-size: 0.95rem;
}

.block-edit-trigger:hover {
    background: #eef3ff;
    color: var(--primary);
    border-color: rgba(79, 124, 255, 0.24);
}

.block-grab {
    width: 38px;
    height: 38px;
    border: 1px solid var(--line);
    border-radius: 12px;
    background: #f6f8fc;
    color: var(--muted);
    display: inline-flex;
    align-items: center;
    justify-content: center;
    cursor: grab;
    font-weight: 700;
    letter-spacing: -0.08em;
}

.block-grab:active {
    cursor: grabbing;
}

.block-type-pill {
    display: inline-flex;
    align-items: center;
    padding: 6px 10px;
    border-radius: 999px;
    background: rgba(79, 124, 255, 0.1);
    color: var(--primary);
    font-size: 0.8rem;
    font-weight: 600;
}

.block-menu {
    position: relative;
}

.block-menu summary {
    list-style: none;
}

.block-menu summary::-webkit-details-marker {
    display: none;
}

.block-menu-trigger {
    width: 38px;
    height: 38px;
    border: 1px solid var(--line);
    border-radius: 12px;
    background: #f6f8fc;
    color: var(--muted);
    display: inline-flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    font-weight: 700;
    letter-spacing: 0.08em;
}

.block-menu[open] .block-menu-trigger {
    background: #eef3ff;
    color: var(--primary);
    border-color: rgba(79, 124, 255, 0.24);
}

.block-menu-list {
    position: absolute;
    right: 0;
    top: calc(100% + 8px);
    z-index: 5;
    min-width: 180px;
    display: grid;
    gap: 8px;
    padding: 10px;
    border: 1px solid var(--line);
    border-radius: 14px;
    background: #fff;
    box-shadow: 0 14px 32px rgba(23, 32, 51, 0.12);
}

.block-body {
    display: grid;
    gap: 12px;
}

.block-summary {
    display: grid;
    gap: 4px;
}

.block-summary strong {
    font-size: 0.95rem;
}

.block-summary p {
    margin: 0;
    color: var(--muted);
    font-size: 0.92rem;
}

.block-item:has(.nested-block-area) .block-summary {
    padding: 10px 12px;
    border: 1px solid #e3eaf4;
    border-radius: 14px;
    background: rgba(255, 255, 255, 0.82);
}

.block-item:not(:has(.nested-block-area)):not(:has(.layout-row-editor)) {
    padding: 12px;
}

.block-item:not(:has(.nested-block-area)):not(:has(.layout-row-editor)) .block-head {
    margin-bottom: 8px;
}

.block-item:not(:has(.nested-block-area)):not(:has(.layout-row-editor)) .block-summary {
    gap: 2px;
}

.block-settings-head p {
    margin: 0;
}

.block-settings-head {
    display: flex;
    justify-content: space-between;
    gap: 14px;
    align-items: flex-start;
}

.block-settings-head h4 {
    margin: 8px 0 6px;
    font-size: 1.06rem;
}

.block-settings-body {
    display: grid;
    gap: 14px;
}

.block-modal-backdrop {
    position: fixed;
    inset: 0;
    z-index: 62;
    background: rgba(14, 22, 37, 0.42);
    backdrop-filter: blur(3px);
}

.block-modal {
    position: fixed;
    left: 50%;
    top: 50%;
    transform: translate(-50%, -50%);
    z-index: 63;
    width: min(760px, calc(100vw - 32px));
    max-height: min(82vh, 920px);
    overflow: auto;
    padding: 22px;
    border: 1px solid var(--line);
    border-radius: 20px;
    background: #fff;
    box-shadow: 0 28px 70px rgba(23, 32, 51, 0.2);
}

.block-modal-head {
    display: flex;
    justify-content: space-between;
    gap: 18px;
    align-items: flex-start;
    margin-bottom: 16px;
}

.block-modal-body {
    display: grid;
    gap: 14px;
}

.block-modal-actions {
    display: flex;
    justify-content: flex-end;
    padding-top: 4px;
}

.block-settings-note {
    padding: 14px 16px;
    border: 1px solid var(--line);
    background: #f8fbff;
    color: var(--muted);
}

.block-settings-note p {
    margin: 0;
}

.block-library-backdrop {
    position: fixed;
    inset: 0;
    z-index: 60;
    background: rgba(14, 22, 37, 0.36);
    backdrop-filter: blur(3px);
}

.block-library {
    position: fixed;
    inset: 8vh 6vw auto;
    z-index: 61;
    max-height: 78vh;
    overflow: auto;
    padding: 22px;
    border: 1px solid var(--line);
    border-radius: 20px;
    background: #fff;
    box-shadow: 0 24px 60px rgba(23, 32, 51, 0.22);
}

.block-library-head {
    display: flex;
    justify-content: space-between;
    gap: 16px;
    align-items: flex-start;
    margin-bottom: 18px;
}

.block-library-head h4 {
    margin: 0 0 6px;
    font-size: 1.18rem;
}

.block-library-head p {
    margin: 0;
    color: var(--muted);
}

.block-library-tabs {
    display: flex;
    flex-wrap: wrap;
    gap: 10px;
    margin-bottom: 16px;
    padding-bottom: 12px;
    border-bottom: 1px solid var(--line);
}

.block-library-tab {
    padding: 10px 14px;
    border: 1px solid var(--line);
    background: #f8fbff;
    color: var(--muted);
    font-weight: 600;
    cursor: pointer;
    border-radius: 999px;
}

.block-library-tab.is-active {
    background: rgba(79, 124, 255, 0.1);
    color: var(--primary);
    border-color: rgba(79, 124, 255, 0.2);
}

.block-library-groups {
    display: grid;
    gap: 20px;
}

.block-library-group {
    display: grid;
    gap: 10px;
}

.block-library-group h5 {
    margin: 0;
    font-size: 0.88rem;
    text-transform: uppercase;
    letter-spacing: 0.08em;
    color: #7b879d;
}

.block-library-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(190px, 1fr));
    gap: 12px;
}

.block-library-item {
    display: grid;
    gap: 6px;
    text-align: left;
    padding: 16px;
    border: 1px solid var(--line);
    border-radius: 16px;
    background: #fbfcff;
    cursor: pointer;
    transition: border-color 120ms ease, transform 120ms ease, box-shadow 120ms ease;
}

.block-library-item:hover {
    border-color: rgba(79, 124, 255, 0.32);
    box-shadow: 0 10px 26px rgba(79, 124, 255, 0.08);
    transform: translateY(-1px);
}

.block-library-item strong {
    font-size: 0.96rem;
}

.block-library-item span {
    color: var(--muted);
    font-size: 0.9rem;
    line-height: 1.45;
}

.nested-block-area {
    display: grid;
    gap: 12px;
    padding: 14px;
    border: 1px dashed #ccd7e7;
    border-radius: 16px;
    background: rgba(248, 250, 255, 0.88);
}

.nested-block-head {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 12px;
}

.nested-block-toolbar {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
}

.nested-block-list {
    display: grid;
    gap: 12px;
    min-height: 34px;
}

.nested-block-list.is-drop-target {
    outline: 2px dashed rgba(79, 124, 255, 0.38);
    outline-offset: 4px;
}

.layout-row-editor {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 14px;
}

.layout-row-editor.is-three {
    grid-template-columns: repeat(3, minmax(0, 1fr));
}

.layout-row-editor > .nested-block-area {
    min-height: 180px;
}

.nested-block-toolbar .btn,
.block-toolbar .btn {
    border-style: dashed;
}

.hint {
    margin-top: 10px;
    font-size: 0.92rem;
}

.manual-picker {
    display: grid;
    gap: 12px;
}

.manual-option {
    display: grid;
    grid-template-columns: auto 1fr 80px;
    align-items: center;
    gap: 12px;
    padding: 12px 14px;
    border: 1px solid var(--line);
    border-radius: 16px;
    background: #fff;
}

.sort-input {
    text-align: center;
}

.branding-preview {
    border-radius: 24px;
    border: 1px solid var(--line);
    overflow: hidden;
    background: #fff;
}

.branding-logo-preview {
    display: grid;
    gap: 10px;
    justify-items: start;
    padding: 14px;
    border: 1px solid var(--line);
    background: #fbfcff;
}

.branding-logo-preview img {
    max-height: 72px;
    width: auto;
    object-fit: contain;
}

.branding-preview-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 18px;
    padding: 22px 24px;
    background: linear-gradient(135deg, color-mix(in srgb, var(--preview-primary) 28%, var(--preview-header-bg)) 0%, var(--preview-header-bg) 100%);
}

.branding-preview--solid .branding-preview-header {
    background: var(--preview-header-bg);
}

.branding-preview--minimal .branding-preview-header {
    background: var(--preview-search-bg);
    border-bottom: 1px solid #e6edf5;
}

.branding-preview-brand,
.branding-preview-nav,
.branding-preview-search,
.branding-preview-content {
    display: flex;
    align-items: center;
}

.branding-preview-brand {
    gap: 12px;
}

.branding-preview-brand img {
    max-height: var(--preview-logo-height);
    width: auto;
    object-fit: contain;
}

.branding-preview-logo-fallback {
    width: 38px;
    height: 38px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    background: linear-gradient(135deg, var(--preview-primary), var(--preview-secondary));
    color: #fff;
    font-weight: 700;
}

.branding-preview-header strong,
.branding-preview-nav span {
    color: var(--preview-header-text);
}

.branding-preview--minimal .branding-preview-header strong,
.branding-preview--minimal .branding-preview-nav span {
    color: var(--preview-header-text);
}

.branding-preview-nav {
    gap: 16px;
    flex-wrap: wrap;
}

.branding-preview-nav span {
    font-size: 0.9rem;
}

.branding-preview-search {
    gap: 0;
    padding: 24px;
    background: var(--preview-subnav-bg);
    border-bottom: 1px solid #edf1f5;
}

.branding-preview-search input {
    flex: 1 1 auto;
    border: 0;
    padding: 16px 18px;
    background: var(--preview-search-bg);
    color: #8a96ab;
}

.branding-preview-search span {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-width: 104px;
    padding: 16px 18px;
    background: var(--preview-accent);
    color: #102537;
    font-weight: 600;
}

.branding-preview-subnav {
    display: flex;
    gap: 8px;
    padding: 14px 24px;
    border-bottom: 1px solid #edf1f5;
    background: var(--preview-subnav-bg);
}

.branding-preview-content {
    align-items: stretch;
    gap: 28px;
    padding: 24px;
}

.branding-preview-content article,
.branding-preview-content aside {
    flex: 1 1 0;
}

.branding-preview-content aside {
    padding-left: 24px;
    border-left: 1px solid #edf1f5;
}

.branding-preview-kicker {
    display: inline-block;
    margin-bottom: 12px;
    color: #7f8a9d;
    font-weight: 700;
    letter-spacing: 0.08em;
    text-transform: uppercase;
}

.branding-hero {
    padding: 24px;
}

.branding-cards {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 16px;
    padding: 0 24px 24px;
}

.branding-cards article {
    background: rgba(255,255,255,0.88);
    border: 1px solid rgba(255,255,255,0.8);
    border-radius: 18px;
    padding: 18px;
}

.story-map-board-shell {
    position: relative;
}

.story-map-board {
    display: flex;
    gap: 24px;
    overflow-x: auto;
    align-items: flex-start;
    padding-bottom: 10px;
}

.story-map-activity {
    border: 1px solid #dfe6f5;
    border-radius: 26px;
    background: linear-gradient(180deg, #fbfcff 0%, #f3f6fd 100%);
    padding: 22px;
    display: grid;
    gap: 18px;
    min-width: 980px;
    width: max-content;
    flex: 0 0 auto;
}

.story-map-activity.is-dragging,
.story-map-step.is-dragging,
.story-map-feature.is-dragging {
    opacity: 0.45;
    transform: scale(0.985);
}

.story-map-drop-slot {
    position: relative;
    width: 0;
    min-width: 0;
    align-self: stretch;
    border-radius: 999px;
    opacity: 0;
    pointer-events: none;
    transition: background 0.18s ease, box-shadow 0.18s ease;
}

.story-map-drop-slot::after {
    content: '';
    position: absolute;
    inset: 0;
    margin: auto;
    border-radius: 999px;
    background: linear-gradient(180deg, rgba(79, 124, 255, 0.75), rgba(120, 95, 255, 0.92));
    box-shadow: 0 0 0 1px rgba(79, 124, 255, 0.12);
    opacity: 0;
    transform: scale(0.72);
    transition: opacity 0.16s ease, transform 0.16s ease;
}

.story-map-drop-slot.is-step-slot,
.story-map-drop-slot.is-feature-slot {
    width: 100%;
    min-width: 0;
    min-height: 0;
    height: 0;
}

.story-map-drop-slot.is-step-slot {
    width: 0;
    min-width: 0;
    align-self: stretch;
}

.story-map-drop-slot.is-feature-slot {
    width: 100%;
    min-width: 100%;
    align-self: auto;
}

.story-map-drop-slot[data-story-map-drop-slot="activity"]::after {
    width: 6px;
    height: 100%;
    min-height: 140px;
}

.story-map-drop-slot[data-story-map-drop-slot="step"]::after {
    width: 6px;
    height: 100%;
    min-height: 240px;
}

.story-map-drop-slot[data-story-map-drop-slot="feature"]::after {
    width: 100%;
    height: 6px;
}

.story-map-board.is-dragging-activity .story-map-drop-slot[data-story-map-drop-slot="activity"],
.story-map-board.is-dragging-step .story-map-drop-slot[data-story-map-drop-slot="step"],
.story-map-board.is-dragging-feature .story-map-drop-slot[data-story-map-drop-slot="feature"] {
    opacity: 1;
    pointer-events: auto;
}

.story-map-board.is-dragging-activity .story-map-drop-slot[data-story-map-drop-slot="activity"] {
    width: 18px;
    min-width: 18px;
}

.story-map-board.is-dragging-step .story-map-drop-slot[data-story-map-drop-slot="step"],
.story-map-board.is-dragging-feature .story-map-drop-slot[data-story-map-drop-slot="feature"] {
    min-height: 10px;
    height: 10px;
}

.story-map-board.is-dragging-step .story-map-drop-slot[data-story-map-drop-slot="step"] {
    width: 14px;
    min-width: 14px;
    min-height: auto;
    height: auto;
}

.story-map-activity-create {
    background: #f9fbff;
    border-style: dashed;
}

.story-map-activity-head,
.story-map-step-head,
.story-map-feature-head,
.story-map-meta,
.story-map-activity-title,
.story-map-item-actions {
    display: flex;
    align-items: center;
    gap: 12px;
}

.story-map-activity-title {
    justify-content: flex-start;
    flex: 1 1 auto;
    min-width: 0;
}

.story-map-item-actions {
    margin-left: auto;
    flex: 0 0 auto;
}

.story-map-activity-title h3,
.story-map-step-head strong,
.story-map-feature-head strong {
    margin: 0;
}

.story-map-settings summary {
    border: 1px solid var(--line);
    background: #f6f8fc;
    color: var(--primary);
    border-radius: 12px;
    width: 34px;
    min-width: 34px;
    height: 34px;
    cursor: pointer;
    font-weight: 600;
    font-size: 1.15rem;
    line-height: 1;
    display: inline-flex;
    align-items: center;
    justify-content: center;
}

.story-map-drag-handle {
    border: 1px solid var(--line);
    background: #f6f8fc;
    color: var(--muted);
    border-radius: 12px;
    width: 34px;
    min-width: 34px;
    height: 34px;
    cursor: grab;
    font-weight: 700;
    letter-spacing: -0.08em;
}

.story-map-drag-handle:active {
    cursor: grabbing;
}

.story-map-accent {
    width: 5px;
    min-height: 44px;
    border-radius: 999px;
    background: linear-gradient(180deg, #5a6cff, #9c52ff);
}

.story-map-steps {
    display: flex;
    gap: 18px;
    overflow-x: visible;
    padding-bottom: 4px;
    align-items: flex-start;
    min-width: max-content;
}

.story-map-step {
    border: 1px solid #dfe4f2;
    border-radius: 20px;
    background: rgba(255, 255, 255, 0.82);
    padding: 16px;
    display: grid;
    gap: 14px;
    align-content: start;
    min-height: 100%;
    min-width: 330px;
    width: 330px;
}

.story-map-step-create {
    background: rgba(255, 255, 255, 0.55);
    border-style: dashed;
}

.story-map-features {
    display: flex;
    flex-direction: column;
    gap: 12px;
}

.story-map-feature {
    border: 1px solid #d9dff0;
    border-radius: 18px;
    background: #fff;
    padding: 14px 14px 14px;
    display: grid;
    gap: 10px;
    box-shadow: 0 10px 24px rgba(33, 43, 74, 0.06);
}

.story-map-feature-head {
    align-items: flex-start;
}

.story-map-feature-content {
    border: 0;
    background: transparent;
    padding: 0;
    text-align: left;
    cursor: pointer;
    display: grid;
    gap: 10px;
}

.story-map-feature-content p {
    margin: 0;
}

.story-map-steps.is-drop-target,
.story-map-features.is-drop-target,
.story-map-board.is-drop-target,
.story-map-drop-slot.is-drop-target {
    outline: 2px dashed rgba(79, 124, 255, 0.4);
    outline-offset: 6px;
}

.story-map-step.is-drop-target,
.story-map-feature.is-drop-target {
    border-color: rgba(79, 124, 255, 0.45);
    box-shadow: 0 0 0 3px rgba(79, 124, 255, 0.12);
}

.story-map-activity.is-drop-target {
    border-color: rgba(79, 124, 255, 0.4);
    box-shadow: 0 0 0 4px rgba(79, 124, 255, 0.1);
}

.story-map-drop-slot.is-drop-target {
    background: rgba(79, 124, 255, 0.14);
    box-shadow: inset 0 0 0 1px rgba(79, 124, 255, 0.2);
}

.story-map-drop-slot.is-drop-target::after {
    opacity: 1;
    transform: scale(1);
}

.story-map-board.is-refreshing {
    opacity: 0.72;
    transition: opacity 0.18s ease;
    pointer-events: none;
}

.story-map-feature-topline {
    width: 100%;
    height: 6px;
    border-radius: 999px;
    background: linear-gradient(90deg, #5a6cff, #9c52ff);
}

.story-map-feature-topline.is-create {
    background: linear-gradient(90deg, #ffb38a, #ff7d98);
}

.story-map-feature-create {
    background: linear-gradient(180deg, #ffffff 0%, #fffaf8 100%);
}

.story-map-feature-trigger {
    width: 100%;
    text-align: left;
    cursor: pointer;
}

.story-map-feature-trigger p {
    margin-bottom: 0;
}

.story-map-meta {
    flex-wrap: wrap;
}

.story-map-meta span {
    display: inline-flex;
    padding: 5px 9px;
    background: rgba(79, 124, 255, 0.1);
    color: var(--primary);
    border-radius: 999px;
    font-size: 0.78rem;
}

.compact-story-form {
    gap: 10px;
}

.story-map-settings {
    display: grid;
    gap: 10px;
    position: relative;
}

.story-map-settings summary {
    list-style: none;
}

.story-map-settings summary::-webkit-details-marker {
    display: none;
}

.story-map-settings-panel {
    position: absolute;
    top: calc(100% + 8px);
    right: 0;
    z-index: 20;
    width: 220px;
    padding: 10px;
    border: 1px solid var(--line);
    border-radius: 16px;
    background: #fff;
    box-shadow: 0 18px 40px rgba(23, 32, 51, 0.14);
}

.story-map-menu-action {
    width: 100%;
    border: 0;
    background: transparent;
    color: var(--text);
    padding: 10px 12px;
    border-radius: 12px;
    text-align: left;
    cursor: pointer;
    font: inherit;
}

.story-map-menu-action:hover {
    background: #f5f7fc;
}

.story-map-menu-link {
    display: block;
    color: var(--text);
    text-decoration: none;
    padding: 10px 12px;
    border-radius: 12px;
}

.story-map-menu-link:hover {
    background: #f5f7fc;
}

.story-map-link-icon {
    width: 34px;
    min-width: 34px;
    height: 34px;
    border: 1px solid var(--line);
    border-radius: 12px;
    background: #f6f8fc;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    color: var(--muted);
}

.story-map-link-icon svg {
    width: 16px;
    height: 16px;
    fill: currentColor;
}

.story-map-title-input {
    width: 100%;
    min-width: 0;
    border: 1px solid rgba(79, 124, 255, 0.35);
    border-radius: 10px;
    background: #fff;
    padding: 6px 10px;
    font: inherit;
    color: inherit;
}

[data-story-map-title] {
    cursor: text;
}

[data-story-map-title].is-editing {
    display: block;
}

body.is-story-map-canvas-open {
    overflow: hidden;
}

.story-map-canvas-backdrop {
    position: fixed;
    inset: 0;
    background: rgba(12, 19, 34, 0.22);
    opacity: 0;
    pointer-events: none;
    transition: opacity 0.2s ease;
    z-index: 60;
}

.story-map-canvas {
    position: fixed;
    top: 0;
    right: 0;
    width: min(50vw, 760px);
    max-width: 100vw;
    height: 100vh;
    background: #fff;
    border-left: 1px solid #dfe4f2;
    box-shadow: -24px 0 60px rgba(23, 32, 51, 0.18);
    transform: translateX(100%);
    transition: transform 0.22s ease;
    z-index: 70;
    display: grid;
    grid-template-rows: auto 1fr;
}

.story-map-canvas.is-open {
    transform: translateX(0);
}

.story-map-canvas-backdrop.is-open {
    opacity: 1;
    pointer-events: auto;
}

.story-map-canvas-head {
    padding: 20px 22px 16px;
    border-bottom: 1px solid #e8edf8;
    display: flex;
    justify-content: space-between;
    gap: 16px;
    align-items: flex-start;
}

.story-map-canvas-close {
    width: 40px;
    height: 40px;
    border: 1px solid var(--line);
    border-radius: 12px;
    background: #f6f8fc;
    cursor: pointer;
    font-size: 1.4rem;
    line-height: 1;
}

.story-map-canvas-form {
    padding: 20px 22px 28px;
    overflow-y: auto;
    display: grid;
    gap: 16px;
    align-content: start;
}

.story-map-canvas-actions {
    display: flex;
    gap: 10px;
    justify-content: flex-end;
    align-items: center;
}

.story-map-canvas-detail-link.is-hidden {
    display: none;
}

.story-map-canvas.is-loading .story-map-canvas-form {
    opacity: 0.55;
    pointer-events: none;
}

.story-map-activity-create-form {
    max-width: 460px;
}

.manual-layout {
    display: grid;
    grid-template-columns: 300px minmax(0, 1fr);
    gap: 56px;
    padding-top: 44px;
}

.manual-sidebar {
    position: sticky;
    top: 24px;
    align-self: start;
    padding: 0 0 8px;
    border-radius: 0;
    background: transparent;
    border: 0;
}

.manual-sidebar h1 {
    margin-bottom: 14px;
    font-size: var(--font-size-h1);
    font-weight: 400;
    letter-spacing: -0.04em;
}

.manual-sidebar-section {
    margin-top: 28px;
    padding-top: 18px;
    border-top: 1px solid #edf1f5;
}

.manual-sidebar-section h3 {
    margin-bottom: 16px;
    font-size: calc(var(--font-size-ui) * 0.92);
    font-weight: 700;
    letter-spacing: 0.08em;
    text-transform: uppercase;
    color: #7f8a9d;
}

.manual-sidebar ol {
    padding-left: 20px;
    display: grid;
    gap: 12px;
}

.manual-content {
    display: grid;
    gap: 40px;
}

.manual-content .reading-surface {
    width: 100%;
    margin: 0;
    padding: 0 0 14px;
    border: 0;
    border-radius: 0;
    box-shadow: none;
    background: transparent;
}

.manual-intro {
    border-bottom: 1px solid #edf1f5;
}

.back-link {
    display: inline-flex;
    margin-bottom: 18px;
    color: var(--primary);
}

body.is-drawer-open {
    overflow: hidden;
}

@media (max-width: 1100px) {
    :root {
        --shell-width: min(100vw - 24px, 1320px);
    }

    .smart-topbar {
        grid-template-columns: 1fr auto;
    }

    .topbar-spacer {
        display: none;
    }

    .topbar-alert-copy small {
        display: none;
    }

    .stats-grid,
    .two-up,
    .portal-hero,
    .card-grid,
    .compact-grid,
    .manual-layout,
    .branding-cards,
    .form-grid.two-col {
        grid-template-columns: 1fr;
    }

    .article-filter-bar {
        grid-template-columns: 1fr;
    }

    .article-list-head {
        display: none;
    }

    .article-bulk-bar {
        flex-direction: column;
        align-items: stretch;
    }

    .article-overview-card {
        grid-template-columns: 28px 1fr;
        gap: 12px;
    }

    .article-overview-actions {
        justify-content: flex-start;
        flex-wrap: wrap;
    }

    .story-map-board {
        flex-direction: column;
        overflow-x: visible;
    }

    .story-map-activity {
        min-width: 0;
    }

    .story-map-steps {
        flex-direction: column;
        overflow-x: visible;
        min-width: 0;
    }

    .story-map-canvas {
        width: 100vw;
    }

    .layout-row-editor,
    .content-row-block {
        grid-template-columns: 1fr;
    }

    .cta-card {
        grid-template-columns: 1fr;
    }

    .cta-button {
        grid-column: 1;
        grid-row: auto;
        justify-self: start;
    }

    .content-button-group {
        flex-direction: column;
        align-items: flex-start;
    }

    .block-modal {
        width: calc(100vw - 20px);
        max-height: 88vh;
        padding: 16px;
    }

    .block-toolbar,
    .nested-block-head {
        display: grid;
    }

    .block-library {
        inset: 4vh 16px auto;
        max-height: 86vh;
    }

    .article-editor-grid {
        grid-template-columns: 1fr;
    }

    .article-editor-sticky {
        position: static;
    }

    .article-layout {
        grid-template-columns: 1fr;
    }

    .article-sidebar {
        position: static;
    }

    .manual-layout {
        grid-template-columns: 1fr;
        gap: 36px;
    }

    .manual-sidebar {
        position: static;
    }
}

@media (max-width: 760px) {
    :root {
        --shell-width: min(100vw - 20px, 1320px);
    }

    .admin-shell {
        grid-template-columns: 1fr;
    }

    .context-sidebar {
        display: none;
    }

    .smart-topbar {
        margin-top: 10px;
        padding: 14px 16px;
        border-left: 0;
    }

    .topbar-alert {
        padding-inline: 12px;
    }

    .profile-copy {
        display: none;
    }

    .main-panel,
    .portal-header {
        padding-top: 18px;
    }

    .portal-main {
        width: min(100% - 24px, 1200px);
    }

    .portal-header-inner,
    .portal-search-band,
    .portal-subnav-inner {
        width: min(100% - 24px, 1200px);
    }

    .portal-header-inner,
    .portal-header-search,
    .article-layout {
        display: grid;
        grid-template-columns: 1fr;
    }

    .reading-surface,
    .portal-hero,
    .panel-card,
    .auth-card {
        padding: 20px;
    }

    .manual-option {
        grid-template-columns: 1fr;
        justify-items: start;
    }

    .article-sidebar {
        position: static;
    }

    .context-drawer {
        width: min(100vw, 420px);
        padding: 18px;
    }

    .support-banner {
        flex-direction: column;
        align-items: stretch;
    }
}

.landing-shell {
    background:
        radial-gradient(circle at top left, rgba(79, 124, 255, 0.08), transparent 26%),
        linear-gradient(180deg, #f8faff 0%, #f3f6fb 220px, #f6f8fc 220px, #f6f8fc 100%);
}

.landing-header-shell {
    width: 100%;
    background: linear-gradient(180deg, rgba(255, 255, 255, 0.92) 0%, rgba(255, 255, 255, 0.78) 100%);
    border-bottom: 1px solid rgba(230, 234, 243, 0.9);
    backdrop-filter: blur(14px);
}

.landing-topbar {
    width: min(1180px, calc(100vw - 64px));
    margin: 0 auto;
    padding: 20px 0;
}

.landing-topbar-inner {
    display: flex;
    justify-content: space-between;
    gap: 24px;
    align-items: center;
}

.landing-brand img {
    max-height: 42px;
    width: auto;
}

.landing-nav {
    display: flex;
    align-items: center;
    gap: 18px;
}

.landing-nav a:not(.btn) {
    color: var(--text);
    font-size: var(--font-size-ui);
}

.landing-main {
    display: grid;
    gap: 56px;
    padding-top: 18px;
}

.landing-hero,
.landing-section {
    width: min(1180px, calc(100vw - 64px));
    margin: 0 auto;
}

.landing-hero {
    padding: 56px 0 16px;
    display: grid;
    grid-template-columns: minmax(0, 1.15fr) minmax(320px, 0.85fr);
    gap: 36px;
    align-items: start;
    position: relative;
}

.landing-hero-copy h1 {
    max-width: 10.5ch;
    margin-bottom: 20px;
}

.landing-hero-copy p {
    max-width: 56ch;
    font-size: 1.08rem;
}

.landing-actions {
    display: flex;
    gap: 12px;
    flex-wrap: wrap;
    margin-top: 24px;
}

.landing-showcase {
    display: grid;
    gap: 18px;
    padding-top: 8px;
}

.landing-showcase-panel,
.landing-showcase-metrics,
.landing-feature-grid article,
.landing-steps article,
.landing-cta {
    background: #fff;
    border: 1px solid var(--line);
    border-radius: 6px;
    box-shadow: 0 18px 40px rgba(23, 32, 51, 0.05);
}

.landing-showcase-panel {
    padding: 30px;
    display: grid;
    gap: 8px;
}

.landing-showcase-panel small,
.landing-showcase-metrics span,
.landing-steps article strong {
    color: var(--muted);
    text-transform: uppercase;
    letter-spacing: 0.08em;
    font-size: 0.74rem;
    font-weight: 700;
}

.landing-showcase-panel strong {
    font-size: 1.35rem;
}

.landing-showcase-metrics {
    padding: 20px 24px;
    display: grid;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 14px;
}

.landing-showcase-metrics div {
    display: grid;
    gap: 4px;
}

.landing-showcase-metrics strong {
    font-size: 1rem;
}

.landing-section {
    display: grid;
    gap: 22px;
}

.landing-section .section-head {
    align-items: end;
}

.landing-feature-grid {
    display: grid;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 18px;
}

.landing-feature-grid article {
    padding: 26px;
}

.landing-feature-grid h3 {
    margin-bottom: 10px;
}

.landing-section-alt {
    padding: 6px 0;
}

.landing-split {
    display: grid;
    grid-template-columns: minmax(0, 0.8fr) minmax(0, 1.2fr);
    gap: 30px;
    align-items: start;
}

.landing-steps {
    display: grid;
    gap: 14px;
}

.landing-steps article {
    padding: 24px;
    display: grid;
    grid-template-columns: 56px minmax(0, 1fr);
    gap: 18px;
}

.landing-steps article strong {
    width: 56px;
    height: 56px;
    border-radius: 50%;
    display: grid;
    place-items: center;
    background: rgba(79, 124, 255, 0.08);
    color: var(--text);
    border: 1px solid rgba(79, 124, 255, 0.12);
}

.landing-cta {
    padding: 30px;
    display: flex;
    justify-content: space-between;
    gap: 24px;
    align-items: center;
    background: linear-gradient(135deg, #fff 0%, rgba(255, 255, 255, 0.86) 100%);
}

@media (max-width: 960px) {
    .landing-topbar-inner,
    .landing-hero,
    .landing-split,
    .landing-feature-grid {
        grid-template-columns: 1fr;
    }

    .landing-topbar-inner {
        display: grid;
    }

    .landing-nav {
        flex-wrap: wrap;
    }

    .landing-showcase-metrics {
        grid-template-columns: 1fr;
    }

    .landing-cta {
        flex-direction: column;
        align-items: flex-start;
    }
}
