:root {
  --ink: #142616;
  --muted: #536657;
  --forest: #122c1b;
  --green: #285c35;
  --lime: #edf6e8;
  --rule: #d9e3d8;
  --paper: #f7faf5;
  --white: #fff;
  color: var(--ink);
  background: var(--paper);
  font: 16px/1.55 system-ui, -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif;
}

* { box-sizing: border-box; }
body { margin: 0; min-height: 100vh; }
a { color: var(--green); text-underline-offset: .2em; }
a:hover { text-decoration-thickness: 2px; }
:focus-visible { outline: 3px solid #6b992a; outline-offset: 3px; }
h1, h2, h3 { line-height: 1.12; margin: 0; overflow-wrap: anywhere; }
h1 { font-size: clamp(2.15rem, 5vw, 4.2rem); letter-spacing: -.055em; }
h2 { font-size: 1.2rem; letter-spacing: -.025em; }
p { margin: 0; }
time, .hint { color: var(--muted); font-size: .875rem; }
.shell { width: min(1160px, calc(100% - 40px)); margin-inline: auto; }
.reading-shell { width: min(760px, calc(100% - 40px)); margin: 52px auto 90px; }
.header-row, .page-heading { display: flex; align-items: center; justify-content: space-between; flex-wrap: wrap; gap: 16px; }
.header-row { min-height: 70px; padding-block: 10px; }
.header-actions { display: flex; align-items: center; flex-wrap: wrap; gap: 16px; }
.admin-bar, .public-bar, .public-footer { background: var(--forest); color: var(--white); }
.header-actions a, .public-footer a, .text-button { color: #f1f7ec; text-decoration: none; }
.header-actions a:hover, .public-footer a:hover, .text-button:hover, [aria-current="page"] { text-decoration: underline; }
.wordmark { font-size: 1.6rem; font-weight: 850; letter-spacing: -.06em; text-decoration: none; color: var(--white); }
.wordmark span { color: #efd100; }
.wordmark small { color: #d7e6d2; font-size: .8rem; font-weight: 600; letter-spacing: 0; margin-left: 8px; }
.button, .text-button { font: inherit; font-weight: 700; cursor: pointer; }
.button { display: inline-flex; align-items: center; justify-content: center; min-height: 44px; padding: 9px 16px; border: 1px solid transparent; background: var(--green); color: var(--white); border-radius: 8px; text-decoration: none; }
.button:hover { background: #1b4928; }
.button.secondary { background: var(--white); color: var(--green); border-color: var(--rule); }
.button.secondary:hover { background: var(--lime); }
.text-button { padding: 4px 0; border: 0; background: transparent; }
.back { display: inline-block; margin-bottom: 16px; font-weight: 700; }
.public-page { display: flex; flex-direction: column; }
.public-footer { margin-top: auto; }
.blog-index { min-height: 53vh; padding-block: 54px 72px; }
.blog-intro { padding: clamp(22px, 5vw, 56px); background: var(--lime); border-radius: 18px; margin-bottom: 28px; }
.blog-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(min(100%, 270px), 1fr)); gap: 18px; }
.story-card, .empty-blog { background: var(--white); border: 1px solid var(--rule); border-radius: 12px; padding: 22px; }
.story-card h2 { margin-block: 8px 10px; font-size: 1.4rem; }
.story-card h2 a { color: var(--ink); }
.story-card p { color: var(--muted); overflow-wrap: anywhere; }
.empty-blog a { display: inline-block; margin-top: 8px; }
.article-head { padding-bottom: 28px; border-bottom: 1px solid var(--rule); }
.article-head time { display: inline-block; margin-top: 14px; }
.article-summary { font-size: 1.2rem; color: var(--muted); margin-top: 14px; }
.article-body { font-size: clamp(1rem, 2.4vw, 1.12rem); line-height: 1.72; overflow-wrap: anywhere; }
.article-body p { margin-block: 22px; }
.article-body h2 { font-size: clamp(1.45rem, 3.1vw, 2rem); margin-block: 36px 10px; }
.article-body h3 { margin-block: 24px 10px; }
.pagination { display: flex; flex-wrap: wrap; gap: 18px; margin-top: 24px; }
.admin-main { padding-block: 34px 60px; }
.admin-page h1 { font-size: clamp(1.85rem, 4.8vw, 2.8rem); }
.page-heading { margin-bottom: 18px; }
.panel { border: 1px solid var(--rule); border-radius: 12px; background: var(--white); padding: clamp(15px, 3vw, 23px); }
.login-shell { width: min(470px, calc(100% - 40px)); margin: clamp(30px, 8vw, 78px) auto; }
.login-shell h1 { margin-bottom: 22px; }
.fields { display: grid; align-content: start; gap: 14px; min-width: 0; }
.fields label { display: grid; gap: 6px; font-weight: 680; }
input, textarea { width: 100%; padding: 10px 12px; border: 1px solid #a9baaa; border-radius: 7px; font: inherit; color: var(--ink); background: var(--white); }
input[readonly] { background: var(--paper); }
textarea { resize: vertical; }
.editor { display: grid; grid-template-columns: minmax(0, 2.1fr) minmax(255px, 1fr); gap: 16px; align-items: start; }
.post-row { display: grid; grid-template-columns: minmax(0, 1fr) auto auto; align-items: center; gap: 14px; padding-block: 12px; }
.post-row + .post-row { border-top: 1px solid var(--rule); }
.post-row a { font-weight: 700; overflow-wrap: anywhere; }
.status { justify-self: start; display: inline-flex; padding: 3px 8px; border-radius: 5px; background: #f2eddf; color: #69562e; font-size: .82rem; font-weight: 700; }
.status.published { color: #1b542b; background: var(--lime); }
.message { background: var(--lime); color: #1b542b; border-radius: 7px; padding: 11px 13px; margin-bottom: 12px; }
.message.error { background: #faecea; color: #8c2920; }

@media (max-width: 680px) {
  .editor { grid-template-columns: 1fr; }
  .post-row { grid-template-columns: minmax(0, 1fr) auto; }
  .post-row time { grid-column: 1 / -1; }
}
