:root {
  --green: #a70f1d;
  --green-dark: #7d0b16;
  --header: #f7f1e2;
  --header-ink: #2f1d16;
  --gold: #d5a11e;
  --ink: #17211b;
  --muted: #5f6b64;
  --soft: #f4f8f5;
  --line: #dce5df;
  --white: #ffffff;
}

* {
  box-sizing: border-box;
}

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

a {
  color: inherit;
}

.wrap {
  width: min(1120px, calc(100% - 32px));
  margin: 0 auto;
}

.site-header {
  background: var(--header);
  color: var(--header-ink);
  border-bottom: 5px solid var(--gold);
}

.topbar {
  width: 100%;
  min-height: 76px;
  padding: 8px 56px 8px 22px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 22px;
}

.brand {
  display: flex;
  align-items: center;
  gap: 14px;
  flex: 1 1 auto;
  min-width: 0;
  font-weight: 700;
  text-decoration: none;
}

.brand-logo {
  height: 72px;
  width: auto;
  max-width: 120px;
  display: block;
  flex: 0 0 auto;
  object-fit: contain;
}

.brand-title {
  max-width: 760px;
  color: var(--green);
  font-size: 22px;
  line-height: 1.1;
  letter-spacing: 0;
}

nav {
  display: flex;
  flex-wrap: wrap;
  gap: 16px;
  color: var(--header-ink);
  font-size: 13px;
  font-weight: 700;
  flex: 0 0 auto;
  margin-left: 32px;
}

nav a,
.tabs a {
  text-decoration: none;
}

nav a:hover,
.tabs a:hover {
  color: var(--green);
}

.intro {
  background: linear-gradient(120deg, var(--soft), #ffffff);
  border-bottom: 1px solid var(--line);
}

.intro-grid {
  min-height: 300px;
  display: grid;
  grid-template-columns: minmax(0, 1fr) 320px;
  align-items: center;
  gap: 40px;
  padding: 48px 0;
}

.eyebrow {
  margin: 0 0 10px;
  color: var(--green);
  font-weight: 700;
  text-transform: uppercase;
  font-size: 13px;
}

h1,
h2,
h3,
p {
  margin-top: 0;
}

h1 {
  margin-bottom: 12px;
  font-size: clamp(34px, 5vw, 54px);
  line-height: 1.04;
  letter-spacing: 0;
}

h2 {
  color: var(--green);
  font-size: 26px;
}

h3 {
  margin-bottom: 10px;
  font-size: 24px;
}

.lead {
  max-width: 720px;
  color: var(--muted);
  font-size: 19px;
}

.notice,
.panel,
.content-band,
.form-grid,
.table-wrap,
.stat {
  background: var(--white);
  border: 1px solid var(--line);
  border-radius: 6px;
}

.notice {
  padding: 24px;
  border-left: 5px solid var(--gold);
  box-shadow: 0 16px 36px rgba(23, 33, 27, 0.08);
}

.notice span {
  display: block;
  margin-bottom: 8px;
  color: var(--muted);
  font-size: 13px;
  text-transform: uppercase;
}

.notice strong {
  font-size: 22px;
}

.journals,
.page {
  padding: 44px 0;
}

.journal {
  display: grid;
  grid-template-columns: 180px minmax(0, 1fr);
  gap: 28px;
  padding: 28px 0;
  border-top: 1px solid var(--line);
  border-bottom: 1px solid var(--line);
}

.journal-cover {
  min-height: 210px;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 10px;
  padding: 18px;
  background:
    linear-gradient(rgba(167, 15, 29, 0.9), rgba(125, 11, 22, 0.94)),
    radial-gradient(circle at top left, rgba(213, 161, 30, 0.35), transparent 42%);
  color: var(--white);
  border-radius: 6px;
  border-bottom: 8px solid var(--gold);
  font-weight: 700;
  font-size: 28px;
  text-align: center;
}

.journal-cover img {
  width: min(122px, 70%);
  height: auto;
}

.journal-cover small {
  color: rgba(255, 255, 255, 0.82);
  font-size: 12px;
  font-weight: 700;
  text-transform: uppercase;
}

.journal-body p,
.content-band p {
  color: var(--muted);
}

.actions,
.page-head {
  display: flex;
  flex-wrap: wrap;
  gap: 12px;
  align-items: center;
}

.page-head {
  justify-content: space-between;
  margin-bottom: 22px;
}

.button,
button.button {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 42px;
  padding: 0 18px;
  border: 1px solid var(--green);
  border-radius: 4px;
  color: var(--green);
  background: transparent;
  text-decoration: none;
  font-weight: 700;
  cursor: pointer;
}

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

.button:hover {
  border-color: var(--green-dark);
  background: var(--green-dark);
  color: var(--white);
}

.button.danger {
  border-color: #8a1f11;
  color: #8a1f11;
}

.button.danger:hover {
  background: #8a1f11;
  color: var(--white);
}

.journal-page {
  padding: 24px 0 56px;
}

.tabs {
  display: flex;
  flex-wrap: wrap;
  gap: 10px 20px;
  padding-bottom: 18px;
  border-bottom: 1px solid var(--line);
}

.tabs a {
  color: var(--green);
  font-weight: 700;
}

.about-current {
  display: grid;
  grid-template-columns: minmax(0, 1fr) 300px;
  gap: 36px;
  padding-top: 30px;
}

.about-current aside {
  padding: 22px;
  background: var(--soft);
  border: 1px solid var(--line);
  border-radius: 6px;
}

.content-band,
.panel,
.form-grid,
.table-wrap {
  padding: 24px;
}

.stack {
  display: grid;
  gap: 16px;
}

.section-gap {
  margin-top: 18px;
}

.team-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 16px;
}

.article-item h2 {
  margin-bottom: 6px;
}

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

.form-grid.single {
  grid-template-columns: 1fr;
  max-width: 520px;
}

.narrow {
  max-width: 620px;
}

label {
  display: grid;
  gap: 7px;
  color: var(--ink);
  font-weight: 700;
}

.check-row {
  display: flex;
  align-items: center;
  gap: 8px;
}

.check-row input {
  width: auto;
}

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

textarea {
  resize: vertical;
}

.full {
  grid-column: 1 / -1;
}

.flash {
  padding: 12px 16px;
  text-align: center;
  color: var(--white);
  background: var(--green);
}

.flash.error {
  background: #8a1f11;
}

.flash.success {
  background: #2d6a3e;
}

.stats-grid {
  display: grid;
  grid-template-columns: repeat(5, minmax(0, 1fr));
  gap: 14px;
  margin-bottom: 22px;
}

.stat {
  padding: 18px;
}

.stat span {
  display: block;
  color: var(--muted);
  font-size: 13px;
}

.stat strong {
  color: var(--green);
  font-size: 30px;
}

.table-wrap {
  overflow-x: auto;
}

table {
  width: 100%;
  border-collapse: collapse;
}

th,
td {
  padding: 12px 10px;
  border-bottom: 1px solid var(--line);
  text-align: left;
}

th {
  color: var(--muted);
  font-size: 13px;
  text-transform: uppercase;
}

.badge {
  display: inline-block;
  padding: 4px 8px;
  border-radius: 999px;
  color: var(--green);
  background: var(--soft);
  font-size: 12px;
  font-weight: 700;
}

.detail-grid {
  display: grid;
  grid-template-columns: minmax(0, 1fr) 360px;
  gap: 22px;
}

footer {
  padding: 32px 0;
  color: var(--white);
  background: var(--ink);
}

footer p {
  margin-bottom: 0;
  color: #d8dfda;
}

footer .powered-by {
  margin-top: 10px;
  font-size: 12px;
  color: #b8c4bd;
}

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

.archive-list li {
  margin-bottom: 8px;
}

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

.timeline li {
  margin-bottom: 14px;
  padding-bottom: 14px;
  border-bottom: 1px solid var(--line);
}

.timeline li span {
  display: block;
  color: var(--muted);
  font-size: 12px;
}

.admin-nav {
  flex-wrap: wrap;
}

.muted-note {
  color: var(--muted);
  font-size: 13px;
}

.inline-form {
  display: inline;
}

.inline-form button {
  margin-left: 8px;
  min-height: 32px;
  padding: 0 10px;
  font-size: 12px;
}

.footer-grid {
  display: flex;
  justify-content: space-between;
  gap: 24px;
}

.footer-grid div:last-child {
  display: grid;
  gap: 6px;
  text-align: right;
}

@media (max-width: 860px) {
  .topbar,
  .footer-grid {
    align-items: flex-start;
    flex-direction: column;
  }

  nav {
    margin-left: 0;
  }

  .intro-grid,
  .journal,
  .about-current,
  .detail-grid,
  .form-grid,
  .team-grid {
    grid-template-columns: 1fr;
  }

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

.journal-grid {
  display: grid;
  gap: 24px;
  grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
}

.subbar {
  padding: 8px 0 0;
  font-size: 14px;
}

.subbar a {
  color: var(--muted);
  text-decoration: none;
}

.subbar a:hover {
  color: var(--green);
}

.stats-inline {
  display: flex;
  gap: 16px;
  flex-wrap: wrap;
  margin: 12px 0;
}

.stats-inline dt {
  font-size: 12px;
  color: var(--muted);
  text-transform: uppercase;
}

.stats-inline dd {
  margin: 0;
  font-weight: bold;
}

.journal-cover img {
  max-width: 100%;
  height: auto;
  display: block;
}

.journal-cover-preview {
  max-width: 220px;
  border: 1px solid var(--line);
}

.journal-cover-inline img {
  max-width: 160px;
  border: 1px solid var(--line);
}

@media (max-width: 560px) {
  .topbar {
    padding: 10px 16px;
  }

  .brand-logo {
    height: 60px;
    max-width: 96px;
  }

  .brand-title {
    font-size: 18px;
  }

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