:root {
    --red: #c4161c;
    --red-dark: #8d1015;
    --ink: #1b1b1b;
    --muted: #5e584f;
    --paper: #f4efe6;
    --card: #fffdf9;
    --line: #e5d9c8;
    --nav: #9d1218;
    --shadow: 0 1px 0 rgba(0, 0, 0, 0.04);
    font-family: "Nirmala UI", "Mangal", "Segoe UI", sans-serif;
}

* { box-sizing: border-box; }
html { scroll-behavior: smooth; }
body {
    margin: 0;
    color: var(--ink);
    background: var(--paper);
    font-size: 16px;
    line-height: 1.5;
}
a { color: inherit; text-decoration: none; }
img { max-width: 100%; }
button, input { font: inherit; }
.wrap { width: min(1180px, calc(100% - 28px)); margin: 0 auto; }
.skip {
    position: absolute;
    left: -999px;
}
.skip:focus { left: 12px; top: 12px; background: #fff; padding: 8px; z-index: 5; }
.visually-hidden {
    position: absolute;
    width: 1px;
    height: 1px;
    overflow: hidden;
    clip: rect(0 0 0 0);
}

.mast { background: var(--card); border-bottom: 1px solid var(--line); }
.topbar {
    display: flex;
    justify-content: space-between;
    gap: 12px;
    padding: 8px 0 0;
    color: var(--muted);
    font-size: 13px;
}
.today, .tag { margin: 0; }
.brand-row {
    display: flex;
    align-items: center;
    gap: 18px;
    padding: 12px 0 14px;
}
.brand { display: block; min-width: 0; }
.brand img { display: block; width: 234px; max-width: 100%; height: auto; }
.search { position: relative; margin-left: auto; display: flex; }
.search input {
    width: min(280px, 46vw);
    border: 1px solid var(--line);
    border-right: 0;
    padding: 8px 10px;
    background: #fff;
}
.search button, .nav-toggle {
    border: 0;
    background: var(--red);
    color: #fff;
    padding: 8px 14px;
    cursor: pointer;
}
.nav-toggle {
    display: none;
    width: 44px;
    height: 40px;
    margin-left: 8px;
    padding: 10px;
    flex-direction: column;
    justify-content: center;
    gap: 5px;
    background: var(--nav);
}
.nav-toggle-bar {
    display: block;
    height: 2px;
    width: 100%;
    background: #fff;
    border-radius: 1px;
}
.nav-toggle.is-open .nav-toggle-bar:nth-child(1) { transform: translateY(7px) rotate(45deg); }
.nav-toggle.is-open .nav-toggle-bar:nth-child(2) { opacity: 0; }
.nav-toggle.is-open .nav-toggle-bar:nth-child(3) { transform: translateY(-7px) rotate(-45deg); }
.suggest {
    position: absolute;
    top: calc(100% + 4px);
    left: 0;
    right: 0;
    background: #fff;
    border: 1px solid var(--line);
    z-index: 4;
    box-shadow: 0 8px 20px rgba(0, 0, 0, 0.08);
}
.suggest a { display: block; padding: 8px 10px; border-bottom: 1px solid var(--line); }
.suggest a:hover { background: #fff5f5; }

.main-nav {
    display: block;
    clear: both;
    width: 100%;
    background: var(--nav);
    color: #fff;
    text-align: left;
}
.nav-wrap { text-align: left; }
.nav-row, .drop-menu { list-style: none; margin: 0; padding: 0; }
.nav-row {
    display: flex;
    flex-wrap: wrap;
    justify-content: flex-start;
    align-items: stretch;
    text-align: left;
    width: 100%;
    float: none;
}
.nav-row > li { float: none; }
.nav-row > li > a {
    display: block;
    color: #fff;
    padding: 11px 12px;
    font-weight: 650;
    font-size: 15px;
}
.nav-row > li:first-child > a { padding-left: 0; }
.nav-row > li > a:hover,
.nav-row > li:hover > a,
.nav-row > li > a.is-active { background: var(--red-dark); }
.drop { position: relative; }
.nav-row > .drop > a::after { content: " ▾"; font-size: 11px; }
.drop-menu {
    display: none;
    position: absolute;
    top: 100%;
    left: 0;
    min-width: 190px;
    background: #fff;
    color: var(--ink);
    border: 1px solid var(--line);
    z-index: 20;
    box-shadow: 0 8px 18px rgba(0, 0, 0, 0.08);
}
.drop-menu .drop > .drop-menu {
    top: 0;
    left: 100%;
    max-height: 70vh;
    overflow: auto;
}
.drop:hover > .drop-menu,
.drop:focus-within > .drop-menu { display: block; }
.drop-menu a {
    display: block;
    padding: 8px 12px;
    color: var(--ink);
    font-weight: 650;
    font-size: 15px;
    white-space: nowrap;
}
.drop-menu a:hover,
.drop-menu a.is-active { background: #fff1f1; color: var(--red); }
.drop-menu .drop > a::after { content: " ›"; }

main.wrap { padding: 16px 0 36px; }

.cat-menu {
    margin: 0 0 18px;
    background: #fff;
    border: 1px solid var(--line);
}
.cat-menu ul { list-style: none; margin: 0; padding: 0; }
.cat-menu > ul {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    justify-content: flex-start;
    gap: 8px;
    padding: 10px 12px;
}
.cat-menu > ul > li > a {
    display: inline-block;
    background: #fff1f1;
    color: var(--red);
    font-weight: 650;
    padding: 6px 10px;
}
.cat-menu > ul > li > a:hover { background: var(--red); color: #fff; }
.cat-menu > ul > li.has-sub { flex: 1 1 100%; }
.cat-menu > ul > li.has-sub > a {
    display: block;
    background: transparent;
    color: var(--ink);
    padding: 4px 0;
}
.cat-menu > ul > li.has-sub > a:hover { background: transparent; color: var(--red); }
.cat-menu li.has-sub > ul {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
    padding: 10px 12px 12px;
}
.cat-menu li li > a {
    display: inline-block;
    margin: 0;
    padding: 6px 10px;
    background: #fff1f1;
    color: var(--red);
    font-weight: 650;
}
.cat-menu li li > a:hover { background: var(--red); color: #fff; }
.cat-menu li li.has-sub > a { display: block; margin: 8px 0 0; background: transparent; color: var(--ink); padding: 4px 0; }
.cat-menu li li.has-sub > a:hover { background: transparent; color: var(--red); }

.breaking {
    display: flex;
    align-items: stretch;
    background: #fff;
    border: 1px solid var(--line);
    margin-bottom: 16px;
    overflow: hidden;
}
.breaking-label {
    background: var(--red);
    color: #fff;
    font-weight: 700;
    padding: 8px 12px;
    flex: 0 0 auto;
}
.ticker { overflow: hidden; flex: 1; }
.ticker-move {
    display: flex;
    gap: 28px;
    width: max-content;
    padding: 8px 0;
    animation: tick 48s linear infinite;
}
.ticker:hover .ticker-move { animation-play-state: paused; }
.ticker a { white-space: nowrap; }
.ticker a::before { content: "•"; color: var(--red); margin-right: 8px; }
@keyframes tick {
    from { transform: translateX(0); }
    to { transform: translateX(-50%); }
}

.hero {
    display: grid;
    grid-template-columns: 1.5fr 1fr;
    gap: 14px;
    margin-bottom: 18px;
}
.hero-lead, .hero-side article, .block, .story-row {
    background: var(--card);
    border: 1px solid var(--line);
    box-shadow: var(--shadow);
}
.hero-lead a, .hero-side a, .feature, .card a, .mini-list a, .story-row a { display: block; color: inherit; }
.hero-photo, .hero-photo img { height: 340px; }
.hero-photo, .side-photo, .feature-photo, .card-img, .mini-photo, .row-photo, .article-photo, .no-photo {
    display: block;
    background: linear-gradient(145deg, #f7ecec, #e7d4d4);
    overflow: hidden;
}
.hero-photo img, .side-photo img, .feature-photo img, .card-img img, .mini-photo img, .row-photo img, .article-photo img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    display: block;
}
img.broken { display: none; }
.hero-copy { padding: 12px 14px 16px; }
.hero-copy h1 { margin: 6px 0 8px; font-size: 30px; line-height: 1.3; }
.hero-copy p { margin: 0 0 8px; color: var(--muted); }
.kicker, .story-row small, .hero-side small {
    color: var(--red);
    font-weight: 700;
    font-size: 13px;
}
.hero-side { display: grid; grid-template-rows: repeat(4, minmax(0, 1fr)); gap: 10px; }
.hero-side a { display: grid; grid-template-columns: 118px 1fr; gap: 10px; align-items: center; height: 100%; padding: 8px; }
.side-photo, .side-photo img { height: 78px; }
.hero-side span { font-weight: 700; line-height: 1.35; }
.hero-side small { display: block; }

.home-grid {
    display: grid;
    grid-template-columns: minmax(0, 1.65fr) minmax(270px, 0.9fr);
    gap: 18px;
    align-items: start;
}
.block { margin-bottom: 16px; padding: 0 0 8px; }
.block-head {
    display: flex;
    justify-content: space-between;
    align-items: center;
    gap: 8px;
    margin: 0 12px;
    padding: 10px 0 8px;
    border-bottom: 3px solid var(--red);
}
.block-head h2 { margin: 0; font-size: 22px; }
.more { color: var(--red); font-size: 14px; font-weight: 700; }
.feature { padding: 12px; }
.feature-photo, .feature-photo img { height: 210px; }
.feature span, .feature strong { display: block; margin-top: 8px; font-size: 20px; line-height: 1.35; }
.feature em, .story-row em { display: block; margin-top: 6px; color: var(--muted); font-style: normal; font-size: 15px; font-weight: 400; }
.feature-compact strong { font-size: 17px; }
.feature-compact .feature-photo, .feature-compact .feature-photo img { height: 150px; }
.text-list, .mini-list, .rashi-grid { list-style: none; margin: 0; padding: 0 12px; }
.text-list li { border-bottom: 1px solid var(--line); }
.text-list a { display: block; padding: 9px 0 9px 14px; position: relative; font-weight: 650; }
.text-list.with-thumbs a { display: grid; grid-template-columns: 96px 1fr; gap: 8px; align-items: center; padding: 8px 0; }
.text-list.with-thumbs a::before { content: none; }
.text-list.with-thumbs .side-photo, .text-list.with-thumbs .side-photo img { height: 64px; }
.text-list.with-thumbs span { font-weight: 650; line-height: 1.35; }
.mini-list a:has(.side-photo) { display: grid; grid-template-columns: 84px 1fr; gap: 8px; align-items: center; }
.mini-list .side-photo, .mini-list .side-photo img { height: 56px; margin: 0; }
.text-list a::before {
    content: "";
    width: 7px;
    height: 7px;
    background: var(--red);
    position: absolute;
    left: 0;
    top: 16px;
}
.cards { display: grid; grid-template-columns: repeat(3, 1fr); gap: 12px; padding: 12px; }
.card-photo { position: relative; display: block; }
.card-img, .card-img img { height: 140px; }
.card strong { display: block; margin-top: 8px; line-height: 1.35; }
.play {
    position: absolute;
    left: 10px;
    bottom: 10px;
    width: 28px;
    height: 28px;
    border-radius: 50%;
    background: var(--red);
}
.play::after {
    content: "";
    position: absolute;
    left: 11px;
    top: 8px;
    border-style: solid;
    border-width: 6px 0 6px 9px;
    border-color: transparent transparent transparent #fff;
}
.pair { display: grid; grid-template-columns: 1fr 1fr; gap: 14px; }
.mini-list li + li { border-top: 1px solid var(--line); }
.mini-list a { padding: 10px 0; font-weight: 650; line-height: 1.35; }
.mini-photo, .mini-photo img { height: 140px; margin-bottom: 8px; }
.facts { display: grid; grid-template-columns: 1fr 1fr; gap: 8px; margin: 12px; }
.facts div { background: #fff7f2; border: 1px solid var(--line); padding: 8px; }
.facts dt { color: var(--muted); font-size: 12px; }
.facts dd { margin: 2px 0 0; font-weight: 700; }
.widget-note { margin: 0 12px 8px; color: var(--muted); font-size: 13px; }
.day-panel { background: var(--card); border: 1px solid var(--line); padding: 12px 12px 4px; margin: 0 0 16px; }
.panchang-head-date { margin-left: auto; font-weight: 700; }
.panchang-pick { display: flex; flex-wrap: wrap; gap: 8px; align-items: end; margin: 0 0 12px; }
.panchang-pick input, .panchang-pick button { font: inherit; padding: 6px 8px; }
.panchang-sheet { max-width: 100%; }
.day-panel .panchang-sheet { display: grid; grid-template-columns: 1fr 1fr; gap: 2px 24px; }
.panchang-sheet p { margin: 0; line-height: 1.65; overflow-wrap: anywhere; }
.day-panel .panchang-sheet p.is-wide { grid-column: 1 / -1; }
.panchang-more { display: flex; justify-content: flex-end; margin: 8px 12px; }
.panchang-more a { background: var(--red); color: #fff; font-weight: 700; padding: 8px 12px; }
@media (max-width: 720px) {
    .day-panel .panchang-sheet { grid-template-columns: 1fr; }
}
.day-panel h2 { margin: 0 0 8px; font-size: 22px; }
.corner-tools { position: fixed; right: 14px; bottom: 14px; z-index: 30; display: flex; flex-direction: column; gap: 8px; }
.corner-tools a { background: var(--red); color: #fff; font-weight: 700; padding: 8px 12px; box-shadow: 0 2px 8px rgba(0, 0, 0, .2); }
.rashi-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 8px; padding-bottom: 12px; }
.rashi-grid li { background: #fff7f2; border: 1px solid var(--line); }
.rashi-grid a { display: block; padding: 8px; color: inherit; }
.rashi-grid strong { display: block; color: var(--red); }
.rashi-grid span {
    display: -webkit-box;
    -webkit-line-clamp: 5;
    -webkit-box-orient: vertical;
    overflow: hidden;
    font-size: 13px;
    color: var(--muted);
}
.rashi-detail p { margin: 0 0 8px; }
.rashi-head { color: var(--red); font-weight: 700; }

.page-title { margin: 4px 0 14px; font-size: 30px; }
.lede, .dek { color: var(--muted); font-size: 18px; }
.story-list { display: grid; gap: 12px; }
.story-row a { display: grid; grid-template-columns: 220px 1fr; gap: 14px; padding: 12px; }
.row-photo, .row-photo img { height: 132px; }
.story-row strong { display: block; font-size: 20px; line-height: 1.35; margin-top: 4px; }
.story-row time, .hero-copy time, .byline time { color: var(--muted); font-size: 13px; }
.pager { display: flex; gap: 14px; align-items: center; margin-top: 16px; }
.pager a { background: var(--red); color: #fff; padding: 8px 12px; }
.article { background: var(--card); border: 1px solid var(--line); padding: 18px 18px 8px; margin-bottom: 16px; }
.article h1 { margin: 8px 0; font-size: 34px; line-height: 1.3; }
.crumbs { color: var(--muted); margin: 0 0 10px; font-size: 14px; }
.crumbs a { color: var(--red); }
.crumb-here { color: var(--ink); }
.byline { display: flex; flex-wrap: wrap; gap: 10px; align-items: center; }
.reporter { font-weight: 700; color: var(--red); }
.article-photo, .article-photo img { max-height: 460px; margin: 8px 0 14px; }
.article-body { font-size: 18px; line-height: 1.75; }
.article-body .body-hit { font-weight: 700; }
.article-body p { display: block; margin: 0 0 16px; }
.title-hit { font-weight: 700; }
.article-body { display: flow-root; }
.article-body img { max-width: 100%; height: auto; }
.article-body img.gh-body { float: left; margin: 2px 14px 6px 0; }
.tag-list a { background: #fff7f2; border: 1px solid var(--line); color: var(--red); padding: 4px 8px; font-size: 13px; }
.share-box { display: flex; align-items: center; gap: 10px; margin: 12px 0 16px; }
.share-label { font-weight: 700; }
.share-menu { display: flex; flex-wrap: wrap; gap: 8px; }
.share-menu a, .share-menu button {
    width: 36px;
    height: 36px;
    padding: 0;
    border: 0;
    border-radius: 4px;
    color: #fff;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
}
.share-menu svg { width: 20px; height: 20px; display: block; }
.share-menu .share-wa { background: #128c7e; }
.share-menu .share-fb { background: #1877f2; }
.share-menu .share-ig { background: #c13584; }
.share-menu .share-x { background: #111; }
.empty, .db-error { padding: 12px; }
.db-error { background: #fff1f1; border: 1px solid #e7b4b4; }

.site-foot { background: #2a2a2a; color: #fff; margin-top: 10px; padding: 25px 0 0; }
.foot-grid { display: grid; grid-template-columns: 1fr 1fr 1fr; gap: 24px; padding-bottom: 18px; }
.foot-logo img { width: 234px; max-width: 100%; height: auto; display: block; }
.site-foot h6 { margin: 0 0 20px; padding: 0 0 5px; border-bottom: 2.4px solid #e64946; color: #fff; font-size: 14px; font-weight: 700; }
.site-foot nav a { display: block; margin: 0 0 8px; color: #f7f7f7; }
.site-foot p { margin: 0; color: #fff; font-size: 13px; line-height: 1.6; }
.copy { color: #999; font-size: 12px; padding: 8px 0 14px; }
.copy a { color: #fff; }
.tag-list { display: flex; flex-wrap: wrap; gap: 8px; margin: 4px 0 12px; }
.contact-form { max-width: 640px; display: grid; gap: 14px; margin: 8px 0 24px; }
.contact-form label { display: grid; gap: 6px; font-weight: 700; }
.contact-form input, .contact-form textarea {
    width: 100%;
    border: 1px solid #ddd;
    background: #f7f7f7;
    padding: 10px 12px;
    font: inherit;
    font-weight: 400;
}
.contact-form textarea { min-height: 160px; resize: vertical; }
.contact-form button {
    justify-self: start;
    border: 0;
    border-radius: 16px;
    background: var(--red);
    color: #fff;
    font: inherit;
    font-weight: 700;
    padding: 8px 18px;
    cursor: pointer;
}
.contact-note { margin: 0 0 12px; padding: 10px 12px; }
.contact-note.ok { background: #eef8ef; }
.contact-note.bad { background: #fff1f0; }
.hp { position: absolute; left: -9999px; }

@media (max-width: 900px) {
    .hero, .home-grid, .pair, .cards, .story-row a, .foot-grid { grid-template-columns: 1fr; }
    .hero-side { grid-template-rows: none; }
    .hero-photo, .hero-photo img { height: 220px; }
    .hero-copy h1, .article h1 { font-size: 24px; }
    .topbar { display: none; }
}

@media (max-width: 768px) {
    .mast { position: relative; }
    .brand-row { flex-wrap: wrap; }
    .brand { flex: 1; width: auto; min-width: 0; }
    .nav-toggle { display: inline-flex; order: 2; }
    .search { order: 3; width: 100%; margin-left: 0; }
    .search input { width: auto; flex: 1; }
    .main-nav { display: none; }
    .main-nav.open {
        display: block;
        position: absolute;
        top: 100%;
        left: 0;
        right: 0;
        z-index: 40;
        max-height: 70vh;
        overflow: auto;
        box-shadow: 0 12px 24px rgba(0, 0, 0, 0.2);
    }
    .nav-row { flex-direction: column; flex-wrap: nowrap; }
    .nav-row > li { width: 100%; }
    .nav-row > li:first-child > a { padding-left: 14px; }
    .nav-row > li > a { border-bottom: 1px solid rgba(255, 255, 255, 0.15); }
    .drop:hover > .drop-menu,
    .drop:focus-within > .drop-menu { display: none; }
    .drop.open > .drop-menu {
        display: block;
        position: static;
        width: 100%;
        min-width: 0;
        max-height: none;
        box-shadow: none;
        border: 0;
        background: #fff;
    }
    .drop.open > .drop-menu a { color: var(--ink); white-space: normal; }
    .drop.open > .drop-menu .drop > .drop-menu { left: auto; top: auto; }
}
