:root {
    --bg: #f6f7f3;
    --surface: #ffffff;
    --surface-soft: #eef4ed;
    --ink: #17231d;
    --muted: #69756f;
    --line: #dbe4dc;
    --primary: #176b4d;
    --primary-dark: #0f4937;
    --accent: #c8993d;
    --danger: #b93d3d;
    --warning: #9a6b18;
    --shadow: 0 14px 40px rgba(22, 42, 32, 0.08);
    --header-a: #0f4937;
    --header-b: #143c31;
    --header-c: #102d27;
    --header-line: rgba(200, 153, 61, 0.34);
    --header-top: rgba(7, 32, 25, 0.34);
    --header-shadow: rgba(15, 73, 55, 0.18);
    --brand-border: rgba(200, 153, 61, 0.72);
    --brand-label: #f7d891;
    --nav-bg: rgba(255, 255, 255, 0.06);
    --nav-border: rgba(255, 255, 255, 0.12);
    --nav-hover-bg: rgba(200, 153, 61, 0.18);
    --nav-hover-border: rgba(200, 153, 61, 0.52);
    --focus-bg: #ffffff;
    --focus-label-bg: #fff7e3;
    --focus-label-ink: #8a5d12;
    --focus-label-line: #efd59c;
    --hero-top: #ffffff;
}

body.theme-subuh {
    --bg: #f4f7f8;
    --surface-soft: #eaf2f3;
    --ink: #17252b;
    --muted: #65757c;
    --line: #d8e3e6;
    --primary: #2f6f73;
    --primary-dark: #234d58;
    --accent: #d1ad64;
    --shadow: 0 14px 40px rgba(35, 77, 88, 0.08);
    --header-a: #203b4a;
    --header-b: #315e5c;
    --header-c: #486b66;
    --header-line: rgba(209, 173, 100, 0.36);
    --header-top: rgba(21, 45, 57, 0.42);
    --header-shadow: rgba(35, 77, 88, 0.18);
    --brand-border: rgba(209, 173, 100, 0.72);
    --brand-label: #f2d99f;
    --nav-hover-bg: rgba(209, 173, 100, 0.18);
    --nav-hover-border: rgba(209, 173, 100, 0.5);
    --focus-bg: #fbfefe;
    --focus-label-bg: #eef7f4;
    --focus-label-ink: #23605f;
    --focus-label-line: #c9e5e1;
    --hero-top: #ffffff;
}

body.theme-pagi {
    --bg: #f6f8f1;
    --surface-soft: #eef4e8;
    --line: #dae5d6;
    --primary: #176b4d;
    --primary-dark: #0f4937;
    --accent: #c8993d;
    --header-a: #0f4937;
    --header-b: #176b4d;
    --header-c: #1d5547;
    --focus-label-bg: #f2f7df;
    --focus-label-ink: #586d18;
    --focus-label-line: #dbe8a9;
}

body.theme-siang {
    --bg: #f4f8fb;
    --surface-soft: #eaf2f7;
    --ink: #172632;
    --muted: #637684;
    --line: #d8e4eb;
    --primary: #236a8c;
    --primary-dark: #174b64;
    --accent: #b99f4f;
    --shadow: 0 14px 40px rgba(35, 106, 140, 0.08);
    --header-a: #174b64;
    --header-b: #22647a;
    --header-c: #2a776f;
    --header-line: rgba(185, 159, 79, 0.34);
    --header-top: rgba(18, 56, 76, 0.38);
    --header-shadow: rgba(23, 75, 100, 0.17);
    --brand-border: rgba(185, 159, 79, 0.72);
    --brand-label: #f1dda0;
    --nav-hover-bg: rgba(185, 159, 79, 0.16);
    --nav-hover-border: rgba(185, 159, 79, 0.48);
    --focus-bg: #fbfdff;
    --focus-label-bg: #edf6fb;
    --focus-label-ink: #1b6080;
    --focus-label-line: #c9e2ef;
}

body.theme-sore {
    --bg: #faf7f1;
    --surface-soft: #f2eee5;
    --ink: #27251e;
    --muted: #766f62;
    --line: #e5ddd0;
    --primary: #6f7443;
    --primary-dark: #4e5732;
    --accent: #c28d54;
    --shadow: 0 14px 40px rgba(111, 91, 67, 0.08);
    --header-a: #3f513e;
    --header-b: #6f7443;
    --header-c: #806d55;
    --header-line: rgba(226, 184, 118, 0.42);
    --header-top: rgba(59, 54, 40, 0.38);
    --header-shadow: rgba(79, 68, 48, 0.17);
    --brand-border: rgba(226, 184, 118, 0.72);
    --brand-label: #f4d49f;
    --nav-hover-bg: rgba(226, 184, 118, 0.17);
    --nav-hover-border: rgba(226, 184, 118, 0.5);
    --focus-bg: #fffdf8;
    --focus-label-bg: #fff2df;
    --focus-label-ink: #8a5b25;
    --focus-label-line: #efd2aa;
    --hero-top: #fffdfa;
}

body.theme-malam {
    --bg: #f3f6fa;
    --surface-soft: #e9eef5;
    --ink: #17212f;
    --muted: #657184;
    --line: #d7e0ea;
    --primary: #325b7c;
    --primary-dark: #1f3c55;
    --accent: #9db8c5;
    --shadow: 0 14px 40px rgba(31, 60, 85, 0.09);
    --header-a: #172535;
    --header-b: #1f3c55;
    --header-c: #234851;
    --header-line: rgba(157, 184, 197, 0.36);
    --header-top: rgba(10, 22, 34, 0.44);
    --header-shadow: rgba(23, 37, 53, 0.2);
    --brand-border: rgba(157, 184, 197, 0.7);
    --brand-label: #cbe5ef;
    --nav-hover-bg: rgba(157, 184, 197, 0.18);
    --nav-hover-border: rgba(157, 184, 197, 0.5);
    --focus-bg: #fbfdff;
    --focus-label-bg: #edf3f8;
    --focus-label-ink: #294f6b;
    --focus-label-line: #ccdde8;
    --hero-top: #ffffff;
}

* {
    box-sizing: border-box;
}

body {
    margin: 0;
    font-family: Arial, Helvetica, sans-serif;
    background: var(--bg);
    color: var(--ink);
    line-height: 1.6;
}

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

img {
    max-width: 100%;
    display: block;
}

.container {
    width: min(1120px, calc(100% - 32px));
    margin: 0 auto;
}

.site-header {
    position: sticky;
    top: 0;
    z-index: 20;
    background: linear-gradient(135deg, var(--header-a) 0%, var(--header-b) 58%, var(--header-c) 100%);
    border-bottom: 1px solid var(--header-line);
    color: #fff;
    backdrop-filter: blur(12px);
    box-shadow: 0 10px 30px var(--header-shadow);
}

.header-topline {
    border-bottom: 1px solid rgba(255, 255, 255, 0.1);
    background: var(--header-top);
    color: rgba(255, 255, 255, 0.76);
    font-size: 12px;
    font-weight: 700;
}

.header-topline-inner {
    min-height: 34px;
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 14px;
    flex-wrap: wrap;
}

.header-inner {
    min-height: 82px;
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 20px;
}

.brand {
    display: inline-flex;
    align-items: center;
    gap: 12px;
    min-width: 220px;
    color: #fff;
}

.brand-mark {
    width: 54px;
    height: 54px;
    border-radius: 12px;
    display: grid;
    place-items: center;
    align-content: center;
    background:
        linear-gradient(135deg, rgba(255, 255, 255, 0.14), rgba(255, 255, 255, 0)),
        var(--primary-dark);
    border: 1px solid var(--brand-border);
    color: #fff;
    box-shadow: inset 0 0 0 1px rgba(255, 255, 255, 0.09), 0 10px 22px rgba(0, 0, 0, 0.18);
    font-weight: 900;
    letter-spacing: 0;
}

.brand-mark strong,
.brand-mark em {
    display: block;
    line-height: 1;
}

.brand-mark strong {
    font-size: 18px;
}

.brand-mark em {
    margin-top: 4px;
    color: var(--brand-label);
    font-size: 10px;
    font-style: normal;
    font-weight: 800;
    text-transform: uppercase;
}

.brand strong,
.brand small {
    display: block;
}

.brand strong {
    color: #fff;
    font-size: 17px;
    line-height: 1.25;
}

.brand small {
    color: rgba(255, 255, 255, 0.72);
    font-size: 12px;
    line-height: 1.35;
}

.main-nav {
    display: flex;
    align-items: center;
    gap: 6px;
    flex-wrap: wrap;
    justify-content: flex-end;
}

.main-nav a {
    min-height: 38px;
    display: inline-flex;
    align-items: center;
    padding: 8px 12px;
    border-radius: 999px;
    border: 1px solid var(--nav-border);
    background: var(--nav-bg);
    color: rgba(255, 255, 255, 0.82);
    font-weight: 800;
    font-size: 14px;
}

.main-nav a:hover {
    background: var(--nav-hover-bg);
    border-color: var(--nav-hover-border);
    color: #fff;
}

.focus-strip {
    position: relative;
    z-index: 10;
    background: var(--focus-bg);
    border-bottom: 1px solid var(--line);
    box-shadow: 0 10px 24px rgba(22, 42, 32, 0.05);
}

.focus-inner {
    min-height: 46px;
    display: flex;
    align-items: center;
    gap: 12px;
    color: var(--muted);
    font-size: 14px;
    overflow: hidden;
}

.focus-label {
    flex: 0 0 auto;
    padding: 4px 9px;
    border-radius: 999px;
    background: var(--focus-label-bg);
    color: var(--focus-label-ink);
    border: 1px solid var(--focus-label-line);
    font-size: 12px;
    font-weight: 900;
    text-transform: uppercase;
}

.focus-inner a {
    min-width: 0;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
    color: var(--primary-dark);
    font-weight: 900;
}

.focus-source {
    flex: 0 0 auto;
    color: var(--muted);
    font-size: 12px;
}

.hero {
    padding: 42px 0 28px;
    background: linear-gradient(180deg, var(--hero-top) 0%, var(--bg) 100%);
}

.hero-grid {
    display: grid;
    grid-template-columns: 1fr;
    gap: 22px;
    align-items: start;
}

.hero-copy h1 {
    margin: 8px 0 16px;
    max-width: 760px;
    font-size: clamp(32px, 5vw, 58px);
    line-height: 1.04;
    letter-spacing: 0;
}

.hero-copy p {
    margin: 0;
    color: var(--muted);
    max-width: 720px;
}

.eyebrow {
    color: var(--accent) !important;
    text-transform: uppercase;
    font-weight: 800;
    font-size: 13px;
    letter-spacing: 0;
}

.category-panel,
.empty-state,
.source-box,
.admin-card,
.auth-card {
    background: var(--surface);
    border: 1px solid var(--line);
    border-radius: 8px;
    box-shadow: var(--shadow);
}

.category-panel {
    padding: 18px;
    max-width: 100%;
}

.panel-title {
    display: block;
    font-weight: 800;
    margin-bottom: 12px;
}

.category-select-wrap {
    display: none;
}

.category-select {
    width: 100%;
    min-height: 46px;
    border: 1px solid var(--line);
    border-radius: 8px;
    padding: 10px 42px 10px 12px;
    color: var(--primary-dark);
    background:
        linear-gradient(45deg, transparent 50%, var(--primary-dark) 50%) right 17px center / 7px 7px no-repeat,
        linear-gradient(135deg, var(--primary-dark) 50%, transparent 50%) right 11px center / 7px 7px no-repeat,
        #fff;
    font: inherit;
    font-weight: 800;
    appearance: none;
    box-shadow: 0 4px 14px rgba(15, 73, 55, 0.06);
}

.chip-list {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
    align-items: center;
}

.chip-list.vertical {
    flex-direction: column;
    align-items: stretch;
}

.chip {
    display: inline-flex;
    align-items: center;
    justify-content: space-between;
    gap: 6px;
    min-height: 38px;
    padding: 8px 11px;
    border: 1px solid var(--line);
    border-radius: 999px;
    color: var(--primary-dark);
    background: #fff;
    font-weight: 700;
    font-size: 14px;
}

.chip-label {
    flex: 1 1 auto;
    min-width: 0;
    overflow-wrap: anywhere;
    text-align: left;
}

.chip-badges {
    display: inline-flex;
    align-items: center;
    gap: 4px;
    flex-wrap: nowrap;
    justify-content: flex-end;
    flex: 0 0 auto;
}

.chip-count,
.chip-new {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-width: 20px;
    min-height: 18px;
    padding: 2px 6px;
    border-radius: 999px;
    font-size: 10px;
    font-weight: 900;
    line-height: 1;
}

.chip-count {
    background: #0f4937 !important;
    color: #fff !important;
    border: 1px solid rgba(15, 73, 55, 0.22);
}

.chip-new {
    background: #cf2027 !important;
    color: #fff !important;
    border: 1px solid rgba(255, 255, 255, 0.45);
    box-shadow: 0 1px 4px rgba(185, 61, 61, 0.25);
    text-shadow: none;
}

.chip.active,
.chip:hover {
    background: var(--primary);
    color: #fff;
    border-color: var(--primary);
}

.chip.active .chip-count,
.chip:hover .chip-count {
    background: #fff !important;
    color: var(--primary-dark) !important;
    border-color: rgba(255, 255, 255, 0.6);
}

.chip.active .chip-new,
.chip:hover .chip-new {
    background: #e11d2e !important;
    color: #fff !important;
    border-color: rgba(255, 255, 255, 0.7);
}

.content-section {
    padding: 28px 0;
}

.featured-news {
    display: grid;
    grid-template-columns: minmax(0, 1.05fr) minmax(320px, 0.95fr);
    gap: 28px;
    align-items: stretch;
    background: var(--surface);
    border: 1px solid var(--line);
    border-radius: 8px;
    overflow: hidden;
    box-shadow: var(--shadow);
}

.featured-image,
.card-image {
    position: relative;
    display: block;
    background: var(--surface-soft);
    overflow: hidden;
}

.featured-image {
    min-height: 360px;
}

.featured-image img,
.card-image img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.image-title {
    position: absolute;
    left: 0;
    right: 0;
    bottom: 0;
    display: block;
    padding: 18px 20px;
    color: #fff;
    background: linear-gradient(180deg, rgba(0, 0, 0, 0), rgba(15, 31, 25, 0.88));
    font-weight: 900;
    line-height: 1.25;
    text-shadow: 0 2px 8px rgba(0, 0, 0, 0.4);
}

.image-title.small {
    padding: 34px 14px 12px;
    font-size: 15px;
}

.featured-body {
    padding: 32px;
    display: flex;
    flex-direction: column;
    align-items: flex-start;
    justify-content: center;
}

.featured-body h2 {
    margin: 12px 0;
    font-size: clamp(26px, 3vw, 40px);
    line-height: 1.12;
    letter-spacing: 0;
}

.featured-body p,
.news-card p {
    color: var(--muted);
}

.badge {
    display: inline-flex;
    align-items: center;
    min-height: 28px;
    padding: 4px 10px;
    border-radius: 999px;
    background: #e6f3ed;
    color: var(--primary-dark);
    font-size: 13px;
    font-weight: 800;
}

.badge.muted {
    background: var(--surface-soft);
    color: var(--muted);
}

.meta {
    display: flex;
    flex-wrap: wrap;
    gap: 10px 18px;
    color: var(--muted);
    font-size: 14px;
    margin: 14px 0 20px;
}

.meta.compact {
    margin: 12px 0 0;
    font-size: 13px;
}

.button {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-height: 42px;
    padding: 10px 16px;
    border-radius: 6px;
    border: 1px solid transparent;
    cursor: pointer;
    font: inherit;
    font-weight: 800;
}

.button.primary {
    color: #fff;
    background: var(--primary);
}

.button.primary:hover {
    background: var(--primary-dark);
}

.button.secondary {
    color: var(--primary-dark);
    background: #fff;
    border-color: var(--line);
}

.button.danger {
    color: #fff;
    background: var(--danger);
}

.section-heading {
    display: flex;
    justify-content: space-between;
    align-items: center;
    gap: 16px;
    margin-bottom: 16px;
}

.section-heading h2 {
    margin: 0;
    font-size: 26px;
}

.section-heading a {
    color: var(--primary);
    font-weight: 800;
}

.homepage-flow {
    padding: 8px 0 18px;
}

.category-showcase {
    padding: 26px 0;
    border-top: 1px solid var(--line);
}

.category-showcase:first-child {
    border-top: 0;
    padding-top: 8px;
}

.category-showcase-heading {
    align-items: flex-end;
}

.category-showcase-heading h2 {
    margin-bottom: 6px;
}

.category-showcase-heading p {
    max-width: 680px;
    margin: 0;
    color: var(--muted);
    line-height: 1.6;
}

.category-card {
    min-height: 100%;
}

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

.news-grid.two {
    grid-template-columns: repeat(2, minmax(0, 1fr));
}

.news-card {
    overflow: hidden;
    background: var(--surface);
    border: 1px solid var(--line);
    border-radius: 8px;
}

.card-image {
    aspect-ratio: 16 / 9;
}

.card-body {
    padding: 18px;
}

.card-body h2,
.card-body h3 {
    margin: 10px 0;
    line-height: 1.25;
    letter-spacing: 0;
}

.card-body h2 {
    font-size: 22px;
}

.card-body h3 {
    font-size: 19px;
}

.image-placeholder {
    width: 100%;
    height: 100%;
    min-height: 220px;
    display: grid;
    place-items: center;
    color: var(--primary-dark);
    background: linear-gradient(135deg, #eef4ed, #f8f3e8);
    font-weight: 900;
    text-align: center;
}

.image-placeholder.small {
    min-height: 160px;
}

.image-fallback {
    display: none;
}

.empty-state {
    padding: 32px;
    text-align: center;
}

.empty-state h1,
.empty-state h2 {
    margin-top: 0;
}

.page-layout {
    display: grid;
    grid-template-columns: 270px minmax(0, 1fr);
    gap: 26px;
    padding: 34px 0;
}

.sidebar h1 {
    margin: 0 0 8px;
    line-height: 1.15;
}

.muted-text {
    color: var(--muted);
}

.listing {
    min-width: 0;
}

.pagination {
    display: flex;
    gap: 8px;
    margin-top: 24px;
    flex-wrap: wrap;
}

.pagination a {
    width: 40px;
    height: 40px;
    display: grid;
    place-items: center;
    border: 1px solid var(--line);
    background: #fff;
    border-radius: 6px;
    font-weight: 800;
}

.pagination a.active {
    background: var(--primary);
    border-color: var(--primary);
    color: #fff;
}

.detail-layout {
    padding: 36px 0;
}

.article {
    max-width: 860px;
    margin: 0 auto;
}

.article-header h1 {
    margin: 14px 0 10px;
    font-size: clamp(30px, 5vw, 52px);
    line-height: 1.08;
    letter-spacing: 0;
}

.article-image {
    width: 100%;
    max-height: 520px;
    object-fit: cover;
    border-radius: 8px;
    border: 1px solid var(--line);
    margin: 22px 0;
}

.article-content {
    font-size: 18px;
    background: var(--surface);
    border: 1px solid var(--line);
    border-radius: 8px;
    padding: 28px;
}

.article-content p:first-child {
    margin-top: 0;
}

.article-content p:last-child {
    margin-bottom: 0;
}

.source-box {
    margin-top: 18px;
    padding: 22px;
}

.source-box p {
    color: var(--muted);
}

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

.status.warning {
    color: var(--warning);
    font-weight: 800;
}

.site-footer {
    margin-top: 30px;
    padding: 26px 0;
    border-top: 1px solid var(--line);
    color: var(--muted);
    background: #fff;
    font-size: 14px;
}

.auth-page {
    min-height: 100vh;
    display: grid;
    place-items: center;
    padding: 32px 16px;
    background: var(--bg);
}

.auth-card {
    width: min(430px, 100%);
    padding: 28px;
}

.admin-shell {
    min-height: 100vh;
}

.admin-header {
    background: var(--primary-dark);
    color: #fff;
}

.admin-header .header-inner {
    min-height: 64px;
}

.admin-header a {
    color: #fff;
}

.admin-nav {
    display: flex;
    gap: 8px;
    flex-wrap: wrap;
}

.admin-nav a {
    padding: 8px 10px;
    border-radius: 6px;
    background: rgba(255, 255, 255, 0.1);
}

.admin-main {
    padding: 28px 0;
}

.admin-title {
    display: flex;
    justify-content: space-between;
    align-items: flex-start;
    gap: 16px;
    margin-bottom: 18px;
}

.admin-title h1 {
    margin: 0;
}

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

.admin-card {
    padding: 20px;
}

.stat-number {
    display: block;
    font-size: 34px;
    line-height: 1;
    font-weight: 900;
    color: var(--primary);
}

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

.form-field {
    display: flex;
    flex-direction: column;
    gap: 6px;
}

.form-field.full {
    grid-column: 1 / -1;
}

label {
    font-weight: 800;
}

input,
select,
textarea {
    width: 100%;
    min-height: 42px;
    border: 1px solid var(--line);
    border-radius: 6px;
    padding: 10px 12px;
    font: inherit;
    background: #fff;
    color: var(--ink);
}

input[type="checkbox"] {
    width: auto;
    min-height: auto;
}

textarea {
    min-height: 100px;
    resize: vertical;
}

.flash {
    padding: 12px 14px;
    border-radius: 6px;
    margin-bottom: 16px;
    background: #e6f3ed;
    color: var(--primary-dark);
    font-weight: 700;
}

.flash.error {
    background: #fde8e8;
    color: var(--danger);
}

.table-wrap {
    overflow-x: auto;
    background: #fff;
    border: 1px solid var(--line);
    border-radius: 8px;
}

table {
    width: 100%;
    border-collapse: collapse;
    min-width: 760px;
}

th,
td {
    padding: 12px;
    border-bottom: 1px solid var(--line);
    text-align: left;
    vertical-align: top;
}

th {
    background: var(--surface-soft);
    font-size: 13px;
    text-transform: uppercase;
    letter-spacing: 0;
}

.table-actions {
    display: flex;
    gap: 8px;
    flex-wrap: wrap;
}

.inline-form {
    display: inline;
}

.tiny-button {
    border: 1px solid var(--line);
    background: #fff;
    color: var(--primary-dark);
    border-radius: 6px;
    padding: 7px 9px;
    cursor: pointer;
    font-weight: 800;
}

.tiny-button.danger {
    color: #fff;
    border-color: var(--danger);
    background: var(--danger);
}

.status-pill {
    display: inline-flex;
    padding: 4px 8px;
    border-radius: 999px;
    background: var(--surface-soft);
    font-weight: 800;
    font-size: 12px;
}

.status-pill.ok {
    color: var(--primary);
}

.status-pill.off {
    color: var(--muted);
}

.status-pill.danger {
    color: #fff;
    background: var(--danger);
}

.cron-tabs {
    display: flex;
    gap: 8px;
    flex-wrap: wrap;
    margin-bottom: 18px;
}

.cron-tabs a {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-height: 38px;
    padding: 8px 12px;
    border: 1px solid var(--line);
    border-radius: 6px;
    background: #fff;
    color: var(--primary-dark);
    font-weight: 800;
}

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

.cron-card {
    min-width: 0;
}

.cron-card-head {
    display: flex;
    align-items: flex-start;
    justify-content: space-between;
    gap: 12px;
    margin-bottom: 14px;
}

.cron-card h2 {
    margin: 0 0 4px;
}

.cron-command {
    min-height: 74px;
    font-family: Consolas, Monaco, monospace;
    font-size: 13px;
    color: var(--primary-dark);
    background: #f8faf7;
}

.cron-actions {
    display: flex;
    gap: 8px;
    flex-wrap: wrap;
    margin-top: 10px;
}

.compact-table {
    margin-top: 14px;
}

.compact-table table {
    min-width: 620px;
}

@media (max-width: 900px) {
    .hero-grid,
    .featured-news,
    .page-layout {
        grid-template-columns: 1fr;
    }

    .page-layout {
        gap: 20px;
    }

    .sidebar {
        padding: 16px;
        border: 1px solid var(--line);
        border-radius: 8px;
        background: rgba(255, 255, 255, 0.96);
        box-shadow: var(--shadow);
    }

    .sidebar .chip-list.vertical {
        flex-direction: row;
        align-items: center;
        flex-wrap: wrap;
    }

    .news-grid,
    .news-grid.two,
    .admin-grid,
    .cron-grid {
        grid-template-columns: repeat(2, minmax(0, 1fr));
    }
}

@media (max-width: 680px) {
    .header-inner,
    .admin-title {
        align-items: flex-start;
        flex-direction: column;
    }

    .header-topline-inner {
        min-height: 30px;
        justify-content: flex-start;
        gap: 8px 12px;
        font-size: 11px;
    }

    .header-topline-inner span:nth-child(3) {
        display: none;
    }

    .header-inner {
        min-height: 0;
        gap: 12px;
        padding-top: 12px;
        padding-bottom: 12px;
    }

    .brand {
        min-width: 0;
    }

    .brand-mark {
        width: 48px;
        height: 48px;
    }

    .main-nav {
        width: 100%;
        flex-wrap: nowrap;
        justify-content: flex-start;
        overflow-x: auto;
        padding-bottom: 3px;
        -webkit-overflow-scrolling: touch;
    }

    .main-nav a {
        flex: 0 0 auto;
        min-height: 34px;
        padding: 7px 10px;
        font-size: 13px;
    }

    .focus-inner {
        min-height: 42px;
        gap: 8px;
    }

    .focus-source {
        display: none;
    }

    .hero {
        padding-top: 34px;
    }

    .hero-grid {
        gap: 18px;
    }

    .category-panel {
        padding: 14px;
    }

    .panel-title {
        margin-bottom: 10px;
        font-size: 16px;
    }

    .category-select-wrap {
        display: block;
    }

    .category-panel .chip-list,
    .sidebar .chip-list {
        display: none;
    }

    .featured-image {
        min-height: 240px;
    }

    .featured-body,
    .article-content,
    .source-box {
        padding: 20px;
    }

    .news-grid,
    .news-grid.two,
    .admin-grid,
    .form-grid,
    .cron-grid {
        grid-template-columns: 1fr;
    }

    .homepage-flow {
        padding-top: 0;
    }

    .category-showcase {
        padding: 22px 0;
    }

    .category-showcase-heading {
        align-items: flex-start;
        flex-direction: column;
        gap: 8px;
    }

    .category-showcase-heading h2 {
        font-size: 22px;
    }

    .category-showcase-heading p {
        font-size: 14px;
    }

    .category-strip {
        display: grid;
        grid-auto-flow: column;
        grid-auto-columns: minmax(260px, 82vw);
        grid-template-columns: none;
        gap: 14px;
        overflow-x: auto;
        overscroll-behavior-inline: contain;
        scroll-snap-type: inline mandatory;
        padding: 2px 2px 12px;
        margin-inline: -2px;
        -webkit-overflow-scrolling: touch;
    }

    .category-strip .category-card {
        scroll-snap-align: start;
    }

    .admin-nav {
        width: 100%;
    }

    .admin-nav a {
        flex: 1 1 auto;
        text-align: center;
    }

    .page-layout {
        gap: 16px;
        padding-top: 18px;
    }

    .sidebar {
        padding: 14px;
        border: 1px solid var(--line);
        border-radius: 8px;
        background: rgba(255, 255, 255, 0.96);
        box-shadow: var(--shadow);
        overflow: hidden;
    }

    .sidebar h1 {
        font-size: 24px;
        margin-bottom: 4px;
    }

    .sidebar .muted-text {
        display: none;
    }

    .chip-list,
    .chip-list.vertical {
        display: flex;
        flex-direction: row;
        flex-wrap: nowrap;
        align-items: center;
        gap: 8px;
        overflow-x: auto;
        overflow-y: hidden;
        max-width: 100%;
        padding: 2px 2px 8px;
        scroll-snap-type: x proximity;
        -webkit-overflow-scrolling: touch;
    }

    .chip-list::-webkit-scrollbar {
        height: 0;
    }

    .chip {
        width: auto;
        max-width: 230px;
        flex: 0 0 auto;
        scroll-snap-align: start;
        justify-content: space-between;
        gap: 7px;
        text-align: left;
        min-height: 34px;
        padding: 7px 10px;
        font-size: 12px;
        box-shadow: 0 2px 8px rgba(15, 73, 55, 0.06);
    }

    .chip.active {
        box-shadow: 0 6px 16px rgba(20, 121, 87, 0.18);
    }

    .chip-label {
        max-width: 150px;
        white-space: nowrap;
        overflow: hidden;
        text-overflow: ellipsis;
        overflow-wrap: normal;
    }

    .chip-badges {
        margin-left: auto;
        gap: 3px;
    }

    .chip-count,
    .chip-new {
        font-size: 9px;
        min-width: 18px;
        min-height: 17px;
        padding: 2px 5px;
    }
}
