:root {
    --ink: #242424;
    --muted: #6d6d6d;
    --navy: #003471;
    --navy-deep: #00244f;
    --gold: #dda825;
    --gold-light: #ede597;
    --paper: #f7f7f5;
    --white: #ffffff;
    --line: #e2dfd5;
    --danger: #9b2c2c;
    --content: 1180px;
}

* {
    box-sizing: border-box;
}

html {
    scroll-behavior: smooth;
}

body {
    margin: 0;
    background: var(--paper);
    color: var(--ink);
    font-family: "Be Vietnam Pro", ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
    font-size: 16px;
    line-height: 1.65;
}

a {
    color: inherit;
}

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

button,
.primary-button {
    min-height: 44px;
}

:focus-visible {
    outline: 3px solid #f3b931;
    outline-offset: 3px;
}

.skip-link {
    position: fixed;
    left: 1rem;
    top: -5rem;
    z-index: 100;
    background: var(--white);
    padding: 0.75rem 1rem;
}

.skip-link:focus {
    top: 1rem;
}

.container {
    width: min(calc(100% - 2.5rem), var(--content));
    margin-inline: auto;
}

.site-header {
    position: sticky;
    top: 0;
    z-index: 50;
    border-bottom: 1px solid rgba(255, 255, 255, 0.16);
    background: var(--navy);
    color: var(--white);
}

.header-inner {
    display: flex;
    min-height: 72px;
    width: min(calc(100% - 2.5rem), var(--content));
    margin-inline: auto;
    align-items: center;
    justify-content: space-between;
    gap: 2rem;
}

.wordmark {
    display: inline-flex;
    flex-direction: column;
    color: inherit;
    text-decoration: none;
    line-height: 1.25;
}

.wordmark strong {
    font-family: "Lora", Georgia, "Times New Roman", serif;
    font-size: 1.12rem;
    letter-spacing: 0.01em;
}

.wordmark span {
    color: rgba(255, 255, 255, 0.68);
    font-size: 0.78rem;
    letter-spacing: 0.07em;
    text-transform: uppercase;
}

.main-menu {
    display: flex;
    align-items: center;
    gap: 1.5rem;
}

.main-menu a {
    color: rgba(255, 255, 255, 0.86);
    font-size: 0.94rem;
    text-decoration: none;
}

.main-menu a:hover {
    color: var(--white);
}

.main-menu .nav-action {
    border: 1px solid rgba(255, 255, 255, 0.48);
    padding: 0.5rem 0.9rem;
}

.menu-button {
    display: none;
    border: 1px solid rgba(255, 255, 255, 0.45);
    background: transparent;
    color: var(--white);
    padding-inline: 1rem;
}

.urgent-strip {
    display: flex;
    min-height: 52px;
    padding: 0.75rem max(1.25rem, calc((100vw - var(--content)) / 2));
    align-items: center;
    gap: 1.5rem;
    border-bottom: 1px solid #e8cf78;
    background: #fff8df;
    font-size: 0.93rem;
    overflow-wrap: anywhere;
}

.urgent-strip strong {
    flex: 0 0 auto;
    color: #795700;
    text-transform: uppercase;
    letter-spacing: 0.06em;
    font-size: 0.78rem;
}

.cinematic {
    position: relative;
    height: 360vh;
    min-height: 1500px;
    background: var(--navy-deep);
}

.cinematic-sticky {
    position: sticky;
    top: 72px;
    height: calc(100vh - 72px);
    min-height: 520px;
    overflow: hidden;
    background: var(--navy-deep);
    color: var(--white);
}

.cinematic canvas,
.cinematic-fallback,
.cinematic-shade {
    position: absolute;
    inset: 0;
    width: 100%;
    height: 100%;
}

.cinematic canvas {
    z-index: 1;
}

.cinematic-fallback {
    z-index: 0;
    object-fit: cover;
}

.cinematic.is-ready .cinematic-fallback {
    opacity: 0;
}

.cinematic.is-static {
    height: calc(100vh - 72px);
    min-height: 620px;
}

.cinematic.is-static .cinematic-sticky {
    position: relative;
    top: 0;
}

.cinematic.is-static canvas {
    display: none;
}

.cinematic.is-static .cinematic-fallback {
    opacity: 1;
}

.cinematic-shade {
    z-index: 2;
    background: linear-gradient(90deg, rgba(0, 24, 55, 0.88) 0%, rgba(0, 35, 76, 0.42) 48%, rgba(0, 35, 76, 0.25) 70%, rgba(0, 24, 55, 0.76) 100%), linear-gradient(0deg, rgba(0, 24, 55, 0.66) 0%, transparent 42%);
    transition: background-color 150ms linear;
}

.cinematic-content {
    position: relative;
    z-index: 3;
    display: flex;
    height: 100%;
    flex-direction: column;
    align-items: flex-start;
    justify-content: center;
    padding-bottom: 4rem;
    padding-right: min(38vw, 470px);
}

.eyebrow {
    margin: 0 0 0.75rem;
    color: var(--gold-light);
    font-size: 0.78rem;
    font-weight: 700;
    letter-spacing: 0.16em;
    text-transform: uppercase;
}

.eyebrow.dark {
    color: #9a6c08;
}

.cinematic h1 {
    max-width: 720px;
    margin: 0;
    font-family: "Lora", Georgia, "Times New Roman", serif;
    font-size: clamp(3.4rem, 8vw, 7.4rem);
    font-weight: 400;
    letter-spacing: -0.055em;
    line-height: 0.88;
}

.cinematic-kicker {
    margin: 1.7rem 0 0;
    font-family: "Lora", Georgia, "Times New Roman", serif;
    font-size: clamp(1.4rem, 2.4vw, 2rem);
}

.cinematic-intro {
    max-width: 570px;
    margin: 0.8rem 0 1.7rem;
    color: rgba(255, 255, 255, 0.75);
    font-size: 1.08rem;
}

.primary-button {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    border: 1px solid var(--white);
    background: var(--white);
    color: var(--navy);
    padding: 0.68rem 1.15rem;
    font-weight: 700;
    text-decoration: none;
}

.dark-button {
    border-color: var(--navy);
    background: var(--navy);
    color: var(--white);
}

.cinematic-news {
    position: absolute;
    z-index: 4;
    top: 50%;
    right: max(1.25rem, calc((100vw - var(--content)) / 2));
    width: min(370px, 32vw);
    border: 1px solid rgba(255, 255, 255, 0.24);
    background: rgba(0, 40, 86, 0.9);
    color: var(--white);
    padding: 1.25rem 1.35rem;
    transform: translateY(-50%);
}

.cinematic-news-heading {
    display: grid;
    grid-template-columns: auto 1fr;
    align-items: center;
    gap: 1rem;
    color: var(--gold-light);
    font-size: 0.75rem;
    font-weight: 700;
    letter-spacing: 0.12em;
    text-transform: uppercase;
}

.cinematic-news-heading i {
    position: relative;
    display: block;
    height: 1px;
    overflow: hidden;
    background: rgba(255, 255, 255, 0.24);
}

.cinematic-news-heading i::after {
    position: absolute;
    inset: 0;
    background: var(--gold);
    content: "";
    transform: scaleX(var(--notice-progress, 0));
    transform-origin: left;
}

.cinematic-news-items {
    position: relative;
    min-height: 240px;
    margin-top: 1.3rem;
}

.cinematic-notice {
    position: absolute;
    inset: 0;
    display: flex;
    color: var(--white);
    flex-direction: column;
    justify-content: center;
    opacity: 0;
    pointer-events: none;
    text-decoration: none;
    transform: translateY(22px);
    transition: opacity 420ms ease, transform 520ms cubic-bezier(0.22, 1, 0.36, 1);
}

.cinematic-notice.is-active {
    opacity: 1;
    pointer-events: auto;
    transform: translateY(0);
}

.cinematic-notice > * {
    flex-shrink: 0;
}

.cinematic-notice-count,
.cinematic-notice small {
    color: var(--gold-light);
    font-size: 0.75rem;
    letter-spacing: 0.12em;
    text-transform: uppercase;
}

.cinematic-notice small {
    margin-top: auto;
    letter-spacing: 0.04em;
}

.cinematic-notice strong {
    margin: 0.65rem 0;
    font-family: "Lora", Georgia, "Times New Roman", serif;
    font-size: clamp(1.35rem, 2vw, 1.75rem);
    font-weight: 500;
    line-height: 1.25;
    overflow-wrap: anywhere;
}

.cinematic-notice.has-long-title strong {
    font-size: 1.08rem;
    line-height: 1.18;
}

.cinematic-notice > span:last-child {
    margin-bottom: auto;
    color: rgba(255, 255, 255, 0.68);
    font-size: 0.9rem;
    overflow-wrap: anywhere;
}

.cinematic-news-footer {
    display: flex;
    border-top: 1px solid rgba(255, 255, 255, 0.2);
    padding-top: 0.8rem;
    align-items: center;
    justify-content: space-between;
    gap: 1rem;
}

.cinematic-news-all {
    display: inline-block;
    color: rgba(255, 255, 255, 0.78);
    font-size: 0.82rem;
    font-weight: 700;
    text-decoration: none;
}

.cinematic-news-controls {
    display: flex;
    align-items: center;
    gap: 0.35rem;
}

.cinematic-news-controls button {
    display: inline-grid;
    width: 44px;
    height: 36px;
    border: 0;
    background: transparent;
    color: var(--gold-light);
    padding: 0;
    place-items: center;
}

.cinematic-news-controls button:hover,
.cinematic-news-controls button:focus-visible {
    background: rgba(255, 255, 255, 0.1);
    color: var(--white);
}

.cinematic-news-controls svg {
    width: 28px;
    fill: none;
    stroke: currentColor;
    stroke-linecap: square;
    stroke-linejoin: miter;
    stroke-width: 2.5;
}

.home-section,
.content-panel,
.form-panel {
    padding-block: 5rem;
}

.section-heading {
    display: flex;
    margin-bottom: 2rem;
    align-items: end;
    justify-content: space-between;
    gap: 2rem;
}

.section-heading h2,
.home-aside h2,
.page-hero h1,
.article h1,
.result-panel h1,
.login-panel h1,
.admin-main h1 {
    margin: 0;
    font-family: "Lora", Georgia, "Times New Roman", serif;
    font-weight: 400;
    letter-spacing: -0.03em;
    line-height: 1.08;
}

.section-heading h2 {
    font-size: clamp(2rem, 4vw, 3rem);
}

.section-heading > a {
    color: var(--navy);
    font-weight: 700;
}

.home-grid {
    display: grid;
    grid-template-columns: minmax(0, 2fr) minmax(280px, 1fr);
    gap: clamp(2rem, 5vw, 5rem);
}

.notice-row {
    display: grid;
    grid-template-columns: 132px minmax(0, 1fr);
    gap: 1.5rem;
    border-top: 1px solid var(--line);
    padding: 1.5rem 0;
}

.notice-date {
    display: flex;
    flex-direction: column;
}

.notice-date span {
    color: var(--navy);
    font-weight: 700;
}

.notice-date small,
.notice-copy small {
    color: var(--muted);
}

.notice-copy h3 {
    margin: 0.3rem 0 0.45rem;
    font-family: "Lora", Georgia, "Times New Roman", serif;
    font-size: 1.32rem;
    line-height: 1.28;
}

.notice-copy h3 a {
    text-decoration: none;
    overflow-wrap: anywhere;
}

.notice-copy p {
    margin: 0 0 0.5rem;
    color: var(--muted);
    overflow-wrap: anywhere;
}

.notice-labels {
    display: flex;
    gap: 0.5rem;
}

.notice-labels span,
.status {
    display: inline-block;
    border: 1px solid #d0c9b5;
    color: var(--navy);
    padding: 0.1rem 0.45rem;
    font-size: 0.72rem;
    font-weight: 700;
    letter-spacing: 0.04em;
    text-transform: uppercase;
}

.notice-labels .urgent {
    border-color: #d9b443;
    color: #795700;
}

.status.active {
    border-color: #8eb9a2;
    color: #17653c;
}

.status.inactive {
    border-color: #c9c9c9;
    color: var(--muted);
}

.home-aside {
    border-left: 1px solid var(--line);
    padding-left: 2rem;
}

.home-aside section:first-child {
    display: flex;
    flex-direction: column;
}

.home-aside h2 {
    margin-bottom: 1.2rem;
    font-size: 1.8rem;
}

.home-aside a {
    border-top: 1px solid var(--line);
    padding: 0.8rem 0;
    color: var(--navy);
    font-weight: 700;
    text-decoration: none;
}

.contact-note {
    margin-top: 2.5rem;
    border-top: 3px solid var(--gold);
    background: var(--white);
    padding: 1.4rem;
}

.contact-note h3,
.contact-note p {
    margin-top: 0;
}

.channels-section {
    border-top: 1px solid var(--line);
    background: var(--white);
    padding-block: 4.5rem;
}

.channels-section.standalone {
    border-top: 0;
    background: var(--paper);
    padding-top: 0;
}

.channel-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
    gap: 1.25rem;
}

.channel-card {
    display: flex;
    min-width: 0;
    border: 1px solid var(--line);
    border-top: 4px solid var(--gold);
    background: var(--paper);
    padding: 1.25rem;
    flex-direction: column;
}

@supports (grid-template-rows: subgrid) {
    .channel-card {
        display: grid;
        grid-row: span 3;
        grid-template-rows: subgrid;
        row-gap: 0;
    }
}

.channel-card-heading {
    display: flex;
    min-height: 54px;
    align-items: center;
    gap: 0.8rem;
}

.channel-card-heading small {
    color: var(--muted);
}

.channel-card h3,
.admin-channel-card h3 {
    margin: 0;
    font-family: "Lora", Georgia, "Times New Roman", serif;
    font-size: 1.2rem;
    line-height: 1.25;
}

.channel-icon {
    display: inline-flex;
    width: 40px;
    height: 40px;
    flex: 0 0 40px;
    align-items: center;
    justify-content: center;
    color: var(--white);
    font-family: Arial, sans-serif;
    font-weight: 700;
}

.channel-icon.facebook {
    border-radius: 50%;
    background: #1877f2;
    font-size: 1.7rem;
}

.channel-icon.zalo {
    border-radius: 9px;
    background: #0068ff;
    font-size: 0.67rem;
}

.channel-qr {
    display: block;
    width: min(100%, 260px);
    margin: 1.2rem auto;
    border: 1px solid var(--line);
    background: var(--white);
    padding: 0.65rem;
    align-self: start;
}

.channel-qr img {
    display: block;
    width: 100%;
    height: auto;
    aspect-ratio: 1;
    object-fit: contain;
}

.channel-link {
    margin-top: auto;
    color: var(--navy);
    font-weight: 700;
    text-align: center;
    align-self: end;
}

.channel-empty {
    border-block: 1px solid var(--line);
    color: var(--muted);
    padding-block: 1.5rem;
}

.contact-page {
    display: grid;
    grid-template-columns: minmax(0, 2fr) minmax(260px, 1fr);
    align-items: start;
    gap: clamp(2rem, 6vw, 5rem);
}

.contact-copy h2:first-of-type {
    margin-top: 0;
}

.contact-guidance {
    border-top: 4px solid var(--gold);
    background: var(--paper);
    padding: 1.5rem;
}

.contact-guidance h2 {
    margin-top: 0;
    font-family: "Lora", Georgia, "Times New Roman", serif;
}

.neighborhood-section {
    background: var(--navy);
    color: var(--white);
    padding-block: 4.5rem;
}

.neighborhood-section .section-heading > a,
.neighborhood-section .notice-date span,
.neighborhood-section .notice-copy small {
    color: rgba(255, 255, 255, 0.75);
}

.neighborhood-section .notice-row {
    border-color: rgba(255, 255, 255, 0.18);
}

.neighborhood-section .notice-copy p {
    color: rgba(255, 255, 255, 0.7);
}

.page-hero {
    padding-top: 5rem;
    padding-bottom: 3rem;
}

.page-hero h1,
.article h1,
.result-panel h1 {
    max-width: 900px;
    font-size: clamp(2.6rem, 6vw, 5rem);
}

.page-hero > p:last-child {
    max-width: 700px;
    color: var(--muted);
    font-size: 1.1rem;
}

.content-panel,
.form-panel {
    margin-bottom: 5rem;
    background: var(--white);
    padding-inline: clamp(1.25rem, 5vw, 4rem);
}

.filter-form {
    display: grid;
    grid-template-columns: 2fr 1fr auto;
    align-items: end;
    gap: 1rem;
    border-bottom: 1px solid var(--line);
    padding-bottom: 2rem;
}

.filter-form.single-filter {
    grid-template-columns: minmax(0, 1fr) auto;
}

label {
    display: flex;
    color: var(--ink);
    font-size: 0.9rem;
    font-weight: 700;
    flex-direction: column;
    gap: 0.4rem;
}

label span {
    color: var(--muted);
    font-size: 0.78rem;
    font-weight: 400;
}

input,
textarea,
select {
    width: 100%;
    border: 1px solid #c9c6bd;
    border-radius: 0;
    background: var(--white);
    color: var(--ink);
    padding: 0.72rem 0.8rem;
}

textarea {
    resize: vertical;
}

button {
    border: 1px solid var(--navy);
    background: var(--white);
    color: var(--navy);
    cursor: pointer;
    padding: 0.6rem 1rem;
    font-weight: 700;
}

.article {
    max-width: 900px;
    padding-block: 4rem 6rem;
}

.back-link {
    display: inline-block;
    margin-bottom: 2.5rem;
    color: var(--navy);
}

.article-summary {
    color: var(--muted);
    font-size: 1.2rem;
}

.article-meta {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    border-block: 1px solid var(--line);
    padding-block: 1.3rem;
    gap: 1rem;
}

.article-meta dt {
    color: var(--muted);
    font-size: 0.78rem;
    text-transform: uppercase;
}

.article-meta dd {
    margin: 0;
    font-weight: 700;
}

.article-content {
    margin: 3rem 0;
    font-family: "Lora", Georgia, "Times New Roman", serif;
    font-size: 1.12rem;
    line-height: 1.85;
    overflow-wrap: anywhere;
}

.article-content h2,
.article-content h3,
.article-content h4,
.prose h2 {
    margin-top: 2.5rem;
    font-family: "Lora", Georgia, "Times New Roman", serif;
    font-size: 1.8rem;
}

.article-content h3 {
    font-size: 1.45rem;
}

.article-content h4 {
    font-size: 1.2rem;
}

.article-content p,
.article-content ul,
.article-content ol,
.article-content blockquote,
.article-content pre {
    margin-block: 1.15rem;
}

.article-content img {
    display: block;
    max-width: 100%;
    height: auto;
    margin: 2rem auto;
    border-radius: 2px;
}

.prose {
    min-width: 0;
    overflow-wrap: anywhere;
}

.prose img {
    display: block;
    width: auto;
    max-width: 100%;
    height: auto;
    margin: 2rem auto;
    object-fit: contain;
}

.article-content blockquote {
    border-left: 4px solid var(--gold);
    background: #f7f4ec;
    color: #3f4852;
    padding: 1rem 1.4rem;
}

.article-content pre {
    overflow-x: auto;
    background: #f0f2f4;
    padding: 1rem;
    font: 0.9rem/1.6 Consolas, monospace;
}

.article-content a {
    color: var(--navy);
    text-decoration-thickness: 1px;
    text-underline-offset: 0.18em;
}

.article-content .ql-align-center {
    text-align: center;
}

.article-content .ql-align-right {
    text-align: right;
}

.article-content .ql-align-justify {
    text-align: justify;
}

.share-row,
.form-actions {
    display: flex;
    gap: 0.75rem;
    flex-wrap: wrap;
}

.stack-form,
.admin-form {
    display: flex;
    flex-direction: column;
    gap: 1.2rem;
}

.rich-editor-field {
    display: flex;
    flex-direction: column;
    gap: 0.4rem;
}

.field-label {
    color: var(--ink);
    font-size: 0.9rem;
    font-weight: 700;
}

.field-help {
    color: var(--muted);
    font-size: 0.78rem;
}

.rich-editor-shell {
    background: var(--white);
}

.rich-editor-toolbar.ql-toolbar.ql-snow {
    position: sticky;
    z-index: 5;
    top: 72px;
    border-color: #c9c6bd;
    background: #f9fafb;
}

.rich-editor-toolbar.ql-toolbar button {
    padding: 3px 5px;
}

.rich-editor.ql-container.ql-snow {
    min-height: 360px;
    border-color: #c9c6bd;
    font: 1rem/1.7 "Be Vietnam Pro", Arial, sans-serif;
}

.rich-editor .ql-editor {
    min-height: 360px;
    padding: 1.2rem;
}

.rich-editor .ql-editor img {
    max-width: 100%;
    height: auto;
}

.editor-actions {
    display: flex;
    border: 1px solid #c9c6bd;
    border-top: 0;
    padding: 0.65rem;
    align-items: center;
    gap: 0.55rem;
    flex-wrap: wrap;
}

.editor-actions button {
    padding: 0.42rem 0.7rem;
    font-size: 0.8rem;
}

.editor-actions [data-editor-status] {
    color: var(--muted);
    font-size: 0.8rem;
}

.rich-editor-enhanced .rich-editor-source {
    position: absolute;
    width: 1px;
    height: 1px;
    overflow: hidden;
    clip: rect(0 0 0 0);
    clip-path: inset(50%);
    white-space: nowrap;
}

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

.honeypot {
    position: absolute;
    left: -10000px;
}

.privacy-note {
    border-left: 3px solid var(--gold);
    color: var(--muted);
    padding-left: 1rem;
}

.result-panel {
    max-width: 760px;
    min-height: 70vh;
    padding-block: 7rem;
}

.receipt-code {
    display: block;
    margin-block: 1rem;
    color: var(--navy);
    font-size: 1.6rem;
    letter-spacing: 0.08em;
}

.document-groups {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 0;
    border-top: 1px solid var(--line);
}

.document-groups a {
    display: flex;
    border-bottom: 1px solid var(--line);
    padding: 1.4rem 0;
    color: var(--navy);
    flex-direction: column;
    text-decoration: none;
}

.document-groups a:nth-child(odd) {
    margin-right: 2rem;
}

.document-groups span {
    color: var(--muted);
    font-size: 0.9rem;
}

.document-groups a.is-active {
    border-bottom-color: var(--gold);
    color: var(--gold-dark);
}

.document-results {
    margin-top: 3rem;
    padding-top: 3rem;
    border-top: 1px solid var(--line);
}

.document-results .section-heading {
    margin-bottom: 1.25rem;
}

.site-footer {
    background: #00244f;
    color: var(--white);
    padding-block: 3rem;
}

.footer-inner {
    width: min(calc(100% - 2.5rem), var(--content));
    margin-inline: auto;
}

.footer-content {
    columns: 2;
    column-gap: 4rem;
}

.footer-content h2,
.footer-content h3 {
    margin: 0 0 0.3rem;
    break-after: avoid;
    font-family: "Lora", Georgia, "Times New Roman", serif;
    font-size: 1.05rem;
}

.footer-content h2:not(:first-child),
.footer-content h3:not(:first-child) {
    margin-top: 1.5rem;
}

.footer-content > * {
    break-inside: avoid;
}

.footer-inner p {
    margin: 0.3rem 0 0;
    color: rgba(255, 255, 255, 0.62);
}

.footer-content a {
    color: inherit;
}

.footer-content img {
    max-width: min(100%, 320px);
    height: auto;
}

.admin-body {
    background: #f3f4f6;
}

.admin-topbar {
    position: fixed;
    z-index: 50;
    top: 0;
    right: 0;
    left: 0;
    display: flex;
    height: 72px;
    background: var(--navy);
    color: var(--white);
    padding: 0 2rem;
    align-items: center;
    justify-content: space-between;
}

.admin-account {
    display: flex;
    align-items: center;
    gap: 1rem;
}

.admin-account > a {
    color: rgba(255, 255, 255, 0.82);
    font-size: 0.88rem;
}

.inline-form {
    display: inline;
}

.inline-form button {
    margin-left: 1rem;
    border-color: rgba(255, 255, 255, 0.5);
    background: transparent;
    color: var(--white);
}

.admin-sidebar {
    position: fixed;
    z-index: 20;
    top: 72px;
    bottom: 0;
    left: 0;
    display: flex;
    width: 230px;
    border-right: 1px solid var(--line);
    background: var(--white);
    flex-direction: column;
    padding: 2rem 1rem;
}

.admin-sidebar a {
    padding: 0.7rem 0.8rem;
    color: var(--navy);
    font-weight: 700;
    text-decoration: none;
}

.admin-main {
    margin-left: 230px;
    padding: 7rem 3rem 4rem;
}

.admin-heading {
    display: flex;
    margin-bottom: 2rem;
    align-items: end;
    justify-content: space-between;
}

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

.admin-main h1 {
    font-size: 2.8rem;
}

.admin-stats {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 1rem;
}

.admin-stats article,
.admin-help,
.table-wrap,
.admin-form {
    border: 1px solid var(--line);
    background: var(--white);
    padding: 1.5rem;
}

.admin-stats span {
    color: var(--navy);
    font-family: "Lora", Georgia, "Times New Roman", serif;
    font-size: 2.8rem;
}

.admin-stats p {
    margin: 0;
}

.admin-help {
    margin-top: 1.5rem;
}

.table-wrap {
    overflow-x: auto;
}

table {
    width: 100%;
    border-collapse: collapse;
}

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

th {
    color: var(--muted);
    font-size: 0.76rem;
    text-transform: uppercase;
}

td small {
    display: block;
    color: var(--muted);
}

.admin-form {
    max-width: 920px;
}

.cinematic-admin-grid {
    display: grid;
    grid-template-columns: minmax(0, 2fr) minmax(280px, 1fr);
    gap: 1.5rem;
    align-items: start;
}

.cinematic-admin-grid .admin-form {
    max-width: none;
}

.cinematic-mode-panel {
    max-width: none;
    margin-bottom: 1.5rem;
}

.mode-form {
    display: flex;
    align-items: center;
    gap: 1.25rem;
    flex-wrap: wrap;
}

.mode-form label {
    display: inline-flex;
    align-items: center;
    gap: 0.45rem;
}

.cinematic-static-form {
    grid-column: 1 / -1;
}

.cinematic-static-preview {
    display: grid;
    min-height: 180px;
    margin-block: 1rem;
    border: 1px solid var(--line);
    background: #eef2f5;
    place-items: center;
}

.cinematic-static-preview img {
    display: block;
    width: 100%;
    max-height: 420px;
    object-fit: cover;
}

.channel-admin-layout {
    display: grid;
    grid-template-columns: minmax(320px, 0.8fr) minmax(0, 1.2fr);
    gap: 1.5rem;
    align-items: start;
}

.channel-admin-layout .admin-form {
    max-width: none;
}

.channel-admin-layout h2 {
    margin-top: 0;
    font-family: "Lora", Georgia, "Times New Roman", serif;
}

.channel-icon-examples {
    display: flex;
    gap: 1rem;
    flex-wrap: wrap;
}

.channel-icon-examples > span {
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
    color: var(--muted);
    font-size: 0.85rem;
}

.channel-icon-examples .channel-icon {
    width: 32px;
    height: 32px;
    flex-basis: 32px;
}

.admin-channel-list {
    display: flex;
    flex-direction: column;
    gap: 0.8rem;
}

.admin-channel-card {
    display: grid;
    grid-template-columns: 104px minmax(0, 1fr) auto;
    border: 1px solid var(--line);
    background: var(--white);
    padding: 1rem;
    align-items: center;
    gap: 1rem;
}

.admin-channel-card > img {
    width: 104px;
    height: 104px;
    border: 1px solid var(--line);
    object-fit: contain;
}

.admin-channel-card .channel-icon {
    float: left;
    width: 32px;
    height: 32px;
    margin-right: 0.6rem;
    flex-basis: 32px;
}

.admin-channel-card p {
    margin: 0.25rem 0;
    color: var(--muted);
}

.danger-button {
    border-color: var(--danger);
    color: var(--danger);
}

.delete-post-panel {
    display: flex;
    max-width: 980px;
    margin-top: 2rem;
    border-top: 1px solid #d9aaa7;
    padding-top: 1.25rem;
    align-items: center;
    justify-content: space-between;
    gap: 1rem;
}

.delete-post-panel p {
    margin: 0;
    color: var(--muted);
}

.cinematic-admin-grid h2 {
    margin-top: 0;
    font-family: "Lora", Georgia, "Times New Roman", serif;
}

.cinematic-status {
    border-top: 4px solid var(--gold);
    background: var(--white);
    padding: 1.5rem;
}

.cinematic-status dl {
    display: grid;
    grid-template-columns: 1fr 1fr;
    border-block: 1px solid var(--line);
    padding-block: 1rem;
    gap: 1rem;
}

.cinematic-status dt {
    color: var(--muted);
    font-size: 0.78rem;
    text-transform: uppercase;
}

.cinematic-status dd {
    margin: 0;
    color: var(--navy);
    font-weight: 700;
}

button:disabled,
input:disabled {
    cursor: not-allowed;
    opacity: 0.55;
}

.admin-form fieldset {
    border: 1px solid var(--line);
}

.check {
    display: inline-flex;
    margin-right: 2rem;
    flex-direction: row;
    align-items: center;
}

.check input {
    width: auto;
}

.login-panel {
    display: grid;
    min-height: 100vh;
    place-items: center;
    padding: 2rem;
}

.login-panel > div {
    width: min(100%, 430px);
    border-top: 4px solid var(--navy);
    background: var(--white);
    padding: 2.5rem;
}

.login-panel h1 {
    font-size: 2.4rem;
}

.alert {
    margin-block: 1rem;
    border: 1px solid var(--line);
    padding: 0.8rem 1rem;
}

.alert.error {
    border-color: #d9aaa7;
    background: #fff5f4;
    color: var(--danger);
}

.alert.success {
    border-color: #8eb9a2;
    background: #f0faf4;
    color: #17653c;
}

.empty-state {
    border-top: 1px solid var(--line);
    color: var(--muted);
    padding-block: 2rem;
}

@media (max-width: 820px) {
    .menu-button {
        display: block;
    }

    .main-menu {
        position: absolute;
        top: 72px;
        right: 0;
        left: 0;
        display: none;
        border-top: 1px solid rgba(255, 255, 255, 0.18);
        background: var(--navy);
        padding: 1rem 1.25rem 1.5rem;
        flex-direction: column;
        align-items: stretch;
        gap: 0;
    }

    .main-menu.is-open {
        display: flex;
    }

    .main-menu a {
        padding: 0.75rem 0;
    }

    .urgent-strip {
        align-items: flex-start;
        flex-direction: column;
        gap: 0.2rem;
    }

    .contact-page,
    .channel-admin-layout {
        grid-template-columns: 1fr;
    }

    .admin-channel-card {
        grid-template-columns: 88px minmax(0, 1fr);
    }

    .admin-channel-card > img {
        width: 88px;
        height: 88px;
    }

    .admin-channel-card form {
        grid-column: 1 / -1;
    }

    .cinematic {
        height: 145vh;
        min-height: 850px;
    }

    .cinematic h1 {
        font-size: clamp(3.2rem, 17vw, 5rem);
    }

    .cinematic-content {
        justify-content: flex-start;
        padding-top: 7vh;
        padding-right: 0;
        padding-bottom: 15.5rem;
    }

    .cinematic-news {
        top: auto;
        right: 1.25rem;
        bottom: 1rem;
        left: 1.25rem;
        width: auto;
        padding: 0.9rem 1rem;
        transform: none;
    }

    .cinematic-news-items {
        min-height: 190px;
        margin-top: 0.6rem;
    }

    .cinematic-notice strong {
        margin-block: 0.35rem;
        font-size: 1.15rem;
    }

    .cinematic-notice > span:last-child {
        display: -webkit-box;
        overflow: hidden;
        font-size: 0.8rem;
        line-height: 1.35;
        -webkit-box-orient: vertical;
        -webkit-line-clamp: 3;
    }

    .cinematic-notice.has-long-title strong {
        font-size: 0.82rem;
        line-height: 1.15;
    }

    .cinematic-news-all {
        padding-top: 0.5rem;
    }

    .home-grid,
    .form-grid,
    .document-groups,
    .admin-stats {
        grid-template-columns: 1fr;
    }

    .document-groups a:nth-child(odd) {
        margin-right: 0;
    }

    .home-aside {
        border-top: 1px solid var(--line);
        border-left: 0;
        padding-top: 2rem;
        padding-left: 0;
    }

    .notice-row {
        grid-template-columns: 1fr;
        gap: 0.5rem;
    }

    .notice-date small {
        display: none;
    }

    .filter-form,
    .filter-form.single-filter {
        grid-template-columns: 1fr;
    }

    .article-meta {
        grid-template-columns: repeat(2, 1fr);
    }

    .footer-inner {
        columns: 1;
    }

    .admin-topbar {
        position: static;
        height: auto;
        padding-block: 1rem;
        gap: 1rem;
        flex-wrap: wrap;
    }

    .admin-account {
        width: 100%;
        flex-wrap: wrap;
    }

    .admin-sidebar {
        position: static;
        width: auto;
        border-bottom: 1px solid var(--line);
        flex-direction: row;
        overflow-x: auto;
        padding: 0.5rem;
    }

    .admin-sidebar a {
        flex: 0 0 auto;
    }

    .admin-main {
        margin-left: 0;
        padding: 2.5rem 1.25rem;
    }

    .admin-heading {
        align-items: flex-start;
        flex-direction: column;
        gap: 1rem;
    }

    .delete-post-panel {
        align-items: flex-start;
        flex-direction: column;
    }

    .cinematic-admin-grid {
        grid-template-columns: 1fr;
    }
}

@media (max-width: 380px) and (max-height: 700px) {
    .cinematic h1 {
        font-size: 2.7rem;
    }

    .cinematic-kicker {
        margin-top: 0.8rem;
        font-size: 1.2rem;
    }

    .cinematic-intro {
        display: none;
    }

    .cinematic-content {
        padding-top: 4vh;
    }

    .cinematic-news-items {
        min-height: 190px;
    }
}

@media (prefers-reduced-motion: reduce) {
    html {
        scroll-behavior: auto;
    }

    .cinematic {
        height: auto !important;
        min-height: 0;
    }

    .cinematic-sticky {
        position: relative;
        top: 0;
        height: min(780px, calc(100vh - 72px));
    }

    .cinematic canvas {
        display: none;
    }

    .cinematic-notice {
        transition: none;
    }
}
