:root {
  --ink: #151922;
  --muted: #687281;
  --line: #d9dde3;
  --soft: #f6f4ef;
  --brand: #18324a;
  --accent: #8B1E3F;
  --green: #1f5d45;
  --paper: #fbfaf7;
  --white: #fff;
}

* { box-sizing: border-box; }
body {
  margin: 0;
  font-family: Inter, ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
  color: var(--ink);
  background: var(--paper);
}
a { color: var(--brand); text-decoration: none; }
.site-header {
  min-height: 82px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 24px;
  padding: 0 6vw;
  border-bottom: 1px solid var(--line);
  background: rgba(251, 250, 247, .96);
}
.brand { font-weight: 800; font-size: 1.35rem; color: var(--brand); }
.cag-logo {
  display: inline-flex;
  align-items: center;
  gap: 12px;
  text-decoration: none;
  color: #111;
  white-space: nowrap;
  flex: 0 0 auto;
}

.cag-logo-main {
  font-family: Georgia, "Times New Roman", serif;
  font-size: 34px;
  font-weight: 800;
  letter-spacing: 1px;
  line-height: 1;
}

.cag-logo-line {
  width: 38px;
  height: 2px;
  background: #8B1E3F;
  display: inline-block;
  transform: translateY(2px);
  transition: width .2s ease;
}

.cag-logo-sub {
  font-family: Arial, Helvetica, sans-serif;
  font-size: 13px;
  font-weight: 700;
  letter-spacing: 4px;
  color: #333;
  line-height: 1;
  transform: translateY(3px);
}

.cag-logo:hover .cag-logo-line {
  width: 48px;
}
nav { display: flex; align-items: center; gap: 18px; flex-wrap: wrap; }
.site-header nav a:not(.button) {
  color: #2d3642;
  font-weight: 650;
  font-size: .95rem;
}
.inline { display: inline; }
button, .button {
  border: 0;
  border-radius: 4px;
  padding: 12px 18px;
  background: var(--brand);
  color: #fff;
  font: inherit;
  font-weight: 700;
  cursor: pointer;
}
.button.secondary { background: var(--green); }
.button.danger { background: var(--accent); }
.button.small { display: inline-block; padding: 8px 11px; font-size: .92rem; }
.container { width: min(1200px, 90vw); margin: 0 auto; padding: 52px 0 86px; }
.hero { padding: 42px 0 46px; border-bottom: 1px solid var(--line); }
.mag-hero {
  display: grid;
  grid-template-columns: minmax(0, 1fr) 320px;
  gap: clamp(32px, 7vw, 90px);
  align-items: end;
  padding: clamp(54px, 9vw, 112px) 0 clamp(50px, 7vw, 82px);
  border-bottom: 1px solid var(--line);
}
.mag-hero-copy h1 {
  max-width: 900px;
  margin: 0;
  font-family: Georgia, "Times New Roman", serif;
  font-size: clamp(4rem, 12vw, 9.5rem);
  line-height: .86;
  letter-spacing: 0;
  color: var(--brand);
}
.mag-hero-copy p:not(.eyebrow) {
  max-width: 680px;
  margin: 26px 0 0;
  color: #4b5563;
  font-family: Georgia, "Times New Roman", serif;
  font-size: clamp(1.18rem, 2vw, 1.55rem);
  line-height: 1.75;
}
.mag-hero-note {
  border-left: 3px solid var(--accent);
  padding: 0 0 0 22px;
}
.mag-hero-note span {
  display: block;
  margin-bottom: 10px;
  color: var(--accent);
  font-size: .78rem;
  font-weight: 800;
  letter-spacing: .11em;
  text-transform: uppercase;
}
.mag-hero-note strong {
  display: block;
  color: var(--ink);
  font-family: Georgia, "Times New Roman", serif;
  font-size: 1.28rem;
  line-height: 1.55;
}
.hero h1, .page-head h1 { margin: 0; font-size: clamp(2.5rem, 7vw, 5.5rem); line-height: 1; color: var(--brand); letter-spacing: 0; }
.hero p, .page-head p { max-width: 720px; color: var(--muted); font-size: 1.2rem; line-height: 1.7; }
.eyebrow { color: var(--accent); font-weight: 700; text-transform: uppercase; letter-spacing: .08em; font-size: .8rem; }
.section { padding-top: 36px; }
.home-section { padding: clamp(48px, 7vw, 78px) 0; border-bottom: 1px solid var(--line); }
.section-title { display: flex; justify-content: space-between; align-items: center; gap: 16px; }
.section-title h2 {
  margin: 0;
  font-family: Georgia, "Times New Roman", serif;
  font-size: clamp(2rem, 4vw, 3.3rem);
  line-height: 1;
  color: var(--brand);
}
.section-title .eyebrow { margin: 0 0 10px; }
.hero .actions { margin-top: 24px; }
.article-list { display: grid; gap: 14px; }
.article-row, .card, .form-card, .review-card {
  border: 1px solid var(--line);
  border-radius: 6px;
  background: #fff;
}
.article-row { padding: 24px; }
.article-row h3 { margin: 0 0 10px; font-size: 1.45rem; }
.article-row p, .article-row span, .meta, .empty { color: var(--muted); }
.grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(220px, 1fr)); gap: 16px; }
.panel-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(240px, 1fr)); gap: 16px; }
.card { padding: 22px; display: grid; gap: 8px; }
.card span { color: var(--muted); }
.page-head { padding: 22px 0 34px; }
.compact h1 { font-size: clamp(2rem, 4vw, 3rem); }
.article-page { max-width: 820px; margin: 0 auto; }
.article-page h1 { font-size: clamp(2.2rem, 5vw, 4rem); line-height: 1.08; color: var(--brand); }
.prose { font-size: 1.17rem; line-height: 1.9; }
.issue-feature {
  display: grid;
  grid-template-columns: minmax(260px, 410px) minmax(0, 1fr);
  gap: clamp(30px, 6vw, 72px);
  align-items: center;
  margin-top: 28px;
}
.issue-cover {
  display: block;
  aspect-ratio: 3 / 4;
  border: 1px solid var(--line);
  background: #0d1015;
  box-shadow: 0 22px 48px rgba(21, 25, 34, .18);
  overflow: hidden;
}
.issue-cover img {
  width: 100%;
  height: 100%;
  display: block;
  object-fit: cover;
}
.cover-fallback {
  height: 100%;
  display: grid;
  place-items: center;
  align-content: center;
  gap: 18px;
  color: #fff;
}
.cover-fallback span {
  font-family: Georgia, "Times New Roman", serif;
  font-size: clamp(4rem, 10vw, 7.2rem);
  font-weight: 800;
}
.cover-fallback small {
  color: #e5dbe0;
  font-size: .92rem;
  font-weight: 800;
  letter-spacing: .22em;
}
.issue-copy h3 {
  margin: 0;
  font-family: Georgia, "Times New Roman", serif;
  font-size: clamp(2.4rem, 5vw, 4.7rem);
  line-height: 1;
  color: var(--brand);
}
.issue-copy p:not(.eyebrow) {
  max-width: 620px;
  color: #4b5563;
  font-size: 1.12rem;
  line-height: 1.85;
}
.article-card-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 18px;
  margin-top: 28px;
}
.article-card {
  min-height: 280px;
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  gap: 24px;
  padding: 26px;
  border: 1px solid var(--line);
  background: #fff;
}
.article-card h3 {
  margin: 0;
  color: var(--brand);
  font-family: Georgia, "Times New Roman", serif;
  font-size: 1.75rem;
  line-height: 1.18;
}
.article-card p {
  margin: 16px 0 0;
  color: #596474;
  line-height: 1.75;
}
.article-meta {
  display: flex;
  flex-wrap: wrap;
  gap: 9px 12px;
  color: var(--muted);
  font-size: .9rem;
}
.article-meta span,
.article-meta time {
  color: var(--muted);
}
.category-chip-grid {
  display: flex;
  flex-wrap: wrap;
  gap: 12px;
  margin-top: 26px;
}
.category-chip-grid a {
  border: 1px solid #cfd5dc;
  border-radius: 999px;
  padding: 12px 18px;
  background: #fff;
  color: var(--brand);
  font-weight: 800;
}
.reaction-bar { margin-top: 28px; padding-top: 20px; border-top: 1px solid var(--line); }
.reaction-bar form { display: flex; gap: 10px; flex-wrap: wrap; }
.comments-section { max-width: 820px; margin: 36px auto 0; padding-top: 24px; border-top: 1px solid var(--line); }
.comments-list { display: grid; gap: 12px; }
.comment {
  border: 1px solid var(--line);
  border-radius: 8px;
  padding: 16px;
  background: #fff;
}
.comment.is-reply { margin-left: 28px; }
.comment p { margin: 8px 0; line-height: 1.65; }
.comment small { color: var(--muted); }
.comment-form { margin-top: 18px; }
.reply-form { display: grid; gap: 8px; margin-top: 12px; }
.form-page { max-width: 560px; margin: 0 auto; }
.form-page.wide { max-width: 840px; }
.form-card, .review-card { padding: 24px; display: grid; gap: 16px; }
label { display: grid; gap: 7px; font-weight: 700; }
input, textarea, select {
  width: 100%;
  border: 1px solid var(--line);
  border-radius: 6px;
  padding: 12px 13px;
  font: inherit;
  color: var(--ink);
  background: #fff;
}
textarea { resize: vertical; }
.two-col { display: grid; grid-template-columns: 1fr 1fr; gap: 16px; }
.three-col { display: grid; grid-template-columns: 1fr 1fr 160px; gap: 16px; align-items: end; }
.actions, .quick-actions { display: flex; gap: 10px; flex-wrap: wrap; }
.check { display: flex; align-items: center; gap: 8px; min-height: 45px; }
.check input { width: auto; }
.inline-check { min-height: auto; justify-content: center; }
.flash { margin-bottom: 18px; padding: 13px 15px; border-radius: 6px; }
.flash.success { background: #eaf6ef; color: var(--green); }
.flash.error { background: #fff0f2; color: var(--accent); }
.admin-body { display: grid; grid-template-columns: 245px 1fr; min-height: 100vh; background: var(--soft); }
.sidebar { padding: 24px; background: var(--brand); display: flex; flex-direction: column; gap: 10px; }
.sidebar .brand, .sidebar a { color: #fff; }
.cag-admin-logo {
  display: inline-flex;
  align-items: baseline;
  gap: 7px;
  text-decoration: none;
  color: #fff;
  padding: 0;
  margin-bottom: 12px;
}

.cag-admin-logo span {
  font-family: Georgia, "Times New Roman", serif;
  font-size: 24px;
  font-weight: 800;
  letter-spacing: .5px;
}

.cag-admin-logo small {
  font-family: Arial, Helvetica, sans-serif;
  font-size: 10px;
  font-weight: 700;
  letter-spacing: 3px;
  color: #f0c8d4;
}
.sidebar a { padding: 11px 12px; border-radius: 6px; }
.sidebar a.is-active { background: rgba(255,255,255,.13); }
.admin-main { padding: 32px; }
.stats .card strong { color: var(--accent); }
.stats .card span { font-size: 2rem; color: var(--brand); font-weight: 800; }
.review-list { display: grid; gap: 16px; }
.review-card h2 { margin: 0; font-size: 1.25rem; }
.review-card p { margin: 6px 0 0; color: var(--muted); }
.row-actions { display: flex; gap: 8px; flex-wrap: wrap; }
.form-end { display: flex; align-items: end; }
.admin-form { margin-bottom: 22px; }
.admin-detail { display: grid; grid-template-columns: minmax(0, 1.4fr) minmax(320px, .8fr); gap: 18px; align-items: start; }
.table-wrap {
  overflow-x: auto;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: #fff;
}
.table-summary {
  display: flex;
  justify-content: space-between;
  gap: 14px;
  margin: 0 0 12px;
  color: var(--muted);
  font-weight: 700;
}
.pagination {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin-top: 18px;
}
table { width: 100%; border-collapse: collapse; min-width: 760px; }
th, td { padding: 13px 14px; border-bottom: 1px solid var(--line); text-align: left; vertical-align: top; }
th { color: var(--brand); background: var(--soft); font-size: .92rem; }
td input, td select { min-width: 140px; }
.status {
  display: inline-block;
  border-radius: 999px;
  padding: 5px 9px;
  color: var(--brand);
  background: #e9f0f7;
  font-weight: 700;
  font-size: .86rem;
}
.link-list { display: flex; flex-wrap: wrap; gap: 10px; }
.link-list a {
  border: 1px solid var(--line);
  border-radius: 999px;
  padding: 9px 13px;
  background: #fff;
  color: var(--brand);
  font-weight: 700;
}
.site-footer {
  border-top: 1px solid var(--line);
  background: #111827;
  color: #e5e7eb;
}
.footer-inner {
  width: min(1200px, 90vw);
  margin: 0 auto;
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  gap: 28px;
  padding: 42px 0;
}
.site-footer h2 {
  margin: 0 0 10px;
  font-family: Georgia, "Times New Roman", serif;
  font-size: 2rem;
}
.site-footer p {
  max-width: 520px;
  margin: 0;
  color: #b8c0cc;
  line-height: 1.7;
}
.footer-nav {
  align-items: flex-start;
  justify-content: flex-end;
}
.footer-nav a { color: #fff; }
.copyright {
  grid-column: 1 / -1;
  padding-top: 18px;
  border-top: 1px solid rgba(255,255,255,.12);
  font-size: .9rem;
}
.thumb {
  width: 58px;
  height: 76px;
  object-fit: cover;
  border: 1px solid var(--line);
  border-radius: 4px;
  display: block;
  margin-bottom: 8px;
}

@media (max-width: 760px) {
  .site-header { align-items: flex-start; flex-direction: column; padding: 18px 5vw; }
  .site-header nav { width: 100%; gap: 12px; }
  .mag-hero, .issue-feature, .article-card-grid, .footer-inner, .two-col, .three-col, .admin-body, .admin-detail { grid-template-columns: 1fr; }
  .mag-hero { padding-top: 42px; }
  .mag-hero-note { max-width: 420px; }
  .article-card { min-height: auto; }
  .footer-nav { justify-content: flex-start; }
  .sidebar { position: static; }
  .admin-main { padding: 22px 5vw; }
  table { min-width: 680px; }
}

@media (max-width: 600px) {
  .cag-logo {
    gap: 8px;
  }

  .cag-logo-main {
    font-size: 27px;
  }

  .cag-logo-line {
    width: 24px;
  }

  .cag-logo-sub {
    font-size: 10px;
    letter-spacing: 3px;
  }
}
