:root {
  color-scheme: light;
  --bg: #f4f1e8; --paper: #fffdf6; --text: #26352e; --muted: #68766d;
  --line: #d9ddce; --green: #477653; --green-dark: #294635;
  --green-soft: #e7eedf; --gold: #bd8950; --shadow: 0 8px 24px rgba(38, 53, 46, .07);
}
* { box-sizing: border-box; }
html { min-height: 100%; background: var(--bg); }
body { min-height: 100vh; margin: 0; color: var(--text); background-color: var(--bg); background-image: radial-gradient(#dfe2d4 1px, transparent 1px); background-size: 18px 18px; font-family: system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif; line-height: 1.7; }
a { color: var(--green-dark); text-decoration-thickness: .08em; text-underline-offset: .18em; }
a:hover { color: #315c3b; }
a:focus-visible, button:focus-visible, input:focus-visible, textarea:focus-visible, select:focus-visible { outline: 3px solid #d5a45f; outline-offset: 3px; }
.site-header { min-height: 64px; padding: 10px max(20px, calc((100% - 1120px) / 2)); display: flex; align-items: center; justify-content: space-between; gap: 20px; background: rgba(255,253,246,.96); border-bottom: 1px solid #cdd4c5; box-shadow: 0 2px 10px rgba(38,53,46,.035); }
.brand { color: var(--green-dark); font-weight: 750; font-size: 1.05rem; text-decoration: none; }
.brand::before { content: "▣ "; color: var(--green); font-size: .85em; }
.admin-header-right, .admin-nav { display: flex; align-items: center; gap: 14px; }
.admin-nav a { font-weight: 650; text-decoration: none; }
.admin-nav a::before { content: "/ "; color: var(--gold); }
.logout-form { margin: 0; }
.logout-form button { min-height: 38px; padding: 6px 13px; border-color: var(--line); background: var(--green-soft); color: var(--green-dark); }
.logout-form button:hover { background: #dce8d5; }
.page-shell { width: min(100% - 32px, 980px); margin: 34px auto 64px; padding: clamp(22px,4vw,42px); border: 1px solid var(--line); border-radius: 12px; background: var(--paper); box-shadow: var(--shadow); }
.admin-shell { width: min(100% - 32px, 1120px); }
h1,h2,h3 { color: var(--green-dark); line-height: 1.3; }
h1 { margin: 0 0 1.2rem; font-size: clamp(1.55rem,3vw,2rem); }
h1::after { display: block; width: 56px; height: 3px; margin-top: 12px; border-radius: 3px; background: var(--gold); content: ""; }
p { margin: 0 0 1rem; }
.form-card { max-width: 760px; }
.form-stack { display: grid; gap: 22px; }
.field { display: grid; gap: 7px; font-weight: 650; }
.field-help { color: var(--muted); font-size: .9rem; font-weight: 400; }
input[type=text], input[type=password], textarea, select { width: 100%; min-height: 48px; padding: 11px 13px; border: 1px solid #bfc9bc; border-radius: 7px; background: #fffefa; color: var(--text); font: inherit; font-weight: 400; transition: border-color .15s ease, box-shadow .15s ease; }
input:focus, textarea:focus, select:focus { border-color: var(--green); box-shadow: 0 0 0 3px rgba(71,118,83,.16); outline: none; }
textarea { min-height: 390px; resize: vertical; line-height: 1.65; }
.form-actions { display: flex; align-items: center; flex-wrap: wrap; gap: 14px; margin-top: 2px; }
button,.button { display: inline-flex; min-height: 44px; align-items: center; justify-content: center; padding: 9px 19px; border: 1px solid var(--green); border-radius: 7px; background: var(--green); color: white; font: inherit; font-weight: 700; text-decoration: none; cursor: pointer; }
button:hover,.button:hover { border-color: var(--green-dark); background: var(--green-dark); color: white; }
.button-secondary { border-color: var(--line); background: var(--green-soft); color: var(--green-dark); }
.button-secondary:hover { border-color: #b4c3ae; background: #dce8d5; color: var(--green-dark); }
.page-actions { margin: 0 0 20px; }
.table-scroll { overflow-x: auto; border: 1px solid var(--line); border-radius: 9px; background: #fffefa; }
table { width: 100%; min-width: 720px; border-collapse: collapse; }
th,td { padding: 12px 14px; border-bottom: 1px solid var(--line); text-align: left; vertical-align: middle; }
th { background: var(--green-soft); color: var(--green-dark); font-size: .92rem; white-space: nowrap; }
tbody tr:last-child td { border-bottom: 0; } tbody tr:hover { background: #fbfaf3; }
.article-actions { display: flex; align-items: center; gap: 12px; white-space: nowrap; }
.article-actions form { margin: 0; }
.article-actions button { min-height: 36px; padding: 5px 12px; font-size: .9rem; }
.article-list { display: grid; gap: 12px; padding: 0; list-style: none; }
.article-list li { display: flex; flex-wrap: wrap; align-items: baseline; justify-content: space-between; gap: 8px 20px; padding: 16px 18px; border: 1px solid var(--line); border-radius: 9px; background: #fffefa; box-shadow: 0 3px 12px rgba(38,53,46,.035); }
.article-list a { font-size: 1.08rem; font-weight: 700; }
time,.article-meta { color: var(--muted); font-size: .92rem; }
.article-body { white-space: pre-line; overflow-wrap: anywhere; }
.article-body img { max-width: 100%; height: auto; }
.article-body pre { overflow-x: auto; padding: 16px; border: 1px solid var(--line); border-radius: 8px; background: #f8f6ee; }
.article-body blockquote { margin-inline: 0; padding: 12px 18px; border-left: 3px solid var(--gold); background: #f8f3e6; }
@media (max-width: 640px) { .site-header { align-items: flex-start; padding: 12px 16px; } .admin-header-right { align-items: flex-end; flex-direction: column; gap: 6px; } .admin-nav { gap: 10px; } .page-shell,.admin-shell { width: min(100% - 20px,980px); margin: 16px auto 36px; padding: 20px 16px; } .form-stack { gap: 18px; } textarea { min-height: 320px; } .article-list li { display: grid; } }
