:root {
  --surface: #ffffff;
  --surface-soft: #ffffff;
  --surface-line: #c3c7cc;
  --text: #181c21;
  --muted: #43474b;
  --primary: #324858;
  --primary-soft: #e5e8ef;
  --danger: #93000a;
}

* {
  box-sizing: border-box;
}

body {
  margin: 0;
  background: var(--surface);
  color: var(--text);
  font-family: Inter, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
  font-size: 18px;
  line-height: 1.6;
}

a {
  color: inherit;
}

.site-header {
  margin: 0 auto;
  padding: 24px 32px;
}

.site-footer {
  max-width: 880px;
  margin: 0 auto;
  padding: 24px 32px;
}

.site-header {
  display: flex;
  justify-content: space-between;
  gap: 24px;
  border-bottom: 1px solid var(--surface-line);
  background: var(--surface);
  position: sticky;
  top: 0;
  width: 80vw;
  z-index: 10;
}

.brand,
.site-header nav a {
  text-decoration: none;
}

.sr-only {
  height: 1px;
  margin: -1px;
  overflow: hidden;
  position: absolute;
  width: 1px;
}

.brand {
  font-size: 20px;
  line-height: 1.25;
}

.brand,
h1,
h2,
h3 {
  font-family: "Playfair Display", Georgia, serif;
}

.site-header nav {
  display: flex;
  flex-wrap: wrap;
  gap: 10px 16px;
  font-size: 14px;
  justify-content: flex-end;
}

.nav-toggle {
  align-items: center;
  align-self: flex-start;
  background: white;
  border: 1px solid var(--surface-line);
  border-radius: 4px;
  display: none;
  flex-direction: column;
  gap: 4px;
  height: 40px;
  justify-content: center;
  margin-left: auto;
  padding: 0;
  width: 44px;
}

.nav-toggle span:not(.sr-only) {
  background: var(--text);
  display: block;
  height: 2px;
  width: 18px;
}

.site-header.nav-overflow {
  align-items: flex-start;
  display: grid;
  grid-template-columns: 1fr auto;
}

.site-header.nav-overflow .nav-toggle {
  display: flex;
}

.site-header.nav-overflow nav {
  display: none;
  grid-column: 1 / -1;
  justify-content: flex-start;
  padding-top: 16px;
}

.site-header.nav-overflow.nav-open nav {
  display: flex;
}

.page {
  max-width: 880px;
  margin: 0 auto;
  padding: 56px 32px;
}

.hero {
  text-align: center;
  padding: 48px 0 72px;
  border-bottom: 1px solid var(--surface-line);
}

.section-heading {
  align-items: baseline;
  display: flex;
  justify-content: space-between;
  gap: 16px;
}

.section-heading a {
  color: var(--muted);
  font-size: 12px;
  font-weight: 600;
  letter-spacing: .08em;
  text-decoration: none;
  text-transform: uppercase;
}

.eyebrow,
.article-meta,
.article-card span,
label {
  color: var(--muted);
  font-size: 12px;
  font-weight: 600;
  letter-spacing: .08em;
  text-transform: uppercase;
}

h1 {
  font-size: clamp(36px, 7vw, 56px);
  line-height: 1.12;
  margin: 12px 0 20px;
}

h2 {
  font-size: 32px;
  line-height: 1.25;
  margin-top: 48px;
}

h3 {
  font-size: 24px;
  line-height: 1.3;
}

.hero p {
  max-width: 680px;
  margin-left: auto;
  margin-right: auto;
  color: var(--muted);
  font-size: 20px;
}

.search-box {
  max-width: 640px;
  margin: 36px auto 0;
  text-align: left;
}

.search-box div {
  display: flex;
  gap: 12px;
  margin-top: 8px;
}

input,
textarea,
button {
  font: inherit;
}

input,
textarea {
  width: 100%;
  border: 1px solid var(--surface-line);
  border-radius: 4px;
  padding: 12px 14px;
}

textarea {
  min-height: 420px;
  font-family: Consolas, "Courier New", monospace;
  font-size: 15px;
  line-height: 1.5;
}

button,
.button {
  border: 1px solid var(--primary);
  background: var(--primary);
  color: white;
  border-radius: 4px;
  padding: 12px 18px;
  text-decoration: none;
  cursor: pointer;
}

.button.secondary,
button.secondary {
  background: white;
  color: var(--primary);
}

button.danger {
  border-color: var(--danger);
  background: var(--danger);
}

.article-list {
  display: grid;
  gap: 16px;
  margin-top: 24px;
}

.topic-section,
.latest-section {
  padding: 48px 0;
}

.featured-section {
  margin-left: calc(50% - 40vw);
  padding: 48px 0;
  width: 80vw;
}

.featured-section .section-heading {
  margin: 0;
  max-width: none;
  padding: 0;
}

.featured-slider {
  display: grid;
  grid-auto-columns: minmax(300px, 420px);
  grid-auto-flow: column;
  gap: 16px;
  margin-top: 24px;
  overflow-x: auto;
  padding: 0 0 8px;
  scroll-snap-type: x mandatory;
}

.featured-slide {
  border: 1px solid var(--surface-line);
  border-radius: 4px;
  color: var(--text);
  display: grid;
  min-height: 260px;
  padding: 24px;
  scroll-snap-align: start;
  text-decoration: none;
}

.featured-slide img {
  height: 160px;
  margin: -24px -24px 18px;
  object-fit: cover;
  width: calc(100% + 48px);
}

.featured-slide span,
.topic-card span {
  color: var(--muted);
  font-size: 12px;
  font-weight: 600;
  letter-spacing: .08em;
  text-transform: uppercase;
}

.featured-slide h3,
.featured-slide p {
  margin-bottom: 0;
}

.topic-section {
  border-top: 1px solid var(--surface-line);
  text-align: center;
}

.topic-grid {
  display: grid;
  gap: 16px;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  margin-top: 24px;
  text-align: left;
}

.topic-card {
  border: 1px solid var(--surface-line);
  border-radius: 4px;
  min-height: 190px;
  padding: 24px;
  text-decoration: none;
}

.topic-card h3 {
  margin: 10px 0 8px;
}

.topic-card p {
  color: var(--muted);
  margin: 0;
}

.article-card {
  display: block;
  border: 1px solid var(--surface-line);
  border-radius: 4px;
  padding: 24px;
  text-decoration: none;
}

.article-card:hover {
  background: var(--surface-soft);
}

.article-card h2,
.article-card h3 {
  margin: 8px 0;
}

.article-card p {
  color: var(--muted);
  margin-bottom: 0;
}

.checkbox-card {
  cursor: pointer;
  display: grid;
  gap: 6px;
}

.checkbox-card input {
  width: auto;
}

.checkbox-card small {
  color: var(--muted);
}

.article {
  max-width: 760px;
  margin: 0 auto;
}

.article-image {
  display: block;
  width: 100%;
  max-height: 480px;
  object-fit: contain;
  background: var(--surface-soft);
  margin-bottom: 28px;
}

.article-meta {
  border-top: 1px solid var(--surface-line);
  padding-top: 16px;
  margin-bottom: 32px;
}

.pending-review-notice {
  border: 1px solid var(--surface-line);
  border-left: 4px solid var(--primary);
  border-radius: 4px;
  color: var(--muted);
  font-size: 16px;
  margin: 0 0 24px;
  padding: 14px 16px;
}

.article-summary-box {
  border: 1px solid var(--surface-line);
  border-radius: 4px;
  color: var(--text);
  font-size: 20px;
  line-height: 1.55;
  margin: 0 0 32px;
  padding: 18px 20px;
}

.article p,
.article li {
  color: var(--text);
}

.article blockquote {
  border-left: 3px solid var(--primary);
  margin-left: 0;
  padding-left: 20px;
  color: var(--muted);
}

.site-footer {
  border-top: 1px solid var(--surface-line);
  color: var(--muted);
  font-size: 16px;
}

.editor-page form,
.editor-panel {
  display: grid;
  gap: 14px;
  border: 1px solid var(--surface-line);
  border-radius: 4px;
  padding: 24px;
  margin: 24px 0;
}

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

.draft-review-layout {
  display: grid;
  grid-template-columns: minmax(220px, 280px) minmax(0, 1fr);
  gap: 32px;
  align-items: start;
}

.draft-sidebar {
  position: sticky;
  top: 24px;
  border-right: 1px solid var(--surface-line);
  padding-right: 20px;
}

.draft-sidebar h2 {
  margin-top: 0;
}

.draft-links {
  list-style: none;
  margin: 0;
  padding: 0;
}

.draft-links li a {
  display: block;
  padding: 10px 12px;
  color: var(--text);
  text-decoration: none;
  border-left: 3px solid transparent;
}

.draft-links li a:hover,
.draft-links li.active a {
  background: var(--surface-soft);
  border-left-color: var(--primary);
}

.draft-preview {
  min-width: 0;
}

.draft-file {
  color: var(--muted);
  font-family: monospace;
  font-size: 14px;
}

.review-decision {
  border-bottom: 1px solid var(--surface-line);
  padding-bottom: 24px;
  margin-bottom: 28px;
}

.review-image {
  display: block;
  width: 100%;
  max-height: 420px;
  object-fit: contain;
  background: var(--surface-soft);
  margin-bottom: 18px;
}

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

.approval-columns h3 {
  margin: 0 0 6px;
}

.approval-status {
  color: var(--muted);
  margin: 0 0 12px;
}

.article-preview {
  max-width: 760px;
}

.article-preview h1 {
  display: none;
}

.error {
  color: var(--danger);
}

@media (max-width: 640px) {
  body {
    font-size: 17px;
  }

  .site-header {
    align-items: flex-start;
  }

  .page {
    padding: 36px 20px;
  }

  .featured-section {
    padding-left: 0;
    padding-right: 0;
  }

  .site-header nav {
    gap: 12px 16px;
    justify-content: flex-start;
  }

  .topic-grid {
    grid-template-columns: 1fr;
  }

  .draft-review-layout {
    grid-template-columns: 1fr;
    gap: 20px;
  }

  .draft-sidebar {
    position: static;
    border-right: 0;
    border-bottom: 1px solid var(--surface-line);
    padding: 0 0 16px;
  }

  .approval-columns {
    grid-template-columns: 1fr;
  }

  .search-box div {
    flex-direction: column;
  }
}

@media print {
  .site-header {
    position: static;
  }
}
