:root {
    --app-vh: 1vh;
    --tm-bg: #d8dde5;
    --tm-shell: #f7f6f2;
    --tm-surface: #ffffff;
    --tm-surface-soft: #f2f4f7;
    --tm-line: #d4dae3;
    --tm-line-strong: #bcc5d2;
    --tm-text: #1f2937;
    --tm-text-soft: #5f6f82;
    --tm-accent: #2f516a;
    --tm-accent-strong: #234158;
    --tm-radius-xl: 28px;
    --tm-radius-lg: 18px;
    --tm-radius-md: 12px;
    --tm-shadow-xl: 0 28px 70px rgba(26, 41, 56, 0.18);
    --tm-shadow-lg: 0 14px 34px rgba(28, 44, 60, 0.12);
    --tm-shadow-md: 0 8px 18px rgba(30, 46, 64, 0.08);
    --tm-shadow-mobile: 0 5px 12px rgba(25, 39, 54, 0.08);
}

body {
    background:
        radial-gradient(1300px 700px at 8% 6%, rgba(120, 146, 176, 0.2), transparent 62%),
        radial-gradient(1150px 740px at 96% 88%, rgba(164, 178, 197, 0.24), transparent 66%),
        var(--tm-bg);
    color: var(--tm-text);
    font-family: "Manrope", "Segoe UI", sans-serif;
    text-rendering: optimizeLegibility;
    overflow-x: clip;
}

body::before {
    opacity: 0.12;
    animation: none;
}

.site-shell {
    width: min(1280px, calc(100% - 1.35rem));
    margin: 1rem auto 1.8rem;
    background: var(--tm-shell);
    border: 1px solid var(--tm-line);
    border-radius: var(--tm-radius-xl);
    box-shadow: var(--tm-shadow-xl);
    backface-visibility: hidden;
}

.site-shell::before {
    background:
        linear-gradient(165deg, rgba(255, 255, 255, 0.7), transparent 28%),
        radial-gradient(900px 360px at -15% -4%, rgba(152, 170, 194, 0.16), transparent 62%);
}

h1,
h2,
h3,
h4,
h5,
h6 {
    color: var(--tm-text);
    font-family: "Cormorant Garamond", Georgia, serif;
    font-weight: 600;
    letter-spacing: -0.02em;
}

p {
    color: var(--tm-text-soft);
}

a {
    color: var(--tm-text);
}

.muted-inline {
    display: block;
    padding: 0.65rem;
    color: #777;
}

.navbar {
    border-bottom: 1px solid var(--tm-line);
    padding: 0.72rem 0;
    background: color-mix(in srgb, var(--tm-shell) 92%, #ffffff 8%);
    backdrop-filter: blur(10px);
}

.nav-wrapper,
.nav-wrapper-home {
    grid-template-columns: minmax(0, 340px) 1fr auto;
    gap: 0.7rem;
}

.logo {
    min-width: 0;
    max-width: 100%;
}

.logo-name {
    font-family: "Cormorant Garamond", Georgia, serif;
    font-size: 1.4rem;
    letter-spacing: 0.01em;
}

.logo-tag {
    font-size: 0.62rem;
    letter-spacing: 0.14em;
}

.logo-image {
    width: clamp(190px, 24vw, 310px);
    max-height: 76px;
    object-fit: contain;
    object-position: left center;
    height: auto;
}

.nav-menu {
    justify-content: flex-start;
    gap: 0.2rem;
    overflow-x: auto;
    scrollbar-width: none;
}

.nav-menu::-webkit-scrollbar {
    display: none;
}

.nav-menu a,
.dropbtn {
    padding: 0.45rem 0.62rem;
    border-radius: 10px;
    font-size: 0.7rem;
    font-weight: 800;
    letter-spacing: 0.11em;
    text-transform: uppercase;
    white-space: nowrap;
    color: #1d2230;
}

.nav-menu a::after,
.dropbtn::after,
.nav-icon {
    display: none;
}

.nav-menu a:hover,
.dropbtn:hover {
    background: #e9edf4;
    color: var(--tm-text);
    transform: none;
}

.dropdown-content {
    border: 1px solid var(--tm-line);
    border-radius: 12px;
    background: var(--tm-surface);
    box-shadow: var(--tm-shadow-lg);
}

.nav-tools {
    gap: 0.4rem;
}

.language-switcher select,
.theme-toggle {
    border-radius: 10px;
    border-color: var(--tm-line-strong);
    background: #ffffff;
}

.search-bar {
    border-bottom: 1px solid var(--tm-line);
    padding: 0.62rem 0 0.86rem;
}

.search-form {
    max-width: 700px;
    margin: 0 auto;
}

.search-form input,
.search-form button {
    border-radius: 12px;
    height: 2.5rem;
}

.search-form input {
    border-color: var(--tm-line-strong);
    background: #ffffff;
}

.search-form button {
    background: linear-gradient(140deg, var(--tm-accent), var(--tm-accent-strong));
    font-size: 0.75rem;
    letter-spacing: 0.08em;
    text-transform: uppercase;
}

.site-main {
    padding: 1.2rem 0 2.2rem;
}

.breaking-news-banner {
    border: 1px solid var(--tm-line);
    border-radius: 16px;
    background: var(--tm-surface);
    box-shadow: var(--tm-shadow-md);
}

.breaking-label {
    letter-spacing: 0.13em;
    text-transform: uppercase;
    font-size: 0.66rem;
    font-weight: 800;
}

.hero-banner {
    position: relative;
    overflow: hidden;
    border: 1px solid var(--tm-line);
    border-radius: 24px;
    background:
        linear-gradient(132deg, rgba(255, 255, 255, 0.9), rgba(237, 240, 246, 0.9)),
        radial-gradient(500px 260px at 92% 18%, rgba(118, 129, 149, 0.18), transparent 72%),
        var(--tm-surface-soft);
    box-shadow: var(--tm-shadow-lg);
    display: grid;
    grid-template-columns: minmax(0, 1.35fr) minmax(230px, 0.95fr);
    gap: 1rem;
    padding: 1.1rem;
}

.hero-kicker {
    margin: 0 0 0.45rem;
    font-size: 0.68rem;
    letter-spacing: 0.14em;
    text-transform: uppercase;
    color: #525a6b;
}

.hero-content h2 {
    margin: 0 0 0.6rem;
    font-size: clamp(2rem, 6.2vw, 4.7rem);
    line-height: 0.9;
    letter-spacing: -0.03em;
}

.hero-lead {
    max-width: 640px;
    margin-bottom: 0.85rem;
    font-size: 1rem;
}

.hero-actions {
    display: flex;
    flex-wrap: wrap;
    gap: 0.5rem;
    margin-bottom: 0.75rem;
}

.hero-chips {
    display: flex;
    gap: 0.42rem;
    flex-wrap: wrap;
}

.hero-chip {
    background: #fff;
    border: 1px solid var(--tm-line);
    border-radius: 999px;
    padding: 0.32rem 0.66rem;
    font-size: 0.7rem;
    color: #444d61;
}

.hero-visual {
    display: grid;
    gap: 0.55rem;
    align-content: end;
}

.hero-visual-card {
    border: 1px solid var(--tm-line);
    border-radius: 14px;
    background: #ffffffcc;
    backdrop-filter: blur(5px);
    padding: 0.75rem;
}

.hero-visual-label {
    margin: 0 0 0.3rem;
    font-size: 0.66rem;
    letter-spacing: 0.12em;
    text-transform: uppercase;
    color: #555d6f;
}

.hero-visual-text {
    margin: 0;
    font-size: 0.87rem;
    color: #2c3240;
}

.main-content,
.sidebar,
.widget,
.article-card,
.search-result,
.archive-section,
.pdf-card,
.page-content,
.admin-section,
.login-container,
.contact-form,
.article-form,
.category-form,
.admin-form,
.archive-main,
.archive-sidebar,
.date-picker-box,
.newspaper-card,
.values-grid .value-item,
.about-section,
.todays-newspaper-section {
    border: 1px solid var(--tm-line);
    border-radius: 16px;
    background: var(--tm-surface);
    box-shadow: var(--tm-shadow-md);
}

.widget h3,
.section-title {
    letter-spacing: -0.01em;
}

.article-card {
    padding: 0.9rem;
}

.achievements-page {
    padding: 1.1rem;
}

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

.achievement-card-link {
    display: block;
    color: inherit;
    text-decoration: none;
}

.achievement-card-link:hover,
.achievement-card-link:focus-visible {
    text-decoration: none;
}

.achievement-card {
    border: 1px solid var(--tm-line);
    border-radius: 16px;
    background: #fff;
    overflow: hidden;
    box-shadow: var(--tm-shadow-md);
    height: 100%;
    transition: transform 0.2s ease, box-shadow 0.2s ease, border-color 0.2s ease;
}

.achievement-card-link:hover .achievement-card,
.achievement-card-link:focus-visible .achievement-card {
    transform: translateY(-2px);
    box-shadow: var(--tm-shadow-lg);
    border-color: var(--tm-line-strong);
}

.achievement-image img {
    width: 100%;
    height: 220px;
    object-fit: cover;
    border-radius: 0;
}

.achievement-content {
    padding: 0.9rem;
}

.achievement-content h2 {
    margin-bottom: 0.45rem;
}

.achievement-view-link {
    display: inline-flex;
    align-items: center;
    gap: 0.3rem;
    font-weight: 700;
    font-size: 0.85rem;
    letter-spacing: 0.02em;
    color: var(--tm-accent);
}

.achievement-detail-page {
    padding: 1.1rem;
}

.achievement-detail-header {
    display: grid;
    gap: 0.55rem;
    margin-bottom: 1rem;
}

.achievement-detail-kicker {
    margin: 0;
    font-size: 0.74rem;
    letter-spacing: 0.16em;
    text-transform: uppercase;
    color: var(--tm-text-soft);
}

.achievement-detail-meta {
    margin: 0;
    font-size: 0.86rem;
}

.achievement-detail-layout {
    display: grid;
    gap: 1rem;
    grid-template-columns: minmax(0, 1fr);
}

.achievement-detail-media {
    border: 1px solid var(--tm-line);
    border-radius: 16px;
    overflow: hidden;
    background: var(--tm-surface-soft);
}

.achievement-detail-image {
    display: block;
    width: 100%;
    max-height: min(74vh, 880px);
    object-fit: contain;
    background: var(--tm-surface-soft);
}

.achievement-detail-content {
    border: 1px solid var(--tm-line);
    border-radius: 16px;
    padding: 1rem;
    background: var(--tm-surface);
}

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

@media (min-width: 980px) {
    .achievement-detail-layout {
        grid-template-columns: minmax(0, 1.15fr) minmax(0, 0.85fr);
        align-items: start;
    }
}

.advertise-page {
    padding: 1.1rem;
}

.advertise-grid {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 0.9rem;
    margin-bottom: 0.9rem;
}

.advertise-list {
    margin: 0;
    padding-left: 1.1rem;
    display: grid;
    gap: 0.34rem;
}

.advertise-list li {
    color: var(--tm-text-soft);
    line-height: 1.5;
}

.table-wrap {
    width: 100%;
    overflow-x: auto;
}

.rate-table {
    margin-top: 0.6rem;
}

.rate-table td,
.rate-table th {
    white-space: nowrap;
}

.advertise-note {
    margin-top: 0.58rem;
    font-size: 0.85rem;
    color: #60758b;
}

.article-image img,
.archive-article-image img,
.article-featured-image img {
    border-radius: 12px;
}

.article-meta {
    font-size: 0.72rem;
    letter-spacing: 0.04em;
    text-transform: uppercase;
}

.btn,
.btn-primary,
.btn-secondary,
.btn-download,
.btn-view,
.btn-edit,
.btn-delete,
.btn-danger,
.btn-small {
    border-radius: 11px;
    box-shadow: none;
    font-size: 0.72rem;
    letter-spacing: 0.08em;
    text-transform: uppercase;
}

.btn,
.btn-primary,
.btn-download,
button.btn-primary {
    background: linear-gradient(140deg, var(--tm-accent), var(--tm-accent-strong));
    color: #fff;
}

.btn-secondary,
.btn-view,
.btn-edit,
.btn-small {
    background: #f5f7fb;
    color: var(--tm-text);
    border: 1px solid var(--tm-line-strong);
}

.btn-delete,
.btn-danger {
    border: 1px solid #e3cfac;
    background: #fff6e9;
    color: #6b5231;
}

.alert-error,
.status-inactive,
.status-draft,
.status-failed {
    border-color: #e3cfac;
    background: #fff6e9;
    color: #6b5231;
}

.footer {
    border-top: 1px solid var(--tm-line);
    background:
        linear-gradient(180deg, rgba(246, 247, 245, 0.96), rgba(236, 240, 245, 0.96)),
        var(--tm-shell);
}

.footer-section h3 {
    font-size: 1.15rem;
}

.admin-table th {
    background: var(--tm-accent-strong);
    color: #edf5ff;
}

.admin-table td {
    background: #fff;
}

@media (max-width: 1120px) {
    .nav-wrapper,
    .nav-wrapper-home {
        grid-template-columns: minmax(0, 1fr) auto auto;
    }

    .logo-image {
        width: clamp(150px, 40vw, 220px);
        max-height: 60px;
    }

    .hero-banner {
        grid-template-columns: 1fr;
    }

    .hero-visual {
        grid-template-columns: repeat(2, minmax(0, 1fr));
        align-content: initial;
    }
}

@media (max-width: 820px) {
    .site-shell {
        width: calc(100% - 0.85rem);
        border-radius: 18px;
    }

    .container {
        width: calc(100% - 0.9rem);
    }

    .hero-content h2 {
        font-size: clamp(1.82rem, 10.5vw, 3.12rem);
    }

    .achievements-grid {
        grid-template-columns: 1fr;
    }

    .advertise-grid {
        grid-template-columns: 1fr;
    }
}

@media (max-width: 560px) {
    .site-shell {
        width: calc(100% - 0.45rem);
        border-radius: 14px;
    }

    .nav-wrapper,
    .nav-wrapper-home {
        grid-template-columns: minmax(0, 1fr) auto auto;
        gap: 0.42rem;
    }

    .language-switcher {
        display: none;
    }

    .logo-image {
        width: clamp(118px, 52vw, 166px);
        max-height: 46px;
    }

    .hero-banner {
        padding: 0.8rem;
        border-radius: 16px;
    }

    .hero-visual {
        grid-template-columns: 1fr;
    }

    .hero-actions {
        flex-direction: column;
        align-items: stretch;
    }

    .hero-actions .btn-primary,
    .hero-actions .btn-secondary {
        width: 100%;
    }
}

/* Keep dark mode coherent instead of pure inversion. */
body.dark-mode {
    --tm-shell: #1f2732;
    --tm-surface: #25303e;
    --tm-surface-soft: #2b3746;
    --tm-line: #3c4a5d;
    --tm-line-strong: #506179;
    --tm-text: #ecf2fa;
    --tm-text-soft: #c1cfdf;
    --tm-accent: #b8cedf;
    --tm-accent-strong: #d4e3f2;
}

body.dark-mode .site-shell {
    border-color: #2e3648;
}

body.dark-mode .main-content,
body.dark-mode .sidebar,
body.dark-mode .widget,
body.dark-mode .article-card,
body.dark-mode .search-result,
body.dark-mode .archive-section,
body.dark-mode .pdf-card,
body.dark-mode .page-content,
body.dark-mode .admin-section,
body.dark-mode .login-container,
body.dark-mode .contact-form,
body.dark-mode .article-form,
body.dark-mode .category-form,
body.dark-mode .admin-form,
body.dark-mode .archive-main,
body.dark-mode .archive-sidebar,
body.dark-mode .date-picker-box,
body.dark-mode .newspaper-card,
body.dark-mode .values-grid .value-item,
body.dark-mode .about-section,
body.dark-mode .todays-newspaper-section,
body.dark-mode .hero-banner,
body.dark-mode .breaking-news-banner {
    border-color: #364154;
    box-shadow: none;
}

body.dark-mode .search-form input,
body.dark-mode .language-switcher select,
body.dark-mode .theme-toggle,
body.dark-mode .hero-chip,
body.dark-mode .btn-secondary,
body.dark-mode .btn-view,
body.dark-mode .btn-edit,
body.dark-mode .btn-small {
    background: #252c39;
    border-color: #424d63;
    color: #e8edf8;
}

.admin-fab {
    position: fixed;
    right: max(14px, env(safe-area-inset-right));
    bottom: max(14px, env(safe-area-inset-bottom));
    z-index: 999;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-width: 98px;
    height: 44px;
    padding: 0 14px;
    border-radius: 999px;
    border: 1px solid #20354a;
    background: linear-gradient(140deg, #325774, #243f56);
    color: #fff;
    font-size: 0.72rem;
    font-weight: 800;
    letter-spacing: 0.1em;
    text-transform: uppercase;
    text-decoration: none;
    box-shadow: 0 16px 32px rgba(5, 8, 14, 0.34);
}

.admin-fab:hover {
    text-decoration: none;
    transform: translateY(-1px);
}

body.dark-mode .admin-fab {
    border-color: #87a3bc;
    background: linear-gradient(140deg, #d2e0ee, #b7ccdf);
    color: #112235;
}

@media (max-width: 560px) {
    .admin-fab {
        min-width: 92px;
        height: 40px;
        font-size: 0.68rem;
    }
}

/* Pass 2/3/4: Franceca-inspired visual refinement */
:root {
    --scroll-progress: 0;
    --tm-panel: rgba(255, 255, 255, 0.8);
    --tm-panel-strong: rgba(255, 255, 255, 0.94);
}

.site-header {
    position: sticky;
    top: 0;
    z-index: 220;
    backdrop-filter: blur(14px);
}

.site-header::after {
    content: "";
    position: absolute;
    left: 0;
    right: 0;
    bottom: 0;
    height: 2px;
    background: linear-gradient(90deg, #577d9f, #2f516a);
    transform-origin: 0 50%;
    transform: scaleX(var(--scroll-progress));
}

.navbar {
    padding: 0.58rem 0 0.4rem;
    background: linear-gradient(180deg, var(--tm-panel-strong), var(--tm-panel));
    border-bottom: 0;
}

.search-bar {
    padding: 0.46rem 0 0.72rem;
    border-bottom: 1px solid var(--tm-line);
    background: linear-gradient(180deg, rgba(255, 255, 255, 0.28), rgba(255, 255, 255, 0));
}

.nav-wrapper,
.nav-wrapper-home {
    grid-template-columns: minmax(0, 360px) 1fr auto;
}

.nav-menu a,
.dropbtn {
    font-size: 0.68rem;
    font-weight: 800;
    letter-spacing: 0.14em;
    border: 1px solid transparent;
}

.nav-menu a.is-current,
.nav-menu a:hover,
.dropbtn:hover,
.dropdown.active > .dropbtn {
    border-color: var(--tm-line-strong);
    background: #eaf0f6;
}

.search-form {
    max-width: 780px;
}

.search-form input {
    background: #fbfdff;
}

.search-form button {
    padding-left: 1.15rem;
    padding-right: 1.15rem;
}

.hero-banner {
    grid-template-columns: minmax(0, 1.48fr) minmax(250px, 0.82fr);
    border-radius: 28px;
    padding: 1.3rem;
}

.hero-content h2 {
    font-family: "Manrope", "Segoe UI", sans-serif;
    font-weight: 800;
    letter-spacing: -0.045em;
    line-height: 0.92;
}

.hero-lead {
    max-width: 64ch;
    font-size: 1.03rem;
}

.hero-visual-card {
    border-radius: 18px;
    background: linear-gradient(165deg, rgba(255, 255, 255, 0.92), rgba(234, 240, 248, 0.84));
}

.hero-chip {
    background: linear-gradient(180deg, #ffffff, #f4f8fc);
}

.odia-heritage {
    margin: 0.15rem 0 0.95rem;
    display: grid;
    gap: 0.78rem;
    grid-template-columns: repeat(2, minmax(0, 1fr));
}

.heritage-card {
    border: 1px solid var(--tm-line);
    border-radius: 18px;
    background: linear-gradient(160deg, #ffffff, #f6f9fc);
    box-shadow: var(--tm-shadow-md);
    padding: 0.86rem;
    display: grid;
    grid-template-columns: 78px 1fr;
    gap: 0.85rem;
    align-items: center;
}

.heritage-icon {
    width: 78px;
    height: 78px;
    border-radius: 16px;
    position: relative;
    border: 1px solid #c3cfdd;
    background: #eaf1f8;
}

.heritage-wheel {
    border-radius: 999px;
    background:
        radial-gradient(circle at center, #f7fbff 0 14px, #416179 14px 19px, transparent 19px),
        repeating-conic-gradient(from 0deg, #42627d 0 8deg, #d6e1ec 8deg 16deg);
    border-color: #a7b9cc;
}

.heritage-jagannath-icon {
    background:
        radial-gradient(circle at 30% 50%, #ffffff 0 8px, #131313 8px 16px, transparent 16px),
        radial-gradient(circle at 70% 50%, #ffffff 0 8px, #131313 8px 16px, transparent 16px),
        linear-gradient(180deg, #f8e5bc, #f4d9a7);
    border-color: #ccb78d;
}

.heritage-jagannath-icon::after {
    content: "";
    position: absolute;
    left: 20%;
    right: 20%;
    bottom: 14px;
    height: 4px;
    border-radius: 999px;
    background: #b24633;
}

.heritage-content h3 {
    margin: 0.1rem 0 0.35rem;
    font-family: "Manrope", "Segoe UI", sans-serif;
    font-size: 1.05rem;
    letter-spacing: -0.02em;
    line-height: 1.2;
}

.heritage-content p {
    margin: 0;
    font-size: 0.86rem;
}

.heritage-kicker {
    margin: 0;
    font-size: 0.64rem;
    letter-spacing: 0.14em;
    text-transform: uppercase;
    color: #647b95;
    font-weight: 800;
}

.editorial-strip {
    margin: 0.1rem 0 0.95rem;
    display: grid;
    gap: 0.7rem;
    grid-template-columns: repeat(3, minmax(0, 1fr));
}

.editorial-pill {
    border: 1px solid var(--tm-line);
    border-radius: 16px;
    background: linear-gradient(150deg, #ffffff, #f4f7fb);
    padding: 0.72rem 0.8rem;
    box-shadow: var(--tm-shadow-md);
}

.editorial-label {
    margin: 0;
    font-size: 0.66rem;
    letter-spacing: 0.14em;
    text-transform: uppercase;
    color: #607286;
}

.editorial-value {
    margin: 0.2rem 0 0;
    font-size: 0.96rem;
    font-weight: 700;
    color: #24384d;
}

.home-gallery {
    margin-bottom: 1.05rem;
    display: grid;
    gap: 0.72rem;
    grid-template-columns: 1.34fr 1fr 1fr;
    grid-auto-rows: 165px;
}

.home-gallery-item {
    border-radius: 18px;
    overflow: hidden;
    border: 1px solid var(--tm-line);
    background: #dce5ef;
    position: relative;
    box-shadow: var(--tm-shadow-md);
}

.home-gallery-item:first-child {
    grid-row: span 2;
}

.home-gallery-item a {
    display: block;
    height: 100%;
    position: relative;
    color: #fff;
    text-decoration: none;
}

.home-gallery-image {
    width: 100%;
    height: 100%;
    object-fit: cover;
    display: block;
}

.home-gallery-overlay {
    position: absolute;
    left: 0;
    right: 0;
    bottom: 0;
    padding: 1rem 0.9rem 0.85rem;
    font-size: 0.86rem;
    line-height: 1.3;
    font-weight: 700;
    letter-spacing: 0.01em;
    background: linear-gradient(180deg, rgba(12, 22, 33, 0), rgba(12, 22, 33, 0.82));
}

.newsletter-alert {
    margin-top: 0.95rem;
}

.pdf-unavailable {
    border: 1px solid #d9caad;
    border-radius: 10px;
    background: #fff8ee;
    padding: 0.9rem 0.95rem;
}

.pdf-unavailable p {
    margin: 0;
}

.no-today-edition {
    border: 1px dashed var(--tm-line-strong);
    border-radius: 12px;
    background: rgba(255, 255, 255, 0.55);
}

.home-paper-flipper {
    margin-top: 0.22rem;
    perspective: 1800px;
    position: relative;
    outline: none;
}

.home-paper-flipper:focus-visible {
    box-shadow: 0 0 0 3px rgba(73, 108, 140, 0.34);
    border-radius: 14px;
}

.paper-flip-inner {
    position: relative;
    min-height: min(calc(var(--app-vh) * 72), 760px);
    transform-style: preserve-3d;
    transition: transform 0.78s cubic-bezier(0.2, 0.8, 0.2, 1);
}

.home-paper-flipper.is-flipped .paper-flip-inner {
    transform: rotateY(180deg);
}

.paper-face {
    position: absolute;
    inset: 0;
    display: flex;
    flex-direction: column;
    border: 1px solid var(--tm-line);
    border-radius: 14px;
    overflow: hidden;
    backface-visibility: hidden;
}

.paper-face-front {
    padding: clamp(0.95rem, 2.3vw, 1.45rem);
    background:
        radial-gradient(560px 220px at 100% 0, rgba(125, 153, 178, 0.16), transparent 68%),
        linear-gradient(156deg, rgba(255, 255, 255, 0.96), rgba(236, 243, 249, 0.88)),
        #fff;
    cursor: pointer;
}

.paper-face-front::after {
    content: "";
    position: absolute;
    right: -40px;
    bottom: -60px;
    width: 220px;
    height: 220px;
    border-radius: 999px;
    background: radial-gradient(circle, rgba(102, 132, 157, 0.25) 0%, rgba(102, 132, 157, 0) 68%);
    pointer-events: none;
}

.paper-kicker {
    margin: 0 0 0.2rem;
    font-size: 0.72rem;
    font-weight: 800;
    letter-spacing: 0.14em;
    text-transform: uppercase;
    color: #496583;
}

.paper-title {
    margin: 0 0 0.3rem;
    font-family: "Cormorant Garamond", Georgia, serif;
    font-size: clamp(2rem, 4.4vw, 3rem);
    line-height: 0.9;
    color: #1f3348;
}

.paper-subtitle {
    margin: 0;
    font-size: 0.9rem;
    font-weight: 700;
    letter-spacing: 0.02em;
    color: #5b7188;
}

.paper-description {
    margin: 0.84rem 0 1.05rem;
    max-width: 60ch;
    font-size: 0.92rem;
    line-height: 1.55;
    color: #40566f;
}

.paper-open-button {
    margin-top: auto;
    min-height: 46px;
    align-self: flex-start;
}

.paper-face-back {
    transform: rotateY(180deg);
    padding: 0.58rem;
    background: #f8fbfe;
}

.paper-preview-head {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 0.5rem;
    margin-bottom: 0.42rem;
}

.paper-preview-head p {
    margin: 0;
    font-size: 0.74rem;
    font-weight: 800;
    letter-spacing: 0.1em;
    text-transform: uppercase;
    color: #4e6681;
}

.paper-preview-actions {
    display: inline-flex;
    align-items: center;
    gap: 0.3rem;
}

.paper-mini-btn {
    border: 1px solid var(--tm-line-strong);
    border-radius: 999px;
    background: #eef4fa;
    color: #2f4d67;
    font-size: 0.7rem;
    font-weight: 700;
    letter-spacing: 0.04em;
    padding: 0.42rem 0.62rem;
    cursor: pointer;
    text-decoration: none;
}

.paper-preview-shell {
    position: relative;
    border: 1px solid var(--tm-line);
    border-radius: 10px;
    background: #eef5fc;
    min-height: min(calc(var(--app-vh) * 64), 640px);
    overflow: hidden;
    contain: layout paint;
}

.paper-preview-loading {
    position: absolute;
    inset: 0;
    z-index: 2;
    display: none;
    align-items: center;
    justify-content: center;
    text-align: center;
    padding: 0.95rem;
    font-size: 0.84rem;
    font-weight: 700;
    color: #315372;
    background: linear-gradient(180deg, rgba(237, 245, 252, 0.95), rgba(245, 250, 255, 0.95));
}

.paper-preview-loading.is-visible {
    display: flex;
}

.paper-preview-frame {
    width: 100%;
    height: min(calc(var(--app-vh) * 64), 640px);
    display: block;
    border: 0;
    background: #f2f7fc;
}

.paper-preview-hint {
    margin: 0.5rem 0 0;
    font-size: 0.79rem;
    color: #5c738b;
}

@media (prefers-reduced-motion: reduce) {
    .paper-flip-inner {
        transition: none;
    }
}

.viewer-page {
    max-width: 1200px;
    margin: 0 auto;
}

.viewer-page.viewer-page-epaper {
    max-width: min(1680px, 100%);
}

.epaper-main-layout {
    display: grid;
    grid-template-columns: minmax(128px, 16vw) minmax(0, 1fr);
    gap: 0.92rem;
    align-items: start;
}

.epaper-main-layout.no-ad {
    grid-template-columns: minmax(0, 1fr);
}

.epaper-ad-slot {
    position: sticky;
    top: 0.85rem;
    min-height: min(calc(var(--app-vh, 1vh) * 82), 980px);
    display: flex;
    align-items: flex-start;
    justify-content: center;
    padding: 0.4rem;
    border: 1px dashed #b5c6d8;
    border-radius: 14px;
    background:
        linear-gradient(180deg, rgba(244, 249, 254, 0.95), rgba(236, 244, 252, 0.95)),
        repeating-linear-gradient(
            135deg,
            rgba(110, 139, 169, 0.08) 0 12px,
            rgba(110, 139, 169, 0) 12px 24px
        );
    overflow: hidden;
}

.epaper-main-column {
    min-width: 0;
}

.epaper-ad-slot.is-filled {
    min-height: 0;
    border-style: solid;
    background: linear-gradient(180deg, rgba(247, 251, 255, 0.98), rgba(238, 246, 253, 0.98));
}

.epaper-ad-media {
    width: 100%;
    display: block;
}

.epaper-ad-media a {
    display: block;
    width: 100%;
}

.epaper-ad-media img {
    display: block;
    width: 100%;
    height: auto;
    max-width: 100%;
    max-height: min(calc(var(--app-vh, 1vh) * 80), 960px);
    object-fit: contain;
    margin: 0 auto;
    border-radius: 12px;
    border: 1px solid #c6d7e7;
    background: #fff;
}

.pdf-viewer-toolbar {
    display: flex;
    gap: 0.68rem;
    flex-wrap: wrap;
    margin-bottom: 0.82rem;
}

.pdf-viewer-wrapper {
    border: 1px solid var(--tm-line);
    border-radius: 14px;
    background: #fff;
    padding: 0.52rem;
}

.pdf-frame-shell {
    display: grid;
    gap: 0.52rem;
    position: relative;
}

.pdf-load-button {
    min-height: 44px;
    justify-self: start;
}

.pdf-frame-loading {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    text-align: center;
    min-height: 46px;
    padding: 0.5rem 0.7rem;
    border: 1px dashed var(--tm-line-strong);
    border-radius: 10px;
    background: linear-gradient(120deg, #f6f9fc, #edf3f9);
    color: #4d657d;
    font-size: 0.78rem;
}

.pdf-frame-loading[hidden] {
    display: none;
}

.newspaper-pdf-frame {
    width: 100%;
    display: block;
    border: 0;
    border-radius: 10px;
    background: #f4f8fc;
    transform: translateZ(0);
    opacity: 1;
    transition: opacity 0.22s ease;
}

.pdf-frame-shell.pdf-loading .newspaper-pdf-frame {
    opacity: 0.64;
}

.newspaper-pdf-frame-compact {
    height: min(calc(var(--app-vh) * 72), 760px);
    min-height: 360px;
}

.newspaper-pdf-frame-full {
    height: min(calc(var(--app-vh) * 82), 980px);
    min-height: 460px;
}

.pdf-mobile-hint {
    margin: 0.62rem 0 0;
    font-size: 0.8rem;
    color: #60758b;
}

.newspaper-share {
    margin-top: 0.8rem;
    padding-top: 0.7rem;
    border-top: 1px dashed var(--tm-line-strong);
}

.newspaper-share-label {
    margin: 0 0 0.5rem;
    font-size: 0.7rem;
    letter-spacing: 0.1em;
    text-transform: uppercase;
    color: #60758b;
    font-weight: 800;
}

.newspaper-share-buttons {
    margin-top: 0;
    padding-top: 0;
    border-top: 0;
    display: flex;
    flex-wrap: wrap;
    gap: 0.45rem;
}

.newspaper-share-buttons .share-btn {
    padding: 0.5rem 0.75rem;
    font-size: 0.7rem;
    letter-spacing: 0.06em;
    border-color: var(--tm-line-strong);
    background: #f4f8fc;
    color: var(--tm-text);
}

.newspaper-share-buttons .share-btn.copy {
    background: #ecf4fb;
    color: #27445f;
}

/* Utility helpers for template consistency (replacing inline styles). */
.inline-form {
    display: inline;
}

.u-mt-12 {
    margin-top: 12px;
}

.u-mt-16 {
    margin-top: 1rem;
}

.u-mt-18 {
    margin-top: 18px;
}

.u-mt-20 {
    margin-top: 20px;
}

.u-inline-block {
    display: inline-block;
}

.checkbox-label {
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
    font-weight: 600;
    color: var(--tm-text);
}

.checkbox-label input[type="checkbox"] {
    width: 1rem;
    height: 1rem;
}

.u-width-90 {
    width: 90px;
}

.table-empty-message {
    text-align: center;
    padding: 18px;
    color: var(--tm-text-soft);
}

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

.admin-actions-shell > h2 {
    margin-bottom: 0.2rem;
}

.admin-actions-shell > .text-muted {
    margin-top: 0;
    margin-bottom: 0.85rem;
}

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

.admin-action-card {
    border: 1px solid var(--tm-line);
    border-radius: 14px;
    background: linear-gradient(165deg, #ffffff, #f5f8fc);
    padding: 0.8rem;
    box-shadow: var(--tm-shadow-md);
}

.admin-action-card h3 {
    margin: 0 0 0.22rem;
    font-family: "Manrope", "Segoe UI", sans-serif;
    font-size: 0.96rem;
    letter-spacing: -0.01em;
}

.admin-action-card p {
    margin: 0 0 0.6rem;
    font-size: 0.8rem;
    color: var(--tm-text-soft);
    line-height: 1.45;
}

.admin-action-links {
    display: grid;
    gap: 0.42rem;
}

.admin-action-links .btn-primary,
.admin-action-links .btn-secondary {
    width: 100%;
    justify-content: center;
    text-align: center;
}

.admin-actions-footer {
    margin-top: 0.75rem;
    padding-top: 0.75rem;
    border-top: 1px dashed var(--tm-line-strong);
}

.admin-dashboard-header {
    display: flex;
    justify-content: space-between;
    align-items: flex-start;
    gap: 0.8rem;
    flex-wrap: wrap;
}

.admin-dashboard-top-actions {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    flex-wrap: wrap;
}

.admin-dashboard-top-actions .inline-form {
    display: inline-flex;
}

.admin-maintenance-section h2 {
    margin-bottom: 0.35rem;
}

.maintenance-help {
    margin: 0 0 0.72rem;
    color: var(--tm-text-soft);
}

.admin-maintenance-form {
    margin-top: 0;
}

.maintenance-toggle-shell {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 0.75rem;
    flex-wrap: wrap;
}

.switch-toggle {
    display: inline-flex;
    align-items: center;
    gap: 0.75rem;
    border: 1px solid var(--tm-line);
    border-radius: 14px;
    background: linear-gradient(160deg, #ffffff, #f4f8fc);
    padding: 0.62rem 0.72rem;
    cursor: pointer;
    user-select: none;
    flex: 1 1 360px;
    min-width: 260px;
}

.switch-toggle input[type="checkbox"] {
    position: absolute;
    width: 1px;
    height: 1px;
    margin: -1px;
    border: 0;
    padding: 0;
    clip: rect(0, 0, 0, 0);
    overflow: hidden;
}

.switch-track {
    width: 66px;
    height: 36px;
    border-radius: 999px;
    border: 1px solid #b8c6d7;
    background: linear-gradient(180deg, #d7e2ef, #c8d5e3);
    position: relative;
    transition: background 0.25s ease, border-color 0.25s ease;
    flex: 0 0 auto;
}

.switch-thumb {
    width: 28px;
    height: 28px;
    border-radius: 50%;
    background: #ffffff;
    border: 1px solid #aebdd0;
    position: absolute;
    top: 3px;
    left: 3px;
    box-shadow: 0 4px 12px rgba(23, 41, 61, 0.2);
    transition: transform 0.25s ease, border-color 0.25s ease;
}

.switch-copy {
    display: grid;
    gap: 0.15rem;
    min-width: 0;
}

.switch-title {
    font-weight: 800;
    color: var(--tm-text);
}

.switch-subtitle {
    font-size: 0.82rem;
    line-height: 1.4;
    color: var(--tm-text-soft);
}

.switch-toggle input[type="checkbox"]:checked + .switch-track {
    border-color: #2f6a55;
    background: linear-gradient(180deg, #4f9f7f, #3c886b);
}

.switch-toggle input[type="checkbox"]:checked + .switch-track .switch-thumb {
    transform: translateX(29px);
    border-color: #2f6a55;
}

.switch-toggle input[type="checkbox"]:focus-visible + .switch-track {
    outline: 3px solid rgba(50, 90, 128, 0.35);
    outline-offset: 2px;
}

body.dark-mode .switch-toggle {
    border-color: #4a5d74;
    background: linear-gradient(160deg, #2a3748, #253243);
}

body.dark-mode .switch-title {
    color: #e8f1fa;
}

body.dark-mode .switch-subtitle {
    color: #c1d0df;
}

body.dark-mode .switch-track {
    border-color: #617a94;
    background: linear-gradient(180deg, #43596f, #35495f);
}

body.dark-mode .switch-thumb {
    border-color: #5f738a;
    background: #e8f1fa;
}

body.dark-mode .switch-toggle input[type="checkbox"]:checked + .switch-track {
    border-color: #4f8f75;
    background: linear-gradient(180deg, #3f7f67, #336851);
}

.maintenance-current {
    margin: 0.72rem 0 0;
}

.admin-stats-grid .stat-number {
    letter-spacing: -0.02em;
}

.admin-action-grid-organized {
    grid-template-columns: repeat(2, minmax(0, 1fr));
}

.admin-ops-overview {
    display: grid;
    grid-template-columns: repeat(4, minmax(0, 1fr));
    gap: 0.62rem;
    margin-bottom: 0.72rem;
}

.admin-ops-card {
    border: 1px solid var(--tm-line);
    border-radius: 14px;
    background: linear-gradient(155deg, #ffffff, #f4f8fc);
    padding: 0.62rem 0.7rem;
    box-shadow: var(--tm-shadow-md);
}

.admin-ops-label {
    margin: 0 0 0.15rem;
    font-size: 0.74rem;
    text-transform: uppercase;
    letter-spacing: 0.07em;
    color: var(--tm-text-soft);
}

.admin-ops-value {
    margin: 0;
    font-weight: 800;
    color: var(--tm-text);
}

.admin-quick-actions-grid {
    display: grid;
    grid-template-columns: repeat(4, minmax(0, 1fr));
    gap: 0.6rem;
    margin-bottom: 0.74rem;
}

.admin-quick-action {
    display: grid;
    gap: 0.22rem;
    border: 1px solid var(--tm-line);
    border-radius: 14px;
    background: linear-gradient(158deg, #ffffff, #f5f9fd);
    padding: 0.68rem 0.72rem;
    text-decoration: none;
    color: var(--tm-text);
    transition: border-color 0.2s ease, transform 0.2s ease, box-shadow 0.2s ease;
}

.admin-quick-action strong {
    font-size: 0.9rem;
    line-height: 1.25;
}

.admin-quick-action span {
    font-size: 0.78rem;
    line-height: 1.42;
    color: var(--tm-text-soft);
}

.admin-quick-action:hover {
    text-decoration: none;
    border-color: var(--tm-line-strong);
    transform: translateY(-1px);
    box-shadow: var(--tm-shadow-lg);
}

.admin-workflow-stack {
    display: grid;
    gap: 0.55rem;
}

.admin-workflow {
    border: 1px solid var(--tm-line);
    border-radius: 14px;
    background: linear-gradient(164deg, #ffffff, #f4f8fc);
    box-shadow: var(--tm-shadow-md);
    overflow: hidden;
}

.admin-workflow summary {
    list-style: none;
    cursor: pointer;
    display: grid;
    gap: 0.1rem;
    padding: 0.68rem 0.76rem;
    position: relative;
    border-bottom: 1px solid transparent;
}

.admin-workflow summary::-webkit-details-marker {
    display: none;
}

.admin-workflow summary span {
    font-weight: 800;
    color: var(--tm-text);
}

.admin-workflow summary small {
    color: var(--tm-text-soft);
    font-size: 0.78rem;
    line-height: 1.4;
}

.admin-workflow summary::after {
    content: '+';
    position: absolute;
    right: 0.76rem;
    top: 0.62rem;
    font-size: 1rem;
    font-weight: 800;
    color: var(--tm-text-soft);
}

.admin-workflow[open] summary::after {
    content: '-';
}

.admin-workflow[open] summary {
    border-bottom-color: var(--tm-line);
}

.admin-workflow-links {
    padding: 0.62rem;
    display: grid;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 0.42rem;
}

.admin-workflow-links .btn-primary,
.admin-workflow-links .btn-secondary {
    width: 100%;
    justify-content: center;
    text-align: center;
}

.admin-section-head {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 0.7rem;
    flex-wrap: wrap;
    margin-bottom: 0.65rem;
}

.admin-section-head h2 {
    margin: 0;
}

.site-control-group {
    margin-top: 1rem;
    padding: 0.82rem;
    border: 1px solid var(--tm-line);
    border-radius: 16px;
    background: linear-gradient(155deg, #ffffff, #f4f8fc);
}

.site-control-group h3 {
    margin: 0 0 0.35rem;
}

.site-control-group p {
    margin: 0 0 0.68rem;
}

.site-control-toggles {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 0.72rem;
}

body.dark-mode .site-control-group {
    border-color: #475a70;
    background: linear-gradient(155deg, #253243, #22303f);
}

body.dark-mode .admin-ops-card,
body.dark-mode .admin-quick-action,
body.dark-mode .admin-workflow {
    border-color: #475a70;
    background: linear-gradient(160deg, #283647, #243243);
}

body.dark-mode .admin-ops-label,
body.dark-mode .admin-quick-action span,
body.dark-mode .admin-workflow summary small,
body.dark-mode .admin-workflow summary::after {
    color: #b7c8da;
}

body.dark-mode .admin-ops-value,
body.dark-mode .admin-quick-action strong,
body.dark-mode .admin-workflow summary span {
    color: #e8f1fa;
}

body.dark-mode .admin-workflow[open] summary {
    border-bottom-color: #455a71;
}

@media (max-width: 900px) {
    .admin-action-grid {
        grid-template-columns: 1fr;
    }

    .admin-action-card {
        padding: 0.72rem;
    }

    .admin-dashboard-top-actions {
        width: 100%;
        justify-content: flex-start;
    }

    .admin-dashboard-top-actions .btn-secondary,
    .admin-dashboard-top-actions .inline-form,
    .admin-dashboard-top-actions .inline-form .btn-secondary {
        width: 100%;
    }

    .maintenance-toggle-shell {
        align-items: stretch;
        flex-direction: column;
    }

    .maintenance-toggle-shell .btn-primary {
        width: 100%;
    }

    .admin-section-head {
        align-items: stretch;
        flex-direction: column;
    }

    .admin-section-head .btn-secondary {
        width: 100%;
    }

    .site-control-toggles {
        grid-template-columns: 1fr;
    }

    .admin-ops-overview {
        grid-template-columns: repeat(2, minmax(0, 1fr));
    }

    .admin-quick-actions-grid {
        grid-template-columns: repeat(2, minmax(0, 1fr));
    }

    .admin-workflow-links {
        grid-template-columns: repeat(2, minmax(0, 1fr));
    }
}

@media (max-width: 560px) {
    .admin-ops-overview {
        grid-template-columns: 1fr;
    }

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

    .admin-workflow summary {
        padding-right: 2rem;
    }

    .admin-workflow-links {
        grid-template-columns: 1fr;
        padding: 0.55rem;
    }
}

.text-italic {
    font-style: italic;
}

.page-indicator {
    display: inline-block;
    padding: 8px 12px;
}

.message-preview {
    white-space: pre-wrap;
    margin-top: 8px;
}

.home-signature {
    margin: 1rem 0 0.2rem;
    text-align: center;
    font-size: 0.86rem;
    font-weight: 800;
    letter-spacing: 0.16em;
    text-transform: uppercase;
    color: var(--tm-text-soft);
}

body.dark-mode .home-signature {
    color: #c4d3e2;
}

.achievement-preview-shell {
    max-width: 320px;
}

.achievement-preview-image {
    width: 100%;
    height: auto;
    border-radius: 8px;
    border: 1px solid var(--tm-line-strong);
    display: block;
}

.achievement-remove-toggle {
    margin-top: 8px;
    display: inline-flex;
    gap: 8px;
    align-items: center;
}

.achievement-table-thumb {
    width: 72px;
    height: 48px;
    object-fit: cover;
    border-radius: 6px;
    border: 1px solid var(--tm-line-strong);
}

.themed-divider {
    margin: 1.15rem 0;
    border: 0;
    border-top: 1px solid var(--tm-line);
}

.newspaper-share-compact {
    margin-top: 0.56rem;
}

.newspaper-share-compact .share-btn {
    padding: 0.42rem 0.64rem;
    font-size: 0.66rem;
}

.pdf-load-button[hidden] {
    display: none !important;
}

.content-wrapper.home-layout {
    gap: 1rem;
    grid-template-columns: minmax(0, 1.7fr) minmax(260px, 0.8fr);
}

.home-feed .articles-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 0.92rem;
}

.home-feed .article-card {
    border-radius: 18px;
}

.home-feed .article-content h3 {
    font-family: "Manrope", "Segoe UI", sans-serif;
    font-size: 1.05rem;
    line-height: 1.22;
    letter-spacing: -0.02em;
}

.home-sidebar .widget {
    border-radius: 18px;
    background: linear-gradient(180deg, #ffffff, #f8fafd);
}

.widget-list li {
    border-bottom: 1px dashed var(--tm-line);
    padding: 0.52rem 0;
}

.widget-list li:last-child {
    border-bottom: 0;
}

.newsletter-note {
    margin-bottom: 0.68rem;
    font-size: 0.86rem;
    color: #607182;
}

.social-note {
    margin-top: 0.72rem;
    margin-bottom: 0;
    text-align: center;
    font-size: 0.8rem;
    color: #6c7f93;
}

.social-links a {
    background: #f6f9fd;
    border-color: #d0d9e6;
}

.social-links a:hover {
    background: #eaf1f8;
}

.live-widgets-section {
    margin-top: 1rem;
    border: 1px solid var(--tm-line);
    border-radius: 18px;
    background:
        radial-gradient(600px 220px at 92% 6%, rgba(126, 147, 173, 0.18), transparent 68%),
        linear-gradient(165deg, #ffffff, #f4f8fc);
    padding: 0.92rem;
    box-shadow: var(--tm-shadow-md);
}

.live-widgets-head {
    display: flex;
    justify-content: space-between;
    align-items: baseline;
    gap: 0.56rem;
    flex-wrap: wrap;
    margin-bottom: 0.72rem;
}

.live-widgets-head h2 {
    margin: 0;
    font-family: "Manrope", "Segoe UI", sans-serif;
    font-size: 1.2rem;
    letter-spacing: -0.02em;
}

.live-widgets-meta {
    margin: 0;
    display: inline-flex;
    align-items: center;
    gap: 0.38rem;
    font-size: 0.72rem;
    color: #60758b;
}

.live-status {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-width: 64px;
    padding: 0.16rem 0.42rem;
    border-radius: 999px;
    border: 1px solid #c2cfdd;
    background: #ebf2f9;
    font-weight: 800;
    letter-spacing: 0.08em;
    text-transform: uppercase;
    font-size: 0.62rem;
    color: #2e4b65;
}

.live-status-ok {
    border-color: #88c3ab;
    background: #e9f9f2;
    color: #0f6f4a;
}

.live-status-warn {
    border-color: #d8c593;
    background: #fff8e6;
    color: #7b5d20;
}

.live-status-error {
    border-color: #d3a4a7;
    background: #fff1f2;
    color: #9f2742;
}

.live-status-loading {
    border-color: #b3c8dd;
    background: #edf4fb;
    color: #245078;
}

.live-widgets-grid {
    display: grid;
    gap: 0.72rem;
    grid-template-columns: repeat(3, minmax(0, 1fr));
}

.live-widget-card {
    border: 1px solid var(--tm-line);
    border-radius: 14px;
    background: rgba(255, 255, 255, 0.85);
    padding: 0.72rem;
    min-height: 160px;
}

.live-widget-card h3 {
    margin: 0 0 0.54rem;
    font-family: "Manrope", "Segoe UI", sans-serif;
    font-size: 0.9rem;
    letter-spacing: 0.08em;
    text-transform: uppercase;
}

.live-widget-content {
    display: grid;
    gap: 0.4rem;
}

.live-widget-loading,
.live-widget-empty,
.live-widget-error {
    margin: 0;
    font-size: 0.82rem;
    color: #60758b;
}

.live-weather-main {
    display: grid;
    gap: 0.24rem;
}

.live-weather-location {
    margin: 0;
    font-size: 0.9rem;
    font-weight: 700;
    color: #23384d;
}

.live-weather-condition {
    margin: 0;
    font-size: 0.8rem;
    color: #5f7388;
}

.live-weather-temp {
    margin: 0;
    font-size: 1.35rem;
    font-weight: 800;
    letter-spacing: -0.02em;
    color: #162d41;
}

.live-weather-meta {
    display: flex;
    flex-wrap: wrap;
    gap: 0.4rem;
    font-size: 0.72rem;
    color: #576d83;
}

.live-quote-list {
    list-style: none;
    margin: 0;
    padding: 0;
    display: grid;
    gap: 0.4rem;
}

.live-quote-item {
    display: flex;
    justify-content: space-between;
    align-items: center;
    gap: 0.5rem;
    border-bottom: 1px dashed var(--tm-line);
    padding-bottom: 0.34rem;
}

.live-quote-item:last-child {
    border-bottom: 0;
    padding-bottom: 0;
}

.live-quote-main {
    min-width: 0;
    display: grid;
    gap: 0.12rem;
}

.live-quote-symbol {
    font-size: 0.72rem;
    font-weight: 800;
    letter-spacing: 0.04em;
    color: #20364b;
}

.live-quote-name {
    font-size: 0.72rem;
    color: #60758b;
}

.live-quote-side {
    display: grid;
    justify-items: end;
    gap: 0.08rem;
}

.live-quote-price {
    font-size: 0.78rem;
    font-weight: 700;
    color: #243a50;
}

.live-quote-change {
    font-size: 0.68rem;
    font-weight: 700;
    letter-spacing: 0.03em;
}

.live-quote-change.is-up {
    color: #12774f;
}

.live-quote-change.is-down {
    color: #b23852;
}

.live-quote-change.is-flat {
    color: #60758b;
}

body.dark-mode .site-header::after {
    background: linear-gradient(90deg, #9dc0dc, #cfe1f3);
}

body.dark-mode .home-gallery-item,
body.dark-mode .editorial-pill,
body.dark-mode .home-sidebar .widget,
body.dark-mode .heritage-card {
    border-color: #4a5d74;
    background: linear-gradient(180deg, #2a3748, #263243);
}

body.dark-mode .nav-menu a.is-current,
body.dark-mode .nav-menu a:hover,
body.dark-mode .dropbtn:hover,
body.dark-mode .dropdown.active > .dropbtn {
    border-color: #58708a;
    background: #324355;
}

body.dark-mode .editorial-label,
body.dark-mode .newsletter-note,
body.dark-mode .social-note,
body.dark-mode .heritage-kicker {
    color: #c5d6e7;
}

body.dark-mode .editorial-value {
    color: #e8f1fa;
}

body.dark-mode .heritage-icon {
    border-color: #65809d;
}

body.dark-mode .pdf-viewer-wrapper {
    background: #233042;
    border-color: #4a6078;
}

body.dark-mode .epaper-ad-slot {
    border-color: #4f6882;
    background:
        linear-gradient(180deg, rgba(38, 53, 70, 0.94), rgba(34, 48, 64, 0.94)),
        repeating-linear-gradient(
            135deg,
            rgba(132, 165, 197, 0.16) 0 12px,
            rgba(132, 165, 197, 0) 12px 24px
        );
}

body.dark-mode .epaper-ad-slot.is-filled {
    background: linear-gradient(180deg, rgba(39, 55, 73, 0.96), rgba(35, 50, 67, 0.96));
}

body.dark-mode .epaper-ad-media img {
    border-color: #5d7895;
    background: #28384b;
}

body.dark-mode .pdf-frame-loading {
    border-color: #4a6078;
    background: linear-gradient(140deg, #29384a, #223142);
    color: #c5d7e9;
}

body.dark-mode .newspaper-pdf-frame {
    background: #2b384b;
}

body.dark-mode .newspaper-share {
    border-top-color: #4a6078;
}

body.dark-mode .newspaper-share-label {
    color: #b7c9dc;
}

body.dark-mode .newspaper-share-buttons .share-btn {
    border-color: #4f6882;
    background: #2b3a4d;
    color: #e8f1fa;
}

body.dark-mode .newspaper-share-buttons .share-btn.copy {
    background: #2f435a;
}

body.dark-mode .no-today-edition {
    border-color: #4a6078;
    background: rgba(39, 53, 70, 0.55);
}

body.dark-mode .paper-face-front {
    background:
        radial-gradient(560px 220px at 100% 0, rgba(129, 160, 188, 0.2), transparent 68%),
        linear-gradient(156deg, rgba(42, 57, 74, 0.96), rgba(35, 48, 66, 0.9)),
        #233042;
}

body.dark-mode .home-paper-flipper:focus-visible {
    box-shadow: 0 0 0 3px rgba(152, 189, 220, 0.4);
}

body.dark-mode .paper-kicker {
    color: #b8d0e6;
}

body.dark-mode .paper-title {
    color: #e8f3fd;
}

body.dark-mode .paper-subtitle,
body.dark-mode .paper-description,
body.dark-mode .paper-preview-hint {
    color: #c2d6e9;
}

body.dark-mode .paper-face-back {
    background: #233042;
}

body.dark-mode .paper-preview-head p {
    color: #b8d0e6;
}

body.dark-mode .paper-mini-btn {
    border-color: #4f6882;
    background: #2b3a4d;
    color: #e8f1fa;
}

body.dark-mode .paper-preview-shell {
    border-color: #4f6882;
    background: #2a394d;
}

body.dark-mode .paper-preview-frame {
    background: #2a394d;
}

body.dark-mode .paper-preview-loading {
    color: #d0e2f2;
    background: linear-gradient(180deg, rgba(40, 57, 75, 0.96), rgba(35, 50, 68, 0.96));
}

body.dark-mode .live-widgets-section {
    border-color: #4a5d74;
    background:
        radial-gradient(620px 220px at 92% 6%, rgba(118, 154, 188, 0.2), transparent 68%),
        linear-gradient(160deg, #2a3748, #253243);
}

body.dark-mode .live-widget-card {
    border-color: #4a5d74;
    background: rgba(39, 53, 70, 0.86);
}

body.dark-mode .live-status {
    border-color: #617a94;
    background: #33465c;
    color: #d7e5f3;
}

body.dark-mode .live-status-ok {
    border-color: #4f8f75;
    background: #244238;
    color: #b7f0d8;
}

body.dark-mode .live-status-warn {
    border-color: #886f3c;
    background: #4a3f23;
    color: #f0d799;
}

body.dark-mode .live-status-error {
    border-color: #8a5162;
    background: #4d2a36;
    color: #f0c3d1;
}

body.dark-mode .live-status-loading {
    border-color: #5d7a99;
    background: #2a4057;
    color: #cde3f8;
}

body.dark-mode .live-widgets-meta,
body.dark-mode .live-widget-loading,
body.dark-mode .live-widget-empty,
body.dark-mode .live-widget-error,
body.dark-mode .live-weather-condition,
body.dark-mode .live-weather-meta,
body.dark-mode .live-quote-name,
body.dark-mode .live-quote-change.is-flat {
    color: #c1d0df;
}

body.dark-mode .live-weather-location,
body.dark-mode .live-weather-temp,
body.dark-mode .live-quote-symbol,
body.dark-mode .live-quote-price {
    color: #e8f1fa;
}

@media (max-width: 1120px) {
    .site-header {
        position: relative;
    }

    .home-gallery {
        grid-template-columns: repeat(2, minmax(0, 1fr));
        grid-auto-rows: 170px;
    }

    .home-gallery-item:first-child {
        grid-column: 1 / -1;
        grid-row: span 1;
    }

    .content-wrapper.home-layout {
        grid-template-columns: 1fr;
    }

    .home-feed .articles-grid {
        grid-template-columns: repeat(2, minmax(0, 1fr));
    }

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

    .live-widget-card:last-child {
        grid-column: 1 / -1;
    }

    .viewer-page.viewer-page-epaper {
        max-width: 100%;
    }

    .epaper-main-layout {
        grid-template-columns: minmax(108px, 20vw) minmax(0, 1fr);
        gap: 0.72rem;
    }
}

@media (max-width: 820px) {
    .epaper-main-layout {
        grid-template-columns: minmax(0, 1fr);
    }

    .epaper-ad-slot {
        position: relative;
        top: auto;
        min-height: 74px;
    }

    .epaper-ad-slot.is-filled {
        min-height: 0;
    }

    .epaper-ad-media img {
        max-height: min(calc(var(--app-vh, 1vh) * 28), 220px);
        width: auto;
    }

    .pdf-viewer-toolbar {
        flex-direction: column;
        align-items: stretch;
    }

    .pdf-viewer-toolbar .btn-primary,
    .pdf-viewer-toolbar .btn-secondary {
        width: 100%;
    }

    .newspaper-pdf-frame-compact {
        height: calc(var(--app-vh) * 68);
        min-height: 320px;
    }

    .newspaper-pdf-frame-full {
        height: calc(var(--app-vh) * 76);
        min-height: 380px;
    }

    .paper-flip-inner {
        min-height: min(calc(var(--app-vh) * 68), 620px);
    }

    .paper-preview-shell {
        min-height: min(calc(var(--app-vh) * 58), 520px);
    }

    .paper-preview-frame {
        height: min(calc(var(--app-vh) * 58), 520px);
    }

    .hero-banner {
        padding: 0.95rem;
    }

    .odia-heritage {
        grid-template-columns: 1fr;
    }

    .editorial-strip {
        grid-template-columns: 1fr;
    }

    .home-gallery {
        grid-template-columns: 1fr;
        grid-auto-rows: 185px;
    }

    .home-feed .articles-grid {
        grid-template-columns: 1fr;
    }

    .live-widgets-grid {
        grid-template-columns: 1fr;
    }

    .live-widget-card:last-child {
        grid-column: auto;
    }
}

@media (max-width: 560px) {
    .epaper-ad-slot {
        min-height: 58px;
        border-style: solid;
    }

    .epaper-ad-slot.is-filled {
        min-height: 0;
    }

    .nav-wrapper,
    .nav-wrapper-home {
        grid-template-columns: minmax(0, 1fr) auto auto;
    }

    .search-form {
        margin: 0;
    }

    .search-form button {
        font-size: 0.7rem;
    }

    .hero-content h2 {
        font-size: clamp(1.62rem, 10.8vw, 2.65rem);
    }

    .hero-lead {
        font-size: 0.92rem;
    }

    .paper-face-front {
        padding: 0.8rem;
    }

    .paper-title {
        font-size: clamp(1.6rem, 8vw, 2.2rem);
    }

    .paper-subtitle {
        font-size: 0.8rem;
    }

    .paper-description {
        font-size: 0.82rem;
        margin: 0.65rem 0 0.85rem;
    }

    .paper-open-button {
        width: 100%;
    }

    .paper-preview-head {
        flex-direction: column;
        align-items: flex-start;
    }

    .paper-preview-actions {
        width: 100%;
        justify-content: space-between;
    }

    .paper-mini-btn {
        flex: 1;
        text-align: center;
    }

    .paper-flip-inner {
        min-height: min(calc(var(--app-vh) * 62), 510px);
    }

    .paper-preview-shell {
        min-height: min(calc(var(--app-vh) * 52), 420px);
    }

    .paper-preview-frame {
        height: min(calc(var(--app-vh) * 52), 420px);
    }

    .pdf-viewer-wrapper {
        padding: 0.35rem;
    }

    .newspaper-pdf-frame-compact {
        height: calc(var(--app-vh) * 64);
        min-height: 300px;
    }

    .newspaper-pdf-frame-full {
        height: calc(var(--app-vh) * 70);
        min-height: 340px;
    }

    .pdf-mobile-hint {
        font-size: 0.76rem;
    }

    .heritage-card {
        grid-template-columns: 64px 1fr;
        gap: 0.68rem;
        padding: 0.72rem;
    }

    .heritage-icon {
        width: 64px;
        height: 64px;
    }

    .home-gallery {
        grid-auto-rows: 170px;
    }

    .home-gallery-overlay {
        font-size: 0.8rem;
        padding: 0.74rem 0.7rem;
    }

    .live-widgets-section {
        padding: 0.72rem;
    }

    .live-widgets-head {
        align-items: flex-start;
    }

    .live-widgets-meta {
        font-size: 0.68rem;
    }

    .live-widget-card {
        min-height: 0;
    }
}

/* Mobile hardening: improve touch UX, spacing, and overflow safety site-wide. */
@media (max-width: 900px) {
    html,
    body {
        overflow-x: hidden;
    }

    body {
        -webkit-text-size-adjust: 100%;
    }

    a,
    button,
    input,
    select,
    textarea {
        -webkit-tap-highlight-color: rgba(47, 81, 106, 0.18);
    }

    button,
    input,
    select,
    textarea {
        font-size: 16px;
    }

    a,
    button {
        touch-action: manipulation;
    }

    .site-shell {
        width: calc(100% - 0.38rem);
        margin: 0.2rem auto 0.9rem;
        border-radius: 14px;
        box-shadow: 0 12px 28px rgba(22, 34, 47, 0.14);
    }

    .site-main {
        padding: 0.68rem 0 calc(4.1rem + env(safe-area-inset-bottom));
    }

    .container {
        width: calc(100% - 0.72rem);
    }

    .nav-wrapper,
    .nav-wrapper-home {
        gap: 0.42rem;
        align-items: center;
        min-height: 50px;
    }

    .hamburger {
        min-width: 42px;
        min-height: 42px;
        justify-content: center;
    }

    .nav-tools {
        display: inline-flex;
        align-items: center;
        justify-self: end;
        gap: 0.35rem;
    }

    .theme-toggle {
        width: 2.2rem;
        height: 2.2rem;
    }

    .logo-image {
        width: clamp(122px, 48vw, 178px);
        max-height: 50px;
    }

    .search-form {
        grid-template-columns: 1fr;
        gap: 0.46rem;
        margin: 0;
    }

    .search-form input,
    .search-form button {
        width: 100%;
        height: 2.34rem;
    }

    .nav-menu {
        left: max(8px, env(safe-area-inset-left));
        right: max(8px, env(safe-area-inset-right));
        width: auto;
        max-height: min(78vh, calc((var(--app-vh) * 100) - 118px - env(safe-area-inset-bottom)));
        overflow-y: auto;
        overscroll-behavior: contain;
        -webkit-overflow-scrolling: touch;
        padding: 0.56rem;
        border-radius: 14px;
        border: 1px solid var(--tm-line-strong);
        background: color-mix(in srgb, #ffffff 94%, var(--tm-shell) 6%);
        box-shadow: 0 16px 34px rgba(16, 27, 39, 0.22);
        gap: 0.3rem;
        z-index: 230;
    }

    .nav-menu.active {
        animation: none;
    }

    .nav-menu li {
        width: 100%;
    }

    .nav-menu a,
    .dropbtn {
        min-height: 46px;
        padding: 0.7rem 0.82rem;
        font-size: 0.8rem;
        letter-spacing: 0.025em;
        line-height: 1.25;
        text-transform: none;
        white-space: normal;
        border-radius: 10px;
    }

    .nav-menu .nav-icon {
        display: inline-flex;
        width: 1rem;
        color: var(--tm-text-soft);
    }

    .dropdown-content {
        margin-top: 0.28rem;
        max-height: min(42vh, 320px);
        overflow-y: auto;
        padding: 0.32rem;
        border-radius: 10px;
    }

    .dropdown-content a {
        font-size: 0.82rem;
        line-height: 1.3;
        padding: 0.62rem 0.66rem;
    }

    .dropdown-content a span {
        font-size: 0.72rem;
        margin-left: 0.5rem;
    }

    body.menu-open .site-header::before {
        content: "";
        position: fixed;
        inset: 0;
        background: rgba(16, 24, 35, 0.24);
        backdrop-filter: blur(2px);
        z-index: 225;
        pointer-events: none;
    }

    .content-wrapper,
    .content-wrapper.home-layout,
    .archive-wrapper {
        grid-template-columns: 1fr;
        gap: 0.72rem;
    }

    .main-content,
    .sidebar,
    .archive-main,
    .archive-sidebar,
    .page-content,
    .contact-section,
    .about-page,
    .advertise-page,
    .admin-section {
        padding: 0.72rem;
    }

    .article-card,
    .widget,
    .archive-section,
    .search-result,
    .pdf-card,
    .stat-box,
    .stat-card,
    .archive-pdf-item,
    .archive-article-item {
        padding: 0.66rem;
    }

    .article-content h3,
    .archive-article-content h4 {
        font-size: 1rem;
        line-height: 1.24;
        word-break: break-word;
    }

    .article-meta,
    .archive-article-meta,
    .result-meta {
        gap: 0.3rem;
    }

    .article-meta span,
    .archive-article-meta span,
    .result-meta span,
    .pdf-stats {
        font-size: 0.62rem;
        padding: 0.16rem 0.42rem;
    }

    .archive-article-item {
        grid-template-columns: 1fr;
    }

    .date-input-group {
        grid-template-columns: 1fr;
    }

    .quick-date-btn,
    .date-link {
        font-size: 0.75rem;
        padding: 0.46rem 0.58rem;
    }

    .archive-search-box form,
    .archive-search-box div {
        display: grid !important;
        gap: 0.46rem !important;
    }

    .pagination a {
        min-width: 1.9rem;
        padding: 0.42rem 0.55rem;
        font-size: 0.74rem;
    }

    .newspaper-actions,
    .pdf-footer,
    .share-buttons,
    .admin-actions {
        flex-direction: column;
        align-items: stretch;
    }

    .newspaper-actions a,
    .pdf-footer a,
    .share-btn,
    .admin-actions a,
    .btn,
    .btn-primary,
    .btn-secondary,
    .btn-edit,
    .btn-delete,
    .btn-danger,
    .btn-download,
    .btn-view {
        width: 100%;
    }

    .archive-pdf-item .pdf-footer .pdf-stats {
        width: 100%;
        justify-content: center;
    }

    .article-card:hover,
    .search-result:hover,
    .archive-pdf-item:hover,
    .archive-article-item:hover,
    .pdf-card:hover,
    .related-item:hover,
    .nav-menu a:hover,
    .dropbtn:hover {
        transform: none !important;
    }

    .article-card,
    .widget,
    .archive-pdf-item,
    .archive-article-item,
    .search-result,
    .pdf-card {
        content-visibility: auto;
        contain-intrinsic-size: 260px;
        box-shadow: var(--tm-shadow-mobile);
        transition: border-color 0.2s ease, background-color 0.2s ease;
    }

    .hero-banner,
    .todays-newspaper-section,
    .article-full,
    .archive-main,
    .archive-sidebar,
    .site-header,
    .hero-visual-card {
        backdrop-filter: none;
    }

    .site-header::after {
        display: none;
    }

    .home-gallery {
        gap: 0.56rem;
        grid-auto-rows: 160px;
    }

    .home-gallery-overlay {
        font-size: 0.76rem;
        line-height: 1.28;
        padding: 0.68rem 0.64rem;
    }

    .admin-table {
        display: block;
        overflow-x: auto;
        white-space: nowrap;
    }

    .footer-content {
        grid-template-columns: 1fr;
        gap: 0.62rem;
    }

    .admin-fab {
        right: max(10px, env(safe-area-inset-right));
        bottom: max(10px, env(safe-area-inset-bottom));
    }

    .btn,
    .btn-primary,
    .btn-secondary,
    .btn-download,
    .btn-view,
    .btn-edit,
    .btn-delete,
    .btn-danger,
    .btn-small {
        transition: background-color 0.2s ease, border-color 0.2s ease, color 0.2s ease;
    }

    .site-main > .container:first-child {
        animation: none !important;
    }

    body.menu-open {
        overflow: hidden;
        overscroll-behavior: none;
    }
}

@media (max-width: 560px) {
    .hero-content h2 {
        font-size: clamp(1.52rem, 10.2vw, 2.36rem);
        line-height: 0.94;
    }

    .hero-lead {
        font-size: 0.86rem;
    }

    .pdf-load-button {
        width: 100%;
    }

    .hero-chip {
        font-size: 0.64rem;
        padding: 0.24rem 0.5rem;
    }

    .breaking-news-banner {
        grid-template-columns: 1fr;
        gap: 0.36rem;
    }

    .breaking-label {
        width: fit-content;
    }
}

@media (hover: none) and (pointer: coarse) {
    .site-header {
        backdrop-filter: none;
    }

    .site-header::after {
        opacity: 0.7;
    }
}

/* Focused mobile polish for home + about to prevent cramped/uneven blocks on phones. */
@media (max-width: 900px) {
    .hero-banner {
        grid-template-columns: 1fr;
        gap: 0.72rem;
        padding: 0.9rem;
    }

    .hero-content {
        min-width: 0;
    }

    .hero-content h2 {
        font-size: clamp(1.95rem, 10.6vw, 3rem);
        line-height: 0.95;
    }

    .hero-lead {
        max-width: none;
        font-size: 0.9rem;
        line-height: 1.5;
        margin-bottom: 0.7rem;
    }

    .hero-actions {
        display: grid;
        grid-template-columns: 1fr;
        gap: 0.45rem;
        margin-bottom: 0.58rem;
    }

    .hero-actions .btn-primary,
    .hero-actions .btn-secondary {
        width: 100%;
        text-align: center;
    }

    .hero-chips {
        gap: 0.35rem;
    }

    .hero-chip {
        font-size: 0.64rem;
        padding: 0.28rem 0.52rem;
    }

    .hero-visual {
        grid-template-columns: 1fr;
        gap: 0.45rem;
    }

    .hero-visual-card {
        padding: 0.62rem;
    }

    .hero-visual-text {
        font-size: 0.82rem;
    }

    .odia-heritage {
        margin-top: 0.08rem;
        gap: 0.58rem;
    }

    .heritage-card {
        grid-template-columns: 58px 1fr;
        gap: 0.56rem;
        padding: 0.65rem;
    }

    .heritage-icon {
        width: 58px;
        height: 58px;
    }

    .heritage-content h3 {
        font-size: 0.95rem;
    }

    .heritage-content p {
        font-size: 0.82rem;
        line-height: 1.45;
    }

    .editorial-strip {
        gap: 0.5rem;
    }

    .editorial-pill {
        padding: 0.58rem 0.62rem;
    }

    .editorial-value {
        font-size: 0.88rem;
    }

    .about-page {
        padding: 0.82rem;
        border-radius: 14px;
    }

    .about-page .page-header {
        padding: 0.82rem;
        margin-bottom: 0.72rem;
    }

    .about-page .page-header h1 {
        font-size: clamp(1.55rem, 7.4vw, 2.05rem);
        line-height: 1.04;
        margin-bottom: 0.35rem;
    }

    .about-page .page-subtitle {
        font-size: 0.88rem;
        line-height: 1.45;
    }

    .about-content {
        gap: 0.62rem;
    }

    .about-page .about-section {
        padding: 0.78rem;
        border-radius: 13px;
    }

    .about-page .about-section h2 {
        font-size: 1.12rem;
        line-height: 1.2;
        margin-bottom: 0.4rem;
    }

    .about-page .about-section p {
        margin: 0;
        font-size: 0.9rem;
        line-height: 1.6;
    }

    .about-page .about-section p + p {
        margin-top: 0.45rem;
    }

    .about-page .values-grid {
        grid-template-columns: 1fr;
        gap: 0.58rem;
    }

    .about-page .values-grid .value-item {
        padding: 0.72rem;
    }

    .about-page .value-item h3 {
        font-size: 0.9rem;
        margin-bottom: 0.25rem;
    }
}

@media (max-width: 560px) {
    .hero-banner {
        padding: 0.78rem;
    }

    .hero-kicker {
        font-size: 0.62rem;
        letter-spacing: 0.11em;
    }

    .hero-content h2 {
        font-size: clamp(1.6rem, 9.4vw, 2.4rem);
        line-height: 0.98;
    }

    .hero-lead {
        font-size: 0.85rem;
    }

    .home-gallery {
        grid-auto-rows: 150px;
    }

    .about-page .page-header h1 {
        font-size: clamp(1.42rem, 9vw, 1.78rem);
    }

    .about-page .about-section {
        padding: 0.68rem;
    }

    .about-page .about-section h2 {
        font-size: 1.02rem;
    }

    .about-page .about-section p {
        font-size: 0.86rem;
    }
}

/* Global size normalization across pages (large but balanced sizing). */
:root {
    --ui-root-desktop: 24px;
    --ui-root-tablet: 21px;
    --ui-root-mobile: 18px;
    --ui-panel-pad: clamp(0.72rem, 1.05vw, 1.02rem);
    --ui-section-gap: clamp(0.6rem, 1vw, 0.95rem);
    --ui-body-size: clamp(0.9rem, 0.92vw, 1.02rem);
    --ui-sub-size: clamp(0.8rem, 0.85vw, 0.94rem);
    --ui-meta-size: clamp(0.68rem, 0.74vw, 0.82rem);
    --ui-btn-size: clamp(0.7rem, 0.8vw, 0.9rem);
}

html {
    font-size: var(--ui-root-desktop);
}

body {
    line-height: 1.62;
}

p,
li,
label,
input,
select,
textarea,
.text-muted {
    font-size: var(--ui-body-size);
}

.page-subtitle,
.archive-date-subtitle,
.newsletter-note,
.social-note,
.pdf-mobile-hint,
.advertise-note,
.live-widgets-meta {
    font-size: var(--ui-sub-size);
    line-height: 1.5;
}

.page-header h1,
.admin-header h1,
.archive-header h1,
.category-header h1,
.search-header h1,
.pdf-library-header h1,
.contact-section h1,
.achievements-page .page-header h1,
.advertise-page .page-header h1,
.about-page .page-header h1 {
    font-size: clamp(1.55rem, 2.9vw, 2.4rem);
    line-height: 1.06;
}

.widget,
.article-card,
.search-result,
.archive-section,
.pdf-card,
.stat-box,
.stat-card,
.archive-pdf-item,
.archive-article-item,
.admin-section,
.contact-form,
.article-form,
.category-form,
.admin-form,
.date-picker-box,
.newspaper-card,
.about-section,
.values-grid .value-item {
    padding: var(--ui-panel-pad);
}

.content-wrapper,
.content-wrapper.home-layout,
.archive-wrapper,
.stats-grid,
.achievements-grid,
.advertise-grid,
.admin-action-grid,
.live-widgets-grid {
    gap: var(--ui-section-gap);
}

.widget h3,
.live-widget-card h3,
.admin-action-card h3,
.stat-card h3,
.stat-box h4,
.archive-section h3 {
    font-size: clamp(0.96rem, 1.15vw, 1.22rem);
    line-height: 1.25;
}

.widget-list li {
    padding: clamp(0.44rem, 0.65vw, 0.66rem) 0;
}

.article-meta span,
.archive-article-meta span,
.result-meta span,
.pdf-stats,
.download-count,
.upload-date,
.stat-label,
.newspaper-share-label {
    font-size: var(--ui-meta-size);
}

.btn,
.btn-primary,
.btn-secondary,
.btn-download,
.btn-view,
.btn-edit,
.btn-delete,
.btn-danger,
.btn-small {
    min-height: 2.35rem;
    font-size: var(--ui-btn-size);
}

.admin-table th,
.admin-table td {
    font-size: clamp(0.68rem, 0.78vw, 0.86rem);
    padding: clamp(0.5rem, 0.76vw, 0.7rem) clamp(0.5rem, 0.76vw, 0.74rem);
}

.nav-menu a,
.dropbtn {
    font-size: clamp(0.62rem, 0.73vw, 0.8rem);
}

.logo-image {
    width: clamp(260px, 34vw, 430px);
    max-height: 104px;
}

.home-gallery {
    grid-auto-rows: clamp(190px, 18vw, 240px);
}

.achievement-image img {
    height: clamp(230px, 24vw, 300px);
}

.live-widget-card {
    min-height: clamp(165px, 16vw, 220px);
}

@media (max-width: 1120px) {
    html {
        font-size: var(--ui-root-tablet);
    }

    .logo-image {
        width: clamp(220px, 53vw, 330px);
        max-height: 88px;
    }
}

@media (max-width: 900px) {
    .widget,
    .article-card,
    .search-result,
    .archive-section,
    .pdf-card,
    .archive-pdf-item,
    .archive-article-item,
    .admin-section,
    .contact-form,
    .article-form,
    .category-form,
    .admin-form,
    .date-picker-box,
    .newspaper-card,
    .about-section,
    .values-grid .value-item {
        padding: clamp(0.62rem, 1.8vw, 0.84rem);
    }

    .achievement-detail-content {
        padding: 0.85rem;
    }
}

@media (max-width: 560px) {
    html {
        font-size: var(--ui-root-mobile);
    }

    .logo-image {
        width: clamp(170px, 66vw, 248px);
        max-height: 72px;
    }

    .home-gallery {
        grid-auto-rows: clamp(160px, 45vw, 205px);
    }

    .achievement-image img {
        height: clamp(210px, 54vw, 260px);
    }

    .achievement-detail-page {
        padding: 0.82rem;
    }

    .live-widget-card {
        min-height: 0;
    }
}

/* Runtime profile: keeps interactions fluid on constrained devices */
body.perf-lite .site-header {
    backdrop-filter: none;
}

body.perf-lite .site-header::after {
    opacity: 0.72;
}

body.perf-lite .navbar,
body.perf-lite .hero-visual-card,
body.perf-lite .paper-face-front,
body.perf-lite .paper-face-back,
body.perf-lite .pdf-frame-shell {
    backdrop-filter: none;
}

body.perf-lite .site-shell,
body.perf-lite .hero-banner,
body.perf-lite .todays-newspaper-section,
body.perf-lite .widget,
body.perf-lite .article-card,
body.perf-lite .archive-section,
body.perf-lite .pdf-card,
body.perf-lite .about-section,
body.perf-lite .contact-form,
body.perf-lite .live-widget-card {
    box-shadow: var(--tm-shadow-mobile);
}

body.perf-lite .reveal,
body.perf-lite .reveal.is-visible {
    opacity: 1;
    transform: none;
    transition: none;
}

body.perf-lite .article-card,
body.perf-lite .search-result,
body.perf-lite .archive-pdf-item,
body.perf-lite .archive-article-item,
body.perf-lite .pdf-card,
body.perf-lite .related-item,
body.perf-lite .widget,
body.perf-lite .stat-card,
body.perf-lite .stat-box {
    transform: none !important;
    will-change: auto;
    transition: border-color 0.18s ease, box-shadow 0.18s ease;
}

body.perf-lite .article-card:hover,
body.perf-lite .search-result:hover,
body.perf-lite .archive-pdf-item:hover,
body.perf-lite .archive-article-item:hover,
body.perf-lite .pdf-card:hover,
body.perf-lite .related-item:hover {
    transform: none !important;
    box-shadow: var(--tm-shadow-mobile);
}

body.perf-lite .paper-flip-inner {
    transition-duration: 0.18s;
}

body.perf-lite .live-quote-list {
    contain: content;
}

body.motion-disabled *,
body.motion-disabled *::before,
body.motion-disabled *::after {
    animation-duration: 0.01ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: 0.01ms !important;
    scroll-behavior: auto !important;
}

body.motion-disabled .page-transition-curtain {
    display: none !important;
}
