:root {
  --ink: #173a5e;
  --muted: #60748a;
  --line: #d9e3ee;
  --paper: #f3f7fb;
  --panel: #ffffff;
  --red: #d84a55;
  --blue: #1f68ad;
  --gold: #f2b84b;
  --green: #34875d;
  --soft-blue: #eaf3fb;
  --radius: 10px;
  --radius-small: 7px;
  --shadow: 0 10px 24px rgba(30, 78, 120, .08);
}

* {
  box-sizing: border-box;
}

body {
  margin: 0;
  color: var(--ink);
  background: var(--paper);
  font-family: Arial, Helvetica, sans-serif;
}

a {
  color: inherit;
  text-decoration: none;
}

.info-strip {
  display: flex;
  justify-content: center;
  gap: 12px;
  padding: 7px 14px;
  color: white;
  background: #1f5f9d;
  font-size: 13px;
}

.info-strip strong {
  color: var(--gold);
}

.topbar {
  position: sticky;
  top: 0;
  z-index: 10;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 18px;
  padding: 10px clamp(14px, 3vw, 34px);
  border-bottom: 1px solid var(--line);
  background: rgba(255, 255, 255, .96);
  backdrop-filter: blur(10px);
  box-shadow: 0 4px 18px rgba(31, 104, 173, .07);
}

.brand {
  display: flex;
  align-items: center;
  gap: 10px;
  font-size: 22px;
  font-weight: 900;
  letter-spacing: 0;
}

.brand-mark {
  display: grid;
  place-items: center;
  width: 42px;
  height: 42px;
  color: white;
  background: var(--blue);
  border-radius: var(--radius-small);
  font-weight: 900;
}

.nav {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  font-size: 14px;
  font-weight: 700;
}

.nav a {
  padding: 9px 10px;
  border-radius: var(--radius-small);
}

.nav a:hover {
  background: var(--soft-blue);
}

.category-nav {
  display: flex;
  justify-content: center;
  gap: 2px;
  overflow-x: auto;
  padding: 0 clamp(14px, 3vw, 34px);
  background: #fff;
  border-bottom: 1px solid var(--line);
  scrollbar-width: none;
}

.category-nav a {
  flex: 0 0 auto;
  padding: 11px 14px;
  color: var(--ink);
  font-size: 13px;
  font-weight: 900;
  text-transform: uppercase;
}

.category-nav a:first-child {
  color: white;
  background: var(--blue);
  border-radius: 0 0 var(--radius-small) var(--radius-small);
}

main {
  width: min(1320px, calc(100% - 24px));
  margin: 0 auto;
}

.hero-news {
  display: grid;
  grid-template-columns: minmax(0, 1fr) 330px;
  gap: 18px;
  align-items: start;
  padding: 12px 0;
}

.hero-main {
  display: grid;
  gap: 18px;
  min-width: 0;
}

.lead-story,
.motto,
.side-promos,
.contradiction-map,
.sources-panel,
.poll-panel,
.comments-panel,
.admin-intro,
.admin-form,
.output-panel {
  background: var(--panel);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  box-shadow: var(--shadow);
}

.lead-link {
  position: relative;
  display: grid;
  aspect-ratio: 16 / 9;
  min-height: 0;
  height: auto;
  overflow: hidden;
  border-radius: inherit;
}

.lead-image {
  position: relative;
  grid-area: 1 / 1;
}

.lead-image::after {
  content: "";
  position: absolute;
  inset: 0;
  z-index: 1;
  background:
    linear-gradient(180deg, rgba(23, 58, 94, .04) 0%, rgba(20, 54, 88, .34) 46%, rgba(12, 34, 58, .82) 100%),
    linear-gradient(90deg, rgba(12, 34, 58, .72) 0%, rgba(12, 34, 58, .18) 62%, rgba(12, 34, 58, .04) 100%);
}

.lead-image img,
.thumb img,
.war-photo img {
  display: block;
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.lead-copy {
  position: relative;
  z-index: 2;
  grid-area: 1 / 1;
  align-self: end;
  width: min(760px, calc(100% - 28px));
  margin: 0 0 clamp(14px, 2vw, 24px) clamp(14px, 2vw, 24px);
  padding: clamp(16px, 3vw, 28px);
  color: white;
  background: linear-gradient(135deg, rgba(18, 54, 88, .78), rgba(31, 104, 173, .48));
  border: 1px solid rgba(255, 255, 255, .18);
  border-radius: var(--radius);
  text-shadow: 0 2px 12px rgba(9, 31, 53, .55);
  backdrop-filter: blur(2px);
}

.lead-copy h1 {
  max-width: 780px;
  margin: 12px 0;
  font-size: clamp(30px, 3.2vw, 44px);
  line-height: 1.04;
}

.lead-copy .scoreline {
  color: #fff;
}

.lead-copy p {
  max-width: 760px;
  margin: 0 0 12px;
  color: rgba(255, 255, 255, .92);
  font-size: 18px;
  line-height: 1.45;
}

.motto {
  padding: 16px;
  border-top: 4px solid var(--blue);
}

.motto h1,
.admin-intro h1 {
  margin: 8px 0 14px;
  font-size: 22px;
  line-height: 1.08;
}

.motto p,
.admin-intro p,
.section-head p,
.poll-panel p,
.output-panel p {
  color: var(--muted);
  line-height: 1.55;
}

.side-promos {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 18px;
  min-height: 0;
  padding: 0;
  overflow: hidden;
  background: transparent;
  border: 0;
  box-shadow: none;
}

.right-rail,
.desk-rail {
  display: grid;
  gap: 12px;
  align-content: stretch;
}

.right-rail {
  min-height: 0;
  grid-template-rows: none;
}

.right-rail .motto,
.right-rail .ranking-box {
  min-height: 0;
}

.ranking-box,
.editorial-box {
  padding: 16px;
  background: #fff;
  border: 1px solid var(--line);
  border-top: 4px solid var(--blue);
  border-radius: var(--radius);
  box-shadow: var(--shadow);
}

.ranking-box h2,
.editorial-box h2 {
  margin: 6px 0 12px;
  font-size: 22px;
  line-height: 1.08;
}

#rankingList {
  display: grid;
  gap: 16px;
}

.editorial-box p {
  color: var(--muted);
  line-height: 1.5;
}

.ranking-item {
  display: grid;
  grid-template-columns: 32px 1fr;
  gap: 10px;
  padding: 9px 0;
  border-top: 1px solid var(--line);
}

.ranking-item b {
  color: var(--blue);
  font-size: 28px;
  line-height: 1;
}

.ranking-item span {
  font-weight: 900;
  line-height: 1.18;
}

.ranking-item em {
  grid-column: 2;
  color: var(--muted);
  font-size: 12px;
  font-style: normal;
  font-weight: 700;
}

.topic-card {
  display: grid;
  grid-template-rows: 145px 1fr;
  min-height: 270px;
  overflow: hidden;
  background: white;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  box-shadow: var(--shadow);
}

.topic-card.small {
  grid-template-columns: 120px 1fr;
  grid-template-rows: 1fr;
  min-height: 125px;
  border: 0;
  border-bottom: 1px solid var(--line);
  border-radius: 0;
  box-shadow: none;
}

.topic-card.underlead {
  aspect-ratio: 16 / 9;
  grid-template-rows: 1fr;
  min-height: 0;
}

.topic-card.underlead .thumb,
.topic-card.underlead .card-body {
  grid-area: 1 / 1;
}

.topic-card.underlead .thumb {
  position: relative;
  z-index: 0;
}

.topic-card.underlead .thumb::after {
  content: "";
  position: absolute;
  inset: 0;
  z-index: 1;
  background: linear-gradient(180deg, rgba(23, 58, 94, .02), rgba(12, 34, 58, .78));
}

.topic-card.underlead .card-body {
  position: relative;
  z-index: 2;
  grid-template-rows: auto auto auto auto auto;
  align-self: end;
  align-content: end;
  min-height: 100%;
  padding: 16px;
  color: white;
  text-shadow: 0 2px 10px rgba(9, 31, 53, .52);
}

.topic-card.underlead .card-body strong {
  color: white;
}

.topic-card.underlead .kicker,
.topic-card.underlead .scoreline {
  color: rgba(255, 255, 255, .9);
}

.topic-card.rail {
  grid-template-columns: 132px 1fr;
  grid-template-rows: 1fr;
  column-gap: 14px;
  min-height: 88px;
  border: 0;
  box-shadow: none;
}

.topic-card.rail .card-body {
  padding: 2px 0 0;
  align-content: start;
}

.topic-card.rail .badge,
.topic-card.rail .kicker,
.topic-card.rail .scoreline {
  display: none;
}

.topic-card.rail .card-body strong {
  font-size: 16px;
  line-height: 1.2;
}

.topic-card.rail .thumb {
  border-radius: var(--radius-small);
  overflow: hidden;
}

.topic-card.large {
  min-height: 304px;
}

.topic-card .thumb {
  display: block;
  min-height: 0;
  background: #dfe9f3;
}

.topic-card.small .thumb {
  min-height: 0;
}

.card-body {
  display: grid;
  grid-template-rows: auto auto 1fr auto auto;
  gap: 7px;
  padding: 12px;
}

.card-body strong {
  font-size: 20px;
  line-height: 1.08;
}

.topic-card.small .card-body strong {
  font-size: 15px;
}

.kicker {
  color: var(--muted);
  font-size: 14px;
  line-height: 1.35;
}

.badge {
  display: inline-flex;
  width: fit-content;
  padding: 5px 8px;
  color: white;
  background: var(--blue);
  font-size: 12px;
  font-weight: 900;
  text-transform: uppercase;
  border-radius: var(--radius-small);
}

.scoreline {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  color: #f0f0f0;
  font-size: 13px;
  font-weight: 700;
}

.debate-score {
  display: grid;
  gap: 5px;
  align-self: end;
}

.winner-label {
  color: var(--blue);
  font-size: 13px;
  font-weight: 900;
  line-height: 1.15;
}

.score-bars {
  display: flex;
  height: 8px;
  overflow: hidden;
  background: #dce9f5;
  border-radius: 999px;
}

.score-bars i {
  display: block;
  min-width: 4px;
}

.score-bars .side-a {
  background: #2f78bd;
}

.score-bars .side-b {
  background: #cf5c4b;
}

.score-values {
  display: flex;
  justify-content: space-between;
  gap: 8px;
  color: var(--muted);
  font-size: 12px;
  line-height: 1.15;
}

.score-values b {
  font-weight: 900;
}

.lead-copy .debate-score {
  max-width: 430px;
}

.lead-copy .winner-label,
.topic-card.underlead .winner-label {
  color: #fff;
}

.lead-copy .score-bars,
.topic-card.underlead .score-bars {
  background: rgba(255, 255, 255, .3);
}

.lead-copy .score-values,
.topic-card.underlead .score-values {
  color: rgba(255, 255, 255, .92);
}

.debate-score.compact {
  margin-top: 4px;
}

.debate-score.compact .score-values {
  display: none;
}

.topic-card .scoreline,
.poll-panel p {
  color: var(--muted);
}

.topic-card:hover {
  transform: translateY(-2px);
  box-shadow: 0 14px 30px rgba(31, 104, 173, .15);
}

.topic-card {
  transition: transform .18s ease, box-shadow .18s ease;
}

.ticker {
  display: flex;
  gap: 12px;
  align-items: center;
  overflow: hidden;
  padding: 10px 12px;
  background: #1f5f9d;
  color: white;
  border-radius: var(--radius);
}

.ticker span {
  flex: 0 0 auto;
  color: var(--gold);
  font-weight: 900;
}

#tickerItems {
  display: flex;
  gap: 18px;
  overflow-x: auto;
  scrollbar-width: none;
  white-space: nowrap;
  font-size: 14px;
  font-weight: 700;
}

.section-head {
  display: flex;
  align-items: end;
  justify-content: space-between;
  gap: 18px;
  padding: 24px 0 10px;
  margin-bottom: 10px;
  border-bottom: 3px solid var(--blue);
}

.section-head.compact {
  align-items: start;
  padding: 0 0 18px;
}

.section-head h2,
.sources-panel h2,
.poll-panel h2,
.comments-panel h2,
.output-panel h2 {
  margin: 0;
  font-size: clamp(26px, 3vw, 40px);
  line-height: 1.05;
}

.eyebrow {
  margin: 0;
  color: var(--blue);
  font-size: 12px;
  font-weight: 900;
  text-transform: uppercase;
}

.ghost-button,
.primary-button,
.poll-button,
.like-button,
.danger-button {
  border: 0;
  cursor: pointer;
  font: inherit;
  font-weight: 900;
}

.ghost-button {
  padding: 12px 14px;
  background: white;
  border: 1px solid var(--line);
  border-radius: var(--radius-small);
  color: var(--ink);
}

.primary-button {
  padding: 13px 18px;
  color: white;
  background: var(--blue);
  border-radius: var(--radius-small);
}

.danger-button {
  padding: 12px 14px;
  color: white;
  background: #9d3b48;
  border-radius: var(--radius-small);
}

.topic-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  grid-auto-flow: dense;
  gap: 18px;
}

.topic-grid .topic-card:nth-child(1),
.topic-grid .topic-card:nth-child(6) {
  grid-column: span 1;
}

.news-layout {
  display: block;
}

.editorial-box {
  position: sticky;
  top: 112px;
}

.photo-box {
  position: static;
  border-top-color: var(--red);
}

.load-row {
  display: flex;
  justify-content: center;
  padding: 22px 0 36px;
}

.contradiction-map {
  margin-bottom: 34px;
  padding: clamp(16px, 3vw, 28px);
}

.battle-proposal {
  display: grid;
  grid-template-columns: minmax(260px, .9fr) minmax(320px, 1.4fr);
  gap: 18px;
  margin-bottom: 34px;
  padding: clamp(18px, 3vw, 28px);
  background: white;
  border: 1px solid var(--line);
  border-top: 5px solid var(--blue);
  border-radius: var(--radius);
  box-shadow: var(--shadow);
}

.proposal-copy h2 {
  margin: 6px 0 12px;
  color: var(--blue-dark);
  font-size: clamp(28px, 4vw, 44px);
  line-height: 1;
}

.proposal-copy p {
  color: var(--muted);
  line-height: 1.55;
}

.proposal-form {
  display: grid;
  gap: 10px;
}

.proposal-form label {
  display: grid;
  gap: 6px;
  color: var(--blue-dark);
  font-weight: 900;
}

.proposal-row {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 10px;
}

.hidden-field {
  display: none;
}

.proposal-status {
  min-height: 20px;
  margin: 0;
  color: #2c7d55;
  font-weight: 900;
  line-height: 1.35;
}

.map-nodes {
  display: grid;
  grid-template-columns: repeat(7, minmax(0, 1fr));
  gap: 10px;
  margin-bottom: 18px;
}

.map-node {
  min-height: 92px;
  padding: 12px;
  color: white;
  background: var(--blue);
  border-radius: var(--radius);
}

.map-node strong {
  display: block;
  margin-bottom: 8px;
  font-size: 20px;
}

.map-node span {
  font-size: 12px;
  font-weight: 700;
}

.tone-1 { background: var(--red); }
.tone-2 { background: var(--blue); }
.tone-3 { background: var(--green); }
.tone-4 { background: #6f6db2; }

.map-links {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 8px;
}

.map-link {
  display: grid;
  grid-template-columns: 1fr auto 1fr;
  align-items: center;
  gap: 10px;
  padding: 10px;
  background: #f8fbfe;
  border: 1px solid var(--line);
  border-radius: var(--radius-small);
  font-size: 13px;
}

.map-link em {
  color: var(--red);
  font-style: normal;
  font-weight: 900;
}

.detail-shell {
  padding: 18px 0 34px;
}

.war-hero {
  display: grid;
  grid-template-columns: minmax(0, 1.2fr) minmax(320px, .8fr);
  min-height: 460px;
  background: linear-gradient(135deg, #1f5f9d, #173a5e);
  border-radius: var(--radius);
  overflow: hidden;
  box-shadow: var(--shadow);
}

.war-photo {
  min-height: 360px;
  background: #dfe9f3;
}

.war-title {
  display: flex;
  flex-direction: column;
  justify-content: center;
  gap: 12px;
  padding: clamp(22px, 4vw, 42px);
  color: white;
}

.war-title h1 {
  margin: 0;
  font-size: clamp(36px, 5vw, 64px);
  line-height: .95;
}

.war-title h2 {
  max-width: 720px;
  margin: 0;
  color: #f5b301;
  font-size: clamp(20px, 2.4vw, 31px);
  line-height: 1.15;
}

.war-title p {
  line-height: 1.55;
}

.versus {
  display: grid;
  grid-template-columns: 1fr auto 1fr;
  align-items: center;
  gap: 12px;
  margin-top: 10px;
  font-weight: 900;
}

.versus span {
  padding: 14px;
  text-align: center;
  background: rgba(255,255,255,.1);
  border-radius: var(--radius-small);
}

.versus b {
  display: grid;
  place-items: center;
  width: 54px;
  height: 54px;
  border-radius: 50%;
  color: var(--ink);
  background: var(--gold);
}

.argument-ring {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 14px;
  margin: 14px 0;
}

.corner {
  padding: clamp(18px, 3vw, 28px);
  background: white;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  box-shadow: var(--shadow);
}

.corner h2 {
  margin: 0 0 16px;
  font-size: 28px;
}

.corner h3 {
  margin: -8px 0 18px;
  color: var(--muted);
  font-size: 15px;
  line-height: 1.3;
}

.corner p {
  padding: 13px 0;
  margin: 0;
  border-top: 1px solid var(--line);
  line-height: 1.5;
}

.corner.red {
  border-top: 6px solid var(--blue);
}

.corner.blue {
  border-top: 6px solid #75a9d8;
}

.conflict-panel {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(280px, .52fr);
  gap: 14px;
  margin: 14px 0;
}

.conflict-panel > div,
.conflict-panel > aside {
  padding: clamp(18px, 3vw, 28px);
  background: white;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  box-shadow: var(--shadow);
}

.conflict-panel > div {
  border-top: 6px solid var(--gold);
}

.conflict-panel > aside {
  color: white;
  background: linear-gradient(135deg, #1f5f9d, #173a5e);
  border-color: transparent;
}

.conflict-panel h2 {
  margin: 0 0 14px;
  font-size: 28px;
}

.conflict-panel p {
  margin: 0;
  padding: 12px 0;
  border-top: 1px solid var(--line);
  line-height: 1.5;
}

.conflict-panel aside p {
  border-color: rgba(255, 255, 255, .18);
}

.conflict-panel strong {
  display: block;
  margin-top: 18px;
  padding: 14px;
  color: var(--ink);
  background: var(--gold);
  border-radius: var(--radius-small);
  line-height: 1.35;
}

.sources-panel,
.poll-panel,
.comments-panel,
.admin-intro,
.admin-form,
.output-panel {
  margin-top: 14px;
  padding: clamp(18px, 3vw, 28px);
}

.source-list {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 10px;
  margin-top: 16px;
}

.source-list a {
  padding: 14px;
  background: #f8fbfe;
  border-left: 5px solid var(--blue);
  border-radius: var(--radius-small);
  font-weight: 800;
  line-height: 1.35;
}

.poll-actions {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 10px;
  margin: 16px 0;
}

.poll-button {
  padding: 16px;
  color: white;
  background: var(--blue);
  border-radius: var(--radius-small);
}

.poll-button:first-child {
  background: #2f78ba;
}

.poll-button:disabled {
  opacity: .7;
  cursor: default;
}

.poll-bars {
  display: grid;
  gap: 10px;
}

.poll-bars div {
  position: relative;
  display: grid;
  grid-template-columns: 1fr auto;
  gap: 10px;
  padding: 11px;
  overflow: hidden;
  background: #edf4fb;
  border-radius: var(--radius-small);
  font-weight: 900;
}

.poll-bars i {
  position: absolute;
  inset: 0 auto 0 0;
  z-index: 0;
  background: rgba(31, 104, 173, .16);
}

.poll-bars span,
.poll-bars strong {
  z-index: 1;
}

.comment-form,
.admin-form {
  display: grid;
  gap: 10px;
}

.comment-form {
  grid-template-columns: 220px 1fr auto;
  margin: 16px 0;
}

.comment-side-picker {
  grid-column: 1 / -1;
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 10px;
  border: 0;
  padding: 0;
  margin: 0;
}

.comment-side-picker legend {
  grid-column: 1 / -1;
  margin-bottom: 2px;
  font-weight: 900;
}

.comment-side-picker label {
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 12px;
  border: 1px solid var(--line);
  background: #f8fbfe;
  border-radius: var(--radius-small);
  font-weight: 900;
  cursor: pointer;
}

.comment-side-picker input {
  width: auto;
}

input,
textarea {
  width: 100%;
  border: 1px solid var(--line);
  padding: 12px;
  font: inherit;
  background: white;
  border-radius: var(--radius-small);
  color: var(--ink);
}

textarea {
  min-height: 120px;
  resize: vertical;
}

.comment-list {
  display: grid;
  gap: 10px;
}

.comment-columns {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 14px;
  align-items: start;
}

.comment-column {
  display: grid;
  gap: 10px;
  min-width: 0;
}

.comment-column-head {
  border-top: 5px solid var(--blue);
  padding: 12px;
  background: #f8fbfe;
  border-left: 1px solid var(--line);
  border-right: 1px solid var(--line);
  border-bottom: 1px solid var(--line);
  border-radius: var(--radius) var(--radius) 0 0;
}

.comment-column.red .comment-column-head {
  border-top-color: var(--blue);
}

.comment-column.blue .comment-column-head {
  border-top-color: #75a9d8;
}

.comment-column-head span,
.comment-column-head small {
  display: block;
  color: var(--muted);
  font-weight: 900;
}

.comment-column-head h3 {
  margin: 5px 0;
  font-size: 20px;
  line-height: 1.1;
}

.comment {
  display: grid;
  grid-template-columns: 1fr auto;
  gap: 14px;
  padding: 14px;
  background: #f8fbfe;
  border: 1px solid var(--line);
  border-radius: var(--radius-small);
}

.comment.top-comment {
  background: white;
  border-color: #c7d9ea;
  box-shadow: 0 10px 22px rgba(31, 104, 173, .11);
}

.comment em {
  display: inline-block;
  margin-bottom: 6px;
  color: var(--blue);
  font-style: normal;
  font-size: 12px;
  font-weight: 900;
  text-transform: uppercase;
}

.comment p {
  margin: 6px 0 0;
  color: var(--muted);
  line-height: 1.45;
}

.reply-thread {
  display: grid;
  gap: 8px;
  margin-top: 12px;
  padding-left: 12px;
  border-left: 3px solid #c9dceb;
}

.comment-reply {
  padding: 10px;
  background: white;
  border: 1px solid var(--line);
  border-radius: var(--radius-small);
}

.comment-reply strong {
  color: var(--blue);
  font-size: 14px;
}

.comment-reply p {
  margin-top: 4px;
  font-size: 14px;
}

.reply-form {
  display: grid;
  grid-template-columns: 120px 1fr auto;
  gap: 7px;
  align-items: start;
}

.reply-form input {
  padding: 10px;
  font-size: 13px;
}

.reply-form button {
  padding: 10px 12px;
  color: white;
  background: #366f9f;
  border-radius: var(--radius-small);
  font-size: 13px;
  font-weight: 900;
}

.empty-comments {
  margin: 0;
  padding: 14px;
  color: var(--muted);
  background: #f8fbfe;
  border: 1px dashed var(--line);
  border-radius: var(--radius-small);
}

.like-button {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  align-self: start;
  padding: 10px 12px;
  color: white;
  background: var(--blue);
  border-radius: var(--radius-small);
}

.like-button span {
  font-size: 16px;
  line-height: 1;
}

.like-button:disabled {
  opacity: .58;
  cursor: default;
  background: #7f97ad;
}

.admin-shell {
  max-width: 920px;
  padding: 22px 0 38px;
}

.admin-form label {
  display: grid;
  gap: 7px;
  font-weight: 900;
}

#generatedOutput {
  min-height: 360px;
  font-family: Consolas, monospace;
  font-size: 13px;
}

.editor-shell {
  width: min(1380px, calc(100% - 24px));
  padding: 18px 0 42px;
}

.editor-intro {
  display: flex;
  align-items: end;
  justify-content: space-between;
  gap: 18px;
  padding: 18px;
  background: white;
  border: 1px solid var(--line);
  border-top: 5px solid var(--blue);
  border-radius: var(--radius);
  box-shadow: var(--shadow);
}

.editor-intro h1 {
  margin: 6px 0 8px;
  font-size: clamp(30px, 4vw, 48px);
  line-height: 1;
}

.editor-intro p {
  max-width: 780px;
  margin: 0;
  color: var(--muted);
  line-height: 1.5;
}

.editor-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}

.editor-grid {
  display: grid;
  grid-template-columns: 270px minmax(0, 1fr) 330px;
  gap: 12px;
  margin-top: 12px;
}

.topic-manager,
.editor-form,
.editor-preview {
  background: white;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  box-shadow: var(--shadow);
}

.topic-manager,
.editor-preview {
  align-self: start;
  position: sticky;
  top: 112px;
  padding: 14px;
}

.manager-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
}

.manager-head h2,
.editor-preview h2,
.export-box h2 {
  margin: 0 0 10px;
  font-size: 22px;
}

.manager-head span {
  color: var(--muted);
  font-size: 12px;
  font-weight: 900;
}

.topic-list-editor {
  display: grid;
  gap: 7px;
  margin-top: 10px;
  max-height: 68vh;
  overflow: auto;
}

.editor-topic {
  display: grid;
  gap: 5px;
  width: 100%;
  padding: 10px;
  text-align: left;
  background: #f8fbfe;
  border: 1px solid var(--line);
  border-radius: var(--radius-small);
  cursor: pointer;
}

.editor-topic.active {
  background: var(--soft-blue);
  border-color: var(--blue);
}

.editor-topic strong {
  line-height: 1.15;
}

.editor-topic span {
  color: var(--muted);
  font-size: 12px;
  font-weight: 900;
}

.editor-form {
  display: grid;
  gap: 12px;
  padding: 16px;
}

.editor-form label {
  display: grid;
  gap: 7px;
  font-weight: 900;
}

.editor-subsection {
  display: grid;
  gap: 12px;
  padding: 14px;
  background: #f8fbfe;
  border: 1px solid var(--line);
  border-radius: var(--radius);
}

.editor-subsection h2 {
  margin: 0;
  font-size: 22px;
}

.field-hint {
  margin: -4px 0 2px;
  color: var(--muted);
  font-size: 13px;
  line-height: 1.35;
}

.editor-form textarea {
  min-height: 92px;
}

.form-row {
  display: grid;
  gap: 10px;
}

.form-row.two {
  grid-template-columns: repeat(2, minmax(0, 1fr));
}

.form-row.three {
  grid-template-columns: repeat(3, minmax(0, 1fr));
}

select {
  width: 100%;
  border: 1px solid var(--line);
  padding: 12px;
  font: inherit;
  background: white;
  border-radius: var(--radius-small);
  color: var(--ink);
}

.editor-savebar {
  display: flex;
  align-items: center;
  gap: 12px;
  position: sticky;
  bottom: 0;
  padding: 12px 0 0;
  background: white;
  border-top: 1px solid var(--line);
  border-radius: 0 0 var(--radius) var(--radius);
}

#saveStatus {
  color: var(--green);
  font-weight: 900;
}

.editor-card-preview {
  min-height: 280px;
  margin-bottom: 14px;
}

.export-box {
  padding-top: 14px;
  margin-top: 14px;
  border-top: 1px solid var(--line);
}

.export-box p {
  color: var(--muted);
  line-height: 1.45;
}

#exportOutput,
#importInput {
  min-height: 160px;
  margin-top: 10px;
  font-family: Consolas, monospace;
  font-size: 12px;
}

.footer {
  display: flex;
  justify-content: space-between;
  gap: 16px;
  padding: 24px clamp(14px, 3vw, 34px);
  color: white;
  background: #1f5f9d;
}

.footer a {
  color: white;
  font-weight: 900;
}

.legal-page {
  width: min(980px, calc(100% - 28px));
  padding: 34px 0 48px;
}

.legal-page h1 {
  margin: 8px 0 18px;
  color: var(--blue-dark);
  font-size: clamp(34px, 5vw, 56px);
  line-height: 1;
}

.legal-page section {
  margin-top: 18px;
  padding: 18px;
  background: white;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  box-shadow: 0 10px 24px rgba(31, 104, 173, .08);
}

.legal-page h2 {
  margin: 0 0 10px;
  color: var(--blue);
  font-size: 24px;
}

.legal-page p {
  color: var(--muted);
  line-height: 1.65;
}

.reference-list {
  display: grid;
  gap: 10px;
}

.reference-list a {
  padding: 12px;
  background: #f8fbfe;
  border-left: 5px solid var(--blue);
  border-radius: var(--radius-small);
  font-weight: 900;
}

@media (max-width: 1040px) {
  .hero-news,
  .war-hero,
  .news-layout,
  .editor-grid {
    grid-template-columns: 1fr;
  }

  .desk-rail {
    display: none;
  }

  .topic-manager,
  .editor-preview {
    position: static;
  }

  .side-promos,
  .topic-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .side-promos,
  .right-rail {
    min-height: 0;
    grid-template-rows: none;
  }

  .topic-card.small {
    grid-template-columns: 130px 1fr;
  }

  .topic-card.rail {
    grid-template-columns: 150px 1fr;
    min-height: 104px;
  }

  .map-nodes {
    grid-template-columns: repeat(4, minmax(0, 1fr));
  }
}

@media (max-width: 720px) {
  main {
    width: min(100% - 20px, 1220px);
  }

  .topbar,
  .footer,
  .section-head,
  .editor-intro,
  .battle-proposal,
  .argument-ring,
  .conflict-panel,
  .poll-actions,
  .comment-form,
  .comment-side-picker,
  .comment-columns,
  .comment,
  .reply-form,
  .map-links {
    grid-template-columns: 1fr;
  }

  .topbar,
  .footer,
  .section-head,
  .editor-intro {
    align-items: start;
    flex-direction: column;
  }

  .form-row.two,
  .form-row.three {
    grid-template-columns: 1fr;
  }

  .lead-link {
    min-height: 0;
  }

  .side-promos,
  .topic-grid,
  .proposal-row,
  .source-list,
  .map-nodes {
    grid-template-columns: 1fr;
  }

  .topic-card {
    grid-template-rows: 190px 1fr;
    min-height: 0;
  }

  .topic-card.small,
  .topic-card.rail {
    grid-template-columns: 130px 1fr;
    min-height: 130px;
  }

  .topic-card.underlead {
    grid-template-rows: 1fr;
    min-height: 0;
  }

  .topic-grid .topic-card:nth-child(1),
  .topic-grid .topic-card:nth-child(6) {
    grid-column: span 1;
  }

  .map-link {
    grid-template-columns: 1fr;
  }

  .war-title h1,
  .lead-copy h1 {
    font-size: 36px;
  }
}
