:root {
  --ink: #13251f;
  --muted: #5e6b65;
  --paper: #fbfaf5;
  --tint: #e5f0e8;
  --green: #147653;
  --lime: #d9f06c;
  --line: #d7ded8;
  --danger: #9c2f24;
  font-family: Inter, ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
  color: var(--ink);
  background: var(--paper);
}

* { box-sizing: border-box; }
html { scroll-behavior: smooth; }
body { margin: 0; min-width: 320px; background: var(--paper); color: var(--ink); }
a { color: inherit; }
img { display: block; max-width: 100%; }

.site-header, .site-footer, .hero, .section-inner, .studio { width: min(1160px, calc(100% - 40px)); margin-inline: auto; }
.site-header { min-height: 82px; display: flex; justify-content: space-between; align-items: center; gap: 24px; }
.brand { display: inline-flex; align-items: center; gap: 10px; text-decoration: none; font-size: 1.05rem; font-weight: 750; letter-spacing: -.03em; }
.brand-mark { display: grid; place-items: center; width: 31px; height: 31px; border-radius: 9px; background: var(--ink); color: var(--lime); font-weight: 900; }
.site-nav { display: flex; flex-wrap: wrap; gap: 18px; font-size: .9rem; color: var(--muted); }
.site-nav a { text-decoration: none; }
.site-nav a:hover { color: var(--green); }

.hero { display: grid; grid-template-columns: minmax(0, 1.12fr) minmax(280px, .88fr); min-height: 575px; align-items: center; gap: clamp(38px, 8vw, 120px); padding-block: 78px 96px; }
.eyebrow { margin: 0 0 14px; color: var(--green); font-size: .72rem; font-weight: 800; letter-spacing: .12em; text-transform: uppercase; }
h1, h2 { margin: 0; letter-spacing: -.065em; line-height: .98; }
h1 { font-size: clamp(3.25rem, 7.2vw, 6.35rem); max-width: 740px; }
h2 { font-size: clamp(2.25rem, 4.1vw, 4rem); max-width: 760px; }
.hero-body, .section-body { max-width: 650px; font-size: 1.1rem; color: var(--muted); line-height: 1.65; margin-top: 28px; }
.prose > :first-child { margin-top: 0; }
.prose > :last-child { margin-bottom: 0; }
.prose p, .prose ul, .prose ol { margin-block: 0 1rem; }
.hero-actions { display: flex; flex-wrap: wrap; gap: 12px; margin-top: 32px; }
.button { appearance: none; border: 1px solid transparent; border-radius: 999px; cursor: pointer; display: inline-flex; justify-content: center; align-items: center; min-height: 44px; padding: 10px 18px; text-decoration: none; font: inherit; font-size: .9rem; font-weight: 750; }
.button.primary { background: var(--ink); color: white; }
.button.primary:hover { background: var(--green); }
.button.secondary { border-color: var(--line); background: transparent; color: var(--ink); }
.button.secondary:hover { border-color: var(--green); color: var(--green); }
.hero-art { min-height: 380px; border-radius: 34px; background: linear-gradient(135deg, var(--ink), #244e42); padding: 26px; display: grid; place-items: center; overflow: hidden; }
.hero-art[data-image="true"] { padding: 0; }
.hero-art img { width: 100%; height: 100%; object-fit: cover; }
.progress-card { width: min(100%, 360px); padding: 34px; border: 1px solid rgba(255,255,255,.2); border-radius: 22px; color: white; background: rgba(255,255,255,.08); box-shadow: 0 26px 40px rgba(0,0,0,.22); transform: rotate(-4deg); }
.progress-label { font-size: 1.35rem; font-weight: 700; letter-spacing: -.04em; }
.progress-track { height: 11px; border-radius: 99px; background: rgba(255,255,255,.2); margin: 42px 0 22px; overflow: hidden; }
.progress-track span { display: block; height: 100%; width: 68%; border-radius: inherit; background: var(--lime); }
.progress-checks { display: flex; gap: 10px; }
.progress-checks b { display: grid; place-items: center; width: 30px; height: 30px; border-radius: 50%; color: var(--ink); background: var(--lime); }
.progress-checks b:last-child { color: white; background: transparent; border: 1px solid rgba(255,255,255,.5); }

.section { padding-block: clamp(72px, 10vw, 140px); }
.section-tint { background: var(--tint); }
.section-body { font-size: 1.06rem; }
.text-link { display: inline-block; margin-top: 14px; font-weight: 750; color: var(--green); text-decoration-thickness: 1px; text-underline-offset: 4px; }
.site-footer { min-height: 100px; display: flex; align-items: center; justify-content: space-between; gap: 16px; font-size: .82rem; color: var(--muted); border-top: 1px solid var(--line); }
.site-footer a { color: inherit; }

.admin-body { background: #f3f4ef; }
.login-shell { width: min(100% - 40px, 460px); margin: 70px auto; }
.login-card, .editor-card { background: white; border: 1px solid var(--line); border-radius: 18px; padding: 28px; box-shadow: 0 12px 40px rgba(22, 45, 36, .05); }
.login-card { display: grid; gap: 16px; }
.login-card h1 { font-size: 2.7rem; }
.login-card p { color: var(--muted); margin: 0; }
.studio { padding-block: 38px 70px; }
.studio-top, .studio-actions, .editor-card-head, .section-editor-head { display: flex; align-items: center; justify-content: space-between; gap: 14px; }
.studio-top h1 { font-size: clamp(2.6rem, 5vw, 4.25rem); }
.studio-actions { justify-content: flex-end; flex-wrap: wrap; }
.studio-actions form { margin: 0; }
.studio-note { max-width: 760px; line-height: 1.5; color: var(--muted); margin: 22px 0; }
.editor-form { display: grid; gap: 18px; }
.editor-card { margin-top: 18px; }
.editor-card h2 { font-size: 1.75rem; }
.editor-card > h2, .editor-card-head { margin-bottom: 22px; }
.field-grid { display: grid; gap: 14px; }
.field-grid.two { grid-template-columns: repeat(2, minmax(0, 1fr)); }
label { display: grid; gap: 7px; font-size: .82rem; color: #33413a; font-weight: 700; margin-top: 14px; }
input, textarea, select { width: 100%; padding: 10px 11px; border: 1px solid #c6d0c9; border-radius: 8px; color: var(--ink); background: white; font: inherit; font-size: .94rem; font-weight: 400; }
textarea { resize: vertical; line-height: 1.5; }
input:focus, textarea:focus, select:focus { outline: 3px solid rgba(20,118,83,.18); border-color: var(--green); }
.section-editor { padding: 20px 0; border-top: 1px solid var(--line); }
.section-editor:first-child { border-top: 0; padding-top: 0; }
.section-editor-head strong { font-size: .9rem; }
.remove-section { border: 0; padding: 0; background: none; color: var(--danger); cursor: pointer; font: inherit; font-size: .78rem; }
.form-error, .form-success { border-radius: 9px; padding: 11px 13px; font-size: .9rem; }
.form-error { color: #812b23; background: #fde9e6; }
.form-success { color: #175b40; background: #e1f4e8; }
.media-library > p { color: var(--muted); font-size: .9rem; }
.media-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(190px, 1fr)); gap: 12px; }
.media-thumb, .media-upload { min-height: 150px; border: 1px solid var(--line); border-radius: 10px; background: var(--paper); overflow: hidden; text-align: left; }
.media-thumb { padding: 0; cursor: pointer; color: var(--ink); font: inherit; }
.media-thumb:hover, .media-thumb:focus-visible, .media-thumb.is-selected { border-color: var(--green); box-shadow: 0 0 0 3px rgba(20,118,83,.14); }
.media-thumb img { width: 100%; height: 100px; object-fit: cover; }
.media-thumb-name { display: block; overflow: hidden; padding: 8px 8px 2px; font-size: .78rem; text-overflow: ellipsis; white-space: nowrap; }
.media-thumb-action { display: block; padding: 0 8px 9px; color: var(--green); font-size: .72rem; font-weight: 750; }
.media-upload { grid-column: 1 / -1; display: grid; grid-template-columns: minmax(220px, 1.5fr) minmax(180px, 1fr) auto; align-items: end; gap: 12px; min-height: 0; padding: 16px; }
.media-upload label { margin: 0; }
.media-upload input { font-size: .82rem; }
.media-upload .button { min-height: 42px; }

@media (max-width: 760px) {
  .site-header, .site-footer { width: min(100% - 28px, 1160px); }
  .site-header { padding-block: 16px; align-items: flex-start; }
  .site-nav { gap: 10px 15px; padding-top: 7px; justify-content: flex-end; }
  .hero { width: min(100% - 28px, 1160px); grid-template-columns: 1fr; min-height: auto; padding-block: 48px 64px; }
  .hero-art { min-height: 280px; }
  .section-inner, .studio { width: min(100% - 28px, 1160px); }
  .section { padding-block: 64px; }
  .site-footer { padding-block: 25px; }
  .studio-top { align-items: flex-start; flex-direction: column; }
  .studio-actions { justify-content: flex-start; }
  .field-grid.two { grid-template-columns: 1fr; }
  .media-upload { grid-template-columns: 1fr; }
}
