:root {
  --ink: #17201b;
  --muted: #5d675f;
  --paper: #fbfcfa;
  --line: #d7ddd7;
  --panel: #ffffff;
  --accent: #1f6f5b;
  --accent-dark: #164d40;
  --warning: #8a3d11;
  --warning-bg: #fff4ea;
  --error: #8f1d2c;
  --error-bg: #fff0f2;
  --blue: #234f7a;
}

* {
  box-sizing: border-box;
}

html {
  color: var(--ink);
  background: var(--paper);
  font-family: Arial, Helvetica, sans-serif;
  line-height: 1.5;
}

body {
  margin: 0;
}

a {
  color: var(--accent-dark);
}

a:hover,
a:focus {
  color: var(--blue);
}

.skip-link {
  position: absolute;
  left: -999px;
  top: 0;
  background: var(--ink);
  color: white;
  padding: 0.5rem 0.75rem;
}

.skip-link:focus {
  left: 1rem;
  top: 1rem;
  z-index: 10;
}

.site-header {
  border-bottom: 1px solid var(--line);
  background: var(--panel);
}

.ad-slot {
  min-height: 54px;
  display: flex;
  align-items: center;
  justify-content: center;
  border-bottom: 1px solid var(--line);
  padding: 0.5rem 1rem;
  text-align: center;
  color: var(--muted);
  font-size: 0.92rem;
}

.nav-wrap,
.page-shell,
.site-footer {
  width: min(1080px, calc(100% - 32px));
  margin: 0 auto;
}

.nav-wrap {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
  padding: 1rem 0;
}

.brand {
  color: var(--ink);
  font-weight: 700;
  text-decoration: none;
  font-size: 1.2rem;
}

.nav-links {
  display: flex;
  gap: 1rem;
  flex-wrap: wrap;
  align-items: center;
}

.nav-links a {
  color: var(--ink);
  text-decoration: none;
  font-size: 0.95rem;
}

.nav-links .nav-create {
  min-height: 36px;
  padding: 0.45rem 0.8rem;
  background: var(--accent);
  color: white;
}

.page-shell {
  padding: 2rem 0 3rem;
}

.intro,
.form-intro,
.status-page,
.legal-page {
  max-width: 780px;
}

.intro h1,
.form-intro h1,
.status-page h1,
.legal-page h1,
.article-header h1 {
  margin: 0.2rem 0 0.75rem;
  font-size: clamp(2rem, 6vw, 4rem);
  line-height: 1.05;
}

.article-header h1 {
  font-size: clamp(2rem, 5vw, 3.4rem);
}

.eyebrow {
  margin: 0;
  color: var(--accent);
  font-size: 0.82rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0;
}

.muted,
.help,
.section-heading p,
.site-footer {
  color: var(--muted);
}

.button,
button {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 44px;
  padding: 0.7rem 1rem;
  border: 1px solid var(--accent);
  border-radius: 6px;
  background: var(--panel);
  color: var(--accent-dark);
  font-weight: 700;
  text-decoration: none;
  cursor: pointer;
}

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

.article-list {
  margin-top: 2.5rem;
}

.section-heading {
  border-bottom: 1px solid var(--line);
  margin-bottom: 0.75rem;
}

.section-heading h2 {
  margin-bottom: 0.25rem;
}

.article-row {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(220px, 300px);
  gap: 1rem;
  padding: 1.25rem 0;
  border-bottom: 1px solid var(--line);
}

.article-row h3 {
  margin: 0 0 0.35rem;
  font-size: 1.25rem;
}

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

.article-stats {
  display: grid;
  grid-template-columns: 1fr;
  gap: 0.5rem;
  margin: 0;
}

.article-stats div {
  display: flex;
  justify-content: space-between;
  gap: 1rem;
}

.article-stats dt {
  color: var(--muted);
}

.article-stats dd {
  margin: 0;
  font-weight: 700;
}

.pagination {
  display: flex;
  align-items: center;
  gap: 0.75rem;
  justify-content: center;
  padding-top: 1.5rem;
}

.pagination span {
  color: var(--muted);
  font-weight: 700;
}

.empty-state,
.quota-panel,
.rejection-box,
.messages {
  border: 1px solid var(--line);
  border-radius: 8px;
  background: var(--panel);
  padding: 1rem;
}

.quota-panel {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 1rem;
  margin: 1.5rem 0;
  max-width: 780px;
}

.quota-panel div {
  display: grid;
  gap: 0.1rem;
}

.quota-panel strong {
  font-size: 1.6rem;
}

.quota-panel span {
  color: var(--muted);
}

.rejection-box {
  max-width: 780px;
  border-color: #f1b1ba;
  background: var(--error-bg);
  color: var(--error);
  margin-bottom: 1.5rem;
}

.message {
  margin: 0;
}

.message + .message {
  margin-top: 0.5rem;
}

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

.message.success {
  color: var(--accent-dark);
}

.submission-form {
  max-width: 780px;
  display: grid;
  gap: 1.2rem;
}

.field {
  display: grid;
  gap: 0.35rem;
}

label,
legend {
  font-weight: 700;
}

input[type="text"],
textarea {
  width: 100%;
  border: 1px solid var(--line);
  border-radius: 6px;
  padding: 0.75rem;
  font: inherit;
  color: var(--ink);
  background: white;
}

textarea {
  resize: vertical;
}

.mode-fieldset {
  display: grid;
  gap: 0.75rem;
  border: 1px solid var(--line);
  border-radius: 8px;
  padding: 1rem;
  margin: 0;
}

.mode-fieldset label {
  font-weight: 400;
}

.errorlist {
  margin: 0;
  padding-left: 1.2rem;
  color: var(--error);
}

.slug-status {
  margin: 0;
  color: var(--muted);
}

.slug-status.available {
  color: var(--accent-dark);
}

.slug-status.unavailable {
  color: var(--warning);
}

.article-detail {
  max-width: 820px;
}

.article-header {
  border-bottom: 1px solid var(--line);
  padding-bottom: 1.25rem;
  margin-bottom: 1.5rem;
}

.article-body {
  font-size: 1.06rem;
  overflow-wrap: anywhere;
}

.legal-page h2 {
  margin-top: 1.7rem;
}

.site-footer {
  border-top: 1px solid var(--line);
  padding: 1.5rem 0 2rem;
  font-size: 0.92rem;
}

.site-footer a + a {
  margin-left: 0.75rem;
}

@media (max-width: 720px) {
  .nav-wrap,
  .article-row,
  .quota-panel {
    grid-template-columns: 1fr;
  }

  .nav-wrap {
    align-items: flex-start;
    flex-direction: column;
  }

  .article-row {
    display: grid;
  }

  .article-stats div {
    justify-content: flex-start;
  }
}
