:root {
    --txng-guide-green: #1f6b45;
    --txng-guide-green-dark: #12402b;
    --txng-guide-green-soft: #e7f0e9;
    --txng-guide-paper: #f5f7f3;
    --txng-guide-white: #ffffff;
    --txng-guide-ink: #17251d;
    --txng-guide-muted: #66766d;
    --txng-guide-border: #dce5dd;
    --txng-guide-shadow: 0 18px 50px rgba(18, 64, 43, 0.08);
}

.txng-guide-page {
    margin: 0;
    min-height: 100vh;
    background: var(--txng-guide-paper);
    color: var(--txng-guide-ink);
    font-family: 'Be Vietnam Pro', -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif;
}

.txng-guide-page * {
    box-sizing: border-box;
}

.txng-guide-shell {
    min-height: 100vh;
}

.txng-guide-header {
    position: sticky;
    top: 0;
    z-index: 20;
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 24px;
    min-height: 72px;
    padding: 12px clamp(20px, 4vw, 64px);
    background: rgba(255, 255, 255, 0.94);
    border-bottom: 1px solid var(--txng-guide-border);
    backdrop-filter: blur(14px);
}

.txng-guide-brand,
.txng-guide-back {
    color: inherit;
    text-decoration: none;
}

.txng-guide-brand {
    display: inline-flex;
    align-items: center;
    gap: 12px;
}

.txng-guide-brand-mark {
    display: grid;
    width: 38px;
    height: 38px;
    place-items: center;
    border-radius: 8px;
    background: var(--txng-guide-green);
    color: #fff;
    font-family: 'Archivo', sans-serif;
    font-weight: 800;
    letter-spacing: -0.08em;
}

.txng-guide-brand strong,
.txng-guide-brand small {
    display: block;
}

.txng-guide-brand strong {
    color: var(--txng-guide-green-dark);
    font-family: 'Archivo', sans-serif;
    font-size: 18px;
}

.txng-guide-brand small {
    margin-top: 2px;
    color: var(--txng-guide-muted);
    font-size: 11px;
}

.txng-guide-back {
    padding: 9px 14px;
    border: 1px solid var(--txng-guide-border);
    border-radius: 6px;
    color: var(--txng-guide-green-dark);
    font-size: 13px;
    font-weight: 600;
    transition: background 0.2s ease, border-color 0.2s ease;
}

.txng-guide-back:hover,
.txng-guide-back:focus-visible {
    background: var(--txng-guide-green-soft);
    border-color: #b8d0bd;
}

.txng-guide-layout {
    display: grid;
    grid-template-columns: minmax(220px, 280px) minmax(0, 1fr);
    gap: clamp(24px, 4vw, 64px);
    width: min(1480px, 100%);
    margin: 0 auto;
    padding: 38px clamp(20px, 4vw, 64px) 72px;
}

.txng-guide-sidebar {
    align-self: start;
    position: sticky;
    top: 104px;
    max-height: calc(100vh - 132px);
    overflow: auto;
    padding: 22px 18px;
    border: 1px solid var(--txng-guide-border);
    border-radius: 10px;
    background: var(--txng-guide-white);
    box-shadow: var(--txng-guide-shadow);
}

.txng-guide-sidebar-heading {
    padding: 0 10px 14px;
    border-bottom: 1px solid var(--txng-guide-border);
}

.txng-guide-eyebrow {
    display: block;
    color: var(--txng-guide-green);
    font-family: 'IBM Plex Mono', ui-monospace, monospace;
    font-size: 10px;
    font-weight: 700;
    letter-spacing: 0.14em;
}

.txng-guide-sidebar h1,
.txng-guide-toolbar h2 {
    margin: 6px 0 0;
    font-family: 'Archivo', 'Be Vietnam Pro', sans-serif;
    letter-spacing: -0.03em;
}

.txng-guide-sidebar h1 {
    font-size: 23px;
}

.txng-guide-toc {
    display: grid;
    gap: 2px;
    padding-top: 12px;
}

.txng-guide-toc-link {
    display: block;
    padding: 8px 10px;
    border-left: 2px solid transparent;
    border-radius: 0 5px 5px 0;
    color: var(--txng-guide-muted);
    font-size: 12px;
    line-height: 1.45;
    text-decoration: none;
    transition: color 0.2s ease, background 0.2s ease, border-color 0.2s ease;
}

.txng-guide-toc-link.level-3 {
    padding-left: 24px;
    color: #7a887f;
    font-size: 11px;
}

.txng-guide-toc-link:hover,
.txng-guide-toc-link:focus-visible,
.txng-guide-toc-link.is-active {
    border-left-color: var(--txng-guide-green);
    background: var(--txng-guide-green-soft);
    color: var(--txng-guide-green-dark);
}

.txng-guide-main {
    min-width: 0;
}

.txng-guide-toolbar {
    display: flex;
    align-items: end;
    justify-content: space-between;
    gap: 16px;
    margin-bottom: 18px;
}

.txng-guide-toolbar h2 {
    font-size: clamp(24px, 3vw, 36px);
}

.txng-guide-mobile-toggle {
    display: none;
    padding: 8px 12px;
    border: 1px solid var(--txng-guide-border);
    border-radius: 6px;
    background: var(--txng-guide-white);
    color: var(--txng-guide-green-dark);
    cursor: pointer;
    font: inherit;
    font-size: 12px;
    font-weight: 600;
}

.txng-guide-status {
    margin-bottom: 16px;
    padding: 10px 14px;
    border: 1px solid #d6e5d8;
    border-radius: 6px;
    background: #f1f8f2;
    color: var(--txng-guide-green-dark);
    font-size: 12px;
}

.txng-guide-status.is-loaded {
    color: var(--txng-guide-muted);
}

.txng-guide-status.is-error {
    border-color: #e6c8c4;
    background: #fff4f2;
    color: #8d3028;
}

.txng-guide-content {
    max-width: 980px;
    padding: clamp(26px, 4vw, 58px);
    border: 1px solid var(--txng-guide-border);
    border-radius: 10px;
    background: var(--txng-guide-white);
    box-shadow: var(--txng-guide-shadow);
    font-size: 15px;
    line-height: 1.75;
}

.txng-guide-content h1,
.txng-guide-content h2,
.txng-guide-content h3,
.txng-guide-content h4,
.txng-guide-content h5,
.txng-guide-content h6 {
    scroll-margin-top: 104px;
    color: var(--txng-guide-green-dark);
    font-family: 'Archivo', 'Be Vietnam Pro', sans-serif;
    line-height: 1.25;
}

.txng-guide-content h1 {
    margin: 0 0 28px;
    padding-bottom: 20px;
    border-bottom: 2px solid var(--txng-guide-green);
    font-size: clamp(30px, 4vw, 46px);
}

.txng-guide-content h2 {
    margin: 48px 0 16px;
    padding-top: 10px;
    border-top: 1px solid var(--txng-guide-border);
    font-size: clamp(24px, 3vw, 32px);
}

.txng-guide-content h1 + h2 {
    margin-top: 28px;
}

.txng-guide-content h3 {
    margin: 34px 0 12px;
    color: var(--txng-guide-green);
    font-size: 21px;
}

.txng-guide-content h4,
.txng-guide-content h5,
.txng-guide-content h6 {
    margin: 24px 0 8px;
    font-size: 17px;
}

.txng-guide-content p {
    margin: 0 0 15px;
}

.txng-guide-content a {
    color: var(--txng-guide-green);
    font-weight: 600;
}

.txng-guide-content a:hover,
.txng-guide-content a:focus-visible {
    color: var(--txng-guide-green-dark);
}

.txng-guide-content ul,
.txng-guide-content ol {
    margin: 0 0 18px;
    padding-left: 26px;
}

.txng-guide-content li {
    margin: 5px 0;
    padding-left: 4px;
}

.txng-guide-content blockquote {
    margin: 20px 0;
    padding: 14px 18px;
    border-left: 4px solid var(--txng-guide-green);
    background: #f2f7f2;
    color: #3e5548;
}

.txng-guide-content blockquote p:last-child {
    margin-bottom: 0;
}

.txng-guide-content code {
    padding: 2px 5px;
    border-radius: 4px;
    background: #eef2ed;
    color: #7d4223;
    font-family: 'IBM Plex Mono', ui-monospace, monospace;
    font-size: 0.9em;
}

.txng-guide-content pre {
    margin: 20px 0;
    overflow-x: auto;
    padding: 16px;
    border-radius: 7px;
    background: #12251b;
    color: #ecf5ed;
}

.txng-guide-content pre code {
    padding: 0;
    background: transparent;
    color: inherit;
}

.txng-guide-table-wrap {
    width: 100%;
    margin: 18px 0 24px;
    overflow-x: auto;
    border: 1px solid var(--txng-guide-border);
    border-radius: 7px;
}

.txng-guide-content table {
    width: 100%;
    min-width: 620px;
    border-collapse: collapse;
    font-size: 13px;
    line-height: 1.5;
}

.txng-guide-content th,
.txng-guide-content td {
    padding: 10px 12px;
    border-bottom: 1px solid var(--txng-guide-border);
    text-align: left;
    vertical-align: top;
}

.txng-guide-content th {
    background: #edf4ee;
    color: var(--txng-guide-green-dark);
    font-weight: 700;
}

.txng-guide-content tr:last-child td {
    border-bottom: 0;
}

.txng-guide-content hr {
    margin: 32px 0;
    border: 0;
    border-top: 1px solid var(--txng-guide-border);
}

.txng-guide-figure {
    margin: 22px 0 28px;
    padding: 12px;
    border: 1px solid var(--txng-guide-border);
    border-radius: 8px;
    background: #f8faf8;
}

.txng-guide-figure img {
    display: block;
    width: 100%;
    max-width: 100%;
    height: auto;
    border: 1px solid #e2e9e3;
    border-radius: 5px;
    box-shadow: 0 8px 24px rgba(18, 64, 43, 0.08);
}

.txng-guide-figure figcaption {
    margin: 9px 2px 0;
    color: var(--txng-guide-muted);
    font-size: 12px;
    line-height: 1.45;
    text-align: center;
}

.txng-guide-error {
    padding: 24px;
    border: 1px solid #e6c8c4;
    border-radius: 7px;
    background: #fff4f2;
    color: #8d3028;
}

.txng-guide-error code {
    display: block;
    margin-top: 12px;
    overflow-x: auto;
}

.txng-guide-loading,
.txng-guide-empty {
    margin: 0;
    padding: 10px;
    color: var(--txng-guide-muted);
    font-size: 12px;
}

@media (max-width: 960px) {
    .txng-guide-layout {
        display: block;
    }

    .txng-guide-mobile-toggle {
        display: inline-flex;
    }

    .txng-guide-sidebar {
        position: fixed;
        top: 80px;
        left: 20px;
        z-index: 15;
        width: min(320px, calc(100vw - 40px));
        max-height: calc(100vh - 100px);
        transform: translateX(calc(-100% - 30px));
        transition: transform 0.2s ease;
    }

    .txng-guide-sidebar.is-open {
        transform: translateX(0);
    }

    .txng-guide-content {
        max-width: none;
    }
}

@media (max-width: 600px) {
    .txng-guide-header {
        min-height: 64px;
        padding: 10px 16px;
    }

    .txng-guide-brand small {
        display: none;
    }

    .txng-guide-back {
        padding: 7px 9px;
        font-size: 11px;
    }

    .txng-guide-layout {
        padding: 24px 14px 48px;
    }

    .txng-guide-toolbar {
        align-items: center;
    }

    .txng-guide-toolbar h2 {
        font-size: 24px;
    }

    .txng-guide-content {
        padding: 22px 18px;
        font-size: 14px;
    }
}
