:root {
    --ch-color-primary: #9e3f49;
    --ch-color-primary-container: #ff8b94;
    --ch-color-primary-soft: #ffdadb;
    --ch-color-primary-soft-strong: #ffb2b6;
    --ch-color-on-primary: #ffffff;
    --ch-color-on-primary-container: #77222e;
    --ch-color-secondary: #795745;
    --ch-color-secondary-container: #fed0b9;
    --ch-color-on-secondary: #ffffff;
    --ch-color-on-secondary-container: #7a5745;
    --ch-color-tertiary: #206963;
    --ch-color-tertiary-container: #76b9b2;
    --ch-color-tertiary-soft: #abefe7;
    --ch-color-on-tertiary: #ffffff;
    --ch-color-on-tertiary-container: #004945;
    --ch-color-error: #ba1a1a;
    --ch-color-error-container: #ffdad6;
    --ch-color-on-error: #ffffff;
    --ch-color-on-error-container: #93000a;
    --ch-color-background: #fbf9f8;
    --ch-color-surface: #ffffff;
    --ch-color-surface-soft: #f5f3f3;
    --ch-color-surface-medium: #efeded;
    --ch-color-surface-strong: #e4e2e2;
    --ch-color-text: #1b1c1c;
    --ch-color-text-muted: #554243;
    --ch-color-outline: #887272;
    --ch-color-outline-soft: #dbc0c1;
    --ch-font-family: "Plus Jakarta Sans", system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
    --ch-radius-sm: 12px;
    --ch-radius-md: 16px;
    --ch-radius-lg: 24px;
    --ch-radius-pill: 9999px;
    --ch-shadow-sm: 0 8px 24px rgba(158, 63, 73, 0.08);
    --ch-shadow-md: 0 14px 36px rgba(158, 63, 73, 0.12);
    --ch-sidebar-width: 280px;
    --ch-topbar-height: 64px;
    --ch-content-padding: clamp(20px, 4vw, 40px);
}

* {
    box-sizing: border-box;
}

[hidden] {
    display: none !important;
}

html {
    min-height: 100%;
    background: var(--ch-color-background);
}

body {
    min-height: 100vh;
    margin: 0;
    color: var(--ch-color-text);
    background: var(--ch-color-background);
    font-family: var(--ch-font-family);
    font-size: 16px;
    line-height: 1.6;
}

a {
    color: inherit;
    text-decoration: none;
}

button,
input,
select,
textarea {
    font: inherit;
}

.material-symbols-outlined {
    font-variation-settings: "FILL" 0, "wght" 400, "GRAD" 0, "opsz" 24;
    line-height: 1;
}

.material-symbols-outlined.filled {
    font-variation-settings: "FILL" 1, "wght" 400, "GRAD" 0, "opsz" 24;
}

.ch-page {
    min-height: 100vh;
    background:
        radial-gradient(circle at top left, rgba(255, 178, 182, 0.22), transparent 34rem),
        linear-gradient(180deg, #ffffff 0%, var(--ch-color-background) 42%);
}

.ch-shell {
    display: grid;
    grid-template-columns: var(--ch-sidebar-width) minmax(0, 1fr);
    min-height: 100vh;
}

.ch-sidebar {
    position: sticky;
    top: 0;
    z-index: 40;
    display: flex;
    flex-direction: column;
    width: var(--ch-sidebar-width);
    height: 100vh;
    padding: 24px 16px;
    overflow-y: auto;
    background: rgba(255, 255, 255, 0.94);
    border-right: 1px solid rgba(219, 192, 193, 0.72);
    box-shadow: 6px 0 28px rgba(158, 63, 73, 0.07);
    backdrop-filter: blur(16px);
}

.ch-sidebar__brand {
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 0 8px 24px;
}

.ch-sidebar__brand-mark {
    flex: 0 0 42px;
    width: 42px;
    height: 42px;
    border-radius: 14px;
    object-fit: cover;
    box-shadow: 0 8px 18px rgba(158, 63, 73, 0.14);
}

.ch-sidebar__title {
    margin: 0;
    color: var(--ch-color-primary);
    font-size: 24px;
    font-weight: 900;
    line-height: 1.2;
}

.ch-sidebar__subtitle {
    margin: 4px 0 0;
    color: var(--ch-color-outline);
    font-size: 12px;
    font-weight: 600;
}

.ch-sidebar__nav {
    display: flex;
    flex: 1;
    flex-direction: column;
    gap: 8px;
    padding: 12px 0;
}

.ch-sidebar__group {
    display: flex;
    flex-direction: column;
    gap: 8px;
    margin-top: 10px;
    padding-top: 16px;
    border-top: 1px solid var(--ch-color-outline-soft);
}

.ch-sidebar__group-label {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    margin: 0 12px 2px;
    color: var(--ch-color-primary);
    font-size: 12px;
    font-weight: 900;
    letter-spacing: 0;
}

.ch-sidebar__group-label .material-symbols-outlined {
    font-size: 17px;
}

.ch-sidebar__link {
    display: flex;
    align-items: center;
    gap: 12px;
    min-height: 48px;
    padding: 12px 16px;
    color: var(--ch-color-text-muted);
    border-radius: var(--ch-radius-pill);
    transition: background-color 160ms ease, color 160ms ease, transform 160ms ease;
}

.ch-sidebar__link:hover,
.ch-sidebar__link:focus-visible {
    color: var(--ch-color-primary);
    background: var(--ch-color-primary-soft);
    transform: translateX(2px);
    outline: none;
}

.ch-sidebar__link.is-active {
    color: var(--ch-color-on-tertiary-container);
    background: var(--ch-color-tertiary-soft);
    box-shadow: inset 0 0 0 1px rgba(32, 105, 99, 0.1);
}

.ch-sidebar__footer {
    display: grid;
    gap: 12px;
    padding-top: 20px;
    border-top: 1px solid var(--ch-color-outline-soft);
}

.ch-main {
    min-width: 0;
}

.ch-topbar {
    position: sticky;
    top: 0;
    z-index: 30;
    display: flex;
    align-items: center;
    justify-content: space-between;
    min-height: var(--ch-topbar-height);
    padding: 0 var(--ch-content-padding);
    background: rgba(255, 255, 255, 0.82);
    border-bottom: 1px solid rgba(219, 192, 193, 0.64);
    box-shadow: 0 6px 24px rgba(158, 63, 73, 0.06);
    backdrop-filter: blur(16px);
}

.ch-topbar__title {
    display: flex;
    align-items: center;
    gap: 10px;
    color: var(--ch-color-primary);
    font-size: 14px;
    font-weight: 800;
}

.ch-topbar__actions {
    display: flex;
    align-items: center;
    gap: 8px;
}

.ch-content {
    width: min(100%, 1180px);
    margin: 0 auto;
    padding: var(--ch-content-padding);
}

.ch-stack {
    display: grid;
    gap: 24px;
}

.ch-stack--sm {
    gap: 10px;
}

.ch-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(min(100%, 240px), 1fr));
    gap: 20px;
}

.ch-hero {
    display: grid;
    gap: 18px;
    padding: clamp(28px, 6vw, 56px) 0;
}

.ch-eyebrow {
    margin: 0;
    color: var(--ch-color-tertiary);
    font-size: 13px;
    font-weight: 800;
    letter-spacing: 0;
    text-transform: uppercase;
}

.ch-heading-xl,
.ch-heading-lg,
.ch-heading-md {
    margin: 0;
    color: var(--ch-color-text);
    letter-spacing: 0;
}

.ch-heading-xl {
    max-width: 760px;
    color: var(--ch-color-primary);
    font-size: clamp(32px, 5vw, 48px);
    font-weight: 900;
    line-height: 1.14;
}

.ch-heading-lg {
    font-size: 28px;
    font-weight: 800;
    line-height: 1.3;
}

.ch-heading-md {
    font-size: 20px;
    font-weight: 800;
    line-height: 1.4;
}

.ch-body-lg,
.ch-body-md,
.ch-label {
    margin: 0;
}

.ch-body-lg {
    max-width: 720px;
    color: var(--ch-color-text-muted);
    font-size: 18px;
}

.ch-body-md {
    color: var(--ch-color-text-muted);
    font-size: 16px;
}

.ch-label {
    color: var(--ch-color-outline);
    font-size: 12px;
    font-weight: 700;
}

.ch-section {
    padding: clamp(22px, 4vw, 32px);
    background: var(--ch-color-surface);
    border: 1px solid var(--ch-color-surface-strong);
    border-radius: var(--ch-radius-lg);
    box-shadow: var(--ch-shadow-sm);
}

.ch-section__header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 16px;
    margin-bottom: 22px;
    padding-bottom: 14px;
    border-bottom: 1px solid var(--ch-color-surface-strong);
}

.ch-section__header--split {
    align-items: flex-start;
}

.ch-section__title {
    display: flex;
    align-items: center;
    gap: 10px;
    margin: 0;
    color: var(--ch-color-secondary);
    font-size: 24px;
    font-weight: 800;
}

.ch-inline-form {
    display: flex;
    align-items: flex-end;
    gap: 12px;
}

.ch-inline-form--wrap {
    flex-wrap: wrap;
    justify-content: flex-end;
}

.ch-filter-bar {
    position: relative;
    display: grid;
    grid-template-columns: minmax(220px, 1.2fr) minmax(200px, 1fr) minmax(150px, 180px);
    gap: 14px;
    align-items: end;
    margin-bottom: 18px;
    padding: 16px;
    background: var(--ch-color-surface-soft);
    border: 1px solid var(--ch-color-outline-soft);
    border-radius: var(--ch-radius-sm);
}

.ch-filter-bar--collected-posts {
    grid-template-columns: minmax(170px, 0.8fr) minmax(170px, 0.8fr) minmax(360px, 1.8fr) auto;
}

.ch-filter-toolbar {
    display: flex;
    flex-wrap: wrap;
    gap: 14px;
    align-items: center;
    justify-content: flex-end;
    position: absolute;
    top: 16px;
    right: 16px;
}

.ch-filter-toolbar__link {
    display: inline-flex;
    align-items: center;
    gap: 5px;
    color: var(--ch-color-outline);
    font-size: 13px;
    font-weight: 900;
    text-decoration: none;
}

.ch-filter-toolbar__link:hover,
.ch-filter-toolbar__link:focus-visible {
    color: var(--ch-color-primary);
    outline: none;
}

.ch-filter-toolbar__link .material-symbols-outlined {
    font-size: 18px;
}

.ch-date-filter {
    display: grid;
    gap: 8px;
}

.ch-date-filter__quick,
.ch-date-filter__range {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
}

.ch-date-filter__range .ch-input {
    flex: 1 1 140px;
}

.ch-filter-actions {
    display: flex;
    flex-wrap: nowrap;
    gap: 8px;
    align-items: center;
}

.ch-filter-actions .ch-button {
    padding: 0 14px;
}

.ch-filter-chip {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-height: 38px;
    padding: 8px 12px;
    color: var(--ch-color-text-muted);
    font-size: 13px;
    font-weight: 900;
    text-decoration: none;
    background: var(--ch-color-surface);
    border: 1px solid var(--ch-color-outline-soft);
    border-radius: var(--ch-radius-pill);
}

.ch-filter-chip:hover,
.ch-filter-chip:focus-visible,
.ch-filter-chip.is-active {
    color: var(--ch-color-primary);
    background: var(--ch-color-primary-soft);
    outline: none;
}

.ch-filter-chip.is-disabled {
    cursor: not-allowed;
    opacity: 0.45;
}

.ch-actions-bar {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: 10px;
    margin-bottom: 14px;
}

.ch-selection-status {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    min-height: 44px;
    padding: 0 20px;
    color: var(--ch-color-on-tertiary-container);
    font-size: 14px;
    font-weight: 800;
    white-space: nowrap;
    background: var(--ch-color-tertiary-container);
    border: 1px solid transparent;
    border-radius: var(--ch-radius-pill);
}

.ch-selection-status .material-symbols-outlined {
    font-size: 20px;
}

.ch-cleanup-panel {
    display: grid;
    grid-template-columns: minmax(220px, 1fr) repeat(3, minmax(140px, 180px)) auto;
    gap: 12px;
    align-items: end;
    margin-top: 16px;
    padding: 16px;
    background: var(--ch-color-surface-soft);
    border: 1px solid var(--ch-color-outline-soft);
    border-radius: var(--ch-radius-sm);
}

.ch-link {
    color: var(--ch-color-primary);
    font-weight: 800;
}

.ch-link:hover,
.ch-link:focus-visible {
    text-decoration: underline;
    outline: none;
}

.ch-link--ellipsis {
    display: block;
    max-width: 420px;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.ch-title-cell {
    display: grid;
    grid-template-columns: auto minmax(0, 1fr);
    gap: 10px;
    align-items: center;
}

.ch-title-cell__meta {
    display: inline-flex;
    gap: 4px;
    align-items: center;
    max-width: 190px;
    overflow: hidden;
    color: var(--ch-color-outline);
    font-size: 12px;
    font-weight: 800;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.ch-title-cell__meta-link {
    max-width: 90px;
    overflow: hidden;
    color: inherit;
    text-decoration: none;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.ch-title-cell__meta-link:hover,
.ch-title-cell__meta-link:focus-visible {
    color: var(--ch-color-primary);
    text-decoration: underline;
    outline: none;
}

.ch-title-cell__separator {
    color: var(--ch-color-outline-soft);
}

.ch-title-cell .ch-link--ellipsis {
    max-width: none;
}

.ch-table-wrap {
    width: 100%;
    overflow-x: auto;
    background: var(--ch-color-surface);
    border: 1px solid var(--ch-color-outline-soft);
    border-radius: var(--ch-radius-sm);
    box-shadow: var(--ch-shadow-sm);
}

.ch-table {
    width: 100%;
    min-width: 720px;
    border-collapse: collapse;
}

.ch-table th,
.ch-table td {
    padding: 14px 16px;
    text-align: left;
    vertical-align: middle;
    border-bottom: 1px solid var(--ch-color-outline-soft);
}

.ch-table th:first-child,
.ch-table td:first-child {
    width: 44px;
    text-align: center;
}

.ch-table .ch-table__count-col {
    min-width: 76px;
    white-space: nowrap;
}

.ch-table th {
    color: var(--ch-color-text-muted);
    background: var(--ch-color-surface-soft);
    font-size: 13px;
    font-weight: 900;
}

.ch-table-sort {
    display: inline-flex;
    align-items: center;
    gap: 4px;
    white-space: nowrap;
    color: inherit;
    text-decoration: none;
}

.ch-table-sort .material-symbols-outlined {
    font-size: 17px;
}

.ch-table-sort:hover,
.ch-table-sort:focus-visible,
.ch-table-sort.is-active {
    color: var(--ch-color-primary);
    outline: none;
}

.ch-table td {
    color: var(--ch-color-text);
    font-size: 14px;
}

.ch-table td small {
    display: block;
    margin-top: 2px;
    color: var(--ch-color-outline);
    font-size: 12px;
}

.ch-table-date {
    white-space: nowrap;
}

.ch-search-term-table {
    table-layout: fixed;
}

.ch-search-term-table th:first-child,
.ch-search-term-table td:first-child {
    width: auto;
    text-align: left;
}

.ch-search-term-table__name {
    width: auto;
}

.ch-search-term-table__date {
    width: 96px;
}

.ch-search-term-table__actions {
    width: 80px;
}

.ch-search-term-table td:last-child,
.ch-search-term-table th:last-child {
    white-space: nowrap;
}

.ch-table tr:last-child td {
    border-bottom: 0;
}

.ch-pagination {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    justify-content: center;
    gap: 8px;
    margin-top: 16px;
}

.ch-page-link {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-width: 38px;
    height: 38px;
    padding: 0 10px;
    color: var(--ch-color-text-muted);
    font-size: 13px;
    font-weight: 900;
    text-decoration: none;
    background: var(--ch-color-surface);
    border: 1px solid var(--ch-color-outline-soft);
    border-radius: var(--ch-radius-pill);
}

.ch-page-link:hover,
.ch-page-link:focus-visible,
.ch-page-link.is-active {
    color: var(--ch-color-primary);
    background: var(--ch-color-primary-soft);
    outline: none;
}

.ch-page-link.is-disabled {
    pointer-events: none;
    cursor: not-allowed;
    opacity: 0.45;
}

.ch-page-link .material-symbols-outlined {
    font-size: 18px;
}

.ch-empty-state {
    display: flex;
    align-items: center;
    gap: 18px;
    padding: 28px;
    background: var(--ch-color-surface);
    border: 1px solid var(--ch-color-outline-soft);
    border-radius: var(--ch-radius-sm);
}

.ch-empty-state__icon {
    display: inline-flex;
    flex: 0 0 auto;
    align-items: center;
    justify-content: center;
    width: 52px;
    height: 52px;
    color: var(--ch-color-on-primary-container);
    background: var(--ch-color-primary-soft);
    border-radius: var(--ch-radius-pill);
}

.ch-empty-state__title {
    margin: 0 0 6px;
    color: var(--ch-color-text);
    font-size: 20px;
    font-weight: 800;
}

.ch-empty-state__text {
    margin: 0;
    color: var(--ch-color-text-muted);
}

.ch-button {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    min-height: 44px;
    padding: 0 20px;
    color: var(--ch-color-on-primary);
    font-size: 14px;
    font-weight: 800;
    white-space: nowrap;
    cursor: pointer;
    background: var(--ch-color-primary);
    border: 1px solid transparent;
    border-radius: var(--ch-radius-pill);
    box-shadow: 0 10px 24px rgba(158, 63, 73, 0.18);
    transition: transform 160ms ease, box-shadow 160ms ease, background-color 160ms ease;
}

.ch-button:hover,
.ch-button:focus-visible {
    transform: translateY(-1px);
    box-shadow: var(--ch-shadow-md);
    outline: none;
}

.ch-button:active {
    transform: translateY(0) scale(0.98);
    box-shadow: inset 0 2px 8px rgba(64, 0, 13, 0.2);
}

.ch-button:disabled {
    cursor: not-allowed;
    opacity: 0.48;
    transform: none;
    box-shadow: none;
}

.ch-button--secondary {
    color: var(--ch-color-on-secondary-container);
    background: var(--ch-color-secondary-container);
    box-shadow: none;
}

.ch-button--tertiary {
    color: var(--ch-color-on-tertiary-container);
    background: var(--ch-color-tertiary-container);
    box-shadow: none;
}

.ch-button--outline {
    color: var(--ch-color-primary);
    background: transparent;
    border-color: var(--ch-color-outline);
    box-shadow: none;
}

.ch-button--ghost {
    color: var(--ch-color-secondary);
    background: transparent;
    box-shadow: none;
}

.ch-button--inverse-secondary {
    color: var(--ch-color-secondary-container);
    background: var(--ch-color-on-secondary-container);
    box-shadow: none;
}

.ch-button--icon {
    width: 44px;
    min-width: 44px;
    padding: 0;
    color: var(--ch-color-text-muted);
    background: transparent;
    box-shadow: none;
}

.ch-button--icon:hover,
.ch-button--icon:focus-visible {
    color: var(--ch-color-primary);
    background: var(--ch-color-primary-soft);
}

.ch-card {
    display: flex;
    flex-direction: column;
    gap: 14px;
    padding: 24px;
    background: var(--ch-color-surface);
    border: 1px solid transparent;
    border-radius: var(--ch-radius-lg);
    box-shadow: var(--ch-shadow-sm);
    transition: transform 160ms ease, box-shadow 160ms ease;
}

.ch-grid > .ch-card {
    min-height: 100%;
}

.ch-card:hover {
    transform: translateY(-2px);
    box-shadow: var(--ch-shadow-md);
}

.ch-card--filled {
    color: var(--ch-color-on-secondary-container);
    background: var(--ch-color-secondary-container);
    box-shadow: none;
}

.ch-card--outlined {
    background: var(--ch-color-surface);
    border-color: var(--ch-color-outline-soft);
    box-shadow: none;
}

.ch-form-panel {
    display: grid;
    gap: 24px;
    min-height: auto;
}

.ch-form-panel:hover {
    transform: none;
    box-shadow: none;
}

.ch-card__icon {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 48px;
    height: 48px;
    color: var(--ch-color-on-primary-container);
    background: var(--ch-color-primary-soft);
    border-radius: var(--ch-radius-pill);
}

.ch-card__title {
    margin: 0;
    color: inherit;
    font-size: 20px;
    font-weight: 800;
    line-height: 1.35;
}

.ch-card__text {
    margin: 0;
    color: var(--ch-color-text-muted);
}

.ch-card--filled .ch-card__text {
    color: rgba(122, 87, 69, 0.86);
}

.ch-form-grid {
    display: grid;
    gap: 18px;
}

.ch-field {
    display: grid;
    gap: 7px;
}

.ch-field__label {
    color: var(--ch-color-text-muted);
    font-size: 13px;
    font-weight: 800;
}

.ch-field__help {
    color: var(--ch-color-outline);
    font-size: 12px;
    font-weight: 700;
}

.ch-field__help.is-success {
    color: var(--ch-color-tertiary);
}

.ch-field__help.is-error {
    color: var(--ch-color-error);
}

.ch-input {
    width: 100%;
    min-height: 48px;
    padding: 0 14px;
    color: var(--ch-color-text);
    background: var(--ch-color-surface);
    border: 1px solid var(--ch-color-outline-soft);
    border-radius: var(--ch-radius-md);
    outline: none;
    transition: border-color 160ms ease, box-shadow 160ms ease, background-color 160ms ease;
}

.ch-input::placeholder {
    color: var(--ch-color-outline);
}

.ch-input:focus {
    background: #ffffff;
    border-color: var(--ch-color-primary);
    box-shadow: 0 0 0 4px rgba(255, 139, 148, 0.24);
}

.ch-input-wrap {
    position: relative;
}

.ch-input-wrap .material-symbols-outlined {
    position: absolute;
    top: 50%;
    left: 13px;
    color: var(--ch-color-outline);
    transform: translateY(-50%);
}

.ch-input-wrap .ch-input {
    padding-left: 44px;
}

.ch-choice-row {
    display: flex;
    flex-wrap: wrap;
    gap: 18px;
    align-items: center;
}

.ch-choice {
    display: inline-flex;
    align-items: center;
    gap: 9px;
    color: var(--ch-color-text);
    font-weight: 600;
    cursor: pointer;
}

.ch-choice input {
    width: 20px;
    height: 20px;
    accent-color: var(--ch-color-primary);
}

.ch-badge {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    min-height: 30px;
    padding: 0 12px;
    color: var(--ch-color-on-tertiary-container);
    font-size: 12px;
    font-weight: 800;
    white-space: nowrap;
    background: var(--ch-color-tertiary-container);
    border-radius: var(--ch-radius-pill);
}

.ch-badge--pending {
    color: var(--ch-color-on-secondary-container);
    background: var(--ch-color-secondary-container);
}

.ch-badge--alert {
    color: var(--ch-color-on-error-container);
    background: var(--ch-color-error-container);
}

.ch-color-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(140px, 1fr));
    gap: 14px;
}

.ch-swatch {
    display: grid;
    align-content: end;
    min-height: 112px;
    padding: 14px;
    color: var(--ch-color-text);
    border: 1px solid rgba(0, 0, 0, 0.04);
    border-radius: var(--ch-radius-md);
}

.ch-swatch strong {
    font-size: 13px;
}

.ch-swatch span {
    font-size: 12px;
    opacity: 0.76;
}

.ch-swatch--primary {
    color: var(--ch-color-on-primary);
    background: var(--ch-color-primary);
}

.ch-swatch--secondary {
    color: var(--ch-color-on-secondary);
    background: var(--ch-color-secondary);
}

.ch-swatch--tertiary {
    color: var(--ch-color-on-tertiary);
    background: var(--ch-color-tertiary);
}

.ch-swatch--surface {
    background: var(--ch-color-surface-soft);
}

.ch-swatch--error {
    color: var(--ch-color-on-error);
    background: var(--ch-color-error);
}

.ch-swatch--soft {
    color: var(--ch-color-on-primary-container);
    background: var(--ch-color-primary-soft);
}

.ch-mobile-overlay {
    position: fixed;
    inset: 0;
    z-index: 35;
    display: none;
    background: rgba(27, 28, 28, 0.38);
}

.ch-sidebar-toggle {
    display: none;
}

.ch-demo-row {
    display: flex;
    flex-wrap: wrap;
    gap: 12px;
    align-items: center;
}

.ch-auth-page {
    display: grid;
    min-height: 100vh;
    padding: 24px;
    place-items: center;
    background:
        radial-gradient(circle at top left, rgba(171, 239, 231, 0.36), transparent 28rem),
        linear-gradient(180deg, #ffffff 0%, var(--ch-color-background) 68%);
}

.ch-auth-card {
    display: grid;
    gap: 22px;
    width: min(100%, 460px);
    padding: clamp(24px, 5vw, 36px);
    background: var(--ch-color-surface);
    border: 1px solid var(--ch-color-outline-soft);
    border-radius: var(--ch-radius-lg);
    box-shadow: var(--ch-shadow-md);
}

.ch-auth-card__brand,
.ch-user-summary {
    display: inline-flex;
    gap: 10px;
    align-items: center;
}

.ch-auth-card__brand {
    color: var(--ch-color-primary);
    font-weight: 900;
}

.ch-user-summary {
    min-width: 0;
    padding: 12px 14px;
    color: var(--ch-color-text-muted);
    background: var(--ch-color-surface-soft);
    border-radius: var(--ch-radius-md);
}

.ch-user-summary strong,
.ch-user-summary small {
    display: block;
}

.ch-user-summary strong {
    color: var(--ch-color-text);
    font-size: 14px;
    line-height: 1.3;
}

.ch-user-summary small {
    color: var(--ch-color-outline);
    font-size: 12px;
}

.ch-alert {
    display: flex;
    gap: 10px;
    align-items: flex-start;
    padding: 12px 14px;
    font-weight: 700;
    border-radius: var(--ch-radius-md);
}

.ch-alert--success {
    color: var(--ch-color-on-tertiary-container);
    background: var(--ch-color-tertiary-soft);
}

.ch-alert--alert {
    color: var(--ch-color-on-error-container);
    background: var(--ch-color-error-container);
}

.ch-modal {
    width: min(680px, calc(100vw - 32px));
    max-height: calc(100vh - 48px);
    padding: 0;
    color: var(--ch-color-text);
    background: var(--ch-color-surface);
    border: 1px solid var(--ch-color-outline);
    border-radius: var(--ch-radius-lg);
    box-shadow: var(--ch-shadow-lg);
}

.ch-modal::backdrop {
    background: rgb(31 25 26 / 56%);
}

.ch-modal--loading {
    width: min(420px, calc(100vw - 32px));
}

.ch-modal__header,
.ch-modal__footer {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 12px;
    padding: 18px;
}

.ch-modal__header {
    border-bottom: 1px solid var(--ch-color-outline);
}

.ch-modal__body {
    display: grid;
    gap: 16px;
    padding: 18px;
}

.ch-modal__footer {
    border-top: 1px solid var(--ch-color-outline);
}

.ch-loading-modal__body {
    grid-template-columns: auto minmax(0, 1fr);
    align-items: center;
    gap: 18px;
}

.ch-loading-modal__title {
    margin: 0;
    color: var(--ch-color-text);
    font-size: 18px;
    font-weight: 900;
    line-height: 1.35;
}

.ch-loading-modal__text {
    margin: 6px 0 0;
    color: var(--ch-color-text-muted);
    font-size: 14px;
    line-height: 1.5;
}

.ch-loading-spinner {
    width: 42px;
    height: 42px;
    border: 4px solid var(--ch-color-primary-soft);
    border-top-color: var(--ch-color-primary);
    border-radius: 50%;
    animation: ch-spin 860ms linear infinite;
}

@keyframes ch-spin {
    to {
        transform: rotate(360deg);
    }
}

.ch-form-grid--inline {
    grid-template-columns: repeat(auto-fit, minmax(min(100%, 180px), 1fr));
    align-items: end;
}

.ch-account-list {
    display: grid;
    gap: 16px;
}

.ch-account-card {
    gap: 18px;
}

.ch-account-card__meta {
    display: grid;
    gap: 6px;
}

.ch-account-card__meta strong {
    font-size: 18px;
}

.ch-account-card__meta > span {
    color: var(--ch-color-outline);
    font-size: 13px;
    font-weight: 700;
}

.ch-row-actions {
    display: flex;
    flex-wrap: wrap;
    gap: 10px;
}

.ch-tabs {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
    margin-bottom: 18px;
    border-bottom: 1px solid var(--ch-color-outline-soft);
}

.ch-tab {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    padding: 12px 14px;
    border: 0;
    border-bottom: 3px solid transparent;
    background: transparent;
    color: var(--ch-color-text-muted);
    font: inherit;
    font-weight: 800;
    cursor: pointer;
}

.ch-tab.is-active {
    border-bottom-color: var(--ch-color-primary);
    color: var(--ch-color-primary);
}

.ch-keyword-choice-list {
    display: flex;
    flex-wrap: wrap;
    gap: 10px;
}

.ch-check-row {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    padding: 10px 12px;
    border: 1px solid var(--ch-color-outline-soft);
    border-radius: var(--ch-radius-sm);
    background: var(--ch-color-surface);
    font-weight: 700;
}

.ch-generated-article-list {
    display: grid;
    gap: 16px;
}

.ch-generated-article-card {
    min-height: auto;
}

.ch-details {
    color: var(--ch-color-text-muted);
    font-size: 14px;
    line-height: 1.6;
}

.ch-details summary {
    color: var(--ch-color-primary);
    cursor: pointer;
    font-weight: 800;
}

.ch-sr-only {
    position: absolute;
    width: 1px;
    height: 1px;
    padding: 0;
    overflow: hidden;
    white-space: nowrap;
    border: 0;
    clip: rect(0, 0, 0, 0);
}

@media (max-width: 860px) {
    .ch-shell {
        display: block;
    }

    .ch-sidebar {
        position: fixed;
        left: 0;
        transform: translateX(-102%);
        transition: transform 180ms ease;
    }

    body.ch-sidebar-open .ch-sidebar {
        transform: translateX(0);
    }

    body.ch-sidebar-open .ch-mobile-overlay {
        display: block;
    }

    .ch-sidebar-toggle {
        display: inline-flex;
    }

    .ch-topbar {
        padding: 0 16px;
    }

    .ch-content {
        padding: 24px 16px 36px;
    }

    .ch-section__header {
        align-items: flex-start;
        flex-direction: column;
    }

    .ch-inline-form--wrap {
        justify-content: flex-start;
    }

    .ch-filter-bar {
        grid-template-columns: 1fr;
    }

    .ch-filter-bar--collected-posts {
        grid-template-columns: 1fr;
    }

    .ch-cleanup-panel {
        grid-template-columns: 1fr;
    }
}
