:root {
  --paper: #f4f0e6;
  --sheet: #fbf8f1;
  --ink: #1b1914;
  --muted: #5e584e;
  --line: #d9d0c0;
  --rule: #8d1d22;
  --navy: #1d3557;
  --card: #fffdf8;
  --focus: #1d3557;
  --ok: #1f6b45;
  --shadow: 0 1px 0 rgba(27, 25, 20, 0.04);
  color-scheme: light;
}

html[data-theme="dark"] {
  --paper: #141311;
  --sheet: #1c1b18;
  --ink: #f3efe6;
  --muted: #b7b0a4;
  --line: #3a342c;
  --rule: #e15a4a;
  --navy: #9ec0ea;
  --card: #221f1b;
  --focus: #e7c07a;
  --ok: #8dcea8;
  color-scheme: dark;
}

* { box-sizing: border-box; }
html { overflow-x: clip; }
body {
  margin: 0;
  background: var(--paper);
  color: var(--ink);
  font-family: "Source Sans 3", "Segoe UI", sans-serif;
  font-size: 18px;
  line-height: 1.55;
}
a { color: inherit; }
a:hover { color: var(--rule); }
:focus-visible {
  outline: 2px solid var(--focus);
  outline-offset: 3px;
}
.skip {
  position: absolute;
  left: 12px;
  top: -40px;
  background: var(--ink);
  color: var(--paper);
  padding: 8px 12px;
  z-index: 5;
}
.skip:focus { top: 8px; }
.sr {
  position: absolute;
  width: 1px;
  height: 1px;
  overflow: hidden;
  clip: rect(0 0 0 0);
}
.shell { width: min(1120px, calc(100% - 32px)); margin: 0 auto; }
.mast {
  background: var(--sheet);
  border-bottom: 1px solid var(--line);
}
.mast-bar, .nav {
  width: min(1120px, calc(100% - 32px));
  margin: 0 auto;
}
.mast-bar {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto minmax(220px, 1fr);
  grid-template-areas:
    "date note actions"
    "brand brand search";
  column-gap: 18px;
  row-gap: 16px;
  align-items: end;
  padding: 12px 0 14px;
}
.dateline { grid-area: date; margin: 0; align-self: center; }
.mast-note { grid-area: note; margin: 0; justify-self: center; align-self: center; }
.mast-actions { grid-area: actions; justify-self: end; align-self: center; }
.brand { grid-area: brand; }
.mast-search { grid-area: search; justify-self: end; width: min(100%, 320px); }
.dateline, .mast-note, .subscribe-label {
  color: var(--muted);
  font-size: 13px;
  letter-spacing: 0.04em;
  text-transform: uppercase;
}
.mast-actions {
  display: flex;
  align-items: center;
  gap: 14px;
}
.icon-btn.search-toggle { display: none; }
.tg-icon { display: none; }
.subscribe, .theme-btn, .icon-btn {
  color: var(--muted);
  background: none;
  border: 0;
  font: inherit;
  letter-spacing: inherit;
  text-transform: inherit;
  cursor: pointer;
  padding: 0;
}
.icon-btn {
  width: 40px;
  height: 40px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  color: var(--ink);
}
.icon-btn svg { width: 20px; height: 20px; }
.brand {
  display: flex;
  gap: 14px;
  align-items: center;
  text-decoration: none;
}
.brand-mark {
  width: 18px;
  height: 46px;
  background: linear-gradient(var(--rule) 0 46%, var(--ink) 46% 54%, var(--navy) 54%);
}
.brand strong {
  display: block;
  font-family: "Source Serif 4", Georgia, serif;
  font-size: clamp(32px, 4vw, 52px);
  font-weight: 600;
  letter-spacing: -0.03em;
  line-height: 0.95;
}
.brand em {
  display: block;
  margin-top: 4px;
  font-style: normal;
  letter-spacing: 0.16em;
  text-transform: uppercase;
  font-size: 12px;
  color: var(--muted);
}
.mast-search { display: flex; border-bottom: 2px solid var(--ink); }
.mast-search input {
  flex: 1;
  border: 0;
  background: transparent;
  color: var(--ink);
  font: inherit;
  font-size: 16px;
  padding: 8px 0;
  min-width: 0;
}
.mast-search button, .btn, .cta {
  border: 0;
  background: var(--ink);
  color: var(--paper);
  font: inherit;
  font-size: 15px;
  font-weight: 600;
  padding: 8px 14px;
  cursor: pointer;
  text-decoration: none;
}
.btn.quiet, .theme-btn { background: transparent; color: var(--ink); border: 1px solid var(--line); }
.nav {
  display: flex;
  gap: 6px 18px;
  overflow-x: auto;
  padding: 0 0 12px;
  border-top: 1px solid var(--ink);
}
.nav-link {
  text-decoration: none;
  white-space: nowrap;
  padding: 10px 0 4px;
  font-size: 15px;
  font-weight: 600;
  border-bottom: 2px solid transparent;
}
.nav-link span {
  margin-left: 6px;
  color: var(--muted);
  font-weight: 500;
  font-variant-numeric: tabular-nums;
}
.nav-link.is-active { border-color: var(--rule); }
main.shell { padding: 28px 0 64px; }
.front {
  display: block;
  padding-bottom: 28px;
  border-bottom: 3px solid var(--ink);
}
.front .lead { max-width: 860px; }
.latest { border-left: 0; padding-left: 0; margin-top: 22px; }
.latest ol {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
  gap: 4px 22px;
}
.kicker, .eyebrow {
  margin: 0 0 8px;
  color: var(--rule);
  font-size: 13px;
  font-weight: 700;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}
.kicker a { text-decoration: none; }
.lead h1, .story h1, .hero h1, .find-hero h1, .desk-head h1 {
  font-family: "Source Serif 4", Georgia, serif;
  font-weight: 600;
  letter-spacing: -0.03em;
  line-height: 1.08;
  margin: 0 0 12px;
}
.lead h1 { font-size: clamp(34px, 4.6vw, 58px); }
.lead h1 a, .story h1 { text-decoration: none; }
.dek { font-size: 20px; line-height: 1.45; margin: 0 0 14px; }
.meta, .byline { color: var(--muted); font-size: 14px; display: flex; gap: 10px; flex-wrap: wrap; }
.latest h2, .rubric-head h2, .related h2 {
  font-family: "Source Serif 4", Georgia, serif;
  font-size: 22px;
  margin: 0 0 8px;
}
.latest ol { list-style: none; margin: 0; padding: 0; }
.latest li { border-top: 1px solid var(--line); }
.latest a { display: block; text-decoration: none; padding: 10px 0; }
.latest strong { display: block; font-size: 16px; line-height: 1.3; }
.latest time { color: var(--muted); font-size: 13px; }
.more-inline { margin: 8px 0 0; }
.rubric-block { margin-top: 34px; }
.rubric-head, .filters, .status-tabs, .draft-actions {
  display: flex;
  justify-content: space-between;
  gap: 12px;
  align-items: baseline;
  flex-wrap: wrap;
}
.rubric-head { border-top: 1px solid var(--ink); padding-top: 12px; }
.card-grid, .feed-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
  gap: 18px 28px;
  margin-top: 14px;
}
.story-card a {
  display: block;
  text-decoration: none;
  background: var(--card);
  border-top: 3px solid var(--navy);
  padding: 14px 0 4px;
  min-height: 100%;
  box-shadow: var(--shadow);
}
.story-card h3 {
  font-family: "Source Serif 4", Georgia, serif;
  font-size: 24px;
  line-height: 1.2;
  margin: 0 0 8px;
  font-weight: 600;
}
.story-card p { margin: 0 0 8px; color: var(--muted); }
.story { max-width: 760px; }
.story h2, .guide h2 {
  font-family: "Source Serif 4", Georgia, serif;
  font-size: 28px;
  margin: 28px 0 8px;
}
.tags { display: flex; flex-wrap: wrap; gap: 8px; padding: 0; margin: 0 0 16px; list-style: none; }
.tags a, .filters a, .status-tabs a {
  text-decoration: none;
  border: 1px solid var(--line);
  padding: 4px 10px;
  font-size: 14px;
  background: var(--card);
}
.filters { margin: 8px 0 18px; justify-content: flex-start; }
.filters a.is-active, .status-tabs a.is-active { border-color: var(--ink); background: var(--ink); color: var(--paper); }
.facts { display: grid; gap: 12px; margin: 0; }
.facts div { border-top: 1px solid var(--line); padding-top: 8px; }
.facts dt { font-size: 13px; letter-spacing: 0.06em; text-transform: uppercase; color: var(--muted); }
.fact-value { font-family: "Source Serif 4", Georgia, serif; font-size: 22px; margin: 0; }
.points { padding-left: 18px; }
.source-foot, .related { border-top: 1px solid var(--line); margin-top: 28px; padding-top: 8px; }
.source-foot a { overflow-wrap: anywhere; }
.empty {
  border: 1px solid var(--line);
  background: var(--card);
  padding: 28px 22px;
}
.empty h1, .empty h2 { font-family: "Source Serif 4", Georgia, serif; margin-top: 0; }
.find, .find-hero form, .hero, .find-hero { margin-bottom: 18px; }
.find-row, .scope { display: flex; gap: 8px; flex-wrap: wrap; }
.find input[type="text"], .find input:not([type="radio"]) {
  flex: 1;
  min-width: 180px;
  border: 0;
  border-bottom: 2px solid var(--ink);
  background: transparent;
  color: var(--ink);
  font: inherit;
  padding: 8px 0;
}
.guide, .about-long { max-width: 760px; }
.colophon {
  border-top: 3px solid var(--ink);
  background: var(--sheet);
  padding: 28px 0 40px;
}
.foot { display: grid; grid-template-columns: 1.4fr 1fr; gap: 18px; }
.foot a { display: inline-block; margin-right: 14px; }
.fine { color: var(--muted); font-size: 14px; grid-column: 1 / -1; }
.desk-head { max-width: 820px; margin-bottom: 22px; }
.saved { color: var(--ok); font-weight: 700; }
.draft {
  border-top: 1px solid var(--ink);
  padding: 22px 0 8px;
}
.draft-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 16px; }
.draft label span { display: block; font-size: 13px; letter-spacing: 0.08em; text-transform: uppercase; margin-bottom: 6px; }
textarea {
  width: 100%;
  border: 1px solid var(--line);
  background: var(--card);
  color: var(--ink);
  font: 15px/1.45 "Source Sans 3", sans-serif;
  padding: 10px;
  resize: vertical;
}
.draft-actions { margin: 10px 0 18px; }
.source-list { list-style: none; padding: 0; }
.source-list li { border-top: 1px solid var(--line); padding: 12px 0; }
.source-list a { overflow-wrap: anywhere; font-size: 14px; }
.pill { display: inline-block; margin-left: 8px; font-size: 12px; letter-spacing: 0.04em; text-transform: uppercase; }
.pill.ok { color: var(--ok); }
.pill.no { color: var(--rule); }
.ad-wrap { padding-top: 12px; }
.ad-slot { margin: 16px 0; }
.ad-infeed { grid-column: 1 / -1; }
.subscribe { font-weight: 700; text-decoration: none; letter-spacing: 0.04em; }
.theme-btn { width: 36px; height: 36px; display: inline-flex; align-items: center; justify-content: center; padding: 0; }
.theme-btn svg { width: 18px; height: 18px; }
html[data-theme="dark"] .icon-moon { display: none; }
html:not([data-theme="dark"]) .icon-sun { display: none; }
.channel-cta { border-top: 3px solid var(--rule); margin: 0 0 28px; padding-top: 14px; }
.channel-cta h2 { font-family: "Source Serif 4", Georgia, serif; margin: 0 0 8px; }
.channel-cta .cta-body p:last-child { margin: 0 0 12px; }
.cta-short { display: none; margin: 0; }
.cta-row { display: flex; gap: 10px; flex-wrap: wrap; }
.crumbs { color: var(--muted); font-size: 14px; margin: 0 0 12px; }
.crumbs a, .crumbs span { margin-right: 10px; }
.partners { border-top: 1px solid var(--line); margin-top: 28px; padding-top: 8px; }
.partners ul { list-style: none; padding: 0; }
.partners li { margin: 8px 0; }
.partners span { display: block; color: var(--muted); font-size: 14px; }
.desk-filters { display: flex; flex-wrap: wrap; gap: 12px; align-items: end; margin: 12px 0 20px; }
.desk-filters label { display: flex; flex-direction: column; gap: 4px; font-size: 13px; color: var(--muted); }
.desk-filters select, .desk-filters input, .slot-field input {
  font: inherit;
  color: var(--ink);
  background: var(--card);
  border: 1px solid var(--line);
  padding: 6px 8px;
}
.edit-list, .queue-list { list-style: none; padding: 0; margin: 0; }
.edit-list li, .queue-list li { border-top: 1px solid var(--line); }
.edit-list a, .queue-list li { display: block; padding: 12px 0; text-decoration: none; }
.edit-list strong { display: block; font-family: "Source Serif 4", Georgia, serif; font-size: 22px; line-height: 1.25; }
.edit-list time, .edit-list em, .queue-list time { color: var(--muted); font-size: 14px; font-style: normal; margin-right: 10px; }
.queue-list { }
.queue-list li { display: grid; grid-template-columns: 1fr auto auto; gap: 12px; align-items: baseline; }
.vk-preview {
  white-space: pre-wrap;
  background: var(--card);
  border: 1px solid var(--line);
  padding: 12px;
  font: 15px/1.45 "Source Sans 3", sans-serif;
}
.slot-field { display: flex; flex-direction: column; gap: 6px; margin-top: 8px; }
.edition { border: 1px solid var(--line); background: var(--card); padding: 16px 18px; margin: 0 0 22px; }
.edition h2 { font-family: "Source Serif 4", Georgia, serif; margin: 0 0 8px; }
.news-card.is-lead { border-top-width: 0; }

img { max-width: 100%; height: auto; }
@media (max-width: 860px) {
  .front, .card-grid, .feed-grid, .draft-grid, .foot { grid-template-columns: 1fr; }
  .latest ol { grid-template-columns: 1fr; }
  .latest { border-top: 1px solid var(--line); padding-top: 12px; }
  body { font-size: 17px; }
  .shell { width: min(1120px, calc(100% - 24px)); }
  .mast {
    position: sticky;
    top: 0;
    z-index: 40;
  }
  .mast-bar, .nav { width: min(1120px, calc(100% - 24px)); }
  .mast-bar {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: 0 2px;
    padding: 4px 0 0;
  }
  .dateline, .mast-note { display: none; }
  .brand {
    order: 1;
    flex: 1 1 auto;
    min-width: 0;
    gap: 8px;
    padding: 6px 0;
  }
  .brand-mark { width: 7px; height: 32px; }
  .brand strong {
    font-size: 16px;
    line-height: 1.05;
    letter-spacing: -0.03em;
  }
  .brand em { margin-top: 1px; font-size: 9px; letter-spacing: 0.14em; }
  .mast-actions { order: 2; gap: 0; }
  .icon-btn.search-toggle { display: inline-flex; order: 1; }
  .theme-btn { order: 2; width: 40px; height: 40px; border: 0; background: transparent; color: var(--ink); }
  .subscribe {
    order: 3;
    width: 40px;
    height: 40px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    color: var(--ink);
  }
  .tg-icon { display: block; width: 20px; height: 20px; }
  .subscribe-label {
    position: absolute;
    width: 1px;
    height: 1px;
    overflow: hidden;
    clip: rect(0 0 0 0);
  }
  .mast-search {
    order: 3;
    display: none;
    flex: 1 0 100%;
    width: 100%;
    margin: 0 0 6px;
  }
  .mast-search.is-open { display: flex; }
  .nav {
    gap: 16px;
    padding: 0 0 2px;
    border-top: 0;
    scrollbar-width: none;
  }
  .nav::-webkit-scrollbar { display: none; }
  .nav-link { padding: 7px 0 8px; font-size: 14px; }
  main.shell { padding: 14px 0 48px; }
  .lead h1 { font-size: clamp(28px, 8vw, 36px); }
  .dek { font-size: 17px; }
  .front {
    grid-template-columns: 1fr;
    grid-template-areas:
      "lead"
      "cta"
      "latest";
    row-gap: 0;
  }
  .channel-cta {
    display: flex;
    align-items: center;
    justify-content: space-between;
    flex-wrap: nowrap;
    gap: 10px;
    border-top: 1px solid var(--line);
    margin: 16px 0 4px;
    padding: 12px 0 0;
  }
  .channel-cta .cta-body { display: none; }
  .cta-short {
    display: block;
    flex: 1;
    min-width: 0;
    font-size: 15px;
    font-weight: 600;
    line-height: 1.2;
    white-space: nowrap;
  }
  .channel-cta .cta-row { flex: 0 0 auto; flex-wrap: nowrap; margin: 0; }
  .channel-cta .btn { padding: 7px 10px; font-size: 14px; white-space: nowrap; }
}
