:root {
    --ink: #14211b;
    --muted: #657169;
    --paper: #f2f0e8;
    --line: #cdd4ce;
    --green: #1f6c4a;
    --gold: #ad7b18;
    --dark: #102019;
}

* { box-sizing: border-box; }
body {
    margin: 0;
    min-height: 100vh;
    color: var(--ink);
    background: linear-gradient(rgba(20,33,27,.035) 1px, transparent 1px), linear-gradient(90deg, rgba(20,33,27,.035) 1px, transparent 1px), var(--paper);
    background-size: 32px 32px;
    font-family: "Avenir Next", "Segoe UI", sans-serif;
}

.site-header { min-height: 70px; display: flex; align-items: center; justify-content: space-between; gap: 24px; padding: 12px clamp(18px,4vw,60px); border-bottom: 1px solid var(--line); background: rgba(242,240,232,.92); }
.brand { display: flex; align-items: center; gap: 10px; color: inherit; text-decoration: none; }
.brand > span { width: 38px; height: 38px; display: grid; place-items: center; border-radius: 8px; background: var(--dark); color: #fff; font: 18px Georgia,serif; }
.brand div { display: grid; }
.brand strong { font: 17px Georgia,serif; }
.brand small { color: var(--muted); font-size: 9px; letter-spacing: .12em; text-transform: uppercase; }
.site-header nav { display: flex; gap: 4px; }
.site-header nav a { padding: 9px 11px; border-radius: 6px; color: #4c5851; font-size: 12px; font-weight: 750; text-decoration: none; }
.site-header nav a:hover { background: #fff; color: var(--ink); }

main { width: min(1240px,100%); margin: 0 auto; padding: clamp(38px,6vw,78px) clamp(18px,4vw,58px) 50px; }
.hero { display: grid; grid-template-columns: minmax(0,1.3fr) minmax(260px,.7fr); align-items: end; gap: 40px; }
.eyebrow { margin: 0 0 12px; color: var(--green); font-size: 10px; font-weight: 850; letter-spacing: .14em; text-transform: uppercase; }
h1,h2 { margin: 0; font-family: Georgia,"Times New Roman",serif; font-weight: 500; }
h1 { font-size: clamp(46px,7vw,86px); line-height: .95; }
.lede { max-width: 700px; margin: 22px 0 0; color: var(--muted); font-size: 17px; line-height: 1.65; }
.hero aside { display: grid; gap: 7px; padding: 22px; border: 1px solid var(--line); border-radius: 12px; background: rgba(255,255,255,.66); }
.hero aside strong { margin-bottom: 4px; font-family: Georgia,serif; font-size: 18px; }
.hero aside span { color: #4e5b54; font-size: 12px; font-weight: 750; text-transform: uppercase; letter-spacing: .06em; }
.hero aside i { color: var(--gold); font-style: normal; }

.mission-card { display: grid; grid-template-columns: minmax(280px,.75fr) minmax(0,1.25fr); min-height: 500px; margin-top: clamp(44px,7vw,84px); overflow: hidden; border: 1px solid #20382d; border-radius: 18px; background: var(--dark); color: #f4f0df; box-shadow: 0 30px 70px rgba(15,31,24,.2); }
.mission-map { position: relative; min-height: 420px; overflow: hidden; background: #194c3a; }
.mission-map::before { position: absolute; inset: 0; background: linear-gradient(135deg,transparent 48%,rgba(225,196,102,.35) 49%,transparent 50%), linear-gradient(45deg,transparent 48%,rgba(225,196,102,.18) 49%,transparent 50%); background-size: 52px 52px; content: ''; }
.lagoon { position: absolute; left: -12%; right: 16%; bottom: -18%; height: 62%; border-radius: 50% 50% 0 0; transform: rotate(-12deg); background: #1e6670; box-shadow: 0 0 0 18px rgba(105,173,155,.12); }
.city-grid { position: absolute; inset: 18% 12% 25% 20%; transform: rotate(-11deg); border: 1px solid rgba(244,240,223,.35); background: repeating-linear-gradient(0deg,transparent 0 23px,rgba(244,240,223,.23) 24px),repeating-linear-gradient(90deg,transparent 0 23px,rgba(244,240,223,.23) 24px); }
.mission-map > span { position: absolute; left: 28px; bottom: 26px; color: #fff; font: 32px/1 Georgia,serif; letter-spacing: .03em; }
.mission-map small { color: #d9bd69; font: 10px "Avenir Next",sans-serif; letter-spacing: .16em; }
.mission-content { padding: clamp(28px,4vw,50px); }
.mission-topline { display: flex; justify-content: space-between; gap: 16px; }
.mission-topline > span { color: #d9bd69; font-size: 10px; font-weight: 800; letter-spacing: .1em; }
.mission-content h2 { font-size: clamp(34px,4vw,52px); }
.mission-content > p { margin: 15px 0 0; color: #bdc9c1; line-height: 1.6; }
.mission-goals { margin: 26px 0 0; padding: 0; list-style: none; display: grid; gap: 10px; }
.mission-goals li { display: grid; grid-template-columns: 40px 1fr; gap: 12px; padding: 13px; border: 1px solid rgba(255,255,255,.1); border-radius: 10px; background: rgba(255,255,255,.04); }
.mission-goals li > span { width: 34px; height: 34px; display: grid; place-items: center; border: 1px solid rgba(217,189,105,.55); border-radius: 50%; color: #d9bd69; font-size: 10px; font-weight: 800; }
.mission-goals strong { font-size: 13px; }
.mission-goals p { margin: 3px 0 0; color: #91a198; font-size: 11px; line-height: 1.45; }
.mission-actions { display: grid; grid-template-columns: auto 1fr; align-items: center; gap: 14px; margin-top: 24px; }
.mission-actions > span { color: #85968c; font-size: 10px; line-height: 1.45; }
.button { min-height: 45px; display: inline-flex; align-items: center; justify-content: center; gap: 16px; padding: 0 18px; border: 1px solid transparent; border-radius: 8px; font-size: 12px; font-weight: 850; text-decoration: none; }
.button-primary { background: #d9bd69; color: #14231c; }
.button-secondary { border-color: var(--line); background: #fff; color: var(--ink); }

.result-panel { margin-top: 30px; padding: clamp(24px,4vw,42px); border: 1px solid var(--line); border-radius: 16px; background: #fff; box-shadow: 0 20px 50px rgba(20,33,27,.08); }
.result-heading { display: flex; justify-content: space-between; gap: 18px; align-items: start; }
.result-heading h2 { font-size: clamp(28px,4vw,44px); }
.result-status { padding: 7px 10px; border-radius: 999px; background: #f1e7c8; color: #74540e; font-size: 10px; font-weight: 850; text-transform: uppercase; }
.result-status.complete { background: #dff0e4; color: #22663e; }
.result-metrics { margin-top: 24px; display: grid; grid-template-columns: repeat(4,1fr); gap: 10px; }
.result-metrics div { padding: 14px; border: 1px solid #e0e5e1; border-radius: 9px; background: #f8f8f4; }
.result-metrics small { display: block; color: var(--muted); font-size: 9px; text-transform: uppercase; letter-spacing: .08em; }
.result-metrics strong { display: block; margin-top: 4px; font: 24px Georgia,serif; }
.result-goals { margin-top: 14px; display: grid; gap: 7px; }
.result-goals div { display: grid; grid-template-columns: 24px 1fr auto; align-items: center; padding: 11px 13px; border: 1px solid #e1e5e1; border-radius: 8px; color: #6d766f; }
.result-goals div.complete { color: #245f3e; background: #f0f8f2; }
.result-goals em { font-size: 11px; font-style: normal; }
.boundary-note { color: var(--muted); font-size: 12px; line-height: 1.55; }
.result-actions { display: flex; flex-wrap: wrap; gap: 10px; margin-top: 18px; }
.result-error { margin: 0; color: #8b2e2e; }

.boundary { display: grid; grid-template-columns: 1fr 1fr; gap: 36px; margin-top: 42px; padding: 30px 0; border-top: 1px solid var(--line); border-bottom: 1px solid var(--line); }
.boundary h2 { font-size: 30px; line-height: 1.1; }
.boundary > p { margin: 0; color: var(--muted); line-height: 1.65; }
footer { display: flex; justify-content: space-between; gap: 20px; padding: 22px clamp(18px,4vw,60px); color: var(--muted); font-size: 10px; letter-spacing: .08em; text-transform: uppercase; }

@media (max-width: 820px) {
    .site-header { align-items: flex-start; }
    .site-header nav { display: none; }
    .hero,.mission-card,.boundary { grid-template-columns: 1fr; }
    .hero aside { display: none; }
    .mission-map { min-height: 270px; }
    .result-metrics { grid-template-columns: repeat(2,1fr); }
}

@media (max-width: 520px) {
    .mission-actions { grid-template-columns: 1fr; }
    .result-actions .button { width: 100%; }
    footer { flex-direction: column; }
}
