:root {
  --ink: #12151c;
  --muted: #626b78;
  --paper: #f7f5ef;
  --surface: #ffffff;
  --line: rgba(18, 21, 28, 0.14);
  --blue: #1f58a8;
  --cyan: #008f9f;
  --green: #26734d;
  --red: #c9292f;
  --gold: #b37b12;
  --violet: #6d4aa2;
  --shadow: 0 22px 70px rgba(18, 21, 28, 0.13);
}

* { box-sizing: border-box; }
[hidden] { display: none !important; }
html { scroll-behavior: smooth; }
body {
  margin: 0;
  color: var(--ink);
  font-family: Inter, ui-sans-serif, -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif;
  background: var(--paper);
}
button, input, textarea, select { font: inherit; }
a { color: inherit; }

.topbar, .shell, .hero, .ticker, footer {
  width: min(1180px, calc(100% - 32px));
  margin: 0 auto;
}

.topbar {
  position: sticky;
  top: 0;
  z-index: 10;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 20px;
  padding: 14px 0;
  background: rgba(247, 245, 239, 0.92);
  backdrop-filter: blur(14px);
  border-bottom: 1px solid var(--line);
}

.brand {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  text-decoration: none;
  line-height: 0.95;
  letter-spacing: 0;
  text-transform: uppercase;
}
.brand span:last-child { display: grid; }
.brand-logo {
  width: 46px;
  height: 46px;
  object-fit: cover;
  border-radius: 8px;
  border: 1px solid rgba(18, 21, 28, 0.18);
}

nav { display: flex; flex-wrap: wrap; gap: 22px; }
nav a, .ghost-button, .filters button {
  min-height: 34px;
  padding: 0 0 3px;
  border: 0;
  border-bottom: 2px solid transparent;
  border-radius: 0;
  color: #4f5764;
  background: transparent;
  font-size: 0.9rem;
  font-weight: 860;
  text-decoration: none;
  cursor: pointer;
}
nav a:hover, .ghost-button:hover, .filters button:hover, .filters .active {
  color: var(--ink);
  border-bottom-color: var(--red);
  background: transparent;
}

.hero {
  display: grid;
  grid-template-columns: 1fr;
  gap: 18px;
  align-items: stretch;
  padding: 34px 0 18px;
}
.hero-live {
  grid-column: 1 / -1;
  display: flex;
  justify-content: space-between;
  gap: 12px;
  padding: 10px 0;
  border-top: 3px solid var(--ink);
  border-bottom: 1px solid var(--line);
  text-transform: uppercase;
  font-size: 0.82rem;
  font-weight: 900;
}

.lead-story, .news-card, .editor {
  background: var(--surface);
  border: 1px solid var(--line);
  box-shadow: var(--shadow);
}
.lead-story {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(300px, 34%);
  min-height: 390px;
}
.lead-copy { display: flex; flex-direction: column; justify-content: flex-end; padding: clamp(24px, 5vw, 54px); }
.kicker {
  margin: 0 0 12px;
  color: var(--red);
  font-size: 0.78rem;
  font-weight: 950;
  letter-spacing: 0.11em;
  text-transform: uppercase;
}
h1, h2, h3, p { margin-top: 0; }
h1 {
  margin-bottom: 18px;
  max-width: 980px;
  font-family: Georgia, 'Times New Roman', serif;
  font-size: clamp(2.2rem, 4.6vw, 4.45rem);
  line-height: 0.98;
  font-weight: 900;
  letter-spacing: 0;
}
h2 {
  margin-bottom: 10px;
  font-family: Georgia, 'Times New Roman', serif;
  font-size: clamp(1.85rem, 3.3vw, 3.1rem);
  line-height: 1.02;
}
h3 {
  margin-bottom: 10px;
  font-family: Georgia, 'Times New Roman', serif;
  font-size: 1.45rem;
  line-height: 1.08;
}
p { color: var(--muted); line-height: 1.62; }
.lead-copy > p { max-width: 650px; font-size: 1.15rem; }
.lead-story .visual.photo img {
  object-position: center;
}
.byline, .meta {
  color: var(--muted);
  font-size: 0.87rem;
  font-weight: 760;
}
.meta { display: flex; flex-wrap: wrap; gap: 10px; margin-bottom: 12px; text-transform: uppercase; letter-spacing: 0.07em; }
.meta span:first-child { color: var(--red); }

.read-link, .editor button {
  align-self: flex-start;
  display: inline-flex;
  align-items: center;
  min-height: 44px;
  margin-top: 22px;
  padding: 0 16px;
  border: 0;
  border-radius: 8px;
  color: #fff;
  background: var(--ink);
  font-weight: 900;
  text-decoration: none;
  cursor: pointer;
}
.read-link:hover, .editor button:hover { background: var(--red); }

.visual {
  position: relative;
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  gap: 24px;
  min-height: 210px;
  padding: 18px;
  color: #fff;
  background:
    linear-gradient(135deg, rgba(0,0,0,0.42), rgba(0,0,0,0.08)),
    repeating-linear-gradient(135deg, rgba(255,255,255,0.16) 0 1px, transparent 1px 12px),
    linear-gradient(135deg, var(--accent), #141820);
  overflow: hidden;
}
.visual::after {
  content: '';
  position: absolute;
  right: -20%;
  bottom: -30%;
  width: 72%;
  aspect-ratio: 1;
  border: 36px solid rgba(255, 255, 255, 0.14);
  border-radius: 50%;
}
.visual span, .visual strong { position: relative; z-index: 1; }
.visual span { width: max-content; padding: 7px 10px; background: rgba(255,255,255,0.18); border: 1px solid rgba(255,255,255,0.28); border-radius: 999px; font-size: 0.78rem; font-weight: 950; text-transform: uppercase; }
.visual strong { max-width: 24ch; font-size: 1.05rem; line-height: 1.22; }
.visual.large { min-height: 100%; }
.visual.photo {
  margin: 0;
  padding: 0;
  background: #d8d1c5;
}
.visual.photo::after { display: none; }
.visual.photo img {
  display: block;
  width: 100%;
  height: 100%;
  min-height: inherit;
  object-fit: cover;
}
.visual.photo figcaption {
  position: absolute;
  left: 14px;
  top: 14px;
  z-index: 1;
  padding: 7px 10px;
  border: 1px solid rgba(255,255,255,0.35);
  border-radius: 999px;
  color: #fff;
  background: rgba(18, 21, 28, 0.54);
  font-size: 0.78rem;
  font-weight: 950;
  text-transform: uppercase;
}

.ticker { display: flex; align-items: center; gap: 12px; margin-top: 10px; padding: 12px 0 18px; border-bottom: 1px solid var(--line); overflow: hidden; }
.ticker strong { color: var(--red); text-transform: uppercase; }
.ticker div { display: flex; gap: 8px; overflow-x: auto; }
.ticker a { flex: 0 0 auto; color: var(--ink); font-weight: 800; text-decoration: none; }
.ticker a:hover { color: var(--red); }
.ticker a::after { content: ' /'; color: var(--muted); }

.section { padding: 46px 0; }
.section-head { display: flex; align-items: end; justify-content: space-between; gap: 20px; margin-bottom: 18px; }
.section-head.compact { align-items: center; }
.urgent-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 16px; }
.news-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 16px; }
.news-card { display: grid; grid-template-rows: auto 1fr; min-height: 100%; }
.news-card .visual {
  min-height: 0;
  aspect-ratio: 16 / 10;
}
.news-card .visual.photo img {
  min-height: 0;
}
.lead-story .visual {
  aspect-ratio: auto;
  min-height: 100%;
}
.card-copy { display: flex; flex-direction: column; padding: 18px; }
.card-copy p { flex: 1; }
.search-box { display: grid; gap: 6px; min-width: min(100%, 310px); color: var(--muted); font-size: 0.82rem; font-weight: 900; text-transform: uppercase; }
.search-box input, .editor input, .editor textarea, .editor select {
  width: 100%;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: #fff;
  padding: 12px;
  color: var(--ink);
}
.filters { display: flex; flex-wrap: wrap; gap: 14px; margin-bottom: 18px; }
.filters button {
  min-height: 30px;
  font-size: 0.82rem;
}
.empty { grid-column: 1 / -1; padding: 28px; background: #fff; border: 1px solid var(--line); }

.admin-main { padding: 44px 0; }
.admin-hero {
  display: grid;
  grid-template-columns: minmax(0, 0.8fr) minmax(320px, 1.2fr);
  gap: 32px;
  align-items: start;
}
.admin-panel {
  padding: 24px;
  background: #151923;
  color: #fff;
}
.admin-panel p { color: rgba(255,255,255,0.72); }
.admin-link {
  display: inline-flex;
  margin-top: 18px;
  color: #fff;
  font-weight: 850;
}
.publish-layout { display: grid; grid-template-columns: 0.8fr 1.2fr; gap: 32px; align-items: start; }
.editor { display: grid; gap: 14px; padding: 22px; color: var(--ink); box-shadow: none; }
.editor label { display: grid; gap: 7px; color: var(--muted); font-size: 0.84rem; font-weight: 900; text-transform: uppercase; }
.form-row.two { display: grid; grid-template-columns: 1fr 1fr; gap: 12px; }
.editor-actions { display: flex; flex-wrap: wrap; gap: 10px; }
.editor .ghost-button {
  margin-top: 22px;
  color: var(--ink);
  background: #fff;
  border: 1px solid var(--line);
  border-radius: 8px;
  padding: 0 14px;
}
.admin-list {
  display: grid;
  gap: 10px;
  margin-top: 20px;
}
.admin-list article {
  padding: 14px;
  border: 1px solid rgba(255,255,255,0.16);
  border-radius: 8px;
  background: rgba(255,255,255,0.06);
}
.admin-list h3 {
  margin: 0 0 6px;
  color: #fff;
  font-family: Inter, ui-sans-serif, -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif;
  font-size: 1rem;
}
.admin-list p { margin: 0; font-size: 0.9rem; }

.article-page {
  padding: 34px 0 56px;
}
.back-link {
  display: inline-flex;
  margin-bottom: 18px;
  color: var(--red);
  font-size: 0.88rem;
  font-weight: 900;
  text-decoration: none;
  text-transform: uppercase;
}
.back-link:hover { color: var(--ink); }
.article-header {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(320px, 36%);
  gap: 28px;
  align-items: start;
  padding-bottom: 30px;
  border-bottom: 1px solid var(--line);
}
.article-header h1 {
  max-width: 940px;
  font-size: clamp(2.25rem, 5vw, 4.8rem);
}
.article-summary {
  max-width: 780px;
  color: var(--ink);
  font-size: clamp(1.12rem, 1.7vw, 1.35rem);
  font-weight: 700;
}
.article-topic {
  margin-top: 8px;
  color: var(--red);
  font-size: 0.86rem;
  font-weight: 900;
  letter-spacing: 0.05em;
  text-transform: uppercase;
}
.article-header .visual {
  min-height: 0;
  aspect-ratio: 4 / 3;
}
.article-header .visual.photo img {
  min-height: 0;
  object-position: center;
}
.article-body {
  width: min(760px, 100%);
  padding: 34px 0 0;
}
.article-body p {
  color: #252a33;
  font-family: Georgia, 'Times New Roman', serif;
  font-size: clamp(1.08rem, 1.4vw, 1.22rem);
  line-height: 1.78;
}

footer { display: flex; flex-wrap: wrap; justify-content: space-between; gap: 12px; padding: 28px 0; color: var(--muted); font-size: 0.92rem; }
footer a { font-weight: 850; }

@media (max-width: 900px) {
  .topbar, .section-head, .hero, .lead-story, .publish-layout, .admin-hero, .article-header { grid-template-columns: 1fr; }
  .topbar, .section-head { display: grid; align-items: start; }
  .lead-story { min-height: auto; }
  .visual.large { min-height: 260px; }
  .urgent-grid, .news-grid { grid-template-columns: 1fr 1fr; }
  .article-header .visual { aspect-ratio: 16 / 9; }
}

@media (max-width: 620px) {
  .topbar, .shell, .hero, .ticker, footer { width: min(100% - 22px, 1180px); }
  nav { width: 100%; gap: 14px; }
  nav a { flex: 0 0 auto; text-align: left; }
  .urgent-grid, .news-grid, .form-row.two { grid-template-columns: 1fr; }
  .lead-copy { padding: 20px; }
  h1 { font-size: 2.45rem; }
  .section { padding: 34px 0; }
}
