:root {
  --green: #0d4b35;
  --green-2: #153f31;
  --gold: #e6b733;
  --ink: #171917;
  --muted: #6b716d;
  --paper: #f8f6ef;
  --white: #ffffff;
  --line: #d8d5ca;
  --danger: #a62a2a;
  --shadow: 0 12px 34px rgba(20, 34, 27, .09);
  --radius: 16px;
}

* { box-sizing: border-box; }
html { scroll-behavior: smooth; }
body {
  margin: 0;
  font-family: Inter, ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
  color: var(--ink);
  background: var(--paper);
  line-height: 1.6;
}
a { color: inherit; text-decoration: none; }
img { max-width: 100%; display: block; }
button, input, select, textarea { font: inherit; }
button { cursor: pointer; }

.container { width: min(1180px, calc(100% - 32px)); margin-inline: auto; }
.site-header {
  background: var(--green);
  color: white;
  border-bottom: 4px solid var(--gold);
  position: sticky;
  top: 0;
  z-index: 20;
}
.header-row { display:flex; align-items:center; justify-content:space-between; gap:24px; min-height:76px; }
.brand { display:flex; align-items:center; gap:14px; }
.brand-mark {
  width: 42px; height: 42px; border:2px solid var(--gold); border-radius:50%;
  display:grid; place-items:center; font-family: Georgia, serif; font-weight:800; color:var(--gold);
}
.brand-title { font-family: Georgia, 'Times New Roman', serif; font-size:1.35rem; font-weight:800; letter-spacing:.02em; }
.brand-sub { font-size:.72rem; opacity:.78; text-transform:uppercase; letter-spacing:.12em; }
.nav { display:flex; flex-wrap:wrap; align-items:center; gap:16px; font-size:.92rem; }
.nav a:hover { color:var(--gold); }
.nav-admin { padding:8px 12px; border:1px solid rgba(255,255,255,.35); border-radius:999px; }
.mobile-menu { display:none; background:none; border:0; color:#fff; font-size:1.45rem; }

.masthead { padding:48px 0 22px; border-bottom:1px solid var(--line); }
.masthead h1 { margin:0; font-family:Georgia,serif; font-size:clamp(2.7rem, 7vw, 6.5rem); line-height:.9; letter-spacing:-.04em; }
.masthead p { margin:16px 0 0; max-width:680px; color:var(--muted); }
.section-kicker { display:flex; align-items:center; gap:12px; font-size:.8rem; letter-spacing:.16em; font-weight:800; text-transform:uppercase; color:var(--green); }
.section-kicker::after { content:""; height:1px; background:var(--line); flex:1; }

.hero { display:grid; grid-template-columns: 1.8fr 1fr; gap:24px; padding:34px 0 8px; }
.hero-main, .hero-side-card, .story-card { background:var(--white); border:1px solid var(--line); box-shadow:var(--shadow); }
.hero-main { border-radius:var(--radius); overflow:hidden; }
.hero-image { aspect-ratio:16/9; object-fit:cover; width:100%; background:#e8e5db; }
.hero-copy { padding:26px; }
.story-meta { color:var(--muted); font-size:.84rem; display:flex; flex-wrap:wrap; gap:9px; align-items:center; }
.story-category { color:var(--green); font-weight:800; text-transform:uppercase; letter-spacing:.08em; }
.hero-copy h2 { font-family:Georgia,serif; font-size:clamp(2rem,4vw,3.8rem); line-height:1.02; margin:12px 0; }
.deck { color:#4e544f; font-size:1.05rem; }
.hero-side { display:grid; gap:16px; }
.hero-side-card { border-radius:14px; overflow:hidden; display:grid; grid-template-columns: 118px 1fr; min-height:118px; }
.hero-side-card img { height:100%; width:100%; object-fit:cover; background:#e8e5db; }
.hero-side-copy { padding:15px; }
.hero-side-copy h3 { font-family:Georgia,serif; font-size:1.08rem; line-height:1.15; margin:6px 0 0; }

.section { padding:44px 0; }
.section-head { display:flex; justify-content:space-between; gap:20px; align-items:end; margin-bottom:20px; }
.section-head h2 { font-family:Georgia,serif; font-size:2.15rem; margin:0; }
.filters { display:flex; flex-wrap:wrap; gap:8px; }
.filter-btn { border:1px solid var(--line); background:#fff; border-radius:999px; padding:8px 13px; }
.filter-btn.active { background:var(--green); color:white; border-color:var(--green); }
.story-grid { display:grid; grid-template-columns: repeat(3, 1fr); gap:20px; }
.story-card { border-radius:14px; overflow:hidden; transition:.18s ease; }
.story-card:hover { transform:translateY(-3px); }
.story-card img { aspect-ratio:16/10; object-fit:cover; width:100%; background:#e8e5db; }
.story-card-copy { padding:18px; }
.story-card h3 { font-family:Georgia,serif; font-size:1.42rem; line-height:1.16; margin:9px 0; }
.story-card p { color:var(--muted); margin:0; font-size:.94rem; }
.empty { border:1px dashed var(--line); padding:28px; border-radius:14px; color:var(--muted); background:#fff; }

.site-footer { background:#112d23; color:#dbe5df; padding:42px 0; margin-top:38px; }
.footer-grid { display:grid; grid-template-columns:2fr 1fr 1fr; gap:28px; }
.footer-title { color:white; font-family:Georgia,serif; font-size:1.5rem; font-weight:700; }
.footer-small { color:#a9b9b0; font-size:.88rem; }

.article-shell { width:min(820px, calc(100% - 32px)); margin:46px auto; }
.article-shell .article-category { color:var(--green); font-weight:800; text-transform:uppercase; letter-spacing:.1em; font-size:.82rem; }
.article-shell h1 { font-family:Georgia,serif; font-size:clamp(2.5rem,6vw,4.8rem); line-height:1.02; margin:12px 0 16px; letter-spacing:-.025em; }
.article-deck { font-size:1.25rem; color:#555d57; }
.article-hero { width:min(1100px, calc(100% - 32px)); margin:30px auto; border-radius:18px; max-height:660px; object-fit:cover; }
.article-body { font-family:Georgia, 'Times New Roman', serif; font-size:1.16rem; line-height:1.82; }
.article-body p { margin:0 0 1.35em; }
.article-body h2, .article-body h3 { line-height:1.2; margin-top:1.8em; }
.article-body blockquote { border-left:4px solid var(--gold); margin:1.7em 0; padding:2px 0 2px 22px; color:#48504b; font-style:italic; }
.byline { margin:20px 0 28px; color:var(--muted); }

/* Admin */
.admin-body { background:#eef1ee; }
.admin-top { background:var(--green); color:white; }
.admin-top .container { min-height:66px; display:flex; align-items:center; justify-content:space-between; gap:20px; }
.admin-layout { display:grid; grid-template-columns:260px 1fr; min-height:calc(100vh - 66px); }
.sidebar { background:#17392d; color:#dae8df; padding:24px 18px; }
.sidebar button, .sidebar a { width:100%; display:block; text-align:left; color:inherit; background:transparent; border:0; padding:11px 12px; border-radius:9px; }
.sidebar button:hover, .sidebar a:hover { background:rgba(255,255,255,.08); }
.admin-main { padding:28px; min-width:0; }
.panel { background:white; border:1px solid #d7ded9; border-radius:14px; padding:22px; box-shadow:0 8px 25px rgba(30,50,38,.05); margin-bottom:22px; }
.panel h2, .panel h3 { margin-top:0; }
.form-grid { display:grid; grid-template-columns:1fr 1fr; gap:16px; }
.field { display:grid; gap:7px; }
.field.full { grid-column:1/-1; }
label { font-weight:700; font-size:.9rem; }
input, select, textarea { width:100%; border:1px solid #cbd4ce; border-radius:9px; background:#fff; padding:10px 12px; }
textarea { min-height:110px; resize:vertical; }
.editor-toolbar { display:flex; flex-wrap:wrap; align-items:center; gap:5px; padding:8px; border:1px solid #cbd4ce; border-bottom:0; border-radius:9px 9px 0 0; background:#f5f7f5; position:sticky; top:0; z-index:3; }
.editor-toolbar button { min-width:34px; border:1px solid #d5ddd8; border-radius:6px; background:#fff; padding:6px 9px; line-height:1.2; }
.editor-toolbar button:hover, .editor-toolbar button:focus-visible { border-color:#91a59a; background:#eef4f0; }
.editor-toolbar button[data-cmd="justifyCenter"] { text-align:center; }
.editor-toolbar button[data-cmd="justifyRight"] { text-align:right; }
.editor-select { width:auto; min-width:92px; max-width:170px; padding:6px 28px 6px 9px; border:1px solid #d5ddd8; border-radius:6px; background:#fff; }
.editor-font { min-width:128px; }
.editor-size { min-width:92px; }
.toolbar-separator { width:1px; height:26px; margin:0 3px; background:#d5ddd8; }
.rich-editor { min-height:340px; padding:18px; border:1px solid #cbd4ce; border-radius:0 0 9px 9px; background:#fff; overflow:auto; font-family:Georgia, 'Times New Roman', serif; font-size:1.05rem; line-height:1.75; }
.rich-editor:focus { outline:2px solid rgba(13,75,53,.2); }
.rich-editor h2, .rich-editor h3 { line-height:1.2; }
.rich-editor blockquote { border-left:4px solid var(--gold); margin:1.4em 0; padding:2px 0 2px 18px; color:#48504b; font-style:italic; }
@media (max-width: 700px) {
  .editor-toolbar { position:static; }
  .toolbar-separator { display:none; }
  .editor-font { flex:1 1 135px; }
  .editor-size { flex:1 1 100px; }
}
.actions { display:flex; flex-wrap:wrap; gap:10px; align-items:center; }
.btn { border:0; border-radius:9px; padding:10px 15px; font-weight:800; }
.btn-primary { background:var(--green); color:white; }
.btn-secondary { background:#e8ede9; color:#203c30; }
.btn-gold { background:var(--gold); color:#1c241e; }
.btn-danger { background:#fae5e5; color:var(--danger); }
.status { font-size:.88rem; color:var(--muted); }
.article-list { display:grid; gap:10px; }
.admin-item { border:1px solid #d9e0db; border-radius:10px; padding:13px; display:grid; grid-template-columns:1fr auto; gap:10px; background:#fff; }
.admin-item-title { font-weight:800; }
.badge { display:inline-block; border-radius:999px; padding:3px 8px; font-size:.72rem; font-weight:800; text-transform:uppercase; letter-spacing:.06em; background:#e8ede9; color:#375344; }
.badge.published { background:#dff2e7; color:#176137; }
.badge.draft { background:#fff2cc; color:#755a00; }
.drag-list { display:grid; gap:9px; }
.drag-item { border:1px solid #ccd5cf; background:#fff; padding:12px 14px; border-radius:9px; display:flex; align-items:center; gap:12px; cursor:grab; }
.drag-handle { color:#8e9992; font-size:1.25rem; }
.drag-item.dragging { opacity:.45; }
.login-wrap { min-height:100vh; display:grid; place-items:center; padding:24px; background:linear-gradient(135deg,#0d4b35,#17392d); }
.login-card { width:min(430px,100%); background:#fff; padding:30px; border-radius:18px; box-shadow:0 30px 70px rgba(0,0,0,.25); }
.login-card h1 { font-family:Georgia,serif; margin:0 0 5px; }
.login-card .field { margin:14px 0; }
.hidden { display:none !important; }
.notice { padding:11px 13px; border-radius:8px; background:#eef5f0; color:#234332; font-size:.9rem; }
.notice.error { background:#fae8e8; color:#7d2020; }

@media (max-width: 900px) {
  .hero, .story-grid, .footer-grid { grid-template-columns:1fr; }
  .hero-side { grid-template-columns:1fr 1fr; }
  .nav { display:none; position:absolute; top:76px; left:0; right:0; background:var(--green); padding:16px; border-top:1px solid rgba(255,255,255,.15); }
  .nav.open { display:flex; flex-direction:column; align-items:flex-start; }
  .mobile-menu { display:block; }
  .admin-layout { grid-template-columns:1fr; }
  .sidebar { display:flex; overflow:auto; gap:6px; padding:10px; }
  .sidebar button, .sidebar a { width:auto; white-space:nowrap; }
}
@media (max-width: 620px) {
  .hero-side { grid-template-columns:1fr; }
  .hero-side-card { grid-template-columns:100px 1fr; }
  .form-grid { grid-template-columns:1fr; }
  .field.full { grid-column:auto; }
  .admin-main { padding:15px; }
}
