:root {
  --ink: #12151a;
  --ink-soft: #4a5260;
  --line: #e2e5ea;
  --bg: #ffffff;
  --bg-soft: #f6f7f9;
  --accent: #b3122b;
  --accent-dark: #8c0d21;
  --navy: #0d1420;
  --radius: 6px;
  --wrap: 1180px;
  --serif: "Iowan Old Style", "Palatino Linotype", Palatino, Georgia, "Times New Roman", serif;
  --sans: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
}

* { box-sizing: border-box; }

html { -webkit-text-size-adjust: 100%; }

body {
  margin: 0;
  background: var(--bg);
  color: var(--ink);
  font-family: var(--sans);
  font-size: 16px;
  line-height: 1.55;
}

a { color: inherit; text-decoration: none; }
a:hover { text-decoration: underline; }
img { max-width: 100%; display: block; }

.wrap { max-width: var(--wrap); margin: 0 auto; padding: 0 20px; }
.wrap.narrow { max-width: 760px; }
.muted { color: var(--ink-soft); }
.spacer { flex: 1; }

.skip {
  position: absolute; left: -9999px; top: 0; background: var(--navy); color: #fff;
  padding: 10px 16px; z-index: 50;
}
.skip:focus { left: 0; }

/* ---------------------------------------------------------------- chrome */

.topbar {
  background: var(--navy);
  color: #c8d0dd;
  font-size: 12.5px;
  letter-spacing: 0.02em;
}
.topbar a { color: #e7ecf3; }
.topbar-inner { display: flex; align-items: center; gap: 14px; height: 36px; }
.topbar .dot { opacity: 0.5; }
.topbar .tagline { opacity: 0.85; }
.inline { display: inline; margin: 0; }
.linklike {
  background: none; border: 0; color: #e7ecf3; font: inherit; cursor: pointer; padding: 0;
}
.linklike:hover { text-decoration: underline; }

.masthead { border-bottom: 3px solid var(--navy); background: var(--bg); }
.masthead-inner {
  display: flex; align-items: center; justify-content: space-between;
  gap: 24px; padding-top: 22px; padding-bottom: 20px;
}
.logo { display: inline-flex; align-items: baseline; gap: 10px; }
.logo:hover { text-decoration: none; }
.logo-mark { color: var(--accent); font-size: 20px; letter-spacing: -2px; }
.logo-word {
  font-family: var(--serif);
  font-size: clamp(30px, 5vw, 46px);
  font-weight: 700;
  letter-spacing: -0.02em;
  line-height: 1;
}

.searchbox { display: flex; gap: 0; }
.searchbox input {
  border: 1px solid var(--line); border-right: 0; border-radius: var(--radius) 0 0 var(--radius);
  padding: 9px 12px; font: inherit; min-width: 210px; background: var(--bg-soft); color: var(--ink);
}
.searchbox input:focus { outline: 2px solid var(--navy); outline-offset: -2px; }
.searchbox button {
  border: 0; background: var(--navy); color: #fff; padding: 9px 16px;
  border-radius: 0 var(--radius) var(--radius) 0; font: inherit; cursor: pointer;
}
.searchbox button:hover { background: #1b2740; }
.searchbox-big { margin: 10px 0 30px; }
.searchbox-big input { flex: 1; font-size: 18px; padding: 14px 16px; }

.mainnav { border-bottom: 1px solid var(--line); position: sticky; top: 0; background: rgba(255,255,255,0.97); z-index: 20; backdrop-filter: saturate(160%) blur(6px); }
.navscroll { display: flex; gap: 22px; overflow-x: auto; scrollbar-width: none; }
.navscroll::-webkit-scrollbar { display: none; }
.navscroll a {
  white-space: nowrap; padding: 13px 0; font-size: 14px; font-weight: 600;
  letter-spacing: 0.03em; text-transform: uppercase; color: var(--ink-soft);
  border-bottom: 3px solid transparent; margin-bottom: -1px;
}
.navscroll a:hover { color: var(--ink); text-decoration: none; }
.navscroll a.active { color: var(--accent); border-bottom-color: var(--accent); }

.breaking { background: var(--accent); color: #fff; }
.breaking-inner { display: flex; align-items: center; gap: 14px; min-height: 42px; overflow: hidden; }
.breaking-label {
  text-transform: uppercase; font-size: 11.5px; font-weight: 800; letter-spacing: 0.12em;
  background: #fff; color: var(--accent); padding: 3px 8px; border-radius: 3px; flex: none;
}
.breaking-items { display: flex; gap: 12px; overflow-x: auto; scrollbar-width: none; font-size: 14.5px; white-space: nowrap; }
.breaking-items::-webkit-scrollbar { display: none; }
.breaking-items .sep { opacity: 0.6; }

/* ----------------------------------------------------------------- front */

.lead-grid {
  display: grid; grid-template-columns: 2fr 1fr; gap: 34px;
  padding: 30px 0 34px; border-bottom: 1px solid var(--line);
}
.lead-img img { width: 100%; height: auto; aspect-ratio: 16 / 9; object-fit: cover; border-radius: var(--radius); }
.lead h1 {
  font-family: var(--serif); font-weight: 700; letter-spacing: -0.02em;
  font-size: clamp(30px, 4.2vw, 46px); line-height: 1.08; margin: 10px 0 10px;
}
.lead-dek { font-size: 18px; color: var(--ink-soft); margin: 0 0 12px; max-width: 62ch; }
.lead-side { display: flex; flex-direction: column; gap: 18px; }
.lead-side .card { border-bottom: 1px solid var(--line); padding-bottom: 16px; }
.lead-side .card:last-child { border-bottom: 0; padding-bottom: 0; }

.kicker {
  display: inline-block; font-size: 11.5px; font-weight: 800; letter-spacing: 0.12em;
  text-transform: uppercase; color: var(--accent); margin-bottom: 6px;
}

.meta { font-size: 13px; color: var(--ink-soft); margin: 8px 0 0; }
.byline { font-weight: 600; color: var(--ink); }

.columns { display: grid; grid-template-columns: minmax(0, 1fr) 320px; gap: 40px; padding: 28px 0 50px; }
.col-main { min-width: 0; }

.section-head {
  display: flex; align-items: baseline; justify-content: space-between; gap: 12px;
  font-size: 15px; text-transform: uppercase; letter-spacing: 0.1em; font-weight: 800;
  margin: 34px 0 16px; padding-bottom: 8px; border-bottom: 2px solid var(--navy);
}
.section-head:first-child { margin-top: 6px; }
.section-more { font-size: 12.5px; letter-spacing: 0.04em; text-transform: none; color: var(--accent); font-weight: 700; }

.grid-3 { display: grid; grid-template-columns: repeat(3, 1fr); gap: 26px 24px; }

.card h3 {
  font-family: var(--serif); font-weight: 700; letter-spacing: -0.01em;
  font-size: 20px; line-height: 1.2; margin: 4px 0 6px;
}
.card .dek { font-size: 14.5px; color: var(--ink-soft); margin: 0; }
.card-img img { width: 100%; height: auto; aspect-ratio: 16 / 9; object-fit: cover; border-radius: var(--radius); }
.card-img { display: block; margin-bottom: 10px; }
.card-text h3 { font-size: 19px; }

.col-side { min-width: 0; }
.panel { border: 1px solid var(--line); border-radius: var(--radius); padding: 18px; margin-bottom: 22px; background: var(--bg); }
.panel h3 {
  margin: 0 0 12px; font-size: 13px; text-transform: uppercase; letter-spacing: 0.1em;
  padding-bottom: 8px; border-bottom: 1px solid var(--line);
}
.panel-accent { background: var(--bg-soft); }
.panel p { font-size: 14.5px; color: var(--ink-soft); margin: 0 0 12px; }

.ranked { list-style: none; counter-reset: r; margin: 0; padding: 0; }
.ranked li {
  counter-increment: r; display: grid; grid-template-columns: 30px 1fr; gap: 10px;
  padding: 11px 0; border-bottom: 1px solid var(--line); font-family: var(--serif); font-size: 16.5px; line-height: 1.25;
}
.ranked li:last-child { border-bottom: 0; }
.ranked li::before { content: counter(r); font-family: var(--sans); font-weight: 800; font-size: 20px; color: var(--accent); opacity: 0.75; }
.rank-cat { grid-column: 2; font-family: var(--sans); font-size: 11.5px; text-transform: uppercase; letter-spacing: 0.08em; color: var(--ink-soft); }

.ticks { margin: 0; padding-left: 18px; font-size: 14.5px; color: var(--ink-soft); }
.ticks li { margin-bottom: 7px; }

.subscribe { display: flex; gap: 8px; }
.subscribe input { flex: 1; min-width: 0; border: 1px solid var(--line); border-radius: var(--radius); padding: 9px 11px; font: inherit; }
.subscribe button { border: 0; background: var(--accent); color: #fff; border-radius: var(--radius); padding: 9px 14px; font: inherit; font-weight: 600; cursor: pointer; }
.subscribe button:hover { background: var(--accent-dark); }

/* ----------------------------------------------------------------- story */

.page-head { padding: 28px 0 10px; border-bottom: 1px solid var(--line); margin-bottom: 24px; }
.page-head h1 { font-family: var(--serif); font-size: clamp(28px, 4vw, 40px); margin: 0 0 6px; letter-spacing: -0.02em; }
.page-head p { margin: 0 0 14px; }
.page-head-row { display: flex; align-items: flex-end; justify-content: space-between; gap: 16px; flex-wrap: wrap; }

.story { padding-top: 26px; }
.story h1 { font-family: var(--serif); font-size: clamp(30px, 5vw, 48px); line-height: 1.08; letter-spacing: -0.025em; margin: 6px 0 12px; }
.story-dek { font-size: 20px; line-height: 1.45; color: var(--ink-soft); margin: 0 0 18px; max-width: 66ch; }
.story-meta {
  display: flex; justify-content: space-between; align-items: center; gap: 16px; flex-wrap: wrap;
  padding: 12px 0; border-top: 1px solid var(--line); border-bottom: 1px solid var(--line); font-size: 13.5px;
}
.story-meta .byline { margin-right: 10px; }
.story-img { margin: 22px 0; }
.story-img img { width: 100%; height: auto; aspect-ratio: 16 / 9; object-fit: cover; border-radius: var(--radius); }

.prose { font-family: var(--serif); font-size: 19.5px; line-height: 1.68; max-width: 68ch; }
.prose p { margin: 0 0 1.15em; }
.prose p:first-of-type::first-letter {
  float: left; font-size: 3.1em; line-height: 0.84; padding: 0.06em 0.1em 0 0; font-weight: 700; color: var(--accent);
}
.prose h2 { font-size: 26px; margin: 1.6em 0 0.5em; letter-spacing: -0.015em; }
.prose blockquote {
  margin: 1.4em 0; padding: 4px 0 4px 20px; border-left: 4px solid var(--accent);
  font-size: 23px; line-height: 1.4; color: var(--ink);
}
.prose a { color: var(--accent); text-decoration: underline; }

.admin-strip { display: flex; gap: 10px; margin: 26px 0 0; padding-top: 18px; border-top: 1px solid var(--line); }

.pager { display: flex; gap: 12px; justify-content: center; padding: 34px 0 10px; }

.empty-state { text-align: center; padding: 70px 20px; }
.empty-state h1, .empty-state h2 { font-family: var(--serif); font-size: 38px; margin: 0 0 10px; }
.empty-state p { color: var(--ink-soft); margin: 0 0 18px; }

/* ----------------------------------------------------------------- forms */

.btn {
  display: inline-block; background: var(--navy); color: #fff; border: 1px solid var(--navy);
  padding: 10px 18px; border-radius: var(--radius); font: inherit; font-weight: 600; cursor: pointer;
}
.btn:hover { background: #1b2740; text-decoration: none; }
.btn-ghost { background: transparent; color: var(--ink); border-color: var(--line); }
.btn-ghost:hover { background: var(--bg-soft); }
.btn-small { padding: 6px 11px; font-size: 13px; }
.btn-danger { background: transparent; color: var(--accent); border-color: #e7c3ca; }
.btn-danger:hover { background: var(--accent); color: #fff; }

.form { display: flex; flex-direction: column; gap: 16px; padding-bottom: 50px; }
.form label { display: flex; flex-direction: column; gap: 6px; font-size: 13px; font-weight: 700; letter-spacing: 0.04em; text-transform: uppercase; color: var(--ink-soft); }
.form input, .form select, .form textarea {
  font: inherit; font-size: 16px; text-transform: none; letter-spacing: normal; font-weight: 400;
  color: var(--ink); background: var(--bg); border: 1px solid var(--line); border-radius: var(--radius); padding: 10px 12px; width: 100%;
}
.form textarea { font-family: var(--serif); font-size: 17px; line-height: 1.6; resize: vertical; }
.form input:focus, .form select:focus, .form textarea:focus { outline: 2px solid var(--navy); outline-offset: -1px; }
.form-row { display: grid; grid-template-columns: 1fr 1fr; gap: 16px; }
.form-actions { display: flex; gap: 10px; align-items: center; }
.hint { text-transform: none; font-weight: 400; opacity: 0.75; }
.checks { display: flex; gap: 22px; flex-wrap: wrap; }
.check { flex-direction: row !important; align-items: center; gap: 8px !important; text-transform: none !important; font-size: 15px !important; color: var(--ink) !important; font-weight: 500 !important; }
.check input { width: auto; }

.auth-card { max-width: 420px; margin: 60px auto; border: 1px solid var(--line); border-radius: var(--radius); padding: 28px; }
.auth-card h1 { font-family: var(--serif); margin: 0 0 6px; font-size: 30px; }
.alert { background: #fdeaed; border: 1px solid #f3c4cc; color: #8c0d21; padding: 10px 12px; border-radius: var(--radius); font-size: 14.5px; }
.alert-info { background: #eef3fb; border-color: #cfdcf0; color: #22456f; }

/* ------------------------------------------------------------- newsroom */

.stats { display: grid; grid-template-columns: repeat(4, 1fr); gap: 14px; margin-bottom: 24px; }
.stat { border: 1px solid var(--line); border-radius: var(--radius); padding: 14px 16px; background: var(--bg-soft); }
.stat strong { display: block; font-size: 26px; font-family: var(--serif); }
.stat span { font-size: 12px; text-transform: uppercase; letter-spacing: 0.08em; color: var(--ink-soft); }

.table-wrap { overflow-x: auto; padding-bottom: 50px; }
.table { width: 100%; border-collapse: collapse; font-size: 14.5px; }
.table th {
  text-align: left; font-size: 11.5px; text-transform: uppercase; letter-spacing: 0.08em;
  color: var(--ink-soft); border-bottom: 2px solid var(--navy); padding: 8px 10px;
}
.table td { border-bottom: 1px solid var(--line); padding: 12px 10px; vertical-align: top; }
.t-title { font-family: var(--serif); font-size: 17px; font-weight: 700; }
.t-sub { font-size: 12.5px; color: var(--ink-soft); margin-top: 3px; }
.t-actions { display: flex; gap: 8px; }
.t-actions form { margin: 0; }
.badge-draft { background: #fff3cd; color: #7a5b00; padding: 1px 7px; border-radius: 20px; font-size: 11.5px; font-weight: 700; }
.badge-breaking { background: var(--accent); color: #fff; padding: 1px 7px; border-radius: 20px; font-size: 11px; font-weight: 700; margin-left: 6px; letter-spacing: 0.04em; }

/* ----------------------------------------------------------------- foot */

.footer { background: var(--navy); color: #c3cbd8; margin-top: 30px; padding: 40px 0 0; font-size: 14.5px; }
.footer a { color: #e7ecf3; display: block; padding: 4px 0; }
.footer-inner { display: grid; grid-template-columns: 1fr 2fr; gap: 30px; padding-bottom: 30px; }
.footer-brand strong { font-family: var(--serif); font-size: 24px; color: #fff; display: block; margin-top: 4px; }
.footer-brand p { color: #93a0b4; margin: 6px 0 0; }
.footer-cols { display: grid; grid-template-columns: repeat(3, 1fr); gap: 20px; }
.footer-cols h4 { margin: 0 0 8px; font-size: 12px; text-transform: uppercase; letter-spacing: 0.1em; color: #8c99ad; }
.footer-legal { border-top: 1px solid rgba(255,255,255,0.12); padding-top: 16px; padding-bottom: 26px; font-size: 13px; color: #8c99ad; }

/* ------------------------------------------------------------ responsive */

@media (max-width: 960px) {
  .columns { grid-template-columns: 1fr; gap: 10px; }
  .lead-grid { grid-template-columns: 1fr; gap: 24px; }
  .grid-3 { grid-template-columns: repeat(2, 1fr); }
  .stats { grid-template-columns: repeat(2, 1fr); }
  .footer-inner { grid-template-columns: 1fr; }
}

@media (max-width: 620px) {
  .grid-3 { grid-template-columns: 1fr; }
  .masthead-inner { flex-direction: column; align-items: stretch; gap: 14px; }
  .searchbox input { min-width: 0; flex: 1; }
  .form-row { grid-template-columns: 1fr; }
  .footer-cols { grid-template-columns: 1fr 1fr; }
  .prose { font-size: 18.5px; }
  .topbar .tagline, .topbar .dot { display: none; }
}

@media (prefers-color-scheme: dark) {
  :root {
    --ink: #e9edf3;
    --ink-soft: #a3adbd;
    --line: #262c38;
    --bg: #0f131a;
    --bg-soft: #161b24;
    --navy: #080b11;
    --accent: #ff5c74;
    --accent-dark: #e03b55;
  }
  .mainnav { background: rgba(15,19,26,0.97); }
  .breaking { background: #8c0d21; }
  .breaking-label { background: #fff; color: #8c0d21; }
  .alert { background: #2a1119; border-color: #5c2130; color: #ffb3c0; }
  .alert-info { background: #121c2b; border-color: #27405f; color: #a9c8ef; }
  .badge-draft { background: #3a2f0a; color: #ffdd7a; }
  .footer { background: #080b11; }
  .btn { background: #1d2635; border-color: #2b3545; }
  .btn:hover { background: #28344a; }
  .stat { background: var(--bg-soft); }
}
