html,
body {
    height: 100%;
}

body {
    margin: 0;
    display: block;
    height: 100%;
    overflow: hidden;
    background-color: var(--bg-app);
}

.booklet-site-shell {
    width: 100%;
    height: 100vh;
    display: flex;
    flex-direction: column;
    overflow: hidden;
    color: var(--text-main);
    font-family: 'Inter', -apple-system, BlinkMacSystemFont, sans-serif;
    background-color: var(--bg-app);
}

.booklet-topbar {
    flex: 0 0 auto;
    background: var(--bg-sidebar);
    border-bottom: 1px solid var(--border-color);
    box-shadow: 1px 0 15px rgba(0, 0, 0, 0.03);
}

.booklet-topbar-inner {
    width: 100%;
    max-width: 1680px;
    min-height: 76px;
    margin: 0 auto;
    padding: 0 24px;
    display: flex;
    justify-content: space-between;
    align-items: center;
    gap: 20px;
}

.booklet-brand {
    text-decoration: none;
    color: inherit;
    flex-shrink: 0;
}

.booklet-brand.logo {
    padding: 0;
    border-bottom: none;
}

.booklet-badge {
    background: #dbeafe;
    color: #1e3a8a;
}

.booklet-nav {
    display: flex;
    gap: 12px;
    flex-wrap: wrap;
    justify-content: flex-end;
}

.booklet-nav a {
    display: inline-flex;
    align-items: center;
    min-height: 40px;
    padding: 0 14px;
    border-radius: 999px;
    color: var(--text-muted);
    text-decoration: none;
    font-weight: 600;
    transition: background-color 0.2s ease, color 0.2s ease;
}

.booklet-nav a:hover,
.booklet-nav a:focus-visible {
    background: #fff;
    color: var(--text-main);
    outline: none;
}

.booklet-main {
    flex: 1;
    min-height: 0;
    overflow: auto;
    padding: 20px 24px 36px;
    background:
        radial-gradient(circle at top left, rgba(37, 99, 235, 0.06), transparent 20%),
        linear-gradient(180deg, #eef4fb 0%, #f8fafc 100%);
}

.booklet-main-inner {
    width: 100%;
    max-width: 1680px;
    margin: 0 auto;
}

.booklet-hero {
    background: linear-gradient(135deg, rgba(15, 76, 129, 0.98), rgba(29, 78, 216, 0.92));
    color: #fff;
    padding: 36px 32px;
    border-radius: 24px;
    box-shadow: 0 16px 38px rgba(15, 23, 42, 0.10);
}

.booklet-eyebrow {
    margin: 0 0 10px;
    text-transform: uppercase;
    letter-spacing: 0.14em;
    font-size: 0.78rem;
    font-weight: 700;
    opacity: 0.82;
}

.booklet-hero h1 {
    margin: 0;
    font-size: clamp(2rem, 4vw, 3.2rem);
    line-height: 1.05;
    letter-spacing: -0.04em;
}

.booklet-hero-copy {
    margin: 14px 0 0;
    max-width: 760px;
    font-size: 1.05rem;
    line-height: 1.75;
    color: rgba(255, 255, 255, 0.88);
}

.booklet-breadcrumbs {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
    margin: 20px 2px 0;
    font-size: 0.9rem;
    color: #64748b;
}

.booklet-breadcrumbs a {
    color: #0f4c81;
    text-decoration: none;
}

.crumb-sep {
    color: #94a3b8;
}

.booklet-section {
    margin-top: 26px;
}

.section-heading {
    display: flex;
    justify-content: space-between;
    gap: 24px;
    align-items: flex-end;
    margin-bottom: 16px;
}

.section-heading h2 {
    margin: 0;
    font-size: 1.45rem;
}

.section-heading p {
    margin: 0;
    max-width: 680px;
    color: #64748b;
    line-height: 1.7;
}

.booklet-intro-grid,
.detail-grid {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 18px;
}

.intro-panel,
.booklet-card,
.category-card,
.detail-main-card,
.detail-sidebar-card,
.booklet-footer {
    background: rgba(255, 255, 255, 0.92);
    border: 1px solid rgba(226, 232, 240, 0.95);
    box-shadow: 0 10px 24px rgba(15, 23, 42, 0.05);
}

.intro-panel,
.detail-main-card,
.detail-sidebar-card {
    border-radius: 22px;
    padding: 22px 24px;
}

.intro-panel h2,
.detail-sidebar-card h2 {
    margin: 0 0 10px;
    font-size: 1.15rem;
}

.intro-panel p,
.detail-overview,
.detail-note,
.detail-sidebar-card dd {
    margin: 0;
    color: #475569;
    line-height: 1.75;
}

.category-grid,
.booklet-grid {
    display: grid;
    gap: 18px;
}

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

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

.category-card,
.booklet-card {
    border-radius: 22px;
    padding: 22px 24px;
    text-decoration: none;
    color: inherit;
    transition: transform 0.18s ease, box-shadow 0.18s ease, border-color 0.18s ease;
}

.category-card:hover,
.booklet-card:hover {
    transform: translateY(-3px);
    box-shadow: 0 18px 36px rgba(15, 23, 42, 0.10);
    border-color: #cbd5e1;
}

.category-kicker,
.booklet-status,
.booklet-type,
.detail-priority {
    display: inline-flex;
    align-items: center;
    padding: 6px 10px;
    border-radius: 999px;
    font-size: 0.76rem;
    font-weight: 700;
    letter-spacing: 0.04em;
}

.category-kicker {
    margin-bottom: 14px;
    background: #dbeafe;
    color: #1d4ed8;
}

.category-card h3,
.booklet-card h3 {
    margin: 0;
    font-size: 1.18rem;
    line-height: 1.35;
}

.category-card p,
.booklet-card p {
    margin: 12px 0 0;
    color: #64748b;
    line-height: 1.7;
}

.category-count {
    display: inline-block;
    margin-top: 18px;
    color: #0f4c81;
    font-weight: 700;
}

.booklet-card-top,
.detail-status-row,
.detail-action-row {
    display: flex;
    justify-content: space-between;
    align-items: center;
    gap: 12px;
    flex-wrap: wrap;
}

.booklet-status {
    background: #eff6ff;
    color: #1d4ed8;
}

.booklet-status.live {
    background: #ecfdf3;
    color: #166534;
}

.booklet-type,
.detail-priority {
    background: #f1f5f9;
    color: #475569;
}

.booklet-card h3 a {
    color: #0f172a;
    text-decoration: none;
}

.booklet-meta-list {
    list-style: none;
    margin: 16px 0 0;
    padding: 0;
    display: grid;
    gap: 8px;
    color: #334155;
    font-size: 0.92rem;
}

.booklet-card-link {
    display: inline-block;
    margin-top: 18px;
    color: #0f4c81;
    font-weight: 700;
    text-decoration: none;
}

.booklet-detail-grid {
    display: grid;
    grid-template-columns: 1.4fr 0.9fr;
    gap: 18px;
    margin-top: 26px;
}

.detail-action {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    border-radius: 14px;
    padding: 12px 16px;
    font-weight: 700;
    text-decoration: none;
}

.detail-action.disabled {
    background: #e2e8f0;
    color: #64748b;
}

.detail-action.primary {
    background: var(--primary);
    color: #fff;
    box-shadow: 0 4px 6px -1px rgba(37, 99, 235, 0.2);
}

.detail-action.primary:hover,
.detail-action.primary:focus-visible {
    background: var(--primary-hover);
    outline: none;
}

.detail-action.secondary {
    background: #fff;
    color: #0f172a;
    border: 1px solid #cbd5e1;
}

.detail-note {
    margin-top: 18px;
    padding: 14px 16px;
    border-radius: 14px;
    background: #f8fafc;
    border: 1px dashed #cbd5e1;
}

.detail-note.ready {
    background: #ecfdf3;
    border: 1px solid #bbf7d0;
    color: #166534;
}

.detail-note.ready a {
    color: inherit;
    font-weight: 700;
}

.detail-volume-list {
    margin-top: 18px;
    padding-top: 16px;
    border-top: 1px solid #e2e8f0;
}

.detail-volume-label {
    display: block;
    margin-bottom: 10px;
    text-transform: uppercase;
    letter-spacing: 0.08em;
    font-size: 0.75rem;
    color: #64748b;
    font-weight: 700;
}

.detail-volume-links {
    display: flex;
    flex-wrap: wrap;
    gap: 10px;
}

.detail-volume-links a {
    display: inline-flex;
    align-items: center;
    min-height: 40px;
    padding: 0 14px;
    border-radius: 999px;
    background: #eff6ff;
    color: #1d4ed8;
    text-decoration: none;
    font-weight: 700;
}

.detail-file-hint {
    display: inline-block;
    margin-top: 8px;
    color: #64748b;
    font-size: 0.86rem;
}

.detail-facts {
    margin: 0;
    display: grid;
    gap: 14px;
}

.detail-facts div {
    padding-bottom: 14px;
    border-bottom: 1px solid #e2e8f0;
}

.detail-facts div:last-child {
    padding-bottom: 0;
    border-bottom: none;
}

.detail-facts dt {
    margin-bottom: 6px;
    text-transform: uppercase;
    letter-spacing: 0.08em;
    font-size: 0.75rem;
    color: #64748b;
    font-weight: 700;
}

.detail-facts dd {
    margin: 0;
    color: #0f172a;
    line-height: 1.6;
}

.detail-facts a {
    color: #0f4c81;
    text-decoration: none;
}

.booklet-footer {
    margin-top: 28px;
    border-radius: 20px;
    padding: 18px 22px;
    display: flex;
    justify-content: space-between;
    align-items: center;
    gap: 16px;
    color: #64748b;
    font-size: 0.92rem;
}

@media (max-width: 1080px) {
    .category-grid,
    .booklet-grid,
    .booklet-intro-grid,
    .booklet-detail-grid {
        grid-template-columns: 1fr;
    }

    .section-heading {
        flex-direction: column;
        align-items: flex-start;
    }
}

@media (max-width: 720px) {
    .booklet-topbar-inner,
    .booklet-main {
        padding-left: 16px;
        padding-right: 16px;
    }

    .booklet-topbar-inner,
    .booklet-footer {
        flex-direction: column;
        align-items: flex-start;
    }

    .booklet-nav {
        width: 100%;
        justify-content: flex-start;
    }

    .booklet-hero {
        padding: 28px 22px;
        border-radius: 20px;
    }
}
