:root {
  --ink: #07130e;
  --muted: #6e7d76;
  --line: #dfe7e2;
  --paper: #f3f5ef;
  --card: #ffffff;
  --green: #087f4d;
  --green-dark: #075b3b;
  --lime: #b9ff3d;
  --orange: #f3a33b;
  --shadow: 0 24px 70px rgba(22, 58, 43, .10);
}
* { box-sizing: border-box; }
html { scroll-behavior: smooth; }
body { margin: 0; color: var(--ink); background: var(--paper); font-family: "DM Sans", sans-serif; }
button, input, select { font: inherit; }
button { color: inherit; }
.topbar { height: 74px; padding: 0 clamp(22px, 5vw, 76px); display: flex; align-items: center; gap: 22px; background: rgba(255,255,255,.9); border-bottom: 1px solid var(--line); position: sticky; top: 0; z-index: 10; backdrop-filter: blur(18px); }
.brand { display: flex; align-items: center; gap: 11px; color: #fff; text-decoration: none; font: 800 20px Manrope, sans-serif; margin-right: auto; padding: 7px 13px 7px 8px; border-radius: 13px; background: var(--ink); letter-spacing: -.035em; }
.brand b { color: var(--lime); }
.brand-mark { display: block; width: 36px; height: 36px; flex: 0 0 36px; }
.brand-name { white-space: nowrap; }
.status-pill { font-size: 12px; font-weight: 700; color: var(--green-dark); background: #eaf8ef; padding: 8px 12px; border-radius: 999px; }
.status-pill span { display:inline-block; width:7px;height:7px;border-radius:50%;background:#35c26b;margin-right:7px;box-shadow:0 0 0 5px rgba(53,194,107,.12)}
.ghost-btn { border: 1px solid var(--line); border-radius: 10px; padding: 9px 13px; background: #fff; cursor: pointer; font-size: 12px; font-weight: 700; }
main { max-width: 1540px; margin: auto; }
/* Poster inspired hero with a compact, responsive campus visual. */
.hero { position:relative; isolation:isolate; overflow:hidden; min-height:unset; padding:56px clamp(22px,5vw,76px) 58px; display:grid; grid-template-columns:minmax(0,1.12fr) minmax(350px,.88fr); align-items:center; gap:clamp(24px,4vw,60px); background:linear-gradient(115deg,#061b12 0%,#0b2b1e 58%,#193f29 100%); border-bottom:1px solid #355f42; color:#fff; }
.hero::before { content:""; position:absolute; inset:0; pointer-events:none; opacity:.35; background-image:linear-gradient(rgba(185,255,61,.10) 1px,transparent 1px),linear-gradient(90deg,rgba(185,255,61,.10) 1px,transparent 1px);background-size:60px 60px;mask-image:linear-gradient(90deg,transparent 10%,black 100%);z-index:-1;}
.hero-glow{position:absolute; width:500px;height:500px;right:-160px;top:-260px;border-radius:50%;background:radial-gradient(circle,rgba(185,255,61,.18),transparent 68%);pointer-events:none;z-index:-1;}
.hero-content{position:relative;min-width:0;animation:heroReveal .65s ease both;}
.hero-tag{display:inline-flex;align-items:center;gap:8px;margin:0 0 22px;padding:8px 14px;background:var(--lime);border-radius:999px;color:#102416;font-size:10px;font-weight:800;letter-spacing:.075em;}
.tag-dot{display:block;width:6px;height:6px;border-radius:50%;background:#236939;}
.hero h1{margin:0;max-width:750px;font:800 clamp(40px,4.4vw,68px)/1.07 Manrope,sans-serif;letter-spacing:-.05em;color:#fff;}
.hero h1 em{color:var(--lime);font-style:normal;}
.hero-copy{max-width:600px;margin:22px 0 0;color:#d2e0d5;font-size:15px;line-height:1.75;}
.hero-chips{display:flex;flex-wrap:wrap;gap:8px;margin-top:22px;}
.hero-chips span{font-size:10px;font-weight:750;color:#e3f6e6;border:1px solid rgba(205,255,191,.26);padding:9px 11px;background:rgba(255,255,255,.07);border-radius:999px;}
.hero-link{display:inline-flex;align-items:center;gap:16px;color:var(--lime);font-size:12px;font-weight:800;text-decoration:none;margin-top:22px;}.hero-link span{font-size:19px;transition:transform .2s}.hero-link:hover span{transform:translate(3px,-3px)}
.hero-visual{min-width:0;background:#102e22;border:1px solid rgba(191,252,157,.25);border-radius:18px;overflow:hidden;box-shadow:0 20px 65px rgba(0,0,0,.32);animation:heroReveal .85s .12s ease both;}
.visual-top,.visual-bottom{display:flex;align-items:center;gap:8px;padding:14px 17px;font-size:10px;letter-spacing:.08em;font-weight:800;color:#dff9d7;}.visual-top small{margin-left:auto;font-size:9px;color:#95bca4;letter-spacing:0;font-weight:600;}.live-dot,.legend-dot{display:inline-block;height:7px;width:7px;border-radius:50%;background:var(--lime);box-shadow:0 0 0 4px rgba(185,255,61,.12);}.campus-art{display:block;width:100%;height:auto;}.visual-bottom{justify-content:space-between;letter-spacing:0;font-weight:600;border-top:1px solid rgba(255,255,255,.09);}.visual-bottom span{display:flex;align-items:center;gap:9px;}.visual-bottom strong{font-size:11px;color:var(--lime);}.legend-dot{width:6px;height:6px;}
.signal-pulse{transform-origin:260px 151px;animation:signalBreathe 4s ease-in-out infinite}.signal-pulse.delay{transform-origin:421px 237px;animation-delay:1.3s}
@keyframes signalBreathe{0%,100%{opacity:.45}50%{opacity:.9}}@keyframes heroReveal{from{opacity:0;transform:translateY(13px)}to{opacity:1;transform:translateY(0)}}
.eyebrow { margin: 0 0 10px; font-size: 10px; letter-spacing: .18em; font-weight: 800; color: var(--green); }
.workflow { margin: 0 clamp(22px, 5vw, 76px); transform: translateY(26px); display:flex; align-items:center; padding:16px 22px; background:#fff; border:1px solid var(--line); border-radius:16px; box-shadow: var(--shadow); position:relative; z-index:2; }
.step { display:flex; align-items:center; gap:10px; opacity:.52; min-width:150px; }
.step.active { opacity:1; }
.step>span { width:30px;height:30px;display:grid;place-items:center;border-radius:50%;border:1px solid var(--line);font-size:10px;font-weight:800; }
.step.active>span { background:var(--ink); color:#fff; border-color:var(--ink); }
.step b,.step small { display:block; }.step b{font:700 12px Manrope}.step small{font-size:10px;color:var(--muted);margin-top:3px}.connector{height:1px;background:var(--line);flex:1;margin:0 12px}
.app-shell { margin: 70px clamp(16px, 3vw, 48px) 44px; display:grid; grid-template-columns: 350px minmax(0,1fr); border:1px solid var(--line); border-radius:22px; overflow:hidden; background:#fff; box-shadow:var(--shadow); }
.control-panel { padding:30px; background:#fbfcfa; border-right:1px solid var(--line); }
.panel-heading h2,.workspace h2 { margin:0; font:750 24px Manrope; letter-spacing:-.025em; }
.map-upload-card{margin:22px 0 4px;padding:14px;border:1px dashed #9eb3a8;border-radius:13px;background:#f4f8f3;display:grid;grid-template-columns:34px 1fr auto;gap:4px 10px;align-items:center}.upload-icon{width:34px;height:34px;border-radius:9px;background:var(--ink);color:var(--lime);display:grid;place-items:center;font-size:22px;font-weight:800}.map-upload-card b,.map-upload-card small{display:block}.map-upload-card b{font-size:11px}.map-upload-card small{font-size:9px;color:var(--muted);margin-top:3px}.upload-btn{margin:0;padding:8px 10px;border-radius:8px;background:var(--green);color:#fff;font-size:9px;text-align:center;cursor:pointer}.sample-btn{grid-column:2/4;border:0;background:transparent;color:var(--green);font-size:9px;font-weight:800;text-align:left;padding:6px 0 0;cursor:pointer}.detection-card{margin:10px 0 4px;padding:14px;border:1px solid #cfe0d6;border-radius:13px;background:#fff}.detection-head{display:flex;align-items:center;gap:10px}.detection-head b,.detection-head small{display:block}.detection-head b{font-size:11px}.detection-head small{font-size:9px;color:var(--muted);margin-top:3px}.scan-dot{width:9px;height:9px;border-radius:50%;background:var(--lime);box-shadow:0 0 0 5px rgba(185,255,61,.18);animation:pulse 1s infinite}.scan-progress{height:5px;background:#edf1ee;border-radius:8px;margin:12px 0;overflow:hidden}.scan-progress i{display:block;width:0;height:100%;background:linear-gradient(90deg,var(--green),var(--lime));border-radius:8px;transition:width .35s}.detection-results{display:grid;grid-template-columns:repeat(4,1fr);gap:5px}.detection-results div{padding:8px 4px;background:#f4f7f3;border-radius:7px;text-align:center}.detection-results strong,.detection-results small{display:block}.detection-results strong{font:800 13px Manrope}.detection-results small{font-size:7px;color:var(--muted);margin-top:2px}.confirm-map-btn{width:100%;border:0;border-radius:9px;background:var(--ink);color:#fff;padding:10px;margin-top:10px;font-size:10px;font-weight:800;cursor:pointer}.detection-note{margin:9px 0 0;font-size:8px!important;line-height:1.45;color:var(--muted);text-align:center}@keyframes pulse{50%{box-shadow:0 0 0 9px rgba(185,255,61,.05)}}
.review-map-btn{width:100%;border:1px solid var(--green);border-radius:9px;background:#eff8f2;color:var(--green-dark);padding:10px;margin-top:10px;font-size:10px;font-weight:800;cursor:pointer}.map-editor{margin-top:10px;padding-top:10px;border-top:1px solid var(--line)}.editor-heading b,.editor-heading small{display:block}.editor-heading b{font-size:10px}.editor-heading small{font-size:8px;color:var(--muted);margin-top:2px}.editor-grid{display:grid;gap:6px}.editor-grid.three{grid-template-columns:repeat(3,1fr)}.editor-grid label{margin-top:8px;font-size:8px}.editor-grid input,.editor-row input{width:100%;margin-top:4px;padding:6px;border:1px solid var(--line);border-radius:6px;background:#fff;font-size:9px}.editor-section-head{display:flex;align-items:center;justify-content:space-between;margin:14px 0 6px}.editor-section-head b{font-size:9px}.editor-section-head button{border:0;background:transparent;color:var(--green);font-size:8px;font-weight:800;cursor:pointer}.editor-rows{display:grid;gap:6px;max-height:220px;overflow:auto;padding-right:2px}.editor-row{padding:8px;background:#f5f7f4;border-radius:8px}.editor-row-top{display:grid;grid-template-columns:1fr auto;align-items:center;gap:5px}.editor-row-top input{margin:0;font-weight:700}.editor-row-fields{display:grid;grid-template-columns:repeat(4,1fr);gap:4px;margin-top:5px}.editor-row-fields label{margin:0;font-size:7px;color:var(--muted)}.editor-row-fields input{margin-top:2px}.editor-priority{display:flex!important;align-items:center;gap:4px;font-size:8px!important;margin:6px 0 0!important}.editor-priority input{width:auto;margin:0}.delete-detected{border:0;background:#fff;color:#b44545;width:24px;height:24px;border-radius:6px;cursor:pointer;font-weight:800}.power-row{display:grid;grid-template-columns:1fr 1fr 1fr auto;gap:4px;align-items:end}.power-row label{margin:0;font-size:7px;color:var(--muted)}.apply-edits-btn{width:100%;border:0;border-radius:8px;background:var(--green);color:#fff;padding:9px;margin-top:10px;font-size:9px;font-weight:800;cursor:pointer}
label { display:block; margin-top:20px; color:#42534c; font-size:12px; font-weight:700; }
.field-grid { display:grid; grid-template-columns:1fr 1fr; gap:12px; }
select,input[type=number] { width:100%; margin-top:8px; padding:11px 12px; border:1px solid var(--line); border-radius:10px; background:#fff; color:var(--ink); outline:none; }
select:focus,input:focus{border-color:#58a57f;box-shadow:0 0 0 3px rgba(8,127,77,.08)}
.range-line { display:flex; align-items:center; gap:12px; margin-top:9px; }
input[type=range]{accent-color:var(--green);width:100%}.range-line output{min-width:78px;text-align:right;font-size:11px;font-weight:800;color:var(--ink)}
.toggle-row{display:flex;justify-content:space-between;align-items:center;margin:24px 0 20px;padding:15px 0;border-top:1px solid var(--line);border-bottom:1px solid var(--line)}
.toggle-row b,.toggle-row small{display:block}.toggle-row b{font-size:12px}.toggle-row small{font-size:10px;color:var(--muted);margin-top:4px}
.switch{margin:0}.switch input{display:none}.switch span{display:block;width:38px;height:22px;border-radius:20px;background:#bac4bf;position:relative;cursor:pointer}.switch span:after{content:"";position:absolute;width:16px;height:16px;background:white;border-radius:50%;top:3px;left:3px;transition:.2s}.switch input:checked+span{background:var(--green)}.switch input:checked+span:after{left:19px}
fieldset{border:0;padding:0;margin:0}legend{font-size:11px;font-weight:800;margin-bottom:8px}.check{margin:7px 0;display:flex;align-items:center;gap:9px;font-weight:500}.check input{display:none}.check span{width:16px;height:16px;border:1px solid #b9c6bf;border-radius:4px;background:#fff;position:relative}.check input:checked+span{background:var(--green);border-color:var(--green)}.check input:checked+span:after{content:"✓";position:absolute;color:#fff;font-size:11px;left:3px;top:-1px}
.optimize-btn{width:100%;border:0;border-radius:14px;background:var(--green);color:white;margin-top:25px;padding:16px;display:flex;align-items:center;gap:12px;text-align:left;cursor:pointer;box-shadow:0 12px 25px rgba(8,127,77,.25);transition:.22s}.optimize-btn:hover{background:var(--green-dark);transform:translateY(-2px)}.optimize-btn:disabled{opacity:.72;cursor:wait}.optimize-btn b,.optimize-btn small{display:block}.optimize-btn b{font:700 13px Manrope}.optimize-btn small{font-size:9px;opacity:.75;margin-top:3px}.optimize-btn .spark{font-size:18px}.optimize-btn .arrow{margin-left:auto;font-size:18px}.model-note{text-align:center;font-size:9px;line-height:1.4;color:#8c9892;margin:12px 10px 0}
.workspace { padding:30px; min-width:0; }
.workspace-head { display:flex; align-items:center; justify-content:space-between; margin-bottom:20px; }
.view-toggle{display:flex;background:#eef2ed;border-radius:10px;padding:4px}.view-toggle button{border:0;background:transparent;padding:8px 14px;border-radius:7px;font-size:11px;font-weight:700;cursor:pointer}.view-toggle button.active{background:#fff;box-shadow:0 3px 10px rgba(0,0,0,.07)}
.map-wrap{position:relative;border:1px solid var(--line);border-radius:17px;overflow:hidden;background:#e8eee7;aspect-ratio:1000/650}.map-wrap canvas{display:block;width:100%;height:100%}.map-legend{position:absolute;bottom:15px;left:15px;background:rgba(255,255,255,.93);border-radius:10px;padding:10px 12px;display:grid;grid-template-columns:auto 115px;gap:3px 8px;box-shadow:0 5px 20px rgba(0,0,0,.12);font-size:9px}.map-legend span{font-weight:800}.map-legend .gradient{height:7px;border-radius:10px;background:linear-gradient(90deg,#d74d4d,#eec84c,#63d56c,#00a884)}.map-legend small:nth-of-type(2){text-align:right}.map-badge{position:absolute;top:15px;right:15px;background:rgba(16,37,30,.9);color:#fff;border-radius:11px;padding:10px 13px;display:flex;gap:9px;align-items:center;backdrop-filter:blur(8px)}.map-badge>span{width:8px;height:8px;background:var(--orange);border-radius:50%;box-shadow:0 0 0 5px rgba(243,163,59,.14)}.map-badge b,.map-badge small{display:block}.map-badge b{font-size:11px}.map-badge small{font-size:9px;opacity:.65;margin-top:2px}
.metrics{display:grid;grid-template-columns:repeat(4,1fr);border:1px solid var(--line);border-radius:14px;margin-top:18px;overflow:hidden}.metrics article{padding:17px;border-right:1px solid var(--line)}.metrics article:last-child{border:0}.metrics span,.metrics small{display:block;color:var(--muted);font-size:9px}.metrics strong{display:block;font:750 24px Manrope;margin:6px 0 4px;letter-spacing:-.04em}
.analysis-row{display:grid;grid-template-columns:1.35fr 1fr;gap:18px;margin-top:18px}.chart-card,.plan-card{border:1px solid var(--line);border-radius:15px;padding:20px;min-width:0}.card-title{display:flex;justify-content:space-between}.chart-card h3,.plan-card h3{margin:0;font:700 16px Manrope}.card-title>span{font-size:10px;color:var(--muted)}#convergenceChart{width:100%;height:150px;margin-top:10px}.plan-card>p:not(.eyebrow){font-size:11px;color:var(--muted);line-height:1.55}.ap-plan{display:grid;gap:7px}.ap-item{display:flex;align-items:center;justify-content:space-between;padding:9px 10px;background:#eff6f1;border-radius:8px;font-size:10px}.ap-item b{color:var(--green)}
.explainers{margin:0 clamp(22px,5vw,76px) 80px;display:grid;grid-template-columns:repeat(3,1fr);gap:16px}.explainers article{padding:26px;border:1px solid var(--line);border-radius:16px;background:#fff;display:flex;gap:16px}.explainers article>span{font:800 22px Manrope;color:#b7c2bc}.explainers h3{font:700 15px Manrope;margin:0 0 6px}.explainers p{font-size:11px;line-height:1.55;color:var(--muted);margin:0}
.toast{position:fixed;left:50%;bottom:25px;transform:translate(-50%,20px);background:var(--ink);color:#fff;border-radius:12px;padding:12px 18px;font-size:11px;opacity:0;pointer-events:none;transition:.25s;z-index:20}.toast.show{opacity:1;transform:translate(-50%,0)}
@media(max-width:1050px){.app-shell{grid-template-columns:1fr}.control-panel{border-right:0;border-bottom:1px solid var(--line)}.field-grid{grid-template-columns:1fr 1fr}.hero{align-items:flex-start;flex-direction:column}.hero-stat{width:100%}.workflow{overflow:auto}.step{min-width:130px}.metrics{grid-template-columns:1fr 1fr}.metrics article:nth-child(2){border-right:0}.metrics article:nth-child(-n+2){border-bottom:1px solid var(--line)}}
@media(max-width:720px){.topbar{height:64px}.status-pill{display:none}.hero{padding-top:45px}.hero h1{font-size:43px}.workflow{margin-inline:14px}.connector{min-width:20px}.app-shell{margin-inline:10px}.control-panel,.workspace{padding:20px}.analysis-row,.explainers{grid-template-columns:1fr}.workspace-head{align-items:flex-start;gap:15px;flex-direction:column}.map-wrap{aspect-ratio:4/3}.metrics strong{font-size:20px}.explainers{margin-inline:14px}}

.currency-note{display:block;margin:8px 0 15px;color:var(--muted);font-size:10px;line-height:1.55}.range-line output{min-width:115px}

@media(max-width:1050px){.hero{grid-template-columns:1fr;gap:30px;padding-block:47px}.hero-visual{max-width:700px;width:100%}}
@media(max-width:720px){.hero{padding:36px 22px 43px}.hero h1{font-size:clamp(36px,9vw,48px)}.hero-copy{font-size:14px;margin-top:18px}.hero-tag{font-size:9px}.hero-chips{gap:6px}.hero-chips span{padding:7px 9px}.visual-top,.visual-bottom{padding:11px 13px;font-size:9px}}
@media(prefers-reduced-motion:reduce){.hero-content,.hero-visual,.signal-pulse{animation:none!important}.hero-link span{transition:none}}

/* v1.7: full photo hero made from the actual RuralGrid AI competition poster image. */
.hero {
  display:flex;
  align-items:center;
  min-height:clamp(440px,45vw,590px);
  padding:clamp(65px,8vw,115px) clamp(24px,5.2vw,82px) clamp(60px,7vw,94px);
  background-image:linear-gradient(90deg,rgba(3,23,15,.98) 0%,rgba(3,23,15,.92) 24%,rgba(3,23,15,.76) 40%,rgba(3,23,15,.35) 68%,rgba(3,23,15,.12) 100%),url('assets/ruralgrid_poster_campus.jpg');
  background-size:cover;
  background-position:center 52%;
  border-bottom:3px solid #a9ef35;
}
.hero::before {display:none}
.hero-photo-shade {position:absolute;inset:0;pointer-events:none;background:linear-gradient(0deg,rgba(3,23,15,.28),transparent 38%);z-index:-1}
.hero-content {max-width:685px;z-index:1;animation:heroReveal .65s ease both}
.hero h1 {font-size:clamp(43px,4.5vw,70px);max-width:680px;text-wrap:balance;text-shadow:0 2px 18px rgba(0,0,0,.18)}
.hero h1 em{color:#fff}
.hero-copy{max-width:485px;color:#f0f6ed;font-size:15px;line-height:1.7;text-shadow:0 1px 7px rgba(0,0,0,.25)}
.hero-chips span{background:rgba(5,24,17,.53);border-color:rgba(241,255,220,.3);backdrop-filter:blur(6px)}
.hero-link{padding:12px 17px;border-radius:10px;background:#b9ff3d;color:#081d13;box-shadow:0 8px 24px rgba(1,12,7,.18)}
.hero-link:hover{background:#d0ff76}
.hero-photo-note{position:absolute;right:clamp(25px,5vw,76px);bottom:24px;display:flex;align-items:center;gap:8px;color:#f2f9ee;font-size:10px;font-weight:800;letter-spacing:.1em;background:rgba(3,24,16,.64);border:1px solid rgba(227,255,197,.22);border-radius:30px;padding:10px 15px;backdrop-filter:blur(8px)}
.hero-photo-note-dot{width:8px;height:8px;background:#b9ff3d;border-radius:50%;box-shadow:0 0 0 5px rgba(185,255,61,.13);animation:photoNotePulse 3s infinite}
@keyframes photoNotePulse{50%{box-shadow:0 0 0 10px rgba(185,255,61,0)}}
@media(max-width:1050px){.hero{min-height:490px;padding:62px 35px 75px;background-position:62% center}.hero-content{max-width:590px}}
@media(max-width:720px){.hero{min-height:575px;padding:65px 22px 105px;background-image:linear-gradient(180deg,rgba(3,23,15,.91) 0%,rgba(3,23,15,.78) 42%,rgba(3,23,15,.42) 78%,rgba(3,23,15,.26) 100%),url('assets/ruralgrid_poster_campus.jpg');background-position:60% center;align-items:flex-start}.hero h1{font-size:clamp(37px,9vw,50px)}.hero-photo-note{left:22px;right:auto;bottom:24px;font-size:9px}.hero-copy{max-width:420px}}
@media(prefers-reduced-motion:reduce){.hero-photo-note-dot{animation:none}}
