:root {
    --ink: #163137;
    --teal: #087b83;
    --dark: #07545d;
    --line: #d9e4e3;
    --muted: #607878;
    --paper: #fff;
    --bg: #f1f5f3;
}

* {
    box-sizing: border-box;
}

body {
    margin: 0;
    background: var(--bg);
    color: var(--ink);
    font-family: 'Noto Sans Bengali','SolaimanLipi',system-ui,sans-serif;
    font-size: 15px;
}

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

button, select {
    font: inherit;
}

button, a, select {
    touch-action: manipulation;
}

button {
    cursor: pointer;
    border: 1px solid var(--line);
    background: #fff;
    border-radius: 5px;
    color: var(--ink);
    padding: 8px 13px;
}

button:hover:not(:disabled), a:hover {
    color: var(--teal);
}

button:disabled {
    opacity: .4;
    cursor: default;
}

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

.skip {
    position: absolute;
    top: -100px;
}

.skip:focus {
    top: 0;
    z-index: 99;
    background: white;
    padding: 12px;
}

.masthead {
    max-width: 1380px;
    margin: auto;
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 28px 40px;
    background: #fff;
    min-height: 157px;
}

.brand p {
    margin: 0;
    color: var(--muted);
    font-size: 13px;
    letter-spacing: 2px;
}

.wordmark {
    font-family: serif;
    font-size: 70px;
    font-weight: 900;
    line-height: 1.15;
    color: var(--dark);
}

.logo {
    max-width: 280px;
    max-height: 100px;
    width: auto;
    height: auto;
}

.edition {
    text-align: right;
    display: grid;
    gap: 6px;
}

.edition span {
    color: var(--muted);
    font-size: 12px;
}

.edition strong {
    font-size: 26px;
}

.edition a {
    font-size: 13px;
    color: var(--teal);
}

.nav-shell {
    background: #fff;
    border-top: 1px solid var(--line);
    border-bottom: 1px solid var(--line);
}

.navigation {
    max-width: 1380px;
    margin: auto;
    padding: 14px 40px;
    display: flex;
    align-items: center;
    gap: 24px;
    justify-content: space-between;
}

#page-nav {
    display: flex;
    gap: 5px;
    flex-wrap: wrap;
    max-width: 48%;
}

#page-nav button {
    padding: 5px;
    min-width: 32px;
    font-size: 14px;
}

#page-nav .active, .bottom-nav button {
    background: var(--teal);
    color: #fff;
    border-color: var(--teal);
}

.main-nav {
    display: flex;
    justify-content: center;
    gap: 24px;
    flex-wrap: wrap;
    font-size: 14px;
}

.archive-wrap {
    position: relative;
    flex-shrink: 0;
}

#archive-toggle {
    border-color: var(--teal);
    color: var(--teal);
}

#archive-toggle span {
    margin-left: 22px;
}

#archive {
    position: absolute;
    right: 0;
    top: 48px;
    width: 340px;
    background: white;
    padding: 20px;
    border: 1px solid var(--line);
    box-shadow: 0 16px 45px #13383229;
    border-radius: 9px;
    z-index: 50;
}

.calendar-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 4px;
}

.calendar-header select {
    max-width: 112px;
    padding: 6px;
    border: 1px solid var(--line);
    background: white;
}

.week, #calendar {
    display: grid;
    grid-template-columns: repeat(7,1fr);
    gap: 5px;
    text-align: center;
}

.week {
    font-size: 11px;
    color: var(--muted);
    margin: 20px 0 10px;
}

#calendar>* {
    padding: 7px 0;
    border-radius: 4px;
    font-size: 13px;
}

#calendar .published {
    background: #dcefed;
    color: var(--dark);
    font-weight: 700;
}

#calendar .selected {
    background: var(--teal);
    color: white;
}

#calendar .unpublished {
    color: #a7b4b2;
    background: #f7f8f8;
}

#archive p {
    font-size: 11px;
    color: var(--muted);
    border-top: 1px solid var(--line);
    padding-top: 15px;
}

#archive>a {
    font-size: 13px;
    color: var(--teal);
}

#archive i {
    display: inline-block;
    width: 8px;
    height: 8px;
    background: var(--teal);
    border-radius: 50%;
}

.date-strip {
    max-width: 1380px;
    margin: auto;
    padding: 13px 40px;
    display: flex;
    justify-content: space-between;
    gap: 10px;
    font-size: 12px;
    border-bottom: 1px solid var(--line);
    flex-wrap: wrap;
}

.live {
    display: inline-block;
    width: 6px;
    height: 6px;
    border-radius: 50%;
    background: #12a77c;
    margin-right: 7px;
}

#clock {
    font-weight: 500;
}

main {
    max-width: 1380px;
    padding: 30px 40px;
    margin: auto;
}

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

.eyebrow {
    font-size: 11px;
    color: var(--teal);
    letter-spacing: 1px;
}

h1 {
    font-size: 23px;
    margin: 7px 0;
}

.reader-heading p {
    font-size: 12px;
    color: var(--muted);
    margin: 0;
}

.tools {
    display: flex;
    align-items: center;
    gap: 5px;
    flex-wrap: wrap;
    font-size: 12px;
}

.tools button {
    padding: 6px 10px;
}

.tools a {
    background: var(--dark);
    color: white;
    padding: 7px 13px;
    border-radius: 5px;
}

#zoom-level {
    min-width: 38px;
    text-align: center;
}

.reader-layout {
    display: flex;
    gap: 22px;
    align-items: flex-start;
}

#thumbs {
    width: 90px;
    flex-shrink: 0;
    display: grid;
    gap: 12px;
}

#thumbs button {
    background: #fff;
    padding: 5px;
    font-size: 11px;
    color: var(--muted);
}

#thumbs button.active {
    border: 2px solid var(--teal);
    color: var(--teal);
}

#thumbs img {
    width: 100%;
    height: 100px;
    object-fit: contain;
    display: block;
    margin-bottom: 4px;
}

#reader-stage {
    background: #dfe7e5;
    overflow: auto;
    flex: 1;
    min-width: 0;
    padding: 14px;
    border: 1px solid #d0dcda;
    border-radius: 5px;
    max-height: none;
}

#reader-stage:fullscreen {
    height: 100vh;
    width: 100vw;
    padding: 20px;
}

#paper {
    width: 100%;
    background: white;
    box-shadow: 0 3px 15px #173c3712;
    min-height: 300px;
    transform-origin: top left;
}

#paper-image {
    display: block;
    width: 100%;
    height: auto;
}

#image-error {
    padding: 25px;
}

.empty {
    padding: 70px 30px;
    text-align: center;
}

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

.empty a {
    color: var(--teal);
}

.bottom-nav {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 30px;
    padding: 25px 0 5px;
}

.bottom-nav button {
    padding: 10px 25px;
}

.bottom-nav span {
    font-size: 13px;
    min-width: 75px;
    text-align: center;
}

.reader-note {
    text-align: center;
    color: var(--muted);
    font-size: 12px;
}

footer {
    background: white;
    border-top: 3px solid var(--dark);
    padding: 32px 40px 0;
}

.footer-top {
    max-width: 1300px;
    margin: auto;
    display: flex;
    align-items: flex-start;
    justify-content: space-between;
    gap: 30px;
    padding-bottom: 25px;
}

.footer-top strong {
    display: block;
    font-family: serif;
    font-size: 35px;
    color: var(--dark);
}

.footer-top span, .footer-top p, .footer-top a {
    font-size: 12px;
    line-height: 1.9;
    color: var(--muted);
}

.footer-top p {
    white-space: normal;
    margin: 0;
    max-width: 700px;
}

.credits {
    border-top: 1px solid var(--line);
    text-align: center;
    font-size: 12px;
    padding: 18px;
    color: var(--muted);
}

[hidden] {
    display: none!important;
}

@media (min-width:1600px) {
    body {
        padding-top: 20px;
    }
}

@media (max-width:850px) {
    .masthead {
        padding: 24px;
    }

    .navigation {
        padding: 12px 20px;
        gap: 14px;
        flex-wrap: wrap;
    }

    #page-nav {
        max-width: 100%;
        width: 100%;
        order: 2;
    }

    .main-nav {
        justify-content: flex-start;
        gap: 18px;
    }

    .date-strip {
        padding: 12px 20px;
        justify-content: flex-start;
        gap: 10px 22px;
    }

    main {
        padding: 22px 16px;
    }

    .reader-heading {
        flex-wrap: wrap;
    }

    #thumbs {
        display: none;
    }

    .reader-layout {
        gap: 0;
    }

    #reader-stage {
        padding: 5px;
    }

    .footer-top {
        flex-wrap: wrap;
    }

    .edition span {
        display: none;
    }

    h1 {
        font-size: 21px;
    }
}

@media (max-width:480px) {
    .wordmark {
        font-size: 53px;
    }

    .edition strong {
        font-size: 20px;
    }

    .logo {
        max-width: 190px;
        max-height: 78px;
    }

    .brand p {
        letter-spacing: 0;
    }

    .main-nav {
        gap: 12px;
        font-size: 13px;
    }

    .navigation {
        padding: 12px;
    }

    #archive {
        right: 0;
        width: min(340px,calc(100vw - 24px));
    }

    .date-strip {
        font-size: 11px;
    }

    .bottom-nav {
        gap: 12px;
    }

    .bottom-nav button {
        padding: 10px 14px;
        font-size: 13px;
    }

    footer {
        padding: 24px 20px 0;
    }

    .tools {
        gap: 5px;
    }
}

.preview-banner {
    background: #fff2ce;
    color: #77530d;
    text-align: center;
    padding: 10px;
    font-size: 13px;
}

.preview-banner a {
    text-decoration: underline;
}

.announcement {
    padding: 12px 25px;
    background: #eaf7fc;
    color: #086684;
    max-width: 1360px;
    margin: 0 auto;
    font-size: 14px;
}

.live {
    background: var(--accent);
}

.footer-top strong {
    color: var(--dark);
}

.date-strip strong {
    font-weight: 600;
}

#paper {
    background: var(--paper);
}

#paper-canvas {
    position: relative;
}

#continuation-layer {
    position: absolute;
    inset: 0;
    pointer-events: none;
}

.continuation-hotspot {
    position: absolute;
    pointer-events: auto;
    padding: 0;
    border: 2px dashed #007ca9;
    border-radius: 2px;
    background: #00a9df0a;
    min-width: 0;
    min-height: 0;
}

.continuation-hotspot:hover, .continuation-hotspot:focus-visible {
    background: #00a9df33;
    border-style: solid;
}

.continuation-hotspot::after {
    content: '↗';
    position: absolute;
    right: 0;
    top: 0;
    background: #007ca9;
    color: white;
    font-size: 12px;
    line-height: 16px;
    width: 16px;
}

#continuation-target {
    position: absolute;
    border: 3px solid #e02020;
    background: #ffdc001c;
    pointer-events: none;
    outline-offset: 2px;
}

.continuation-controls {
    padding: 16px;
    background: white;
    border: 1px solid var(--line);
    margin-top: 16px;
}

.continuation-controls p {
    font-size: 14px;
}

.continuation-controls button {
    font-size: 13px;
}

#continuation-list {
    display: flex;
    gap: 8px;
    flex-wrap: wrap;
}

#continuation-back {
    background: var(--dark);
    color: white;
}

.header-right-image {
    max-width: 300px;
    max-height: 130px;
    object-fit: contain;
}

.main-nav {
    position: relative;
    gap: 5px;
}

.menu-item {
    display: flex;
    align-items: center;
}

.menu-item>a {
    padding: 9px 13px;
    border-radius: 6px;
}

.submenu-toggle {
    border: 0;
    background: transparent;
    color: inherit;
    padding: 6px;
}

.submenu {
    display: none;
    position: absolute;
    top: 100%;
    left: 0;
    min-width: 280px;
    width: 100%;
    background: white;
    color: #163137;
    box-shadow: 0 15px 40px #1234;
    padding: 20px;
    gap: 12px;
    z-index: 45;
    border-radius: 10px;
}

.menu-item:hover>.submenu, .menu-item:focus-within>.submenu, .menu-item.open>.submenu {
    display: grid;
    grid-template-columns: repeat(2,minmax(130px,1fr));
}

.submenu a {
    padding: 15px;
    border: 1px solid #e3e9ee;
    border-radius: 7px;
}

.submenu span {
    display: block;
    font-size: 12px;
    color: #5e7185;
}

.menu-dropdown .submenu {
    width: 260px;
    min-width: 220px;
}

.menu-dropdown .menu-item {
    position: relative;
}

.menu-dropdown .submenu {
    grid-template-columns: 1fr;
}

.footer-top {
    display: grid;
    grid-template-columns: repeat(3,minmax(0,1fr));
    align-items: start;
}

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

.footer-top img {
    max-width: 100%;
    max-height: 160px;
    object-fit: contain;
}

.credits img {
    max-width: 160px;
    max-height: 55px;
    vertical-align: middle;
    margin-right: 15px;
}

.reader-midnight {
    background: #0a1728;
}

.reader-midnight main, .reader-midnight .date-strip {
    color: #e9f2ff;
}

.reader-midnight .reader-heading p, .reader-midnight .reader-note {
    color: #a5b7cc;
}

.reader-paper {
    background: #f4ead7;
}

.reader-paper .masthead {
    border-bottom: double 5px #8d4c31;
}

.reader-paper h1 {
    letter-spacing: .4px;
}

.reader-newsroom .masthead {
    box-shadow: 0 12px 40px #15375308;
}

.reader-newsroom .reader-heading {
    border-left: 4px solid var(--teal);
    padding-left: 18px;
}

@media (max-width:700px) {
    .footer-top, .footer-columns-2 {
        grid-template-columns: 1fr;
    }

    .header-right-image {
        max-width: 140px;
    }

    .submenu {
        left: 0;
        width: min(90vw,380px);
    }

    .main-nav {
        position: static;
    }

    .navigation {
        position: relative;
    }

    .menu-item:hover>.submenu {
        display: none;
    }

    .menu-item.open>.submenu, .menu-item:focus-within>.submenu {
        display: grid;
    }
}
/* Keep the live clock and each calendar date in their own column. */
.date-strip {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(min(100%, 230px), 1fr));
    align-items: center;
    justify-content: stretch !important;
    gap: 8px 16px;
}

.date-strip > span {
    min-width: 0;
    text-align: center;
}

.date-strip > span[hidden] {
    display: none !important;
}

.date-strip #clock {
    font-variant-numeric: tabular-nums;
    white-space: nowrap;
}

#main-menu-toggle {
    display: none;
}

@media (max-width: 760px) {
    .has-mobile-menu #main-menu-toggle {
        display: inline-flex;
        align-items: center;
        gap: 8px;
        margin-right: auto;
        min-height: 44px;
    }

    #main-menu-toggle span {
        font-size: 20px;
        line-height: 1;
    }

    .has-mobile-menu #main-site-menu {
        display: none;
        order: 3;
        flex: 0 0 100%;
        flex-direction: column;
        align-items: stretch;
        padding-top: 8px;
    }

    .has-mobile-menu #main-menu-toggle[aria-expanded="true"] + #main-site-menu {
        display: flex;
    }

    .has-mobile-menu #main-site-menu .menu-item {
        flex-wrap: wrap;
    }

    .has-mobile-menu #main-site-menu .submenu {
        position: static;
        flex: 0 0 100%;
        min-width: 0;
        max-width: 100%;
        box-shadow: none;
    }
}
