/* War Stories — editorial light pages (#FAFAF8, Georgia body) */

body.stories-theme {
  margin: 0;
  min-height: 100vh;
  background: #fafaf8;
  color: #1a1a1a;
  font-family: Georgia, 'Times New Roman', serif;
  line-height: 1.55;
}

.stories-wrap {
  max-width: 72rem;
  margin: 0 auto;
  padding: 0 1rem 3rem;
}

.stories-kicker {
  display: block;
  font-family: 'Space Mono', ui-monospace, monospace;
  font-size: 0.72rem;
  font-weight: 700;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: #888;
  margin: 0 0 0.5rem;
}

.stories-hero-title {
  font-family: 'Playfair Display', Georgia, serif;
  font-size: clamp(1.75rem, 4vw, 1.75rem);
  font-weight: 700;
  line-height: 1.2;
  margin: 0 0 0.75rem;
  color: #1a1a1a;
}

.stories-hero-lede {
  font-family: Georgia, serif;
  font-size: 1.05rem;
  line-height: 1.65;
  color: #444;
  max-width: 42rem;
  margin: 0 0 1.5rem;
}

.stories-hero {
  border-bottom: 1px solid #e5e5e5;
  padding: 1.75rem 0 1.5rem;
  margin-bottom: 1.25rem;
}

.stories-filters {
  display: flex;
  flex-wrap: wrap;
  gap: 0.5rem;
  margin: 0 0 1.25rem;
}

.stories-filter {
  font-family: 'Space Mono', ui-monospace, monospace;
  font-size: 0.68rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.04em;
  padding: 0.45rem 0.85rem;
  border: 1px solid #e5e5e5;
  border-radius: 999px;
  background: #fff;
  color: #555;
  cursor: pointer;
}

.stories-filter.is-active {
  background: #0ea5e9;
  border-color: #0ea5e9;
  color: #fff;
}

.stories-feed {
  display: flex;
  flex-direction: column;
}

.story-row {
  display: block;
  text-decoration: none;
  color: inherit;
  padding: 1.25rem 0;
  border-bottom: 1px solid #e5e5e5;
}

.story-row:hover .story-row-title {
  color: #0ea5e9;
}

.story-row-badges {
  display: flex;
  flex-wrap: wrap;
  gap: 0.5rem;
  margin-bottom: 0.45rem;
}

.story-badge {
  font-family: 'Space Mono', ui-monospace, monospace;
  font-size: 0.62rem;
  font-weight: 700;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: #0ea5e9;
}

.story-badge--cat {
  color: #888;
}

.story-row-title {
  font-family: 'Playfair Display', Georgia, serif;
  font-size: clamp(1.25rem, 3vw, 1.5rem);
  font-weight: 700;
  line-height: 1.25;
  margin: 0 0 0.4rem;
  transition: color 0.12s;
}

.story-row-meta {
  font-family: Georgia, serif;
  font-size: 0.88rem;
  color: #888;
  margin: 0 0 0.5rem;
}

.story-row-excerpt {
  font-family: Georgia, serif;
  font-size: 1rem;
  line-height: 1.65;
  color: #444;
  margin: 0;
  max-width: 52rem;
}

.stories-empty {
  padding: 2.5rem 0;
  text-align: center;
  font-family: Georgia, serif;
  color: #666;
}

.stories-empty p {
  margin: 0 0 1rem;
  font-size: 1.1rem;
}

.stories-btn {
  display: inline-block;
  font-family: 'Space Mono', ui-monospace, monospace;
  font-size: 0.75rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.06em;
  padding: 0.65rem 1.15rem;
  border: none;
  border-radius: 4px;
  cursor: pointer;
  text-decoration: none;
}

.stories-btn--primary {
  background: #0ea5e9;
  color: #fff;
}

.stories-btn--secondary {
  background: #fff;
  color: #1a1a1a;
  border: 1px solid #e5e5e5;
}

.stories-btn--publish {
  background: #10b981;
  color: #fff;
}

.stories-btn:disabled {
  opacity: 0.45;
  cursor: not-allowed;
}

.story-editor {
  max-width: 40rem;
  padding: 1.5rem 0 3rem;
}

.story-field {
  margin: 0 0 1.25rem;
}

.story-field label {
  display: block;
  font-family: 'Space Mono', ui-monospace, monospace;
  font-size: 0.68rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.06em;
  color: #888;
  margin-bottom: 0.35rem;
}

.story-field input,
.story-field select,
.story-field textarea {
  width: 100%;
  font-family: Georgia, serif;
  font-size: 1rem;
  padding: 0.65rem 0.75rem;
  border: 1px solid #e5e5e5;
  border-radius: 4px;
  background: #fff;
  color: #1a1a1a;
}

.story-field textarea {
  min-height: 400px;
  font-size: 16px;
  line-height: 1.8;
  resize: vertical;
}

.story-word-count {
  font-family: 'Space Mono', ui-monospace, monospace;
  font-size: 0.78rem;
  margin: 0.35rem 0 0;
}

.story-word-count--low {
  color: #cc1f1f;
}

.story-word-count--ok {
  color: #10b981;
}

.story-cpe-notice {
  font-family: Georgia, serif;
  font-size: 0.92rem;
  color: #666;
  background: #f5f5f3;
  border-left: 3px solid #0ea5e9;
  padding: 0.75rem 1rem;
  margin: 1rem 0 1.25rem;
  line-height: 1.55;
}

.story-editor-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 0.65rem;
}

.story-editor-msg {
  margin: 1rem 0 0;
  font-family: Georgia, serif;
  font-size: 0.95rem;
}

.story-editor-msg.err {
  color: #cc1f1f;
}

.story-editor-msg.ok {
  color: #10b981;
}

.story-article {
  max-width: 680px;
  margin: 0 auto;
  padding: 2rem 1rem 3rem;
}

.story-article-headline {
  font-family: 'Playfair Display', Georgia, serif;
  font-size: clamp(1.75rem, 5vw, 2rem);
  font-weight: 700;
  line-height: 1.2;
  margin: 0.5rem 0 0.75rem;
}

.story-article-byline {
  font-family: Georgia, serif;
  font-style: italic;
  font-size: 1rem;
  color: #666;
  margin: 0 0 1.25rem;
  padding-bottom: 1.25rem;
  border-bottom: 1px solid #e5e5e5;
}

.story-article-body {
  font-family: Georgia, serif;
  font-size: 18px;
  line-height: 1.9;
  color: #1a1a1a;
}

.story-article-body p {
  margin: 0 0 1.5rem;
}

.story-article-footer {
  margin-top: 2.5rem;
  padding-top: 1.5rem;
  border-top: 1px solid #e5e5e5;
}

.story-author-box {
  display: flex;
  gap: 1rem;
  align-items: flex-start;
  margin-bottom: 1.5rem;
}

.story-author-avatar {
  width: 48px;
  height: 48px;
  border-radius: 50%;
  background: #0ea5e9;
  color: #fff;
  font-family: 'Space Mono', ui-monospace, monospace;
  font-size: 1.1rem;
  font-weight: 700;
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
}

.story-author-name {
  font-family: 'Playfair Display', Georgia, serif;
  font-weight: 700;
  margin: 0 0 0.25rem;
}

.story-author-bio {
  font-size: 0.95rem;
  color: #555;
  margin: 0;
  line-height: 1.5;
}

.story-share-row {
  display: flex;
  flex-wrap: wrap;
  gap: 0.65rem;
  margin-bottom: 1.25rem;
}

.story-cert-note {
  font-family: Georgia, serif;
  font-size: 0.92rem;
  color: #555;
  background: #f5f5f3;
  padding: 0.85rem 1rem;
  border-radius: 4px;
  line-height: 1.55;
}

.story-cert-note a {
  color: #0ea5e9;
}

.stories-dash-header {
  display: flex;
  flex-wrap: wrap;
  align-items: flex-end;
  justify-content: space-between;
  gap: 1rem;
  padding: 1.5rem 0;
  border-bottom: 1px solid #e5e5e5;
  margin-bottom: 1rem;
}

.stories-cpe-progress {
  min-width: 12rem;
}

.stories-cpe-progress label {
  font-family: 'Space Mono', ui-monospace, monospace;
  font-size: 0.68rem;
  text-transform: uppercase;
  letter-spacing: 0.06em;
  color: #888;
  display: block;
  margin-bottom: 0.35rem;
}

.stories-cpe-progress strong {
  font-family: Georgia, serif;
  font-size: 1.1rem;
}

.stories-progress-bar {
  height: 6px;
  background: #e5e5e5;
  border-radius: 3px;
  overflow: hidden;
  margin-top: 0.5rem;
}

.stories-progress-bar span {
  display: block;
  height: 100%;
  background: #0ea5e9;
  transition: width 0.2s;
}

.stories-dash-table {
  width: 100%;
  border-collapse: collapse;
  font-family: Georgia, serif;
  font-size: 0.95rem;
}

.stories-dash-table th {
  font-family: 'Space Mono', ui-monospace, monospace;
  font-size: 0.62rem;
  text-transform: uppercase;
  letter-spacing: 0.06em;
  color: #888;
  text-align: left;
  padding: 0.65rem 0.5rem;
  border-bottom: 1px solid #e5e5e5;
}

.stories-dash-table td {
  padding: 0.85rem 0.5rem;
  border-bottom: 1px solid #e5e5e5;
  vertical-align: middle;
}

.story-status-badge {
  font-family: 'Space Mono', ui-monospace, monospace;
  font-size: 0.58rem;
  font-weight: 700;
  letter-spacing: 0.06em;
  padding: 0.2rem 0.45rem;
  border-radius: 3px;
}

.story-status-badge--published {
  background: rgba(16, 185, 129, 0.15);
  color: #10b981;
}

.story-status-badge--draft {
  background: rgba(136, 136, 136, 0.15);
  color: #888;
}

.stories-dash-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 0.35rem;
}

.stories-dash-actions a,
.stories-dash-actions button {
  font-family: 'Space Mono', ui-monospace, monospace;
  font-size: 0.62rem;
  font-weight: 700;
  text-transform: uppercase;
  padding: 0.35rem 0.55rem;
  border: 1px solid #e5e5e5;
  background: #fff;
  border-radius: 3px;
  cursor: pointer;
  text-decoration: none;
  color: #1a1a1a;
}

.stories-section-title {
  font-family: 'Space Mono', ui-monospace, monospace;
  font-size: 0.72rem;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  color: #888;
  margin: 1.5rem 0 0.75rem;
}

@media (max-width: 640px) {
  .stories-dash-table thead {
    display: none;
  }
  .stories-dash-table tr {
    display: block;
    padding: 1rem 0;
    border-bottom: 1px solid #e5e5e5;
  }
  .stories-dash-table td {
    display: block;
    border: none;
    padding: 0.25rem 0;
  }
}
