/* Mangrove: the default theme.
   The masthead is the canopy; prop roots hang from it to the waterline.
   Literata for reading, Schibsted Grotesk for navigation and metadata. */
@import url("/fonts/fonts.css");

:root {
    --paper: #f8f9f6;
    --surface: #ffffff;
    --ink: #12302b;
    --text: #22302c;
    --muted: #5d6b66;
    --line: #dde3dd;
    --brackish: #2f6158;
    --root: #6f978d;
    --tannin: #a8691e;
    --serif: "Literata", "Iowan Old Style", Georgia, "Noto Serif", "Noto Serif Bengali", serif;
    --ui: "Schibsted Grotesk", system-ui, -apple-system, "Segoe UI", "Noto Sans", "Noto Sans Bengali", sans-serif;
    --wrap: 1120px;
    --measure: 40rem;
    color-scheme: light;
}
@media (prefers-color-scheme: dark) {
    :root {
        --paper: #0f1615;
        --surface: #151f1d;
        --ink: #e3eee9;
        --text: #d3ded9;
        --muted: #91a29c;
        --line: #26332f;
        --brackish: #8ac4b5;
        --root: #3f6b62;
        --tannin: #e0a65a;
        color-scheme: dark;
    }
}

*, *::before, *::after { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; }
body {
    margin: 0;
    background: var(--paper);
    color: var(--text);
    font: 400 1.0625rem/1.7 var(--serif);
    -webkit-font-smoothing: antialiased;
    text-rendering: optimizeLegibility;
}
a { color: var(--brackish); text-decoration-thickness: 1px; text-underline-offset: .2em; }
a:hover { color: var(--ink); text-decoration-thickness: 2px; }
img { max-width: 100%; height: auto; }
:focus-visible { outline: 2px solid var(--brackish); outline-offset: 3px; border-radius: 2px; }
.wrap { max-width: var(--wrap); margin: 0 auto; padding: 0 1.5rem; }
.sr-only { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }
.skip-link { position: absolute; left: -999px; top: .5rem; z-index: 20; background: var(--ink); color: var(--paper); padding: .5rem 1rem; font-family: var(--ui); }
.skip-link:focus { left: .5rem; }
.muted { color: var(--muted); }
.inline { display: inline; }
.linklike { background: none; border: 0; padding: 0; font: inherit; color: var(--brackish); cursor: pointer; text-decoration: underline; text-underline-offset: .2em; }
@media (prefers-reduced-motion: reduce) { * { transition: none !important; } }

/* ---------- Admin strip (signed-in authors) ---------- */
.admin-strip { background: var(--ink); font: 500 .82rem/1 var(--ui); }
.admin-strip .wrap { display: flex; gap: 1.4rem; padding-top: .55rem; padding-bottom: .55rem; }
.admin-strip a, .admin-strip .linklike { color: var(--paper); text-decoration: none; opacity: .85; }
.admin-strip a:hover, .admin-strip .linklike:hover { opacity: 1; text-decoration: underline; }
.admin-strip form { margin-left: auto; }

/* ---------- Masthead: the canopy ---------- */
.masthead { padding-top: 2.6rem; }
.masthead-inner { display: flex; align-items: flex-end; justify-content: space-between; gap: 1.5rem 3rem; flex-wrap: wrap; }
.site-title { font: 600 clamp(2rem, 1.4rem + 2.4vw, 3rem)/1 var(--serif); color: var(--ink); text-decoration: none; letter-spacing: -.025em; font-variation-settings: "opsz" 72; }
.site-title:hover { color: var(--brackish); }
.site-tagline { margin: .55rem 0 0; font: italic 400 1.05rem/1.4 var(--serif); color: var(--muted); max-width: 40ch; }
.site-nav { display: flex; align-items: center; gap: 1.5rem; flex-wrap: wrap; font-family: var(--ui); }
.menu { list-style: none; display: flex; flex-wrap: wrap; gap: .25rem 1.4rem; margin: 0; padding: 0; }
.site-nav .menu a { color: var(--text); text-decoration: none; font-weight: 500; font-size: .98rem; padding: .3rem 0; border-bottom: 1.5px solid transparent; }
.site-nav .menu a:hover { color: var(--ink); border-bottom-color: var(--root); }
.site-nav .menu .current a { color: var(--ink); border-bottom-color: var(--ink); }
.nav-search input { width: 9.5rem; height: 2.2rem; padding: 0 .8rem; font: 400 .92rem var(--ui); color: var(--text); background: var(--surface); border: 1px solid var(--line); border-radius: 1.1rem; transition: width .2s, border-color .15s; }
.nav-search input:focus { width: 13rem; outline: none; border-color: var(--brackish); }
.rootline { color: var(--root); margin-top: 1.4rem; line-height: 0; overflow: hidden; }
.rootline .roots { display: block; }

/* ---------- Main ---------- */
.site-main { padding-top: 3rem; padding-bottom: 5rem; min-height: 50vh; }

/* Lead story */
.lead { display: grid; gap: 2.5rem; padding-bottom: 3rem; margin-bottom: 1rem; border-bottom: 1px solid var(--line); }
.lead.has-image { grid-template-columns: minmax(0, 1fr) minmax(0, 1.1fr); align-items: center; }
.lead-title { font: 600 clamp(2rem, 1.3rem + 2.6vw, 3.2rem)/1.08 var(--serif); letter-spacing: -.025em; margin: 0 0 .9rem; max-width: 18ch; font-variation-settings: "opsz" 72; }
.lead-title a { color: var(--ink); text-decoration: none; }
.lead-title a:hover { color: var(--brackish); }
.lead-excerpt { font-size: 1.2rem; line-height: 1.6; color: var(--text); max-width: 34rem; margin: 0 0 1.4rem; }
.lead-image img { display: block; width: 100%; aspect-ratio: 4 / 3; object-fit: cover; border-radius: 4px; }
.read { font: 600 .95rem var(--ui); }
@media (max-width: 820px) { .lead.has-image { grid-template-columns: 1fr; } .lead-image { order: -1; } }

/* Dated list */
.section-title { font: 600 .95rem/1.3 var(--ui); color: var(--muted); margin: 2rem 0 .5rem; }
.entry-row { display: grid; grid-template-columns: 8.5rem minmax(0, 1fr) auto; gap: 0 2rem; padding: 1.8rem 0; border-bottom: 1px solid var(--line); align-items: start; }
.row-date { font: 500 .88rem/1.9 var(--ui); color: var(--muted); font-variant-numeric: tabular-nums; padding-top: .25rem; }
.row-title { font: 600 1.55rem/1.22 var(--serif); letter-spacing: -.015em; margin: 0 0 .45rem; max-width: 30ch; }
.row-title a { color: var(--ink); text-decoration: none; }
.row-title a:hover { color: var(--brackish); text-decoration: underline; text-decoration-thickness: 1px; }
.row-excerpt { margin: 0 0 .6rem; max-width: var(--measure); color: var(--text); }
.row-meta { display: flex; gap: 1rem; flex-wrap: wrap; margin: 0; font: 400 .85rem var(--ui); color: var(--muted); }
.row-meta a { color: var(--brackish); text-decoration: none; font-weight: 500; }
.row-meta a:hover { text-decoration: underline; }
.pinned { color: var(--tannin); font-weight: 600; }
.row-thumb img { display: block; width: 9.5rem; aspect-ratio: 1; object-fit: cover; border-radius: 4px; }
@media (max-width: 760px) {
    .entry-row { grid-template-columns: minmax(0, 1fr) auto; gap: .2rem 1.25rem; }
    .row-date { grid-column: 1 / -1; padding: 0; }
    .row-thumb img { width: 5.5rem; }
}

/* Archive & search headers */
.archive-head { max-width: var(--measure); margin-bottom: 1.5rem; }
.archive-head h1 { font: 600 clamp(1.9rem, 1.4rem + 1.8vw, 2.6rem)/1.15 var(--serif); color: var(--ink); letter-spacing: -.02em; margin: 0 0 .6rem; }
.archive-head p { color: var(--muted); font-size: 1.1rem; margin: 0 0 1rem; }
.search-big { display: flex; gap: .6rem; margin: 1.2rem 0 1rem; }
.search-big input { flex: 1; }
.empty { color: var(--muted); font-size: 1.1rem; max-width: var(--measure); }
.notfound { padding: 2rem 0 3rem; }

/* Pager */
.pager { display: grid; grid-template-columns: 1fr auto 1fr; align-items: center; gap: 1rem; margin-top: 2.5rem; font-family: var(--ui); }
.pager > :last-child { justify-self: end; }
.pager-count { color: var(--muted); font-size: .9rem; }

/* ---------- Single ---------- */
.entry { max-width: 46rem; margin: 0 auto; }
.entry-head { margin-bottom: 2rem; }
.entry-head h1 { font: 600 clamp(2.1rem, 1.3rem + 3vw, 3.4rem)/1.08 var(--serif); color: var(--ink); letter-spacing: -.028em; margin: 0 0 1rem; font-variation-settings: "opsz" 72; text-wrap: balance; }
.meta { font: 400 .92rem/1.5 var(--ui); color: var(--muted); margin: 0 0 1rem; }
.meta a { color: var(--text); text-decoration: none; font-weight: 500; border-bottom: 1px solid var(--line); }
.meta a:hover { border-bottom-color: var(--brackish); color: var(--ink); }
.entry-figure { margin: 0 -4rem 2.5rem; }
.entry-figure img { display: block; width: 100%; border-radius: 4px; }
.entry-figure figcaption, .entry-content figcaption { font: 400 .85rem/1.5 var(--ui); color: var(--muted); margin-top: .6rem; }
@media (max-width: 920px) { .entry-figure { margin: 0 0 2rem; } }

.entry-content { font-size: 1.15rem; line-height: 1.75; overflow-wrap: break-word; max-width: var(--measure); }
.entry-content > :first-child { margin-top: 0; }
.entry-content p, .entry-content ul, .entry-content ol { margin: 0 0 1.35em; }
.entry-content li { margin-bottom: .35em; }
.entry-content h2, .entry-content h3, .entry-content h4 { color: var(--ink); line-height: 1.25; letter-spacing: -.012em; margin: 2.2em 0 .6em; }
.entry-content h2 { font-size: 1.65rem; }
.entry-content h3 { font-size: 1.3rem; }
.entry-content h4 { font: 600 1rem var(--ui); }
.entry-content blockquote { position: relative; margin: 1.8em 0; padding: 0 0 0 2.2rem; font-style: italic; font-size: 1.25rem; line-height: 1.6; color: var(--ink); }
.entry-content blockquote::before { content: "\201C"; position: absolute; left: -.1rem; top: -.2em; font: 400 3.4rem/1 var(--serif); color: var(--root); }
.entry-content blockquote p:last-child { margin-bottom: 0; }
.entry-content a { font-weight: 500; }
.entry-content img { border-radius: 4px; }
.entry-content hr { border: 0; height: 44px; margin: 2.5rem 0; background: linear-gradient(var(--line), var(--line)) center / 100% 1px no-repeat; }
.entry-content code { font-family: ui-monospace, "SF Mono", Menlo, Consolas, monospace; font-size: .86em; background: color-mix(in srgb, var(--brackish) 9%, transparent); padding: .12em .35em; border-radius: 3px; }
.entry-content pre { background: #10231f; color: #dcebe5; padding: 1.1rem 1.3rem; border-radius: 6px; overflow-x: auto; font-size: .92rem; line-height: 1.6; }
.entry-content pre code { background: none; padding: 0; color: inherit; }
.entry-content table { width: 100%; border-collapse: collapse; margin: 1.6em 0; font: 400 .95rem/1.5 var(--ui); }
.entry-content th, .entry-content td { padding: .6rem .8rem; border-bottom: 1px solid var(--line); text-align: left; }
.entry-content th { color: var(--ink); font-weight: 600; border-bottom-width: 2px; }
.entry-content iframe { width: 100%; height: auto; aspect-ratio: 16 / 9; border: 0; border-radius: 6px; }
.entry-content mark { background: color-mix(in srgb, var(--tannin) 25%, transparent); color: inherit; }

.tags { list-style: none; display: flex; flex-wrap: wrap; gap: .5rem; padding: 0; margin: 2.5rem 0 0; font-family: var(--ui); }
.tags a { display: inline-block; font-size: .85rem; text-decoration: none; padding: .25rem .75rem; border-radius: 1rem; border: 1px solid var(--line); color: var(--text); }
.tags a:hover { border-color: var(--brackish); color: var(--brackish); }
.byline-card { display: flex; gap: 1rem; align-items: flex-start; margin-top: 3rem; padding-top: 1.5rem; border-top: 1px solid var(--line); }
.byline-avatar { display: grid; place-items: center; flex: none; width: 2.8rem; height: 2.8rem; border-radius: 50%; background: var(--ink); color: var(--paper); font: 600 1.1rem var(--ui); text-transform: uppercase; }
.byline-name { font: 600 1rem var(--ui); color: var(--ink); text-decoration: none; }
.byline-card p { margin: .2rem 0 0; color: var(--muted); font-size: 1rem; }
.notice { font: 400 .95rem/1.5 var(--ui); background: color-mix(in srgb, var(--tannin) 12%, var(--surface)); padding: .75rem 1rem; border-radius: 4px; color: var(--text); }

.post-nav { display: grid; grid-template-columns: 1fr 1fr; gap: 2rem; max-width: 46rem; margin: 4rem auto 0; padding-top: 1.5rem; border-top: 1px solid var(--line); }
.post-nav a { font: 600 1.1rem/1.35 var(--serif); color: var(--ink); text-decoration: none; }
.post-nav a:hover { color: var(--brackish); }
.post-nav small { display: block; font: 500 .82rem var(--ui); color: var(--muted); margin-bottom: .3rem; }
.post-nav .next { text-align: right; }

/* ---------- Comments ---------- */
.comments { max-width: 46rem; margin: 4rem auto 0; }
.comments h2 { font: 600 1.5rem/1.3 var(--serif); color: var(--ink); margin: 0 0 1rem; }
.comments h3 { font: 600 1.15rem/1.3 var(--serif); color: var(--ink); margin: 0 0 .25rem; }
.comment-list, .children { list-style: none; padding: 0; margin: 0; }
.children { margin: .5rem 0 0 1.25rem; padding-left: 1.25rem; border-left: 1px solid var(--root); }
.comment { padding: 1.25rem 0; border-top: 1px solid var(--line); }
.children .comment { border-top: 0; padding: .9rem 0 0; }
.comment-meta { display: flex; gap: .75rem; align-items: baseline; font: 400 .9rem var(--ui); }
.comment-meta strong { color: var(--ink); font-weight: 600; }
.comment-meta strong a { color: inherit; }
.comment-meta time { color: var(--muted); font-size: .84rem; }
.comment-body { font-size: 1.02rem; }
.comment-body p { margin: .35rem 0; }
.reply { font: 500 .85rem var(--ui); text-decoration: none; }
.respond { margin-top: 2.5rem; padding: 1.6rem; background: var(--surface); border: 1px solid var(--line); border-radius: 6px; }
.replying { font: 400 .9rem var(--ui); color: var(--muted); }

/* ---------- Forms ---------- */
input:not([type=checkbox]):not([type=radio]):not([type=hidden]), textarea, select {
    width: 100%; font: 400 1rem/1.4 var(--ui); padding: .65rem .8rem; color: var(--text);
    background: var(--paper); border: 1px solid #c9d1ca; border-radius: 4px;
}
@media (prefers-color-scheme: dark) { input:not([type=checkbox]):not([type=radio]):not([type=hidden]), textarea, select { border-color: var(--line); } }
input:focus, textarea:focus, select:focus { outline: none; border-color: var(--brackish); box-shadow: 0 0 0 3px color-mix(in srgb, var(--brackish) 18%, transparent); }
textarea { font-family: var(--serif); font-size: 1.02rem; line-height: 1.6; resize: vertical; }
label { display: block; font: 600 .9rem var(--ui); color: var(--ink); margin: 1rem 0 .35rem; }
label small { font-weight: 400; color: var(--muted); }
.button, button[type=submit]:not(.linklike) {
    display: inline-flex; align-items: center; justify-content: center; height: 2.75rem; padding: 0 1.4rem;
    font: 600 .95rem var(--ui); color: var(--paper); background: var(--ink); border: 1px solid var(--ink); border-radius: 4px;
    cursor: pointer; text-decoration: none; white-space: nowrap;
}
.button:hover, button[type=submit]:not(.linklike):hover { background: var(--brackish); border-color: var(--brackish); color: var(--paper); }
.button.ghost { background: transparent; color: var(--ink); border-color: var(--line); }
.button.ghost:hover { border-color: var(--ink); background: transparent; color: var(--ink); }
.comment-form button[type=submit] { margin-top: 1.25rem; }
.comment-form .row { display: grid; grid-template-columns: 1fr 1fr; gap: 0 1rem; }
@media (max-width: 600px) { .comment-form .row { grid-template-columns: 1fr; } }
.hp { position: absolute; left: -9999px; }

/* ---------- Footer ---------- */
.site-footer { border-top: 1px solid var(--line); background: var(--surface); font-family: var(--ui); font-size: .93rem; }
.footer-grid { display: grid; grid-template-columns: 1.4fr 1fr 1fr; gap: 2.5rem; padding-top: 3rem; padding-bottom: 2.5rem; }
.footer-title { font: 600 1.35rem var(--serif); color: var(--ink); text-decoration: none; }
.footer-about p { color: var(--muted); margin: .5rem 0 0; max-width: 30ch; }
.site-footer h2 { font: 600 .92rem var(--ui); color: var(--ink); margin: .35rem 0 .7rem; }
.site-footer ul { list-style: none; margin: 0; padding: 0; }
.site-footer li { margin: 0 0 .45rem; }
.site-footer li a { color: var(--text); text-decoration: none; }
.site-footer li a:hover { color: var(--brackish); text-decoration: underline; }
.footer-base { display: flex; gap: 1rem 2rem; flex-wrap: wrap; align-items: center; padding-top: 1.2rem; padding-bottom: 2rem; background: linear-gradient(var(--line), var(--line)) top center / calc(100% - 3rem) 1px no-repeat; color: var(--muted); font-size: .85rem; }
.footer-base p { margin: 0; flex: 1; }
.footer-base a, .menu-footer a { color: var(--muted); text-decoration: none; }
.footer-base a:hover { color: var(--ink); text-decoration: underline; }
@media (max-width: 760px) { .footer-grid { grid-template-columns: 1fr; gap: 1.75rem; } }
@media (max-width: 640px) {
    .masthead { padding-top: 1.8rem; }
    .site-nav { width: 100%; justify-content: space-between; }
    .nav-search input, .nav-search input:focus { width: 8rem; }
    .wrap { padding-left: 1rem; padding-right: 1rem; }
    .site-main { padding-top: 2rem; }
}

/* ---------- Table pages & notice boards ---------- */
.entry-wide { max-width: none; }
.entry-wide .entry-head h1 { max-width: 24ch; }
.data-search { display: flex; gap: .6rem; align-items: center; flex-wrap: wrap; margin: 0 0 1.25rem; max-width: 34rem; }
.data-search input { flex: 1; min-width: 12rem; }
.data-search .clear { font: 500 .9rem var(--ui); }
.data-scroll { overflow-x: auto; border: 1px solid var(--line); border-radius: 6px; background: var(--surface); }
.data-table table { width: 100%; border-collapse: collapse; font: 400 .97rem/1.45 var(--ui); }
.data-table table.fixed { table-layout: fixed; }
.data-table th { text-align: left; font-weight: 600; color: var(--ink); background: color-mix(in srgb, var(--brackish) 7%, var(--surface)); padding: .8rem 1rem; border-bottom: 1px solid var(--line); }
.data-table td { padding: .7rem 1rem; border-bottom: 1px solid var(--line); vertical-align: middle; overflow-wrap: anywhere; }
.data-table tbody tr:last-child td { border-bottom: 0; }
.data-table tbody tr:hover td { background: color-mix(in srgb, var(--brackish) 4%, var(--surface)); }
.data-table .t-serial { width: 4.5rem; color: var(--muted); font-variant-numeric: tabular-nums; }
.data-table .t-number { text-align: right; font-variant-numeric: tabular-nums; }
.data-table .t-image img { display: block; width: 56px; height: 56px; object-fit: cover; border-radius: 50%; }
.data-table td a { text-decoration: none; font-weight: 500; }
.data-table td a:hover { text-decoration: underline; }
.data-table .t-phone { white-space: nowrap; }
.data-foot { display: flex; flex-wrap: wrap; justify-content: space-between; align-items: center; gap: 1rem; margin-top: 1rem; font: 400 .9rem var(--ui); color: var(--muted); }
.data-pager { display: flex; flex-wrap: wrap; gap: .3rem; align-items: center; }
.data-pager .button { height: 2.3rem; padding: 0 .9rem; }
.pg { display: inline-grid; place-items: center; min-width: 2.3rem; height: 2.3rem; padding: 0 .5rem; border-radius: 4px; color: var(--text); text-decoration: none; font-weight: 500; }
.pg:hover { background: color-mix(in srgb, var(--brackish) 9%, transparent); }
.pg.on { background: var(--ink); color: var(--paper); }
.pg.gap { color: var(--muted); }
@media (max-width: 640px) {
    /* Each row becomes a small card with labels, so nothing scrolls sideways. */
    .data-scroll { border: 0; background: none; overflow: visible; }
    .data-table table, .data-table tbody, .data-table tr, .data-table td { display: block; width: auto !important; }
    .data-table colgroup, .data-table thead { display: none; }
    .data-table tr { background: var(--surface); border: 1px solid var(--line); border-radius: 6px; margin-bottom: .75rem; padding: .4rem 0; }
    .data-table td { display: grid; grid-template-columns: 7.5rem minmax(0, 1fr); gap: .75rem; padding: .4rem .9rem; border: 0; text-align: left !important; }
    .data-table td::before { content: attr(data-label); color: var(--muted); font-size: .85rem; }
    .data-table td.is-empty { display: none; }
    .data-table tbody tr:hover td { background: none; }
}

.notice-list { list-style: none; margin: 0; padding: 0; border-top: 1px solid var(--line); }
.notice-item { display: grid; grid-template-columns: 5.5rem minmax(0, 1fr) auto; gap: 1.5rem; align-items: start; padding: 1.4rem 0; border-bottom: 1px solid var(--line); }
.notice-date { display: flex; flex-direction: column; align-items: center; padding: .5rem .25rem .55rem; border: 1px solid var(--line); border-radius: 6px; background: var(--surface); font: 500 .78rem/1.2 var(--ui); color: var(--muted); text-align: center; }
.notice-date b { font: 600 1.6rem/1.1 var(--serif); color: var(--ink); }
.notice-item.pinned .notice-date { border-color: var(--tannin); }
.pinned-label { display: inline-block; font: 600 .8rem var(--ui); color: var(--tannin); margin-bottom: .2rem; }
.notice-title { font: 600 1.3rem/1.3 var(--serif); margin: 0 0 .5rem; letter-spacing: -.01em; }
.notice-title a { color: var(--ink); text-decoration: none; }
.notice-title a:hover { color: var(--brackish); text-decoration: underline; text-decoration-thickness: 1px; }
.file-chips { list-style: none; display: flex; flex-wrap: wrap; gap: .4rem; margin: 0; padding: 0; }
.file-chips a { display: inline-flex; align-items: center; gap: .45rem; max-width: 22rem; padding: .25rem .65rem .25rem .3rem; border: 1px solid var(--line); border-radius: 4px; font: 400 .85rem var(--ui); color: var(--text); text-decoration: none; overflow: hidden; white-space: nowrap; text-overflow: ellipsis; }
.file-chips a:hover { border-color: var(--brackish); color: var(--ink); }
.ext { display: inline-grid; place-items: center; flex: none; min-width: 2.4rem; height: 1.45rem; padding: 0 .3rem; border-radius: 3px; background: var(--ink); color: var(--paper); font: 700 .66rem var(--ui); letter-spacing: .02em; }
.notice-more { align-self: center; }
@media (max-width: 640px) {
    .notice-item { grid-template-columns: 4.2rem minmax(0, 1fr); gap: 1rem; }
    .notice-more { grid-column: 2; justify-self: start; height: 2.3rem; }
}

.crumb { font: 500 .9rem var(--ui); margin: 0 0 .8rem; }
.crumb a { text-decoration: none; }
.downloads { margin-top: 2.5rem; padding-top: 1.5rem; border-top: 1px solid var(--line); }
.downloads h2 { font: 600 1.15rem var(--serif); color: var(--ink); margin: 0 0 1rem; }
.downloads ul { list-style: none; margin: 0; padding: 0; }
.downloads li { display: flex; align-items: center; gap: .9rem; padding: .8rem 1rem; margin-bottom: .6rem; border: 1px solid var(--line); border-radius: 6px; background: var(--surface); }
.downloads .ext { min-width: 3rem; height: 2rem; font-size: .72rem; }
.dl-name { flex: 1; min-width: 0; font: 500 .97rem/1.35 var(--ui); color: var(--ink); overflow-wrap: anywhere; }
.dl-name small { display: block; color: var(--muted); font-weight: 400; font-size: .82rem; }
.downloads .button { height: 2.4rem; padding: 0 1rem; }
.back { margin-top: 2.5rem; font: 500 .95rem var(--ui); }
@media (max-width: 560px) { .downloads li { flex-wrap: wrap; } .dl-name { flex-basis: calc(100% - 4rem); } }


/* ---------- Dropdown menus ---------- */
.site-nav .menu > li { position: relative; display: flex; align-items: center; }
.sub-toggle { display: inline-grid; place-items: center; width: 1.4rem; height: 1.4rem; margin-left: .15rem; padding: 0; border: 0; border-radius: 3px; background: none; color: var(--muted); cursor: pointer; }
.sub-toggle:hover { color: var(--ink); background: color-mix(in srgb, var(--brackish) 10%, transparent); }
.sub-toggle svg { transition: transform .15s; }
li.open > .sub-toggle svg { transform: rotate(180deg); }
.sub-menu { list-style: none; margin: 0; padding: .4rem; position: absolute; z-index: 30; top: calc(100% + .35rem); left: -.6rem; min-width: 14rem; background: var(--surface); border: 1px solid var(--line); border-radius: 8px; box-shadow: 0 12px 32px rgba(10, 30, 25, .14); display: none; }
.sub-menu::before { content: ""; position: absolute; left: 0; right: 0; top: -.5rem; height: .5rem; } /* keeps hover alive across the gap */
.site-nav li:hover > .sub-menu, .site-nav li:focus-within > .sub-menu, .site-nav li.open > .sub-menu { display: block; }
.sub-menu li { position: relative; display: flex; align-items: center; }
.site-nav .sub-menu a { display: block; flex: 1; padding: .5rem .7rem; border: 0; border-radius: 5px; font-size: .95rem; font-weight: 500; color: var(--text); white-space: nowrap; }
.site-nav .sub-menu a:hover, .site-nav .sub-menu .current > a { background: color-mix(in srgb, var(--brackish) 9%, transparent); color: var(--ink); border: 0; }
.sub-menu .sub-toggle { transform: rotate(-90deg); margin-right: .2rem; }
.sub-menu .sub-menu { top: -.45rem; left: calc(100% + .3rem); }
.sub-menu .sub-menu::before { left: -.5rem; top: 0; bottom: 0; width: .5rem; height: auto; }
.site-nav .menu .current-branch > a { color: var(--ink); }
@media (max-width: 640px) {
    .site-nav .menu { flex-direction: column; align-items: flex-start; gap: .15rem; width: 100%; }
    .site-nav .menu > li { flex-wrap: wrap; width: 100%; }
    .sub-menu, .sub-menu .sub-menu { position: static; box-shadow: none; border: 0; border-left: 1px solid var(--line); border-radius: 0; margin: .2rem 0 .4rem .4rem; padding: 0 0 0 .6rem; min-width: 0; width: 100%; background: transparent; }
    .sub-toggle { width: 2.2rem; height: 2.2rem; margin-left: .3rem; border: 1px solid var(--line); border-radius: 6px; }
    .sub-menu::before { display: none; }
    .site-nav li:hover > .sub-menu, .site-nav li:focus-within > .sub-menu { display: none; }
    .site-nav li.open > .sub-menu { display: block; }
    .sub-menu .sub-toggle { transform: none; }
    .site-nav .sub-menu a { white-space: normal; padding: .35rem .4rem; }
}
/* The footer menu shows every level as a plain row of links. */
.menu-footer .sub-toggle { display: none; }
.menu-footer .sub-menu { display: contents; list-style: none; }
.menu-footer li { display: contents; }
.menu-footer a { margin-right: 1.2rem; }
