/*
  Site refresh, loaded after style.css.
  Palette comes from Vietnamese paperwork: white form paper, navy print ink,
  the red of the company seal (matches the logo) and blue ballpoint for focus.
*/
:root {
    --paper: #ffffff;
    --form: #f4f5f7;
    --rule: #e0e3e9;
    --ink: #1a2233;
    --muted: #5a6375;
    --seal: #c62127;
    --seal-dark: #a1171c;
    --pen: #2446a8;
    --cream: #f8f2e6;
    --gold: #b8862b;
    --gold-ink: #85600f;
    --font: "Be Vietnam Pro", system-ui, -apple-system, "Segoe UI", Roboto, sans-serif;
}

body {
    background: var(--paper);
    color: var(--ink);
    font-family: var(--font);
    font-size: 16px;
    line-height: 1.6;
    -webkit-font-smoothing: antialiased;
}

h1, h2, h3, h4, h5, h6,
.nav-menu a, #mobile-nav a, .btn, button, input, select, textarea {
    font-family: var(--font);
}

h1, h2, h3, h4, h5, h6 {
    color: var(--ink);
}

a {
    color: var(--seal);
    transition: color .15s, background-color .15s;
}

a:hover, a:focus {
    color: var(--seal-dark);
}

a:focus-visible, button:focus-visible, input:focus-visible, select:focus-visible {
    outline: 2px solid var(--pen);
    outline-offset: 2px;
}

/* ---------- Buttons & fields ---------- */
.btn-seal {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    height: 48px;
    padding: 0 22px;
    border: 0;
    border-radius: 6px;
    background: var(--seal);
    color: #fff;
    font-size: 15px;
    font-weight: 600;
    line-height: 1;
    white-space: nowrap;
    cursor: pointer;
}

.btn-seal:hover, .btn-seal:focus {
    background: var(--seal-dark);
    color: #fff;
}

.field {
    height: 48px;
    min-width: 0;
    padding: 0 14px;
    border: 1px solid var(--rule);
    border-radius: 6px;
    background: #fff;
    color: var(--ink);
    font-size: 15px;
}

.field:focus {
    border-color: var(--pen);
    outline: none;
    box-shadow: 0 0 0 3px rgba(36, 70, 168, .15);
}

/* ---------- Header ---------- */
#header {
    height: auto;
    padding: 0;
    background: var(--paper);
    border-bottom: 1px solid var(--rule);
    box-shadow: none;
}

.header-bar {
    display: flex;
    align-items: center;
    gap: 24px;
    min-height: 68px;
}

#header #logo img {
    display: block;
    width: auto;
    max-height: 38px;
}

#header #logo h1 {
    font-size: 22px;
    font-weight: 700;
    letter-spacing: -0.01em;
}

#header #logo h1 a, #header #logo h1 a span {
    color: var(--seal);
}

#nav-menu-container {
    float: none;
    margin-left: auto;
}

.nav-menu > li {
    margin-left: 2px;
}

.nav-menu a {
    padding: 8px 10px;
    color: var(--ink);
    font-size: 15px;
    font-weight: 500;
}

.nav-menu li:hover > a, .nav-menu > .menu-active > a {
    color: var(--seal);
}

.nav-menu ul {
    margin-top: 8px;
    padding: 6px;
    border: 1px solid var(--rule);
    border-radius: 8px;
    box-shadow: 0 12px 32px rgba(26, 34, 51, .08);
}

.nav-menu ul li a {
    padding: 8px 12px;
    border-radius: 4px;
    color: var(--ink);
    font-size: 14px;
}

.nav-menu ul li:hover > a {
    background: var(--form);
    color: var(--ink);
}

/* Auth links live in .header-auth on desktop and in the cloned #mobile-nav on phones */
.nav-menu .nav-auth {
    display: none;
}

.header-auth {
    display: flex;
    align-items: center;
    gap: 18px;
    font-size: 15px;
    font-weight: 500;
    white-space: nowrap;
}

.header-auth a {
    color: var(--ink);
}

.header-auth a:hover {
    color: var(--seal);
}

#mobile-nav {
    background: var(--ink);
}

#mobile-nav-toggle {
    margin: 14px 12px 0 0;
}

#mobile-nav-toggle i {
    color: var(--ink);
}

body.mobile-nav-active #mobile-nav-toggle i {
    color: #fff;
}

/* The full menu plus auth links needs ~1000px; below that use the slide-out nav */
@media (max-width: 991px) {
    .header-bar {
        min-height: 64px;
    }

    #nav-menu-container, .header-auth {
        display: none;
    }

    #mobile-nav-toggle {
        display: inline;
    }
}

/* ---------- Shared page parts ---------- */
.section {
    padding: 35px 0;
    scroll-margin-top: 24px; /* keep the heading clear of the fixed header on #anchor jumps */
}

.section-alt {
    background: var(--form);
}

.section-head {
    display: flex;
    flex-wrap: wrap;
    align-items: baseline;
    justify-content: space-between;
    gap: 8px 24px;
    margin-bottom: 28px;
}

.section-head h2 {
    margin: 0;
    font-size: 30px;
    font-weight: 700;
    letter-spacing: -0.02em;
}

.section-head a {
    font-weight: 600;
}

.page-head {
    padding: 56px 0 28px;
}

.page-head h1 {
    margin: 0;
    font-size: clamp(2rem, 1.5rem + 2vw, 2.75rem);
    font-weight: 700;
    line-height: 1.15;
    letter-spacing: -0.025em;
}

.page-head p {
    max-width: 60ch;
    margin: 10px 0 0;
    color: var(--muted);
    font-size: 17px;
}

.pager {
    display: flex;
    flex-wrap: wrap;
    justify-content: center;
    gap: 6px;
    margin: 40px 0 0;
    padding: 0;
    list-style: none;
}

.pager a, .pager span {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-width: 40px;
    height: 40px;
    padding: 0 10px;
    border-radius: 6px;
    color: var(--ink);
    font-weight: 500;
    font-variant-numeric: tabular-nums;
}

.pager a:hover {
    background: var(--form);
    color: var(--ink);
}

.pager [aria-current] {
    background: var(--ink);
    color: #fff;
}

.empty {
    padding: 48px 0;
}

.empty h2 {
    margin: 0 0 6px;
    font-size: 22px;
    font-weight: 600;
}

.empty p {
    margin: 0;
    color: var(--muted);
}

/* ---------- Home ---------- */
/* Featured course: big title left, cream perks card with the teacher right */
.feature {
    padding: 30px 0;
}

.feature .container {
    display: grid;
    grid-template-columns: minmax(0, 7fr) minmax(0, 5fr);
    gap: 48px;
    align-items: center;
}

.feature-tag {
    display: inline-block;
    margin-bottom: 20px;
    padding: 7px 16px;
    border: 1px solid var(--gold);
    border-radius: 999px;
    background: var(--seal-dark);
    color: #fff;
    font-size: 14px;
    font-weight: 700;
    letter-spacing: .06em;
    text-transform: uppercase;
}

.feature h1 {
    max-width: 22ch;
    margin: 0 0 20px;
    font-size: clamp(1.75rem, 1.25rem + 1.5vw, 2.5rem);
    font-weight: 700;
    line-height: 1.1;
    letter-spacing: -0.03em;
    text-wrap: balance;
}

.feature .lede {
    max-width: 50ch;
    margin: 0 0 32px;
    color: var(--muted);
    font-size: 19px;
}

.hero-actions {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: 16px 28px;
}

.btn-feature {
    height: 56px;
    padding: 0 30px;
    font-size: 17px;
    box-shadow: 0 8px 20px -8px rgba(161, 23, 28, .6);
}

.consult {
    display: flex;
    flex-wrap: wrap;
    gap: 4px 12px;
    margin: 0;
    color: var(--ink);
    font-weight: 600;
}

.consult a {
    color: var(--ink);
    font-variant-numeric: tabular-nums;
    white-space: nowrap;
}

.consult a:hover {
    color: var(--seal);
}

.feature-card {
    padding: 24px;
    border-radius: 16px;
    background: var(--cream);
}

.feature-expert {
    margin: 0 0 24px;
}

.feature-expert img {
    display: block;
    width: 100%;
    aspect-ratio: 4 / 3;
    border-radius: 12px;
    background: var(--rule);
    object-fit: cover;
}

.feature-expert .expert-badge {
    display: inline-flex;
    margin-bottom: 8px;
    align-items: center;
    gap: 8px;
    padding: 4px 10px;
    border: 1px solid var(--gold);
    border-radius: 999px;
    background: #12284f;
    color: #f3d796;
    font-size: 12px;
    font-weight: 700;
    letter-spacing: .04em;
    text-transform: uppercase;
}

.feature-expert figcaption {
    margin-top: 12px;
    line-height: 1.4;
}

.feature-expert strong {
    display: block;
    font-size: 18px;
}

.feature-expert figcaption span {
    color: var(--muted);
    font-size: 15px;
}

.feature-card h2 {
    margin: 0 0 14px;
    color: #12284f;
    font-size: 24px;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: -0.01em;
}

.feature-card h2 span {
    color: var(--gold-ink);
    white-space: nowrap;
}

.perks {
    margin: 0;
    padding: 0;
    list-style: none;
}

.perks li {
    position: relative;
    padding: 7px 0 7px 38px;
    font-size: 17px;
    line-height: 1.45;
}

.perks li::before {
    content: "\f00c";
    position: absolute;
    top: 7px;
    left: 0;
    display: grid;
    place-items: center;
    width: 26px;
    height: 26px;
    border-radius: 50%;
    background: var(--gold);
    color: #fff;
    font: 13px/1 FontAwesome;
}

/* Course parts read like the contents page of a textbook */
.syllabus {
    margin: 0;
    padding: 0;
    list-style: none;
    border-top: 1px solid var(--rule);
}

.syllabus > li {
    display: grid;
    grid-template-columns: 80px minmax(0, 5fr) minmax(0, 6fr);
    gap: 8px 32px;
    padding: 28px 0;
    border-bottom: 1px solid var(--rule);
}

.syllabus-num {
    color: var(--seal);
    font-size: 56px;
    font-weight: 700;
    line-height: .9;
    letter-spacing: -0.04em;
    font-variant-numeric: tabular-nums;
}

.syllabus h3 {
    margin: 0 0 10px;
    font-size: 21px;
    font-weight: 600;
    line-height: 1.35;
    letter-spacing: -0.01em;
}

.syllabus-more {
    font-size: 15px;
    font-weight: 600;
}

.syllabus-topics {
    font-size: 15px;
}

/* Module bodies come from CKEditor with inline fonts; let the page type win */
.syllabus-topics font, .syllabus-topics span {
    color: inherit !important;
    font: inherit !important;
}

.syllabus-topics ul {
    margin: 0;
    padding: 0;
    list-style: none;
    columns: 2;
    column-gap: 32px;
}

.syllabus-topics li {
    position: relative;
    padding: 4px 0 4px 18px;
    break-inside: avoid;
}

.syllabus-topics li::before {
    content: "";
    position: absolute;
    top: 1em;
    left: 0;
    width: 8px;
    height: 1px;
    background: var(--muted);
}

.syllabus-topics p {
    margin: 0;
}

.teacher {
    display: grid;
    grid-template-columns: 280px minmax(0, 1fr);
    gap: 40px;
    align-items: start;
}

.teacher + .teacher {
    margin-top: 48px;
    padding-top: 48px;
    border-top: 1px solid var(--rule);
}

.teacher > img {
    display: block;
    width: 100%;
    aspect-ratio: 4 / 5;
    border-radius: 12px;
    background: var(--rule);
    object-fit: cover;
}

.teacher h3 {
    margin: 0;
    font-size: 26px;
    font-weight: 700;
    letter-spacing: -0.02em;
}

.teacher-role {
    margin: 4px 0 12px;
    color: var(--muted);
}

.teacher-role span::before {
    content: " · ";
}

.teacher-links {
    display: flex;
    flex-wrap: wrap;
    gap: 8px 20px;
    margin-bottom: 20px;
    font-weight: 600;
}

/* Career timeline: a 2-column table typed in CKEditor (period | detail) */
.teacher-bio table {
    width: 100% !important;
    border: 0 !important;
    border-collapse: collapse;
}

.teacher-bio td {
    padding: 14px 0 !important;
    border: 0 !important;
    border-top: 1px solid var(--rule) !important;
    vertical-align: top;
}

.teacher-bio td:first-child {
    width: 130px;
    padding-right: 24px !important;
    color: var(--pen);
    font-weight: 700;
    white-space: nowrap;
}

.teacher-bio font, .teacher-bio span {
    color: inherit !important;
    font: inherit !important;
}

.teacher-bio p {
    margin: 0;
}

.teacher-bio ul {
    margin: 6px 0 0;
    padding-left: 20px;
}

@media (max-width: 991px) {
    .feature .container, .teacher {
        grid-template-columns: minmax(0, 1fr);
        gap: 32px;
    }

    .teacher > img {
        max-width: 320px;
    }

    .syllabus > li {
        grid-template-columns: 64px minmax(0, 1fr);
    }

    .syllabus-topics {
        grid-column: 2;
    }

    .syllabus-num {
        font-size: 44px;
    }
}

@media (max-width: 575px) {
    .feature {
        padding: 40px 0;
    }

    .feature .lede {
        font-size: 17px;
    }

    .feature-card {
        padding: 16px;
    }

    .teacher-bio td {
        display: block;
        width: auto !important;
    }

    .teacher-bio td:first-child {
        padding-bottom: 0 !important;
    }

    .teacher-bio td + td {
        border-top: 0 !important;
        padding-top: 4px !important;
    }

    .section {
        padding: 25px 0;
    }

    .section-head h2 {
        font-size: 26px;
    }

    .syllabus > li {
        grid-template-columns: 44px minmax(0, 1fr);
        gap: 6px 16px;
        padding: 22px 0;
    }

    .syllabus-num {
        font-size: 34px;
    }

    .syllabus h3 {
        font-size: 18px;
    }

    .syllabus-topics ul {
        columns: 1;
    }
}

/* ---------- Document list ---------- */
.filters {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
    padding: 12px;
    border-radius: 10px;
    background: var(--form);
}

.filters .field {
    flex: 1 1 170px;
    height: 44px;
}

.filters .field-wide {
    flex: 2 1 240px;
}

.filters .btn-seal {
    height: 44px;
}

.doc-list {
    margin: 8px 0 0;
    padding: 0;
    list-style: none;
}

.doc-row {
    display: grid;
    grid-template-columns: 168px minmax(0, 1fr);
    gap: 24px;
    align-items: start;
    padding: 24px 0;
    border-bottom: 1px solid var(--rule);
}

.doc-thumb img {
    display: block;
    width: 100%;
    aspect-ratio: 16 / 9;
    border-radius: 6px;
    background: var(--form);
    object-fit: cover;
}

.doc-row h2 {
    margin: 0 0 6px;
    font-size: 19px;
    font-weight: 600;
    line-height: 1.35;
}

.doc-row h2 a, .post-grid h2 a {
    color: var(--ink);
}

.doc-row h2 a:hover, .post-grid h2 a:hover {
    color: var(--seal);
}

.doc-brief {
    display: -webkit-box;
    margin: 0 0 12px;
    overflow: hidden;
    color: var(--muted);
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
}

.doc-meta {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: 6px 16px;
    color: var(--muted);
    font-size: 14px;
}

.doc-meta time, .post-meta time {
    font-variant-numeric: tabular-nums;
}

/* Outlined like a rubber stamp on a form */
.stamp {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    padding: 1px 8px;
    border: 1.5px solid currentColor;
    border-radius: 4px;
    font-size: 13px;
    font-weight: 600;
    line-height: 1.6;
}

.stamp-free {
    color: var(--seal);
}

.stamp-paid {
    color: var(--ink);
}

@media (max-width: 575px) {
    .doc-row {
        grid-template-columns: 96px minmax(0, 1fr);
        gap: 16px;
        padding: 20px 0;
    }

    .doc-row h2 {
        font-size: 17px;
    }

    .doc-brief {
        -webkit-line-clamp: 3;
    }
}

/* ---------- Post list ---------- */
.post-grid {
    display: grid;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 40px 32px;
    margin: 0;
    padding: 0;
    list-style: none;
}

.post-grid img {
    display: block;
    width: 100%;
    aspect-ratio: 16 / 10;
    margin-bottom: 14px;
    border-radius: 8px;
    background: var(--form);
    object-fit: cover;
}

.post-meta {
    display: flex;
    flex-wrap: wrap;
    gap: 4px 12px;
    color: var(--muted);
    font-size: 14px;
}

.post-meta .flag {
    color: var(--seal);
    font-weight: 600;
}

.post-grid h2 {
    margin: 6px 0 0;
    font-size: 18px;
    font-weight: 600;
    line-height: 1.4;
}

@media (max-width: 991px) {
    .post-grid {
        grid-template-columns: repeat(2, minmax(0, 1fr));
    }
}

@media (max-width: 575px) {
    .post-grid {
        grid-template-columns: minmax(0, 1fr);
    }
}

/* ---------- Footer ---------- */
.site-footer {
    padding: 48px 0 28px;
    border-top: 1px solid var(--rule);
    background: var(--paper);
    color: var(--muted);
    font-size: 15px;
}

.footer-grid {
    display: grid;
    grid-template-columns: minmax(0, 2fr) minmax(0, 1fr) minmax(0, 1fr);
    gap: 32px;
}

.site-footer h2 {
    margin: 0 0 8px;
    color: var(--ink);
    font-size: 16px;
    font-weight: 600;
}

.site-footer address, .site-footer p {
    margin: 0 0 4px;
    font-style: normal;
}

.site-footer a {
    color: var(--ink);
}

.site-footer a:hover {
    color: var(--seal);
}

.footer-bottom {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    justify-content: space-between;
    gap: 12px;
    margin-top: 32px;
    padding-top: 20px;
    border-top: 1px solid var(--rule);
    font-size: 14px;
}

.footer-bottom .credit {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    font-weight: 600;
    vertical-align: middle;
}

@media (max-width: 767px) {
    .footer-grid {
        grid-template-columns: minmax(0, 1fr);
        gap: 20px;
    }
}

.listing {
    padding-bottom: 80px;
}

.post-grid .empty {
    grid-column: 1 / -1;
}

.site-footer .footer-note {
    max-width: 48ch;
    margin-top: 10px;
    font-size: 14px;
}

/* ---------- Detail pages ---------- */
.detail-head {
    max-width: 860px;
    padding: 40px 0 28px;
}

.crumb {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    margin-bottom: 12px;
    color: var(--muted);
    font-size: 15px;
    font-weight: 500;
}

.crumb:hover {
    color: var(--seal);
}

.detail-head h1 {
    margin: 0 0 14px;
    font-size: clamp(1.75rem, 1.35rem + 1.6vw, 2.5rem);
    font-weight: 700;
    line-height: 1.2;
    letter-spacing: -0.02em;
    text-wrap: balance;
}

/* Rich text from CKEditor: keep the author's structure, drop their fonts */
.prose {
    max-width: 760px;
    font-size: 17px;
    line-height: 1.75;
    overflow-wrap: break-word;
}

.prose [style*="font-family"], .prose font {
    font-family: inherit !important;
}

.prose p, .prose ul, .prose ol, .prose table, .prose blockquote {
    margin: 0 0 1em;
}

.prose h1, .prose h2, .prose h3, .prose h4 {
    margin: 1.6em 0 .6em;
    font-weight: 700;
    line-height: 1.3;
}

.prose a {
    color: var(--seal);
    text-decoration: underline;
    text-decoration-thickness: 1px;
    text-underline-offset: 3px;
}

.prose img {
    max-width: 100%;
    height: auto;
    border-radius: 6px;
}

.prose iframe {
    display: block;
    width: 100%;
    max-width: 100%;
    height: auto;
    aspect-ratio: 16 / 9;
    margin: 0 auto;
    border: 0;
    border-radius: 8px;
}

.prose table {
    display: block;
    max-width: 100%;
    overflow-x: auto;
    border-collapse: collapse;
    font-size: 15px;
}

.prose th, .prose td {
    padding: 8px 12px;
    border: 1px solid var(--rule);
    vertical-align: top;
}

.prose th {
    background: var(--form);
    font-weight: 600;
}

.prose blockquote {
    padding-left: 16px;
    border-left: 3px solid var(--rule);
    color: var(--muted);
}

.doc-intro {
    margin-bottom: 32px;
}

/* Document reader: contents list beside the page on desktop */
.doc-reader {
    padding-top: 28px;
    border-top: 1px solid var(--rule);
}

.doc-reader.has-toc {
    display: grid;
    grid-template-columns: 300px minmax(0, 1fr);
    gap: 48px;
    align-items: start;
}

.toc {
    position: sticky;
    top: 96px;
    max-height: calc(100vh - 120px);
    overflow-y: auto;
}

.toc summary {
    display: flex;
    align-items: baseline;
    justify-content: space-between;
    gap: 12px;
    padding: 4px 0 12px;
    font-size: 17px;
    font-weight: 600;
    cursor: pointer;
    list-style: none;
}

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

.toc summary span {
    color: var(--muted);
    font-size: 14px;
    font-weight: 400;
}

.toc ol {
    margin: 0;
    padding: 0;
    list-style: none;
    counter-reset: toc;
}

.toc li {
    counter-increment: toc;
}

.toc a {
    display: grid;
    grid-template-columns: 28px minmax(0, 1fr) auto;
    gap: 4px;
    align-items: baseline;
    padding: 7px 8px;
    border-radius: 6px;
    color: var(--ink);
    font-size: 15px;
    line-height: 1.4;
}

.toc a::before {
    content: counter(toc);
    color: var(--muted);
    font-size: 13px;
    font-variant-numeric: tabular-nums;
}

.toc a:hover {
    background: var(--form);
    color: var(--ink);
}

.toc a[aria-current] {
    background: #eef1f9; /* faint --pen tint */
    color: var(--pen);
    font-weight: 600;
}

.toc a[aria-current]::before {
    color: var(--pen);
}

.toc .fa-lock {
    color: var(--muted);
    font-size: 13px;
}

.toc a[aria-current] .fa-lock {
    color: var(--pen);
}

.doc-page-title {
    max-width: 760px;
    margin: 0 0 20px;
    font-size: 24px;
    font-weight: 700;
    letter-spacing: -0.015em;
}

.versions:empty {
    display: none;
}

.versions {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: 6px;
    margin-bottom: 20px;
    font-size: 14px;
}

.versions::before {
    content: "Phiên bản:";
    margin-right: 4px;
    color: var(--muted);
}

.versions a {
    padding: 3px 10px;
    border: 1px solid var(--rule);
    border-radius: 999px;
    background: #fff;
    color: var(--ink);
    font-size: 13px;
    font-weight: 500;
}

.versions a.badge-primary {
    border-color: var(--ink);
    background: var(--ink);
    color: #fff;
}

/* Paywall and not-found notices come from edgeUtils as Bootstrap alerts */
#pageContent .alert {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: 10px 12px;
    padding: 24px;
    border: 0;
    border-radius: 10px;
    background: var(--form);
    color: var(--ink);
    font-size: 16px;
    font-weight: 600;
}

#pageContent .alert .fa-exclamation-triangle {
    color: var(--seal);
}

#pageContent .alert .btn {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    padding: 9px 16px;
    border: 1px solid var(--seal);
    border-radius: 6px;
    background: var(--seal);
    color: #fff;
    font-size: 15px;
    text-decoration: none;
}

#pageContent .alert .btn + .btn {
    background: transparent;
    color: var(--seal);
}

.page-steps {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 16px;
    max-width: 760px;
    margin-top: 48px;
    padding-top: 24px;
    border-top: 1px solid var(--rule);
}

.page-steps a {
    display: flex;
    flex-direction: column;
    gap: 2px;
    color: var(--ink);
    font-weight: 600;
    line-height: 1.4;
}

.page-steps a:hover {
    color: var(--seal);
}

.page-steps small {
    color: var(--muted);
    font-size: 13px;
    font-weight: 500;
}

.page-steps .step-next {
    grid-column: 2;
    text-align: right;
}

@media (max-width: 991px) {
    .doc-reader.has-toc {
        grid-template-columns: minmax(0, 1fr);
        gap: 24px;
    }

    .toc {
        position: static;
        max-height: none;
        border: 1px solid var(--rule);
        border-radius: 10px;
        padding: 12px 12px 4px;
    }

    .toc summary {
        padding: 4px 4px 8px;
    }
}

@media (max-width: 575px) {
    .detail-head {
        padding-top: 28px;
    }

    .prose {
        font-size: 16px;
    }

    .page-steps {
        grid-template-columns: minmax(0, 1fr);
    }

    .page-steps .step-next {
        grid-column: 1;
    }
}

/* Post page */
.article-layout.has-aside {
    display: grid;
    grid-template-columns: minmax(0, 1fr) 300px;
    gap: 56px;
}

.related {
    padding-top: 40px;
}

.related h2 {
    margin: 0 0 16px;
    font-size: 18px;
    font-weight: 600;
}

.related ul {
    margin: 0;
    padding: 0;
    list-style: none;
}

.related li + li {
    border-top: 1px solid var(--rule);
}

.related a {
    display: grid;
    grid-template-columns: 88px minmax(0, 1fr);
    gap: 12px;
    align-items: center;
    padding: 12px 0;
    color: var(--ink);
    font-size: 15px;
    font-weight: 500;
    line-height: 1.4;
}

.related a:hover {
    color: var(--seal);
}

.related img {
    width: 100%;
    aspect-ratio: 16 / 9;
    border-radius: 4px;
    background: var(--form);
    object-fit: cover;
}

@media (max-width: 991px) {
    .article-layout.has-aside {
        grid-template-columns: minmax(0, 1fr);
        gap: 24px;
    }

    .related {
        padding-top: 24px;
        border-top: 1px solid var(--rule);
    }
}

/* ---------- Contact ---------- */
.contact-layout {
    display: grid;
    grid-template-columns: minmax(0, 7fr) minmax(0, 4fr);
    gap: 56px;
    align-items: start;
}

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

.form-grid .form-group {
    margin: 0;
}

.form-grid .form-wide {
    grid-column: 1 / -1;
}

.form-grid label {
    display: block;
    margin-bottom: 6px;
    font-size: 15px;
    font-weight: 600;
}

.form-grid .field {
    width: 100%;
}

.form-grid textarea.field {
    height: auto;
    padding: 12px 14px;
    resize: vertical;
}

.field.error-field {
    border-color: var(--seal);
    box-shadow: 0 0 0 3px rgba(198, 33, 39, .12);
}

.form-actions {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: 12px 20px;
    margin-top: 24px;
}

.form-sent {
    display: none;
    margin: 0;
    color: #1f7a3d;
    font-weight: 600;
}

.contact-panel {
    display: grid;
    gap: 22px;
    padding: 28px;
    border-radius: 12px;
    background: var(--form);
}

.contact-panel h2 {
    margin: 0 0 4px;
    color: var(--muted);
    font-size: 14px;
    font-weight: 500;
}

.contact-panel p, .contact-panel address {
    margin: 0;
    font-style: normal;
}

.contact-panel a {
    color: var(--ink);
    font-weight: 600;
    overflow-wrap: anywhere;
}

.contact-panel a:hover {
    color: var(--seal);
}

.contact-panel .contact-phone {
    font-size: 26px;
    font-weight: 700;
    letter-spacing: -0.01em;
    font-variant-numeric: tabular-nums;
}

.contact-note {
    padding-top: 18px;
    border-top: 1px solid var(--rule);
    color: var(--muted);
    font-size: 14px;
}

@media (max-width: 991px) {
    .contact-layout {
        grid-template-columns: minmax(0, 1fr);
        gap: 32px;
    }
}

@media (max-width: 575px) {
    .form-grid {
        grid-template-columns: minmax(0, 1fr);
    }

    .contact-panel {
        padding: 20px;
    }
}

/* ketoanexcel.org is offline; its images in old post bodies only show as broken icons */
img[src*="ketoanexcel.org"] {
    display: none !important;
}
