/* Public editorial design. Loaded after the shared application styles. */
:root {
    --bg: #faf9f6;
    --bg2: #f1f0ec;
    --hover: #f3f1ed;
    --paper: #fff;
    --text: #202427;
    --text2: #5f666a;
    --text3: #7b8285;
    --line: #dddfdc;
    --accent: #c83c32;
    --accent-h: #a92e27;
    --card: #fff;
}

[data-theme="dark"] {
    --bg: #171a1c;
    --bg2: #222729;
    --hover: #272d2f;
    --paper: #1c2022;
    --text: #f1f0ec;
    --text2: #b7bdbd;
    --text3: #929b9d;
    --line: #394043;
    --accent: #ef7164;
    --accent-h: #fa9187;
    --card: #1c2022;
}

html { scroll-behavior: smooth; }
body { background: var(--bg); color: var(--text); }
a, button, input, textarea { -webkit-tap-highlight-color: transparent; }
a:focus-visible, button:focus-visible, input:focus-visible, textarea:focus-visible {
    outline: 2px solid var(--accent);
    outline-offset: 3px;
}
.sr-only { position: absolute; width: 1px; height: 1px; padding: 0; margin: -1px; overflow: hidden; clip: rect(0,0,0,0); white-space: nowrap; border: 0; }

/* Masthead */
.site-header { height: auto; position: relative; top: auto; z-index: 100; background: var(--paper); border-bottom: 1px solid var(--line); }
.header-top { border-bottom: 1px solid var(--line); }
.header-top-inner, .header-main-inner, .main-nav { max-width: 1240px; margin: 0 auto; padding-left: 32px; padding-right: 32px; }
.header-top-inner { min-height: 36px; display: flex; justify-content: space-between; align-items: center; gap: 16px; }
.edition-date, .edition-links { font-size: 11px; font-weight: 600; letter-spacing: .035em; color: var(--text3); }
.edition-links { display: flex; align-items: center; gap: 18px; }
.edition-links a:hover, .edition-links .link-btn:hover { color: var(--accent); }
.edition-links .link-btn { color: inherit; font-size: inherit; font-weight: inherit; }
.edition-links .user-name { font-size: 11px; padding: 0; max-width: 140px; background: none; color: var(--text2); }
.header-main { border-bottom: 1px solid var(--line); }
.header-main-inner { min-height: 86px; display: flex; align-items: center; gap: 26px; }
.logo { font-family: Inter, sans-serif; font-size: 39px; font-weight: 800; line-height: 1; letter-spacing: -.075em; color: var(--text); }
.logo span, .footer-dot { color: var(--accent); }
.brand-caption { border-left: 1px solid var(--line); padding-left: 22px; color: var(--text3); font-size: 10px; font-weight: 700; letter-spacing: .15em; white-space: nowrap; }
.header-actions { margin-left: auto; gap: 8px; }
.header-actions .icon-btn { width: 38px; height: 38px; padding: 8px; border-radius: 50%; color: var(--text); }
.header-actions .icon-btn:hover { border-color: var(--line); background: var(--bg2); }
.nav-shell { background: var(--paper); }
.main-nav { height: 48px; display: flex; align-items: stretch; gap: 32px; flex: none; overflow-x: auto; overflow-y: hidden; scrollbar-width: none; }
.main-nav a { display: inline-flex; align-items: center; padding: 2px 0 0; border-bottom: 2px solid transparent; font-size: 13px; font-weight: 700; color: var(--text2); }
.main-nav a:hover, .main-nav a.on { color: var(--text); border-bottom-color: var(--accent); }
.nav-toggle { display: none; }

.container { max-width: 1240px; padding-left: 32px; padding-right: 32px; }
.eyebrow { display: block; color: var(--accent); font-size: 11px; font-weight: 800; letter-spacing: .14em; text-transform: uppercase; }
.cat-label { color: var(--accent); font-size: 11px; font-weight: 800; letter-spacing: .08em; text-transform: uppercase; }
.cat-label.small { font-size: 10px; }
.row-head { display: flex; align-items: center; gap: 12px; }
.row-head .time, .hero-kicker time { color: var(--text3); font-size: 11px; font-weight: 600; }

/* Breaking news strip */
.breaking { max-width: none; min-height: 48px; padding: 9px max(32px, calc((100vw - 1176px) / 2)); gap: 18px; background: var(--paper); border-bottom: 1px solid var(--line); font-size: 13px; }
.breaking-label { flex: none; padding: 4px 7px; background: var(--accent); color: #fff; font-size: 10px; font-weight: 800; letter-spacing: .1em; }
.breaking-slot { min-width: 0; min-height: 1.5em; }
.breaking-item { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; font-weight: 600; }
.breaking-item:hover { color: var(--accent); }

/* Front page */
.home-page { padding-top: 32px; }
.now-block { justify-content: space-between; align-items: end; gap: 24px; padding: 0 0 24px; margin-bottom: 28px; border-bottom: 3px solid var(--text); }
.page-title { margin-top: 5px; font-family: 'IBM Plex Serif', Georgia, serif; font-size: clamp(34px, 3.4vw, 46px); line-height: 1.12; font-weight: 600; letter-spacing: -.035em; }
.update-indicator { display: flex; align-items: center; gap: 8px; padding-bottom: 5px; color: var(--text3); font-size: 12px; white-space: nowrap; }
.update-dot { width: 7px; height: 7px; border-radius: 50%; background: var(--accent); }
.category-tools { display: flex; align-items: center; gap: 18px; flex-wrap: wrap; margin: -8px 0 25px; }
.back-link { color: var(--text2); font-size: 13px; font-weight: 600; }
.back-link:hover { color: var(--accent); }
.category-tools .subscribe-btn { margin: 0; padding: 6px 12px; font-size: 12px; }

.hero-grid { grid-template-columns: minmax(0, 1.9fr) minmax(300px, 1fr); gap: 38px; padding-bottom: 42px; border-bottom: 1px solid var(--line); }
.hero { display: block; min-width: 0; }
.hero-media { overflow: hidden; background: var(--bg2); aspect-ratio: 16/9; }
.hero-media img, .hero img { display: block; width: 100%; height: 100%; aspect-ratio: auto; object-fit: cover; border-radius: 0; margin: 0; transition: transform .3s ease; }
.hero:hover .hero-media img { transform: scale(1.025); opacity: 1; }
.hero-kicker { margin: 20px 0 9px; }
.hero h2 { font-family: 'IBM Plex Serif', Georgia, serif; font-size: clamp(30px, 3.2vw, 45px); font-weight: 600; letter-spacing: -.035em; line-height: 1.13; }
.hero:hover h2, .feed-row:hover .feed-title, .latest-item:hover .title, .digest-row:hover .title { color: var(--accent); }
.hero .lead-text { max-width: 65ch; margin-top: 13px; color: var(--text2); font-size: 15px; line-height: 1.6; }
.read-link { display: inline-flex; gap: 9px; align-items: center; margin-top: 17px; padding-bottom: 3px; border-bottom: 1px solid var(--accent); color: var(--accent); font-size: 12px; font-weight: 700; }
.latest-col { border-left: 1px solid var(--line); padding-left: 30px; gap: 0; }
.latest-heading { display: flex; align-items: baseline; justify-content: space-between; gap: 12px; padding-bottom: 14px; border-bottom: 2px solid var(--text); }
.latest-heading .section-title { font-family: 'IBM Plex Serif', Georgia, serif; font-size: 19px; font-weight: 600; letter-spacing: -.02em; text-transform: none; }
.latest-heading a { color: var(--text3); font-size: 11px; white-space: nowrap; }
.latest-heading a:hover { color: var(--accent); }
.latest-item.with-thumb { display: grid; grid-template-columns: minmax(0, 1fr) 86px; gap: 14px; align-items: start; padding: 17px 0; border-bottom: 1px solid var(--line); }
.latest-item:last-child { border-bottom: 0; }
.latest-main { gap: 7px; }
.latest-item .title { font-family: 'IBM Plex Serif', Georgia, serif; font-size: 16px; font-weight: 600; line-height: 1.33; }
.latest-thumb { width: 86px; height: 68px; aspect-ratio: auto; border-radius: 0; background: var(--bg2); }

.digest { display: grid; grid-template-columns: 210px minmax(0, 1fr); gap: 30px; margin-top: 36px; padding: 27px 30px; background: var(--bg2); border: 0; }
.digest-heading .big-title { margin-top: 7px; font-size: 23px; }
.digest-list { min-width: 0; }
.digest-row { display: grid; grid-template-columns: 28px minmax(0, 1fr) auto; align-items: baseline; gap: 14px; padding: 10px 0; border-top: 1px solid var(--line); }
.digest-row:first-child { border-top: 0; }
.digest-row:hover { background: none; }
.digest-row .num { font-size: 11px; font-weight: 600; }
.digest-row .title { font-family: 'IBM Plex Serif', Georgia, serif; font-size: 16px; font-weight: 600; line-height: 1.35; }
.digest-row .read { color: var(--text3); font-size: 11px; }

/* Article feed */
.feed { padding-top: 43px; scroll-margin-top: 18px; }
.feed-heading { padding-bottom: 15px; border-bottom: 2px solid var(--text); }
.big-title { font-family: 'IBM Plex Serif', Georgia, serif; font-size: clamp(25px, 2.5vw, 32px); font-weight: 600; letter-spacing: -.03em; }
.feed-heading .big-title { margin-top: 4px; margin-bottom: 0; }
.filters { display: flex; flex-wrap: nowrap; gap: 25px; overflow-x: auto; scrollbar-width: thin; margin: 0 0 4px; border-bottom: 1px solid var(--line); }
.filter { flex: none; display: inline-flex; align-items: center; padding: 13px 0 11px; border: 0; border-bottom: 2px solid transparent; border-radius: 0; background: none; color: var(--text2); font-size: 12px; font-weight: 700; white-space: nowrap; }
.filter:hover { color: var(--accent); background: none; }
.filter.on, .filter.filter-sub.on { color: var(--text); border: 0; border-bottom: 2px solid var(--accent); background: none; }
.filter.filter-sub, .filter.subscribed { color: var(--text2); border-color: transparent; background: none; }
.filter.filter-sub:hover, .filter.subscribed:hover { color: var(--accent); }
.feed-row { grid-template-columns: minmax(0, 1fr) 196px; align-items: center; gap: 28px; margin: 0; padding: 23px 0; border-radius: 0; animation: none; }
.feed-row.no-image { grid-template-columns: 1fr; }
.feed-row:hover { background: none; }
.feed-main { gap: 8px; min-width: 0; }
.feed-title { font-family: 'IBM Plex Serif', Georgia, serif; font-size: clamp(20px, 2vw, 25px); font-weight: 600; line-height: 1.25; letter-spacing: -.025em; }
.feed-lead { max-width: 75ch; color: var(--text2); font-size: 14px; line-height: 1.5; display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; }
.thumb { display: block; width: 196px; height: 126px; aspect-ratio: auto; border-radius: 0; background: var(--bg2); }
.empty-state { margin-top: 20px; padding: 30px; background: var(--bg2); color: var(--text2); }
.pager { gap: 9px; margin-top: 28px; }
.pager .filter { min-width: 36px; justify-content: center; padding: 7px 10px; border: 1px solid var(--line); }
.pager .filter.on { border: 1px solid var(--text); background: var(--text); color: var(--paper); }

/* Reading page */
.article-page { grid-template-columns: minmax(0, 760px) minmax(240px, 285px); gap: clamp(35px, 5vw, 76px); justify-content: space-between; padding-top: 30px; }
.article-main { min-width: 0; }
.breadcrumbs { display: flex; align-items: center; gap: 10px; margin-bottom: 42px; color: var(--text3); font-size: 12px; }
.breadcrumbs a:hover { color: var(--accent); }
.article-category { display: inline-block; padding-bottom: 6px; border-bottom: 2px solid var(--accent); }
.article-title { margin: 16px 0 18px; font-family: 'IBM Plex Serif', Georgia, serif; font-size: clamp(35px, 4vw, 52px); font-weight: 600; line-height: 1.13; letter-spacing: -.04em; }
.article-lead { max-width: 65ch; color: var(--text2); font-size: clamp(17px, 1.7vw, 20px); line-height: 1.55; }
.article-meta { display: flex; align-items: center; gap: 13px; flex-wrap: wrap; margin-top: 26px; padding: 18px 0; border-top: 1px solid var(--line); border-bottom: 1px solid var(--line); color: var(--text3); font-size: 12px; }
.article-meta > * + *::before { content: '·'; display: inline-block; margin-right: 13px; color: var(--text3); }
.article-meta-brand { color: var(--text); font-weight: 800; letter-spacing: -.04em; }
.article-cover { margin: 28px 0 30px; }
.article-cover img { display: block; width: 100%; height: auto; aspect-ratio: 16/9; object-fit: cover; border-radius: 0; margin: 0; background: var(--bg2); }
.article-cover figcaption { margin-top: 9px; font-size: 12px; font-style: normal; }
.article-body { max-width: 690px; }
.article-body p { margin: 0 0 22px; font-family: 'IBM Plex Serif', Georgia, serif; font-size: 18px; line-height: 1.78; }
.article-body h2, .article-body h3 { margin: 34px 0 14px; font-family: 'IBM Plex Serif', Georgia, serif; font-weight: 600; line-height: 1.25; }
.article-body h2 { font-size: 27px; }
.article-body h3 { font-size: 22px; }
.article-body a { color: var(--accent); text-decoration: underline; text-underline-offset: 3px; }
.article-body blockquote { padding: 6px 0 6px 20px; border-left: 3px solid var(--accent); color: var(--text2); font-family: 'IBM Plex Serif', Georgia, serif; font-size: 20px; }
.article-side { top: 24px; gap: 0; }
.side-block h4 { margin-bottom: 10px; padding-bottom: 13px; border-bottom: 2px solid var(--text); color: var(--text); font-family: 'IBM Plex Serif', Georgia, serif; font-size: 19px; font-weight: 600; letter-spacing: -.02em; }
.side-news.with-thumb { flex-direction: row; justify-content: space-between; align-items: start; gap: 12px; padding: 16px 0; }
.side-news-main { gap: 6px; font-family: 'IBM Plex Serif', Georgia, serif; font-size: 15px; font-weight: 600; }
.side-news-main .time { font-family: Inter, sans-serif; font-size: 11px; font-weight: 500; }
.side-news .latest-thumb.small { width: 66px; height: 54px; border-radius: 0; }
.reactions-block { display: inline-flex; margin-top: 34px; padding: 10px; border-radius: 0; background: var(--bg2); }
.comments { margin-top: 42px; padding-top: 28px; border-top: 2px solid var(--text); }
.comments h3 { font-family: 'IBM Plex Serif', Georgia, serif; font-size: 25px; font-weight: 600; }
.comment-form textarea { background: var(--paper); color: var(--text); border-radius: 0; }
.comment-form .btn { align-self: flex-start; }
.btn { border-radius: 2px; }

/* Search and footer */
.search-overlay { display: flex; align-items: flex-start; justify-content: center; padding: min(12vh, 110px) 20px 20px; background: rgba(23,26,28,.7); }
.search-overlay.hidden { display: none; }
.search-open { overflow: hidden; }
.search-box { width: 100%; max-width: 700px; padding: 26px 30px 30px; background: var(--paper); box-shadow: 0 20px 60px rgba(0,0,0,.16); }
.search-heading { display: flex; align-items: center; justify-content: space-between; margin-bottom: 16px; font-family: 'IBM Plex Serif', Georgia, serif; font-size: 26px; font-weight: 600; }
.search-heading .icon-btn { font-family: Inter, sans-serif; font-size: 28px; font-weight: 400; }
#search-input { width: 100%; padding: 13px 0; border: 0; border-bottom: 2px solid var(--text); border-radius: 0; background: transparent; color: var(--text); font-family: Inter, sans-serif; font-size: 20px; }
#search-input:focus { border-bottom-color: var(--accent); outline: none; }
.search-help { margin: 10px 0 18px; color: var(--text3); font-size: 12px; }
.search-result-row { padding: 14px 0; border-bottom: 1px solid var(--line); font-family: 'IBM Plex Serif', Georgia, serif; font-size: 17px; }
.search-result-row small { margin-top: 5px; font-family: Inter, sans-serif; font-size: 11px; }
.site-footer { padding: 0; background: var(--paper); border-top: 1px solid var(--line); }
.footer-inner { display: flex; align-items: center; gap: 30px; flex-wrap: wrap; min-height: 128px; padding-top: 24px; padding-bottom: 24px; }
.footer-brand { display: flex; flex-direction: column; gap: 2px; color: var(--text); }
.footer-brand > span { font-size: 25px; font-weight: 800; letter-spacing: -.075em; line-height: 1; }
.footer-brand small { color: var(--text3); font-size: 10px; letter-spacing: .08em; text-transform: uppercase; }
.footer-links { display: flex; gap: 20px; margin-left: auto; font-size: 12px; font-weight: 600; }
.footer-copy { color: var(--text3); font-size: 11px; }

@media (max-width: 1020px) {
    .hero-grid { grid-template-columns: minmax(0, 1.5fr) minmax(260px, 1fr); gap: 26px; }
    .latest-col { padding-left: 24px; }
    .article-page { grid-template-columns: minmax(0, 1fr) 240px; gap: 34px; }
}

@media (max-width: 800px) {
    .header-top-inner, .header-main-inner, .main-nav { padding-left: 20px; padding-right: 20px; }
    .header-main-inner { min-height: 67px; }
    .logo { font-size: 32px; }
    .brand-caption { font-size: 9px; }
    .nav-toggle { display: inline-flex; }
    .nav-shell { border-top: 1px solid var(--line); }
    .main-nav { display: none; height: auto; max-height: 65vh; overflow-y: auto; flex-direction: column; gap: 0; padding-top: 7px; padding-bottom: 10px; }
    .main-nav.open { display: flex; }
    .main-nav a { min-height: 42px; padding: 8px 0; border: 0; font-size: 14px; }
    .main-nav a.on { color: var(--accent); border: 0; }
    .container { padding-left: 20px; padding-right: 20px; }
    .breaking { padding-left: 20px; padding-right: 20px; }
    .hero-grid, .article-page { grid-template-columns: 1fr; }
    .latest-col { margin-top: 6px; padding-left: 0; border-left: 0; }
    .latest-col { display: grid; grid-template-columns: 1fr 1fr; column-gap: 26px; }
    .latest-heading { grid-column: 1 / -1; }
    .article-side { position: static; margin-top: 18px; }
    .side-block { display: grid; grid-template-columns: repeat(2, 1fr); column-gap: 25px; }
    .side-block h4 { grid-column: 1 / -1; }
}

@media (max-width: 580px) {
    .header-top-inner, .header-main-inner, .main-nav { padding-left: 16px; padding-right: 16px; }
    .header-top-inner { min-height: 32px; }
    .edition-links { gap: 12px; }
    .edition-links .user-name, .edition-links a[href*="Rss"] { display: none; }
    .brand-caption { display: none; }
    .header-actions { gap: 2px; }
    .header-actions .icon-btn { width: 36px; height: 36px; }
    .container { padding-left: 16px; padding-right: 16px; }
    .breaking { min-height: 44px; gap: 10px; padding-left: 16px; padding-right: 16px; }
    .breaking-label { font-size: 9px; }
    .breaking-item { font-size: 12px; }
    .home-page { padding-top: 25px; }
    .now-block { align-items: start; flex-direction: column; gap: 10px; padding-bottom: 18px; margin-bottom: 22px; }
    .page-title { font-size: 35px; }
    .hero-grid { gap: 28px; padding-bottom: 30px; }
    .hero h2 { font-size: 31px; }
    .hero .lead-text { font-size: 14px; }
    .latest-col { display: flex; }
    .latest-item.with-thumb { grid-template-columns: minmax(0, 1fr) 76px; }
    .latest-thumb { width: 76px; height: 60px; }
    .digest { grid-template-columns: 1fr; gap: 12px; margin-top: 26px; padding: 20px; }
    .digest-heading .big-title { font-size: 22px; }
    .digest-row { gap: 8px; grid-template-columns: 22px minmax(0, 1fr) auto; }
    .digest-row .title { font-size: 14px; }
    .digest-row .read { font-size: 10px; }
    .feed { padding-top: 32px; }
    .filters { gap: 18px; }
    .feed-row { grid-template-columns: minmax(0, 1fr) 104px; gap: 13px; align-items: start; padding: 19px 0; }
    .feed-title { font-size: 18px; }
    .feed-lead { display: none; }
    .thumb { width: 104px; height: 86px; }
    .article-page { padding-top: 20px; }
    .breadcrumbs { margin-bottom: 30px; }
    .article-title { font-size: 34px; }
    .article-lead { font-size: 17px; }
    .article-meta { gap: 8px; }
    .article-meta > * + *::before { margin-right: 8px; }
    .article-body p { font-size: 17px; }
    .side-block { display: block; }
    .search-overlay { padding: 0; }
    .search-box { min-height: 100dvh; padding: 22px 18px; }
    .footer-inner { align-items: start; gap: 20px; }
    .footer-links { margin-left: 0; width: 100%; }
}

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