.admin-grid {
    grid-template-columns: repeat(6, minmax(0, 1fr));
    align-items: stretch;
}

.admin-stat {
    min-width: 0;
    min-height: 112px;
    align-content: center;
}

.admin-module-grid {
    display: grid;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 12px;
    margin-top: 24px;
    align-items: stretch;
}

.admin-module-grid > a {
    position: relative;
    display: grid;
    gap: 6px;
    min-width: 0;
    min-height: 104px;
    align-content: center;
    padding: 18px 44px 18px 18px;
    border: 1px solid var(--line, #e5e7df);
    border-radius: 5px;
    background: #fff;
    color: var(--ink, #252923);
    text-decoration: none;
    transition: border-color .2s ease, transform .2s ease;
}

.admin-module-grid > a:hover {
    border-color: #cbd2c7;
    transform: translateY(-1px);
}

.admin-module-grid > a strong {
    font-family: var(--serif, Georgia, serif);
    font-size: 16px;
    font-weight: 500;
}

.admin-module-grid > a span {
    color: #7c857a;
    font-size: 11px;
    line-height: 1.6;
}

.admin-module-grid > a b {
    position: absolute;
    top: 18px;
    right: 18px;
    color: #89948a;
    font-size: 13px;
    font-weight: 400;
}

.admin-toolbar .button,
.admin-form-actions .button,
.admin-filter .button {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    line-height: 1.35;
    align-content: center;
}

.admin-form,
.admin-upload-form {
    box-sizing: border-box;
    width: 100%;
    max-width: none;
}

.rich-editor-area img,
.article-body img {
    max-width: 100%;
    height: auto;
}

.article-body table {
    width: 100%;
    margin: 18px 0;
    border-collapse: collapse;
    font-size: 13px;
    line-height: 1.7;
}

.article-body th,
.article-body td {
    padding: 8px 11px;
    border: 1px solid #e3e7de;
    text-align: left;
    vertical-align: top;
}

.article-body th {
    background: #f6f8f4;
    color: #49523f;
    font-weight: 600;
}

.article-body tbody tr:nth-child(even) td {
    background: #fbfcf9;
}

.article-body th[align="center"],
.article-body td[align="center"] {
    text-align: center;
}

.article-body th[align="right"],
.article-body td[align="right"] {
    text-align: right;
}

.article-body ul ul,
.article-body ul ol,
.article-body ol ul,
.article-body ol ol {
    margin: 6px 0 4px;
}

.article-body li > ul,
.article-body li > ol {
    margin-top: 5px;
}

.article-body li::marker {
    color: #93a08f;
}

[data-font-size="small"] {
    font-size: 0.875em;
}

[data-font-size="normal"] {
    font-size: 1em;
}

[data-font-size="large"] {
    font-size: 1.25em;
}

[data-font-size="huge"] {
    font-size: 1.5em;
}

[data-editor-status] {
    flex-basis: 100%;
    color: var(--muted, #7c857a);
    font-size: 12px;
}

.editor-toolbar .editor-file-button {
    display: inline-flex;
    align-items: center;
    min-height: 29px;
    padding: 0 9px;
    border: 1px solid #e1e4dc;
    border-radius: 3px;
    background: #f8f9f6;
    color: #566254;
    cursor: pointer;
    font-size: 10px;
    line-height: 1;
}

.editor-toolbar .editor-file-button:hover {
    border-color: #b9c7b5;
    background: #f1f5ee;
}

.editor-toolbar .editor-file-button.is-uploading {
    opacity: .55;
    pointer-events: none;
}

.markdown-source {
    box-sizing: border-box;
    width: 100%;
    min-height: 320px;
    padding: 14px 16px;
    border: 1px solid #e1e5dc;
    border-radius: 4px;
    background: #fff;
    color: #333a32;
    font-family: ui-monospace, SFMono-Regular, Consolas, "Liberation Mono", monospace;
    font-size: 13px;
    line-height: 1.9;
    tab-size: 4;
    resize: vertical;
}

.markdown-source:focus {
    outline: 2px solid #cdd8c9;
    outline-offset: 1px;
}

.admin-form-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
    align-items: start;
}

.admin-form-grid .field-wide {
    grid-column: 1 / -1;
}

.admin-form-heading h2 {
    margin: 0;
    font-family: var(--serif, Georgia, serif);
    font-size: 20px;
    font-weight: 500;
}

.admin-form-heading p {
    margin: 6px 0 0;
    color: #7c857a;
    font-size: 12px;
    line-height: 1.6;
}

.admin-submit-row {
    align-items: center;
}

.admin-submit-row small {
    flex: 1 1 320px;
    max-width: 600px;
    line-height: 1.6;
}

.admin-filter {
    display: grid;
    grid-template-columns: minmax(180px, 1fr) minmax(220px, 1.4fr) auto;
    align-items: end;
    gap: 14px;
    padding: 16px;
    margin: 0 0 20px;
    border: 1px solid var(--line, #e5e7df);
    border-radius: 5px;
    background: #fff;
}

.admin-filter > label {
    min-width: 0;
}

.admin-filter-actions {
    display: flex;
    align-items: center;
    flex-wrap: wrap;
    gap: 14px;
}

.admin-filter .text-link {
    font-size: 11px;
    white-space: nowrap;
}

.admin-table td.table-actions {
    display: table-cell;
    white-space: nowrap;
}

.admin-actions {
    display: inline-flex;
    align-items: center;
    flex-wrap: wrap;
    gap: 6px;
}

.admin-actions form {
    display: inline-flex;
    margin: 0;
}

.admin-actions .admin-action-button {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-height: 30px;
    padding: 5px 9px;
    border: 1px solid #e1e5dc;
    border-radius: 4px;
    background: #fff;
    color: #536b55;
    font: inherit;
    font-size: 11px;
    line-height: 1.2;
    text-decoration: none;
    cursor: pointer;
    transition: background-color .15s ease, border-color .15s ease;
}

.admin-actions .admin-action-button:hover {
    border-color: #b9c7b5;
    background: #f4f7f2;
}

.admin-actions .admin-action-button.is-approve {
    border-color: #c8dcc3;
    background: #f2f8f0;
    color: #4f7149;
}

.admin-actions .admin-action-button.is-approve:hover {
    border-color: #a9c8a2;
    background: #e9f4e5;
}

.admin-actions .admin-action-button.is-danger {
    color: #a66f5d;
}

.alert-info {
    border: 1px solid #dbe6f1;
    background: #eef4fa;
    color: #5b7590;
}

.admin-actions .admin-action-button.is-danger:hover {
    border-color: #e7c8bc;
    background: #fff7f3;
}

.admin-primary-cell {
    color: #333a32;
    font-weight: 600;
}

.admin-primary-cell .table-secondary {
    overflow-wrap: anywhere;
    white-space: normal;
}

.admin-badge {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-height: 23px;
    padding: 3px 8px;
    border: 1px solid transparent;
    border-radius: 999px;
    font-size: 10px;
    line-height: 1.2;
    white-space: nowrap;
}

.admin-badge.is-success,
.admin-badge.status-active,
.admin-badge.status-visible {
    border-color: #d8e6d5;
    background: #f1f7ef;
    color: #52704d;
}

.admin-badge.status-pending {
    border-color: #efdfbb;
    background: #fff9eb;
    color: #947337;
}

.admin-badge.status-awaiting_review {
    border-color: #d9e3ec;
    background: #f3f8fc;
    color: #5b7590;
}

.admin-badge.status-disabled,
.admin-badge.status-hidden {
    border-color: #ead9d3;
    background: #fff5f1;
    color: #9d6857;
}

.admin-badge.is-neutral {
    border-color: #e2e5de;
    background: #f7f8f5;
    color: #697266;
}

.admin-badge.is-accent {
    border-color: #dce5ed;
    background: #f1f6fa;
    color: #5c7183;
}

.admin-table-wrap {
    margin-bottom: 18px;
    box-shadow: 0 2px 10px rgb(33 40 31 / 3%);
}

.admin-table th {
    height: 40px;
    white-space: nowrap;
}

.admin-table td {
    height: 48px;
}

.admin-table tbody tr {
    transition: background-color .15s ease;
}

.admin-table tbody tr:hover {
    background: #fbfcf9;
}

.moderation-main {
    min-width: 0;
}

.moderation-item {
    align-items: flex-start;
    padding: 19px 16px;
    border: 1px solid var(--line, #e5e7df);
    border-radius: 5px;
    background: #fff;
}

.moderation-list {
    display: grid;
    gap: 10px;
    border-top: 0;
}

.moderation-heading {
    display: flex;
    align-items: center;
    flex-wrap: wrap;
    gap: 9px;
}

.moderation-page {
    color: #4f6651;
    font-size: 12px;
    font-weight: 600;
    text-decoration: none;
}

.moderation-page:hover {
    text-decoration: underline;
    text-underline-offset: 3px;
}

.moderation-main p {
    max-width: 900px;
    margin: 10px 0;
    color: #51594f;
    font-size: 13px;
    line-height: 1.75;
}

.moderation-meta {
    display: flex;
    flex-wrap: wrap;
    gap: 7px;
    color: #899187;
    font-size: 10px;
}

.moderation-meta span + span::before {
    content: "·";
    margin-right: 7px;
    color: #c0c5bc;
}

.moderation-actions {
    align-items: center;
    justify-content: flex-end;
    min-width: 150px;
}

.moderation-actions form {
    display: inline-flex;
}

.status-tabs {
    gap: 8px;
    margin-bottom: 18px;
}

.status-tabs a {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-height: 34px;
    padding: 6px 13px;
    background: #fff;
    text-decoration: none;
}

.status-tabs a:hover {
    border-color: #b9c7b5;
    color: #405c46;
}

.pagination {
    gap: 6px;
}

.pagination a {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-width: 32px;
    min-height: 32px;
    padding: 5px 9px;
    background: #fff;
    text-decoration: none;
}

.visit-url,
.visit-agent {
    min-width: 170px;
    max-width: 300px;
    overflow-wrap: anywhere;
    line-height: 1.5;
}

.search-portal {
    display: grid;
    justify-items: center;
    padding: clamp(50px, 10vw, 104px) 16px 44px;
    text-align: center;
}

.search-portal > .eyebrow {
    justify-content: center;
}

.search-portal h1 {
    margin: 18px 0 8px;
    font-family: var(--serif, Georgia, serif);
    font-size: clamp(38px, 7vw, 62px);
    font-weight: 500;
    letter-spacing: -.045em;
}

.search-portal-subtitle {
    margin: 0 0 30px;
    color: #7c857a;
    font-size: 14px;
}

.search-portal-form {
    display: flex;
    align-items: center;
    width: min(100%, 760px);
    min-height: 64px;
    gap: 10px;
    padding: 7px 8px 7px 19px;
    border: 1px solid #e4e7df;
    border-radius: 8px;
    background: #fff;
    box-shadow: 0 14px 40px rgb(33 40 31 / 7%);
}

.search-portal-form .search-symbol {
    color: #879083;
    font-size: 26px;
}

.search-portal-form input {
    flex: 1;
    min-width: 0;
    border: 0;
    outline: 0;
    color: #252923;
    font: inherit;
    font-size: 15px;
}

.search-portal-form input:focus-visible {
    outline: 2px solid #82937e;
    outline-offset: 4px;
}

.search-portal-form select {
    max-width: 125px;
    min-height: 42px;
    padding: 0 26px 0 10px;
    border: 1px solid #e8eae4;
    border-radius: 5px;
    background: #fafbf8;
    color: #454d43;
    font: inherit;
    font-size: 12px;
}

.search-portal-form .button {
    min-height: 46px;
    white-space: nowrap;
}

.back-to-top {
    position: fixed;
    right: 20px;
    bottom: 20px;
    z-index: 20;
    display: grid;
    width: 46px;
    height: 46px;
    place-items: center;
    border: 1px solid rgb(255 255 255 / 28%);
    border-radius: 50%;
    background: rgb(37 52 45 / 78%);
    box-shadow: 0 5px 18px rgb(25 35 29 / 20%);
    color: #fff;
    font: inherit;
    font-size: 22px;
    line-height: 1;
    opacity: .82;
    cursor: pointer;
    backdrop-filter: blur(6px);
    transition: opacity .2s ease, transform .2s ease;
}

.back-to-top:hover {
    opacity: 1;
    transform: translateY(-2px);
}

.back-to-top:focus-visible {
    outline: 2px solid #82937e;
    outline-offset: 3px;
}

.portal-section {
    margin: 0 auto 30px;
    max-width: 920px;
}

.portal-section-heading {
    display: flex;
    align-items: end;
    justify-content: space-between;
    gap: 16px;
    margin-bottom: 13px;
}

.portal-section-heading .eyebrow {
    color: #92998e;
    font-size: 9px;
}

.portal-section-heading h2 {
    margin: 3px 0 0;
    color: #30362e;
    font-family: var(--serif, Georgia, serif);
    font-size: 22px;
    font-weight: 500;
}

.portal-private-note {
    color: #879083;
    font-size: 11px;
}

.portal-link-row {
    display: grid;
    grid-template-columns: repeat(4, minmax(0, 1fr));
    gap: 10px;
}

.portal-link {
    display: flex;
    align-items: center;
    min-width: 0;
    min-height: 62px;
    gap: 11px;
    padding: 10px 13px;
    border: 1px solid #e8eae4;
    border-radius: 6px;
    background: #fff;
    color: #3c4439;
    font-size: 12px;
    text-decoration: none;
    transition: border-color .18s ease, transform .18s ease;
}

.portal-link:hover,
.portal-bookmark:hover {
    border-color: #cbd2c7;
    transform: translateY(-1px);
}

.portal-link-mark,
.portal-bookmark-mark {
    display: grid;
    flex: 0 0 34px;
    width: 34px;
    height: 34px;
    place-items: center;
    border-radius: 6px;
    background: #f1f3ee;
    color: #556650;
    font-family: var(--serif, Georgia, serif);
    font-size: 12px;
}

.portal-link > span:nth-child(2) {
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.portal-link b {
    margin-left: auto;
    color: #9ba297;
    font-weight: 400;
}

.portal-bookmarks {
    padding: 18px;
    border: 1px solid #e8eae4;
    border-radius: 7px;
    background: #fff;
}

.portal-bookmarks .portal-section-heading {
    margin-bottom: 14px;
}

.portal-bookmark-controls {
    display: flex;
    align-items: center;
    gap: 12px;
}

.bookmark-edit-toggle,
.bookmark-cancel {
    min-height: 32px;
    padding: 5px 12px;
    border: 1px solid #e2e5de;
    border-radius: 4px;
    background: #fff;
    color: #536b55;
    font: inherit;
    font-size: 11px;
    cursor: pointer;
}

.bookmark-edit-toggle:hover,
.bookmark-cancel:hover {
    border-color: #b9c7b5;
    background: #f7f9f5;
}

.portal-bookmark-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(154px, 1fr));
    gap: 8px;
}

.portal-bookmark {
    position: relative;
    min-width: 0;
    max-width: 220px;
    border: 1px solid #e9ebe6;
    border-radius: 5px;
    background: #fff;
    transition: border-color .18s ease, transform .18s ease;
}

.portal-bookmark-open {
    display: flex;
    align-items: center;
    min-width: 0;
    min-height: 50px;
    gap: 9px;
    padding: 7px 10px;
    color: inherit;
    text-decoration: none;
}

.portal-bookmark-icon {
    display: grid;
    flex: 0 0 30px;
    width: 30px;
    height: 30px;
    place-items: center;
    overflow: hidden;
    border-radius: 5px;
    background: #f1f3ee;
    color: #556650;
    font-family: var(--serif, Georgia, serif);
    font-size: 12px;
}

.portal-bookmark-icon img {
    width: 20px;
    height: 20px;
    object-fit: contain;
}

.portal-bookmark-icon img:not([hidden]) + [data-bookmark-icon-fallback] {
    display: none;
}

.portal-bookmark-copy {
    display: grid;
    min-width: 0;
    flex: 1;
}

.portal-bookmark-copy strong {
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
    color: #3d453b;
    font-size: 12px;
    font-weight: 600;
}

.portal-bookmark > form {
    position: absolute;
    z-index: 1;
    top: -7px;
    right: -7px;
    display: none;
}

.bookmark-delete {
    display: grid;
    width: 21px;
    height: 21px;
    place-items: center;
    border: 1px solid #fff;
    border-radius: 50%;
    background: #b66b5c;
    box-shadow: 0 1px 4px rgb(33 40 31 / 18%);
    color: #fff;
    font: inherit;
    font-size: 15px;
    line-height: 1;
    cursor: pointer;
}

.bookmark-delete:hover {
    background: #964e40;
}

.portal-bookmarks.is-editing .portal-bookmark > form {
    display: block;
}

.portal-add-bookmark {
    display: none;
    width: 100%;
    max-width: 220px;
    min-height: 50px;
    place-items: center;
    border: 1px dashed #bdc7b8;
    border-radius: 5px;
    background: #fafbf8;
    color: #73836e;
    font: inherit;
    font-size: 27px;
    cursor: pointer;
}

.portal-add-bookmark:hover {
    border-color: #7e9278;
    background: #f3f6f0;
}

.portal-bookmarks.is-editing .portal-add-bookmark {
    display: grid;
}

.portal-bookmarks.is-editing [data-bookmark-empty] {
    display: none;
}

.bookmark-dialog {
    box-sizing: border-box;
    width: min(440px, calc(100% - 32px));
    max-width: none;
    padding: 0;
    border: 1px solid #e2e5de;
    border-radius: 8px;
    background: #fff;
    color: #333a32;
    box-shadow: 0 20px 70px rgb(25 33 24 / 20%);
}

.bookmark-dialog::backdrop {
    background: rgb(24 30 23 / 45%);
    backdrop-filter: blur(2px);
}

.bookmark-dialog-form {
    display: grid;
    gap: 16px;
    padding: 23px;
}

.bookmark-dialog-heading {
    display: flex;
    align-items: start;
    justify-content: space-between;
}

.bookmark-dialog-heading h3 {
    margin: 5px 0 0;
    font-family: var(--serif, Georgia, serif);
    font-size: 23px;
    font-weight: 500;
}

.bookmark-dialog-close {
    width: 30px;
    height: 30px;
    border: 0;
    border-radius: 4px;
    background: #f4f5f1;
    color: #687264;
    font-size: 20px;
    cursor: pointer;
}

.bookmark-dialog-form label {
    display: grid;
    gap: 6px;
    color: #5b6457;
    font-size: 12px;
}

.bookmark-dialog-form input {
    box-sizing: border-box;
    width: 100%;
    min-height: 42px;
    padding: 9px 11px;
    border: 1px solid #e2e5de;
    border-radius: 4px;
    background: #fff;
    color: #333a32;
    font: inherit;
    font-size: 13px;
}

.bookmark-dialog-actions {
    display: flex;
    align-items: center;
    gap: 9px;
    padding-top: 3px;
}

.bookmark-dialog-actions .button {
    min-height: 38px;
    font-size: 12px;
}

.portal-empty,
.portal-login-prompt {
    padding: 16px;
    border-radius: 5px;
    background: #f7f8f5;
    color: #7c857a;
    font-size: 12px;
    line-height: 1.7;
}

.portal-login-prompt {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: 14px;
}

.portal-login-prompt span {
    flex: 1 1 260px;
}

.portal-login-prompt a {
    color: #52664e;
    font-weight: 600;
    text-decoration: none;
}

.portal-login-prompt a:hover {
    text-decoration: underline;
}

@media (max-width: 900px) {
    .admin-grid {
        grid-template-columns: repeat(3, minmax(0, 1fr));
    }

    .admin-module-grid {
        grid-template-columns: repeat(2, minmax(0, 1fr));
    }
}

@media (max-width: 650px) {
    .search-portal {
        padding-top: 46px;
    }

    .search-portal-form {
        display: grid;
        grid-template-columns: minmax(0, 1fr) minmax(0, 1fr);
        gap: 8px;
        padding: 12px;
    }

    .search-portal-form .search-symbol {
        display: none;
    }

    .search-portal-form input {
        grid-column: 1 / -1;
        min-height: 48px;
        padding: 0 4px;
    }

    .search-portal-form select {
        width: 100%;
        max-width: none;
        min-height: 46px;
    }

    .search-portal-form .button {
        width: 100%;
        min-height: 46px;
    }

    .back-to-top {
        right: 16px;
        bottom: max(16px, env(safe-area-inset-bottom));
    }

    .portal-link-row {
        grid-template-columns: repeat(2, minmax(0, 1fr));
    }

    .portal-bookmarks {
        padding: 14px;
    }

    .portal-bookmark-grid {
        grid-template-columns: repeat(auto-fill, minmax(140px, 1fr));
    }

    .admin-grid {
        grid-template-columns: repeat(2, minmax(0, 1fr));
    }

    .admin-stat:last-child:nth-child(odd) {
        grid-column: 1 / -1;
    }

    .admin-filter {
        grid-template-columns: repeat(2, minmax(0, 1fr));
    }

    .admin-form-grid {
        grid-template-columns: minmax(0, 1fr);
    }

    .admin-form-grid .field-wide {
        grid-column: auto;
    }

    .admin-filter-actions {
        grid-column: 1 / -1;
    }

    .admin-toolbar {
        align-items: center;
        flex-wrap: wrap;
    }

    .moderation-item {
        flex-direction: column;
        gap: 14px;
    }

    .moderation-actions {
        justify-content: flex-start;
        width: 100%;
    }

    .admin-submit-row {
        align-items: flex-start;
        flex-direction: column;
    }
}

@media (prefers-reduced-motion: reduce) {
    .back-to-top {
        transition: none;
    }
}

@media (max-width: 440px) {
    .admin-module-grid,
    .admin-form-grid,
    .admin-filter {
        grid-template-columns: minmax(0, 1fr);
    }

    .admin-filter-actions {
        grid-column: auto;
        align-items: stretch;
    }

    .admin-filter-actions .button {
        flex: 1;
    }

    .admin-form-grid .field-wide {
        grid-column: auto;
    }

    .admin-form-actions .button {
        width: 100%;
    }

    .moderation-item {
        padding: 15px 12px;
    }

    .moderation-actions {
        display: grid;
        grid-template-columns: repeat(2, minmax(0, 1fr));
    }

    .moderation-actions form,
    .moderation-actions .admin-action-button {
        width: 100%;
    }
}
.comment-location {
    display: block;
    margin-top: 4px;
    color: #a1a69e;
    font-size: 10px;
}

.flash-notice {
    position: fixed;
    z-index: 1000;
    bottom: calc(16px + env(safe-area-inset-bottom, 0px));
    left: 50%;
    box-sizing: border-box;
    width: max-content;
    max-width: calc(100vw - 32px);
    margin: 0;
    padding: 12px 18px;
    overflow-wrap: anywhere;
    text-align: center;
    box-shadow: 0 8px 28px rgb(25 35 25 / 18%);
    transform: translateX(-50%);
    transition: opacity .25s ease;
}

.flash-notice.is-dismissing {
    opacity: 0;
    pointer-events: none;
}

.article-collection {
    margin-top: 14px;
}

.article-directory-toggle {
    display: inline-flex;
    min-height: 34px;
    align-items: center;
    gap: 7px;
    margin-bottom: 12px;
    padding: 6px 12px;
    border: 1px solid var(--line, #e5e7df);
    border-radius: 4px;
    background: #fff;
    color: var(--muted, #7c857a);
    cursor: pointer;
    font: inherit;
    font-size: 12px;
}

.article-directory-toggle:hover {
    border-color: #b9c7b5;
    color: #405c46;
}

.article-collection-layout {
    display: grid;
    grid-template-columns: minmax(220px, 260px) minmax(0, 1fr);
    align-items: start;
    gap: 24px;
}

.article-collection.is-directory-hidden .article-collection-layout {
    grid-template-columns: minmax(0, 1fr);
}

.article-collection.is-directory-hidden .article-directory-panel {
    display: none;
}

.article-directory-panel {
    position: sticky;
    top: 18px;
    max-height: calc(100vh - 36px);
    overflow: auto;
    padding: 16px;
    border: 1px solid var(--line, #e5e7df);
    border-radius: 5px;
    background: #fff;
}

.article-tree-home {
    display: block;
    margin-bottom: 10px;
    padding: 8px 9px;
    border-radius: 3px;
    background: #f5f6f1;
    color: var(--ink, #252923);
    font-size: 12px;
    font-weight: 600;
    text-decoration: none;
}

.article-tree-group {
    border-top: 1px solid #eff0eb;
}

.article-tree-group summary {
    display: flex;
    min-height: 38px;
    align-items: center;
    justify-content: space-between;
    gap: 8px;
    color: var(--ink, #252923);
    cursor: pointer;
    font-size: 12px;
    font-weight: 600;
    list-style: none;
}

.article-tree-group summary::-webkit-details-marker {
    display: none;
}

.article-tree-group summary::before {
    content: "›";
    color: #84917f;
    font-size: 16px;
    transition: transform .15s ease;
}

.article-tree-group[open] summary::before {
    transform: rotate(90deg);
}

.article-tree-group summary span {
    flex: 1;
}

.article-tree-group summary small {
    color: #9a9f97;
    font-size: 10px;
    font-weight: 400;
}

.article-tree-group ol {
    display: grid;
    gap: 2px;
    margin: 0 0 10px;
    padding: 0 0 0 14px;
    list-style: none;
}

.article-tree-group li a {
    display: block;
    padding: 7px 8px;
    border-radius: 3px;
    color: #737b70;
    font-size: 12px;
    line-height: 1.5;
    text-decoration: none;
}

.article-tree-group li a:hover,
.article-tree-group li a[aria-current="page"] {
    background: #f1f4ee;
    color: #405c46;
}

.article-tree-empty {
    margin: 8px 0 0;
    color: #8a9187;
    font-size: 12px;
}

.article-collection-main {
    min-width: 0;
}

.article-topic-header {
    margin: 5px 0 30px;
}

.article-topic-header h1 {
    margin: 8px 0;
    font-family: var(--serif, Georgia, serif);
    font-size: clamp(30px, 4vw, 42px);
    font-weight: 500;
}

.article-topic-header p {
    margin: 0;
    color: var(--muted, #7c857a);
    font-size: 13px;
}

.article-topic-group {
    margin-bottom: 28px;
}

.article-topic-heading {
    display: flex;
    align-items: baseline;
    justify-content: space-between;
    gap: 12px;
    padding-bottom: 10px;
    border-bottom: 1px solid var(--line, #e5e7df);
}

.article-topic-heading h2 {
    margin: 0;
    font-family: var(--serif, Georgia, serif);
    font-size: 20px;
    font-weight: 500;
}

.article-topic-heading > span {
    color: #91988e;
    font-size: 11px;
}

.article-topic-list {
    margin: 0;
    padding: 0;
    list-style: none;
}

.article-topic-list li {
    border-bottom: 1px solid #eff0eb;
}

.article-topic-list a {
    display: flex;
    min-height: 62px;
    align-items: center;
    justify-content: space-between;
    gap: 16px;
    padding: 10px 8px;
    color: var(--ink, #252923);
    text-decoration: none;
}

.article-topic-list a:hover {
    background: #f8f9f6;
}

.article-topic-list a > span {
    display: grid;
    gap: 5px;
    min-width: 0;
}

.article-topic-list strong {
    overflow: hidden;
    font-size: 13px;
    font-weight: 500;
    text-overflow: ellipsis;
}

.article-topic-list small {
    color: #91988e;
    font-size: 10px;
}

.article-topic-list b {
    color: #8b9688;
    font-size: 13px;
    font-weight: 400;
}

.article-shell {
    min-width: 0;
}

.article-stepper {
    display: grid;
    grid-template-columns: minmax(0, 1fr) minmax(0, 1fr);
    gap: 12px;
    margin: 0 0 22px;
}

.article-step {
    display: grid;
    min-width: 0;
    gap: 6px;
    padding: 12px 14px;
    border: 1px solid var(--line, #e5e7df);
    border-radius: 4px;
    background: #fff;
    color: var(--ink, #252923);
    text-decoration: none;
}

.article-step:hover {
    border-color: #b9c7b5;
}

.article-step span {
    color: #788275;
    font-size: 10px;
}

.article-step strong {
    overflow: hidden;
    font-size: 12px;
    font-weight: 500;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.article-step-next {
    text-align: right;
}

.article-step.is-unavailable {
    background: #f7f8f5;
    color: #a0a69d;
}

.article-step.is-unavailable span {
    color: #a0a69d;
}

.article-stepper + .article-header {
    margin-top: 0;
}

.article-body + .article-stepper {
    margin-top: 30px;
}

@media (max-width: 760px) {
    .article-collection-layout {
        grid-template-columns: minmax(0, 1fr);
        gap: 18px;
    }

    .article-directory-panel {
        position: static;
        max-height: min(42vh, 360px);
    }
}

@media (max-width: 440px) {
    .article-stepper {
        gap: 7px;
    }

    .article-step {
        padding: 10px 9px;
    }
}

@media (min-width: 651px) and (max-width: 980px) {
    .site-header .brand {
        font-size: 14px;
        letter-spacing: 0;
    }

    .site-header .brand-mark {
        width: 30px;
        height: 30px;
        font-size: 13px;
    }

    .main-nav {
        gap: 12px;
        font-size: 12px;
    }
}

.lock-label {
    display: inline-flex;
    align-items: center;
    gap: 3px;
    padding: 1px 6px;
    border-radius: 999px;
    background: #f4eee4;
    color: #8a6d4b;
    font-size: 10px;
    font-weight: 500;
    vertical-align: middle;
}

.locked-preview {
    margin: 18px 0 8px;
    padding: 20px 20px 16px;
    border: 1px dashed #d9ded4;
    border-radius: 6px;
    background: #fafbf8;
}

.locked-preview-body {
    position: relative;
    max-height: 6em;
    overflow: hidden;
    font-size: 14px;
}

.locked-preview-text {
    margin: 0;
    color: #4c534a;
    font-size: 14px;
    line-height: 2;
    white-space: pre-line;
    overflow-wrap: anywhere;
}

.locked-preview-fade {
    position: absolute;
    right: 0;
    bottom: 0;
    left: 0;
    height: 55%;
    background: linear-gradient(180deg, rgba(250, 251, 248, 0) 0%, rgba(250, 251, 248, .78) 62%, #fafbf8 100%);
    pointer-events: none;
}

.locked-badge {
    position: absolute;
    bottom: 2px;
    left: 50%;
    display: inline-flex;
    align-items: center;
    gap: 5px;
    max-width: calc(100% - 16px);
    padding: 6px 14px;
    border: 1px solid #e3c9b8;
    border-radius: 999px;
    background: #fff7f2;
    color: #a05a3c;
    font-size: 11px;
    font-weight: 600;
    line-height: 1.4;
    text-align: center;
    text-decoration: none;
    box-shadow: 0 6px 16px rgba(160, 90, 60, .12);
    transform: translateX(-50%);
}

a.locked-badge:hover {
    border-color: #d9b29c;
    background: #fff2e9;
}

.locked-preview-note {
    margin: 14px 0 0;
    color: #8b938a;
    font-size: 11px;
}

.download-action.is-locked,
.download-action.is-locked:hover {
    border-color: #e4e7df;
    background: #f4f5f1;
    color: #9aa096;
    cursor: not-allowed;
}

.strip-item.is-locked .strip-arrow {
    opacity: .45;
}
