/* =========================================================
   TRANG PHÒNG CHUYÊN MÔN — FRONTEND R3.2 FINAL INTEGRATION
   Concept: Institutional Directory — Official Department Profiles
   Nguồn pháp lý: Quyết định số 03/QĐ-BQL ngày 28/5/2026
   Phong cách: Biên tập trang trọng — Tối giản cấu trúc — Giàu chiều sâu
   ========================================================= */

:root {
    --dept-navy-950: #071629;
    --dept-navy-900: #0c2340;
    --dept-navy-800: #14355c;
    --dept-crimson-800: #851221;
    --dept-crimson-900: #680d19;
    --dept-gold-600: #9a6d15;
    --dept-gold-500: #b5831f;
    --dept-gold-400: #d19b2c;
    --dept-ivory: #fcfaf5;
    --dept-ivory-warm: #f7f3ea;
    --dept-surface: #ffffff;
    --dept-slate-bg: #f4f7fa;
    --dept-text-main: #0f172a;
    --dept-text-body: #1e293b;
    --dept-text-muted: #526277;
    --dept-border-light: rgba(12, 35, 64, 0.1);
    --dept-border-strong: rgba(12, 35, 64, 0.18);
}

.dept-editorial-hero svg,
.dept-explorer-section svg,
.dept-shared-powers-section svg {
    display: block;
    width: 18px;
    height: 18px;
    fill: none;
    stroke: currentColor;
    stroke-width: 1.85;
    stroke-linecap: round;
    stroke-linejoin: round;
}

.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;
}

/* =========================================================
   1. EDITORIAL HERO — INSTITUTIONAL DIRECTORY HEADER
   ========================================================= */

.dept-editorial-hero {
    position: relative;
    padding: 50px 0 54px;
    background:
        linear-gradient(165deg, #ffffff 0%, var(--dept-ivory) 54%, #eef3f8 100%);
    border-bottom: 1px solid var(--dept-border-light);
    overflow: hidden;
}

.dept-editorial-hero__arch-lines {
    position: absolute;
    inset: 0;
    pointer-events: none;
    background-image:
        linear-gradient(to right, rgba(12, 35, 64, 0.032) 1px, transparent 1px),
        linear-gradient(to bottom, rgba(12, 35, 64, 0.032) 1px, transparent 1px);
    background-size: 64px 64px;
    mask-image: radial-gradient(ellipse 85% 80% at 70% 35%, #000 25%, transparent 100%);
    -webkit-mask-image: radial-gradient(ellipse 85% 80% at 70% 35%, #000 25%, transparent 100%);
}

.dept-editorial-hero__arch-lines::before,
.dept-editorial-hero__arch-lines::after {
    content: "";
    position: absolute;
    pointer-events: none;
}

.dept-editorial-hero__arch-lines::before {
    top: 28px;
    right: 6%;
    width: 280px;
    height: 180px;
    border-top: 1px solid rgba(181, 131, 31, 0.24);
    border-right: 1px solid rgba(181, 131, 31, 0.24);
}

.dept-editorial-hero__arch-lines::after {
    bottom: 0;
    left: 0;
    right: 0;
    height: 3px;
    background: linear-gradient(
        90deg,
        var(--dept-navy-900) 0%,
        var(--dept-navy-900) 45%,
        var(--dept-gold-500) 75%,
        var(--dept-crimson-800) 100%
    );
    opacity: 0.85;
}

.dept-editorial-hero__container {
    position: relative;
    z-index: 1;
    display: grid;
    grid-template-columns: minmax(0, 1.3fr) minmax(320px, 0.7fr);
    gap: 40px;
    align-items: end;
}

.dept-editorial-hero__eyebrow {
    display: inline-flex;
    align-items: center;
    gap: 12px;
    margin-bottom: 14px;
    color: var(--dept-crimson-800);
    font-size: 0.75rem;
    font-weight: 700;
    letter-spacing: 0.09em;
    text-transform: uppercase;
}

.dept-editorial-hero__eyebrow-rule {
    width: 28px;
    height: 2px;
    background-color: var(--dept-crimson-800);
}

.dept-editorial-hero__title {
    margin: 0 0 14px;
    color: var(--dept-navy-900);
    font-family: "Merriweather", Georgia, serif;
    font-size: clamp(1.95rem, 3.1vw, 2.7rem);
    font-weight: 700;
    line-height: 1.22;
    letter-spacing: -0.015em;
}

.dept-editorial-hero__title-accent {
    color: var(--dept-crimson-800);
}

.dept-editorial-hero__lead {
    margin: 0 0 18px;
    max-width: 64ch;
    color: var(--dept-text-body);
    font-size: 1.02rem;
    line-height: 1.7;
}

.dept-editorial-hero__legal-pill {
    display: inline-flex;
    flex-wrap: wrap;
    align-items: center;
    gap: 10px;
    padding: 7px 14px;
    background-color: rgba(255, 255, 255, 0.9);
    border: 1px solid rgba(181, 131, 31, 0.36);
    border-left: 3px solid var(--dept-gold-500);
    border-radius: 4px;
    color: var(--dept-navy-900);
    font-size: 0.84rem;
    font-weight: 600;
}

.dept-editorial-hero__legal-badge {
    padding: 2px 7px;
    background-color: var(--dept-navy-900);
    border-radius: 2px;
    color: #ffffff;
    font-size: 0.68rem;
    font-weight: 700;
    letter-spacing: 0.07em;
    text-transform: uppercase;
}

/* Khung tóm tắt biên tập tinh tế bên phải Hero */
.dept-hero-summary-card {
    position: relative;
    padding: 24px 26px 20px;
    background-color: rgba(255, 255, 255, 0.96);
    border: 1px solid var(--dept-border-strong);
    border-top: 3px solid var(--dept-navy-900);
    border-radius: 4px;
    box-shadow:
        0 14px 32px -12px rgba(12, 35, 64, 0.08),
        0 2px 6px rgba(12, 35, 64, 0.03);
}

.dept-hero-summary-card__kicker {
    margin: 0 0 14px;
    color: var(--dept-gold-600);
    font-size: 0.71rem;
    font-weight: 700;
    letter-spacing: 0.09em;
    text-transform: uppercase;
}

.dept-hero-summary-card__stats {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 14px;
    padding-bottom: 16px;
    border-bottom: 1px solid var(--dept-border-light);
}

.dept-hero-stat {
    display: flex;
    flex-direction: column;
    gap: 3px;
}

.dept-hero-stat strong {
    color: var(--dept-navy-900);
    font-family: "Merriweather", Georgia, serif;
    font-size: 1.65rem;
    font-weight: 700;
    line-height: 1.1;
}

.dept-hero-stat span {
    color: var(--dept-text-muted);
    font-size: 0.78rem;
    font-weight: 600;
}

.dept-hero-stat__divider {
    width: 1px;
    height: 36px;
    background-color: var(--dept-border-light);
}

.dept-hero-summary-card__footer {
    padding-top: 14px;
}

.dept-hero-summary-card__link {
    display: inline-flex;
    align-items: center;
    min-height: 44px;
    gap: 8px;
    color: var(--dept-navy-900);
    font-size: 0.85rem;
    font-weight: 700;
    text-decoration: none;
    transition: color 180ms ease;
}

.dept-hero-summary-card__link svg {
    width: 16px;
    height: 16px;
    color: var(--dept-crimson-800);
    transition: transform 200ms ease;
}

.dept-hero-summary-card__link:hover,
.dept-hero-summary-card__link:focus-visible {
    color: var(--dept-crimson-800);
}

.dept-hero-summary-card__link:hover svg,
.dept-hero-summary-card__link:focus-visible svg {
    transform: translateX(4px);
}

/* =========================================================
   2. EDITORIAL DEPARTMENT EXPLORER SECTION
   ========================================================= */

.dept-explorer-section {
    padding: 56px 0 48px;
    background-color: var(--dept-slate-bg);
}

.dept-explorer-header {
    display: flex;
    flex-wrap: wrap;
    align-items: flex-end;
    justify-content: space-between;
    gap: 20px;
    margin-bottom: 30px;
    padding-bottom: 20px;
    border-bottom: 1px solid var(--dept-border-light);
}

.dept-explorer-header__eyebrow {
    margin: 0 0 6px;
    color: #7a540b; /* gold 700: WCAG 1.4.3 >= 4.5 trên nền #f4f7fa */
    font-size: 0.74rem;
    font-weight: 700;
    letter-spacing: 0.09em;
    text-transform: uppercase;
}

.dept-explorer-header__titles h2 {
    margin: 0;
    color: var(--dept-navy-900);
    font-family: "Merriweather", Georgia, serif;
    font-size: clamp(1.4rem, 2.2vw, 1.85rem);
    font-weight: 700;
    line-height: 1.3;
}

.dept-explorer-header__hint {
    margin: 0;
    max-width: 48ch;
    color: var(--dept-text-muted);
    font-size: 0.9rem;
    line-height: 1.55;
}

/* =========================================================
   3. WORKSPACE 2 CỘT TRÊN DESKTOP
   Bên trái: Editorial Navigation + Khối tách biệt Ban Giám đốc
   Bên phải: Hồ sơ pháp lý của phòng đang chọn
   ========================================================= */

.dept-editorial-workspace {
    display: grid;
    grid-template-columns: minmax(300px, 360px) minmax(0, 1fr);
    gap: 32px;
    align-items: start;
}

.dept-editorial-sidebar {
    position: sticky;
    top: 24px;
    display: flex;
    flex-direction: column;
    gap: 20px;
}

/* --- CỘT TRÁI: VERTICAL EDITORIAL INDEX --- */

.dept-editorial-index {
    background-color: var(--dept-surface);
    border: 1px solid var(--dept-border-strong);
    border-top: 3px solid var(--dept-navy-900);
    border-radius: 4px;
    box-shadow: 0 8px 24px -10px rgba(12, 35, 64, 0.06);
    overflow: hidden;
}

.dept-editorial-index__header {
    display: grid;
    grid-template-columns: 52px minmax(0, 1fr);
    gap: 8px;
    padding: 12px 18px;
    background-color: var(--dept-ivory);
    border-bottom: 1px solid var(--dept-border-light);
    color: var(--dept-text-muted);
    font-size: 0.68rem;
    font-weight: 700;
    letter-spacing: 0.08em;
    text-transform: uppercase;
    white-space: nowrap;
}

.dept-editorial-index__list {
    position: relative;
    display: flex;
    flex-direction: column;
}

/* Thanh nhấn dọc dịch chuyển mượt (Navy + Đỏ đô) */
.dept-editorial-index__active-bar {
    position: absolute;
    top: 0;
    left: 0;
    width: 4px;
    height: var(--active-bar-height, 76px);
    transform: translateY(var(--active-bar-top, 0px));
    background: linear-gradient(
        180deg,
        var(--dept-navy-900) 0%,
        var(--dept-crimson-800) 100%
    );
    transition:
        transform 380ms cubic-bezier(0.22, 1, 0.36, 1),
        height 380ms cubic-bezier(0.22, 1, 0.36, 1);
    z-index: 2;
    pointer-events: none;
}

.dept-index-item {
    position: relative;
    width: 100%;
    display: grid;
    grid-template-columns: 42px minmax(0, 1fr) 20px;
    align-items: center;
    gap: 8px;
    padding: 17px 18px;
    background-color: transparent;
    border: none;
    border-bottom: 1px solid rgba(12, 35, 64, 0.07);
    text-align: left;
    cursor: pointer;
    transition: background-color 220ms ease;
}

.dept-index-item:last-child {
    border-bottom: none;
}

.dept-index-item::after {
    content: "";
    position: absolute;
    left: 60px;
    right: 18px;
    bottom: 8px;
    height: 1px;
    background-color: var(--dept-gold-500);
    transform: scaleX(0);
    transform-origin: left center;
    transition: transform 260ms cubic-bezier(0.22, 1, 0.36, 1);
    pointer-events: none;
}

.dept-index-item:hover,
.dept-index-item:focus-visible {
    background-color: rgba(252, 250, 245, 0.85);
}

.dept-index-item:hover::after,
.dept-index-item:focus-visible::after {
    transform: scaleX(0.45);
}

.dept-index-item:focus-visible {
    outline: 2px solid var(--dept-gold-500);
    outline-offset: -2px;
}

.dept-index-item.is-active {
    background: linear-gradient(
        90deg,
        rgba(12, 35, 64, 0.05) 0%,
        rgba(252, 250, 245, 0.92) 100%
    );
}

.dept-index-item.is-active::after {
    transform: scaleX(0);
}

.dept-index-item__num {
    color: var(--dept-text-muted);
    font-family: "Merriweather", Georgia, serif;
    font-size: 0.92rem;
    font-weight: 700;
    transition: color 200ms ease;
}

.dept-index-item.is-active .dept-index-item__num {
    color: var(--dept-crimson-800);
}

.dept-index-item__body {
    display: flex;
    flex-direction: column;
    gap: 4px;
    min-width: 0;
}

.dept-index-item__name {
    color: var(--dept-navy-900);
    font-size: 0.95rem;
    font-weight: 700;
    line-height: 1.36;
    transition: color 200ms ease;
}

.dept-index-item.is-active .dept-index-item__name {
    color: var(--dept-navy-950);
}

.dept-index-item__meta {
    color: var(--dept-text-muted);
    font-size: 0.76rem;
    font-weight: 500;
}

.dept-index-item__arrow {
    color: var(--dept-text-muted);
    opacity: 0.45;
    transform: translateX(-3px);
    transition:
        opacity 220ms ease,
        transform 220ms ease,
        color 220ms ease;
}

.dept-index-item__arrow svg {
    width: 16px;
    height: 16px;
}

.dept-index-item:hover .dept-index-item__arrow,
.dept-index-item.is-active .dept-index-item__arrow {
    opacity: 1;
    color: var(--dept-crimson-800);
    transform: translateX(0);
}

.dept-editorial-index__footer {
    padding: 11px 18px;
    background-color: var(--dept-ivory);
    border-top: 1px solid var(--dept-border-light);
    color: var(--dept-text-muted);
    font-size: 0.78rem;
}

.dept-editorial-index__footer strong {
    color: var(--dept-navy-900);
}

/* Khối thông tin Ban Giám đốc (Bộ phận lãnh đạo, phân biệt rõ với 04 phòng chuyên môn) */
.dept-leadership-callout {
    padding: 18px 20px;
    background: linear-gradient(160deg, #ffffff 0%, var(--dept-ivory) 100%);
    border: 1px solid rgba(181, 131, 31, 0.35);
    border-left: 4px solid var(--dept-gold-500);
    border-radius: 4px;
    box-shadow: 0 6px 18px -10px rgba(12, 35, 64, 0.06);
}

.dept-leadership-callout__head {
    margin-bottom: 8px;
}

.dept-leadership-callout__badge {
    display: inline-block;
    margin-bottom: 4px;
    color: var(--dept-gold-600);
    font-size: 0.67rem;
    font-weight: 700;
    letter-spacing: 0.08em;
    text-transform: uppercase;
}

.dept-leadership-callout__title {
    margin: 0;
    color: var(--dept-navy-900);
    font-family: "Merriweather", Georgia, serif;
    font-size: 1.02rem;
    font-weight: 700;
}

.dept-leadership-callout__desc {
    margin: 0 0 12px;
    color: var(--dept-text-body);
    font-size: 0.83rem;
    line-height: 1.58;
}

.dept-leadership-callout__foot {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    justify-content: space-between;
    gap: 8px;
    padding-top: 10px;
    border-top: 1px dashed rgba(12, 35, 64, 0.12);
    font-size: 0.78rem;
    color: var(--dept-text-muted);
}

.dept-leadership-callout__link {
    display: inline-flex;
    align-items: center;
    min-height: 44px;
    gap: 5px;
    color: var(--dept-navy-900);
    font-weight: 700;
    text-decoration: none;
    transition: color 160ms ease;
}

.dept-leadership-callout__link svg {
    width: 14px;
    height: 14px;
    color: var(--dept-crimson-800);
}

.dept-leadership-callout__link:hover,
.dept-leadership-callout__link:focus-visible {
    color: var(--dept-crimson-800);
}

/* --- CỘT PHẢI: HỒ SƠ PHÁP LÝ CỦA PHÒNG ĐANG CHỌN --- */

.dept-editorial-stage {
    position: relative;
    min-width: 0;
}

.dept-mobile-accordion-trigger {
    display: none;
}

@media (min-width: 921px) {
    .dept-editorial-workspace.is-enhanced .dept-editorial-item {
        display: none;
    }

    .dept-editorial-workspace.is-enhanced .dept-editorial-item.is-active,
    .dept-editorial-workspace.is-enhanced .dept-editorial-item.is-leaving {
        display: block;
    }
}

.dept-editorial-panel {
    position: relative;
    padding: 36px 40px 32px;
    background-color: var(--dept-surface);
    border: 1px solid var(--dept-border-strong);
    border-top: 4px solid var(--dept-navy-900);
    border-radius: 4px;
    box-shadow:
        0 18px 40px -16px rgba(12, 35, 64, 0.08),
        0 4px 12px rgba(12, 35, 64, 0.03);
}

.dept-editorial-panel::before {
    content: "";
    position: absolute;
    top: 18px;
    right: 18px;
    width: 22px;
    height: 22px;
    border-top: 1px solid rgba(181, 131, 31, 0.45);
    border-right: 1px solid rgba(181, 131, 31, 0.45);
    pointer-events: none;
}

.dept-editorial-panel__header {
    margin-bottom: 26px;
}

.dept-editorial-panel__topline {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    justify-content: space-between;
    gap: 10px;
    margin-bottom: 12px;
}

.dept-editorial-panel__badges {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: 8px;
}

.dept-editorial-panel__order {
    display: inline-flex;
    align-items: center;
    padding: 3px 10px;
    background-color: var(--dept-ivory);
    border: 1px solid rgba(181, 131, 31, 0.35);
    border-radius: 3px;
    color: var(--dept-crimson-800);
    font-size: 0.72rem;
    font-weight: 700;
    letter-spacing: 0.07em;
    text-transform: uppercase;
}

.dept-editorial-panel__duty-count-badge {
    display: inline-flex;
    align-items: center;
    padding: 3px 10px;
    background-color: rgba(12, 35, 64, 0.06);
    border-radius: 3px;
    color: var(--dept-navy-900);
    font-size: 0.72rem;
    font-weight: 700;
}

.dept-editorial-panel__agency {
    color: var(--dept-text-muted);
    font-size: 0.79rem;
    font-weight: 600;
}

.dept-editorial-panel__title {
    margin: 0 0 8px;
    color: var(--dept-navy-900);
    font-family: "Merriweather", Georgia, serif;
    font-size: clamp(1.55rem, 2.3vw, 2rem);
    font-weight: 700;
    line-height: 1.28;
}

.dept-editorial-panel__overview {
    margin: 0 0 18px;
    color: var(--dept-text-muted);
    font-size: 0.94rem;
    line-height: 1.55;
}

/* Đường nhấn kiến trúc bên dưới tiêu đề */
.dept-editorial-panel__title-rule {
    display: flex;
    align-items: center;
    gap: 8px;
    height: 3px;
}

.dept-editorial-panel__title-rule-bar {
    width: 72px;
    height: 3px;
    background-color: var(--dept-crimson-800);
    transform-origin: left center;
    transition: transform 420ms cubic-bezier(0.22, 1, 0.36, 1) 70ms;
}

.dept-editorial-panel__title-rule-gold {
    flex: 1;
    max-width: 140px;
    height: 1px;
    background-color: var(--dept-gold-500);
    transform-origin: left center;
    transition: transform 480ms cubic-bezier(0.22, 1, 0.36, 1) 120ms;
}

/* Khối nội dung chức năng & nhiệm vụ */
.dept-editorial-panel__content {
    display: flex;
    flex-direction: column;
    gap: 26px;
    margin-bottom: 24px;
}

.dept-editorial-block__head {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    justify-content: space-between;
    gap: 8px;
    margin-bottom: 10px;
}

.dept-editorial-block__label {
    margin: 0;
    color: var(--dept-navy-900);
    font-size: 0.78rem;
    font-weight: 700;
    letter-spacing: 0.07em;
    text-transform: uppercase;
}

.dept-editorial-block__source-tag {
    color: #7a540b; /* gold 700: 11.5px/700 trên nền ngà đo glyph-local 4.38 < 4.5 với gold 600 */
    font-size: 0.72rem;
    font-weight: 700;
}

/* Khối Chức năng được ưu tiên trình bày nổi bật */
.dept-editorial-block--lead {
    padding: 22px 24px;
    background: linear-gradient(135deg, var(--dept-ivory) 0%, #ffffff 100%);
    border: 1px solid rgba(181, 131, 31, 0.3);
    border-left: 4px solid var(--dept-gold-500);
    border-radius: 4px;
}

.dept-editorial-block__lead-text {
    margin: 0;
    color: var(--dept-navy-950);
    /* Không dùng Georgia: dấu thanh của ề, ế, ầ, ấ, ồ, ố lấn sang chữ liền kề. */
    font-family: "Times New Roman", Times, serif;
    font-size: 1.01rem;
    line-height: 1.78;
}

/* Thanh công cụ & Danh sách Nhiệm vụ có thứ tự a), b), c)... */
.dept-duties-toolbar {
    display: flex;
    flex-wrap: wrap;
    align-items: flex-end;
    justify-content: space-between;
    gap: 14px;
    margin-bottom: 16px;
    padding-bottom: 12px;
    border-bottom: 1px solid var(--dept-border-light);
}

.dept-duties-toolbar__title-group {
    display: flex;
    flex-direction: column;
    gap: 4px;
}

.dept-duties-toolbar__sub {
    margin: 0;
    color: var(--dept-text-muted);
    font-size: 0.83rem;
    line-height: 1.45;
}

.dept-duties-toggle-btn {
    min-height: 44px;
    display: inline-flex;
    align-items: center;
    gap: 8px;
    padding: 6px 14px;
    background-color: var(--dept-ivory);
    border: 1px solid var(--dept-border-strong);
    border-radius: 4px;
    color: var(--dept-navy-900);
    font-size: 0.81rem;
    font-weight: 700;
    cursor: pointer;
    transition:
        background-color 180ms ease,
        border-color 180ms ease,
        color 180ms ease;
}

.dept-duties-toggle-btn svg {
    width: 15px;
    height: 15px;
    color: var(--dept-crimson-800);
    transition: transform 220ms ease, color 180ms ease;
}

.dept-duties-toggle-btn:hover,
.dept-duties-toggle-btn:focus-visible {
    background-color: var(--dept-navy-900);
    border-color: var(--dept-navy-900);
    color: #ffffff;
}

.dept-duties-toggle-btn:hover svg,
.dept-duties-toggle-btn:focus-visible svg {
    color: var(--dept-gold-400);
}

.dept-editorial-item[data-duties-expanded="true"] .dept-duties-toggle-btn svg,
.dept-editorial-item[data-duties-expanded="true"] .dept-duties-bottom-toggle svg {
    transform: rotate(180deg);
}

/* Danh sách nhiệm vụ pháp lý có thứ tự điểm a, b, c... */
.dept-legal-duties-list {
    list-style: none;
    margin: 0;
    padding: 0;
    display: flex;
    flex-direction: column;
    gap: 10px;
}

.dept-legal-duty-item {
    display: grid;
    grid-template-columns: 38px minmax(0, 1fr);
    gap: 12px;
    align-items: start;
    padding: 14px 16px;
    background-color: #fbfcfe;
    border: 1px solid rgba(12, 35, 64, 0.08);
    border-left: 3px solid var(--dept-navy-800);
    border-radius: 4px;
    transition: border-color 180ms ease, background-color 180ms ease;
}

.dept-legal-duty-item:hover {
    background-color: #ffffff;
    border-color: rgba(12, 35, 64, 0.18);
    border-left-color: var(--dept-crimson-800);
}

.dept-legal-duty-item__marker {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    height: 26px;
    padding: 0 6px;
    background-color: var(--dept-ivory);
    border: 1px solid rgba(181, 131, 31, 0.35);
    border-radius: 3px;
    color: var(--dept-crimson-800);
    font-family: "Merriweather", Georgia, serif;
    font-size: 0.84rem;
    font-weight: 700;
    line-height: 1;
}

.dept-legal-duty-item__body p {
    margin: 0;
    color: var(--dept-text-body);
    font-size: 0.94rem;
    line-height: 1.68;
}

/* Khi JS đã bật và trạng thái đang thu gọn: ẩn các nhiệm vụ từ vị trí thứ 6 trở đi */
.dept-editorial-workspace.is-enhanced
    .dept-editorial-item[data-duties-expanded="false"]
    .dept-legal-duty-item.is-collapsible-duty {
    display: none;
}

.dept-duties-bottom-bar {
    margin-top: 14px;
    display: flex;
    justify-content: center;
}

.dept-duties-bottom-toggle {
    width: 100%;
    min-height: 44px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    padding: 9px 18px;
    background: linear-gradient(180deg, #ffffff 0%, var(--dept-ivory) 100%);
    border: 1px dashed rgba(12, 35, 64, 0.24);
    border-radius: 4px;
    color: var(--dept-navy-900);
    font-size: 0.85rem;
    font-weight: 700;
    cursor: pointer;
    transition:
        background-color 180ms ease,
        border-color 180ms ease,
        color 180ms ease;
}

.dept-duties-bottom-toggle svg {
    width: 16px;
    height: 16px;
    color: var(--dept-crimson-800);
    transition: transform 220ms ease;
}

.dept-duties-bottom-toggle:hover,
.dept-duties-bottom-toggle:focus-visible {
    background: var(--dept-ivory-warm);
    border-style: solid;
    border-color: var(--dept-gold-500);
    color: var(--dept-crimson-800);
}

/* Nguồn trích dẫn ở cuối mỗi phòng */
.dept-editorial-panel__legal-source {
    display: flex;
    align-items: center;
    gap: 8px;
    margin-bottom: 20px;
    padding: 10px 14px;
    background-color: rgba(12, 35, 64, 0.035);
    border-radius: 4px;
    color: var(--dept-text-muted);
    font-size: 0.82rem;
}

.dept-editorial-panel__legal-source strong {
    color: var(--dept-navy-900);
}

.dept-editorial-panel__legal-dot {
    width: 7px;
    height: 7px;
    border-radius: 50%;
    background-color: var(--dept-gold-500);
    flex-shrink: 0;
}

/* Chân panel: Thông tin nhân sự & liên kết điều hướng */
.dept-editorial-panel__footer {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    justify-content: space-between;
    gap: 20px;
    padding-top: 20px;
    border-top: 1px solid var(--dept-border-light);
}

.dept-editorial-panel__personnel {
    display: flex;
    flex-direction: column;
    gap: 3px;
}

.dept-editorial-panel__personnel-label {
    color: var(--dept-text-muted);
    font-size: 0.73rem;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.06em;
}

.dept-editorial-panel__personnel-value {
    color: var(--dept-navy-900);
    font-size: 0.95rem;
    font-weight: 700;
}

.dept-editorial-panel__actions {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: 12px;
}

.dept-editorial-cta {
    min-height: 44px;
    display: inline-flex;
    align-items: center;
    gap: 10px;
    padding: 10px 20px;
    background-color: var(--dept-navy-900);
    border: 1px solid var(--dept-navy-900);
    border-radius: 4px;
    color: #ffffff;
    font-size: 0.87rem;
    font-weight: 700;
    text-decoration: none;
    transition:
        background-color 180ms ease,
        border-color 180ms ease,
        transform 180ms ease,
        box-shadow 180ms ease;
}

.dept-editorial-cta svg {
    width: 16px;
    height: 16px;
    transition: transform 200ms ease;
}

.dept-editorial-cta:hover,
.dept-editorial-cta:focus-visible {
    background-color: var(--dept-crimson-800);
    border-color: var(--dept-crimson-800);
    color: #ffffff;
    transform: translateY(-1px);
    box-shadow: 0 6px 16px rgba(133, 18, 33, 0.2);
}

.dept-editorial-cta:hover svg,
.dept-editorial-cta:focus-visible svg {
    transform: translateX(3px);
}

.dept-editorial-StepNav {
    display: inline-flex;
    align-items: center;
    gap: 6px;
}

.dept-step-btn {
    min-height: 44px;
    display: inline-flex;
    align-items: center;
    gap: 5px;
    padding: 8px 13px;
    background-color: var(--dept-ivory);
    border: 1px solid var(--dept-border-strong);
    border-radius: 4px;
    color: var(--dept-navy-900);
    font-size: 0.82rem;
    font-weight: 700;
    cursor: pointer;
    transition:
        background-color 160ms ease,
        border-color 160ms ease,
        color 160ms ease;
}

.dept-step-btn svg {
    width: 15px;
    height: 15px;
}

.dept-step-btn:hover,
.dept-step-btn:focus-visible {
    background-color: var(--dept-navy-900);
    border-color: var(--dept-navy-900);
    color: #ffffff;
}

/* =========================================================
   4. QUYỀN HẠN CHUNG (ĐIỀU 4) & NGUYÊN TẮC TỔ CHỨC (ĐIỀU 2)
   ========================================================= */

.dept-shared-powers-section {
    padding: 0 0 72px;
    background-color: var(--dept-slate-bg);
}

.dept-shared-powers-card {
    padding: 36px 40px 32px;
    background-color: var(--dept-surface);
    border: 1px solid var(--dept-border-strong);
    border-top: 4px solid var(--dept-crimson-800);
    border-radius: 4px;
    box-shadow:
        0 16px 36px -14px rgba(12, 35, 64, 0.08),
        0 3px 10px rgba(12, 35, 64, 0.03);
}

.dept-shared-powers-header {
    display: flex;
    flex-wrap: wrap;
    align-items: flex-end;
    justify-content: space-between;
    gap: 16px;
    margin-bottom: 26px;
    padding-bottom: 18px;
    border-bottom: 1px solid var(--dept-border-light);
}

.dept-shared-powers-header__eyebrow {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: 10px;
    margin-bottom: 8px;
    color: var(--dept-gold-600);
    font-size: 0.73rem;
    font-weight: 700;
    letter-spacing: 0.08em;
    text-transform: uppercase;
}

.dept-shared-powers-header__badge {
    padding: 2px 8px;
    background-color: var(--dept-crimson-800);
    border-radius: 2px;
    color: #ffffff;
    font-size: 0.68rem;
}

.dept-shared-powers-header h2 {
    margin: 0;
    color: var(--dept-navy-900);
    font-family: "Merriweather", Georgia, serif;
    font-size: clamp(1.35rem, 2vw, 1.7rem);
    font-weight: 700;
    line-height: 1.3;
}

.dept-shared-powers-header__cite {
    margin: 0;
    color: var(--dept-text-muted);
    font-size: 0.85rem;
    font-weight: 600;
}

.dept-shared-powers-grid {
    display: grid;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 20px;
    margin-bottom: 24px;
}

.dept-power-item {
    display: flex;
    flex-direction: column;
    padding: 22px 22px 20px;
    background: linear-gradient(165deg, var(--dept-ivory) 0%, #ffffff 100%);
    border: 1px solid rgba(181, 131, 31, 0.3);
    border-top: 3px solid var(--dept-navy-900);
    border-radius: 4px;
}

.dept-power-item:nth-child(2) {
    border-top-color: var(--dept-gold-500);
}

.dept-power-item:nth-child(3) {
    border-top-color: var(--dept-crimson-800);
}

.dept-power-item__top {
    display: flex;
    align-items: center;
    gap: 10px;
    margin-bottom: 12px;
}

.dept-power-item__num {
    padding: 3px 9px;
    background-color: var(--dept-navy-900);
    border-radius: 3px;
    color: #ffffff;
    font-family: "Merriweather", Georgia, serif;
    font-size: 0.76rem;
    font-weight: 700;
}

.dept-power-item__rule {
    flex: 1;
    height: 1px;
    background-color: rgba(12, 35, 64, 0.12);
}

.dept-power-item__text {
    margin: 0;
    color: var(--dept-text-body);
    font-size: 0.93rem;
    line-height: 1.68;
}

/* Điều 2: Nguyên tắc tổ chức và hoạt động */
.dept-principles-disclosure {
    margin-bottom: 20px;
    background-color: #fbfcfe;
    border: 1px solid var(--dept-border-light);
    border-radius: 4px;
    overflow: hidden;
}

.dept-principles-disclosure__summary {
    list-style: none;
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    justify-content: space-between;
    gap: 12px;
    padding: 14px 18px;
    cursor: pointer;
    user-select: none;
    transition: background-color 180ms ease;
}

.dept-principles-disclosure__summary::-webkit-details-marker {
    display: none;
}

.dept-principles-disclosure__summary:hover {
    background-color: var(--dept-ivory);
}

.dept-principles-disclosure__title {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: 10px;
    color: var(--dept-navy-900);
    font-size: 0.9rem;
}

.dept-principles-disclosure__tag {
    padding: 2px 8px;
    background-color: #7a540b; /* gold 700: chữ trắng >= 4.5 */
    border-radius: 2px;
    color: #ffffff;
    font-size: 0.68rem;
    font-weight: 700;
    letter-spacing: 0.06em;
}

.dept-principles-disclosure__action {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    color: var(--dept-crimson-800);
    font-size: 0.82rem;
    font-weight: 700;
}

.dept-principles-disclosure__action svg {
    width: 16px;
    height: 16px;
    transition: transform 220ms ease;
}

.dept-principles-disclosure[open] .dept-principles-disclosure__action svg {
    transform: rotate(180deg);
}

.dept-principles-disclosure__body {
    padding: 16px 20px 18px;
    border-top: 1px solid var(--dept-border-light);
    background-color: #ffffff;
}

.dept-principles-list {
    list-style: none;
    margin: 0;
    padding: 0;
    display: grid;
    gap: 10px;
}

.dept-principles-list li {
    display: grid;
    grid-template-columns: 28px minmax(0, 1fr);
    gap: 8px;
    align-items: start;
}

.dept-principles-list__num {
    color: var(--dept-crimson-800);
    font-family: "Merriweather", Georgia, serif;
    font-size: 0.88rem;
    font-weight: 700;
}

.dept-principles-list p {
    margin: 0;
    color: var(--dept-text-body);
    font-size: 0.9rem;
    line-height: 1.62;
}

.dept-shared-powers-footer {
    padding-top: 16px;
    border-top: 1px solid var(--dept-border-light);
}

.dept-shared-powers-footer p {
    margin: 0;
    color: var(--dept-text-muted);
    font-size: 0.82rem;
    line-height: 1.55;
}

.dept-shared-powers-footer strong {
    color: var(--dept-navy-900);
}

/* =========================================================
   5. HIỆU ỨNG EDITORIAL CONTENT TRANSITION (350-500ms)
   ========================================================= */

@media (min-width: 921px) {
    .dept-editorial-item.is-leaving .dept-editorial-panel {
        opacity: 0;
        transform: translateY(-5px);
        transition:
            opacity 140ms ease,
            transform 140ms ease;
    }

    .dept-editorial-item.is-entering .dept-anim-step {
        opacity: 0;
        transform: translateY(8px);
    }

    .dept-editorial-item.is-entering .dept-editorial-panel__title-rule-bar,
    .dept-editorial-item.is-entering .dept-editorial-panel__title-rule-gold {
        transform: scaleX(0);
    }

    .dept-editorial-item.is-active:not(.is-entering) .dept-anim-step {
        opacity: 1;
        transform: translateY(0);
        transition:
            opacity 380ms cubic-bezier(0.22, 1, 0.36, 1),
            transform 380ms cubic-bezier(0.22, 1, 0.36, 1);
    }

    .dept-editorial-item.is-active:not(.is-entering) .dept-anim-step--1 {
        transition-delay: 20ms;
    }

    .dept-editorial-item.is-active:not(.is-entering) .dept-anim-step--2 {
        transition-delay: 55ms;
    }

    .dept-editorial-item.is-active:not(.is-entering) .dept-anim-step--3 {
        transition-delay: 95ms;
    }

    .dept-editorial-item.is-active:not(.is-entering) .dept-anim-step--4 {
        transition-delay: 135ms;
    }

    .dept-editorial-item.is-active:not(.is-entering) .dept-anim-step--5 {
        transition-delay: 175ms;
    }

    .dept-editorial-item.is-active:not(.is-entering) .dept-editorial-panel__title-rule-bar,
    .dept-editorial-item.is-active:not(.is-entering) .dept-editorial-panel__title-rule-gold {
        transform: scaleX(1);
    }
}

/* =========================================================
   6. MOBILE ACCORDION LAYOUT (<= 920px)
   ========================================================= */

@media (max-width: 920px) {
    .dept-editorial-hero {
        padding: 34px 0 38px;
    }

    .dept-editorial-hero__container {
        grid-template-columns: 1fr;
        gap: 24px;
    }

    .dept-explorer-section {
        padding: 36px 0 36px;
    }

    .dept-editorial-workspace {
        grid-template-columns: 1fr;
        gap: 20px;
    }

    .dept-editorial-sidebar {
        position: static;
        order: 2;
    }

    /* Ẩn danh mục tab dọc của Desktop trên màn hình nhỏ, giữ khối Ban Giám đốc bên dưới */
    .dept-editorial-index {
        display: none;
    }

    .dept-editorial-stage {
        order: 1;
        display: flex;
        flex-direction: column;
        gap: 14px;
    }

    .dept-editorial-item {
        background-color: var(--dept-surface);
        border: 1px solid var(--dept-border-strong);
        border-left: 4px solid var(--dept-navy-900);
        border-radius: 4px;
        overflow: hidden;
        transition: border-color 200ms ease, box-shadow 200ms ease;
    }

    .dept-editorial-item.is-active {
        border-left-color: var(--dept-crimson-800);
        box-shadow: 0 10px 24px -10px rgba(12, 35, 64, 0.12);
    }

    .dept-mobile-accordion-trigger {
        width: 100%;
        display: grid;
        grid-template-columns: 36px minmax(0, 1fr) 24px;
        align-items: center;
        gap: 10px;
        padding: 16px 16px;
        background-color: var(--dept-surface);
        border: none;
        text-align: left;
        cursor: pointer;
    }

    .dept-editorial-item.is-active .dept-mobile-accordion-trigger {
        background-color: var(--dept-ivory);
        border-bottom: 1px solid var(--dept-border-light);
    }

    .dept-mobile-accordion-trigger__num {
        color: var(--dept-crimson-800);
        font-family: "Merriweather", Georgia, serif;
        font-size: 0.92rem;
        font-weight: 700;
    }

    .dept-mobile-accordion-trigger__info {
        display: flex;
        flex-direction: column;
        gap: 3px;
        min-width: 0;
    }

    .dept-mobile-accordion-trigger__info strong {
        color: var(--dept-navy-900);
        font-size: 0.98rem;
        font-weight: 700;
        line-height: 1.35;
    }

    .dept-mobile-accordion-trigger__info small {
        color: var(--dept-text-muted);
        font-size: 0.77rem;
    }

    .dept-mobile-accordion-trigger__icon {
        display: inline-flex;
        align-items: center;
        justify-content: center;
        color: var(--dept-navy-900);
        transition: transform 240ms ease;
    }

    .dept-editorial-item.is-active .dept-mobile-accordion-trigger__icon {
        transform: rotate(180deg);
        color: var(--dept-crimson-800);
    }

    .dept-editorial-workspace.is-enhanced .dept-editorial-item:not(.is-active) .dept-editorial-panel {
        display: none;
    }

    .dept-editorial-panel {
        padding: 20px 16px 20px;
        border: none;
        border-radius: 0;
        box-shadow: none;
    }

    .dept-editorial-panel::before {
        display: none;
    }

    .dept-editorial-block--lead {
        padding: 16px 16px;
    }

    .dept-duties-toolbar {
        flex-direction: column;
        align-items: stretch;
    }

    .dept-duties-toggle-btn {
        width: 100%;
        justify-content: center;
    }

    .dept-legal-duty-item {
        grid-template-columns: 34px minmax(0, 1fr);
        gap: 10px;
        padding: 12px 12px;
    }

    .dept-editorial-StepNav {
        display: none;
    }

    .dept-editorial-cta {
        width: 100%;
        justify-content: center;
    }

    .dept-shared-powers-section {
        padding: 0 0 48px;
    }

    .dept-shared-powers-card {
        padding: 22px 18px;
    }

    .dept-shared-powers-grid {
        grid-template-columns: 1fr;
        gap: 14px;
    }
}

@media (prefers-reduced-motion: reduce) {
    .dept-editorial-index__active-bar,
    .dept-index-item,
    .dept-index-item::after,
    .dept-editorial-panel__title-rule-bar,
    .dept-editorial-panel__title-rule-gold,
    .dept-anim-step {
        transition: none !important;
    }
}
