:root {
  --bg: #eef2f5;
  --surface: #ffffff;
  --surface-soft: #f7f9fb;
  --line: #d7e0e8;
  --line-strong: #c7d2dc;
  --text: #243746;
  --muted: #6a7b89;
  --accent: #1a6596;
  --accent-soft: #eaf3f9;
  --success: #1d7f55;
  --danger: #b04949;
  --shadow: 0 8px 24px rgba(35, 55, 70, 0.05);
  --radius-lg: 14px;
  --radius-md: 10px;
  --container: 1140px;
}

*,
*::before,
*::after {
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
}

body {
  margin: 0;
  min-height: 100vh;
  font-family: "Source Sans 3", sans-serif;
  color: var(--text);
  background: var(--bg);
}

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

img {
  display: block;
  width: 100%;
  max-width: 100%;
}

button,
input,
select,
textarea {
  font: inherit;
}

.container {
  width: min(var(--container), calc(100% - 2rem));
  margin: 0 auto;
}

.sr-only {
  position: absolute;
  width: 1px;
  height: 1px;
  padding: 0;
  margin: -1px;
  overflow: hidden;
  clip: rect(0, 0, 0, 0);
  white-space: nowrap;
  border: 0;
}

.reading-progress {
  position: fixed;
  top: 0;
  left: 0;
  width: 0;
  height: 3px;
  background: linear-gradient(90deg, var(--accent), #60a4d1);
  z-index: 100;
}

.site-header {
  position: sticky;
  top: 0;
  z-index: 60;
  background: rgba(255, 255, 255, 0.96);
  border-bottom: 1px solid var(--line);
  backdrop-filter: blur(10px);
}

.header-inner,
.footer-inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
  min-height: 74px;
}

.brand {
  display: inline-flex;
  align-items: center;
  gap: 0.85rem;
}

.brand-mark {
  display: grid;
  place-items: center;
  width: 44px;
  height: 44px;
  border-radius: 10px;
  overflow: hidden;
  background: #fff;
  border: 1px solid var(--line);
  padding: 0;
  box-shadow: 0 3px 10px rgba(35, 55, 70, 0.08);
}

.brand-mark img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.brand-copy {
  display: grid;
  gap: 0.05rem;
}

.brand-copy strong {
  font-size: 1.05rem;
  font-weight: 700;
  color: #1f2f3a;
}

.brand-copy span {
  color: var(--muted);
  font-size: 0.8rem;
}

.primary-nav {
  display: flex;
  align-items: center;
  gap: 1.4rem;
}

.nav-form {
  margin: 0;
}

.nav-link,
.nav-button {
  color: var(--muted);
  font-size: 0.92rem;
  font-weight: 600;
  background: none;
  border: 0;
  cursor: pointer;
}

.nav-link:hover,
.nav-link:focus-visible,
.nav-button:hover,
.nav-button:focus-visible {
  color: var(--accent);
}

.nav-toggle {
  display: none;
  width: 42px;
  height: 42px;
  align-items: center;
  justify-content: center;
  gap: 4px;
  flex-direction: column;
  border: 1px solid var(--line);
  border-radius: 10px;
  background: #fff;
}

.nav-toggle span {
  width: 18px;
  height: 2px;
  background: var(--text);
  border-radius: 999px;
}

.site-main {
  padding: 1.5rem 0 3rem;
}

.flash-stack {
  display: grid;
  gap: 0.75rem;
  padding-top: 1rem;
}

.flash {
  padding: 0.9rem 1rem;
  border: 1px solid var(--line);
  border-radius: var(--radius-md);
  background: #fff;
}

.flash-success {
  border-color: rgba(29, 127, 85, 0.3);
}

.flash-error {
  border-color: rgba(176, 73, 73, 0.3);
}

.front-page,
.subpage-section,
.article-page {
  padding: 0.25rem 0 0;
}

.page-intro {
  margin-bottom: 1.4rem;
  padding: 1.4rem 1.5rem;
  border: 1px solid var(--line);
  border-radius: var(--radius-lg);
  background: #fff;
}

.compact-intro {
  margin-bottom: 1rem;
}

.section-label {
  margin: 0 0 0.45rem;
  color: var(--accent);
  font-size: 0.78rem;
  font-weight: 700;
  letter-spacing: 0.12em;
  text-transform: uppercase;
}

.page-intro h1,
.section-heading-simple h2,
.article-header-simple h1,
.list-card-body h2,
.lead-body h2,
.side-story h3,
.story-card-body h3 {
  margin: 0;
  color: var(--accent);
  letter-spacing: -0.02em;
}

.page-intro h1 {
  font-size: clamp(2rem, 4vw, 2.8rem);
  line-height: 1.04;
}

.page-lede,
.lead-summary,
.side-story p,
.story-card-body p,
.list-card-body p,
.article-intro,
.article-body-simple,
.section-note {
  color: var(--muted);
}

.page-lede {
  max-width: 48rem;
  margin: 0.7rem 0 0;
  font-size: 1.05rem;
  line-height: 1.6;
}

.front-grid {
  display: grid;
  grid-template-columns: minmax(0, 1.55fr) minmax(280px, 0.78fr);
  gap: 1rem;
  align-items: start;
}

.lead-card,
.side-story,
.story-card,
.list-card,
.panel-card,
.article-card,
.empty-panel {
  border: 1px solid var(--line);
  border-radius: var(--radius-lg);
  background: #fff;
  box-shadow: var(--shadow);
}

.lead-card {
  overflow: hidden;
}

.lead-media,
.article-media-large,
.story-card-media,
.list-card-media {
  display: block;
  background: var(--surface-soft);
}

.lead-media {
  aspect-ratio: 16 / 8.5;
  border-bottom: 1px solid var(--line);
}

.lead-media img,
.article-media-large img,
.story-card-media img,
.list-card-media img {
  height: 100%;
  object-fit: cover;
}

.media-fallback {
  width: 100%;
  height: 100%;
  min-height: 100%;
  background: linear-gradient(145deg, #eef3f7, #dce8f0);
}

.lead-body,
.side-story,
.story-card-body,
.article-header-simple,
.article-body-simple,
.panel-card,
.empty-panel {
  padding: 1.2rem 1.3rem;
}

.lead-body h2 {
  font-size: clamp(2rem, 3vw, 2.8rem);
  line-height: 1.02;
  margin-top: 0.25rem;
}

.lead-summary {
  margin: 0.9rem 0 0;
  font-size: 1.08rem;
  line-height: 1.65;
}

.story-source,
.article-stand,
.article-author,
.source-note {
  margin: 0.9rem 0 0;
  color: var(--muted);
  font-size: 0.92rem;
}

.article-meta-row {
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  gap: 0.7rem;
  color: var(--muted);
  font-size: 0.84rem;
}

.story-tag,
.status {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 24px;
  padding: 0.1rem 0.5rem;
  border-radius: 999px;
  background: var(--accent-soft);
  color: var(--accent);
  font-size: 0.75rem;
  font-weight: 700;
}

.side-stack,
.source-list {
  display: grid;
  gap: 0.8rem;
}

.side-story h3,
.story-card-body h3,
.list-card-body h2 {
  margin-top: 0.55rem;
  font-size: 1.45rem;
  line-height: 1.08;
}

.side-story p,
.story-card-body p,
.list-card-body p {
  margin: 0.6rem 0 0;
  line-height: 1.55;
}

.side-story h3 a:hover,
.lead-body h2 a:hover,
.story-card-body h3:hover,
.list-card-body h2:hover {
  color: #0f4f79;
}

.stories-section,
.related-section {
  margin-top: 1.1rem;
}

.section-heading-simple {
  display: flex;
  justify-content: space-between;
  align-items: end;
  gap: 1rem;
  margin-bottom: 0.9rem;
}

.section-heading-simple h2 {
  font-size: clamp(1.6rem, 2.5vw, 2.2rem);
  line-height: 1.08;
}

.section-note {
  margin: 0;
  font-size: 0.92rem;
}

.story-grid,
.related-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 1rem;
}

.story-card,
.list-card {
  overflow: hidden;
}

.story-card > a {
  display: block;
  height: 100%;
}

.story-card-media {
  aspect-ratio: 16 / 9;
  border-bottom: 1px solid var(--line);
}

.story-card-body h3 {
  font-size: 1.3rem;
}

.story-card-body p {
  display: -webkit-box;
  -webkit-box-orient: vertical;
  overflow: hidden;
  -webkit-line-clamp: 3;
}

.story-card-body .story-source {
  display: block;
  overflow: visible;
  -webkit-line-clamp: unset;
  -webkit-box-orient: initial;
}

.breadcrumbs {
  display: flex;
  flex-wrap: wrap;
  gap: 0.55rem;
  margin: 0 0 1rem;
  color: var(--muted);
  font-size: 0.9rem;
}

.breadcrumbs a:hover {
  color: var(--accent);
}

.article-card {
  overflow: hidden;
}

.article-media-large {
  aspect-ratio: 16 / 8;
  border-bottom: 1px solid var(--line);
}

.article-header-simple h1 {
  font-size: clamp(2.1rem, 4vw, 3.1rem);
  line-height: 1.05;
}

.article-intro {
  margin: 0.8rem 0 0;
  font-size: 1.18rem;
  line-height: 1.6;
}

.article-body-simple {
  padding-top: 0;
  color: var(--text);
  font-size: 1.08rem;
  line-height: 1.78;
}

.article-body-simple p,
.article-body-simple ul,
.article-body-simple ol,
.article-body-simple blockquote,
.article-body-simple figure {
  margin: 0 0 1rem;
}

.article-body-simple h2,
.article-body-simple h3,
.article-body-simple h4 {
  margin: 1.7rem 0 0.8rem;
  color: var(--accent);
  line-height: 1.12;
}

.article-body-simple h2 {
  font-size: 2rem;
}

.article-body-simple h3 {
  font-size: 1.6rem;
}

.article-body-simple h4 {
  font-size: 1.25rem;
}

.article-body-simple a,
.article-source-link {
  color: var(--accent);
  text-decoration: underline;
  text-underline-offset: 0.18em;
}

.article-body-simple img {
  border-radius: var(--radius-md);
  margin-top: 0.3rem;
}

.article-body-simple figcaption {
  margin-top: 0.45rem;
  color: var(--muted);
  font-size: 0.9rem;
}

.article-body-simple blockquote {
  padding: 0.85rem 1rem;
  border-left: 3px solid #8ab2cf;
  background: var(--surface-soft);
}

.article-source-note {
  margin-top: 1.6rem;
  padding-top: 1rem;
  border-top: 1px solid var(--line);
}

.list-feed {
  display: grid;
  gap: 1rem;
}

.list-card-link {
  display: grid;
  grid-template-columns: 270px minmax(0, 1fr);
  gap: 1rem;
  align-items: stretch;
}

.list-card-media {
  min-height: 100%;
}

.list-card-media img,
.list-card-media .media-fallback {
  height: 100%;
}

.list-card-body {
  padding: 1rem 1.1rem 1rem 0;
}

.narrow-shell {
  max-width: 640px;
}

.admin-layout {
  display: grid;
  grid-template-columns: minmax(0, 1.25fr) minmax(290px, 0.75fr);
  gap: 1rem;
}

.admin-main,
.admin-side {
  display: grid;
  gap: 1rem;
}

.form-panel {
  padding: 1.2rem 1.3rem;
}

.editor-shell {
  display: grid;
  gap: 0.9rem;
}

.editor-header {
  display: flex;
  justify-content: space-between;
  align-items: start;
  gap: 1rem;
}

.editor-header span,
.preview-panel > span,
.editor-field > span {
  display: block;
  color: var(--text);
  font-size: 0.9rem;
  font-weight: 700;
}

.editor-toolbar {
  display: flex;
  flex-wrap: wrap;
  gap: 0.55rem;
  padding: 0.8rem;
  border: 1px solid var(--line);
  border-radius: var(--radius-md);
  background: var(--surface-soft);
}

.editor-button {
  padding: 0.45rem 0.7rem;
  border: 1px solid var(--line-strong);
  border-radius: 999px;
  background: #fff;
  color: var(--text);
  font-size: 0.82rem;
  font-weight: 600;
  cursor: pointer;
}

.editor-button:hover,
.editor-button:focus-visible {
  border-color: var(--accent);
  color: var(--accent);
}

.editor-grid {
  display: grid;
  grid-template-columns: minmax(0, 1.1fr) minmax(280px, 0.9fr);
  gap: 1rem;
  align-items: start;
}

.editor-field {
  display: grid;
  gap: 0.45rem;
}

.html-editor {
  min-height: 440px;
  font-family: Consolas, "Courier New", monospace;
  font-size: 0.92rem;
  line-height: 1.6;
}

.preview-panel {
  display: grid;
  gap: 0.45rem;
}

.preview-body {
  min-height: 440px;
  padding: 1rem;
  border: 1px solid var(--line);
  border-radius: var(--radius-md);
  background: #fff;
  overflow: auto;
}

.source-form {
  display: grid;
  gap: 1rem;
}

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

label {
  display: grid;
  gap: 0.4rem;
  color: var(--text);
  font-size: 0.9rem;
  font-weight: 600;
}

input,
select,
textarea {
  width: 100%;
  padding: 0.85rem 0.95rem;
  border: 1px solid var(--line-strong);
  border-radius: var(--radius-md);
  background: #fff;
  color: var(--text);
}

textarea {
  resize: vertical;
}

.checkbox-row {
  display: flex;
  align-items: center;
  gap: 0.65rem;
}

.checkbox-row input {
  width: auto;
}

.field-error {
  color: var(--danger);
  font-size: 0.83rem;
}

.form-actions,
.footer-links,
.source-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 0.7rem;
  align-items: center;
}

.button {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 40px;
  padding: 0.7rem 1rem;
  border: 1px solid var(--line-strong);
  border-radius: 10px;
  background: #fff;
  color: var(--text);
  font-size: 0.9rem;
  font-weight: 600;
  cursor: pointer;
}

.button-primary {
  border-color: var(--accent);
  background: var(--accent);
  color: #fff;
}

.button-secondary {
  background: #fff;
}

.button-small {
  min-height: 34px;
  padding: 0.45rem 0.75rem;
  font-size: 0.84rem;
}

.advanced-panel {
  padding: 1rem;
  border: 1px solid var(--line);
  border-radius: var(--radius-md);
  background: var(--surface-soft);
}

.advanced-panel summary {
  cursor: pointer;
  font-weight: 700;
  color: var(--accent);
}

.panel-note {
  margin: 0.75rem 0 1rem;
  color: var(--muted);
}

.source-item {
  display: flex;
  justify-content: space-between;
  gap: 0.9rem;
  padding: 1rem;
}

.source-copy {
  min-width: 0;
}

.source-copy strong {
  display: block;
  font-size: 1rem;
}

.source-copy p {
  margin: 0.2rem 0 0;
  color: var(--muted);
  font-size: 0.93rem;
}

.status-on {
  color: var(--success);
  background: rgba(29, 127, 85, 0.12);
}

.status-off {
  color: var(--danger);
  background: rgba(176, 73, 73, 0.12);
}

.empty-panel {
  padding: 1.1rem 1.2rem;
}

.empty-panel p {
  margin: 0.45rem 0 0;
  color: var(--muted);
}

.site-footer {
  padding: 1.5rem 0 2.5rem;
}

.footer-inner {
  padding-top: 1rem;
  border-top: 1px solid var(--line);
}

.footer-inner strong {
  display: block;
  color: var(--text);
}

.footer-inner p {
  max-width: 42rem;
  margin: 0.35rem 0 0;
  color: var(--muted);
}

.footer-links {
  color: var(--muted);
}

.footer-links a:hover {
  color: var(--accent);
}

.reveal {
  opacity: 0;
  transform: translateY(10px);
  transition: opacity 0.45s ease, transform 0.45s ease;
}

.reveal.is-visible {
  opacity: 1;
  transform: translateY(0);
}

input:focus,
select:focus,
textarea:focus,
.button:focus-visible,
.nav-link:focus-visible,
.nav-button:focus-visible,
a:focus-visible {
  outline: 2px solid rgba(26, 101, 150, 0.28);
  outline-offset: 2px;
}

@media (max-width: 980px) {
  .front-grid,
  .story-grid,
  .related-grid,
  .admin-layout {
    grid-template-columns: 1fr;
  }

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

  .list-card-body {
    padding: 0 1rem 1rem;
  }

  .list-card-media {
    aspect-ratio: 16 / 9;
    border-bottom: 1px solid var(--line);
  }

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

  .source-item {
    flex-direction: column;
    align-items: start;
  }
}

@media (max-width: 780px) {
  .container {
    width: min(var(--container), calc(100% - 1rem));
  }

  .header-inner {
    min-height: 68px;
  }

  .nav-toggle {
    display: inline-flex;
  }

  .primary-nav {
    position: absolute;
    top: 69px;
    left: 0;
    right: 0;
    display: grid;
    gap: 0;
    padding: 0.7rem 1rem 1rem;
    background: #fff;
    border-bottom: 1px solid var(--line);
    transform: translateY(-10px);
    opacity: 0;
    pointer-events: none;
  }

  .primary-nav.is-open {
    transform: translateY(0);
    opacity: 1;
    pointer-events: auto;
  }

  .nav-link,
  .nav-button {
    padding: 0.85rem 0.1rem;
  }

  .form-grid,
  .footer-inner {
    grid-template-columns: 1fr;
  }

  .footer-inner {
    display: grid;
  }

  .page-intro,
  .lead-body,
  .side-story,
  .story-card-body,
  .article-header-simple,
  .article-body-simple,
  .panel-card {
    padding-left: 1rem;
    padding-right: 1rem;
  }

  .lead-body h2,
  .article-header-simple h1 {
    font-size: 2rem;
  }

  .editor-header {
    flex-direction: column;
  }

  .page-intro h1 {
    font-size: 1.85rem;
  }
}
