:root {
  --bg: #ffffff;
  --bg-soft: #f7f7f5;
  --ink: #0b0b0b;
  --ink-soft: #3d3d3d;
  --muted: #6f6f6f;
  --line: #e6e6e4;
  --line-strong: #cfcfcb;
  --green: #165230;
  --green-deep: #0f3a22;
  --gold: #c9a227;
  --brown: #7a5628;
  --header-h: 88px;
  --wrap: 1180px;
  --ease: cubic-bezier(0.22, 1, 0.36, 1);
  --sidebar-w: 260px;
}

*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }
html { scroll-behavior: smooth; }
body {
  font-family: Inter, "Segoe UI", Helvetica, Arial, sans-serif;
  color: var(--ink);
  background: var(--bg);
  line-height: 1.65;
  font-size: 16px;
  -webkit-font-smoothing: antialiased;
}
h1, h2, h3 { font-family: "Playfair Display", Georgia, serif; font-weight: 500; letter-spacing: -0.02em; line-height: 1.2; }
img { max-width: 100%; display: block; }
a { color: inherit; text-decoration: none; }
button, input, select, textarea { font-family: inherit; font-size: 1rem; }
button { cursor: pointer; background: none; border: 0; }
ul { list-style: none; }
.wrap { width: min(var(--wrap), calc(100% - 48px)); margin-inline: auto; }

.eyebrow { font-size: 11px; letter-spacing: 0.18em; text-transform: uppercase; font-weight: 600; color: var(--green); margin-bottom: 12px; }
.lead { font-size: 1.25rem; color: var(--ink-soft); margin-bottom: 16px; }
.meta { font-size: 0.875rem; color: var(--muted); margin-bottom: 8px; }
.prose p { margin-bottom: 1rem; }
.prose.wide { max-width: 720px; }
.text-link { color: var(--green); font-weight: 600; border-bottom: 1px solid transparent; transition: border-color 0.2s; }
.text-link:hover { border-color: var(--green); }

/* Header */
.site-header {
  position: sticky; top: 0; z-index: 50; height: var(--header-h);
  background: rgba(255,255,255,0.92); backdrop-filter: blur(16px);
  border-bottom: 1px solid var(--line);
}
.header-inner { display: flex; align-items: center; height: 100%; gap: 24px; }
.brand img { height: 52px; width: auto; }
.nav { display: flex; gap: 20px; margin-left: auto; flex-wrap: wrap; }
.nav a { font-size: 0.875rem; font-weight: 500; color: var(--ink-soft); transition: color 0.2s; }
.nav a:hover { color: var(--green); }
.header-end { display: flex; align-items: center; gap: 12px; }
.menu-toggle { display: none; width: 40px; height: 40px; flex-direction: column; justify-content: center; align-items: center; gap: 5px; }
.menu-toggle span { display: block; width: 22px; height: 2px; background: var(--ink); transition: 0.2s; }

/* Buttons */
.btn {
  display: inline-flex; align-items: center; justify-content: center;
  padding: 12px 24px; border-radius: 4px; font-weight: 600; font-size: 0.9rem;
  transition: all 0.2s var(--ease); border: 1px solid transparent;
}
.btn-sm { padding: 8px 16px; font-size: 0.8rem; }
.btn-fill { background: var(--green); color: #fff; border-color: var(--green); }
.btn-fill:hover { background: var(--green-deep); }
.btn-ghost { border-color: var(--line-strong); color: var(--ink); }
.btn-ghost:hover { border-color: var(--green); color: var(--green); }
.btn-outline { background: transparent; border: 1px solid var(--line-strong); color: var(--ink); }
.btn-outline:hover { border-color: var(--green); color: var(--green); }
.btn-light { background: #fff; color: var(--green); }
.btn-danger { background: #b42318; color: #fff; border-color: #b42318; }

/* Hero */
.hero { padding: 80px 0 64px; }
.hero-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 48px; align-items: center; }
.hero h1 { font-size: clamp(2.2rem, 5vw, 3.5rem); margin-bottom: 16px; }
.hero-visual img, .hero-placeholder {
  width: 100%; max-height: 360px; object-fit: contain; border-radius: 8px;
}
.hero-logo {
  background: var(--bg-soft); border: 1px solid var(--line); padding: 48px 32px;
  border-radius: 12px; max-height: none;
}
.brand img, .brand-logo { height: 44px; width: auto; max-width: 220px; object-fit: contain; }
.footer-logo { height: 36px; width: auto; max-width: 200px; object-fit: contain; }
.admin-brand .admin-logo { height: 36px; width: auto; max-width: 140px; object-fit: contain; filter: brightness(0) invert(1); }
.hero-placeholder {
  border-radius: 8px; aspect-ratio: 4/5; object-fit: cover; background: var(--bg-soft);
  display: flex; flex-direction: column; align-items: center; justify-content: center;
}
.hero-placeholder .glyph { font-size: 4rem; color: var(--green); opacity: 0.3; }
.hero-actions { display: flex; gap: 12px; margin-top: 28px; flex-wrap: wrap; }
.page-hero { padding: 64px 0 48px; border-bottom: 1px solid var(--line); }
.page-hero h1 { font-size: clamp(2rem, 4vw, 2.8rem); margin-bottom: 12px; }

/* Sections */
.section { padding: 72px 0; }
.section-soft { background: var(--bg-soft); }
.section-head { display: flex; align-items: flex-end; justify-content: space-between; gap: 24px; margin-bottom: 40px; flex-wrap: wrap; }
.section-head h2 { font-size: 2rem; }
.split { display: grid; grid-template-columns: 1fr 1fr; gap: 48px; align-items: start; }
.split.top { align-items: start; }

/* Cards */
.card-grid { display: grid; gap: 24px; }
.card-grid.cols-2 { grid-template-columns: repeat(2, 1fr); }
.plain-list { list-style: disc; padding-left: 1.25rem; display: grid; gap: 8px; }
.guide-list { list-style: none; display: grid; gap: 12px; padding: 0; }
.guide-list li { padding: 16px 20px; }
.card-grid.cols-3 { grid-template-columns: repeat(3, 1fr); }
.card {
  background: #fff; border: 1px solid var(--line); border-radius: 8px; padding: 28px;
  transition: box-shadow 0.2s, border-color 0.2s;
}
.card:hover { border-color: var(--line-strong); box-shadow: 0 8px 32px rgba(0,0,0,0.06); }
.card h3, .card h2 { margin-bottom: 12px; font-size: 1.25rem; }
.card-lg { padding: 36px; }
.book-card img, .book-placeholder { width: 100%; aspect-ratio: 2/3; object-fit: cover; border-radius: 4px; margin-bottom: 16px; background: var(--bg-soft); }
.book-cover { border-radius: 8px; max-width: 280px; }

/* Stats */
.stat-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 16px; }
.stat { background: var(--bg-soft); padding: 24px; border-radius: 8px; text-align: center; }
.stat strong { display: block; font-size: 2rem; color: var(--green); font-family: "Playfair Display", serif; }
.stat span { font-size: 0.8rem; color: var(--muted); text-transform: uppercase; letter-spacing: 0.1em; }

/* Lists */
.dot-list li { padding-left: 20px; position: relative; margin-bottom: 8px; }
.dot-list li::before { content: ""; position: absolute; left: 0; top: 10px; width: 6px; height: 6px; border-radius: 50%; background: var(--green); }
.check-list li { padding: 8px 0 8px 28px; position: relative; border-bottom: 1px solid var(--line); }
.check-list li::before { content: "✓"; position: absolute; left: 0; color: var(--green); font-weight: 700; }

/* Timeline */
.timeline { display: flex; flex-direction: column; gap: 24px; }
.timeline-item { display: grid; grid-template-columns: 140px 1fr; gap: 24px; padding-bottom: 24px; border-bottom: 1px solid var(--line); }
.timeline-period { font-weight: 600; color: var(--green); font-size: 0.9rem; }

/* Events */
.event-list { display: flex; flex-direction: column; gap: 20px; }
.event-item { display: grid; grid-template-columns: 120px 1fr; gap: 24px; padding: 24px; background: #fff; border: 1px solid var(--line); border-radius: 8px; }
.event-date { font-weight: 700; color: var(--green); }

/* Framework */
.framework-grid { display: flex; flex-direction: column; gap: 16px; }
.framework-item { display: grid; grid-template-columns: 64px 1fr; gap: 20px; padding: 24px; background: #fff; border: 1px solid var(--line); border-radius: 8px; }
.framework-num { font-size: 1.5rem; font-weight: 700; color: var(--gold); font-family: "Playfair Display", serif; }
.framework-module { margin-bottom: 48px; padding-top: 32px; border-top: 2px solid var(--line); }
.framework-module:first-of-type { border-top: none; padding-top: 0; }
.framework-module-head { margin-bottom: 24px; }
.framework-module-num { display: inline-block; font-size: 0.75rem; font-weight: 600; text-transform: uppercase; letter-spacing: 0.1em; color: var(--green); margin-bottom: 8px; }
.framework-module-head h2 { font-size: 1.5rem; margin-bottom: 6px; }
.framework-module-phase { color: var(--muted); font-size: 0.9rem; }
.framework-features { margin-top: 24px; padding: 20px; background: var(--bg-soft); border-radius: 8px; }
.framework-features h4 { font-family: Inter, sans-serif; font-size: 0.85rem; text-transform: uppercase; letter-spacing: 0.08em; margin-bottom: 12px; color: var(--muted); }
.framework-features ul { list-style: none; display: flex; flex-direction: column; gap: 10px; }
.framework-features li { font-size: 0.9rem; line-height: 1.5; }

/* Communication modules */
.module-flow-grid { display: flex; align-items: stretch; gap: 12px; flex-wrap: wrap; margin-bottom: 8px; }
.module-flow-grid--public { margin-bottom: 48px; }
.module-flow-card {
  flex: 1; min-width: 200px; padding: 20px; background: #fff; border: 1px solid var(--line);
  border-radius: 8px; border-left: 4px solid var(--green); text-decoration: none; color: inherit;
  transition: box-shadow 0.15s, border-color 0.15s;
}
a.module-flow-card:hover { box-shadow: 0 4px 12px rgba(0,0,0,0.08); border-color: var(--green); }
.module-flow-card--1 { border-left-color: #2d6a4f; }
.module-flow-card--2 { border-left-color: #40916c; }
.module-flow-card--3 { border-left-color: #b08900; }
.module-flow-card--4 { border-left-color: #6a4c93; }
.module-flow-card-head { display: flex; justify-content: space-between; align-items: flex-start; gap: 8px; margin-bottom: 10px; flex-wrap: wrap; }
.module-flow-num { font-size: 0.72rem; font-weight: 700; text-transform: uppercase; letter-spacing: 0.08em; color: var(--green); }
.module-flow-phase { font-size: 0.68rem; color: var(--muted); text-align: right; max-width: 140px; line-height: 1.3; }
.module-flow-card h3 { font-family: Inter, sans-serif; font-size: 1rem; font-weight: 600; margin-bottom: 8px; }
.module-flow-card p { font-size: 0.85rem; color: var(--muted); line-height: 1.45; margin-bottom: 12px; }
.module-flow-points { display: flex; gap: 6px; flex-wrap: wrap; }
.module-point-tag { display: inline-block; padding: 2px 8px; background: var(--bg-soft); border-radius: 4px; font-size: 0.72rem; font-weight: 600; color: var(--green-deep); }
.module-flow-arrow { display: flex; align-items: center; font-size: 1.25rem; color: var(--muted); padding: 0 4px; flex-shrink: 0; }
.module-flow-header { display: flex; justify-content: space-between; align-items: center; gap: 12px; margin-bottom: 8px; flex-wrap: wrap; }
.module-flow-header h2 { margin-bottom: 0; }
.module-flow-intro { color: var(--muted); font-size: 0.9rem; margin-bottom: 20px; line-height: 1.5; }

/* Admin module sidebar */
.module-nav-group { border-bottom: 1px solid rgba(255,255,255,0.06); }
.nav-module-head { display: flex; align-items: center; gap: 8px; font-weight: 600; font-size: 0.82rem !important; }
.module-nav-num {
  display: inline-flex; align-items: center; justify-content: center;
  width: 20px; height: 20px; border-radius: 4px; background: rgba(255,255,255,0.15);
  font-size: 0.7rem; font-weight: 700; flex-shrink: 0;
}
.module-nav-items { display: block; padding-left: 12px; }
.module-nav-group.open .module-nav-items { display: block; }
.module-nav-items a { padding: 7px 20px 7px 36px; font-size: 0.8rem !important; opacity: 0.85; }
.nav-module-hub { font-weight: 600; border-bottom: 1px solid rgba(255,255,255,0.08); margin-bottom: 4px; }

/* Admin module hub pages */
.module-hub-intro { margin-bottom: 24px; color: var(--muted); font-size: 0.95rem; line-height: 1.55; max-width: 720px; }
.module-hub-grid { align-items: stretch; }
.module-hub-card {
  flex: 1; min-width: 240px; background: #fff; border: 1px solid var(--line); border-radius: 8px;
  padding: 24px; border-left: 4px solid var(--green);
}
.module-hub-card--1 { border-left-color: #2d6a4f; }
.module-hub-card--2 { border-left-color: #40916c; }
.module-hub-card--3 { border-left-color: #b08900; }
.module-hub-card--4 { border-left-color: #6a4c93; }
.module-hub-card--compact h2 { font-size: 1.05rem; }
.module-hub-head { display: flex; justify-content: space-between; align-items: flex-start; gap: 8px; margin-bottom: 12px; flex-wrap: wrap; }
.module-hub-card h2 { font-family: Inter, sans-serif; font-size: 1.2rem; margin-bottom: 10px; }
.module-hub-function { color: var(--muted); font-size: 0.9rem; line-height: 1.5; margin-bottom: 16px; }
.module-hub-sections { display: flex; flex-direction: column; gap: 8px; margin-bottom: 16px; }
.module-section-link {
  display: flex; align-items: center; gap: 10px; padding: 10px 14px; background: var(--bg-soft);
  border-radius: 6px; text-decoration: none; color: var(--ink); font-size: 0.875rem; font-weight: 500;
  transition: background 0.15s;
}
.module-section-link:hover { background: #e8f5e9; color: var(--green-deep); }
.module-hub-features h4 { font-family: Inter, sans-serif; font-size: 0.8rem; text-transform: uppercase; letter-spacing: 0.08em; color: var(--muted); margin-bottom: 10px; }
.module-hub-features ul { list-style: none; display: flex; flex-direction: column; gap: 10px; }
.module-hub-features li { font-size: 0.875rem; line-height: 1.45; }
.module-hub-nav { display: flex; justify-content: space-between; align-items: center; gap: 12px; margin-bottom: 20px; flex-wrap: wrap; }

/* Filters & tags */
.filter-bar { display: flex; gap: 8px; flex-wrap: wrap; margin-bottom: 32px; }
.filter-chip { padding: 8px 16px; border: 1px solid var(--line); border-radius: 999px; font-size: 0.85rem; font-weight: 500; }
.filter-chip.active, .filter-chip:hover { background: var(--green); color: #fff; border-color: var(--green); }
.tag-row { display: flex; gap: 8px; flex-wrap: wrap; margin-top: 24px; }
.tag { padding: 4px 12px; background: var(--bg-soft); border-radius: 999px; font-size: 0.8rem; color: var(--muted); }

/* CTA */
.cta-band { background: var(--green); color: #fff; padding: 64px 0; }
.cta-inner { display: flex; align-items: center; justify-content: space-between; gap: 32px; flex-wrap: wrap; }
.cta-band h2 { color: #fff; margin-bottom: 8px; }
.cta-band p { opacity: 0.85; }

/* Footer */
.site-footer { background: var(--ink); color: rgba(255,255,255,0.75); padding: 64px 0 0; }
.footer-grid { display: grid; grid-template-columns: 2fr 1fr 1fr 1fr; gap: 40px; padding-bottom: 48px; }
.footer-brand img { height: 48px; margin-bottom: 16px; filter: brightness(0) invert(1); opacity: 0.8; }
.site-footer h4 { color: #fff; margin-bottom: 16px; font-family: Inter, sans-serif; font-size: 0.85rem; text-transform: uppercase; letter-spacing: 0.1em; }
.site-footer ul li { margin-bottom: 8px; }
.site-footer a:hover { color: #fff; }
.footer-bottom { border-top: 1px solid rgba(255,255,255,0.1); padding: 20px 0; display: flex; justify-content: space-between; font-size: 0.85rem; flex-wrap: wrap; gap: 12px; }

/* Forms */
.contact-form { display: flex; flex-direction: column; gap: 16px; max-width: 480px; }
.contact-form label { display: flex; flex-direction: column; gap: 6px; font-size: 0.875rem; font-weight: 500; }
.contact-form input, .contact-form textarea, .contact-form select {
  padding: 12px 14px; border: 1px solid var(--line-strong); border-radius: 4px; background: #fff;
}
.contact-form input:focus, .contact-form textarea:focus { outline: 2px solid var(--green); border-color: var(--green); }
.form-msg { font-size: 0.9rem; padding: 12px; border-radius: 4px; }
.form-msg.ok { background: #e8f5e9; color: var(--green-deep); }
.form-msg.err { background: #fdecea; color: #b42318; }
.form-error { color: #b42318; margin-bottom: 12px; }
.hp { position: absolute; left: -9999px; opacity: 0; height: 0; width: 0; }

/* Admin */
.admin-login-body { min-height: 100vh; display: flex; align-items: center; justify-content: center; background: var(--bg-soft); }
.admin-login-card { background: #fff; padding: 48px; border-radius: 12px; border: 1px solid var(--line); width: min(420px, calc(100% - 32px)); }
.login-logo { height: auto; max-width: 260px; width: 100%; margin-bottom: 20px; object-fit: contain; }
.login-lead { color: var(--muted); margin-bottom: 20px; font-size: 0.95rem; }
.demo-credentials {
  background: var(--bg-soft); border: 1px dashed var(--line-strong); border-radius: 8px;
  padding: 16px; margin-bottom: 20px; font-size: 0.9rem;
}
.demo-credentials-label { font-size: 0.72rem; text-transform: uppercase; letter-spacing: 0.12em; color: var(--muted); margin-bottom: 8px; }
.demo-credentials code { background: #fff; padding: 2px 6px; border-radius: 4px; font-size: 0.85rem; }
.demo-credentials p { margin: 6px 0; }
.template-banner {
  background: #eef6f0; border: 1px solid #c5dfc9; color: var(--green-deep);
  padding: 12px 16px; border-radius: 8px; margin-bottom: 24px; font-size: 0.9rem;
}
.quote-card footer { margin-top: 16px; display: flex; flex-direction: column; gap: 4px; font-size: 0.85rem; color: var(--muted); }
.quote-card p { font-style: italic; }
.admin-body { display: flex; min-height: 100vh; background: var(--bg-soft); }
.admin-sidebar {
  width: var(--sidebar-w); background: var(--green-deep); color: rgba(255,255,255,0.85);
  display: flex; flex-direction: column; position: fixed; top: 0; left: 0; bottom: 0; z-index: 100;
  overflow-y: auto;
}
.admin-brand { padding: 20px; display: flex; align-items: center; gap: 10px; border-bottom: 1px solid rgba(255,255,255,0.1); }
.admin-brand span { font-weight: 600; font-size: 0.85rem; }
.admin-nav { flex: 1; padding: 12px 0; }
.admin-nav .nav-label { padding: 16px 20px 6px; font-size: 10px; text-transform: uppercase; letter-spacing: 0.15em; opacity: 0.5; }
.admin-nav a {
  display: block; padding: 10px 20px; font-size: 0.875rem; color: rgba(255,255,255,0.75);
  transition: background 0.15s;
}
.admin-nav a:hover, .admin-nav a.active { background: rgba(255,255,255,0.1); color: #fff; }
.admin-sidebar-foot { padding: 16px 20px; border-top: 1px solid rgba(255,255,255,0.1); display: flex; flex-direction: column; gap: 8px; font-size: 0.85rem; }
.admin-main { margin-left: var(--sidebar-w); flex: 1; min-width: 0; }
.admin-topbar {
  background: #fff; border-bottom: 1px solid var(--line); padding: 16px 24px;
  display: flex; align-items: center; gap: 16px; position: sticky; top: 0; z-index: 50;
}
.admin-topbar h1 { font-family: Inter, sans-serif; font-size: 1.25rem; font-weight: 600; }
.admin-content { padding: 24px; }
.admin-menu-toggle { display: none; }

/* Admin panels */
.admin-stats { display: grid; grid-template-columns: repeat(auto-fill, minmax(160px, 1fr)); gap: 16px; margin-bottom: 32px; }
.admin-stat { background: #fff; border: 1px solid var(--line); border-radius: 8px; padding: 20px; }
.admin-stat strong { display: block; font-size: 2rem; color: var(--green); }
.admin-stat span { font-size: 0.8rem; color: var(--muted); }
.admin-panel { background: #fff; border: 1px solid var(--line); border-radius: 8px; padding: 24px; margin-bottom: 24px; }
.admin-panel h2 { font-family: Inter, sans-serif; font-size: 1.1rem; margin-bottom: 16px; }
.admin-toolbar { display: flex; justify-content: space-between; align-items: center; margin-bottom: 20px; flex-wrap: wrap; gap: 12px; }
.admin-table { width: 100%; border-collapse: collapse; font-size: 0.875rem; }
.admin-table th, .admin-table td { text-align: left; padding: 12px; border-bottom: 1px solid var(--line); }
.admin-table th { font-weight: 600; color: var(--muted); font-size: 0.75rem; text-transform: uppercase; letter-spacing: 0.05em; }
.admin-table tr:hover td { background: var(--bg-soft); }
.admin-form { display: grid; gap: 16px; max-width: 640px; }
.admin-form label { display: flex; flex-direction: column; gap: 6px; font-size: 0.85rem; font-weight: 500; }
.admin-form input, .admin-form textarea, .admin-form select {
  padding: 10px 12px; border: 1px solid var(--line-strong); border-radius: 4px;
}
.admin-form textarea { min-height: 100px; resize: vertical; }
.admin-form .row-2 { display: grid; grid-template-columns: 1fr 1fr; gap: 16px; }
.status-badge { display: inline-block; padding: 4px 10px; border-radius: 999px; font-size: 0.75rem; font-weight: 600; text-transform: capitalize; }
.status-new, .status-draft, .status-open { background: #fff3cd; color: #856404; }
.status-published, .status-closed, .status-resolved { background: #e8f5e9; color: var(--green-deep); }
.status-contacted, .status-in_progress, .status-review { background: #e3f2fd; color: #1565c0; }
.admin-actions { display: flex; gap: 8px; flex-wrap: wrap; }
.admin-actions button { font-size: 0.8rem; padding: 6px 12px; border: 1px solid var(--line); border-radius: 4px; background: #fff; }
.admin-actions button:hover { border-color: var(--green); color: var(--green); }
.admin-loading { color: var(--muted); padding: 40px; text-align: center; }
.reveal { animation: fadeUp 0.6s var(--ease) both; }
.d2 { animation-delay: 0.1s; }
@keyframes fadeUp { from { opacity: 0; transform: translateY(16px); } to { opacity: 1; transform: none; } }

@media (max-width: 1024px) {
  .hero-grid, .split, .footer-grid, .card-grid.cols-3 { grid-template-columns: 1fr; }
  .card-grid.cols-2 { grid-template-columns: 1fr; }
  .nav { display: none; position: fixed; inset: var(--header-h) 0 0; background: #fff; flex-direction: column; padding: 24px; border-top: 1px solid var(--line); }
  .nav.open { display: flex; }
  .menu-toggle { display: flex; }
}
@media (max-width: 768px) {
  .admin-sidebar { transform: translateX(-100%); transition: transform 0.2s; }
  .admin-sidebar.open { transform: none; }
  .admin-main { margin-left: 0; }
  .admin-menu-toggle { display: flex; flex-direction: column; gap: 5px; }
  .admin-menu-toggle span { display: block; width: 22px; height: 2px; background: var(--ink); }
  .timeline-item, .event-item { grid-template-columns: 1fr; }
  .module-flow-arrow { display: none; }
  .module-flow-card { min-width: 100%; }
  .module-hub-card { min-width: 100%; }
}
